$(function() {

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

		expose: 'black',
		effect: 'apple',
		top:'1%',
		
		onBeforeLoad: function() {
			// grab wrapper element inside content
			var wrap = this.getContent().find("div.wrap");
			
			// load only for the first time it is opened
			//if (wrap.is(":empty")) {
			wrap.load(this.getTrigger().attr("href"));
			//}
		},
		
		onClose:function(){
			///alert(this.getTrigger().attr("href"));
		}

	});
});
/*
$().ready(function() {
    var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
	$("#example").autocomplete(
	data,
	formatItem: function(item) {
    	return item.text;
  	});
  });
  */
