$(window).load(function(){
					



/* h�tt�r kih�z�sa a jobb oldalon */

var lH = $("#left-side").outerHeight(); 
var rH = $("#right-side").outerHeight();

var wH = $("#left-side").outerHeight()-50+"px"; 

if(lH>rH){
	$('#right-side').css("height", wH);
}


/* input mezok default �rt�k�nek cser�je.. default..�res.. */

swapValue = []; 

$(".swap-value").each(function(i){ 
   swapValue[i] = $(this).val(); 
   $(this).focus(function(){ 
      if ($(this).val() == swapValue[i]) { 
         $(this).val(""); 
      } 
      $(this).addClass("focus"); 
   }).blur(function(){ 
      if ($.trim($(this).val()) == "") { 
         $(this).val(swapValue[i]); 
	 $(this).removeClass("focus"); 
      } 
   }); 
}); 


/* registration total amount calc */
$("#reg-roomType-0, #reg-roomType-1").change(function(){
	totalAmount = [
		//Registration fee
		{0: 790, 1: 690},	//single room, double room
		//Early bird fee
		{0: 720, 1: 620}	//single room, double room
	];
	$("#reg-totalAmount").val("EUR "+totalAmount[self.earlyBird][$(this).val()]);
});

/* registration date input mezok */
$("#reg-birthDate").datepicker({
	dateFormat: "yy-mm-dd",
	changeYear: true,
	changeMonth: true,
	yearRange: "1900:2012",
	showAnim: "slideDown"
});
$("#reg-arrivalDate, #reg-departureDate").datepicker({
	dateFormat: "yy-mm-dd",
	changeYear: true,
	changeMonth: true,
	defaultDate: new Date(2012,04,01),
	showAnim: "slideDown"
});
$(".datepicker").mask("9999-99-99");



/* scroll page */

$('.scrollPage').click(function() {
   var elementClicked = $(this).attr("href");
   var destination = $(elementClicked).offset().top;
   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
   return false;
});



			
});




/* artspublic */

function artspublic(name) {
	document.write("<a href='mailto:"+name+"@gmail.com'>Artspublic</a>");
}
