$(document).ready(function() {
	$("a.fancy").fancybox({
		'overlayColor'		: '#5c0406',
		'overlayOpacity'	: '0.9',
        'padding'               : 10
    });

	$("a.fancy_video").fancybox({
        'padding'               : 10,
		'onStart'				: function(){
												pageTracker._trackPageview('/video/video.html');
												pageTracker2._trackPageview('/video/video.html');
											}
    });
		
	$(".fancy_html").fancybox({
        'padding'               : 0
    });	

	$("area.html_room").fancybox({
        'padding'               : 0
    });

	// Fotózás
	$('.scrollable').scrollable({
		clickable: false,
		size: 1,
		speed: 500,
		next: '.next',
		prev: '.prev'
	});

});

var h1 = {
src: '/gfx/copperplate_gothic_PFL.swf'
	,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
};
sIFR.activate(h1);
sIFR.replace(h1, {
	selector: 'h1'
	,wmode: 'transparent'
	,css: {
		'.sIFR-root': { 'color': '#fbf9f3', 'font-size': '28px', 'background-color': 'transparent' }
	}
});

var h5 = {
src: '/gfx/copperplate_gothic_PFL.swf'
	,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
};
sIFR.activate(h5);
sIFR.replace(h5, {
	selector: 'h5'
	,wmode: 'transparent'
	,css: {
		'.sIFR-root': { 'color': '#fbf9f3', 'font-size': '17px', 'background-color': 'transparent' }, 
		'a': { 'color': '#fbf9f3', 'text-decoration': 'none' }, 
		'a:hover': { 'color': '#fbf9f3', 'text-decoration': 'none' } 
	}
});

function updateSelected(date) {
	jQuery('#date_year').val(date.substring(0, 4));
	jQuery('#date_month').val(date.substring(5, 7));
	jQuery('#date_day').val(date.substring(8, 10));
}

function updateSelected1(date) {
	jQuery('#date1_year').val(date.substring(0, 4));
	jQuery('#date1_month').val(date.substring(5, 7));
	jQuery('#date1_day').val(date.substring(8, 10));
}

function updateSelected2(date) {
	jQuery('#date2_year').val(date.substring(0, 4));
	jQuery('#date2_month').val(date.substring(5, 7));
	jQuery('#date2_day').val(date.substring(8, 10));
}


function nationalDays(date) {
    for (i = 0; i < natDays.length; i++) {
        if (date.getMonth() == natDays[i][1] - 1 && date.getDate() == natDays[i][2] && date.getFullYear() == natDays[i][0]) {
            if (natDays[i][3] == 'reserved') {
				return [false, natDays[i][3], natDays[i][4]];
			}
        }
    }
    return [true, ''];
}
