$(function () {
responsiveNav ();
$('ul.main-nav a').each(function () {
if (this.href === location.href) $(this).parent().addClass('active');
});
});
function responsiveNav () {
var html = '';
var cloned = $('.main-nav > li').clone ();
var container = $('<div>', { id: 'responsive-nav' });
var items = $('<ul>', { id: 'responsive-nav-items' });
var trigger = $('<div>', { id: 'responsive-nav-trigger', text: 'Navigate...' });
container.appendTo ('#nav .container');
items.appendTo (container);
items.append (cloned);
items.find ('li').removeClass ('dropdown');
items.find ('ul').removeClass ('dropdown-menu');
items.find ('.caret').remove ();
items.append (html);
trigger.bind ('click', function (e) {
items.slideToggle ();
trigger.toggleClass ('open');
});;
trigger.prependTo (container);
}
$(document).ready(function () {
$("#apillation").click(function () {
$(this).remove();
$("#loading").show();
var link = $("#viewban").attr("href");
var bid = $("#viewban").attr("href");
if (bid.match(/[^0-9]/g)) {
bid = bid.replace(/[^0-9]/g, '');
var data = {
'bid': bid,
'link': link
};
}
$.ajax({
type: "POST",
url: "/unban.php",
data: data,
success: function (json) {
var width = 550;
window.location.href = json;
console.log(json);
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
}
});
});
});