$(document).ready(function(){
	$('.showcaseLink').css({
					background: 'transparent url(_img/sfondoSemi.png) repeat scroll 0 0',
					position: 'relative',
					bottom: '20px',
					left: '1px',
					color: '#fff',
					display: 'none',
					width: '235px'
				});
	$('.showcase, .showcase *').bind('mouseenter',function(){
										//console.log($(this).children('.showcaseLink').attr('id'));
										var id=$(this).children('.showcaseLink').attr('id');
										//alert(id);
										var tipo_titolo = id.split('-'); 
										var titolo = '';
										for(x in tipo_titolo){
											if(x>0 && x<2) titolo += tipo_titolo[x];
											if(x>=2) titolo += '-'+tipo_titolo[x];
										}
										if(titolo.length > 30){
											titolo = titolo.substring(0,30) + '...';
										}
										switch(tipo_titolo[0]) { 
										   case 'I': {
										   var immagine='_img/dot_W-tb.png';
											break;
										}
										   case 'G': {
										   var immagine='_img/dot_G-tb.png';
											break;
										}
										   case 'M': {
										   var immagine='_img/dot_M-tb.png';
											break;
										}
										}
										//if(window.console) console.log(titolo);
										
										$(this).children('.showcaseLink').html("<img style='padding-top:2px' src='"+immagine+"'> "+titolo);
										$(this).children('.showcaseLink').show(300);
									});
	$('.showcase').bind('mouseleave',function(){
										//console.log($(this).children('a').attr('href'));
										$(this).children('.showcaseLink').hide(100);
									});
				});

