$(function() {
	$easing1 = "easeInBack";
	$easing2 = "easeOutBack";
	$easing3 = "swing";
	$fadeSpeed  = 350;			// FADE
	$moveSpeed  = 600;			// MOVE
	$moveSpeed2 = 300;			// MOVE 2
	$languageChangeSpeed = 300;
});

/* ---------------------------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------- APPEND SLO/ENG -- */

$(function() {

$("body").append("<div id='overlay'></div><div id='like'></div><div id='loadingColorbox'></div><div id='language' title='Change Language'></div><div id='copyright'>© Copyright by Miroslav Rajković</div><div id='controls-wrapper' class='load-item'><div id='controls'><ul id='slide-list'></ul></div></div><a id='prevslide' class='load-item' title='PREVIOUS SLIDE'></a><a id='nextslide' class='load-item' title='NEXT SLIDE'></a><div id='progress-back' class='load-item'><div id='progress-bar'></div></div><div id='enable-disable'></div><audio id='audio-player' name='audio-player' autoplay='true'><source src='audio.ogg'><source src='audio.mp3'></audio><div id='play-pause'></div>");

languageEnglish(); // DEFAULT LANGUAGE
effectsEnglish();
audioEnglish();

menuClick();
menuClose();
menuHash();
closeButton();

$("#overlay").css("opacity","0.65").hide();

$("#language").text("ENGLISH").toggle(
	function() {
		$(this).text("SLOVENIAN").attr("title","Spremeni jezik");
		$("#menu,#footer,#play-pause,#like,#controls, #nextslide, #prevslide, #enable-disable").fadeOut($languageChangeSpeed);
		$("#overlay").fadeIn($languageChangeSpeed,function(){$("#overlay").fadeOut($languageChangeSpeed);
		languageSlovenian();
		effectsSlovenian();
		menuClick();
		menuClose();
		menuHash();
		closeButton();
		audioSlovenian();
	
		var hashVal = window.location.hash.replace('#', '');
		if(hashVal=="author" || hashVal=="contact" || hashVal=="portfolio" || hashVal=="design") { $("#menu,#play-pause,#controls, #nextslide, #prevslide, #enable-disable").fadeIn($languageChangeSpeed); }
		else { $("#menu,#footer,#play-pause,#like,#controls, #nextslide, #prevslide, #enable-disable").fadeIn($languageChangeSpeed); }
		
		});
		
	},
	function() {
		$(this).text("ENGLISH").attr("title","Change language");
		$("#menu,#footer,#play-pause,#like,#controls, #nextslide, #prevslide, #enable-disable").fadeOut($languageChangeSpeed);
		$("#overlay").fadeIn($languageChangeSpeed,function(){$("#overlay").fadeOut($languageChangeSpeed);languageEnglish();
		effectsEnglish();
		menuClick();
		menuClose();
		menuHash();
		closeButton();
		audioEnglish();
		
		var hashVal = window.location.hash.replace('#', '');
		if(hashVal=="author" || hashVal=="contact" || hashVal=="portfolio" || hashVal=="design") { $("#menu,#play-pause,#controls, #nextslide, #prevslide, #enable-disable").fadeIn($languageChangeSpeed); }
		else { $("#menu,#footer,#play-pause,#like,#controls, #nextslide, #prevslide, #enable-disable").fadeIn($languageChangeSpeed); }
		
		});
});

});

