(function($){
	EYE.register(function(){
		$('#sizeMenu a').bind('click', function(){
			$('body').attr('id', 'BODY'+this.id);
			$.cookie('bodySize', this.id);
			this.blur();
			return false;
		});
		$('body').attr('id', 'BODY'+$.cookie('bodySize'));
	}, 'init');
	EYE.search = function(){
		var el, placeholderVal;
		var focus = function() {
		    el.addClass('focused');
		    if (el.val() == placeholderVal) {
			el.val('');
		    }
		};
		var blur = function() {
		    if (el.val() == '' || el.val() == placeholderVal) {
			el.val(placeholderVal).removeClass('focused');
		    }
		};
		var submit = function() {
		    if (el.val() == '' || el.val() == placeholderVal) {
			el.focus();
			return false;
		    }
		};
		return {
		    init: function() {
			el = $('#searchQuery');
			placeholderVal = el.attr('placeholder');
			if (el.val() == '') {
			    el.val(placeholderVal)
			}
			el.bind('focus', focus).bind('blur', blur);
			$('#searchForm').bind('submit', submit);
		    }
		};
	    }();
	    EYE.register(EYE.search.init, 'init');
})(jQuery);
