$(document).ready(function() {
	$('#style div').css( { opacity: 0.5 } );
	$('#style div').hover(function() {
		$(this).animate({ 'width': '32px', 'height': '32px', marginTop: '-24px', opacity: 1.0, queue: true }, 'fast')
	}, function() {
		$(this).animate({ 'width': '8px', 'height': '8px', marginTop: '0px', opacity: 0.5, queue: true }, 'fast');
	});
	
	links = $('a:not(a.mail)');
	$('#style div#style1').click(function() {
		$("html, body").css("background","#C90219");
		links.each(function(i) { $(this).attr('href', $(this).attr('href')+'&style=1' ); });
	});
	
	$('#style div#style2').click(function() {
		$("html, body").css("background","#f8f6f7");
		links.each(function(i) { $(this).attr('href', $(this).attr('href')+'&style=2' ); });
	});
	$('#style div#style3').click(function() {
		$("html, body").css("background","#cc9e50");
		links.each(function(i) { $(this).attr('href', $(this).attr('href')+'&style=3' ); });
	});
	
	if(style > 0) {
		switch(style) {
			default:
				$("html, body").css("background","#C90219");
			break;
			case 2:
				$("html, body").css("background","#f8f6f7");
			break;
			case 3:
				$("html, body").css("background","#cc9e50");
			break;
		}
	}
});
