$(document).ready(function() { 
	$().piroBox({
			my_speed: 600, //animation speed
			bg_alpha: 0.5, //background opacity
			radius: 4, //caption rounded corner
			scrollImage : true, // true == image follows the page, false == image remains in the same open position
			pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
			pirobox_prev : 'piro_prev',// Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
			close_all : '.piro_close, .piro_overlay',// add class .piro_overlay(with comma)if you want overlay click close piroBox
			slideShow : 'slideshow', // just delete slideshow between '' if you don't want it.
			slideSpeed : 4 //slideshow duration in seconds(3 to 6 Recommended)
	});

	$(window).load( function() {
		$('img.speed1').animate({width:180, height: 80, marginTop: 0, marginLeft: 0} , 500);
		$('img.speed2').animate({width:180, height: 80, marginTop: 0, marginLeft: 0} , 1200);
		$('img.speed3').animate({width:180, height: 80, marginTop: 0, marginLeft: 0} , 1500);
	});


	$('div.contactElementContainer').qtip({
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			},
			adjust: {
				x:0,
				y:0
			}
		},
		show: 'mouseover',
		hide: 'mouseout',
		style: {
			width: {
				max: 220
			},
			border: {
				width: 3,
				radius: 3,
				color:'#424f6e'
			},
			tip : true,
			fontSize:11
		},
		show : {
			effect : {
				length:500,
				type:'fade'
			}
		},
		hide : {
			effect : {
				length:500,
				type:'fade'
		}
		}
	});
	$("div.contactElementContainer").hover(function () {
		var idName = $(this).attr('id');
		var id = idName.split("_");
		id = id[1];

		var $hover = $('#hover_' + id);
		var $normal = $('#normal_' + id);
		
		if ($hover.is(":animated") || $normal.is(":animated")) {
			return;
		}

		$normal.fadeOut(500);
		$hover.fadeIn(500);
	}, 
	function () {
		var idName = $(this).attr('id');
		var id = idName.split("_");
		id = id[1];

		var $hover = $('#hover_' + id);
		var $normal = $('#normal_' + id);

		$normal.fadeIn(500);
		$hover.fadeOut(500);
		}
	);
});

function loadScreenshots() {
	$("#firstScreenshot").click();
	return false;
}
