/***********************************
*	Site Name charity: water
*	Developer: Rich Rudzinski
*	Created on: 3/10
***********************************/
/* Cufon font replacement */
function cufon() {
	// set Arial Narrow family and run replace
	Cufon.set('fontFamily', 'Arial Narrow');

	Cufon.replace('.neueCondCont a', {
		hover: true
	});
}

jQuery(document).ready(function() {
	sidebarCat();
});

// Hide subcategories, enable expand on click
function sidebarCat() {
	$j = jQuery;
	$j('#sidebar-categories .expand ul').css('display', 'none');
	$j('#sidebar-categories .expand a').click(function() {
		for(i=0; i<$j(this).parent().children().length; i++) {
			if($j(this).parent().children()[i].tagName == 'UL') {
				if(!$j(this).parent().hasClass('active')) { 
					$j($j(this).parent()).addClass('active')
					$j($j(this).parent().children()[i]).css('display', 'block');
				} else { 
					$j($j(this).parent()).removeClass('active')
					$j($j(this).parent().children()[i]).css('display', 'none');
				}
			}
		}
		return false;
	});
	$j('#sidebar-categories .expand ul a').click(function() {
		document.location.href = $j(this).attr('href');
	});
}
