$(document).ready(function(e) {
    try {
        //$("body #webmenu").msDropDown();
    } catch(e) {
        alert(e.message);
    }
   // $('select').fixSelect();
    $("body #webmenu").selectbox({
        onChange: function (val, inst) {           
            if(val != '0') $('form#side_sector_form').submit();
        },

        effect: "fade"

    });

    $("body #salary").selectbox({
        onOpen: function(inst){
            $('.topdrop').each(function(index){
                if($(this).attr('id') != 'salary'){                   
                    $('#' + $(this).attr('id') ).selectbox("close");
                }    
            });
            $("body #webmenu").selectbox("close");
        },
        classHolder: 'sbHolder2',
        classSelector: 'sbSelector2',
        classOptions: 'sbOptions2',
        effect: "fade"

    });
    $("body #location").selectbox({
        onOpen: function(inst){
            $('.topdrop').each(function(index){
                if($(this).attr('id') != 'location'){                   
                    $('#' + $(this).attr('id') ).selectbox("close");
                }    
            });  
            $("body #webmenu").selectbox("close");  
        },
        classHolder: 'sbHolder2',
        classSelector: 'sbSelector2',
        classOptions: 'sbOptions2',
        effect: "fade"

    });
    $("body #discipline").selectbox({
        onOpen: function(inst){
            $('.topdrop').each(function(index){
                if($(this).attr('id') != 'discipline'){                   
                    $('#' + $(this).attr('id') ).selectbox("close");
                }    
            });  
            $("body #webmenu").selectbox("close");  
        },
        classHolder: 'sbHolder2',
        classSelector: 'sbSelector2',
        classOptions: 'sbOptions2',
        effect: "fade"

    });
    $("body #perm_temp").selectbox({
        onOpen: function(inst){
            $('.topdrop').each(function(index){
                if($(this).attr('id') != 'perm_temp'){                   
                    $('#' + $(this).attr('id') ).selectbox("close");
                }    
            });   
            $("body #webmenu").selectbox("close"); 
        },
        classHolder: 'sbHolder2',
        classSelector: 'sbSelector2',
        classOptions: 'sbOptions2',
        effect: "fade"

    });
});
