// JavaScript Document
$.fn.effects = function() {
	
	$('#box1').css({
		opacity: 0,
		right:'-50px',
		position: 'relative'
	});
	
	$('.download').css({
		opacity: 0
	});
	$('.btns img').css({
		opacity: 0
	});

	$('.casinoBox').hide();
	
	$('.casinoBox').slideDown(800,function(){
		
		function outer(){
			i = 0;
			function inner(){
				if(i===$('.btns img').length){return;}
				$('.btns img').eq(i).show();
				$('.btns img').eq(i).animate({
					opacity: 1
				},100,function(){
					fader();
				});
				i++;
			}
			return inner;
		}
		var fader = outer();
		fader();
		
		
		$(this).find('.download').animate({
			opacity: 1
		},600,'easeInExpo');

	});
	
	$('#box1').animate({
		opacity: 1,
		right:0
	},1000,'easeOutExpo',function(){
		$('#box1 img').hover(
			function(){
				$(this).stop(true, false).animate({
					top: '-10px'
				},400,'easeOutExpo');
			},
			function(){
				$(this).stop(true, false).animate({
					top: 0
				},600,'easeOutBounce');	
			});
	});

	$('.casinoBox .image').hover(
		function(){
			$(this).stop(true, false).animate({left:10});
		},
		function(){
			$(this).stop(true, false).animate({left:0});
		}
	);
	
}
