$(document).ready(
	function() {
		
	   $(".input-search").Watermark("Vyhledávání");
	   
 //	   $('a.light').lightBox();
	
       $('a.light').lightBox({
            imageLoading: 'http://www.mbkeramika.cz/images/lightbox-ico-loading.gif',
            imageBtnClose: 'http://www.mbkeramika.cz/images/lightbox-btn-close.gif',
            imageBtnPrev: 'http://www.mbkeramika.cz/images/lightbox-btn-prev.gif',
            imageBtnNext: 'http://www.mbkeramika.cz/images/lightbox-btn-next.gif',
            containerResizeSpeed: 350
           });

 
      //  SLIDESHOW 
      /*if ($('#slideshow-area').size() > 0){
	      $('#slideshow-area').cycle({ 
	          fx:     'scrollLeft', 
	          speed:  'slow', 
	          timeout: 6000, 
	          next:   '#slideshow-next'
	      }); 
	 
	      //  SLIDESHOW 
	      
	      $('#slideshow-area').cycle({ 
	          fx:     'scrollRight', 
	          speed:  'slow', 
	          timeout: 6000, 
	          prev:   '#slideshow-previous' 
	      });        
      }*/
       if ($('#slideshow-holder').size() > 0){
     	  $("#slideshow-previous").show();
     	  $("#slideshow-next").show();
 	      $('#slideshow-holder').cycle({ 
 	          fx:     'scrollHorz', 
 	          speed:  'slow',
 	          timeout: 8000, 
 	          next:   '#slideshow-next',
 	          prev:   '#slideshow-previous'
 	      }); 
       }
 
    
    
	   	$("#accordion").accordion({
			collapsible: true,
			header: '.achd',
			active: 10,
			autoHeight: false
		});
        
        
        $("a.thumb, img.thumb").thumbs();
        $("a.thumb img, img.thumb").thumbsImg();
	   
	});
	
	

	
	
    

   
    
   
   // check data
function isblank(co){
    for (var i=0; i < co.length; i++)
    {
        var c=co.charAt(i);
           if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
    }
    return true;
}

function isemail(co){
    ok = false;
    for (var i=0; i < co.length; i++)
    {
        var c=co.charAt(i);
           if ((c == '@')) ok = true;
    }
    return ok;
}


function chRada(){
    if ((document.forms.poradna.poradna_jmeno.value == "") || (isblank(document.forms.poradna.poradna_jmeno.value))) {
        alert("Není vyplněné jméno.");
        document.forms.poradna.poradna_jmeno.focus();
        return false;
    };
    if ((document.forms.poradna.poradna_kontakt.value == "") || (isblank(document.forms.poradna.poradna_kontakt.value))) {
        alert("Není vyplněný kontakt.");
        document.forms.poradna.poradna_kontakt.focus();
        return false;
    };
    if ((document.forms.poradna.poradna_dotaz.value == "") || (isblank(document.forms.poradna.poradna_dotaz.value))) {
        alert("Není napsaný žádný dotaz.");
        document.forms.poradna.poradna_dotaz.focus();
        return false;
    };
}

function chKatalog(){
    if ((document.forms.objednani.jmeno.value == "") || (isblank(document.forms.objednani.jmeno.value))) {
        alert("Není vyplněné jméno.");
        document.forms.objednani.jmeno.focus();
        return false;
    };
    if ((document.forms.objednani.prijmeni.value == "") || (isblank(document.forms.objednani.prijmeni.value))) {
        alert("Není vyplněné příjmení.");
        document.forms.objednani.prijmeni.focus();
        return false;
    };
    if ((document.forms.objednani.ulice.value == "") || (isblank(document.forms.objednani.ulice.value))) {
        alert("Není vyplněná ulice.");
        document.forms.objednani.ulice.focus();
        return false;
    };
    if ((document.forms.objednani.mesto.value == "") || (isblank(document.forms.objednani.mesto.value))) {
        alert("Není vyplněné město.");
        document.forms.objednani.mesto.focus();
        return false;
    };
    if ((document.forms.objednani.psc.value == "") || (isblank(document.forms.objednani.psc.value))) {
        alert("Není vyplněné psč.");
        document.forms.objednani.psc.focus();
        return false;
    };
}
	
