// 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()
{
	
	//apre i link in esterno in base all'url
	$("a.ext").click(function() {  
		window.open(this.href,'','');
		return false;
	}); 
	
	
	//animazione in apertura delle pagina

//il menu apertura e chiusura
//
//$(filter).animateClass(newClass,[oldClass], duration);





//	slide	
	$(function() {
				$('#gallery').cycle({ 
					fx:     'scrollHorz', 
					speed:  1500,  
					prev:   '#prevButton', 
					next:   '#nextButton', 
					//before:   onAfter,
					timeout: 0
				});
				/*function onAfter() {
					$('#output1').html(this.title);
				}*/
		});
	
	$(function() {
				$('#gallerydx').cycle({ 
					fx:     'scrollVert', 
					speed:  1500,  
					prev:   '#prevButton2', 
					next:   '#nextButton2', 
					//before:   onAfter,
					timeout: 0
				});
				/*function onAfter() {
					$('#output1').html(this.title);
				}*/
		});


	$(function() {
				$('#sgallcnt').cycle({ 
					fx:     'scrollHorz', 
					speed:  1500,  
					prev:   '#sprev', 
					next:   '#snext', 
					//before:   onAfter,
					timeout: 0
				});
				/*function onAfter() {
					$('#output1').html(this.title);
				}*/
		});

/*

		$(function() {
				$('#portgallery').cycle({ 
					fx:     'fade', 
					speed:  1500,  
					prev:   '#prev', 
					next:   '#next', 
					before:   onAfter,
					timeout: 0
				});
				function onAfter() {
					$('#output').html(this.title);
				}
		});
	
	
		$('#portslide') 
		.cycle({ 
			fx:     'turnDown', 
			speed:  'slow', 
			timeout: 0,
			pause:   1,
			pager:  '#paginate' 
		});
	
	

	//columnize
	$('#agdetail #txt').columnize({
						
						
						columns: 4, 
						lastNeverTallest:true 
						});
	$('#contenitore #txtartimg').columnize({
						width:150

						
						});

	
});


$("#m1").click( function() {
				$("#menualto ul li a").removeClass("active");
				$("#m1").addClass("active");		 
			if ($("#sm1").is(":hidden")) {
				$("#sm1").slideDown();
				$("#sm2").slideUp();
				$("#sm3").slideUp();
				$("#sm4").slideUp();
				$("#sm5").slideUp();
				$("#sm6").slideUp();
				$("#sm7").slideUp();
				$("#sm8").slideUp();

			} else {
				$("#m1 span").animateClass('off','act', 500 );		
				$("#sm1").slideUp();
			}


	$("#m1").click( function() {
			$("#m1").addClass("active");		 
			if ($("#sm1").is(":hidden")) {
				$("#sm1").slideDown(); /*sottomenu attivo*/
/*				$("#sm2").slideUp(); /*altri sottomenu*/
				

/*			} else {
				
				$("#sm1").slideUp(); /*altrimanti chiude il sottomenu*/
/*			}

}); 
*/
}); 


