;(function($) { // make $ to be jQuery
	$(document).ready(
		function() { // when document is ready, run the following function
			suckerfish.init();
			//alert("document ready is working");
		}
	);

	var suckerfish = { // var = variable, var x = {}  means that x is a object variable (holding other variables)

		selector : "#Nav", // defining the class here so that we can reuse it and change it in one place

		mouseoverIsOn : false,

		overClassName: "over",

		element : null,

		init: function() { // define init as a function
			$(suckerfish.selector+" li").mouseover( // also seehttp://docs.jquery.com/Events/mouseover
				function() {
					if(!suckerfish.mouseoverIsOn) { // only run if mouseover variable is false
						$(this).addClass(suckerfish.overClassName);
						$(this).contents().filter("li").addClass(suckerfish.overClassName); //this = .nav-main element, content function returns everything within it, addClass does what it says
						suckerfish.mouseoverIsOn = true;
					}
				}
			);
			$(suckerfish.selector+" li").mouseout( // also seehttp://docs.jquery.com/Events/mouseover
				function() {
					if(suckerfish.mouseoverIsOn) {
						suckerfish.element = this;
						$(suckerfish.element).removeClass(suckerfish.overClassName); //this = .nav-main element, content function returns everything within it, addClass does what it says
						$(suckerfish.element).contents().filter("li").removeClass(suckerfish.overClassName); //this = .nav-main element, content function returns everything within it, addClass does what it says
						suckerfish.mouseoverIsOn = false;
					}
				}
			);
		}
	}
})(jQuery);
