function Main(){
	
    this.init = function(){
    	(function($) {
    		main.registerSlideOuts();
    	})(jQuery);
    }
	
	this.registerSlideOuts = function(){
		(function($) {
			
			$(".social .slideout").each(function(i, e) {
				$(e).mouseover(function(e) {
					main.slideOut(e, 28);
				})
				$(e).mouseout(function(e) {
					main.slideIn(e, 21);
				})
			})
			
		})(jQuery);
	}
	
	this.slideOut = function(e, height){
		(function($) {
			$(e.currentTarget).animate({
			    height: height
			  }, 300, function() {
			    // Animation complete.
			});
		})(jQuery);
	}
	
	this.slideIn = function(e, height){
		(function($) {
			$(e.currentTarget).animate({
			    height: height
			  }, 300, function() {
			    // Animation complete.
			});
		})(jQuery);
	}
	
	this.logoutFB = function(){
		(function($) {
			$.post("/logout", { },
			   function(data){
					FB.logout(window.location.reload());
			    }
			);
		})(jQuery);
	}
	
	this.doLoginFB = function(){
		(function($) {
			$.post("/do-login", { type: 'facebook' },
			   function(data){
					//window.location.reload();
			    }
			);
		})(jQuery);
	}
	
	this.hideStartOverlay = function(){
		(function($) {
			$.post("/hide-start-overlay/", { mode: 'true' },
			   function(data){
					$('#startOverlay').fadeOut();
					$('#showStartOverlay').fadeIn();
			    }
			);
		})(jQuery);
	}
	
	this.showStartOverlay = function(){
		(function($) {
			$.post("/show-start-overlay/", { mode: 'true' },
			   function(data){
					$('#showStartOverlay').fadeOut();
					$('#startOverlay').fadeIn();
			    }
			);
		})(jQuery);
	}
	
    var self = this;
}

var main = new Main();


(function($) {
	$(document).ready(function(){
		main.init();
		//main.doLoginFB();
	});

})(jQuery);
