$(function() {

	// Round the corners of the boxes
	$('.text-box').corner('20px');
	$('#left_column h3').corner('tr br 20px');

	// Use a different plugin to round the menu items, because the JQuery corner plugin doesn't 
    // support transparent backgrounds on the corners. Don't round the corners in IE because 
    // the round corners don't work well with the hover and click handlers in that 'browser'.	
    DD_roundies.addRule('.content', '0 0 20px 20px', true);
    
	var url = document.location.href;
	var lastSlashIndex = url.lastIndexOf('/') + 1;
	var currentFile = url.substring(lastSlashIndex);

	if (currentFile) {
		// Find the menu tab that links to the current page and show it as
		// selected
		var selectedTab = $('div.menu > ul > li > a[href=' + currentFile + ']')
				.addClass('selected');

	} else {
		// Default to selecting the home page in case the location bar doesn't
		// contain a file name e.g. http://chaletsdesbouleaux.com/
		$('div.menu > ul > li > a:first').addClass('selected');
	}

	// Apply drop shadows
	$('.standout').dropShadow({left : 10, top : 10, blur : 3});
});