function languageEnglish() {
	
	$("#content").css("margin-top","-62px");
	
	$("#prevslide").attr("title","Previous slide");
	$("#nextslide").attr("title","Next slide");
	
	$("#enable-disable").attr("title","Toggle effects ON/OFF");
	
	$("#menu").html("<ul><li><a href='#author' class='author' title='AUTHOR'>AUTHOR</a><p>Something about me</p></li><li><a href='#portfolio' class='portfolio' title='PHOTOGRAPHY'>PHOTOGRAPHY</a><p>Follow my photography road until now</p></li><li><a href='#design' class='design' title='DESIGN'>DESIGN</a><p>You wish, I design</p></li><li><a href='http://blog.design-boss.com' class='' title='BLOG' target='_blank'>BLOG</a><p>Keep on track</p></li><li><a href='#contact' class='contact' title='CONTACT'>CONTACT</a><p>Get in touch with me</p></li></ul>");
	
	$(".contentWrapper.content-author").html("<div class='close close-author' title='Close'></div><img src='images/about1.jpg' width='149px' height='258px' title='Author' alt='Author'/>I'm a young and ambitious artist, fashion, portrait photographer and graphic designer. I started doing graphic design far back in elementary school, later 3D visualization and 1 year ago also with photography. Ever since I was a kid, I had a lot of concepts and ideas regarding photography, but I never had appropriate camera to achieve the effect I was looking for. I'm not big fan of extra lightning, because I rather prefer to beautiful and natural shadows.<br /><br />Combining graphic design for ideas, 3D visualization for lightning and composition I am achieving professional level of photography without expensive tools and equipment. Beside photography  I also design and code minimalistic websites based on HTML, PHP and jQuery.");
	
	$(".contentWrapper.content-author img").attr("title","Author");
	
	$(".contentWrapper.content-contact").html("<div class='close close-contact' title='Close'></div><table border='0'><tr><td><ul><h1>Miroslav Rajkovic</h1><li title='Location'>Ljubljana, Slovenia</li><li title='Telephone number'>+386 (0)40 525 107</li><li><a href='mailto:info@design-boss.com' title='Email address'>info@design-boss.com</a></li></ul></td><td><ul><h1>You can also follow me on:</h1><li><a href='http://www.facebook.com/pages/DBoss-Photography/209161749100488' target='_blank' title='Facebook'>Facebook</a></li><li><a href='https://plus.google.com/118043286848117177616' target='_blank' title='Google+'>Google+</a></li><li><a href='http://blog.design-boss.com' target='_blank' title='My blog'>My blog</a></li><li><a href='http://www.slo-foto.net/portfolio/DBoss' target='_blank' title='Slo-Foto'>Slo-Foto</a></li><li><a href='http://500px.com/DESIGN-BOSS' target='_blank' title='500px'>500px</a></li></ul></td></tr></table><br /><br /><ul><h1>Services:</h1><li title='Photography'>Photography: <i>portfolios (modeling and acting), fashion and editorial, weddings, catalogue, concerts, family portraits and children...</i></li><li title='Graphic design'>Graphic design: <i>web design, business cards, posters...</i></li><li title='3D Visualization'>3D Visualization: <i>furniture, interior design, objects, arhitecture...</i></li></ul><br /><br /><h1>Ask for any kind of work or information.</h1>");
	
	$(".contentWrapper.content-portfolio").html("<div class='close close-portfolio' title='Close'></div><ul><li><a href='gallery/gallery/fotografija/fashion' class='fullGallery' title='FASHION'>FASHION</a><p>Straight from Milan</p></li><li><a href='gallery/gallery/fotografija/people' class='fullGallery' title='PEOPLE & PORTRAITS'>PEOPLE & PORTRAITS</a><p>Presenting people in interesting and beautiful ways</p></li><li><a href='gallery/gallery/fotografija/walk' class='fullGallery' title='WALK'>WALK</a><p>I also travel</p></li></ul>");
	
	$(".contentWrapper.content-design").html("<div class='close close-portfolio' title='Close'></div><ul><li><a href=''title='COMING SOON'>COMING SOON</a><p>I'm currently preparing the content...</p></li></ul>");
	
	$("#footer").html("<div><a href='http://www.design-boss.com'><img src='images/logo.png' title='DESIGN BOSS' alt='Logotype'/></a></div><div class='footer-middle'><ul><li style='cursor:default' title='Telephone number'><b>T:</b>&nbsp;&nbsp; +386 (0)40 525 107</li><li title='Email address'><b>E:</b>&nbsp;&nbsp; <a href='mailto:info@design-boss.com'>info@design-boss.com</a></li></ul></div>");

}

