$(document).ready(function(){
	$('#home .section').hide();
	$('#home .active').show();

	$('.branding a').click(function(){
		if ($("#section_home").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#section_home").show();
			return false;
		}
	});
	
	$('#tab_businesscards').click(function(){
		if ($("#section_businesscards").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_businesscards").addClass('active');
			$("#section_businesscards").show();
			return false;
		}
		else{
			$("#tab_businesscards").removeClass('active');
			$("#section_businesscards").hide()
			$("#section_home").show();
			return false;
		}
	});
	$('#tab_stationery').click(function(){
		if ($("#section_stationery").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_stationery").addClass('active');
			$("#section_stationery").show();
			return false;
		}
		else{
			$("#tab_stationery").removeClass('active');
			$("#section_stationery").hide()
			$("#section_home").show();
			return false;
		}
	});
	$('#tab_leaflets').click(function(){
		if ($("#section_leaflets").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_leaflets").addClass('active');
			$("#section_leaflets").show();
			return false;
		}
		else{
			$("#tab_leaflets").removeClass('active');
			$("#section_leaflets").hide()
			$("#section_home").show();
			return false;
		}
	});
	$('#tab_flyers').click(function(){
		if ($("#section_flyers").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_flyers").addClass('active');
			$("#section_flyers").show();
			return false;
		}
		else{
			$("#tab_flyers").removeClass('active');
			$("#section_flyers").hide()
			$("#section_home").show();
			return false;
		}
	});
	$('#tab_banners').click(function(){
		if ($("#section_banners").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_banners").addClass('active');
			$("#section_banners").show();
			return false;
		}
		else{
			$("#tab_banners").removeClass('active');
			$("#section_banners").hide()
			$("#section_home").show();
			return false;
		}
	});
	$('#tab_posters').click(function(){
		if ($("#section_posters").is(":hidden")){
			$('.section').hide();
			$("#tabs li").removeClass('active');
			
			$("#tab_posters").addClass('active');
			$("#section_posters").show();
			return false;
		}
		else{
			$("#tab_posters").removeClass('active');
			$("#section_posters").hide()
			$("#section_home").show();
			return false;
		}
	});
	/*
	$('#tab_businesscards').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_businesscards").is(":hidden")){
			$("#tab_businesscards").addClass('active');
			$("#section_businesscards").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_businesscards").removeClass('active');
			$("#section_businesscards").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});

	$('#home #tab_stationery').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_stationery").is(":hidden")){
			$("#tab_stationery").addClass('active');
			$("#section_stationery").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_stationery").removeClass('active');
			$("#section_stationery").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});

	$('#home #tab_leaflets').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_leaflets").is(":hidden")){
			$("#tab_leaflets").addClass('active');
			$("#section_leaflets").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_leaflets").removeClass('active');
			$("#section_leaflets").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});

	$('#home #tab_flyers').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_flyers").is(":hidden")){
			$("#tab_flyers").addClass('active');
			$("#section_flyers").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_flyers").removeClass('active');
			$("#section_flyers").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});

	$('#home #tab_banners').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_banners").is(":hidden")){
			$("#tab_banners").addClass('active');
			$("#section_banners").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_banners").removeClass('active');
			$("#section_banners").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});

	$('#home #tab_posters').click(function(){
		$('.section').slideUp(400);
		$("#tabs li").removeClass('active');
		if ($("#section_posters").is(":hidden")){
			$("#tab_posters").addClass('active');
			$("#section_posters").addClass('active').slideDown(400);
			return false;
		}
		else{
			$("#tab_posters").removeClass('active');
			$("#section_posters").removeClass('active').slideUp(400);
			$("#section_home").addClass('active').slideDown(400);
			return false;
		}
	});
	*/
});
