$(document).ready(function(){ 


$("#Nav").superfish({
	delay:     800,        // the delay in milliseconds that the mouse can remain outside a submenu without it closing 
	animation:   {opacity:'show'},  // an object equivalent to first parameter of jQuery’s .animate() method 
	speed:     'normal',      // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
	autoArrows:  true        // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
});




$(".Morphing").cycle({ 
	fx: "fade",			/* controls transition effect -- see below for more effects */
	speed:  3500,		/* controls speed of transition */	
	pause: 1

});




$('.SliderBG a').lightBox({fixedNavigation:true}); 

$('.Test a').lightBox({fixedNavigation:true}); 

$('a.PatientInfo_Photo').lightBox({fixedNavigation:true}); 



$(function(){
	//Get our elements for faster access and set overlay width
	var div = $('div.SliderBG'),
	ul = $('ul.SliderBG'),
	// unordered list's left margin
	ulPadding = 15;
	
	//Get menu width
	var divWidth = div.width();
	
	//Remove scrollbars
	div.css({overflow: 'hidden'});
	
	//Find last image container
	var lastLi = ul.find('li:last-child');
	
	//When user move mouse over menu
	div.mousemove(function(e){
	
		//As images are loaded ul width increases,
		//so we recalculate it each time
		var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;
		
		var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
		div.scrollLeft(left);
	});
});




}); //End Functions


