$(function(){
	makeSlider('#slider', 'boxRain', 500, 6000, 'num');	
/*	$(window).load(function() {
		$('#slider').nivoSlider();
	});
*/	var url = window.location.pathname;
	var filename = url.substring(url.lastIndexOf('/')+1);
	$('#subtop ul.nav li a').each(function(){
		if($(this).attr('href') == filename) {
			$(this).addClass('current');
		}
	});

	 $('.planned-service #submain').append('<a href="#">[<span class="plusminus">+</span>] <span class="info-link">Click here to view the typical scope of work for Spring and Fall</span></a>').children('ol').hide();
	 $('.planned-service #submain a').each(function() {
	 	$(this).toggle(function() {
			$(this).parent().children('ol').slideDown();
			$(this).children('span.plusminus').text('-');
			$(this).children('span.info-link').text('Click to hide info');
			$(this).parent().children('h3').attr('id', 'current-person');
			return false;
		}, function() {
			var new_position = $('#current-person').offset();
			window.scrollTo(new_position.left,new_position.top);
			$(this).parent().children('ol').slideUp();	
			$(this).children('span.plusminus').text('+');
			$(this).children('span.info-link').text('Click here to view the typical scope of work for Spring and Fall');
			$(this).parent().children('h3').attr('id', '');
		});
	 });

	
	pikachoose('#pikame', true, true, true);
});
