/******************************************************************************************************************/
//	MENU FX
/******************************************************************************************************************/

function menufxHandle(){
	if ($('BODY').hasClass('home')) {
		$('.home #menu LI').append('<div class="hover"></div>');
		$('.home #menu LI .hover').css({ position: 'absolute', width: '150px', height: '150px', zIndex: '10', opacity: 0 });
			
		$('.home #menu LI A').css({ opacity: 0, position: 'absolute', zIndex: '100', marginTop: '50px', backgroundPosition: '0px 0px' });
		$('.home #menu LI A').animate({ opacity: 1, marginTop: '0px' }, 500, function(){
			
			$('.home #menu A').hover(function(){
				$(this).parent().find('.hover').css({opacity: 1});
				$(this).stop().animate({opacity: 0}, 500);
			}, function(){
				$(this).parent().find('.hover').css({opacity: 0});
				$(this).stop().animate({opacity: 1}, 500);
			});
		
		});
	}
	else {
		$('#menu LI').append('<div class="hover"></div>');
		$('#menu LI .hover').css({ position: 'absolute', width: '100px', height: '100px', zIndex: '10', opacity: 0 });
		
		$('#menu LI A').css({ position: 'absolute', zIndex: '100', backgroundPosition: '0px 0px' });
		
		$('#menu A').hover(function(){
			$(this).parent().find('.hover').css({opacity: 1});
			$(this).stop().animate({opacity: 0}, 500);
		}, function(){
			$(this).parent().find('.hover').css({opacity: 0});
			$(this).stop().animate({opacity: 1}, 500);
		});
	}
}

/******************************************************************************************************************/
//	IMAGES ROUNDED FRAME
/******************************************************************************************************************/

function imagesHandle(){
	$('#attach LI A').prepend('<div class="frame"></div>');
	
	$('#attach LI A').hover(function(){
		$(this).stop().animate({ opacity: 0.5 }, 300);
	}, function(){
		$(this).stop().animate({ opacity: 1 }, 500);
	});
}

/******************************************************************************************************************/
// On document load...
/******************************************************************************************************************/

$(function(){
	menufxHandle();
	imagesHandle();
});
