/*
 * 
 *
 * Version 1.0.0  (28.01.2008)
 *
 * Dual licensed under the MIT and GPL licenses.
 *
 * http://www.golocal.de
*/

//
// create closure
//
(function($) {
	/*****************************************/
	/***         plugin definition         ***/
	/*****************************************/

	var opts, oTimer;
	
	// Begin fn.glSubNav
	jQuery.fn.glSubNav = function(options){
				
		// build main options before element iteration
		opts = $.extend({}, $.fn.glSubNav.defaults, options);

		return this.each (function() {
			var $this = $(this);

			// Support the metadata-plugin 
			var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
			
			// get url and check for "meinGolocal"
			// return in that case
			var url = location.href;
			//if ( url.indexOf("meinGolocal") != "-1" ) return;
			
			// otherwise set hover-handler for layer
			$this
				.hover(
					function(){
						//console.log("hover", $this);
						$this
							.addClass("hover")
							.find("div.subNavLayer")
							.show();
						
					},
					function(){
						//console.log("hover out", $this);
						$this
							.removeClass("hover")
							.find("div.subNavLayer")
							.hide();
					}
				);
		});

	}; // End fn.glSubNav	

	/*****************************************/
	/***         plugin defaults           ***/
	/*****************************************/

	$.fn.glSubNav.defaults = {
	};

	/*****************************************/
	/***         private functions         ***/
	/*****************************************/


	
	/*****************************************/
	/***          public functions         ***/
	/*****************************************/
	


//
// end of closure
//
})(jQuery);