function languageSlovenian() {
	
	$("#content").css("margin-top","-63px");
	
	$("#prevslide").attr("title","Prejšnja projekcija");
	$("#nextslide").attr("title","Naslednja projekcija");
	
	$("#enable-disable").attr("title","Izključi / vključi posebne efekte");
	
	$("#menu").html("<ul><li><a href='#author' class='author' title='AVTOR'>AVTOR</a><p>Nekaj malega o meni</p></li><li><a href='#portfolio' class='portfolio' title='FOTOGRAFIJA'>FOTOGRAFIJA</a><p>Moji dosedanji koraki v fotografiji</p></li><li><a href='#design' class='design' title='DIZAJN'>DIZAJN</a><p>Dizajn vaše zamisli</p></li><li><a href='http://blog.design-boss.com' class='' title='BLOG' target='_blank'>BLOG</a><p>Sledite mi</p></li><li><a href='#contact' class='contact' title='KONTAKT'>KONTAKT</a><p>Stopite v kontakt z mano</p></li></ul>");
	
	$(".contentWrapper.content-author").html("<div class='close close-author' title='Zapri'></div><img src='images/about1.jpg' width='149px' height='258px' title='Avtor' alt='Avtor'/>Sem mlad in ambiciozen modni, umetnostni in portretni fotograf ter grafični oblikovalec. Z grafičnim oblikovanjem sem se začel ukvarjati pred približno 10 leti, kasneje s 3D vizualizacijo, pred kratkim pa tudi s fotografijo. Že od otroštva imam ogromno konceptov in idej, ki zadevajo fotografijo, vendar nikoli nisem imel ustrezne tehnične opreme za uresničitev le-teh. V veliki meri preferiram črno-belo tehniko fotografiranja, ker nisem ljubitelj barvno pisane umetnosti.<br /><br />Sam preplet grafičnega oblikovanja in fotografije je zanimiv, ker s tem razvijam mnogo širši pogled na celotni umetnostni spekter. Izdelujem tudi spletne strani na osnovi spletnih jezikov HTML, PHP ter JQUERY. Obožujem minimalistične oblike, preprosto delujoče spletne strani in tako kot v fotografiji, preprostost.");
	
	$(".contentWrapper.content-author img").attr("title","Avtor");
	
	$(".contentWrapper.content-contact").html("<div class='close close-contact' title='Zapri'></div><table border='0'><tr><td><ul><h1>Miroslav Rajkovic</h1><li title='Lokacija'>Ljubljana, Slovenia</li><li title='Telefonska številka'>+386 (0)40 525 107</li><li><a href='mailto:info@design-boss.com' title='Elektronski naslov'>info@design-boss.com</a></li></ul></td><td><ul><h1>Lahko mi sledite tudi na:</h1><li><a href='http://www.facebook.com/pages/DBoss-Photography/209161749100488' target='_blank' title='Facebook'>Facebook</a></li><li><a href='https://plus.google.com/118043286848117177616' target='_blank' title='Google+'>Google+</a></li><li><a href='http://blog.design-boss.com' target='_blank' title='Moj blog'>Moj blog</a></li><li><a href='http://www.slo-foto.net/portfolio/DBoss' target='_blank' title='Slo-Foto'>Slo-Foto</a></li></ul></td></tr></table><br /><br /><ul><h1>Storitve:</h1><li title='Fotografija'>Fotografija: <i>foto booki, modna & editorijal, poroke, katalogi, koncerti, portreti...</i></li><li title='Grafični dizajn'>Grafični dizajn: <i>spletne strani, vizitke, posterji...</i></li><li title='3D Vizualizacija'>3D Vizualizacija: <i>pohištvo, notranji dizajn, objekti, arhitektura...</i></li></ul><br /><br /><h1>Vprašajte za kakršnokoli obliko informacije</h1>");
	
	$(".contentWrapper.content-portfolio").html("<div class='close close-portfolio' title='Zapri'></div><ul><li><a href='gallery/gallery/fotografija/fashion' class='fullGallery' title='MODA'>MODA</a><p>Direktno iz Milana</p></li><li><a href='gallery/gallery/fotografija/people' class='fullGallery' title='LJUDJE & PORTRETI'>LJUDJE & PORTRETI</a><p>Predstavitev ljudi na zanimiv in lep način</p></li><li><a href='gallery/gallery/fotografija/walk' class='fullGallery' title='SPREHOD'>SPREHOD</a><p>Moja popotovanja</p></li></ul>");
	
	$(".contentWrapper.content-design").html("<div class='close close-portfolio' title='Zapri'></div><ul><li><a href=''title='PRIHAJA KMALU'>PRIHAJA KMALU</a><p>Trenutno pripravljam vsebino...</p></li></ul>");
	
	$("#footer").html("<div><img src='images/logo.png' title='DESIGN BOSS' alt='Logotip'/></div><div class='footer-middle'><ul><li style='cursor:default' title='Telefonska številka'><b>T:</b>&nbsp;&nbsp; +386 (0)40 525 107</li><li title='Elektronski naslov'><b>E:</b>&nbsp;&nbsp; <a href='mailto:info@design-boss.com'>info@design-boss.com</a></li></ul></div>");

}



