$(document).ready(function(){
	// menu
	Cufon.replace("#mainmenu a", {hover: true });
	//$("#mainmenu a span").css("color","#302581");
	//$("#mainmenu a span").css("background","#ffffff"); 
	//$("#mainmenu a.active1 span").css("color","#ffffff");
	//$("#mainmenu a.active1 span").css("background","#e81935"); 
/*	
	$("#mainmenu a.active").each(function() { 
		$(this).hover(function() { 
			$("span", this).css("color","#ffffff");
			$("span", this).css("background","#e81935");
		}, function() {
			$("span", this).css("color","#302581");
			$("span", this).css("background","#ffffff"); 
		});
	});
*/
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
	// submit button
	$(".registration input[type=submit], .redbutton").each(function() { 
		$(this).hover(function() { 
			$(this).css("background","#c1070a");
		}, function() {
			$(this).css("background","#d10000");
		});
	});
	// tabs
	$("#tab1button").click(function(){
		$(this).css("background-color","#ffde00").css("color","#333333");
		// $("#tab1button").css("background-color","#dadada");
		$("#tab2button").css("background-color","#b2b4b3");
		$("#tab3button").css("background-color","#868686").css("color","#ffffff");
		$("#tab4button").css("background-color","#565656").css("color","#ffffff");
		$("#tab1").show();
		$("#tab2").hide();
		$("#tab3").hide();
		$("#tab4").hide();	
	});
	$("#tab2button").click(function(){
		$(this).css("background-color","#ffde00").css("color","#333333");
		$("#tab1button").css("background-color","#dadada");
		// $("#tab2button").css("background-color","#b2b4b3");
		$("#tab3button").css("background-color","#868686").css("color","#ffffff");
		$("#tab4button").css("background-color","#565656").css("color","#ffffff");
		$("#tab1").hide();
		$("#tab2").show();
		$("#tab3").hide();
		$("#tab4").hide();	
	});
	$("#tab3button").click(function(){
		$(this).css("background-color","#ffde00").css("color","#333333");
		$("#tab1button").css("background-color","#dadada");
		$("#tab2button").css("background-color","#b2b4b3");
		// $("#tab3button").css("background-color","#868686").css("color","#ffffff");
		$("#tab4button").css("background-color","#565656").css("color","#ffffff");
		$("#tab1").hide();
		$("#tab2").hide();
		$("#tab3").show();
		$("#tab4").hide();	
	});
	$("#tab4button").click(function(){
		$(this).css("background-color","#ffde00").css("color","#333333");
		$("#tab1button").css("background-color","#dadada");
		$("#tab2button").css("background-color","#b2b4b3");
		$("#tab3button").css("background-color","#868686").css("color","#ffffff");
		// $("#tab4button").css("background-color","#565656").css("color","#ffffff");
		$("#tab1").hide();
		$("#tab2").hide();
		$("#tab3").hide();
		$("#tab4").show();	
	});
	// detailfoto
	$("#smallfoto").click(function(){
		$("#smallfoto").hide();
		$("#bigfoto").show();
	});
	$("#bigfoto").click(function(){
		$("#bigfoto").hide();
		$("#smallfoto").show();
	});
	// Column
	$("#column .related").each(function() { 
		$(this).hover(function() { 
			$(this).css("background","#ffde00");
		}, function() {
			$(this).css("background","none");
		});
	});
	// Download
	$(".downloadbox:even:first").css("background","none");
	$(".downloadbox:odd:first").css("background","none");
	$(".downloadbox:even").css("clear","left");
	// Cart
	$(".maincart tbody tr:even").css("background","#c6c6c6");
	$(".maincart tbody tr:odd").css("background","#dadada");
	$(".maincart tr th:first-child, .maincart tr td:first-child").css("border","0px");
	// Mixed detail
	$("#icons").each(function() { 
		$(this).hover(function() { 
			$(".graybox", this).css("visibility","visible");
		}, function() {
			$(".graybox", this).css("visibility","hidden");
		});
	});
	$("#showpoll").click(function(){
		$("#icons .poll").show();
		$("#icons .mailtofriend").hide();
	});
	$("#hidepoll").click(function(){
		$("#icons .poll").hide();
		$("#icons .graybox").css("visibility","hidden");
	});

	$("#showmailtofriend").click(function(){
		$("#icons .mailtofriend").show();
		$("#icons .poll").hide();
	});
	$("#hidemailtofriend").click(function(){
		$("#icons .mailtofriend").hide();
		$("#icons .graybox").css("visibility","hidden");
	});


	$("#source .comma:last").css("display","none");
});
