// JavaScript Document
$(document).ready(function() {
	$('.icon[title]').qtip({
		position: {
			corner: {
				tooltip: 'bottomRight', 
				target: 'topMiddle'
			}
		},
		style: {
			border: {
				width: 3,
				radius: 0
			},
			tip: {
				color: '#FFF'
			},
			padding: 10, 
			textAlign: 'center',
            tip: true,
		 name: 'light',
		 'font-size': '14px' 

		}
	});
	$('.altreicone a[rel] img').qtip({
		content:'click to zoom',
		position: {
			corner: {
				tooltip: 'rightMiddle', 
				target: 'leftMiddle'
			}
		},
		style: {
			border: {
				width: 3,
				radius: 0
			},
			tip: {
				color: '#FFF'
			},
			padding: 10, 
			textAlign: 'center',
            tip: true,
		 name: 'dark',
		 'font-size': '12px' 

		}
	});
	
	$('.download a[title]').qtip({
		position: {
			corner: {
				tooltip: 'bottomMiddle', 
				target: 'topMiddle'
			}
		},
		style: {
			border: {
				width: 3,
				radius: 0
			},
			tip: {
				color: '#FFF'
			},
			padding: 10, 
			textAlign: 'center',
            tip: true,
		 name: 'dark',
		 'font-size': '12px' 

		}
	});
	
	$('.altreicone a').append('<span class="zoom"></span>');
	$('.icon').fadeTo(0, 0.65);
	$('.zoom').fadeTo(0, 0.5);
	$('.altreicone a').mouseenter(function(){
			$('.zoom',this).fadeTo(200, 1);				   
			}).mouseleave(function(){
			$('.zoom',this).fadeTo(200, 0.5);				   
			})
	$('.icon').mouseenter(function(){
			$(this).fadeTo(200, 1);				   
			}).mouseleave(function(){
			$(this).fadeTo(200, 0.65);				   
			});
	$('p.download a').mouseenter(function(){
			$(this).css({'border': '1px solid #636466', 'background-color':'#fff'});				   
			}).mouseleave(function(){
			$(this).css({'border': '1px solid #e0e7ec', 'background-color': ''});			   
			});
	
});
