/* Author: craig */

	
$(document).ready(function(){

	/* clear / rest form fields */
	(function($){
		$.fn.clearDefault = function(){
			return this.each(function(){
				var default_value = $(this).val();
				$(this).focus(function(){
					if ($(this).val() == default_value) $(this).val("");
				});
				$(this).blur(function(){
					if ($(this).val() == "") $(this).val(default_value);
				});
			});
		};
	})(jQuery);

	$('input.clear-default').clearDefault();
	   
	   
	//spilt cols
	$('.whatson-single-desc').columnize({ columns: 2 });
	$('.columnizer').columnize({ columns: 2 });
	$('.split').columnize({ columns: 2 });
	 
	//drop down menus
	$('ul.sf-menu').superfish();

	//tooltips on the mini cal
	$(".event_tooltip").each(function() {
		
		var content = $($(this).attr("rel")).html();
		
		$(this).qtip({
			content: content,
			position: {
				my: 'bottom center',
				at: 'top center',
				adjust: {x: 0, y: 10}				
			},
			style: {
               classes: 'ui-tooltip-shadow ui-tooltip-light'
            },
			hide: {
				fixed: true
			}			
		});
	});


}); 
