$(function() {
    $('#shuffler').before('<div id="nav" class="nav">').cycle({
        fx:     'fade',
        speed:  '1000',
        timeout: 6000,
        pager:  '#nav'
    });
});

$(document).ready(function(){
							   
	$('.products li').hover(function(){
			$(this).addClass('prod-current');
		},function(){
			$(this).removeClass('prod-current');
		}
	);
	
	$('.best-sellers-carousel li, .best-sellers-carousel-large li').hover(function(){
			$(this).addClass('current-carousel-item');
		},function(){
			$(this).removeClass('current-carousel-item');
		}
	);
	
	$('.zoom-views li').hover(function(){
			$(this).addClass('current-zoom-view');
		},function(){
			$(this).removeClass('current-zoom-view');
		}
	);
	
	$('.right-hand-nav-inner ul li').hover(function(){
			$(this).addClass('right-nav-hover');
		},function(){
			$(this).removeClass('right-nav-hover');
		}
	);
	
	$('.megamenu-box-inner span').hover(function(){
			$(this).addClass('drop-down-hover');
		},function(){
			$(this).removeClass('drop-down-hover');
		}
	);
	
	var getLength = $('.pagination-box-top ul li').length;

	
	$('.pagination-box-top ul li').click(function(){
		var elemLength = $('.pagination-box-top ul li').length;
		
		var offset = elemLength/2;
		
		var index = $('.pagination-box-top ul li').index(this);
		
		if(index == 0){
			return false;
		}else if(index > elemLength/2){
			var secondIndex = index-offset;
			$('.pagination-box-top ul li').removeClass('pagin-current');
			$('.pagination-box-top ul li:eq('+index+'), .pagination-box-top ul li:eq('+secondIndex+')').addClass('pagin-current');
		}else if(index < elemLength/2){
			var secondIndex = index+offset;
			$('.pagination-box-top ul li').removeClass('pagin-current');
			$('.pagination-box-top ul li:eq('+index+'), .pagination-box-top ul li:eq('+secondIndex+')').addClass('pagin-current');
		}
				
	});
	
});

jQuery(function(){
	jQuery('ul.sf-menu').superfish({
		animation: {height:'show'},
		dropShadows: false,
		speed:'fast'
	});
});




