var polys = {

		alberto : 		[ [0,82],[2,77],[12,77],[9,60],[20,31],[37,25],[34,11],[46,4],[59,8],[59,22],[79,31],[91,65],[85,77],[96,77],[99,82],[0,82] ],
		alessandrod :	[ [0,82],[0,57],[14,26],[37,21],[37,5],[49,0],[62,6],[59,19],[82,26],[97,68],[90,77],[97,77],[99,82],[0,82] ],
		alessia   : 	[ [1,82],[2,77],[14,77],[11,65],[22,37],[39,33],[29,20],[41,11],[58,15],[61,32],[78,37],[90,60],[82,77],[97,77],[100,82],[1,82] ],
		carlo : 		[ [0,82],[2,77],[17,77],[5,56],[16,35],[37,27],[37,12],[48,8],[60,12],[59,27],[81,35],[91,57],[80,77],[97,77],[98,83],[0,82] ],
		federico : 		[ [0,82],[3,53],[18,31],[34,26],[38,8],[50,5],[59,7],[64,25],[82,31],[95,52],[99,83],[0,82] ],
		francescagar : 	[ [0,82],[2,77],[8,77],[20,38],[35,33],[33,23],[37,15],[51,12],[65,22],[63,35],[74,36],[86,76],[96,77],[100,82],[0,82] ],
		// francescagas : 	[ [0,82],[2,77],[13,76],[22,38],[31,34],[35,18],[49,13],[62,25],[61,34],[75,38],[88,77],[96,77],[99,82],[0,82] ],
		// giorgio : 		[ [1,82],[2,77],[8,77],[16,32],[35,24],[31,17],[40,5],[55,5],[65,16],[60,23],[79,29],[92,77],[96,77],[99,82],[1,82] ],
		luca : 			[ [0,82],[3,56],[16,34],[38,27],[37,13],[50,9],[62,13],[60,27],[81,33],[98,68],[99,82],[0,82] ],
		nicola : 		[ [0,82],[18,31],[36,25],[35,12],[48,2],[65,9],[62,25],[81,29],[99,82],[0,82] ],
		simonec : 		[ [0,82],[2,77],[10,77],[6,55],[17,30],[37,26],[37,7],[49,4],[61,9],[62,25],[82,29],[93,55],[91,77],[96,77],[99,82],[0,82] ],
		//simonem: 		[ [0,82],[2,77],[8,77],[18,31],[35,27],[37,8],[49,2],[60,8],[62,26],[79,32],[90,77],[97,77],[99,82],[0,82] ],
		mattia: 		[ [0,82],[2,77],[21,77],[23,62],[15,55],[22,34],[43,26],[39,10],[51,6],[62,10],[62,25],[81,32],[88,55],[76,63],[77,77],[96,77],[99,82],[0,82] ],
		micaela: 		[ [1,83],[2,77],[11,77],[6,61],[20,36],[40,32],[41,27],[28,21],[41,10],[66,12],[74,21],[63,27],[62,31],[82,34],[91,58],[88,77],[97,77],[99,82],[1,83] ],
		//antonio:		[ [0,82],[2,77],[14,77],[5,50],[18,32],[37,26],[37,10],[48,6],[60,10],[62,26],[84,31],[95,63],[91,77],[96,78],[100,81],[0,82] ],
		//lora:			[ [0,82],[2,77],[14,77],[21,34],[38,29],[37,12],[52,7],[66,13],[62,29],[79,34],[86,77],[96,77],[99,82],[0,82] ],
		chiara:			 [ [1,99],[2,92],[18,92],[25,77],[21,41],[31,33],[37,11],[50,7],[62,11],[69,32],[82,39],[73,69],[72,92],[98,94],[98,98],[1,99] ],
		mauro:			 [ [1,99],[2,93],[18,92],[5,63],[18,38],[40,32],[34,17],[50,7],[62,13],[61,31],[81,40],[94,66],[79,92],[96,93],[99,99],[1,99] ],

		francesco : 	 [ [0,83],[2,77],[18,76],[9,49],[19,31],[41,23],[35,10],[50,2],[66,8],[63,26],[85,33],[90,61],[77,63],[76,77],[96,77],[99,82],[0,83] ],
//		giorgia : 		[	[0,99],[1,92],[5,92],[6,72],[18,41],[39,37],[32,29],[33,18],[42,11],[54,12],[63,23],[65,35],[75,40],[83,43],[93,92],[97,92],[99,98],[0,99]],
//		simona : 		[	[0,99],[2,92],[8,92],[19,38],[29,33],[24,30],[32,13],[50,7],[60,13],[69,28],[79,35],[91,91],[97,93],[99,99],[0,99]],
//		antonio: 		[	[1,99],[2,92],[8,92],[18,38],[40,28],[38,9],[50,3],[62,11],[59,29],[80,39],[90,92],[97,93],[99,98],[1,99]		]

		matteom :  [ [1,99],[2,93],[6,93],[7,64],[14,42],[32,34],[37,27],[36,12],[49,4],[60,12],[60,27],[67,35],[83,42],[95,80],[90,92],[97,93],[98,98],[1,99] ]

	},
	images_data = {
		
		'depace_alessandro.png':{
			poly : polys.alessandrod,
			classe : 'car3d',
			alt : '3_0_8_2',
			desc :{
				nome:'Alessandro',
				role:'Web department'
			},
			maxim:{
				it:['Bisogna diffidare dei tecnici, cominciano con la macchina per cucire e finiscono con la bomba atomica.<br/><i style="font-size:11px">Marcel Pagnol, Critica dei critici, 1949</i>','Ogni tecnologia sufficientemente avanzata è indistinguibile dalla magia.'],
				en:['One has to watch out for engineers - they begin with the sewing machine and end up with the atomic bomb.<br/><i style="font-size:11px">Marcel Pagnol, Critiques des Critiques, 1949</i>','Any sufficiently advanced technology is indistinguishable from magic.']
			},
			shape:'alessandro.png'
		},
		'mason_francesco.png':{
			poly : polys.francesco,
			classe : 'car3d',
			alt : '2_5_1_8',
			desc :{
				nome:'Francesco',
				role:'Account'
			},
			maxim:{
				it:['Non capiremo mai abbastanza quanto bene è capace di fare un sorriso.<br/><i style="font-size:11px">Madre Teresa di Calcutta</i>','Abbiate il coraggio di seguire il vostro cuore e la vostra intuizione. In qualche modo loro sanno che cosa volete realmente diventare.<br/><i style="font-size:11px">Steve Jobs</i>'],
				en:['We will never understand all the good that a simple smile can accomplish.<br/><i style="font-size:11px">Mother Teresa of Calcutta</i>','Have the courage to follow your heart and intuition. They somehow already know what you truly want to become.<br/><i style="font-size:11px">Steve Jobs</i>']
			},
			shape:'francesco.png'
		},
		
		'carpanese_simone.png':{
			poly : polys.simonec,
			classe : 'car3d',
			alt : '9_9_1_4',
			desc :{
				nome:'Simone',
				role:'Seo specialist'
			},
			maxim:{
				it:['S.E.O. : Soluzioni E Opportunità','Chi dice che l\'importante è partecipare, non è mai arrivato primo'],
				en:['S.E.O. : Solutions & Opportunity','Who says that\'s important is to participate, it\'s never come first']
			},
			shape:'simone-c.png'
		},
		'baracco_alessia.png':{
			poly : polys.alessia,
			classe : 'car3d',
			alt : '6_4_2_4',
			desc :{
				nome:'Alessia',
				role:'Administration'
			},
			maxim:{
				it:['L\'aritmetica ha un grande potere nell\'elevare la mente costringendola a ragionare intorno a numeri astratti. <br/><i style="font-size:11px">Platone</i> ','L\'esperienza &eacute; il tipo di insegnante pi&ugrave; difficile. Prima ti fa l\'esame, e poi ti spiega la lezione. <br/><i style="font-size:11px">Anonimo</i> '],
				en:['The arithmetic has a very great effect, compelling the soul to reason about abstract number.<br/><i style="font-size:11px">Plato</i> ','Experience is the hardest kind of teacher. It gives you the test first and the lesson afterward. <br/><i style="font-size:11px">Author Unknown</i> ']
			},
			shape:'alessia.png'
		},
		'baracco_alberto.png':{
			poly : polys.alberto,
			classe : 'car3d',
			alt : '1_10_1_9',
			desc :{
				nome:'Alberto',
				role:'SEM Specialist'
			},
			maxim:{
				it:['Risultati concreti e misurabili','L\'ascolto, la prima attività di marketing'],
				en:['concrete and measurable results','Listening, the first marketing activity']
			},
			shape:'alberto.png'
		},
		/*
		'gaspari_francesca.png':{
			poly : polys.francescagas,
			classe : 'car3d',
			alt : '6_4_6_10',
			desc :{
				nome:'Francesca',
				role:'Content department'
			},
			maxim:{
				it:['Ci sono due cose che non tornano mai indietro: una freccia scagliata e un\'occasione perduta.','Abbiamo quaranta milioni di ragioni per fallire, ma non una sola scusa.  <br/><i style="font-size:11px">Rudyard Kipling</i>'],
				en:['','']
			},
			shape:'francesca.png'
		},
		*/
		/*
		'martello_giorgio.png':{
			poly : polys.giorgio,
			classe : 'car3d',
			alt : '2_1_8_3',
			desc :{
				nome:'Giorgio',
				role:'Web department manager'
			},
			maxim:{
				it:['`Divide et impera` scomporre ogni problema in sottoproblemi più semplici','"Sono il signor Wolf. Risolvo problemi." <i style="font-size:11px">Pulp Fiction</i>'],
				en:['`Divide and conquer` break the problem down into smaller bits and solve each bit at a time','I`m Mr. Wolf. I solve problems. <i style="font-size:11px">Pulp Fiction</i>']
			},
			shape:'giorgio.png'
		},
		*/
		'ghedina_federico.png':{
			poly : polys.federico,
			classe : 'car3d',
			alt : '1_0_4_2',
			desc :{
				nome:'Federico',
				role:'Thecnical department manager'
			},
			maxim:{
				it:['Siamo il mare in tempesta, il nostro amore non conosce confini e travolge tutto quello che trova.','L`immaginazione è più importante della conoscenza. <br/><i style="font-size:11px">A.Einstein</i>'],
				en:['We are the stormy sea, our love knows no bounds and overwhelms everything it finds.','Imagination is more important than knowledge. <br/><i style="font-size:11px">A.Einstein</i>']
			},
			shape:'fede.png'
		},
		'bruno_nicola.png':{
			poly : polys.nicola,
			classe : 'car3d',
			alt : '10_2_10_5',
			desc :{
				nome:'Nicola',
				role:'Seo manager'
			},
			maxim:{
				it:['Stiamo cercando commerciali a Milano: mandaci il tuo curriculum!','Seo specialist cercasi: mandaci il tuo curriculum!'],
				en:['we are looking for business in Milan: Send us your resume!','SEO Specialist Wanted: Send us your resume!']
			},
			shape:'nicola.png'
		},
		'garofolin_francesca.png':{
			poly : polys.francescagar,
			classe : 'car3d',
			alt : '0_0_8_4',
			desc :{
				nome:'Francesca',
				role:'Web designer'
			},
			maxim:{
				it:['Le rose sono #FF0000, le viole sono #0000FF..','“La semplificazione è il segno dell’intelligenza. Complicare è facile, semplificare è difficile…” <br/><i style="font-size:11px">Bruno Munari</i>'],                   
				en:['Roses are #FF0000, violets are #0000FF.','Simplification is a sign of intelligence, to complicate is easy to simplify is hard.<br/><i style="font-size:11px">Bruno Munari</i>']
			},
			shape:'franca.png'
		},
		'ferri_luca.png':{
			poly : polys.luca,
			classe : 'car3d',
			alt : '6_5_9_6',
			desc :{
				nome:'Luca',
				role:'seo department'
			},
			maxim:{
				it:['In ogni attività la passione toglie gran parte della difficoltà.','Il talento da solo vale poco. Ciò che separa il talentuoso dalla persona di successo è il duro lavoro.'],
				en:['In every activity passion removes a large part of the difficulty','Talent alone is worth little. What separates the talented individual from the successful is hard work']
			},
			shape:'luca.png'
		},
		'noventa_carlo.png':{
			poly : polys.carlo,
			classe : 'car3d',
			alt : '2_9_0_9',
			desc :{
				nome:'Carlo',
				role:'Account manager'
			},
			maxim:{
				it:['Il raggiungimento di obiettivi non ha bisogno di spiegazioni. Disattenderli non ne ammette.','mai davanti , mai dietro , ma sempre al vostro fianco'],
				en:['The achievement of goals does not need to explain. Disregard does not admit','never before, never behind, but always by your side']
			},
			shape:'carlo.png'
		},
		/*
		'marcato_simone.png':{
			poly : polys.simonem,
			classe : 'car3d',
			alt : '3_1_8_4',
			desc :{
				nome:'Simone',
				role:'Thecnical department'
			},
			maxim:{
				it:['La nostra più grande fonte di ispirazione sono le persone','Sono gli ostacoli e le difficoltà che ci fanno crescere'],
				en:['Our greatest inspiration is people','Are the obstacles and difficulties that make us grow']
			},
			shape:'simone-m.png'
		},
		*/
		'lissi_mattia.png':{
			poly : polys.mattia,
			classe : 'car3d',
			alt : '3_2_3_8',
			desc :{
				nome:'Mattia',
				role:'Social Media Analyst'
			},
			maxim:{
				it:['Le diversità caratterizzano l\'essere umano, la rete permette di esaltare la propria identità','Il web 2.0 è interazione, condivisione e collaborazione'],
				en:['The differences characterize the human being, the network can enhance its identity','Web 2.0 is interaction, sharing and collaboration']
			},
			shape:'mattia.png'
		},
		'degregorio_micaela.png':{
			poly : polys.micaela,
			classe : 'car3d',
			alt : '3_4_2_6',
			desc :{
				nome:'Micaela',
				role:'Web marketing account'
			},
			maxim:{
				it:['Loro dicono: mi faccia un Progetto. Io rispondo loro: Lo Realizzi.','La difficoltà a volte è frenare la mia creatività. Ma la mia creatività è il mio punto di forza. Decisamente.'],
				en:['They say me: make us a project. I say them: you realize it.','The difficulty sometimes could stop my creativity. But creativity is my strong point. Definitely.']
			},
			shape:'micaela.png'
		},
		/*
		'rugoletto_antonio.png':{
			poly : polys.antonio,
			classe : 'car3d',
			alt : '0_1_2_9',
			desc :{
				nome:'Antonio',
				role:'Account executive'
			},
			maxim:{
				it:['Site By Site - Freedom To Improvement','Sempre al tuo fianco in ogni momento'],
				en:['','']
			},
			shape:'antonio.png'
		}
		
		,'vakanova_lora.png':{
			poly : polys.lora,
			classe : 'car3d',
			alt : '3_2_1_3',
			desc :{
				nome:'Lora',
				role:'Seo junior'
			},
			maxim:{
				it:['We all speak the same language - internet','Above all boundaries there is only Internet.'],
				en:['We all speak the same language - internet','Above all boundaries there is only Internet.']
			},
			shape:'lora.png'
		},
		*/
		'matteo_manfrin.png':{
			poly : polys.matteom,
			classe : 'car3d',
			alt : '2_0_8_2',
			desc :{
				nome:'Matteo',
				role:'Thecnical department'
			},
			maxim:{
				it:['l\'informazione rende liberi e la rete è l\'informazione','meglio un errore in compilazione oggi che un errore di logica domani'],
				en:['The information make us free and the network is the information','Better a compiler error today that an error of logic tomorrow']
			},
			shape:'matteo.png'
		},
		'mauro.png':{
			poly : polys.mauro,
			classe : 'car3d',
			alt : '4_3_4_4',
			desc :{
				nome:'Mauro',
				role:'Seo junior'
			},
			maxim:{
				it:['"Personality is the unique, authentic, and talkable soul of your brand that people can get passionate about." <br/><i style="font-size:11px">Rohit Bhargava</i>','"L’insegna la fa la clientela" <br/><i style="font-size:11px">Jean De La Fontaine</i>'],
				en:['"Personality is the unique, authentic, and talkable soul of your brand that people can get passionate about." <br/><i style="font-size:11px">Rohit Bhargava</i>','"The sign brings customer" <br/><i style="font-size:11px">Jean De La Fontaine</i>']
			},
			shape:'mauro.png'
		},
		'chiara.png':{
			poly : polys.chiara,
			classe : 'car3d',
			alt : '4_3_4_4',
			desc :{
				nome:'Chiara',
				role:'junior social media specialist'
			},
			maxim:{
				it:['"Captatio benevolentiae? Oggi si chiama capacità di comunicare" <br/><i style="font-size:11px">Emilio Rega</i>','"Comunicare significa creare negli altri un\'esperienza, coinvolgerli fin nelle viscere e questa è un\'abilità emotiva" <br/><i style="font-size:11px">Daniel Goleman</i>'],
				en:['"Captatio benevolentiae? Today it is called ability to communicate"<br/><i style="font-size:11px">Emilio Rega</i>','"Communicate means to create in the other\'s expertise, involve them in the bowels, and this is a emotional skills" <br/><i style="font-size:11px">Daniel Goleman</i>']
			},
			shape:'chiara.png'
		}
		
//		'segatto_alessandro.png':{	poly : polys.alessandros,	classe : 'car3d',	alt : '3_5_5_10', desc :{nome:'Alessandro',	role:'Account executive'},						maxim:{it:'',en:''}},
//		'roccato_giorgia.png':{		poly : polys.giorgia,		classe : 'car3d',	alt : '7_3_5_10', desc :{nome:'Giorgia',	role:'Account executive'},						maxim:{it:'',en:''}},
//		'zanon_simona.png':{		poly : polys.simona,		classe : 'car3d',	alt : '8_1_7_10', desc :{nome:'Simona',		role:'Telemarketing'},							maxim:{it:'',en:''}},
//		'rugoletto_antonio.png':{		poly : polys.antonio,			classe : 'car3d',	alt : '0_0_0_0', desc :{nome:'Antonio',		role:'Account Junior'},						maxim:{it:'',en:''}}
	},
	options = {
		innerclass : 'car3d',
		radiusX : 160,
		radiusY : 110,
		centerX : 233,
		centerY : 122,
	
		//optional ...by default 200, 20...really better if set proportionally to images
		/*
		max_width:214,//177,//237
		max_height:333,//272,//370
		* */
		max_width:214,//177,//237
		max_height:400,//272,//370
		min_max_ratio : 10,
	
		speed : 0.08,
	
		titles:{
			next:'next >»',
			prev:'«< prev'
		},
		before_click : function(e){},
		after_click : function(e){},

		//default true 
		autostart:true,
		//autostart parameters
		auto_rotate_timeout:4,
		restart_after:10,
	
		//default cw
		start_versus:'ccw',
	
		//	load panel option (default value is true)
		load_panel : true,
	
		//	invert panel button click versus (default not invert: left=cw, right=ccw)
		invert : true,
	
		//randomize order(default value is false)
		rand_order: true,
	
	
		// show all front item? (true)
		show_all : false,
		//if false how many (3)
		show_num : 2,
	
	
		// activate debug() ???
		debug : false,
		base_path : '/images/sbs/',
		img_path : '',
				
		image_base_id : 'sec_',
	
		//
		dbg_class : 'all',
		//to evidence the first one (using sub bw folder for the others)
		evidence_first : true,
		enable_wheel : true,
        enable_keyboard: true

	},
	clk_callback = function(that){

		jQuery('#point').removeAttr('style');
		//do not chain
		jQuery('#point').attr({
			'src':'/images/skillnew.php?v=' + that.attr('alt'),
			'height':'89',
			'width':'200'			
		});
		
		var ingname = that.find('img').attr('src').split('/').pop();
		var attrs = images_data[ingname].desc;
		
		jQuery('#player').html('Selected Player: '+attrs.nome);
		jQuery('#role').html('Role: '+attrs.role);
		jQuery('#home-frase .author-row').html(attrs.nome+', '+attrs.role);
		
		var maxims = images_data[ingname].maxim;
		switch(location.pathname.split('/')[1]){
			case 'it':
				var maxim = maxims.it[Math.floor(Math.random()*2)];
			break;
			case 'en':
				var maxim = maxims.en[Math.floor(Math.random()*2)];
			break;
			default:
				var maxim = maxims.en[Math.floor(Math.random()*2)];
			break;
		}
		
		jQuery('#home-frase>h2').html(maxim);
		jQuery('#maschera').html('<img src="'+options.base_path+'shapes/'+images_data[ingname].shape+'" alt="selected player"/>');
		

	};

jQuery(function(){
	jQuery('#3dcarousel').jQuery_3d_carousel(options, images_data, clk_callback);
});

