$(document).ready(function(){
	
	
	$(".paging").show();
	$(".paging a:first").addClass("active");

	
	$(".image_reel").css({'width' : '99999'});
	
	
	rotate = function(){
    var triggerID = $active.attr("rel") - 1;
    var image_reelPosition = triggerID * '145'; 

    $(".paging a").removeClass('active'); 
    $active.addClass('active');

    
    $(".image_reel").animate({
        top: -image_reelPosition
    }, 800 );

	}; 

	
	rotateSwitch = function(){
		play = setInterval(function(){ 
			$active = $('.paging a.active').next(); 
			if ( $active.length === 0) { 
				$active = $('.paging a:first');
			}
			rotate(); 
		}, 7000); 
	};

	rotateSwitch(); 
	

	$(".image_reel a").hover(function() {
		clearInterval(play); 
	}, function() {
		rotateSwitch(); 
	});	

	
	$(".paging a").click(function() {
		$active = $(this); 

		clearInterval(play); 
		rotate();
		rotateSwitch(); 
		return false; 
	});
	
	
});

