// JavaScript Document
// file di configurazione script per mediatrading




//shadow box
Shadowbox.init({
    language:   "it",
    players:  ['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'],
	enableKeys:			true,
	continuous:			true
 
   
});

$(document).ready(function()
{
//attiva  pngfix 
$(document).pngFix();

	//apre i link in esterno in base all'url
	$("a.ext").click(function() {  
		window.open(this.href,'','');
		return false;
	}); 
	
	

//gestiamo radio button $ chekbox

$("label:has(input[type='radio'])").addClass('radio');
$("label:has(input[type='checkbox'])").addClass('check');

//il primo ed ultimo fieldset
$("fieldset:first").addClass('first');
$("fieldset:last").addClass('last');

//i campi hidden
$("input[type='hidden']").css('display','none');





//	slide	
		$(function() {
			$('#eslide').cycle({ 
				fx:     'fade', 
				pager:	'#pager',
	 			cleartype:  1, // enable cleartype corrections
				pause:      1,     // true to enable "pause on hover" 
				timeout: 6000
			});
	});
	
	


//slide foto articoli
$(function() {
			$('#immcnt').cycle({ 
			  fx:     'scrollHorz', 
			  prev:   '#prev', 
    		  next:   '#next', 
    		  timeout: 0 
			});
	});


//slide foto prodotti
$(function() {
			$('#immcnt2').cycle({ 
			  fx:     'scrollHorz', 
			  prev:   '#prev2', 
    		  next:   '#next2', 
    		  timeout: 0 
			});
	});


//gestisco la visualizzazione dei prodotti

$('.vsmall').click(
				function(){
				$('.prodotti').removeClass( 'grandi' );
				$('.vbig').removeClass( 'act' );
				$('.vsmall').addClass ('act');				
			  });

$('.vbig').click(
				function(){
				$('.prodotti').addClass( 'grandi' );  
				$('.vsmall').removeClass( 'act' );
				$('.vbig').addClass ('act');				
				});



//slide correlati

$(function() {
			$('#contcorrelati').cycle({ 
			  fx:     'scrollVert', 
			  prev:   '#prev', 
    		  next:   '#next', 
    		  timeout: 0 
			});
	});



	

	//columnize
	/*$('#testo').columnize({
						width:352						
						});*/

	
	 
	 //gallery prodotti
	 $('ul.gallery a').click(
						function(){
						$("#shower a").attr({ 
								  href: this.href,
								  title: "jQuery"
								  
								});
								return false;				
					  });
	 

//tooltip per il carrello
	
	$(".cpr a").tooltip({
	track: true,
	delay: 0,
	showURL: false,
	fixPNG: true,
	showBody: " - ",
	extraClass: "pretty fancy",
	top: -15,
	left: 5

	});


});


