// JavaScript Document
var names;
var portfolioduration = 500;
$(document).ready(function(){
	$('a[rel^="shadowbox"]').fancybox({
		'transitionIn'	:	'0',
		'transitionOut'	:	'0',
		'titlePosition' : 'over',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,		
		'enableEscapeButton': true,
		'showCloseButton' : true,
		'hideOnOverlayClick': true,
		'overlayColor': '#000'
	});
	
	$('.portfoliocategory').hover(function(){
			title = $(this).attr('title');
			$('.categoryhover').html(title);
		},function(){ $('.categoryhover').html(''); });
	
	$('.portfolioone').hover(function(){
		$(this).children('div.img').animate({top:'-128px'},portfolioduration);
		$(this).children('div.info').animate({top:'-128px'},portfolioduration);
	},function(){
		$(this).children('div.img').animate({top:'0px'},portfolioduration);
		$(this).children('div.info').animate({top:'0px'},portfolioduration);	
	 });
	 
	 $('.homepagequickmenu .right a').hover(function(){
		$(this).children('img').fadeTo(portfolioduration,0.7);		
	},function(){
		$(this).children('img').fadeTo(portfolioduration,1);	
	 });
	 
	  $('.moreprojekts a').hover(function(){
		$(this).children('img').fadeTo(portfolioduration,0.5);		
	},function(){
		$(this).children('img').fadeTo(portfolioduration,1);	
	 });
	 
	 $('.portfoliobody .right a').hover(function(){
		$(this).children('img').fadeTo(portfolioduration,0.5);	
		if($(this).is(':first-child'))
		{
		}
		else
		{
			$('.portfoliobody .middle img:first').fadeOut(portfolioduration);
			id = $(this).attr('id');
			
			if(id)
			{
				id = id.replace('small','');
				$('.portfoliobody .middle #big'+id+' img').fadeIn(portfolioduration);
			}
		}
	},function(){
		$(this).children('img').fadeTo(portfolioduration,1);
		if($(this).is(':first-child'))
		{
		}
		else
		{
			$('.portfoliobody .middle img:first').fadeIn(portfolioduration);
			id = $(this).attr('id');
			
			if(id)
			{
				id = id.replace('small','');
				$('.portfoliobody .middle #big'+id+' img').fadeOut(portfolioduration);
			}	
		}
	 });
	 
	 $('.homepagequickmenu .left a').hover(function(){
		$(this).children('img').animate({top:'-97px'},portfolioduration);	
	},function(){
		$(this).children('img').animate({top:'0px'},portfolioduration);		
	 });
	 
	 $('.portfoliobody .middle img:first').show(1);
	
});
