/**
 * @author chicks
 */
var $j = jQuery.noConflict();
			
$j(function() {
//	var so = new SWFObject("flash/bb-menu.swf", "bbmenu", "920", "300", "8", "#000000");
//	so.addParam("quality", "high");
//	so.addParam("wmode", "transparent");
//	so.addParam("AllowScriptAccess", "always");
//	so.addVariable("configPath", "flash/bb-menu-config.xml");
//	so.addVariable("currentSection", getCurrentSectionTitle());
//	so.write("flashmenu");
	
	$j('#view-tabs li a').click(function() {
		if($j(this).parent().hasClass('locked')) {
			return false;
		}
		
		//Show the content
		$j('.view-tabs-content:visible').hide();
		$j($j(this).attr('href')).show();
		
		//Switch the active tab style
		$j(this).parent().siblings('.active').removeClass('active');
		$j(this).parent().addClass('active');
		
		return false;
	});
	
		$j('#community-view-tabs li a').click(function() {
		if($j(this).parent().hasClass('locked')) {
			return false;
		}
		
		//Show the content
		$j('.view-tabs-content:visible').hide();
		$j($j(this).attr('href')).show();
		
		//Switch the active tab style
		$j(this).parent().siblings('.active').removeClass('active');
		$j(this).parent().addClass('active');
		
		return false;
	});
});

function getCurrentSectionTitle() {
	var headerTitle = $j('#main .nav h3');
	
	if (headerTitle.length == 1) {
		return headerTitle.text().replace("&", "**amp**");	
	}
	
	return "";
}


function popup(href,h,w){

		wnum = 0;

	if(href.length > 0){

		wnum++;

		window.open(href, "window"+wnum, 

"toolbar=no,location=no,directories=no,resizable=yes,status=no,menubar=no,scrollbars=yes,height="+h+",width="+w );

		}

	}
