(function() {
	var
	Y = YAHOO,
	Dom = Y.util.Dom,
	Event = Y.util.Event,
	Animation = Y.util.Anim,
	anim,
	banner;
	
	function scroll() {
		anim.stop();
		
		var scrOfY = Dom.getDocumentScrollTop() - 175, top;
		
		top = parseInt(Dom.getStyle(banner, 'top'));
		
		if(top < scrOfY && scrOfY > 715){
			anim.attributes.top.to = scrOfY + 150;
		}
		
		if(top - scrOfY > 300){
			anim.attributes.top.to = scrOfY < 715 ? 715 : scrOfY + 150;
		}
	
		anim.animate();
	}
	
	function init() {
		banner = Dom.get('banner_g');
		
		anim = new Animation(banner, { top: { to: 0 } }, 1, Y.util.Easing.easeOut);
		
		Event.on(window, 'scroll', scroll);
	}
	
	Event.onDOMReady(init);
})();