$(function() {

	// if the function argument is given to overlay,
	// it is assumed to be the onBeforeLoad event listener
	$("a[rel]").overlay({
		top:'3',
		left:'center',
		mask: {
		color: '#fff',
		loadSpeed: 400,
		opacity: 0.7,
		fixed: false
	},
		onBeforeLoad: function() {

			// grab wrapper element inside content
			var wrap = this.getOverlay().find(".contentWrap");

			// load the page specified in the trigger
			wrap.load(this.getTrigger().attr("href"));
		}
	});
});
