// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};


function mycarousel_initCallback(carousel)
{
    //nastavím si objekt
    c = carousel;

    // Disable autoscrolling if the user clicks the prev or next button.
    c.buttonNext.bind('click', function() {
        c.startAuto(0);
    });

    c.buttonPrev.bind('click', function() {
        c.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    c.clip.hover(function() {
        c.stopAuto();
    }, function() {
        c.startAuto();
    });
};


 $(document).ready(function(){    
    /* LOKALNI SKROLOVANI */
  $.localScroll({
		queue:true,
		duration:1000,
		hash:false
	});		




  $('#zalozky div.caruso_obal ul').jcarousel({
		wrap:"both",
		scroll:1,
		auto: 2,
		animation:"slow",
    initCallback: mycarousel_initCallback
  });



  /* Overlabel */
  $("label.overlabel").overlabel();
 
  $(".schovej").hide();
  
    
    //Nastavení prvků
    $("input").focus(function(){
        $(this).css({backgroundColor:"#FFDDAA"});
      });
    $("input").blur(function(){
      $(this).css({backgroundColor:"#FFFFFF"});
    });
    $("textarea").focus(function(){
      $(this).css({backgroundColor:"#FFDDAA"});
    });
    $("textarea").blur(function(){
      $(this).css({backgroundColor:"#FFFFFF"});
    });  
  		


});
