// Shadowbox media viewer
Shadowbox.path = base_url + 'javascript/shadowbox/';
Shadowbox.init({language:'en',players:['img'],overlayColor:'#00467F',overlayOpacity:'0.8'});

$(document).ready(function(){

	// Show wait button
	$('.waitbtn').click(function() { $(this).attr('value','Please wait...'); });
	
	// Open external links in new window
	$('a[rel="external"]').click(function(){ window.open(this.href); return false; }); 

	// Display confirm message when button clicked
	$('.confirm').click(function(){ return window.confirm('Are you sure you want to ' + this.title.charAt(0).toLowerCase() + this.title.substr(1) + '?'); });
	
	// Fix label widths
	var max = 0; $('label.float').each(function(){ if($(this).width() > max) max = $(this).width(); }); $('label.float').width(max);	
	
});
