
	jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	};
	   
   animateContent = function(){
	   
	   var config = {
		   css: { box: '#block-content'}
	   };
	   
	   var shelf = {};
	   
	   function run(){
		   shelf.box = $(config.css.box);
		   movement();
	   };
	   
	   function movement(){
			shelf.box.animate({left: '40px'},'slow', function(){ 
					shelf.box.dropShadow({left: 4, top: 4, opacity: 0.8, blur: 4})
				
			});
		};
		
		return { config: config, run: run }
	}();
	
	animateSlideshow = function(){
	   
	   var config = {
		   css: { box: '#block-content'}
	   };
	   
	   var shelf = {};
	   
	   function run(){
		   shelf.box = $(config.css.box);
		   movement();
	   };
	   
	   function movement(){
			shelf.box.animate({left: '16px'},'slow', function(){
				shelf.box.dropShadow({left: 4, top: 4, opacity: 0.8, blur: 4})
			});
		};
		
		return { config: config, run: run }
	}();
	
	menu = function(){
		// Menu
		$('.left-buttons li a.button-what-we-do').click(function() { 
			$('.left-buttons ul.headlink').toggle(100)
        });
	};
	
	horizontalScroll = function(){
		
		$('#slideshow').serialScroll({
			items:'li',
			prev:'a.button-slideshow-prev',
			next:'a.button-slideshow-next',
			offset:-160, //when scrolling to photo, stop 230 before reaching it (from the left)
			start:1, //as we are centering it, start at the 2nd
			duration:1200,
			force:true,
			stop:true,
			lock:false,
			cycle:true, //don't pull back once you reach the end
			easing:'easeOutQuart', //use this easing equation for a funny effect
			jump: true //click on the images to scroll to them
		});
		
	};
	
	slideshowImageHover = function(){
		$('#slideshow img').fadeTo('slow', 0.8);
		$('#slideshow li').hover(function(){
			$(this).fadeTo('slow', 1.0);
		}, function(){
			$(this).fadeTo('slow', 0.8);
		});			
	};
	
	imageOpacityHover = function(){
		$('.image-opacity').fadeTo('slow', 0.8);
		$('.image-opacity').hover(function(){
			$(this).fadeTo('slow', 1.0);
		}, function(){
			$(this).fadeTo('slow', 0.8);
		});			
	};
	
	detectScreenSize = function (){
		var width = screen.width;
		var height = screen.height;
		alert('w: ' + width + ' h: ' + height);
	};
	
	goLink = function(h){ window.location.href = h; }
	
