$(document).ready(function(){			   			   
	$(document).pngFix();
	
	$("#menu li:last").css("border","none");
	$("#s").focus(function(){
		if($("#s").attr("value") == "Buscador"){
			$("#s").attr("value","");
		}
	});
	$("#s").blur(function(){
		if($("#s").attr("value" ) == ""){
			$("#s").attr("value","Buscador");
		}
	});
	if($.browser.msie && $.browser.version <= 6){
		if($(window).width() < 1100){
			$("#wrapper").css("_width","980px");
		}
		if($(window).width() >= 1100){
			$("#wrapper").css("_width","1150px");
		}
	}
	
	$(".recents-comments li:last").css("border","none");
	
	/*if($(".sub-categories").length > 0){
		//$(".sub-categories li").append("<p>plomo</p>");
		var content, image;
		$(".sub-categories li a").each(function(){
			content = $(this).attr("title");
			$(this).parent().append("<p>"+content+"</p>");
			image = $(this).parent().attr("class");
			$(this).parent().css("background","url(/eonline/wp-content/themes/redcarpet/images/img_"+image.charAt(18)+".jpg) no-repeat top left");
		});
		$(".sub-categories li a").removeAttr("title");
		$(".sub-categories li:last").css("border","none");
	}*/
	if($(".sub-categories").length > 0){
		var image, imageid;
		$(".sub-categories li a").each(function(){
			image = $(this).parent().attr("class");
			imageid = parseInt(image.substring(18,20));
			//$(this).parent().css("background","url(/wp-content/themes/redcarpet/images/img_"+imageid+".jpg) no-repeat top center");
			$(this).html('<img src="/wp-content/themes/redcarpet/images/img_'+imageid+'.jpg" width="91" height="91" border="0" />');
		});
		$(".sub-categories li a").removeAttr("title");
		$(".sub-categories li:last").css("margin","0");
	}
	
	if($(".post-high").length > 0){
		var hh;
		hh = $(".post-high").height() + 20;
		$(".high-top").css("margin-bottom",hh+"px");
	}
	if($(".post h3").length > 1){
		$(".post h3:first").show();
		$(".post h3:last").remove();
	}
});

function openVampires(){
	$.blockUI({
		message: $("#eclipse"),
		css:{
			border: "none",
			background: "none",
			left: ($(window).width() - 300) / 2 + "px",
			top: ($(window).height() - 250) / 2 + "px",
			cursor: "default"
		},
		overlayCSS:{
			opacity: 0.7,
			cursor: "default"
		},
		fixed: true
	});
	$(".blockOverlay").click(function(){
		$.unblockUI();
	});
}
