$j(document).ready(function() {
	
	$j('div.drop_wide').wad({
		inForm: false
	});
	
	$j('div.drop_narrow').wad({
		inForm: false
	});

	$j('.about_trigger a').click(function() {
		
		$j('div.tab').filter(this.hash).show().siblings('div.tab').hide();
		$j(this).addClass('active').siblings('a').removeClass('active');
		return false;
	});
	
	$j('.filter').click(function() {
		if ($j(this).text() == 'All') {
			$j(this.hash).children('![name="' + $j(this).text() + '"]').each(function(){
				if ($j(this).attr('class') == 'more') {
					$j(this).show();
				}
			});
		}
		else {
			$j(this.hash).children('![name="' + $j(this).text() + '"]').each(function(){
				if ($j(this).attr('class') == 'more') {
					$j(this).hide();
				}
			});
			$j(this.hash).children('[name="' + $j(this).text() + '"]').show();
		}

	});
	
	var hash = window.location.hash.substr(1);

	if (hash != "") {
		$j('.about_trigger a[href=#' + hash + ']').click();
	} else {
		$j('.about_trigger a:first').click();
	} 
		

	$j('div.article-tab').hide();
	$j('a.article').click(function() {
		$j('div.article-tab:visible').slideUp();
		if ($j(this).hasClass('down')) {
			$j(this).removeClass('down').addClass('up');
		 } else { 
		 	$j('a.article').removeClass('down').addClass('up');
		 	
			$j(this).removeClass('up').addClass('down').parent('h4').siblings('div.article-tab').slideDown();
		}
		
		return false;
	});
		
})

function filterCategory(master, category) {
	//$j('#' + master).children('!' + category).hide();
	//$j('#' + master).children(category).show();
	$j('#' + master).children('!' + category).hide();
	return false;
}
