/*
* 简易导航插件
*/ 
(function($){
	var base = this.baseNavigator = function(){
		this.baseNavigator.apply(this, arguments);
	};
	base.prototype = new pnPlugin();
	
	$.extend(true, base.prototype, {
		constructor : pnPlugin,
		$super : pnPlugin.prototype,
		$parent : pnPlugin,
		baseNavigator : function ()
		{
			this.__events__ = [];
			this.__listeners__ = {};
			this.registerEvent('mouseover', 'mouseout');
		},	//end function
		handle : function(/*array*/ $element)
		{
			var data = {};
			var $plugin = this;
			$element.each(function(){
				var profile = JSON.parse($(this).attr('profile'));
				profile.plugin = $plugin;
				profile.element = this;
				data[profile.id] = profile;
				$(this).attr('class', profile.out);
				$('#'+this.id+'_child').css('display','none');
				this.onmouseover = function(){ $plugin.dispatchEvent('mouseover', profile.id); };
				this.onmouseout = function(){ $plugin.dispatchEvent('mouseout', profile.id); };
				this.onclick = function(){ $plugin.dispatchEvent('click', profile.id); };
			});
			this.data(data);
		},
		__selected__ : null,
		selected : function (/*string*/ $dom_id)
		{
			return false;
		},	//end function
		mouse_over : function (/*string*/ $dom_id)
		{
			return false;
		},	//end function
		mouse_out : function (/*string*/ $dom_id)
		{
			return false;
		}	//end function
	} );

})(jQuery);
