title: Fancybox image click works isolated but not with my other code
body: <p>So my problem is that when clicking an image to enable fancybox <em>embedded with all my other code</em>, the function is no longer working. Can anyone find why?
  I tried to put the image before the container and thumbnail class but no luck..
  First, I give you all my code (which makes fancybox not work), and below is the isolated code that makes the image pop up just fine as I want it to.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang='en'&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Title&lt;/title&gt;
      &lt;link href='http://fonts.googleapis.com/css?family=Quicksand:300' rel='stylesheet' type='text/css'&gt;
      &lt;link rel="stylesheet" href="bootstrap-3.3.2-dist/css/bootstrap.css"&gt;
      &lt;link rel="stylesheet" href="main.css"&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="fancybox/source/jquery.fancybox.css" type="text/css" media="screen" /&gt;
      &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;section&gt;
      &lt;header&gt;
       &lt;a href="#"&gt;TITLE&lt;/a&gt;
      &lt;/header&gt;
      &lt;nav&gt;
        &lt;ul&gt;
             &lt;li&gt;&lt;a href="#"&gt;AAA&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#"&gt;BBB&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#"&gt;CCC&lt;/a&gt;
             &lt;ul&gt;
                &lt;li&gt;&lt;a href="#"&gt;111&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;222&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;333&lt;/a&gt;&lt;/li&gt;
             &lt;/ul&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#"&gt;DDD&lt;/a&gt;
                &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#"&gt;111&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;222&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;333&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#"&gt;EEE&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
    &lt;/section&gt;
    &lt;div class='container'&gt;
       &lt;div class="thumbnail"&gt;
             &lt;div class="col-lg-2 col-md-3 col-sm-4 col-xs-6"&gt;
                &lt;a class="fancybox" href="images/image1.jpg"&gt;&lt;img src="images/image1.jpg"&gt;&lt;/a&gt;
             &lt;/div&gt;
             &lt;div class="col-lg-2 col-md-3 col-sm-4 col-xs-6"&gt;
                &lt;a class="fancybox" href="image2.jpg"&gt;&lt;img src="image2.jpg"&gt;&lt;/a&gt;
             &lt;/div&gt;
             &lt;div class="col-lg-2 col-md-3 col-sm-4 col-xs-6"&gt;      
                &lt;a class="fancybox" href="image3.jpg"&gt;&lt;img src="image3.jpg"&gt;&lt;/a&gt;
             &lt;/div&gt;
             &lt;div class="col-lg-2 col-md-3 col-sm-4 col-xs-6"&gt;
                &lt;a class="fancybox" href="image4.jpg"&gt;&lt;img src="image4.jpg"&gt;&lt;/a&gt;
             &lt;/div&gt;
             &lt;div class="col-lg-2 col-md-3 col-sm-4 col-xs-6"&gt;
                &lt;a class="fancybox" href="image5.jpg"&gt;&lt;img src="image5.jpg"&gt;&lt;/a&gt;
             &lt;/div&gt;
          &lt;/div&gt;
    &lt;/div&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;   
  &lt;script scr='bootstrap-3.3.2-dist/js/bootstrap.js'&gt;&lt;/script&gt;
  &lt;script src="http://goo.gl/1yIJUX"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    $(document).ready(function(){
       $(".fancybox").fancybox();
    });
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the code that is working fine:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang='en'&gt;
  &lt;head&gt;
   &lt;title&gt;Title&lt;/title&gt;
   &lt;link rel="stylesheet" href="main.css"&gt;
   &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
   &lt;link rel="stylesheet" href="fancybox/source/jquery.fancybox.css" type="text/css" media="screen" /&gt;
   &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;a class="fancybox" rel="group" href="images/image1.JPG"&gt;&lt;img src="images/image1.JPG" alt="" /&gt;&lt;/a&gt;
   &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
      $(".fancybox").fancybox();
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>