WelcomePopup = function () {
	var popup;
	var content; 
	var url = 'welcomePopup/html/welcome.popup.html';
	var c_self = this;
	
	var init = function () {

		$.ajax({
			url: url,
			success: function(data) {
				content = data;
				if (data) {
					c_self.open();
				}
			}
		});
		
	};
	
	initEvents = function () {
		popup.get().find('.close').bind('click', function () {
			popup.close();
		});
	};
	
	this.open = function() {
		popup = new Popup(content);
		popup.load();
		popup.center();	
		
		initEvents();
		
	};	
	
	
	
	//window.setTimeout( function () {
	init();
	//}, 0);
	
	return this;
};

//WelcomePopup = new WelcomePopup();

