$(function(){

	$('a[rel=window]').live("click",function(){
		var url = $(this).attr("href");
		window.open(url,'','')
		return false;
	});

	$("a.pickupTrigger").mouseover(function(){
		var url = $(this).attr("href");

		$("#thumbnails li").removeClass("select").removeAttr("class");
		$(this).parent().addClass("select");

		$("#photo").ImageSwitch({
			Type: "FadeIn",
			NewImage: url,
			EffectOriginal: true,
			Speed: 500, //Speed of the effect
			StartLeft: 0, //The position the effect start compare to original position could be (-)
			StartTop: 0,
			StartOpacity: 0, //Which start opacity it would be
			EndLeft: -50, //The position the effect end compare to the original position could be (-)
			EndTop: 0,
			EndOpacity: 0, //Which start opacity it would be
			Direction: "RightLeft", //Which Way the image will be sroll
			Door1: "", //The image for the door 1
			Door2: "" //The image for the door 2
		});

		return false;
	}).click(function(){
			return false;
	});

	var x,y,scrollTop,mouseY, mouseX,scrollLeft;
	$(window.document).mousemove(function(e){
		x = e.pageX;
		y = e.pageY;
		mouseY = e.pageY;
		mouseX = e.pageX;
		$("#loading").css("left",x);
		$("#loading").css("top",y);
//		scrollTop = window.pageYOffset || document.documentElement.scrollTop;
		scrollFigure = document.documentElement.scrollTop || document.body.scrollTop;
		scrollTop = document.documentElement.clientHeight || document.body.scrollHeight;
		scrollTop = scrollTop + (scrollFigure*2);
		scrollLeft = document.documentElement.clientWidth || window.innerWidth;
		
	});


});
