$(document).ready(function(){
    $("tr:even").addClass("even");
    $("tr:odd").addClass("odd");
    
    $('#superdeal').jcarousel({
	wrap: "circular",
        scroll: 1,
	auto: 5,
	initCallback: function(jc, state) {
              if (state == 'init') {
                  /* Pause carousel scrolling when a user mouses overs
an item and restart the scrolling when they mouse out.
                   * Written by cormac at finisco dot com 19/2/2009
based on work by Jeremy Mikola:
                   * http://groups.google.com/group/jquery-en/browse_thread/thread/f550b94...
                   */
                jc.startAutoOrig = jc.startAuto;
                jc.startAuto = function() {
                  if (!jc.paused) {
                    jc.startAutoOrig();
                  }
                }
                jc.pause = function() {
                  jc.paused = true;
                  jc.stopAuto();
                };
                jc.play = function() {
                  jc.paused = false;
                  jc.startAuto();
                };
                $('li.jcarousel-item').mouseover(function() {
                    jc.pause();
                });
                $('li.jcarousel-item').mouseout(function() {
                    jc.play();
                });
              }
              jc.play();
            }
    });
    
  /* Overlabel */
  $("label.overlabel").overlabel(); 
  $(".schovej").hide();
});




	
  //================================ FUNKCE ================================================= //
(function($) {
	   
  //hoverClass mi kolidoval s pluginem treeview proto vlastní předpona ivoHoverClass
  //hover funkce
  $.fn.ivoHoverClass = function(c) {
  	return this.each(function(){
  		$(this).hover( 
  			function() {$(this).addClass(c);},
  			function() {$(this).removeClass(c);}
  		);
  	});
  };	

})(jQuery);


// Kontrola formulářů via J. Vrána - http://php.vrana.cz/kontrola-formularovych-poli.php
function check_fields(frm) {
    for (i=1; i < arguments.length; i++) {
        if (frm[arguments[i]].value == '') {
            frm[arguments[i]].focus();
            alert('Vyplňte prosím všechny položky označené hvězdičkou.');
            return false;
        }
    }
    return true;
}
