<!-- preferences -->
<div class="toolbarTabs">
    <ul id="preferencesTabs" class="tab-menu">
        <li id="PrefBehaviorLink" class="selected"><a>QBT_TR(Behavior)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefDownloadsLink"><a>QBT_TR(Downloads)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefConnectionLink"><a>QBT_TR(Connection)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefSpeedLink"><a>QBT_TR(Speed)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefBittorrentLink"><a>QBT_TR(BitTorrent)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefRSSLink"><a>QBT_TR(RSS)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefWebUILink"><a>QBT_TR(WebUI)QBT_TR[CONTEXT=OptionsDialog]</a></li>
        <li id="PrefAdvancedLink"><a>QBT_TR(Advanced)QBT_TR[CONTEXT=OptionsDialog]</a></li>
    </ul>
    <div class="clear"></div>
</div>

<script>
    "use strict";

    (function() {
        // Tabs
        MochaUI.initializeTabs("preferencesTabs");

        $("PrefBehaviorLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("BehaviorTab").removeClass("invisible");
        });
        $("PrefDownloadsLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("DownloadsTab").removeClass("invisible");
        });
        $("PrefConnectionLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("ConnectionTab").removeClass("invisible");
        });
        $("PrefSpeedLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("SpeedTab").removeClass("invisible");
        });
        $("PrefBittorrentLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("BittorrentTab").removeClass("invisible");
        });
        $("PrefRSSLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("RSSTab").removeClass("invisible");
        });
        $("PrefWebUILink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("WebUITab").removeClass("invisible");
        });
        $("PrefAdvancedLink").addEvent("click", (e) => {
            $$(".PrefTab").addClass("invisible");
            $("AdvancedTab").removeClass("invisible");
        });
    })();
</script>
