jQuery.noConflict();

jQuery(function() {

	// Navigation sliders
	jQuery('#nav>ul>li>h3').click(
		function() {
			jQuery('#nav>ul div:visible').slideUp('slow');
			jQuery(this).parent().children('div:hidden').slideDown('slow');
			return false;
		}
	);

	// Inline image lightbox effect
	jQuery('a.inline').lightBox();

	// Feature slideshow
	jQuery('#feature>ul>li:first-child').show();
	jQuery('#feature>ul>li:first-child').addClass('current');
	setInterval("slideSwitch()", 7000);

});

function slideSwitch() {
	// Slide
	var $active = jQuery('#feature>ul>li:visible');
	if ($active.length == 0) {
		$active = jQuery('#feature>ul>li:last');
	}
	var $next = $active.next().length ? $active.next() : jQuery('#feature>ul>li:first');
	$next.fadeIn(1000);
	$active.fadeOut(1000);
	
	// Slides list
	var $active_list = jQuery('#feature_list>ul>li.current');
	if ($active_list.length == 0) {
		$active_list = jQuery('#feature>ul>li:last');
	}
	var $next_list = $active_list.next().length ? $active_list.next() : jQuery('#feature_list>ul>li:first');
	$next_list.addClass('current');
	$active_list.removeClass('current');
}
