jQuery(document).ready(function(){
      // CB IKONKY MODELEK
       if(jQuery(".lisa.bw").length){
          jQuery(".bw img").each(function(){
              var path = jQuery(this).attr('src') ;
              var bwPath = jQuery(this).attr('src').replace('/ico/','/ico/bw/');
              jQuery(this).attr('src',bwPath);
              jQuery(this).mouseover(function(){
                  jQuery(this).attr('src',path); 
              });
              jQuery(this).mouseout(function(){
                  jQuery(this).attr('src',bwPath);  
              });              
           
          });       
       }
      // CB IKONKY KLIENTU
       if(jQuery(".klient.bw").length){
          jQuery(".bw img").each(function(){
              var path = jQuery(this).attr('src') ;
              var bwPath = jQuery(this).attr('src').replace('foto-klienti/','foto-klienti/bw/');
              jQuery(this).attr('src',bwPath);
              jQuery(this).mouseover(function(){
                  jQuery(this).attr('src',path); 
              });
              jQuery(this).mouseout(function(){
                  jQuery(this).attr('src',bwPath);  
              });              
           
          });       
       }       
      // CB IKONKY PARTNERU
       if(jQuery(".klient.bw2").length){
          jQuery(".bw2 img").each(function(){
              var path = jQuery(this).attr('src') ;
              var bwPath = jQuery(this).attr('src').replace('_c','_g');
              jQuery(this).attr('src',bwPath);
              jQuery(this).mouseover(function(){
                  jQuery(this).attr('src',path); 
              });
              jQuery(this).mouseout(function(){
                  jQuery(this).attr('src',bwPath);  
              });              
           
          });       
       }
       
       //REGISTRACE
       jQuery('.registrace .podminky').scroll(function(){
           if(jQuery('.registrace .podminky').scrollTop()>jQuery('.registrace #scrollTop').html()){
               jQuery('.registrace #scrollTop').html(jQuery('.registrace .podminky').scrollTop());  
           }
           
       });
       jQuery('.registrace #odeslat').click(function(){
      
          if(parseInt(jQuery('.registrace #scrollTop').html()) <200){
              alert('Přečtěte si prosím všeobecné podmínky registrace (K tomu potřebujete sjet textem v okénku dolů).');
              return false; 
          }

       });
       
       /*** FORM EDIT MODEL ***************************************************/
       if(jQuery('#form-edit-model').length){
            
           //zobrazit a zakliknout pridat na zacatek, pokud vybereme fotku
           jQuery('.add-top').hide();
           jQuery('.new-foto').change(function(){
               //var n = jQuery(this).attr('name').split('_')[1];
               jQuery(this).siblings('.add-top').show().find('input').attr('checked','checked')
           });
       
       }
       
         


      
  
});


