$(document).ready(function(){
	$('#loginform input[name=email]').focus(function(){
		if ($(this).val() == 'E-mail') $(this).val('');
	}).blur(function(){
		if ($(this).val() == '') $(this).val('E-mail');
	});
	
	$('#loginform input[name=hpass]').focus(function(){
		$(this).hide();
		$('#loginform input[name=password]').show().focus();
	});
	
	$('#loginform input[name=password]').blur(function(){
		if ($(this).val() == '') {
			$(this).hide();
			$('#loginform input[name=hpass]').show();
		}
	});

	$('#menutop ul li.active, #menuright ul li.active').each(function(){
		var h = $(this).html();
		$(this).html('<img src="images/1x1.gif" />' + h);
	});
	
	lotmap_init();
});

function lotmap_init() {
	$('#lotmap a').hover(function(){
		var i = $(this).attr('rel');
		var l = parseInt($(this).find('img').css('margin-left')) + Math.round(parseInt($(this).find('img').width()) / 4);
		var t = parseInt($(this).find('img').css('margin-top')) - parseInt($('#info' + i).height()) - 5;
		$('#info' + i).css('margin-left', l).css('margin-top', t).show();
	}, function(){
		var i = $(this).attr('rel');
		$('#info' + i).hide();
	});
	
	$('.cloud div').hover(function(){ $(this).parent().hide(); });
	
}
