$(document).ready(function(){
	
	//Search Field
	
	$("#search_term")
    .val("Search")
    .css("color", "#999")
    .focus(function(){
        $(this).css("color", "#ececec");
        if ($(this).val() == "Search") {
            $(this).val("");
        }
    })
    .blur(function(){
        $(this).css("color", "#999");
        if ($(this).val() == "") {
            $(this).val("Search");
        }
    });
	
	//NAVIGATION
	
	$('#nav span').animate({ "opacity" : 0 }, 0);
	
	$('#services').hover(function() {
		$('#nav span.sub1').stop().animate({ "opacity" : 1 });
	},function() {
		$('#nav span.sub1').stop().animate({ "opacity" : 0 });
	});
	
	$('#portfolio').hover(function() {
		$('#nav span.sub2').stop().animate({ "opacity" : 1 });
	},function() {
		$('#nav span.sub2').stop().animate({ "opacity" : 0 });
	});
	
	$('#nav-about').hover(function() {
		$('#nav span.sub3').stop().animate({ "opacity" : 1 });
	},function() {
		$('#nav span.sub3').stop().animate({ "opacity" : 0 });
	});
	
	$('#contact').hover(function() {
		$('#nav span.sub4').stop().animate({ "opacity" : 1 });
	},function() {
		$('#nav span.sub4').stop().animate({ "opacity" : 0 });
	});
	
	//LIST ITEMS IN SIDE BAR
	
	/*
$("#sidebar li a").hover(function() {
		$(this).stop().animate({ "left" : "15px"});
	},function() {
		$(this).stop().animate({"left" : "5px"});
	})
*/
	
	$("#recent-posts-3 li a").hover(function() {
		$(this).stop().animate({ "left" : "15px"}, 400);
	},function() {
		$(this).stop().animate({"left" : "5px"});
	})
	
	
	$("#categories-3 li a").hover(function() {
		$(this).stop().animate({ "left" : "15px"});
	},function() {
		$(this).stop().animate({"left" : "5px"});
	})
	
	$("#linkcat-2 li a").hover(function() {
		$(this).stop().animate({ "left" : "15px"});
	},function() {
		$(this).stop().animate({"left" : "5px"});
	})

});