var projDescSelected = true;

$(document).ready(function() {
	$("#slider").loopedSlider({
		slidespeed: 500,
		containerClick: false
	});

        $("#store_box").loopedSlider({
		slidespeed: 500,
		containerClick: false
	});

        $("#projDescription")
			.mouseover(function() {
				if(!projDescSelected) $(this).children().show();
			})
			.mouseout(function() {
				if(!projDescSelected) $(this).children().hide();
			})
			.click(function() {
                projDescSelected = true;
				$("#tabcontol").css("background-position", "right top");
				$(this).children().hide();
                $("#descPane").show();
                $("#moreInfoPane").hide();
                return false;
        });

        $("#projMoreInfo")
			.mouseover(function() {
				if(projDescSelected) $(this).children().show();
			})
			.mouseout(function() {
				if(projDescSelected) $(this).children().hide();
			})
			.click(function() {
				projDescSelected = false;
                $("#tabcontol").css("background-position", "right -18px");
				$(this).children().hide();
                $("#descPane").hide();
                $("#moreInfoPane").show();
                return false;
        });

        $("#center_menu > li > a").hover(function() {
                var image_string = "url('/images/uploads/" + $(this).attr("id") + "_big.jpg')";
                $("#center_content").css("background-image", image_string);
        });

		if(typeof jQuery.prettyPhoto !== "undefined") $("a[rel^='prettyPhoto']").prettyPhoto();

	$("#contact_send").hover(
		function() {
			$("#contact_send").attr("src", "/images/redesign/contact_hover.png");
		},
		
		function() {
			$("#contact_send").attr("src", "/images/redesign/contact_send.png");
		}
	);
});
