jQuery(document).ready(function($){
	
	$("#logo a").animate({opacity: 0.6}, 0);
	$("#logo a").hover(
		function() { $(this).stop().animate({ opacity: 1 }, 150)},
		function() { $(this).stop().animate({ opacity: 0.6}, 150)}
	);
	
	$("#latestprojects ul li.item").hover(function(){
		$(this).find("p").stop().animate({bottom:"0"},250);
		$(this).find("span").stop().animate({opacity:"0"},250);
		}, function(){
		$(this).find("span").stop().animate({opacity:"1"},250);
		$(this).find("p").stop().animate({bottom:"-50px"},250);
	});
	
	$("div#header ul li").find("a").css( {backgroundPosition: "100% 0"} );
	
	$('div#header ul li:not(.current_page_item) a')
		.css( {backgroundPosition: "100% -60px"} )
		.hover(function(){
		$(this).stop().animate({backgroundPosition:'(100% 0px)'}, {duration:200})
		}, function(){
		$(this).stop().animate({backgroundPosition:'(100% -60px)'}, {duration:200})
		});
		
	$('div#header ul li:not(.current_page_item) ')
		.css( {backgroundPosition: "0 -60px"} )
		.hover(function(){
		$(this).stop().animate({backgroundPosition:'(0 0px)'}, {duration:200})
		}, function(){
		$(this).stop().animate({backgroundPosition:'(0 -60px)'}, {duration:200})
		});
		
	$('#options div.hide').hide();
	if($.cookie('show_options')) {
		var show_options = $.cookie('show_options');
	} else {
		var show_options = 'false';
	}
	$('#options h4').click(function(){
		$('#options div').slideToggle(500);
		if(show_options=='false') {
			show_options = 'true';
		} else {
			show_options = 'false';
		};
		$.cookie("show_options",show_options);
	});
	if ($.cookie("show_excerpts") == 'false') {
		$('.entrie p').hide(200);
	}
	$('.showposts p').click(function() {
		$('.showposts p').removeClass('highlighted');
		$(this).addClass('highlighted');
	});
	$('#show_excerpts').click(function() {
		$('.entrie p').show(200);
		$.cookie("show_excerpts",true)
	});
	$('#hide_excerpts').click(function() {
		$('.entrie p').hide(200);
		$.cookie("show_excerpts",false)
	});

});