


//::: thumbnail preview swap ::://
$(document).ready(function(){
						   

	/* This is basic - uses default settings */ 
	$("a#single_image").fancybox(); 
	/* Using custom settings */ 
	$("a#inline").fancybox({ 'hideOnContentClick': true }); 
	$("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 
	
	

	//::: Navigation drop down and overlay ::://
   //::: if we have js enables lets hide the drop mene so we can animate it later :::'
   $("#nav li ul").addClass("jqhide");
   
    //::: Use hover intent to stop loop bug :::'
    $("#nav li").hoverIntent(
   	function(){
		$(this).addClass("sfhover","1000").fadeIn();
	 	$(this).children("ul").slideToggle("fast");		

		
		if ( $(this).hasClass("menu") ) {
			$(".overlaytrans").stop();
	
			$('.overlaytrans').fadeTo("fast",100); 
		}
	},
	function(){	
		$(this).removeClass("sfhover","1000");
		$(this).children("ul").slideToggle("fast");
		$(".overlaytrans").stop();
		$('.overlaytrans').fadeTo("slow",0.0);
		$('.overlaytrans').css('display','none'); 
	 });
	 
	$("#nav li li").hover(
   	function(){
		$(this).removeClass("sub").fadeIn(); 
		$(this).addClass("subhover").fadeIn();   
	},
	function(){	
		$(this).removeClass("subhover");
		$(this).addClass("sub");
	 });
	 
	$.fn.hoverClass = function(c) {
		return this.each(function(){
			$(this).hover( 
				function() { $(this).addClass(c);  },
				function() { $(this).removeClass(c); }
			);
		});
	}; 
	
});





