<!-- preferences -->
<div class="toolbarTabs">
    <menu id="preferencesTabs" class="tab-menu">
        <li id="PrefBehaviorLink" class="selected">
            <a><img alt="QBT_TR(Behavior)QBT_TR[CONTEXT=OptionsDialog]" src="images/preferences-desktop.svg" width="16" height="16">QBT_TR(Behavior)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefDownloadsLink">
            <a><img alt="QBT_TR(Downloads)QBT_TR[CONTEXT=OptionsDialog]" src="images/download.svg" width="16" height="16">QBT_TR(Downloads)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefConnectionLink">
            <a><img alt="QBT_TR(Connection)QBT_TR[CONTEXT=OptionsDialog]" src="images/network-connect.svg" width="16" height="16">QBT_TR(Connection)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefSpeedLink">
            <a><img alt="QBT_TR(Speed)QBT_TR[CONTEXT=OptionsDialog]" src="images/slow_off.svg" width="16" height="16">QBT_TR(Speed)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefBittorrentLink">
            <a><img alt="QBT_TR(BitTorrent)QBT_TR[CONTEXT=OptionsDialog]" src="images/preferences-bittorrent.svg" width="16" height="16">QBT_TR(BitTorrent)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefRSSLink">
            <a><img alt="QBT_TR(RSS)QBT_TR[CONTEXT=OptionsDialog]" src="images/application-rss.svg" width="16" height="16">QBT_TR(RSS)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefWebUILink">
            <a><img alt="QBT_TR(WebUI)QBT_TR[CONTEXT=OptionsDialog]" src="images/preferences-webui.svg" width="16" height="16">QBT_TR(WebUI)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
        <li id="PrefAdvancedLink">
            <a><img alt="QBT_TR(Advanced)QBT_TR[CONTEXT=OptionsDialog]" src="images/preferences-advanced.svg" width="16" height="16">QBT_TR(Advanced)QBT_TR[CONTEXT=OptionsDialog]</a>
        </li>
    </menu>
    <div class="clear"></div>
</div>

<script>
    "use strict";

    (() => {
        // Tabs
        MochaUI.initializeTabs("preferencesTabs");

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