$(document).ready(function(){
	
	$("ul.navigation").find("a").each(function(){
	     if(location.href === this.href) {
			$(this).addClass("on").click(function() { 
				if (this.href === location.href) return false; 
			});
		}
	});
	
	$('.top-rounded').corner("7px top");
	$('.sm-rounded').corner("4px");
	$('.md-rounded').corner("7px");
	$('.lg-rounded').corner("10px");	
	
	$("div.expand").each(function(){
		$(this).children("div.section-content").css('display','block');
	});
	
	$("span.expander").click(function() {
		var wrapper = $(this).parent("h3").parent("div.section-wrapper");
		var content = wrapper.children("div.section-content");
	
		if (wrapper.hasClass("expand")) {
			wrapper.removeClass("expand");
			content.slideUp('fast');
		}
		else {
			wrapper.addClass("expand");
			content.slideDown('fast');
		}
	});

	$("a.delete-action").click(function(){
	    var msg = 'Are you sure that you want to delete this record? It cannot be undone.';
	    if(confirm(msg)) { return true;  }
	    else {             return false; }
	})
	
});