var ReferencePopUp = (function(){
	function __construct() {
		this.background = $("#references-popup-bg");
		this.popupbox = $("#references-box");
	}
	
	__construct.prototype.bindEvents = function(obj,close) {
		var parent = this;
		obj.live("click",function() {
			parent.popUp(true);
		});
		close.live("click",function() {
			parent.popUp(false);
		});
	}
	
	__construct.prototype.popUp = function(open) {
		if(open !== false) {
			this.background.fadeTo(500,.75,"easeInOutQuad");
			this.popupbox.fadeIn(500,"easeInOutQuad");
		} else {
			this.background.fadeOut(500,"easeInOutQuad");
			this.popupbox.fadeOut(500,"easeInOutQuad");
		}
	}
	
	
	return __construct;
})();
