$(document).ready(function() { 
	var query = location.search.substring(1),
		pos = query.indexOf("=");
	if (pos == -1) return;
	
	var name = query.substring(0, pos),
		value = query.substring(pos + 1);
	if (name === "ask" && value === "1"){
		$("#btns").show();
		$("#btnAccept").die().live("click", function(){
			ajaxCall({			
				url: app.EPRESTAPI_CONTEXT_ROOT + "acceptedUser",
				type:"POST",
				dataType:"JSON"
			}).done( function() {
				window.open("main.html", "_self");
			});
		});
	};
});