/**
 * @author Fabio Terlizzi
 * 
 * Codice che di base utilizza strumenti della libreria 
 * Jquery Tools - http://flowplayer.org/tools/index.html
 */

//JQUERY CODE
			// execute your scripts when the DOM is ready. this is a good habit 
			$(function() {
				
				
				// Corner Pageflip
				$("#pageflip").hover(function() { //On hover...
					$("#pageflip img , .msg_block").stop()
						.animate({ //Animate and expand the image and the msg_block (Width + height)
							width: '307px',
							height: '319px'
						}, 500);
					} , function() {
					$("#pageflip img").stop() //On hover out, go back to original size 50x52
						.animate({
							width: '50px',
							height: '52px'
						}, 220);
					$(".msg_block").stop() //On hover out, go back to original size 50x50
						.animate({
							width: '50px',
							height: '50px'
						}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
				}); 
			 
			 
		    // JqueryTools area clienti expose
		    // assign a click event to the exposed element, using normal jQuery coding 				
		    $("#area_clienti").click(function() { 
		        // perform exposing for the clicked element					
		        $(this).expose({color:'#445566'});
		    }); 
				
				
				// JqueryTools overlay su immagini Tekmar news
				$("a[rel]").overlay({  
			        // custom expose settings 
			        expose: { 
						color:'#445566',
			            opacity: 0.7, 						
			            closeSpeed: 1000 
			        }
			    }); 
				
				// JqueryTools: scrollable su Tekmar news div				
				// initialize scrollable  
			    $("div.scrollable").scrollable({ 
			        vertical:true,					
					circular: true,
					mousewheel: true,
					// when seek starts make items little transparent
					onBeforeSeek: function() {
						this.getItems().fadeTo(300, 0.2);
					},
					// when seek ends resume items to full transparency
					onSeek: function() {
						this.getItems().fadeTo(300, 1);
					} 
			    }).autoscroll();	
			    
			    $.tools.validator.localize("it", {
            ':email'      : 'Inserisci un indirizzo email valido',
            ':number'     : 'Inserisci un valore numerico',
            '[max]'     : 'Inserisci un valore minore di $1',
            '[min]'     : 'Inserisci un valore maggiore di $1',
            '[required]'  : 'Campo obbligatorio'
          });	
          			    
			    
			    /*
			     * VALIDAZIONE FORM
			     * 
			     */
			     //$("#login_mhd").validator();

				
												
			});	// fine JQUERY CODE

