jQuery(
  
	function ($) {

		$.Body = $('body');
		$.Window = $(window);
		$.Scroll = ($.browser.mozilla || $.browser.msie) ? $('html') : $.Body;
     
		$Heading = $.Body.find('#masthead');
		$NextPrev = $.Body.find('#nextprev');
		$Wrap = $.Body.find('#projectWrapper');
		$Copy = $.Body.find('#copyrights');
		
				
		$('[btn-controller]').Instantiate();
		
		
		//$.Window.bind('resize',center);
		$.Window.bind('scroll',scrollMe);
		//center();
		
		
		function scrollMe() {
			var $newMrg = $.Window.scrollLeft()+30;
			var $topScroll = $.Window.scrollTop();

			$Heading.css("top",60-$topScroll+"px");
			$NextPrev.css("top",160-$topScroll+"px");

			
			$Copy.css("top",0-$topScroll+"px");
		}
		
		function center() {
			var h1 = $.Window.height();
			if(h1<1055){
				$Wrap.css("position","");
				$Wrap.css("top","");
				$Wrap.css("margin-top","");	
			}else{
				$Wrap.css("position","absolute");
				$Wrap.css("top","50%");
				$Wrap.css("margin-top","-300px");
			}
		}
	} 
);


(function($) {

  $.fn.Instantiate = function() {
    
      this.each(function() { 

          var $self = $(this),
          $controller = $self.attr('btn-controller');
                  
          if ($self[$controller])
            $self[$controller]();
          });
  }

  

})(jQuery);


(function($) {

  /* Cornilia */

    $.fn.Btn = function() {
     this.each(function() { 
      	
        var $self = $(this);
        var $hov = $self.find('.story #hover');
        $self.mouseover(function() {
			var _opt = {duration: 0,easing: "easeOutExpo"};
			$hov.animate({opacity:0.3},_opt);
		});	
		
		$self.mouseout(function() {
			var _opt = {duration: 0,easing: "easeInExpo"};
			$hov.animate({opacity:0},_opt);
		});	
              
     });
     
    return this;
     
  }
 
  

    
})(jQuery);




