Magnific Pop up not working for scroll images displayed using Java script (from Dynamic Drive)

Magnific Pop up not working for scroll images displayed using Java script (from Dynamic Drive)

Dear Sir

Please refer 

http://prajaktasoftware.com/sugandhi/aboutus.php

The click on scrolling image donot display the image in pop up
however the same displayed (as non scrolling image) which indicates the Magnific popup is working

displays the image in bigger size when clicked on scrolling image using magnific popup


script for scroll image
  1. <script type="text/javascript">

  2. /***********************************************
  3. * Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
  4. * This notice MUST stay intact for legal use
  5. * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
  6. ***********************************************/


  7. //Specify the slider's width (in pixels)
  8. var sliderwidth="90%"
  9. //Specify the slider's height
  10. var sliderheight="560px"
  11. //Specify the slider's slide speed (larger is faster 1-10)
  12. var slidespeed=1
  13. //configure background color:
  14. slidebgcolor=""

  15. //Specify the slider's images
  16. var leftrightslide=new Array()
  17. var finalslide=''
  18. /*leftrightslide[0]='<a href="#"><img src="images/slide1.jpg" border=0 style="margin-left:15px;margin-right:15px;box-shadow: 0px 5px 12px #151515;" ></a>'
  19. leftrightslide[1]='<a href="#"><img src="images/slide2.jpg" border=0 style="margin-left:15px;margin-right:15px;box-shadow: 0px 5px 12px #151515;"></a>'
  20. leftrightslide[2]='<a href="#"><img src="images/slide3.jpg" border=0 style="margin-left:15px;margin-right:15px;box-shadow: 0px 5px 12px #151515;"></a>'*/

  21. <?php  do { $i++;

  22.  //// main routine where the string is formed //////////////////////////////////////////

  23.  $str='<a href="'.$rows['actualimage'].'" class="with-caption image-link" title="'.$Projectname.'"><img src="'. $rows['bigimage'].'" border=0 style="margin-left:15px;margin-right:15px; "></a>';

  24. /// main routine where string is formed is over ///////////////////////////////////////

  25. ?>
  26.          leftrightslide[<?php echo $i; ?>]='<?php echo $str;?>'
  27.  <?php  
  28. } while ($rows = mysql_fetch_assoc($Result));
  29.  
  30. ?>

  31. //Specify gap between each image (use HTML):
  32. var imagegap=" "

  33. //Specify pixels gap between each slideshow rotation (use integer):
  34. var slideshowgap=15


  35. ////NO NEED TO EDIT BELOW THIS LINE////////////

  36. var copyspeed=slidespeed
  37. leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
  38. var iedom=document.all||document.getElementById
  39. if (iedom)
  40. document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
  41. var actualwidth=''
  42. var cross_slide, ns_slide

  43. function fillup(){
  44. if (iedom){
  45. cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
  46. cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
  47. cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
  48. actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
  49. cross_slide2.style.left=actualwidth+slideshowgap+"px"
  50. }
  51. else if (document.layers){
  52. ns_slide=document.ns_slidemenu.document.ns_slidemenu2
  53. ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
  54. ns_slide.document.write(leftrightslide)
  55. ns_slide.document.close()
  56. actualwidth=ns_slide.document.width
  57. ns_slide2.left=actualwidth+slideshowgap
  58. ns_slide2.document.write(leftrightslide)
  59. ns_slide2.document.close()
  60. }
  61. lefttime=setInterval("slideleft()",30)
  62. }
  63. window.onload=fillup

  64. function slideleft(){
  65. if (iedom){
  66. if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
  67. cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
  68. else
  69. cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

  70. if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
  71. cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
  72. else
  73. cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"

  74. }
  75. else if (document.layers){
  76. if (ns_slide.left>(actualwidth*(-1)+8))
  77. ns_slide.left-=copyspeed
  78. else
  79. ns_slide.left=ns_slide2.left+actualwidth+slideshowgap

  80. if (ns_slide2.left>(actualwidth*(-1)+8))
  81. ns_slide2.left-=copyspeed
  82. else
  83. ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
  84. }
  85. }


  86. if (iedom||document.layers){
  87. with (document){
  88. document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
  89. if (iedom){
  90. write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
  91. write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
  92. write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
  93. write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
  94. write('</div></div>')
  95. }
  96. else if (document.layers){
  97. write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
  98. write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  99. write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  100. write('</ilayer>')
  101. }
  102. document.write('</td></table>')
  103. }
  104. }
  105. </script>