// Feracao Design ++ JavaScript Document
jQuery.fn.peekAbooToggle = function(speed, easing, callback) {
  var h = this.height() - parseInt(this.css('paddingTop')) - parseInt(this.css('paddingBottom'));
  return this.animate({marginTop: parseInt(this.css('marginTop')) <0 ? 0 : -h}, speed, easing, callback);
};

jQuery.fn.peekAbooToggleDn = function(speed, easing, callback) {
 this.animate({marginTop: 5}, speed, easing, callback);
};

jQuery.fn.peekAbooToggle2 = function(speed, easing, callback) {
  var h = this.height() - parseInt(this.css('paddingTop')) - parseInt(this.css('paddingBottom'));
  return this.animate({marginTop: parseInt(this.css('marginTop')) <0 ? 0 : -h}, speed, easing, callback);
};

jQuery.fn.peekAbooToggle2Up = function(speed, easing, callback) {
this.animate({marginTop: -150}, speed, easing, callback);
};

	// keep track of currently selected in subnav
	
var selectEl = null;


function mo(el) {
	//remove first indicator
	document.getElementById("first").className += " off";

	
		if ( selectEl ) { // unselect selected
			selectEl.className ='off';
		}
		selectEl = el; // new selected			
			selectEl.className ='current';
		
	}


$(document).ready(function() {
  var $sBox = $('#sushiBox')
  var $pBox = $('#planeBox')
var $aBox = $('#antlersBox')

	 $('#homeLoc').mouseover(function() { $pBox.peekAbooToggle2('slow');
  });
    $('#homeLoc').mouseout(function() { $pBox.peekAbooToggle2Up('slow');
  });
	
  $('#baseConnect').mouseover(function() {  $sBox.peekAbooToggle('slow');
  });
    $('#baseConnect').mouseout(function() { $sBox.peekAbooToggleDn('slow');
  });
	
	$aBox.peekAbooToggle2('slow');
	
	// prep scroll function
	$.localScroll();

});

