title: Errors when loading Fancybox jQuery, Javascript and Stylesheet
body: <p>I am trying to implement FancyBox v2.1.7 and I am receiving a few errors when trying to load the content. So I have followed the instructions and added the relevant code to the head tag of my php document. Please see code and images as reference:</p>
  
  <pre><code>&lt;!-- Add jQuery library --&gt;
  &lt;script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Add mousewheel plugin (this is optional) --&gt;
  &lt;script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"&gt;&lt;/script&gt;
  
  &lt;!-- Add fancyBox --&gt;
  &lt;link rel="stylesheet" href="fancybox/source/jquery.fancybox.css?v=2.1.7" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.7"&gt;&lt;/script&gt;
  
  &lt;!-- Optionally add helpers - button, thumbnail and/or media --&gt;
  &lt;link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"&gt;&lt;/script&gt;
  
  &lt;link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
    $(document).ready(function() {
      $(".fancybox").fancybox();
    });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Website errors</strong>
  <a href="https://i.stack.imgur.com/huDXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/huDXE.png" alt="Website Errors"></a>
  I have name the folder fancybox on the server and I have positioned the code above in the head of my product.php page.</p>
  
  <p>product code</p>
  
  <pre><code>&lt;?php
  $product_sql = mysql_query("SELECT * FROM products WHERE Product_Title_Slug = '$seo_title'");
  
  // If no match exists, display error 404
  if (mysql_num_rows($product_sql) == 0)
  {
      include('error404.php');
      exit();
  }
  $prod_row = mysql_fetch_array($product_sql);
  $prod_id = $prod_row['Product_ID'];
  $cat_id = $prod_row['Category_ID'];
  $prod_title = $prod_row['Product_Title'];
  $prod_meta_title = $prod_row['Product_Meta_Title'];
  $prod_code = $prod_row['Product_Code'];
  $prod_description = $prod_row['Product_Description'];
  $prod_meta_description = $prod_row['Product_Meta_Description'];
  $prod_meta_keywords = $prod_row['Product_Meta_Keywords'];
  $prod_points = explode("|", $prod_row['Product_Points']);
  $info_name = array("","Continuous KVA:","Maximum KVA:","Continuous KW:","Maximum KW:","Sockets:","Fuel Type:","Run Time:","Noise Level:","Weight:","Width:","Height:","Length:","Fuel Capacity:","Starting Method:","Frequency:","AVR:", "ATS:");
  $info_type = array(""," KVA"," KVA"," KW"," KW","",""," hours"," dba @ 7m","kg","mm","mm","mm","L","","Hz","", "");
  $price = $prod_row['Price'];
  $price_sale = $prod_row['Price_Sale'];
  $price_final = $prod_row['Price_Final'];
  $prod_video = $prod_row['Product_Video'];
  $offer = $prod_row['Offer'];
  $next_day_del = $prod_row['Next_Day_Delivery'];
  $stock = $prod_row['Stock'];
  $prod_brand = $prod_row['Product_Brand'];
  $warranty = $prod_row['Warranty'];
  $brand_sql = mysql_query("SELECT * FROM brands WHERE Brand_ID = $prod_brand");
  if (mysql_num_rows($brand_sql) &gt; 0)
  {
      $brand_row = mysql_fetch_array($brand_sql);
      $brand_name = $brand_row['Brand_Name'];
  }
  
  // Get category details for breadcrumbs
  $category_sql = mysql_query("SELECT Category_Name, Category_Name_Slug FROM categories WHERE Category_ID = $cat_id");
  $cat_row = mysql_fetch_array($category_sql);
  $cat_name = $cat_row['Category_Name'];
  $cat_name_slug = $cat_row['Category_Name_Slug'];
  
  // Assign page details
  $page_title = $prod_title;
  $meta_title = $prod_meta_title; 
  $meta_description = $prod_meta_description;
  $meta_keywords = $prod_meta_keywords;
  ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;&lt;?=$meta_title?&gt; | &lt;?=$site_name?&gt;&lt;/title&gt;
  &lt;meta name="description" content="&lt;?=$meta_description?&gt;" /&gt;
  &lt;meta name="keywords" content="&lt;?=$meta_keywords?&gt;" /&gt;
  
  &lt;?php include ("includes/header-tags.php") ?&gt;
  
  
  &lt;!--2017 Fancy--&gt;
  &lt;!-- Add jQuery library --&gt;
  &lt;script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Add mousewheel plugin (this is optional) --&gt;
  &lt;script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"&gt;&lt;/script&gt;
  
  &lt;!-- Add fancyBox --&gt;
  &lt;link rel="stylesheet" href="fancybox/source/jquery.fancybox.css?v=2.1.7" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.7"&gt;&lt;/script&gt;
  
  &lt;!-- Optionally add helpers - button, thumbnail and/or media --&gt;
  &lt;link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"&gt;&lt;/script&gt;
  
  &lt;link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
    $(document).ready(function() {
      $(".fancybox").fancybox();
    });
  &lt;/script&gt;
  
  &lt;script type="text/javascript" src="/js/tabs.js"&gt;&lt;/script&gt;
  &lt;?php if (isset($_POST['Add_Basket'])): // Adding to basket ?&gt;
  &lt;script src="/js/addbasketpopup.js"&gt;&lt;/script&gt;
  &lt;?php endif; ?&gt;
  &lt;link href="/css/tabs.css" rel="stylesheet" type="text/css" /&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div id="wrapper"&gt;
      &lt;?php include ("includes/header.php") ?&gt;
      &lt;ul id="breadcrumbs"&gt;
          &lt;li&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt; &amp;rsaquo; &lt;a href="/&lt;?=$cat_name_slug?&gt;"&gt;&lt;?=$cat_name?&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt; &amp;rsaquo; &lt;?=$page_title?&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;?php include ("includes/left-content.php") ?&gt;
      &lt;div id="main"&gt;
          &lt;div id="prod-details-img"&gt;
              &lt;?php
              if ($warranty &gt;= 2) {
                  echo '&lt;div class="prod-details-warranty"&gt;' . $warranty . ' Years Warranty&lt;/div&gt;';
              }
              ?&gt;
              &lt;div&gt;&lt;/div&gt;
              &lt;img src="/images/large/&lt;?=$prod_id?&gt;.jpg" alt="&lt;?=$prod_title?&gt;" /&gt;
          &lt;/div&gt;
          &lt;div id="prod-details"&gt;
              &lt;h1 class="prod-title-large"&gt;&lt;?=$prod_title?&gt;&lt;/h1&gt;
              &lt;span id="prod-details-delivery"&gt;
              &lt;img class="price-prom-sml" src="/images/price-promise.gif" alt="Price Promise" /&gt;&lt;br /&gt;
              Price includes VAT &amp;amp; Delivery&lt;br /&gt;Order before 1pm for Free Next Day Delivery &lt;br/&gt;(UK Mainland Only)*&lt;/span&gt;
              &lt;div id="prod-details-buy"&gt;
                  £&lt;?=$price_final?&gt;
                  &lt;?php if ($stock == "TRUE"):?&gt;
                  &lt;form action="&lt;?php $_SERVER['PHP_SELF'] ?&gt;" method="post"&gt;
                      &lt;input type="hidden" name="Auto_ID" value="&lt;?=$prod_id?&gt;" /&gt;
                      &lt;input type="hidden" name="QTY" value="1" /&gt;
                      &lt;button type="submit" name="Add_Basket" id="buy-btn"&gt;Buy&lt;/button&gt;
                  &lt;/form&gt;
                  &lt;?php else: ?&gt;
                  &lt;br /&gt;Out of Stock
                  &lt;?php endif; ?&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="product-specs"&gt;       
          &lt;div id="tabContainer"&gt;
                  &lt;div id="tab_1" class="tabs_on" onclick="tabsClass.switchTab(this);"&gt;Description&lt;/div&gt;
                  &lt;div id="tab_2" class="tabs_off" onclick="tabsClass.switchTab(this);"&gt;Specifications&lt;/div&gt;
                  &lt;?php if(!empty($prod_video)): ?&gt;
                  &lt;div id="tab_3" class="tabs_off" onclick="tabsClass.switchTab(this);"&gt;Video&lt;/div&gt;
                  &lt;?php endif; ?&gt;
              &lt;/div&gt;
              &lt;div id="tab_1_data" class="tab_content"&gt;
                  &lt;p&gt;&lt;?=nl2br($prod_description)?&gt;&lt;/p&gt;
                  &lt;?php
                  // If product has bullet points, explode and print
                  if (!empty($prod_points[0]))
                  {
                      echo '&lt;ul&gt;';
                      foreach ($prod_points as $bullet_point)
                      {
                          echo '&lt;li&gt;' . $bullet_point . '&lt;/li&gt;';
                      }
                      echo '&lt;/ul&gt;';
                  }
                  ?&gt;
              &lt;/div&gt;
              &lt;div id="tab_2_data" class="tab_content" style="display: none;"&gt;
                  &lt;table class="spec-table" cellspacing="0" cellpadding="0"&gt;
                      &lt;?php if(!empty($brand_name)): ?&gt;
                      &lt;tr&gt;
                        &lt;td&gt;Manufacturer:&lt;/td&gt;
                        &lt;td&gt;&lt;?=$brand_name?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;?php endif; ?&gt;
                      &lt;tr&gt;
                        &lt;td width="150"&gt;Product Code:&lt;/td&gt;
                        &lt;td&gt;&lt;?=$prod_code?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;?php
                      $class = ($x == 3) ? 'prod-result-last' : 'prod-result';
                      $x = 1;
                      while ($x &lt;= 17):
                          if (!empty($prod_row["Info_$x"])):
                              if ($prod_row["Info_$x"] == "TRUE")
                              {
                                  $prod_row["Info_$x"] = "Yes";
                              }
                              elseif ($prod_row["Info_$x"] == "FALSE")
                              {
                                  $prod_row["Info_$x"] = "No";
                              }
                      ?&gt;
                      &lt;tr&gt;
                        &lt;td&gt;&lt;?=$info_name[$x]?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?=$prod_row["Info_$x"] . $info_type[$x]?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;?php
                          endif;
                      $x++;
                      endwhile;
                      ?&gt;
                      &lt;?php if(!empty($warranty)): ?&gt;
                      &lt;tr&gt;
                        &lt;td&gt;Warranty:&lt;/td&gt;
                        &lt;td&gt;&lt;?=$warranty?&gt; Year&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;?php endif; ?&gt;
                  &lt;/table&gt;
                 &lt;/div&gt;
                 &lt;?php if(!empty($prod_video)): ?&gt;
                 &lt;div id="tab_3_data" class="tab_content" style="display: none;"&gt;
                      &lt;?=$prod_video?&gt;
                 &lt;/div&gt;
                 &lt;?php endif; ?&gt;
              &lt;script type="text/javascript"&gt;
                  tabsClass.addTabs("tabContainer");
              &lt;/script&gt;
          &lt;/div&gt;
          * Next Day Delivery subject to stock, please see our &lt;a href="/terms"&gt;Terms &amp;amp; Conditions&lt;/a&gt;.
      &lt;/div&gt;
      &lt;?php include ("includes/footer.php") ?&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>