$(function () {
	$('div.load').hide();//hide all the images on the page
	});
	
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",300);//500 is the fade in speed in milliseconds
		});
	
		function doThis() {
			var images = $('div').length;//count the number of images on the page
			if (i >= images) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
			}
			$('div:hidden').eq(0).fadeIn(700);//fades in the hidden images one by one
			i++;//add 1 to the count
}


$(document).ready(function(){


	$("div.aa").hover(
	function() {
		$(this).stop().animate({"opacity": "0"}, "slow");
	},
	function() {
		$(this).stop().animate({"opacity": "1"}, "slow");
	});
	
// Scroll
		$(".scroll").click(function(event){
		//prevent the default action for the click event
		event.preventDefault();

		//get the full url - like mysitecom/index.htm#home
		var full_url = this.href;

		//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
		var parts = full_url.split("#");
		var trgt = parts[1];

		//get the top offset of the target anchor
		var target_offset = $("#"+trgt).offset();
		var target_top = target_offset.top;

		//goto that anchor by setting the body scroll top to anchor top
		$('html, body').animate({scrollTop:target_top}, 1000);
	});
 
});
