// Define constants


//--------------------------------------------------------------------

//Funkcie

/* SK lokalizacia + nastavenia pre datepicker */

$(function(){
	$.datepicker.regional['sk'] = {
	showOn: 'focus',
	//showAnim: 'slideDown',
    //buttonImage: '/assets',
    buttonImageOnly: true,
    dateFormat: 'dd.mm.yy',
    firstDay: 1,
    closeText: 'Zavrieť',
    constrainInput: true,
  	prevText: '&#x3c;Predchádzajúci',
  	nextText: 'Nasledujúci&#x3e;',
  	currentText: 'Dnes',
  	monthNames: ['Január','Február','Marec','Apríl','Máj','Jún','Júl','August','September','Október','November','December'],
  	monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún','Júl','Aug','Sep','Okt','Nov','Dec'],
  	dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
  	dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
  	dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
  	isRTL: false
  };
	$.datepicker.regional['en'] = {
    showOn: 'focus',
    //showAnim: 'slideDown',
      //buttonImage: '/assets',
      buttonImageOnly: true,
      dateFormat: 'dd.mm.yy',
      firstDay: 1,
      constrainInput: true,
      isRTL: false
   };
	//$.datepicker.setDefaults($.datepicker.regional['sk']);
});

//--------------------------------------------------------------------

$(document).ready(function(){
    
    //set focus
    //$('.focus').focus();
    
    //googlemap
    $('#googlemap').show();
    
    //set datepicker
    if($("html").attr("lang")=='sk') $(".datepicker").datepicker($.datepicker.regional['sk']); 
    else $(".datepicker").datepicker($.datepicker.regional['en']);
    
    //fancybox gallery
    
    $(".gallery a").fancybox({
      //'margin' : '0',
      //'padding' : '0',
      'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'speedIn'       : '50',
			'speedOut'      : '50', 
      'changeSpeed'   : '50',
			//'easingIn'      : 'none',
      //'easingOut'     : 'none',
  		'titlePosition' : 'inside',
  		'titleFormat'   : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span class="fancybox-title-number">' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>' + title;
		  },
      'overlayShow'	:	true
  	});    
    
    $(".fancycontent").fancybox({
      //'margin' : '0',
      //'padding' : '0',
      'type'				: 'iframe',
      'width'				: 700,
		  'height'			: 525,
      'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'autoScale'     	: false,
			'speedIn'       : '50',
			'speedOut'      : '50', 
      'changeSpeed'   : '50',
      //'easingIn'      : 'none',
      //'easingOut'     : 'none',
  		'titlePosition' : 'inside',
      'overlayShow'	:	true
  	});
     
});



