$(document).ready(function (){
  $('.slideshow').before('<div id="nav"></div>').cycle({
    fx: 'fade',
    pager:  '#nav'
  });
  
  $("h2.trigger").click(function(){
  
    $(this).toggleClass("active").next().slideToggle("medium");
  });
 
	//$("ul.demo2").ytplaylist({addThumbs:true, autoPlay: false, holderId: 'ytvideo2'});
if(document.getElementById('filmreelBottom')){
	 document.getElementById('filmreelBottom').style.position = "absolute";

	// Tabs
	$(".tabContent").hide(); //Hide all content
	$("#tabs ul li:first").addClass("active").show(); //Activate first tab
	$(".tabContent:first").show(); //Show first tab content
  	var num=0;
	//On Click Event
	$("#tabs ul li").click(function() {
    num=num+1;
		$("#tabs ul li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tabContent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
    if(num % 2 != 0) {
      $('#filmreelBottom').addClass('active');
    }
    else { 
      $('#filmreelBottom').removeClass('active');
    }
    
		return false;
	});
	}
		 $("ul.sf-menu").superfish({ 
           animation: {height:'show'},   // slide-down effect without fade-in 
            delay:     200               // 1.2 second delay on mouseout 
        }); 
        //$('a.lightbox').lightBox();
});

