$(document).ready(function(){/*--INIZIO DOCUMENT READY---*/
						   
	/*$("#tagstab > ul").tabs();*/
	
	$('#s3slider').s3Slider({
      timeOut: 5500
    });
	
	
	/*$("#newstab > ul").tabs();
	$("#newstab").css({ visibility:"visible"});*/
						 
	/*------------------ KTOOLTIP -------------------- */
	/*-----ktooltip DOWN------*/
		
		$(function() {
					
		$('.virtuytips').tooltip({
			track: true, 
			delay: 0, 
			showURL: false,
			showBody: "  -  ", 
			extraClass: "imageTooltip1" 
		}); 
			
		});
		
		
	/*------------------ KCYCLE --------------------*/  
	/*(thank's to http://www.malsup.com/jquery/cycle) */
	
	/* KCYCLE SLIDE */
	
	/* Funzione KCYCLE SCONTATISSIMI */
	
	$(function(){
			   
		var $prev = $('#kcycle_scontati_prev'),//prev button
			$next = $('#kcycle_scontati_next');//next button
		
		$('#kcycle_scontati_content').serialScroll({
			items:'li',
			prev:'img.prev',
			next:'img.next',
			axis:'x',
			duration:1000,
			force:true,
			stop:true,
			lock:false,
			easing:'easeOutQuart', //use this easing equation for a funny effect
			interval:0,
			//cycle:false, don't pull back once you reach the end
			exclude:3,
			onBefore:function( e, elem, $pane, $items, pos ){
				$prev.add($next).show();
				if( pos == 0 )
					$prev.hide();
				else if( pos == $items.length-4 )
					$next.hide();
			}
			//step:2, numero di oggetti da far girare
			//jump: true, click on the images to scroll to them
			//start:1, as we are centering it, start at the 2nd
		});
		
		
		$('#kcycle_scontati_content').hoverIntent(function(){
				$(this).trigger('stop');
			},function(){
				//$(this).trigger('start');
				
		});
		
				
	})
	
	$(function() {
		
		$('#kcycle_slide_content').cycle({ 
		fx:     'scrollDown',
		easing: 'easeInOutBack',
		timeout: 5000, 
		pager:  '#kcycle_slide_nav', 
		pagerAnchorBuilder: function(idx, slide) { 
		
			return '#kcycle_slide_nav li:eq(' + idx + ') a'; 
		} 
		});
		
	});
	
	/* KCYCLE LUNGHI 
	
	$(function() {
		
		$('#kcycle_new_content').cycle({ 
		fx:     'scrollHorz',
		easing: 'easeInOutBack',
		pause: 4500,
		timeout: 6500,
		next:   '#kcycle_new_next',
		prev:   '#kcycle_new_prev'
		});
		
	});
	
	$(function() {
		
		$('#kcycle_focus_content').cycle({ 
		fx:     'scrollHorz',
		easing: 'easeInOutBack',
		pause: 4500,
		timeout: 8000,
		next:   '#kcycle_focus_next',
		prev:   '#kcycle_focus_prev'
		});
		
	});*/
	
	
	
	/* KCYCLE SINGOLI 
	
	$(function() {
		
		$('#kcycle_single_corte_content').cycle({ 
		fx:     'shuffle',
		pause: 4500,
		timeout: 0,
		next:   '#kcycle_single_corte_next',
		prev:   '#kcycle_single_corte_prev',
		before:  onBefore_corte, 
		after:   onAfter_corte
		});
		
	});
	
	function onBefore_corte() { 
		$('#kcycle_single_corte_title').html("Loading ..."); 
	} 
	function onAfter_corte() { 
	
		var scontoAlt = $(this).attr("alt");
		$('#kcycle_single_corte_title').html(this.title);
		$('#kcycle_single_corte_sconto').html(scontoAlt);
	
	}
	
	$(function() {
		
		$('#kcycle_single_spot_content').cycle({ 
		fx:     'shuffle',
		pause: 4500,
		timeout: 0,
		next:   '#kcycle_single_spot_next',
		prev:   '#kcycle_single_spot_prev',
		before:  onBefore_spot, 
		after:   onAfter_spot
		});
		
	});
	
	function onBefore_spot() { 
		$('#kcycle_single_spot_title').html("Loading ..."); 
	} 
	function onAfter_spot() { 
		var spotAlt = $(this).attr("alt");
		$('#kcycle_single_spot_title').html(this.title);
		$('#kcycle_single_spot_sconto').html(spotAlt);
		 
	}
	
	
	$(function() {
		
		$('#kcycle_single_extra_content').cycle({ 
		fx:     'shuffle',
		pause: 4500,
		timeout: 0,
		next:   '#kcycle_single_extra_next',
		prev:   '#kcycle_single_extra_prev',
		before:  onBefore_extra, 
		after:   onAfter_extra
		});
		
	});
	
	function onBefore_extra() { 
		$('#kcycle_single_extra_title').html("Loading ..."); 
	} 
	function onAfter_extra() { 
	
		var thisAlt = $(this).attr("alt");
	
		if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) { 
		
		$('#kcycle_single_extrashop').html('<img src="http://img.virtuy.com/shop/logo_extra/'+ thisAlt + '.gif" border="0" />');
		
		} else {
		
		$('#kcycle_single_extrashop').html('<img src="http://img.virtuy.com/shop/logo_extra/'+ thisAlt + '.png" border="0" />');
		
		}
		
		$('#kcycle_single_extra_title').html(this.title);
	
	}*/
	
	
	$(function() {
		
		$('#kcycle_small_shop_content').cycle({ 
		fx:     'scrollHorz',
		pause: 4500,
		timeout: 0,
		next:   '#kcycle_small_shop_next',
		prev:   '#kcycle_small_shop_prev',
		before:  onBefore_shop, 
		after:   onAfter_shop
		});
	
		
	});
	
	function onBefore_shop() { 
		
		$('#kcycle_small_shop_title').html("Loading ..."/* + this.src*/); 
	} 
	function onAfter_shop() { 
	this.tip = $('#id1').title;
		$('#kcycle_small_shop_title').html(this.tip);
		 /*   .append('<h3>' + this.alt + '</h3>'); */
	}
	
	$(".kcycle_small_body").bind("mouseenter",function(){
		
			$('#kcycle_small_shop_hover').slideDown();
		
		
		}).bind("mouseleave",function(){
		
			$('#kcycle_small_shop_hover').slideUp();
		});
	
	


$(".pauseAll").click(function(){
					
			/*$('#kcycle_focus_content').cycle('pause');
			$('#kcycle_new_content').cycle('pause');*/
			$('#kcycle_scontati_content').trigger('stop');
						
});

/*$(".restartAll").click(function(){
					
			$('#kcycle_focus_content').cycle('resume');
			$('#kcycle_new_content').cycle('resume');
			$('#kcycle_scontati_content').trigger('start');
						
});*/
	

	

	
	
	
	
});/*--CHIUSURA DOCUMENT READY---*/