var FormHelper = {
	placeHolderLabel: function (els) {
		var $els = $(els);
		$els.blur(function () {
			if (this.value != "") {
				$(this).addClass("notempty");
			} else {
				$(this).removeClass("notempty");
			}
		});
	},
	
	quickSearch: function() {
		$("#QuickSearchForm input").focus(function () {
			$(".quickSearch").css({'height':'55px'});
			$("#QuickSearchForm").addClass('focused');
			$("#QuickSearchForm").animate({"width":"300px"}, 250,"swing", function () { $('#QuickSearchForm input.cat_button').fadeIn(); });
		});
		$("#QuickSearchForm input").blur(function () {
			setTimeout(function () {
				$(".quickSearch").css({'height':''});
				$("#QuickSearchForm").removeClass('focused');
				$("#QuickSearchForm").css("width","auto");
				$('#QuickSearchForm input.cat_button').hide();
			}, 100);
		});
	},
}

$(document).ready(function () {
	FormHelper.placeHolderLabel(".placeHolderLabel");
	FormHelper.quickSearch();
});