/* ---------------------------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------------- FUNCTIONS -- */

function loadContent () {

var hashVal = window.location.hash.replace('#', '');
if(hashVal=="author" || hashVal=="contact" || hashVal=="portfolio" || hashVal=="design") {} 

else {  

	$("#footer, #like, #controls").hide();
	$("#menu").css("bottom","-100px"); // 60px
	$("#menu").delay(300).animate({bottom:"60px"},{duration:$moveSpeed, easing:$easing2});
	$("#footer, #like").delay(600).fadeIn($fadeSpeed);
	$("#controls").delay(600).fadeIn({duration:$moveSpeed, easing:$easing2});
	
	$("#language").css("top", "-30px");
	$("#enable-disable, #play-pause").css("margin-top", "-30px");
	$("#prevslide").css("left","-55px");
	$("#nextslide").css("right","-55px");
	
	$("#language").delay(1000).animate({top:"5px"},{duration:$moveSpeed, easing:$easing2});
	$("#enable-disable, #play-pause").delay(1000).animate({marginTop:"5px"},{duration:$moveSpeed, easing:$easing2});
	$("#prevslide").delay(1500).animate({left:"50px"},{duration:$moveSpeed, easing:$easing2});
	$("#nextslide").delay(1500).animate({right:"50px"},{duration:$moveSpeed, easing:$easing2});

	}
}

function audioEnglish() {

$("#play-pause").attr("title","Pause the music").text("Music: ON").toggle(
	function() {
		$(this).attr("title","Play the music").text("Music: OFF");
		$("#audio-player")[0].pause();
	},
	
	function() {
		$(this).attr("title","Pause the music").text("Music: ON");
		$("#audio-player")[0].play();
});	

}

function audioSlovenian() {

$("#play-pause").attr("title","Pavziraj glasbo").text("Glasba: DA").toggle(
	function() {
		$(this).attr("title","Predvajaj glasbo").text("Glasba: NE");
		$("#audio-player")[0].pause();
	},
	
	function() {
		$(this).attr("title","Pavziraj glasbo").text("Glasba: DA");
		$("#audio-player")[0].play();
});	

}

$(function() {
	
	$(".explorer-close").click(function(){$("#explorer").fadeOut(350);});
	
	if(BrowserDetect.browser!="Explorer") {
		$("#like").append('<li><g:plusone count="false" href="www.design-boss.com"></g:plusone></li><li><iframe src="http://www.facebook.com/plugins/like.php?app_id=200835983297048&amp;href=http%3A%2F%2Fwww.design-boss.com%2F&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></li>');
	}
	
	if(BrowserDetect.browser=="Explorer") {
		$("#play-pause").hide();
		$("#like").append('<li><li><iframe src="http://www.facebook.com/plugins/like.php?app_id=200835983297048&amp;href=http%3A%2F%2Fwww.design-boss.com%2F&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></li>');
	}
});

	function effectsEnglish() {
	$("#enable-disable").text("Effects: ON").toggle(
	function() {
		$(this).text("Effects: OFF");
		jQuery.fx.off = true;
	},
	function() {
		$(this).text("Effects: ON");
		jQuery.fx.off = false;
	});
	}
	
	function effectsSlovenian() {
	$("#enable-disable").text("Posebni efekti: DA").toggle(
	function() {
		$(this).text("Posebni efekti: NE");
		jQuery.fx.off = true;
	},
	function() {
		$(this).text("Posebni efekti: DA");
		jQuery.fx.off = false;
	});
	}

$(document).ready(function() {	
	$("#gplusone").gplusone(); 
});

/* ---------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------- CONTENT -- */

/*-----------------*/// HASH

