$(document).ready( function(){	
 
    										
		$('ul#pasa-novedades').innerfade({
						speed: 1000,
						timeout: 7000,
						type: 'sequence',
						containerheight: '320px'
					});

 
		$('#areas-home-slide').lofJSidernews( { interval:8000,
											 	easing:'easeInOutQuad',
												duration:1200,
												auto:true } );
												
							
		
			/*$('#facebook-wall').fbWall({ id:'193115040766602',accessToken:'206158599425293|7809823973348bcf8cd72f6d.1-100000221135225|BW9n2eoyL7EYvJs7GEmv61NbBFk',showGuestEntries:false,showComments:false,max:5,timeConversion:24});*/
			
			
		//selects donde trabajamos
	
		$("#continente").change(function() {	
		
		    var cont_sel ="";		
			cont_sel=$("select#continente").val();
			$("#select_zona").hide();
			$("select#area option[selected]").removeAttr("selected");
			$("select#area option[value='empty']").attr("selected", "selected");
		});
			
	   $("#zona").change(function() {	
		
		    var zona_sel ="";
		    var cont_sel ="";
		    var area_sel ="";
		    var lang="";	
								
			cont_sel=$("select#continente").val();
			area_sel=$("select#area").val();
			zona_sel=$("select#zona").val();
			/*zona=$("select#zona[value='"+zona_sel+"']").text();*/
			lang=$("#lang").val();
			
			
			
			window.location.href=""+zona_sel+"/?c="+cont_sel+"&a="+area_sel;
			
			
			
			
		});
		
		$("#continente1").change(function() {	
		
		    var cont_sel ="";		
			cont_sel=$("select#continente1").val();
			$("#select_zona1").hide();
			$("select#area1 option[selected]").removeAttr("selected");
			$("select#area1 option[value='empty']").attr("selected", "selected");
		});
		
		
		   $("#zona1").change(function() {	
		
		    var zona_sel ="";
		    var cont_sel ="";
		    var area_sel ="";
		    var lang="";	
								
			cont_sel=$("select#continente1").val();
			area_sel=$("select#area1").val();
			zona_sel=$("select#zona1").val();
			lang=$("#lang").val();
			
			
			
			window.location.href=""+zona_sel+"/?c="+cont_sel+"&a="+area_sel;
			
			
			
			
		});
		
		
		
		$("#cat_publi").change(function() {	
		
		   var publicacion ="";	
		   var lang="";
								
			publicacion=$("select#cat_publi").val();
		
		    var cont_sel ="";		
			tipo_publi=$("select#cat_publi").val();
			lang=$("#lang").val();
			
			if(tipo_publi=="1"){
			    $("#subcategorias_colecciones").show();
			     $("#subcategorias_revistas").hide();
			     $("select#cat_publi option[selected]").removeAttr("selected");
			     $("select#cat_publi option[value='empty']").attr("selected", "selected");
			}else if(tipo_publi=="2"){
			    $("#subcategorias_revistas").show();
			    $("#subcategorias_colecciones").hide();
			    $("select#cat_publi option[selected]").removeAttr("selected");
			$("select#cat_publi option[value='empty']").attr("selected", "selected");
			}else{
			
				window.location.href="http://www.cooperaccio.org/"+lang+"comunicacion/publicaciones/?cat="+publicacion;
			
			}
		});
		
		
		$("#subcat_col").change(function() {
		
		    var publicacion ="";
		    var subcategoria ="";
		    var lang="";
			publicacion=$("select#cat_publi").val();
			subcategoria=$("select#subcat_col").val();
			lang=$("#lang").val();
		
		   window.location.href="http://www.cooperaccio.org/"+lang+"comunicacion/publicaciones/?cat="+publicacion+"&subcat="+subcategoria;

	});
		
		$("#subcat_rev").change(function() {
		
		 var publicacion ="";
		    var subcategoria ="";
		    var lang="";
			publicacion=$("select#cat_publi").val();
			subcategoria=$("select#subcat_rev").val();
			lang=$("#lang").val();
		
		   window.location.href="http://www.cooperaccio.org/"+lang+"comunicacion/publicaciones/?cat="+publicacion+"&subcat="+subcategoria;

	 });	
	 
	 
	   
Shadowbox.init({
overlayOpacity: 0.8
}
);
								
							
	});

