jQuery.noConflict();
    
    jQuery(document).ready(function($){
	
	
	Cufon.replace('h1, h2, #features .box h3');
	
    //search field default value
    swapValues = [];
    $("#CAT_Search").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });
	
	
	//email spam protection - Example Markup: <span class="email">name[at]domain[dot]com</span>
	$('.email').each(function() {
		var $email = $(this);
		var address = $email.text()
		.replace(/\s*\[at\]\s*/, '@')
		.replace(/\s*\[dot\]\s*/g, '.');
		$email.html('<a href="mailto:' + address + '">'+ address +'</a>');
	});
	
	
	if($("#newsUpdates")){
		$('#newsUpdates').jScrollPane({showArrows: 'true', scrollbarWidth: 14});
	}


	if($('#nav')) {
		$('#nav li:first').addClass('first');
		$('#nav li:last').addClass('last');
	}
	
	if ($("body#section-about #nav")) {
		$("body#section-about #nav li:nth-child(1)").addClass('selected');
		
	}

	if($("body#section-membership #nav")) {
		$("body#section-membership #nav li:nth-child(2)").addClass('selected');
	}

	if($("body#section-commemoration #nav")) {
		$("body#section-commemoration #nav li:nth-child(3)").addClass('selected');
	}
	
	if($("body#section-programs #nav")) {
		$("body#section-programs #nav li:nth-child(4)").addClass('selected');
	}
	
	if($("body#section-news #nav")) {
		$("body#section-news #nav li:nth-child(6)").addClass('selected');
	}

	if($("#sideBar")) {
		$('#sideBar li:last').addClass('last');
	  $("#sideBar li:has('ul') > a").parent("li").addClass('parent');
		$("#sideBar li:has('ul') > a").parent("li").mouseover(function(){$(this).addClass('parent')});
		$("#sideBar li:has('ul') > a").parent("li").mouseout(function(){$(this).addClass('parent')});

		$('#sideBar li ul').hide();
		$("#sideBar li.selected ul").show();

	}

	if($("#sideBarB .inner")) {
		$('#sideBarB .inner li:last').addClass('last');
	}
	
	if($("table.styled")) {
		$("table.styled tr:nth-child(even)").addClass("odd");
	}
	


	

});