$(document).ready(function(){
	$("#logo").fadeIn("slow");
	$(".gallery a[rel^='prettyPhoto']").prettyPhoto();
	$("#i_a_").hover(
			function(){
				$("#i_a").fadeIn(800);
				$("#a_1").fadeIn("slow");
			},
			function(){
				$("#i_a").fadeOut(800);
				$("#a_1").fadeOut("slow");
			})
	$("#i_b_").hover(
			function(){
				$("#i_b").fadeIn(800);
				$("#a_2").fadeIn("slow");
			},
			function(){
				$("#i_b").fadeOut(800);
				$("#a_2").fadeOut("slow");
			})
	$("#i_c_").hover(
			function(){
				$("#i_c").fadeIn(800);
				$("#a_3").fadeIn("slow");
			},
			function(){
				$("#i_c").fadeOut(800);
				$("#a_3").fadeOut("slow");
			})
	$("#i_d_").hover(
			function(){
				$("#i_d").fadeIn(800);
				$("#a_4").fadeIn("slow");
			},
			function(){
				$("#i_d").fadeOut(800);
				$("#a_4").fadeOut("slow");
			})
	$("#i_e_").hover(
		function(){
			$("#i_e").fadeIn(800);
			$("#a_5").fadeIn("slow");
		},
		function(){
			$("#i_e").fadeOut(800);
			$("#a_5").fadeOut("slow");
		})
	$("#i_f_").hover(
			function(){
				$("#i_f").fadeIn(800);
				$("#a_6").fadeIn("slow");
			},
			function(){
				$("#i_f").fadeOut(800);
				$("#a_6").fadeOut("slow");
			})
	$("#i_g_").hover(
			function(){
				$("#i_g").fadeIn(800);
				$("#a_7").fadeIn("slow");
			},
			function(){
				$("#i_g").fadeOut(800);
				$("#a_7").fadeOut("slow");
			})
	$("#i_h_").hover(
		function(){
			$("#i_h").fadeIn(800);
			$("#a_8").fadeIn("slow");
		},
		function(){
			$("#i_h").fadeOut(800);
			$("#a_8").fadeOut("slow");
		})
	
		a(10); 
})
var s=0;
function a(myTime)
	{
		var myiTime;
			setTimeout(function(){
				if (s==0)
				{
					$("#logo").fadeTo(10000,0);
					s=1;
				} else {
					$("#logo").fadeTo(10000,1);
					s=0;
				}
				
				a(myTime);
			}, myTime);
	}

function preload() {
	if (document.images) {
	var imgsrc = preload.arguments;
	arr=new Array(imgsrc.length);
	for (var j=0; j<imgsrc.length; j++) {
	arr[j] = new Image;
	arr[j].src = imgsrc[j];
	}
	}
	}
