/*
 * Francomedia menu slider routines
 * Copyright ©2008 Francomedia.com
 * Built by Cosbit Technologies http://cosbit.com
 */
function Navigation(){this.items=new Array();this.add=function(D){var A=new Object();A.id=D.attr("id");this.items[A.id]=A;A.parent=this;A.MNav=D;A.anchor=D.find("a.mnav");var B=D.find("ul.snav");if(B[0]){if(B.css("display")=="block"){A.width=B.width()}else{B.css({visibility:"hidden",display:"block"});A.width=B.width();B.css({display:"none",visibility:"visible"})}A.sNav=B}var C=D.find("strong.mnav, span.mnav");if(C[0]){A.current=C;A.on=true;this.current=A}A.anchor.hover(function(){Navigation.prototype.showNav(A)},function(){});A.MNav.hover(function(){},function(){Navigation.prototype.hideNav(A)})}}Navigation.prototype.showNav=function(A){if(A.on){return }if(A.parent.current&&!A.current){Navigation.prototype.hideNav(A.parent.current,true)}A.anchor.stop();if(A.current){A.current.attr({"class":"mnav"})}else{A.anchor.attr({"class":"mnav_on"})}A.anchor.css({borderTopColor:"#fff",borderRightColor:"#fff",borderBottomColor:"#fff",borderLeftColor:"#fff"});A.anchor.animate({borderTopColor:"#acacac",borderRightColor:"#acacac",borderBottomColor:"#acacac",borderLeftColor:"#acacac"},"fast");if(A.sNav){A.sNav.css({width:"0px",opacity:"0",display:"block"});A.sNav.stop().animate({width:A.width,opacity:"1"},"fast")}A.on=true};Navigation.prototype.hideNav=function(A,B){if(!A.on){return }if(A.current&&!B){return }A.anchor.stop();if(A.current){A.current.attr({"class":"mnav"})}else{A.anchor.attr({"class":"mnav_on"})}A.anchor.css({borderTopColor:"#acacac",borderRightColor:"#acacac",borderBottomColor:"#acacac",borderLeftColor:"#acacac"});A.anchor.animate({borderTopColor:"#fff",borderRightColor:"#fff",borderBottomColor:"#fff",borderLeftColor:"#fff"},"fast",function(){if(A.current){A.current.attr({"class":"_off"})}else{A.anchor.attr({"class":"mnav"})}});if(A.sNav){A.sNav.stop().animate({width:"0px",opacity:"0"},"fast",function(){A.sNav.css({display:"none"})})}A.on=false};Navigation.prototype.restore=function(){if(this.current){Navigation.prototype.showNav(this.current)}};var oNavigation=new Navigation();$(document).ready(function(){$("#head div.nav li.mnav").each(function(){oNavigation.add($(this))});$("#head div.nav").hover(function(){},function(){oNavigation.restore()})});
