/**
 * @author craigkaminsky
 */
$(document).ready(
	function(){
		$('img.promoBtn, img.joinBtn, img#featuredEventImage').mouseover(
			function(){
				$(this).fadeTo("slow",0.85);
			}
		);
		$('img.promoBtn, img.joinBtn, img#featuredEventImage').mouseout( function(){ $(this).fadeTo("fast",1) });
		$( '#homepageSelect' ).change(
			function()
			{
				val = $( '#homepageSelect' ).val();
				if ( val > 0 )
				{
					window.location.href = "/allies/view/" + val;
				}
			}
		);
		$( 'div.scrollable' ).scrollable(
			{
				vertical:true,  
				size: 6 	
			}
		);
		$( 'div.homeButtonScroll' ).scrollable({ 
			size : 3, 
			interval : 4000, 
			loop : true,
			speed : 600,
			// when seek starts make items little transparent 
			onBeforeSeek: function() { 
				this.getItems().fadeTo(400, 0.85);         
			}, 
			// when seek ends resume items to full transparency 
			onSeek: function() { 
				this.getItems().fadeTo(400, 1); 
			}				 
		});
	}
);