/*
 * Horizontal Navigation v2.2
 *
 * © 2008 Copyright, all right reserved, Tom Flídr, Czech (tomflidr@gmail.com)
 * This SOFTWARE is under the MIT (http://en.wikipedia.org/wiki/MIT_License)
 * jQuery 1.2.6+
 *
 */

$.fn.horizontalNavi=function(c,d){if(d==undefined){d=1};var e=150;var f=1;var g=0;var h=c.substr(1,c.length);var j=h+'-a-bg';var l=h+'-space-bg';var m='span';var n='td';var o='a';var p='tabindex';var q='px';var r='<span>';var s='</span>';var t='">';var u=':nth-child(';var v=')';var w='<';var x=' class="';var y=function(i,a,b){if(b){if(i>0&&$(a).children().is(o)&&$(a).parent().children(m+u+(i+f)+v).children().is(o)){$(a).parent().children(m+u+(i+f-1)+v).after(w+m+x+l+t+r+s+s);f++}}else{if(i>0&&$(a).children().is(o)&&$(a).parent().children(n+u+(i+f)+v).children().is(o)){$(a).parent().children(n+u+(i+f-1)+v).after(w+n+x+l+t+r+s+'</td>');f++}};if($(a).children().is(o)){if(d!=false){$(a).children().attr(p,d+g);d++};$(a).append(w+m+x+j+t+r+s+s);$(a).children(m).css({width:$(a).width()+q,opacity:0});$(a).css({width:$(a).children(m).width()+q});if(b&&$.browser.msie&&parseInt($.browser.version)<8){$(a).children(m).css({'margin-left':(-$(a).width())+q})};$(a).children(o).hover(function(){$(this).parent().children(m).fadeTo(e,1)},function(){$(this).parent().children(m).fadeTo(e,0)});$(a).children(o).focus(function(){$(this).parent().children(m).fadeTo(e,1)});$(a).children(o).blur(function(){$(this).parent().children(m).fadeTo(e,0)})}else{if(d!=false){$(a).children(':input').each(function(k){$(this).attr(p,(d+g));g++})}}};if($(c).is('div')){$(c).children().each(function(i){y(i,this,true)})}else if($(c).is('table')){$(c).children().children().children().each(function(i){y(i,this,false)})};return d};

