$(document).ready(function(){
	$(".openList > li > a").click(function(){
		$(this).next().slideToggle("slow");
		return false;
	});
	$("#scroller").scrollable({
		size: 3,
		"next": ".msNext",
		"prev": ".msPrev"
	});
	$("#scrollerClock").scrollable({
		size: 4,
		"next": ".msNext",
		"prev": ".msPrev"
	});
	
	$(".msItem").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("span.out").css({'background' : 'url(' + thumbOver + ') no-repeat center -230px'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span.in").stop().fadeTo('fast', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span.in").stop().fadeTo('fast', 1).show();
	});
	
	$("a[rel]").overlay({
		expose: { 
	        color: '#333', 
	        loadSpeed: 200, 
	        opacity: 0.9 
	    }
	});
	
	$(".sectionList").animate({ 
        "left": "0px"
      }, 1500, function(){$(".promoPic > img").fadeIn("slow")});
	 $(".listingNav").animate({ 
        "left": "0px"
      }, 1500, function(){$(".promoPic > img").fadeIn("slow")} );
	  $(".listing").animate({ 
        "left": "0px"
      }, 1500 );
	  //$(".promoPic > img").fadeIn("slow");
});

