$(function() {

	// if the function argument is given to overlay,
	// it is assumed to be the onBeforeLoad event listener
	$("a.contact_link[rel]").overlay({

		mask: {
				color: '#000000',
				loadSpeed: 200,
				opacity: 0.7,
				closeOnClick: true,
				closeOnEsc: true,
				zIndex:9999
		},

		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"));
		}

	});
});

$(document).ready(function() {
	$('.close').click(function(){
		return false;
	})
});
