/* jQuery functions go in here */
if (typeof(jQuery) != "undefined") {	
	 $(function() {
	
		$('a[rel="#feedbackFrm"]').click(function(e) { 
												  		
      		var w = 470;
			var h  = 500;
			var feedbackWin = window.open($(this).attr("href"),'Feedback', 'width='+w+',height='+h+',top='+(screen.height/2-h/2)+',left='+(screen.width/2-w/2));
			if (feedbackWin && feedbackWin.open) {
				feedbackWin.focus();
				return false;
			}
			
    	});
		
		/*
		TODO: Overlay
		$("body").append("<div class='overlay' id='feedbackFrm'></div>");
		// if the function argument is given to overlay, it is assumed to be the onBeforeLoad event listener 
		$("a[rel='#feedbackFrm']").overlay(function() {  
			// grab wrapper element inside content 
			var wrap = this.getContent().find("div.overlay-wrap"); 
			// load only for the first time it is opened 
			if (wrap.is(":empty")) { 
				wrap.load(this.getTrigger().attr("href")); 
			} 
		});*/ 
	}); 
}