$(document).ready(function(){
	/*$('#header').click(function() {
		var top = $('#hide');
		if (top.is(':hidden')) {
			top.show('slow');
		} else {
			top.hide('slow');
		}
	});*/

	$(".available").live("mouseover", function(){
		if(!$(this).hasClass("dayCell")) {
			$(this).css('backgroundColor', 'transparent');
			$(this).css('backgroundImage', 'url('+appBasePath+'img/calendar-rollover.gif)');
		}
	});
	$(".available").live("mouseout", function(){
		if(!$(this).hasClass("dayCell")) {
			$(this).css('backgroundColor', '#EAC5C6');
			$(this).css('backgroundImage', '');
		}
	});
	$(".hourClickable").live("mouseover", function(){
		$(this).css('backgroundImage', 'url('+appBasePath+'img/calendar-day-cell-1-active.gif)');
	});
	$(".hourClickable").live("mouseout", function(){
		$(this).css('backgroundImage', 'url('+appBasePath+'img/calendar-day-cell-1.gif)');
	});
	

	$(".res-form-row-input input, .res-form-2-row-input input").focus(function(){
		$(this).parent().css('backgroundColor', '#2F2E2A');
		$(this).css('backgroundColor', '#2F2E2A');
	});
	$(".res-form-row-input input, .res-form-2-row-input input").blur(function(){
		$(this).parent().css('backgroundColor', '#978E85');
		$(this).css('backgroundColor', '#978E85');
	});	


	$(".res-form-2-row-input select").focus(function(){
		$(this).css('backgroundColor', '#2F2E2A');
	});

	$(".res-form-2-row-input select").blur(function(){
		$(this).css('backgroundColor', '#978E85');
	});	



$(".form-text, .form-password, .form-text-datepicker, #res-right-month-form-cnt-input").mouseenter(function(){
               bg = $(this).css("backgroundImage");
               $(this).css("backgroundImage", bg.replace(".gif", "-a.gif"));
       });

$(".form-text, .form-password, .form-textarea, .form-text-datepicker, #res-right-month-form-cnt-input").mouseleave(function(){
               bg = $(this).css("backgroundImage");
			   $(this).css("backgroundImage", bg.replace("-a.gif", ".gif"));

       });



	
	$('.form-select').selectmenu({
		maxHeight: 400,
		style: 'dropdown',
		
	});
	
	$(".datepicker").mouseenter(function(){
		img = $(this).attr("src");
		$(this).attr("src", img.replace(".gif", "-a.gif"));
	});
	
	$(".datepicker").mouseleave(function(){
		img = $(this).attr("src");
		$(this).attr("src", img.replace("-a.gif", ".gif"));
	});
			
	//IE = /*@cc_on!@*/false;
	//if(!IE)
		$('.colSelector').customInput();

	$('.cancel-text, .reservationid-text, .group_count-text, .date-text, .company_name-text, .city-text, .supervisor_name-text, .name-text, .language-text, .phone-text, .email-text, .nip-text, .status-text, .info-text').each(function() {
		$(this).css("marginTop", ((47-$(this).height())/2));
	});
	
	//alert($('#list-head-in').width());
	$('#tab-border-cover').height($('#list-tab-in').height());
	
});