﻿jQuery(document).ready(function() {
    jQuery("#login").click(function() {
        jQuery(".LoginPane .ModalLoginPane").slideDown(500);
    });
    jQuery(".Close").click(function() {
        if (jQuery(".LoginPane .ModalLoginPane").css("display") != "none") {
            jQuery(".LoginPane .ModalLoginPane").slideUp(500);
        }
    });
    jQuery(".Language").hover(function() {
        jQuery(".SelectLang").slideDown(500);
    }, function() {

        //Nothing
    });
    //SlideUp Language Pane when click on document
    jQuery(document).click(function(e) {
        var el = jQuery(e.target)
        if (jQuery(!el.is(".Language"))) {
            jQuery(".SelectLang").slideUp(300);
        }
    });
    //Append, Prepend, Replace [tab] to <ul class="tabs"><li><a href="#"><span>tab</span></li></ul>
//    jQuery(".Tabs_box_title .Normal").each(function() {
//        var tab = jQuery(this).html();
//        tab = tab.replace(/\[/g, '<li><a href="#"><span>').replace(/\]/g, '</span></li>');
//        tab = "<ul class='tabs'>" + tab + "</ul>";
//        jQuery(this).html(tab);
//    });
    // setup ul.tabs to work as tabs for each div directly under div.panes
    jQuery(".NamroyalSaysPane ul.tabs").tabs(".NamroyalSaysPane .tabspane");
    jQuery(".ProductPane ul.tabs").tabs(".ProductPane .tabspane");
    jQuery(".OtherPane ul.tabs").tabs(".OtherPane .tabspane");
    jQuery(".YouNeedPane ul.tabs").tabs(".YouNeedPane .tabspane");
});
