Sys.Application.add_load(Page_Load);

function Page_Load() { 
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);  
}

function endRequest(sender, args) { 
    jQuery("form").removeClass("jqtransformdone");
    jQuery('form').jqTransform();

    if (typeof mycarousel_initCallback == 'function') {
        jQuery('#mycarousel').jcarousel({ auto: 4,
            wrap: 'last',
            scroll: 1,
            initCallback: mycarousel_initCallback
        });
    }
}

/* JQUERY ------ */
jQuery(document).ready(function(){
 /* STYLOVANE FORMULARE --- */
  //jQuery(function() {
	
    jQuery('form').jqTransform();
  //});


	/* OZNACOVANI POLOZEK --- */
	jQuery('ul li:last-child,ol li:last-child,td:last-child,th:last-child').addClass('last');
	jQuery('ul li:first-child,ol li:first-child,td:first-child,th:first-child').addClass('first');

  /* SLIDER --- */
  //jQuery(function(){
	jQuery('.slider .slides-c').slides({
	  preload: false,
	  effect: 'fade, slide',
	  crossfade: true,
	  generateNextPrev: false,
	  generatePagination: false,
	  play: 4000,
	  pause: 2000,
	  fadeSpeed: 500,
	  hoverPause: true
	});
  //});

  $.datepicker.setDefaults($.datepicker.regional['cs']);
  $("#_TerminMinOd").datepicker({
	  showOn: "button",
	  buttonImage: "/Design/images/Kalendar.png",
	  buttonImageOnly: true,
	  dateFormat: "d.m.yy"
  });
  $("#_TerminMaxDo").datepicker({
	  showOn: "button",
	  buttonImage: "/Design/images/Kalendar.png",
	  buttonImageOnly: true,
	  dateFormat: "d.m.yy"
  });
  
});

function pageLoad() {
/*
	jQuery('#mycarousel').jcarousel({ auto: 4,
		wrap: 'last',
		scroll: 1,
		initCallback: mycarousel_initCallback
	});
    */
    //InitEverything();
}

