$(document).ready(function(){
	
  
   
    $("a[rel='example1']").colorbox({current: ""});
    $("a.colorbox").colorbox({current: ""}); 
    $(".colorbox_iframe").colorbox({iframe:true, scrolling:false, width:"842px", height:"670px"});
        
    //input---------------------------------
    //onclick reset input value
    $('._js_input').focus(
        function() {
            if (this.value == this.defaultValue) {
                this.value = '';
            }
        }
        );

    $('._js_input').blur(
        function() {
            if (this.value == '') {
                this.value = this.defaultValue;
            }
        }
        );


        //vysouvaci menu
      
        $("#navmenu-h li,#navmenu-v li").hover(
           function() { $(this).addClass("iehover"); },
           function() { $(this).removeClass("iehover"); }
        );
       

        //slider
        jQuery('.carusel').jcarousel({
                scroll: 1,
                auto: 5,
                wrap: 'circular',
                initCallback: mycarousel_initCallback
        });
        
        //gallery slider
        jQuery('.carusel2').jcarousel({
                scroll: 1,
                wrap: 'circular',
                initCallback: mycarousel_initCallback
        });
        

});

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        //carousel.startAuto(0); //stop autoscroll
    });

    carousel.buttonPrev.bind('click', function() {
        //carousel.startAuto(0); //stop autoscroll
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
