var noItems = 0;
var currItem = 0;

jQuery.noConflict();
jQuery(document).ready(function() {
/*
	jQuery('.item').hide();
	jQuery('.item').css('display','none').css('position', 'absolute').css('top', 0);
	if(jQuery('.item').size() > 1){
		noItems = jQuery('.item').size();
		jQuery('.item').eq(0).show();
		carousel = setInterval('imageCarousel()', 5000);
		jQuery('.item').mouseenter(function(){clearInterval(carousel);}).mouseleave(function(){carousel = setInterval('imageCarousel()', 5000);});
	}
*/

    jQuery('.item').css('display','block').css('position', 'absolute').css('top', 0);
  
    jQuery("#manual2").click(function() {
		jQuery.fancybox([
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-ipad-1.jpg',
				'title'	: 'Get instant mixes in a single tap and listen to your music in interesting new ways. Don\'t miss the Groovy Mix, Artist Duos and Three of a Kind!'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-ipad-5.jpg',
				'title'	: 'Rediscover your music by flipping through dozens of mixes put together based on your listening habits.'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-ipad-2.jpg',
				'title'	: 'Get a beautiful view of what you\'re currently listening to in full screen mode. Use swipe gestures to skip between songs.'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-ipad-3.jpg',
				'title'	: 'Browse your library by artists, albums and tags...'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-ipad-4.jpg',
				'title'	: '... and get to know more about your music.'
			},

			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-iphone-2.jpg',
				'title'	: 'Get instant mixes in a single tap.'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-iphone-5.jpg',
				'title'	: 'Use the swipe gestures to control the player and the volume while in the car.'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-iphone-4.jpg',
				'title'	: 'Display a large scrolling song title so that you can keep your eyes on the road.'
			},
			{
				'href'	: 'http://www.zikeragroove.com/wp2/wp-content/uploads/screenshot-iphone-3.jpg',
				'title'	: 'Listen to featured duos of artists who are meant to be heard together.'
			}
		], {
			'padding'			: 10,
			'transitionIn'		: 'elastic',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0,
			'overlayShow'       : true,
			'overlayColor'      : "#000000",
			'overlayOpacity'    : 0.75,
			'titleShow'         : true,
			'titlePosition'     : 'inside'
		});
	});
	
	

	jQuery(".vidLink").click(function() {
        jQuery.fancybox({
            'padding'             : 10,
            'autoScale'   : false,
            'transitionIn'        : 'elastic',
            'transitionOut'       : 'elastic',
            'title'               : this.title,
            'width'               : 700,
            'height'              : 500,
			'overlayShow'         : true,
			'overlayColor'        : "#000000",
			'overlayOpacity'      : 0.75,            
            'href'                : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
            'type'                : 'swf',    // <--add a comma here
            'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here            
            });
            return false;
        });
    });



	function imageCarousel(){
		var prevItem = currItem;
		currItem++;
		if(currItem >= noItems){currItem = 0;}
		jQuery('.item').eq(prevItem).fadeOut(1000);
		jQuery('.item').eq(currItem).fadeIn(1000);
		
	}
