$(window).load(function () {
    $.localScroll.defaults.axis = 'x';
    $.localScroll();
});
	
$(document).ready(function () {
    $("#contactform").validate();
	
    jQuery.event.add(window, "load", resizeFrame);
    jQuery.event.add(window, "resize", resizeFrame);

    function resizeFrame() {
        var h = $(window).height();
		// var w = $(window).width();
		
		$("article").css({'height':(h-200)+'px'});
		
		/* if (w < 1024) {
			$("article").css({'width':(w-60)+'px'});
		} else {
			$("article").css({'width':(1024)+'px'});
		} */
    }
	
    $('#pd').hide();
    $('#pb-sugino-blog').hide();
	$('#pb-stlto').hide();
	$('#pb-garston-motors').hide();
    $('#pb-140-keystrokes').hide();
    $('#pb-genuine-sound-team').hide();
    $('#pb-autobahr').hide();
    $('#pb-tru-performance-nutrition').hide();
    $('#pb-steven-brenner').hide();
    $('#pb-html5').hide();
    $('#sugino-blog').hide();
	$('#stlto').hide();
	$('#garston-motors').hide();
    $('#140-keystrokes').hide();
    $('#genuine-sound-team').hide();
    $('#autobahr').hide();
    $('#tru-performance-nutrition').hide();
    $('#steven-brenner').hide();
    $('#html5').hide();
    $('.turnOnDetails').click(function () {
        $('#pd').fadeIn(1000);
        return false
    });
    $('.returnToPortfolio').click(function () {
    	$('#pb-sugino-blog').fadeOut(1200);
		$('#pb-stlto').fadeOut(1200);
		$('#pb-garston-motors').fadeOut(1200);
        $('#pb-140-keystrokes').fadeOut(1200);
        $('#pb-genuine-sound-team').fadeOut(1200);
        $('#pb-autobahr').fadeOut(1200);
        $('#pb-tru-performance-nutrition').fadeOut(1200);
        $('#pb-steven-brenner').fadeOut(1200);
        $('#pb-html5').fadeOut(1200);
        $('#pd').fadeOut(1000);
        $('#sugino-blog').fadeOut(1000);
		$('#stlto').fadeOut(1000);
		$('#garston-motors').fadeOut(1000);
        $('#140-keystrokes').fadeOut(1000);
        $('#genuine-sound-team').fadeOut(1000);
        $('#autobahr').fadeOut(1000);
        $('#tru-performance-nutrition').fadeOut(1000);
        $('#steven-brenner').fadeOut(1000);
        $('#html5').fadeOut(1000);
        return false
    });
    $('.wipe').click(function () {
        $('#pd').fadeOut(1000);
        $('#sugino-blog').fadeOut(1000);
		$('#stlto').fadeOut(1000);
		$('#garston-motors').fadeOut(1000);
        $('#140-keystrokes').fadeOut(1000);
        $('#genuine-sound-team').fadeOut(1000);
        $('#autobahr').fadeOut(1000);
        $('#tru-performance-nutrition').fadeOut(1000);
        $('#steven-brenner').fadeOut(1000);
        $('#html5').fadeOut(1000);
        $('#pb-sugino-blog').fadeOut(1000);
		$('#pb-stlto').fadeOut(1000);
		$('#pb-garston-motors').fadeOut(1000);
        $('#pb-140-keystrokes').fadeOut(1000);
        $('#pb-genuine-sound-team').fadeOut(1000);
        $('#pb-autobahr').fadeOut(1000);
        $('#pb-tru-performance-nutrition').fadeOut(1000);
        $('#pb-steven-brenner').fadeOut(1000);
        $('#pb-html5').fadeOut(1000)
    });
    
    $("#sugino-jump").click(function () {
        $('#pb-sugino-blog').fadeIn(100);
        $('#sugino-blog').show()
    });
    
	$("#stlto-jump").click(function () {
        $('#pb-stlto').fadeIn(100);
        $('#stlto').show()
    });
	$("#garston-jump").click(function () {
        $('#pb-garston-motors').fadeIn(100);
        $('#garston-motors').show()
    });
    $("#140k-jump").click(function () {
        $('#pb-140-keystrokes').fadeIn(100);
        $('#140-keystrokes').show()
    });
    $("#gst-jump").click(function () {
        $('#pb-genuine-sound-team').fadeIn(100);
        $('#genuine-sound-team').show()
    });
    $("#autobahr-jump").click(function () {
        $('#pb-autobahr').fadeIn(100);
        $('#autobahr').show()
    });
    $("#tru-jump").click(function () {
        $('#pb-tru-performance-nutrition').fadeIn(100);
        $('#tru-performance-nutrition').show()
    });
    $("#brenner-jump").click(function () {
        $('#pb-steven-brenner').fadeIn(100);
        $('#steven-brenner').show()
    });
    $("#html5-jump").click(function () {
        $('#pb-html5').fadeIn(100);
        $('#html5').show()
    })
});
