;(function($) {

	var homepage = {

		init: function() {
			this.handlePage();
		},
		
		handlePage: function() {
			$('.header + div').addClass('active');
			$('.content:not(.header + div .content)').hide();
			
			$('.bar a').click(function() {
				$(this).parent().parent().siblings().removeClass('active');

				if (!$(this).parent().parent().hasClass('active')) {
					$(this).parent().parent().addClass('active');
					$('.content').hide(300);
					$(this).parent().next('.content').toggle(100);
				}

				return false;
			});
		}
	}
	
	$(document).ready(function() {
		homepage.init();
	});

})(jQuery);
