jQuery.fn.nodeIndex = function(){return jQuery(this).prevAll().length};

	function toggle(m)
	{
		if($("#"+m).is(':visible'))
			$("#"+m).hide();
		else
			$("#"+m).show();
	}
	
jQuery(document).ready(function($){
	
	if($(".bnr_scroll li").length>1){
		$(".bnr_scroll").jCarouselLite({
			btnNext: "#bnr .next",
			btnPrev: "#bnr .prev",
			auto: 7000,
			scroll: 1,
			speed: 900
		});
	}
	
	$(".bnr_scroll img").addClass('captify');
	
	$('img.captify').captify({
		// all of these options are... optional
		// ---
		// speed of the mouseover effect
		speedOver: 'fast',
		// speed of the mouseout effect
		speedOut: 'normal',
		// how long to delay the hiding of the caption after mouseout (ms)
		hideDelay: 500,
		// 'fade', 'slide', 'always-on'
		animation: 'slide',
		// text/html to be placed at the beginning of every caption
		prefix: '',
		// opacity of the caption on mouse over
		opacity: '1',
		// the name of the CSS class to apply to the caption box
		className: 'caption-bottom',
		// position of the caption (top or bottom)
		position: 'bottom',
		// caption span % of the image
		spanWidth: '634'
	});
	
	$('#brd li').last().addClass('cur');
	
	$('#menu li li .active').parents('ul').prev().addClass('active');
});


