$(document).ready(function(){
	var img = $( ".port-img" );
	$(img).load(function () {
	    $(this).fadeIn();
	})
	
	// BEGIN TOOLTIP
	$('ul#utilnav a').qtip({
	hide: { effect: 'fade' },
	show: { effect: 'fade' },
	style: {
		'font-size': 11,
		'white-space':'nowrap',
		padding: 3,
		background: '#24ADE4',
		color: '#3a3a3a',
		textAlign: 'center',
		border: {
			width: 7,
			radius: 5,
			color: '#24ADE4'
		},
		tip: 'topMiddle',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style},
	},
	position: {
	  corner: {
	     target: 'bottomMiddle',
	     tooltip: 'topMiddle'
	  }
	}
	})
	// END TOOLTIP
	// BEGIN TOOLTIP
	$('a#logo').qtip({
	show: { effect: 'fade' },
	hide: { effect: 'fade' },
	style: {
		'font-size': 11,
		'white-space':'nowrap',
		padding: 3,
		background: '#24ADE4',
		color: '#3a3a3a',
		textAlign: 'center',
		border: {
			width: 7,
			radius: 5,
			color: '#24ADE4'
		},
		tip: 'bottomMiddle',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style},
	},
	position: {
	  corner: {
	     target: 'center',
	     tooltip: 'bottomMiddle'
	  }
	}
	})
	// END TOOLTIP
	// BEGIN TOOLTIP
	$('.portfolio-image a img').qtip({
	content: 'Open in Viewer',
	hide: { fixed: true },
	show: { effect: 'fade' },
	style: {
		'font-size': 11,
		'white-space':'nowrap',
		padding: 3,
		background: '#3a3a3a',
		color: '#24ADE4',
		textAlign: 'center',
		border: {
			width: 7,
			radius: 5,
			color: '#3a3a3a'
		},
		tip: 'bottomMiddle',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style},
	},
	position: {
	  corner: {
		target: 'center',
		tooltip: 'bottomMiddle'
	  },
	  adjust: { 
	  	y:20
	  }
	}
	})
	// END TOOLTIP
	// BEGIN TOOLTIP
	$('#footer a').qtip({
	show: { effect: 'fade' },
	hide: { effect: 'fade' },
	style: {
		'font-size': 11,
		'white-space':'nowrap',
		padding: 3,
		background: '#24ADE4',
		color: '#3a3a3a',
		textAlign: 'center',
		border: {
			width: 7,
			radius: 5,
			color: '#24ADE4'
		},
		tip: 'bottomMiddle',
	},
	position: {
	  corner: {
	     target: 'topMiddle',
	     tooltip: 'bottomMiddle'
	  }
	}
	})
	// END TOOLTIP
	// BEGIN TOOLTIP
	$('ul#team img').qtip({
	hide: { effect: 'fade' },
	show: { effect: 'fade' },
	style: {
		'font-size': 11,
		'white-space':'nowrap',
		padding: 3,
		background: '#24ADE4',
		color: '#3a3a3a',
		textAlign: 'center',
		border: {
			width: 7,
			radius: 5,
			color: '#24ADE4'
		},
		tip: 'bottomMiddle',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style},
	},
	position: {
	  corner: {
	     target: 'topMiddle',
	     tooltip: 'bottomMiddle'
	  }
	}
	})
	// END TOOLTIP
	$('a#feedback-btn').fancybox({
		'frameWidth': 700,
		'frameHeight': 500
	});
	$('a#client').fancybox({
		'frameWidth': 960,
		'frameHeight': 700
	});
	
	$('.sifr').sifr({
		path: '/assets/swf/',
		font: 'garamond-italic',
		build: 436,
		version: 3,
		width: 775,
		fixHover: true
	});
	$(document).pngFix();
	$.preloadCssImages();
})

function scrollToTop(){
    $('html, body').animate({
    scrollTop: $("#body").offset().top
    }, 2000);
}
clicky.init(170276);
