
/* ...... Fancybox ...... */

$(document).ready(function() {
								   
$("a#kuva1").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva2").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva3").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva4").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva5").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva6").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva7").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva8").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva9").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva10").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva11").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva12").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva13").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva14").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva15").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

$("a#kuva16").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});

	  });


/* ..... PAGE LOADER ..... */

$(window).load(function () {
	
	// Show element (ie ignores the fade animation, just shows it)
	$('#loader').fadeOut(900);
	
});	

/* ..... TWITTER ..... */


	$(function(){
	 $('#tweets').tweetable({username: 'Holmroos', time: false, limit: 1});
	});

/* ..... PAGE SCROLL ..... */


$(document).ready(function(){
$.localScroll({
		duration: 2000,
		axis:'y',
		easing: 'easeInOutQuart',
		offset: {top: 0}
	});
});

/* ..... WORKS SLIDER ..... */

$(function(){	
			$("#overscroll").overscroll();
		});

/* ..... WORKS THUMB FADER ..... */
    
$(document).ready(function(){
$(".works-image").fadeTo("slow", 0.2);
$(".works-image").hover(function(){
$(this).fadeTo("slow", 1.0);
},function(){
$(this).fadeTo("slow", 0.3);
});
});

/* ..... SLIDER HINT FADER ..... */

$(document).ready(function(){
$(".drag-hint").hide(); // This sets the opacity of the thumbs to fade down to 30% when the page loads
$("#overscroll").hover(function(){
$(".drag-hint").fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
},function(){
$(".drag-hint").fadeTo("slow", 0.0); // This should set the opacity back to 30% on mouseout
});
});

/* ..... MENU ANIMATION ..... */

$(function(){
	// Vertical
	$("#vertical div").hover(function(){
		$("img", this).stop().animate({top:"-32px"},{queue:false,duration:100});
	}, function() {
		$("img", this).stop().animate({top:"0px"},{queue:false,duration:100});
	});
});

$(function(){
	// Vertical
	$("#vertical2 div").hover(function(){
		$("img", this).stop().animate({top:"-32px"},{queue:false,duration:100});
	}, function() {
		$("img", this).stop().animate({top:"0px"},{queue:false,duration:100});
	});
});

$(function(){
	// Vertical
	$("#vertical3 div").hover(function(){
		$("img", this).stop().animate({top:"-32px"},{queue:false,duration:100});
	}, function() {
		$("img", this).stop().animate({top:"0px"},{queue:false,duration:100});
	});
});


/* ..... HIDE AND SHOW SOME STUFF ..... */

$(document).ready(function() {
	$(".html-skills").hide();
	$("#skills_button").click(function() {
		$(".html-skills").animate({width: "toggle"}, 2000);
	});
	
	$(".html-gweb").hide();
	$("#skills_button").click(function() {
		$(".html-gweb").animate({width: "toggle"}, 2500);
	});
	
	$(".html-gprint").hide();
	$("#skills_button").click(function() {
		$(".html-gprint").animate({width: "toggle"}, 3000);
	});
	
	$(".html-php").hide();
	$("#skills_button").click(function() {
		$(".html-php").animate({width: "toggle"}, 2500);
	});
	
	$(".html-js").hide();
	$("#skills_button").click(function() {
		$(".html-js").animate({width: "toggle"}, 2000);
	});
	
	$(".html-cms").hide();
	$("#skills_button").click(function() {
		$(".html-cms").animate({width: "toggle"}, 2500);
	});
	
	$(".html-cake").hide();
	$("#skills_button").click(function() {
		$(".html-cake").animate({width: "toggle"}, 2000);
	});

	$(".twitter").hide();
	$("#twitter").click(function() {
		$(".twitter").animate({height: "toggle"}, 500);
	});
	
	$(".twitter2").hide();
	$("#twitter2").click(function() {
		$(".twitter2").animate({height: "toggle"}, 500);
	});
	
		$(".twitter3").hide();
	$("#twitter3").click(function() {
		$(".twitter3").animate({height: "toggle"}, 500);
	});
});
