$(document).ready(function() {
			$('.allHide').hide();

			var pathname = location.href;
			if (pathname.match(/home$/)) {
				$('.home').show();
			} else if (pathname.match(/web$/)) {
				$('.web').show();
			} else if (pathname.match(/prostores$/)) {
				$('.prostores').show();
			} else if (pathname.match(/framework$/)) {
				$('.prostores-framework').show();
			} else if (pathname.match(/prostores-add-ons$/)) {
				$('.prostores-add-ons').show();
			} else if (pathname.match(/contact-us$/)) {
				$('.contact-us').show();
			} else {
				$('.home').show();
			} 
			if (pathname.match(/emailed$/)) {
				$('.emailed').fadeIn();
			}
			$('#logo').hover(function(){
					$('.homeHover').fadeIn(150);
				},
				function(){
					$('.homeHover').fadeOut(150);
			});
			$('.menuButton').hover(function(){
					$(this).stop().animate({
						top: 5 + "px",
						easing: 'easeInOutCubic'
					}, 150);
					$(this).find('a').stop().animate({ 
							color: "#badcf7"
					}, 150 );
				},
				function(){
					$(this).stop().animate({
						top: 0 + "px",
						easing: 'easeInOutCubic'
					}, 150);
					$(this).find('a').stop().animate({ 
							color: "#FFF"
					}, 150 );
			});

			$('.logoButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.home').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeIn();
			});

			$('.webButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeOut();
				$('.web').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
			});

			$('.prostoresButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeOut();
				$('.prostores').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
			});
			
			$('.addonsButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeOut();
				$('.prostores-add-ons').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
			});

			$('.prostoresFrameworkButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeOut();
				$('.prostores-framework').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
			});

			$('.contactUsButton').click(function() {
				$('.allHide').stop(true, true).slideUp({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
				$('.poster').fadeOut();
				$('.contact-us').stop(true, true).slideDown({ 
					duration: 600, 
					easing: 'easeInOutCubic'
				});
			});

			var fPHeight = $('.projectsWrap').height();
			$('.frameworkProjects').toggle(
				function() {
					$(this).animate({ 
						height: fPHeight, 
						easing: 'easeInOutCubic'
					}, 500);
					$('.projectsClickable').html('<span>Click</span> to hide');
				},
				function() {
					$(this).animate({ 
						height: 20, 
						easing: 'easeInOutCubic'
					}, 500);
					$('.projectsClickable').html('<span>Click</span> to see designs based on the Framework');
				}
			);
			
			$('.emailed').click(function(){
				$(this).fadeOut();
			});
		});