/**************************************************
	NAVIGATION
**************************************************/

function nav(){
	$('.nav ul ul').css({display: 'none'});
	
	$('.nav ul li').hover(function(){
		$(this).find('ul:first').css({
			visibility: 'visible',
			display: 'none'
		}).fadeIn('1000');
	},
	function(){
		$(this).find('ul:first').css({
			visibility: 'hidden'
		});
	});
}

$(document).ready(function() {

	/**************************************************
		NAVIGATION
	**************************************************/

	nav();

	/**************************************************
		PORTFOLIO
	**************************************************/
	
	$('.posts.portfolio .item').hover(function(){
		$(this).find('.image p.pattern').hide();
		$(this).find('.info').animate({bottom: '10px'}, {queue:false, duration: 300});
		$('.header, .sidebar, .posts.portfolio .item').not(this).animate({opacity: '0.2'}, {queue:false, duration: 300});
	},
	function(){
		$(this).find('.image p.pattern').show();
		$(this).find('.info').animate({bottom: '65px'}, {queue:false, duration: 300});
		$('.header, .sidebar, .posts.portfolio .item').not(this).animate({opacity: '1'}, {queue:false, duration: 300});
	});
	
	/**************************************************

		PRETTY PHOTO
	**************************************************/
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'fast', /* fast/slow/normal */
			padding: 40, /* padding for each side of the picture */
			opacity: 0.50, /* Value between 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: false, /* true/false */
			counter_separator_label: ' von ', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
			hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
			modal: false, /* If set to true, only the close button will close the window */
			changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
			callback: function(){} /* Called when prettyPhoto is closed */
	});
	
});
