// JavaScript Document

// Add .last on the last element
$("#tabs li:last-child").addClass("last");

if (!window.$$) {
  window.$$ = function(id) { return document.getElementById(id); }
}

if ($$('tabs')) {
    var tabs = $$('tabs').getElementsByTagName("li");
    for (var i = 0; i < tabs.length; ++i) {
        tabBorder.render(tabs[i]);
    }
}

if ($$('secondNav')) {
    var topTabs = $$('secondNav').getElementsByTagName("li");
    for (var i = 0; i < topTabs.length; ++i) {
        topTabBorder.render(topTabs[i]);
    }
}

$("ul#tabs li").hover(
	function() {
	    $(this).stop().animate({ marginTop: "0px" }, 400);
	},
	function() {
	    $(this).stop().animate({ marginTop: "10px" }, 200);
	}
);