function Manset(id, link) {
    //var height = $("#mansetler").children().height();
    $(link).parent().siblings().removeClass("current");
    $(link).parent().addClass("current");
    $("#mansetler").children().hide();
    $("#manset_" + id).show();
    //var newheight = $("#mansetler").children().height();
    //if (newheight < height) $("#mansetler").height(height);

}
function add_autocomplete(id, url, hint, populate, newelements) {
   $("#" + id).tokenInput(url,  {
            hintText: hint,
            noResultsText: "Sonuç bulunamadı",
            searchingText: "Aranıyor...",
            prePopulate: populate,
            allowNewValues: newelements,
       classes: {
                tokenList: "token-input-list-facebook",
                token: "token-input-token-facebook",
                tokenDelete: "token-input-delete-token-facebook",
                selectedToken: "token-input-selected-token-facebook",
                highlightedToken: "token-input-highlighted-token-facebook",
                dropdown: "token-input-dropdown-facebook",
                dropdownItem: "token-input-dropdown-item-facebook",
                dropdownItem2: "token-input-dropdown-item2-facebook",
           selectedDropdownItem: "token-input-selected-dropdown-item-facebook",
           inputToken: "token-input-input-token-facebook"
       }
   });
    if (!newelements) {
        $("#" + id).siblings().first().sortable({update: function(event, ui) {
            var a = $("#" + id).siblings().first().sortable('serialize',{key: 'del'});
            a = a.replace(/del=/g, "").replace(/&/g, ",");
            $("#" + id + "_order").val(a);
        }});
    }
}

function showImgSpinner(message) {
    $('#imgspinner').html("<h2>" + message + "</h2>");
    $('#imgspinner').show();
}