$(function() {
	
	$('a').click(function(event){
		if ($(this).attr('href') == '#'){
			event.preventDefault();
		}
	});
	
	function equalHeight(group){
		var tallest = 0;
		group.each(function() {
			thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	};
	equalHeight($('.equalheight'));
	
	$('#nav li').each(function(){
		var parentHeight = $(this).height();
		$(this).find('ul').css({'top': parentHeight}).mouseover(function(){
			$(this).show();
		});
		$(this).hover(
			function(){
				$(this).addClass('color-3').find('ul').show();
			},
			function(){
				$(this).removeClass('color-3').find('ul').hide();
			}
		);
	});
	
	$('#featured').scrollable({
		size: 3,
		start: 0,
		vertical: false,			
		clickable: false,
		loop: false,
		interval: 0,			
		speed: 500,
		items: '.panels',
		prev: '.prev',
		next: '.next',
		activeClass: 'active',
		disabledClass: 'disabled'
	}).mousewheel()
	.find('.panels > div').css({'cursor':'pointer'}).click(function(){
		window.location = $(this).find('a').attr('href'); return false;
	});
	
	$('.shadow').dropShadow({
		top: 1,
		left: -1,
		opacity: 0.2,
		blur: 1,
		color: '#000'
	});
	
	$('.shadow-l').wrapInner('<div class="shadow-lc"><div class="shadow-lt"><div class="shadow-lb"></div></div></div>');
	
});