lightbox is crashing <p>I have several pages made from the a template that has a navigation made with idTabs, in javascript. </p> <p>This is what I have in <code>&lt;head&gt;</code>:</p> <pre><code> &lt;script type="text/javascript" src="jquery.idTabs.min.js"&gt;&lt;/script&gt; &lt;script src="scripts/jquery.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="scripts/lightbox.js" type="text/javascript"&gt;&lt;/script&gt; &lt;link href="css/lightbox.css" rel="stylesheet" type="text/css" /&gt; &lt;link href="css/sample_lightbox_layout.css" rel="stylesheet" type="text/css" /&gt; </code></pre> <p>Then in <code>&lt;body&gt;</code>: </p> <pre><code>&lt;div id="poze"&gt; &lt;div id="gallery" class="lbGallery"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="images/lightboxdemo2.jpg" title=""&gt;&lt;img src="images/lightboxdemo_thumb2.jpg" width="72" height="72" alt="Flower" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="images/lightboxdemo5.jpg" title=""&gt;&lt;img src="images/lightboxdemo_thumb5.jpg" width="72" height="72" alt="Tree" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; // BeginOAWidget_Instance_2127022: #gallery $(function(){ $('#gallery a').lightBox({ imageLoading: '/images/lightbox/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon imageBtnPrev: '/images/lightbox/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image imageBtnNext: '/images/lightbox/lightbox-btn-next.gif', // (string) Path and the name of the next button image imageBtnClose: '/images/lightbox/lightbox-btn-close.gif', // (string) Path and the name of the close btn imageBlank: '/images/lightbox/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel) fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface. containerResizeSpeed: 400, // Specify the resize duration of container image. These number are miliseconds. 400 is default. overlayBgColor: "#999999", // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color. overlayOpacity: .6, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9 txtImage: 'Image', //Default text of image txtOf: 'of' }); }); // EndOAWidget_Instance_2127022 &lt;/script&gt; &lt;/div&gt; </code></pre> <p>The navigation has two links: a <code>&lt;div&gt;</code> with text, and a <code>&lt;div&gt;</code> with lightbox gallery. The lightbox is a widget from Dreamweaver.</p> <pre><code>&lt;div id="navidtabs"&gt; &lt;ul class="idTabs"&gt; &lt;li&gt;&lt;a href="#info"&gt;informatii&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#pictures"&gt;poze&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>Something unbelievable happens: I apply the template to a new page, make the modifications, save it, load it into the wamp server, switch between the navigation links, test the lightbox, it works! But when I switch for example, to a different page, and return, the lightbox crashes. I can see the pictures, but when I click it opens another page just for the picture. </p> <p>I forgot to say that I have a third <code>&lt;div&gt;</code> conected into the navigation, a select command to retrieve data from database. The entire file is PHP.</p> <p>What can I do to mantain the lightbox effect?</p>