// DUDE, use 'jQuery' to preface commands instead of '$'!
jQuery.noConflict();

jQuery(document).ready(function() {

jQuery("ul.dropdown li").hover(function(){
        jQuery('ul:first',this).css('visibility', 'visible');
    }, function(){
        jQuery('ul:first',this).css('visibility', 'hidden');
});

jQuery("ul.dropdown > li:has(ul)").find("a:first").addClass("downArrow");

jQuery("ul.dropdown li ul li:has(ul)").append('<span class="moreArrow">&raquo;</span>');

jQuery("#sectionNav li ul.children").hide();

jQuery("#sectionNav li.current_page_item ul:first").show(); 

jQuery("#sectionNav li.current_page_ancestor").children('.children').show();

jQuery("#sectionNav li:has(ul)").find("a:first").before('<a href="#" class="showHideText">+</a>');

jQuery('.showHideText').each(function() {
	if( jQuery(this).parent().find('.children:first').is(':visible') ) {
   	 	jQuery(this).html('-');
	}
});
	
jQuery('.showHideText').click(function() {
	jQuery(this).parent().find('.children:first').toggle(0, function() {
		var txt = jQuery(this).parent().find('.children:first').is(':visible') ? '-' : '+';
 		jQuery(this).parent().find('.showHideText:first').html(txt);
	});
return false;
});

jQuery('.showLinkNote').click(function() {
	jQuery(this).next().toggle('medium', function() {
		var txt = jQuery(this).is(':visible') ? '-' : '+';
		jQuery(this).prev().html(txt);
	});
return false;
});
	
jQuery("#sidebar h2").has('a').append('<div class="arrow">></div>');

// home slideshow
if(jQuery(".home").length) {

jQuery('#ssPics').cycle({
    fx:     'fade',
    speed:  '400',
    timeout: 9000,
	next:   '#ssNext', 
    prev:   '#ssPrev'
});

jQuery('#ssPrev, #ssNext').click(function() {
	jQuery('#ssPics').cycle('pause');
});

slidecount = jQuery("#ssPics > div").size();
if(slidecount <= 1){ jQuery('#ssNav').hide(); }

// home display stuff
jQuery("#home-highlights > div:last-child").addClass('last-child');
// jQuery('ul.blogroll li:gt(2)').hide();

}

// event pop-up window
jQuery('a.eventLink').click(function(){
  window.open(jQuery(this).attr("href"), 'event', 'width=550,height=600,scrollbars=1,resizable=1,toolbar=1,menubar=0,');
  return false;
});

});
