// JavaScript Document


(function ()
{
	var slideSpeedInMs = 300;  /* To make the slide animation faster, decrease this number. To make it go slower, increase it */
	$(document).ready(
		
		function ()
		{
			$("#topnav").find("a").each( function() {
				
				// The position: relative div will allow us to position the hover div appropriately.
				$(this).wrap("<div class='topnavcontainer'></div>");
				
				// "this" points to the anchor. We want to create a clone of this element and add the onhover class
				// (which will modify the background image used and set it to be absolutely positioned)
				var left = $(this).position().left > 0 ?  $(this).position().left : 0; /* IE7 seems to think the first one is -145px... */
				var $onHoverClone = $(this).clone().addClass("onhover").css("left", left);
				
				$(this).parent().hover(
					function() {
						$onHoverClone.slideDown(slideSpeedInMs);
					},	
					function() {
						$onHoverClone.slideUp(slideSpeedInMs);
					}
				);
				
				$onHoverClone.insertBefore(this);
				
			});
			
		} 
	
	);
})();
	


$(function() {
	$('.pics img').css({
        opacity: 0
    });
    
    setTimeout(function() {
        $('#slideshow').cycle({
            random: 1,
            delay:  -9000
        });

	    $('.pics img').css({
	        opacity: 0
	    });

    }, 1000);

});



		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true,
				controlsShow: false,
				speed: 200,
				pause: 10000,
				continuous: true 
			});
		});	