function menuHash() {
	
	$("#content, .contentWrapper").hide();
		
	var hashVal = window.location.hash.replace('#', '');
	
	if(hashVal=="author" || hashVal=="contact" || hashVal=="portfolio" || hashVal=="design") {
		
		var hash = "true";		
				
		$("#footer, #like").delay(500).fadeOut($fadeSpeed);
		$("#menu").delay(750).animate({bottom:"0px"},{duration:$moveSpeed, easing:$easing2});
		$("#prevslide").delay(850).animate({left:"-55px"},{duration:$moveSpeed, easing:$easing2});
		$("#nextslide").delay(850).animate({right:"-55px"},{duration:$moveSpeed, easing:$easing2});
		$("#controls-wrapper").delay(500).animate({bottom:"15px"},{duration:$moveSpeed, easing:$easing2});
		
		$("#menu ul li a."+hashVal).addClass("current");
		$("#content, .contentWrapper.content-"+hashVal).delay(1100).fadeIn($fadeSpeed);
	}
			
	else { $(".close").hide(); }
		
}

/*-----------------*/// CLICK

function menuClick() {
	
	$("#menu ul li a").click(function() {
		
		var menuVal = $(this).attr("class");
		
		if($(this).hasClass("current")) {}
					
		else if(menuVal=="author" || menuVal=="contact" || menuVal=="portfolio" || menuVal=="design") {
				
				$("#footer, #like").delay(150).fadeOut($fadeSpeed);
				$("#menu").animate({bottom:"0px"},{duration:$moveSpeed, easing:$easing1});
				$("#prevslide").animate({left:"-55px"},{duration:$moveSpeed, easing:$easing1});
				$("#nextslide").animate({right:"-55px"},{duration:$moveSpeed, easing:$easing1});
				$("#controls-wrapper").delay(650).animate({bottom:"15px"},{duration:$moveSpeed, easing:$easing1});
				$(".close").delay(1000).fadeTo(350,0.5);
				
				$("#content, .contentWrapper").fadeOut($fadeSpeed);
				$("#content, .contentWrapper.content-"+menuVal).stop(true).delay(500).fadeIn($fadeSpeed);
				
				$("#menu ul li a").removeClass("current");
				$("#menu ul li a."+menuVal).addClass("current");
		}
		
		else {}

	});
}

/*-----------------*/// CLOSE

function menuClose() {
	
	$(".close").click(function() {
		
		window.location.hash = "#home"; 
		
		$("#content, .contentWrapper").fadeOut($fadeSpeed);
		$("#menu").delay(300).animate({bottom:"60px"},{queue:false, duration:$moveSpeed, easing:$easing2});
		$("#prevslide").delay(500).animate({left:"50px"},{queue:false, duration:$moveSpeed, easing:$easing2});
		$("#nextslide").delay(500).animate({right:"50px"},{queue:false, duration:$moveSpeed, easing:$easing2});
		$("#footer, #like").delay(600).fadeIn($fadeSpeed);
		$("#controls-wrapper").delay(600).animate({bottom:"65px"},{queue:false, duration:$moveSpeed, easing:$easing1});
		$("#menu ul li a").removeClass("current");
	});

}

$(document).keydown(function(ev) {
	if(ev.keyCode == 27 || ev.keyCode == 8) { // ESC - BACKSPACE
		
		window.location.hash = "#home"; 
		
		$("#content, .contentWrapper").fadeOut($fadeSpeed);
		$("#menu").delay(300).animate({bottom:"60px"},{queue:false, duration:$moveSpeed, easing:$easing2});
		$("#prevslide").delay(500).animate({left:"50px"},{queue:false, duration:$moveSpeed, easing:$easing1});
		$("#nextslide").delay(500).animate({right:"50px"},{queue:false, duration:$moveSpeed, easing:$easing1});
		$("#footer, #like").delay(600).fadeIn($fadeSpeed);
		$("#controls-wrapper").delay(600).animate({bottom:"65px"},{queue:false, duration:$moveSpeed, easing:$easing1});
		$("#menu ul li a").removeClass("current");
	}
});

/* ---------------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------- ANIMATIONS -- */

/*-----------------*/// PREVIOUS / NEXT ARROW

