$(function() {
 
	// if the function argument is given to overlay,
	// it is assumed to be the onBeforeLoad event listener
	$("a[rel]").overlay({
 
		expose: 'white',
		effect: 'apple',
		top:'1%',
 
		onLoad: function() {
			var ts = Math.round(new Date().getTime() / 1000);
			$("div.wrap").html('');
			var wrap = this.getContent().find("div.wrap");
			wrap.load(this.getTrigger().attr("href")+"/"+ts);
			
 
		},
 
		onBeforeLoad:function()
		{
			$("div.wrap").html('<table height="400" width="950"><tr><td valign="middle" align="center"><img src="../images/ajax-loader.gif"/></td></td></table>');
		},
 
		onClose:function(){
			//document.getElementById("wrap").innerHTML = '';
		}
	});
});
