//new version of quickview for reserve and collect
var overLayAPIid;
var wrap;
function closeOverLay() {
	$("a[rel]").each(function() {
		$(this).overlay().close();
	});
}

$(document).ready(function(){
	$(".quickViewOverLay").overlay({
		closeOnClick: false,
		api					: true,
		onBeforeLoad: function() { 		 
        // grab wrapper element inside content 
        wrap = this.getOverlay();
        overLayAPIid = $(".quickViewOverLay").index(this.getTrigger());
        // load the page specified in the trigger 
		$.ajax({ type: "GET", url: 
			this.getTrigger().attr("link"), 
			async: false,
			dataType: "text" ,
			success: function(txt) {
			document.getElementById("quickViewLayer").innerHTML = txt;
			}
		})	
		} 
	});
});