$(function() {
	
	$("#prevslide, #nextslide").css("opacity","0.5");
	
	$("#prevslide").hover(
		function(){$(this).stop().animate({left:"40px", opacity:"0.85"},{queue:false, duration:$moveSpeed2, easing:$easing3});},
		function(){$(this).stop().animate({left:"50px", opacity:"0.5"},{queue:false, duration:$moveSpeed2, easing:$easing3});
	});
	
	$("#nextslide").hover(
		function(){$(this).stop().animate({right:"40px", opacity:"0.85"},{queue:false, duration:$moveSpeed2, easing:$easing3});},
		function(){$(this).stop().animate({right:"50px", opacity:"0.5"},{queue:false, duration:$moveSpeed2, easing:$easing3});
	});
});

/*-----------------*/// CLOSE BUTTON

function closeButton() {
	
	$(".close, .explorer-close").css("opacity","0.4");
	
	$(".close, .explorer-close").hover(
		function(){$(this).stop().fadeTo(350,0.75);},
		function(){$(this).stop().fadeTo(350,0.4);
	});
}

/*-----------------*/// FACEBOOK / GOOGLE+1

$(function() {
	
	$("#like li").css("opacity","0.5");
	
	$("#like li").hover(
		function(){$(this).stop().fadeTo(350,1.0);},
		function(){$(this).stop().fadeTo(350,0.5);
	});
});

/* ---------------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------- SUPERSIZED -- */

jQuery(function($){
				
				$.supersized({
				
					// Functionality
					slideshow               :   1,			// Slideshow on/off
					autoplay				:	1,			// Slideshow starts playing automatically
					start_slide             :   1,			// Start slide (0 is random)
					stop_loop				:	0,			// Pauses slideshow on last slide
					random					: 	0,			// Randomize slide order (Ignores start slide)
					slide_interval          :   5000,		// Length between transitions
					transition              :   1, 			// 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
					transition_speed		:	1000,		// Speed of transition
					new_window				:	1,			// Image links open in new window/tab
					pause_hover             :   0,			// Pause slideshow on hover
					keyboard_nav            :   1,			// Keyboard navigation on/off
					performance				:	2,			// 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
					image_protect			:	1,			// Disables image dragging and right click with Javascript
															   
					// Size & Position						   
					min_width		        :   0,			// Min width allowed (in pixels)
					min_height		        :   0,			// Min height allowed (in pixels)
					vertical_center         :   1,			// Vertically center background
					horizontal_center       :   1,			// Horizontally center background
					fit_always				:	0,			// Image will never exceed browser width or height (Ignores min. dimensions)
					fit_portrait         	:   1,			// Portrait images will not exceed browser height
					fit_landscape			:   0,			// Landscape images will not exceed browser width
															   
					// Components							
					slide_links				:	'blank',	// Individual links for each slide (Options: false, 'number', 'name', 'blank')
					thumb_links				:	1,			// Individual thumb links for each slide
					thumbnail_navigation    :   0,			// Thumbnail navigation
					slides 					:  	[			// Slideshow Images
					
					{image : 'slideshow/1.jpg'},
					{image : 'slideshow/2.jpg'},
					{image : 'slideshow/3.jpg'},
					{image : 'slideshow/4.jpg'},
					{image : 'slideshow/5.jpg'},
					{image : 'slideshow/6.jpg'},
					{image : 'slideshow/7.jpg'},
					{image : 'slideshow/8.jpg'}

												]
					
				});
		    });
			
/* ---------------------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------- COLORBOX -- */

$(document).ready(function(){
	
	$("#loadingColorbox, #new-window").hide();
	
	$(".fullGallery").colorbox({
		width:"100%", 
		height:"100%", 
		onOpen: function() { $("#loadingColorbox").fadeIn(500); $("#menu, #content, .contentWrapper").fadeOut(800); jQuery.fx.off = true; },
		onComplete: function() { $("#loadingColorbox").fadeOut(500); },
		onClosed: function() { jQuery.fx.off = false; $("#menu, #content, .contentWrapper.content-portfolio").fadeIn(500); },
		preloading:"false",
		iframe:true, 
		scrolling: false
	});
});

/* ---------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------- GOOGLE ANALYTICS -- */

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-16370285-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
