/*
project: acee.hu
filename: acee.js
version: v3
owner: acee.hu
author: Akos Bozor aka. acee
*/

$(document).ready(function(){
	$("#socialLinks li a").hide();
	//fancy box
	$("a[rel=cpgroup]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=csernus]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=modelsw]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=nlvip]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=adultray]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=moneyverse]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=nl2]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=nlmobile]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=mvads]").fancybox({
		'overlayColor' : '#000',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	//Basic init
	$("#headerHolder, #mainContent, #worksListHolder, #resumeHolder, #aceePic").css({
		"opacity" : "0"
	});
	
	$("#nameTitle, #tagLine, #aboutMe").css({
		"right" : "46px",
		"opacity" : "0"
	});
	$("#headerHolder").delay(100).animate({
		opacity: "1"},
		400,
		"swing"
	);
	$("#mainContent").delay(400).animate({
		opacity: "1"},
		800,
		"swing"
	);
	$("#aceePic").delay(300).animate({
		opacity: "1"},
		800,
		"swing"
		);
	$("#nameTitle").delay(800).animate({
		right: "500px",
		opacity: "0.95"},
		800,
		"swing"
		);
	$("#tagLine").delay(850).animate({
		right: "497px",
		opacity: "0.9"},
		800,
		"swing"
		);
	$("#aboutMe").delay(900).animate({
		right: "427px",
		opacity: "1"},
		800,
		"swing"
		);
	$("#resumeHolder").delay(1600).animate({
		opacity: "1"},
		500,
		"swing"
		);
	$("#worksListHolder").delay(1400).animate({
		opacity: "1"},
		500,
		"swing"
		);
	
	$("#socialLinks li a#skype").delay(2800).fadeIn();
	$("#socialLinks li a#facebook").delay(2600).fadeIn();
	$("#socialLinks li a#gplus").delay(2300).fadeIn();
	$("#socialLinks li a#twitter").delay(2000).fadeIn();
	$("#socialLinks li a#cv").delay(1900).fadeIn();
	
	$(".bigThumb").mouseover(function(){
		$(this).find(".overEff").fadeIn("fast");
	});
	$(".bigThumb").mouseleave(function(){
		$(this).find(".overEff").fadeOut("fast");
	});
	
	$(".smallThumb").mouseover(function(){
		$(this).find(".overEff").fadeIn("fast");
	});
	$(".smallThumb").mouseleave(function(){
		$(this).find(".overEff").fadeOut("fast");
	});
});
