fenewsManager = null;

function fenewsManagerInit(viewName){
	fenewsManager = new fenewsManagerSys();	
	fenewsManager.initView(viewName);
}

function fenewsManagerSys(options){
	
	this.options  = options;
		
	this.initView = function (viewName) {
		
		switch(viewName){
			case 'mainadminview':
				this.initMainStartView();
				break;
			
			case 'quickAppView':
				this.initQuickAppView();
				break;
				
			default:
				break;
		}
	}
	
	this.initMainStartView = function() {
		
	}
	
	this.initQuickAppView = function() {
		$(".welcomeQuickAppsBoxCorner").corner("5px");
	}
	
	this.readMoreNews = function(newsID) {
		$("#quickAppNewsModal" + newsID).modal({	
			onOpen : function(dialog) {
				dialog.overlay.fadeIn('slow', function () {
					dialog.container.slideDown('slow', function () {
						dialog.data.fadeIn('slow');
						/** Browser Test */
						if(systemBrowserName != 'ie') {
							/** Round Corners inside ... */
							$(".quickAppNewsCloseButton").corner("5px");
						}
					});
				});
			},
			
			onShow : function(dialog) {
				$(".quickAppNewsCloseButton").click(function(){
					$.modal.close();
				});	
			},
			
			onClose : function (dialog) {
				dialog.data.fadeOut('fast', function () {
					dialog.container.slideUp('fast', function () {
						dialog.overlay.fadeOut('fast', function () {
							$.modal.close(); // must call this!
						});
					});
				});
			},
			
			overlayClose:true,
			closeClass: "closeModal"
		});
	}
	
}	
