$(document).ready(function(){
	
	$("#BlogCriteria").val( $("#BlogCriteria").attr("showtext") ) ; 
	$("#BlogCriteria").focus(function() {
		 if ( $(this).val() == $(this).attr("showtext") ){
			 $(this).val('');
			 $(this).addClass("typing");
		 }
	});
	
	$("#BlogCriteria").blur(function() {
		if ( $(this).val() == ""){
			$(this).val($(this).attr("showtext"));
			$(this).removeClass("typing");
		 }
	});
	
	//to force equal height in home cream boxs
	if( $("#homeTopPostsRightAds .creamBoxContent").height() < $("#homeTopPosts .creamBoxContent").height() )
		$("#homeTopPostsRightAds .creamBoxContent").height( $("#homeTopPosts .creamBoxContent").height() );
	//console.log( $("#homeTopPosts .creamBoxContent").height() );
	
	//to force equal height in home cream boxs
	if($("#related_blogs .creamBoxContent").height() <  $("#top_posts .creamBoxContent").height())
		$("#related_blogs .creamBoxContent").height( $("#top_posts .creamBoxContent").height() );
	
	//add validation function to form to add a blog
	if($("#BlogAddForm").get(0))
		$("#BlogAddForm").validate();
	
	//add validation function to form to add a blog
	if($("#StaticContactForm").get(0))
		$("#StaticContactForm").validate();
	
	
});