var obj = function(){
	return {
		fnGetElToHide:function(){
			var elToReturn;
			$(".wrapDescricaoEmpresas").find('div').each(function(index,el) {
				if($(el).is(':visible')){
					elToReturn = $(el);
					return false;
				}
			});
			return elToReturn;
		},
		fnShow:function(toShow){
			$("."+toShow).slideDown("slow",function(){
				$('html, body').animate({scrollTop: $(document).height()}, 1600);																	
			});
		},
		fnProcessaShow:function(el,toShow){
			if(el){
				el.slideUp("fast",function(){
					obj.fnShow(toShow);
				});
			}else{
				obj.fnShow(toShow);					
			}					
		},
		fnInit:function(){
			$(".btnMontageSIS").click(function(){
				var el = obj.fnGetElToHide();
				obj.fnProcessaShow(el,'descricaoMontageSIS');
			});
			$(".btnMontageFAC").click(function(){
				var el = obj.fnGetElToHide();
				obj.fnProcessaShow(el,'descricaoMontageFAC');						
			});
			$(".btnGisConsult").click(function(){
				var el = obj.fnGetElToHide();
				obj.fnProcessaShow(el,'descricaoGisConsult');				
			});		
			$(".btnGS2").click(function(){
				var el = obj.fnGetElToHide();
				obj.fnProcessaShow(el,'descricaoGS2');				
			});									
		}
	};
}();
