$(document).ready(function(){

// sharethis
	stLight.options({publisher:'54574c9c-c5a9-4b1a-bb56-c221af95631e'});
	
// homepage day's event ajax
//	$('.homepage .days-nav a').click(function(){
//		$('.event-main').load('ajax-home-events.php #' + $(this).attr('rel'));
//		$('.days-nav a.selected-day').removeClass('selected-day');
//		$(this).addClass('selected-day');
//		return false;
//	});

// overlay (for news.php, dining.php, ...)
	$('a.gallery-link').overlay({
		mask: '#000',
		top: 0,
		onBeforeLoad: function() {
			var wrap = this.getOverlay().find(".contentWrap");
			wrap.load(this.getTrigger().attr("href") + ' #overlay_wrapper');
		},
		onLoad: function() {
		    $('#gallery').galleria({
		    	thumb_quality: false,
		    	image_crop: true,
		    	show_counter: false,
		    	clicknext: true,
		    	image_position: 'center top'
		    });	
		}
	});
	
// galleria	media-event
var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
if (IE6 == false) {
    $('#gallery').galleria({
    	thumb_quality: false,
    	image_crop: true,
    	show_counter: false,
    	clicknext: true,
    	image_position: 'center top'
    });
}

// galleria	home   
    $('#gallery_home').galleria({
    	autoplay: 6000,
    	thumbnails: false,
    	show_imagenav: false,
    	thumb_quality: false,
    	image_crop: true,
    	show_counter: false,
    	clicknext: true,
    	image_position: 'center top'
    });
    
// accordian menu (for news.php)
 	$("#archives_accordion").accordion(); 

// infield labels
	$('label').inFieldLabels();

// cufon  	
 	Cufon.replace('.navbar a');
	Cufon.replace('.sidebar h3');
	Cufon.replace('.content-title');
	Cufon.replace('.cufon');	
	Cufon.now();
});

