jQuery.noConflict();

function panel(){
	// show and hide the right panel
    jQuery("#panel[action='hide']").click(function () { 
		jQuery("#right").css("display", "none");
		jQuery("#left").css("width", "98%");
		jQuery("#panel[action='hide']").html('<<  mostrar panel');
		jQuery("#panel[action='hide']").attr('action','show');
		jQuery("#panel[action='show']").live('click', function() {panel();});
		return true;
    });
    jQuery("#panel[action='show']").click(function () { 
		jQuery("#right").css("display", "block");
		if (screen.width>1025){jQuery("#left").css("width", "80%");}else{jQuery("#left").css("width", "70%");}
		jQuery("#panel[action='show']").html('ocultar panel  >>');
		jQuery("#panel[action='show']").attr('action','hide');
		jQuery("#panel[action='hide']").live('click', function() {panel();});
		return true;
    });
}

function customize(){
	jQuery("#searchsubmit").addClass('button');
	jQuery("#searchsubmit").attr('value','buscar');
	if (screen.width>1025){
		jQuery("#left").css("width", "80%");
		jQuery("#right").css("right", "30px");
		jQuery("#right").css("width", "16% !important");
		jQuery("#panel").css("left", "83.5%");
		jQuery("#titulo").css("float", "right");
		jQuery("#logo").css("margin-left", "90px");
		jQuery("#silueta").css("margin-left", "60px");
	}
}


function comments(){
	// comments
	jQuery("ol.commentlist").css({display: "none"});
    jQuery("#comments").click(function () { 
		jQuery("ol.commentlist").css({visibility: "visible"}).show(400);
		jQuery("#comments").css("display", "none");
		jQuery("#hidecomments").css({visibility: "visible"}).show(400);
		return true;
    });
    jQuery("#hidecomments").click(function () { 
		jQuery("ol.commentlist").css("display", "none");
		jQuery("#hidecomments").css("display", "none");
		jQuery("#comments").css({visibility: "visible"}).show(400);
    });
	
	// leave a comment
	jQuery("#comment").css({display: "none"});
    jQuery("#leave_comment").click(function () { 
		jQuery("input[type=text]").val("");
		jQuery("#comment:hidden").css({visibility: "visible"}).show(400);
    });
	jQuery("div.reply").click(function() {
		jQuery("#comment:hidden").css({visibility: "visible"}).show(20);
    });		
	jQuery("#cancel-comment-reply-link").click(function() {
		jQuery("#comment").css({display: "none"});
    });		
}


jQuery(document).ready(function(){
	customize();
	//comments();
	panel();
});
