//TIMED NOTICES
$(function() {

jQuery.fn.delay = function(time,func){
    return this.each(function(){
        setTimeout(func,time);
    });
};


$('#fail_box').delay(8000, function(){$('#fail_box').fadeOut(2000)})
$('#error_box').delay(8000, function(){$('#error_box').fadeOut(2000)})
$('#victory_box').delay(8000, function(){$('#victory_box').fadeOut(2000)})
$('#instr_busqueda').delay( 9000, function(){$('#instr_busqueda').fadeOut(1500)})
$('#instr_publicar').delay(9000, function(){$('#instr_publicar').fadeOut(1500)})


});  


/*<![CDATA[*/

function Disable(cb,but){
 var cbs=document.getElementsByName(cb.name);
 but=cbs[0].form[but]
 but.setAttribute('disabled','disabled');
 for (var zxc0=0;zxc0<cbs.length;zxc0++){
  if (cbs[zxc0].checked){
   but.removeAttribute('disabled');
   break;
  }
 }

}
/*]]>*/


$(document).ready(function(){
						
$(".button, #logo h1 a, #int_closer, .tools .rss, .tools .view").easyTooltip();

$('#int_closer').click(function() {
    $('#introduction').slideToggle(700);
    return false;
 });
 
$("#slider").easySlider({
				auto: true,
				continuous: true ,
				speed: 1000,
				pause: 5500,
				controlsShow: true

});
			
$("#items").addClass("boxes");
$(".title_bar .view ").addClass("list");
	$("#view_changer").toggle(function(){
		$(this).removeClass("list");
		$(this).addClass("box");
		$("#items").fadeOut("fast", function() {
			$(this).fadeIn("fast").removeClass("boxes");
			$(this).addClass("lists");
		});
	}, function () {
		$(this).removeClass("box");
		$(this).addClass("list");
		$("#items").fadeOut("fast", function() {
			$(this).fadeIn("fast").removeClass("lists");
			$(this).addClass("boxes");
		});
	}); 

});