
// execute your scripts when the DOM is ready. this is mostly a good habit
$.easing.custom = function (x, t, b, c, d) {
	var s = 1.70158; 
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}

// What is $(document).ready ? See: http://flowplayer.org/tools/documentation/basics.html#document_ready
$(document).ready(function() {

/*
$(".scrollable").scrollable({
		circular: false,
		easing:	"custom",
		mousewheel: true
		}).navigator().autoscroll({
		interval: 3000		
		});
*/		

$(".slider .n").tabs(".slider .s > div", {

	// enable "cross-fading" effect
	effect: 'fade',
	
	fadeInSpeed: "slow",
	fadeOutSpeed: 0,

	// start from the beginning after the last tab
	rotate: true

// use the slideshow plugin. It accepts its own configuration
}).slideshow({
	interval: 4000,
	autoplay: true
	
	});	

var iDiv = $(".slider .s > div > div");
if(iDiv){
	showiDiv = function(){
		iDiv.fadeIn();	
	}
	$(".slider .s > div > div").hide();
	var t=setTimeout("showiDiv()",500);	
}


$("img.b").hide();
$("img.b").fadeIn();	


	// Fancy Box ###############################################################
	if($("a#single_image").length){
		$("a#single_image").fancybox({
			'zoomOpacity' : true,
			'zoomSpeedIn': 400,
			'zoomSpeedOut': 400,
			'overlayOpacity': 0.7,
			'overlayColor': '#000',
			'overlayShow': true
		}); 
	}
	
	if($("a#inline800").length){
		$("a#inline800").fancybox({
			'hideOnContentClick': true,
			'overlayColor': '#000',
			'overlayOpacity': 0.7,
			'frameWidth': 800,
			'frameHeight': 600
		}); 
	}
	
	if($("a.group").length){
		$("a.group").fancybox({
			'zoomOpacity' : true,
			'overlayColor': '#000',
			'overlayOpacity': 0.7,
			'zoomSpeedIn': 400,
			'zoomSpeedOut': 400,
			'overlayShow': true
		}); 
	}
	
	if($("a.lightBox").length){
		$('a').lightBox(); // Select all links in the page
	}

		
});













