//run fun
$(document).ready(function() {
	if ($.browser.msie) {
		if (parseInt($.browser.version) < 7) {
			try {
				document.execCommand('BackgroundImageCache', false, true);
			} catch(e){}
			$('a.pngfix').hover(function() {
				$(this).addClass('hover');
			}, function() {
				$(this).removeClass('hover');
			});
		}
	}
	
	input_focus();
	banner_tab();
});

function input_focus() {
	$('.login-form-fields li').each(function() {
		$('input', this).blur();
		if ($('input', this).val() != '') {
			$('label', this).hide();
		}
		$(this).click(function() {
			$('label', this).hide();
			$('input', this).focus();
		});
	});
}

function banner_tab() {
	if ($('#banner-tab').length < 1) return false;
	var timer = null,
	    delay = 150,
	    animate = function(obj) {
			$(obj).addClass('active').stop().animate({height:242}).siblings().removeClass('active').stop().animate({height:63});
		};
	$('#banner-tab li').hover(function() {
		var obj = this;
		timer = setTimeout(function() {
			animate(obj);
		}, delay);
	}, function() {
		clearTimeout(timer);
	});
}

