$(document).ready(function(){

	// show and hide field value
	swapValue = [];
	$('form#search input').each(function(i){
	   swapValue[i] = $(this).val();
	   $(this).focus(function(){
	      if ($(this).val() == swapValue[i]) {
	         $(this).val("");
	         $(this).type("password");
	      }
	      $(this).addClass("focus");
	   }).blur(function(){
	      if ($.trim($(this).val()) == "") {
	         $(this).val(swapValue[i]);
		 $(this).removeClass("focus");
	      }
	   });
	});

	// animate hover states
	$("a h3").hover(function() {  
	    $(this).find("span.rarr").fadeIn(200);
		},function() {  
		$(this).find("span.rarr").fadeOut(175);
	});
	$("#posts-recent li a").hover(function() {  
	    $(this).find(".tag").stop().animate({ backgroundColor: "#7fadc1"}, 325);
	    $(this).stop().animate({ color: "#7fadc1"}, 200);
		},function() {  
		$(this).find(".tag").stop().animate({ backgroundColor: "#5944b2"}, 325);
		$(this).stop().animate({ color: "#555555"}, 200);
	});
	$("#blog-topics li, #nav-posts a span").hover(function() {  
	    $(this).stop().animate({ backgroundColor: "#7fadc1"}, 325);
		},function() {  
		$(this).stop().animate({ backgroundColor: "#5944b2"}, 325);
	});
	$("p a[class!=orange]").hover(function() {  
		$(this).stop().animate({ color: "#7fadc1"}, 250);
		},function() {  
		$(this).stop().animate({ color: "#5944b2"}, 250);
	});
	
	$('nav ul li a').hover(function() {  
	    $(this).stop().animate({ color: "#7fadc1"}, 250);
		},function() {  
		$(this).stop().animate({ color: "#868686"}, 250);
	});
	
	// syntax highlighting
	prettyPrint();
	
	

});






