//$(document).ready(function() {
//	
//	$("#lin_5").click(function(){
			
//			$.ajax({	 
//				url: "ajax/file_cat.php?cat="+vi,
//				cache: false,
//				success: function(html){
//				$("#nasco_cat_5").empty();	
//				$("#nasco_cat_5").append(html);
//  			}
//		});
//	});
//
//});

var path=abs_path;
$(document).ready(function() {
        	



	$('#center').corner({
		  tl: {radius: 1},
		  tr: {radius: 1},
		  bl: {radius: 20},
		  br: {radius: 20},
		  antiAlias: true});
	$(".copy_sun").corner("");
	
	 $(document).ready(function(){
		$("#proof").easySlider({
                    auto: true,
                    continuous: true
		});
	});

           Shadowbox.init({
                     handleOversize: "drag",
                     modal: true
                });
 


/*        $("#plsone").hover(
            function (){
                $("#sparone").hide();
                $("#plsone").empty();
                $("#plsone").append('<img src="img/boxe/scrivici.png" />');
            },
            function () {
                 $("#plsone").empty();
                 $("#plsone").append('<div style="height:40px;"></div><div><img src="images/puls_sotto/scrivici.jpg" alt=""></div>');
            }
        );
*/        
        
        $("#plsone").mouseenter(
            function (){
              $("#sparone").hide();
              $("#plsone").hide();
              $("#plsnsc").show();
            }  
        );
        $("#plsnsc").mouseleave(
            function(){
              $("#sparone").show();
              $("#plsnsc").hide();
              $("#plsone").show();    
            }
          );
        $("#plsnsc").click(function(){location.href=path+'/Contatti';});


        
        $("#plstwo").mouseenter(
            function (){
              $("#spartwo").hide();
              $("#plstwo").hide();
              $("#plstwosc").show();
            }  
        );
        $("#plstwosc").mouseleave(
            function(){
              $("#spartwo").show();
              $("#plstwosc").hide();
              $("#plstwo").show();    
            }
          );
        $("#plstwosc").click(function(){location.href=path+'/Contatti';});
        
        
        $("#plsthree").mouseenter(
            function (){
              $("#sparthree").hide();
              $("#plsthree").hide();
              $("#plsthreesc").show();
            }  
        );
        $("#plsthreesc").mouseleave(
            function(){
              $("#sparthree").show();
              $("#plsthreesc").hide();
              $("#plsthree").show();    
            }
          );
        $("#plsthreesc").click(function(){location.href=path+'/Contatti?tipo=lavoro';});
        
        


});


function formCheck(thisForm){
	 if(thisForm.nome.value=='') {
		window.alert('Inserire un nome');
		thisForm.nome.focus();
		return false;
	 }
	 if( thisForm.email.value=='' || ( thisForm.email.value.indexOf('@',0) == -1) || (thisForm.email.value=='@')){
		window.alert('Inserire un in indirizzo email corretto');
		thisForm.email.focus();
		return false;
	 }
	  if(thisForm.indirizzo.value=='') {
		window.alert('Inserire un indirizzo');
		thisForm.indirizzo.focus();
		return false;
	 } 
    if(thisForm.richiesta.value=='') {
		window.alert('Inserire una richiesta');
		thisForm.richiesta.focus();
		return false;
	 }
	 if (!thisForm.noyes[1].checked) {
		window.alert('Non sono state accettate le condizioni per la privacy');
		thisForm.AccPrivacy[1].focus();
		return false;
	 }  
	 else{
	 	document.formOne.submit();
	 }
    
}

function formControl(thisForm){
	 if(thisForm.nome.value=='') {
		window.alert('Inserire un nome');
		thisForm.nome.focus();
		return false;
	 }
	 if( thisForm.email.value=='' || ( thisForm.email.value.indexOf('@',0) == -1) || (thisForm.email.value=='@')){
		window.alert('Inserire un in indirizzo email corretto');
		thisForm.email.focus();
		return false;
	 }
	  if(thisForm.indirizzo.value=='') {
		window.alert('Inserire un indirizzo');
		thisForm.indirizzo.focus();
		return false;
	 }
	 if (!thisForm.noyes[1].checked) {
		window.alert('Non sono state accettate le condizioni per la privacy');
		thisForm.AccPrivacy[1].focus();
		return false;
	 }
	 else{
	 	document.formOl.submit();
	 }

}


function ajxUpd(val){
	var name='#nasco_cat_'+val;
		$.ajax({	 
			url: "../ajax/file_cat.php?cat="+val,
			cache: false,
			success: function(html){
				$(name).empty();	
				$(name).append(html);
				$(name).slideToggle("slow");
			}
		});
	
}

function ajxUpdS(val){
	var name='#so_cat_'+val;
	$.ajax({	 
		url: "../ajax/file_cat.php?scat="+val,
		cache: false,
		success: function(html){
			$(name).empty();	
			$(name).append(html);
			$(name).slideToggle("slow");
		}
	});
	
}


function ajxUpdPro(val){
	var name='.right_col';
	$(name).empty();
	$("#pascosto").show();
	$.ajax({	 
		url: "../ajax/file_cat.php?prod="+val,
		cache: false,
		success: function(html){
			$("#pascosto").hide();
			$(name).fadeIn(500);
			$(name).empty();	
			$(name).append(html);
			
		}
	});
	
}

function ajxUpdDotto(val){
	var name='.right_col';
	$(name).empty();
	$("#pascosto").show();
	$.ajax({	 
		url: "../ajax/file_cat.php?dotto="+val,
		cache: false,
		success: function(html){
			$("#pascosto").hide();
			$(name).fadeIn(500);
			$(name).empty();	
			$(name).append(html);
			
		}
	});
	
}

