
        jQuery(document).ready(function() {
           
         
            jQuery("#kid-switch1").change(function(){
                    
                    valore =  jQuery(this).val();
                    jQuery("#kid-age1 div").each(function(i){
                       
                        if(i>valore-1){
                            jQuery(this).hide();
                        }else{
                             jQuery(this).show();
                        }
                    });

            });
            jQuery("#kid-switch2").change(function(){
                    
                    valore =  jQuery(this).val();
                    jQuery("#kid-age2 div").each(function(i){
                       
                        if(i>valore-1){
                            jQuery(this).hide();
                        }else{
                             jQuery(this).show();
                        }
                    });

            });
            
            jQuery("#kid-switch3").change(function(){
                    
                    valore =  jQuery(this).val();
                    jQuery("#kid-age3 div").each(function(i){
                       
                        if(i>valore-1){
                            jQuery(this).hide();
                        }else{
                             jQuery(this).show();
                        }
                    });

            });
            
            
            
            jQuery("#new-room").change(function(){
 
                nroom =  jQuery(this).val();
          
                jQuery(".new-box-camera").each(function(k){
                
                    if(k>nroom-1){
                            jQuery("#room"+k).hide();
                        }else{
                             jQuery("#room"+k).show();
                    }
                });
                
            });
            
            
            
            
            jQuery(".new-tabs-booking .new-icon2-active a").live("click",function(){
                    jQuery(".new-tabs-booking .new-icon1 a").attr("href","#");
                    jQuery(".new-tabs-booking .new-icon1").addClass("new-icon1-active").removeClass("new-icon1");
                    jQuery(".new-tabs-booking .new-icon2-active").addClass("new-icon2").removeClass("new-icon2-active");
                    jQuery(".new-tabs-booking .new-icon2 a").removeAttr("href");
                    
            });
            
            
            jQuery(".new-tabs-booking .new-icon1-active a").live("click",function(){
                    jQuery(".new-tabs-booking .new-icon2 a").attr("href","#");
                    jQuery(".new-tabs-booking .new-icon2").addClass("new-icon2-active").removeClass("new-icon2");
                    jQuery(".new-tabs-booking .new-icon1-active").addClass("new-icon1").removeClass("new-icon1-active");
                    jQuery(".new-tabs-booking .new-icon1 a").removeAttr("href");
                   
            });
            
               
               
            if (window.PIE) {
		    jQuery('.sharehotels a').each(function() {
			PIE.attach(this);
		    });
		    jQuery('.social').each(function() {
			PIE.attach(this);
		    });
		     jQuery('div.block div.form_prenotazioni a#prenota, div.node div.form_prenotazioni a#prenota').each(function() {
			PIE.attach(this);
		    });
		    
		     jQuery('.find_property select').each(function() {
			PIE.attach(this);
		    });
		
			jQuery('#prevB').each(function() {
			PIE.attach(this);
		    });
			jQuery('#prevD').each(function() {
			PIE.attach(this);
		    });
			jQuery('#prevC').each(function() {
			PIE.attach(this);
		    });
			jQuery('.entry_class2').each(function() {
			PIE.attach(this);
		    });
			jQuery('.entry_class1').each(function() {
			PIE.attach(this);
		    });
		
			jQuery('.doubleentryCtn').each(function() {
			PIE.attach(this);
		    });
		
		   
            }
               
             
        });
