(function($) {
	$(document).ready(function() {
	
		$('.external').attr('target','_blank');
		
		$('.aviaslider').aviaSlider({	blockSize: {height: 95, width:95},
			transition: 'slide',
			display: 'diagonaltop',
			switchMovement: true,
			animationSpeed: 500,
			slideControlls: 'items',
			appendControlls: '.aviaslider',
			autorotation: true,
			autorotationSpeed: 1
		});		
		
		if ($.support.opacity) { 
			$('.navigation a').css({ 'opacity' : 0.5 })
			$('.navigation a').hover(function() { 
				$(this).stop().animate({ 'opacity' : 1 }, 300);
			 }, function() {
			 	$(this).stop().animate({ 'opacity' 
			 	: 0.5 }, 300);
			 });
		
			$('#nav ul li').hover(function() { 
				$(this).find('ul').css({
					'opacity' : 0,
					'display' : 'block'
				})
					.animate({ 'opacity' : 1 }, 300);
			}, function() { 
				$(this).find('ul').css('display', 'none');
			});
		}
		else {
		
			$('#nav ul li').hover(function() { 
				$(this).find('ul').css('display', 'block');
			}, function() { 
				$(this).find('ul').css('display', 'none');
			});
			
		}
		
		
		
		$('#nav ul ul:first li:last').css({
			'border-radius' : '0 0 10px 10px',
			'-moz-border-radius' : '0 0 10px 10px',
			'-webkit-border-radius' : '0 0 10px 10px'
		});
		
		$('#nav ul ul:first li:first').css({
			'border-radius' : '10px 10px 0 0',
			'-moz-border-radius' : '10px 10px 0 0',
			'-webkit-border-radius' : '10px 10px 0 0'
		});
					
	}); // end $
	
})(jQuery); // end function($)
