(function($){$.fn.extend({accordion:function(){var current=0;var currentel=null;return this.each(function(){if($(this).data("accordiated")){return false;}var container=$(this);$.each($(this).find("ul, li>div"),function(){$(this).data("accordiated",true);$(this).hide();});$.each($(this).find("a"),function(){$(this).mouseover(function(e){var imgsrc=$(e.target)[("parent")]("li").find("img")[0].src;container.css("background","transparent url("+imgsrc+") no-repeat scroll left top");if(!currentel){currentel=e.target;}if(currentel!=e.target){currentel=e.target;activate(e.target);}return void (0);});});var active=false;if(location.hash){active=$(this).find("a[href="+location.hash+"]")[0];}else{if($(this).find("li.current")){active=$(this).find("li.current a")[0];}}if(active){activate(active,"toggle","parents");$(active).parents().show();currentel=$(active);}function activate(el,effect,parents){$(el)[(parents||"parent")]("li").toggleClass("active").siblings().removeClass("active").children("ul, div").hide("1");$(el).siblings("ul, div")[(effect||"toggle")]((!effect)?"1":null);}});}});})(jQuery);