// JavaScript Document
$(document).ready(function(){
				
			$('#imgs_home').innerfade({
				speed: 'slow',
				timeout: 4000,
				type: 'sequence',
				containerheight: '220px'
			});

	
				
				
						   
	$(".btn_registrarme").click(function(){	
		checkNewsletter();
	});						
	
	
	/* JQUERY TWEET
	*/
	
			$(".tweet").tweet({
 
		join_text: "auto",
 
        username: "festivalalmagro",
 
        avatar_size: 0,
 
        count: 1,
 
        auto_join_text_default: "dijimos:", 
 
        auto_join_text_ed: "nosotros",
 
        auto_join_text_ing: "estabamos",
 
        auto_join_text_reply: "respondimos",
 
        auto_join_text_url: "dijimos:",
 
        loading_text: "cargando..."
 
    });				   
    $("a[href^='http']").not("a[href^='http:\/\/www.festivaldealmagro.com']").attr({target: "_blank"});

	
	
	
	
	
	
	
	
						   
	$("#sucursales").hide();
	/*$("#btn_equipo").click(function(){
		$(".sub_hide2").toggle(500);
	});*/
    $("#btn_espacio").click(function(){
		$(".sub_hide").toggle(500);
		var displayed = '';
		if(displayed=='0'){
			$(this).removeClass('display').addClass('displayed'); 
			displayed='1';
		}
		else if(displayed=='1'){
			$(this).removeClass('displayed').addClass('display');
			displayed='0';
		}
	});
	    $("#btn_historia").click(function(){
		$(".sub_hide_historia").toggle(500);
		var displayed = '';
		if(displayed=='0'){
			$(this).removeClass('display').addClass('displayed'); 
			displayed='1';
		}
		else if(displayed=='1'){
			$(this).removeClass('displayed').addClass('display');
			displayed='0';
		}
	});

    $("#abrircajeros").click(function(){
		$("#sucursales").show(500);
	});
    $("#cerrarcajeros").click(function(){
		$("#sucursales").hide(500);
	});
});
