/* 

Bootup Script
v. 2.0

last mod: 6-11-09
by: Mark

jQuery calls.


*/


/*################################################################################## */

$(document).ready(function() {
	
	if ($('.anatomy').length > 0) {
		$('.description').addClass('fixed').fadeOut();
		var current = '#pull-rails';
		$('.anatomy-nav a').click(function() {
			$(current).fadeOut('slow');
			var next = $(this).attr('href');
			var height = $(next).height();
			if (height < 580) { height = 500 }
			$('#content').animate({ 
				paddingBottom: height - 200 + 'px'
			}, 800);
			$(next).fadeIn('slow');
			current = next;
			return false;
		});
	}
	
	if ($('.calculator').length > 0) {
		$('#calculate').click( function() {
			if ($('#site').val() != '') {
				$('.savings').remove();
				$('.calculator').append('<div class="savings"></div>');
				$('.savings').text('You will save: ' + $('#site').val() + '!');
			}
		});
	}
	
},function(){});