(function ($) {
$(document).ready(function () {
	$('.decorate ul li').decorate();
	// wraps hr in divs so that they can be more creatively styled
	$("hr").decorate();
	
	// changes the search label on click
	(function searchlabel() {
		var searchb = $('#CAT_Search');
		var defaultText = "search";
		searchb.onblur = function () { 
			if (this.value == '') { this.value = defaultText; }
		}
		searchb.onfocus = function () {
			if (this.value == defaultText) { this.value = ''; }
		}
		if (searchb.value == "") {
			searchb.value = defaultText;
		}
	}) ();
	
	$("#event-tabs").tabs();
	
	classes = ['montage_1','montage_2','montage_3'];
	$("body").addClass(classes[Math.floor(3*Math.random())]);
});

// remove bc base mouse events
$(window).load(function () {
	$('.decorate ul li').each(function () {
		this.onmouseover = null;
		this.onmouseout  = null;
		
		var ob = $(this);
	
		ob.hover(
			function () { ob.addClass('hover') },
			function () { ob.removeClass('hover') }
		);
	});
});
})(jQuery);