	
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

	
		$(document).ready(function() {
		
			if( $('.deposit_now') ) {
				
				$('.deposit_now').hover(
				
					function() {
						$(this).attr('src','images/cashier/deposit_now_on.png');
					}
					,
					function() {
						$(this).attr('src','images/cashier/deposit_now.png');
					}
				
				);
				
			}
			
			if( $('#winners') ) {
				
				$('#winners').vTicker({
   					speed: 500,
   					pause: 3000,
   					showItems: 3,
   					animation: 'fade',
   					mousePause: false,
   					height: 0,
   					direction: 'up'
				});
				
			}
			
			if( $('.promotion_box') ) {
				
				$('.promotion_box').hover(
				
					function(){
						$(this).children('div').animate({opacity: 'toggle'},200);
					}
					,
					function(){
						$(this).children('div').animate({opacity: 'toggle'},200);
					}
				
				);
				
			}
			
			if( $('#cashiers') ){
				
				$.localScroll();
				
			}
		
			$('.middle').hover(
				
				function() {
					$(this).stop().animate({ backgroundPosition:"0px -260px" }, 500);
				},
				
				function() {
					$(this).stop().animate({ backgroundPosition:"0px 0px"}, 500);
				}

			);
			
			jQuery('#games').jcarousel({			
        		wrap: 'circular',
				easing: 'easeOutSine',
				animation: 2000,
        		initCallback: mycarousel_initCallback
			});
			
			jQuery('#promos').jcarousel({			
        		auto: 2,
				wrap: 'circular',
				easing: 'easeOutSine',
				animation: 2000,
				scroll: 1
			});
			
			$('#download_btn').hover(
				function() {
					$(this).stop().animate({ 'width':'125px' , 'height':'125px' }, 300, 'easeOutSine');
				}
				,
				function(){
					$(this).stop().animate({ 'width':'120px' , 'height':'120px' }, 300, 'easeOutSine');
				}
			);
			
			$('#dwnbtn_1').hover(
				function() {
					$(this).stop().animate({ 'width':'310px' , 'height':'103px' }, 300, 'easeOutSine');
				}
				,
				function(){
					$(this).stop().animate({ 'width':'300px' , 'height':'100px' }, 300, 'easeOutSine');
				}
			);
			
			$('#instant_btn').hover(
				function() {
					$(this).stop().animate({ 'width':'125px' , 'height':'125px' }, 300, 'easeOutSine');
				}
				,
				function(){
					$(this).stop().animate({ 'width':'120px' , 'height':'120px' }, 300, 'easeOutSine');
				}
			);
			
				
				current = new Array('1','2','3','4','5','6','7');
				//easing = 'easeOutBounce';
				easing = 'easeOutQuad';
				time = 1000;
				
				$('#gallery_left').click(
					function(){
						$('#li' + current[0]).animate({ 'width':'298px', 'height':'200px', 'left':'240px', 'top':'30px', opacity:0.4 }, time, easing);
						$('#li' + current[0]).css('z-index','2');
						$('#li' + current[0] + ' img').animate({ 'width':'298px', 'height':'200px' }, time, easing);
						$('#li' + current[0] + ' img').attr('src',images[0]);
						var imgtmp = images.shift();
						images[images.length + 1] = imgtmp;
						
						$('#li' + current[1]).animate({ 'width':'298px', 'height':'200px', 'left':'0px', 'top':'30px', opacity:0.4 }, time, easing);
						$('#li' + current[1]).css('z-index','1');
						$('#li' + current[1] + ' img').animate({ 'width':'298px', 'height':'200px' }, time, easing);
						
						$('#li' + current[2]).animate({ 'width':'318px', 'height':'220px', 'left':'30px', 'top':'19px', opacity:0.6 }, time, easing);
						$('#li' + current[2]).css('z-index','3');
						$('#li' + current[2] + ' img').animate({ 'width':'318px', 'height':'220px' }, time, easing);
						
						$('#li' + current[3]).animate({ 'width':'338px', 'height':'238px', 'left':'60px', 'top':'10px', opacity:0.8 }, time, easing);
						$('#li' + current[3]).css('z-index','5');
						$('#li' + current[3] + ' img').animate({ 'width':'338px', 'height':'238px' }, time, easing);
						
						$('#li' + current[4]).animate({ 'width':'358px', 'height':'258px', 'left':'90px', 'top':'0px', opacity:1 }, time, easing);
						$('#li' + current[4]).css('z-index','7');
						$('#li' + current[4] + ' img').animate({ 'width':'358px', 'height':'258px' }, time, easing);
						
						$('#li' + current[5]).animate({ 'width':'338px', 'height':'238px', 'left':'140px', 'top':'10px', opacity:0.8 }, time, easing);
						$('#li' + current[5]).css('z-index','6');
						$('#li' + current[5] + ' img').animate({ 'width':'338px', 'height':'238px' }, time, easing);
						
						$('#li' + current[6]).animate({ 'width':'318px', 'height':'220px', 'left':'190px', 'top':'19px', opacity:0.6 }, time, easing);
						$('#li' + current[6]).css('z-index','4');
						$('#li' + current[6] + ' img').animate({ 'width':'318px', 'height':'220px' }, time, easing);
						
						var temp = current.shift();
						current[6] = temp;
					}
				);
				
				$('#gallery_right').click(
					function(){
						$('#li' + current[5]).animate({ 'width':'298px', 'height':'200px', 'left':'240px', 'top':'30px', opacity:0.4 }, time, easing);
						$('#li' + current[5]).css('z-index','2');
						$('#li' + current[5] + ' img').animate({ 'width':'298px', 'height':'200px' }, time, easing);
						
						
						$('#li' + current[6]).animate({ 'width':'298px', 'height':'200px', 'left':'0px', 'top':'30px', opacity:0.4 }, time, easing);
						$('#li' + current[6]).css('z-index','1');
						$('#li' + current[6] + ' img').animate({ 'width':'298px', 'height':'200px' }, time, easing);
						$('#li' + current[6] + ' img').attr('src',images[0]);
						var imgtmp = images.pop();
						images.unshift(imgtmp);
						
						$('#li' + current[0]).animate({ 'width':'318px', 'height':'220px', 'left':'30px', 'top':'19px', opacity:0.6 }, time, easing);
						$('#li' + current[0]).css('z-index','3');
						$('#li' + current[0] + ' img').animate({ 'width':'318px', 'height':'220px' }, time, easing);
						
						$('#li' + current[1]).animate({ 'width':'338px', 'height':'238px', 'left':'60px', 'top':'10px', opacity:0.8 }, time, easing);
						$('#li' + current[1]).css('z-index','5');
						$('#li' + current[1] + ' img').animate({ 'width':'338px', 'height':'238px' }, time, easing);
						
						$('#li' + current[2]).animate({ 'width':'358px', 'height':'258px', 'left':'90px', 'top':'0px', opacity:1 }, time, easing);
						$('#li' + current[2]).css('z-index','7');
						$('#li' + current[2] + ' img').animate({ 'width':'358px', 'height':'258px' }, time, easing);
						
						$('#li' + current[3]).animate({ 'width':'338px', 'height':'238px', 'left':'140px', 'top':'10px', opacity:0.8 }, time, easing);
						$('#li' + current[3]).css('z-index','6');
						$('#li' + current[3] + ' img').animate({ 'width':'338px', 'height':'238px' }, time, easing);
						
						$('#li' + current[4]).animate({ 'width':'318px', 'height':'220px', 'left':'190px', 'top':'19px', opacity:0.6 }, time, easing);
						$('#li' + current[4]).css('z-index','4');
						$('#li' + current[4] + ' img').animate({ 'width':'318px', 'height':'220px' }, time, easing);
						
						var temp = current.pop();
						current.unshift(temp);
					}
				);
				
				$('#floatingbox').floating();
				$('#close').click( function(){ $('#floatingbox').fadeOut(); });
		
		});
	