/**
*  kalendar upraven jako plugin s jquery
*/
 /*
  var src =  $('script[src$=calendar.js]').attr('src').replace('calendar.js','');  
  $.getScript(src+'calendar-lib.js');
  $.getScript(src+'configure.js');
  $.getScript(src+'calendar-box.js');
  */
  
  /**
   * inicializacni funkce
   */   
    
  function initCalendar() {      
   $('input.date').data('calendarConf', new CalendarConfigure());    		      
   
   var ctestTrying = 0;
   var calendar = null; 
   calendar = new CalendarBox();
		 if(calendar==null) {
		  return;
		 }
   $('input.date').focus(function(){         
     if(calendar.localObject != null && calendar.localObject!==this && !calendar.close()) {       
        return '';
     }               
     if(this.readonly!=true && this.disabled!=true && calendar.localObject!=this) {      
      calendar.show($(this));             
     } 
    });          
 } 
// test of loading prototype.js 
if(typeof $ != 'object' && typeof $ != 'function') {
 alert('Please load jquery.js !!!');
}else{
 // inicialize of calendar
 $(document).ready(initCalendar);  
} 




