$(function(){

	function initTab(){
			if ($("#tabs>div:first:visible").size()) {
			$("#tabs>ul").css("background-image","url(styles/tab_left.png)");
			$("#tabs>ul li:first a").css("color","#b11612");
			$("#tabs>ul li:last a").css("color","#e9e0c5");
		}else {
			$("#tabs>ul").css("background-image","url(styles/tab_right.png)");
			$("#tabs>ul li:first a").css("color","#e9e0c5");
			$("#tabs>ul li:last a").css("color","#b11612");
		}
	}


	if (document.location.hash != "") {
		$("#tabs>div").hide();
		$("#tabs>div"+document.location.hash).show();
	}else {
		$("#tabs>div:last").hide();
	}
	initTab();

	$("#tabs>ul li a").click(function(){
		$("#tabs>div").hide();
		$("#tabs>div"+$(this).attr("href")).show();
		initTab();
		return true;
	});



	$("#loopedSlider").loopedSlider(
    {
        container: ".slideblock", //Class/id of main container. You can use "#container" for an id.
        slides: ".slides", //Class/id of slide container. You can use "#slides" for an id.
        pagination: "paginDots", //Class name of parent ul for numbered links. Don\'t add a "." here.
        containerClick: true, //Click slider to goto next slide? true/false
        autoStart: 2000, //Set to positive number for true. This number will be the time between transitions.
        restart: 0, //Set to positive number for true. Sets time until autoStart is restarted.
        slidespeed: 300, //Speed of slide animation, 1000 = 1second.
        fadespeed: 200, //Speed of fade animation, 1000 = 1second.
        autoHeight: true,
        addPagination: false //Add pagination links based on content? true/false
    }
    );
});
