$(document).ready(function() {
$(".carousel-inner").swipe( {
swipeRight:function(event, direction, distance, duration, fingerCount) {
$(this).parent().carousel('prev');
},
swipeLeft: function() {
$(this).parent().carousel('next');
},
threshold:75
});
});
function showHideSubAcct() {
null == jQuery("#inputSubaccountActivate:checked").val() ? jQuery("#subacct-container").removeClass("hidden") : jQuery("#subacct-container").addClass("hidden")
}
function disableFields(t, e) {
e ? jQuery("." + t).attr("disabled", "disabled") : jQuery("." + t).removeAttr("disabled")
}
function checkAll(t, e) {
"." != t[0] && (t = "." + t), jQuery(t).removeAttr("checked"), jQuery(e).is(":checked") && jQuery(t).click()
}
function clickableSafeRedirect(t, e, n) {
var i = t.target.tagName.toLowerCase(),
a = t.target.parentNode.tagName.toLowerCase(),
o = t.target.parentNode.parentNode.parentNode;
return jQuery(o).hasClass("collapsed") ? !1 : void("button" != i && "a" != i && "button" != a && "a" != a && (n ? window.open(e) : window.location.href = e))
}
function popupWindow(t, e, n, i, a) {
var o = (screen.width - n) / 2,
s = (screen.height - i) / 2;
0 > o && (o = 0), 0 > s && (s = 0);
var r = "height=" + i + ",";
r += "width=" + n + ",", r += "top=" + s + ",", r += "left=" + o + ",", r += a, win = window.open(t, e, r), win.window.focus()
}
function addRenewalToCart(t, e) {
jQuery("#domainRow" + t).attr("disabled", "disabled"), jQuery("#domainRow" + t).find("select,button").attr("disabled", "disabled"), jQuery(e).html(' Adding...');
var n = jQuery("#renewalPeriod" + t).val();
jQuery.post("clientarea.php", "addRenewalToCart=1&token=" + csrfToken + "&renewID=" + t + "&period=" + n, function(t) {
jQuery("#cartItemCount").html(1 * jQuery("#cartItemCount").html() + 1), jQuery(e).html(' Added'), jQuery("#btnCheckout").fadeIn()
})
}
function selectChangeNavigate(t) {
window.location.href = $(t).val()
}
function extraTicketAttachment() {
jQuery("#fileUploadsContainer").append('')
}
function dialogSubmit() {
return jQuery("div#twofaactivation form").attr("method", "post"), jQuery("div#twofaactivation form").attr("action", "clientarea.php?action=security"), jQuery("div#twofaactivation form").attr("onsubmit", ""), jQuery("div#twofaactivation form").submit(), !0
}
function getStats(t) {
jQuery.post("serverstatus.php", "getstats=1&num=" + t, function(e) {
jQuery("#load" + t).html(e.load), jQuery("#uptime" + t).html(e.uptime)
}, "json")
}
function checkPort(t, e) {
jQuery.post("serverstatus.php", "ping=1&num=" + t + "&port=" + e, function(n) {
jQuery("#port" + e + "_" + t).html(n)
})
}
function getticketsuggestions() {
currentcheckcontent = jQuery("#message").val(), currentcheckcontent != lastcheckcontent && "" != currentcheckcontent && (jQuery.post("submitticket.php", {
action: "getkbarticles",
text: currentcheckcontent
}, function(t) {
t && (jQuery("#searchresults").html(t), jQuery("#searchresults").hide().removeClass("hidden").slideDown())
}), lastcheckcontent = currentcheckcontent), setTimeout("getticketsuggestions();", 3e3)
}
function refreshCustomFields(t) {
jQuery("#customFieldsContainer").load("submitticket.php", {
action: "getcustomfields",
deptid: $(t).val()
})
}
function autoSubmitFormByContainer(t) {
jQuery("#" + t).find("form:first").submit()
}
function useDefaultWhois(t) {
jQuery("." + t.substr(0, t.length - 1) + "customwhois").attr("disabled", !0), jQuery("." + t.substr(0, t.length - 1) + "defaultwhois").attr("disabled", !1), jQuery("#" + t.substr(0, t.length - 1) + "1").attr("checked", "checked")
}
function useCustomWhois(t) {
jQuery("." + t.substr(0, t.length - 1) + "customwhois").attr("disabled", !1), jQuery("." + t.substr(0, t.length - 1) + "defaultwhois").attr("disabled", !0), jQuery("#" + t.substr(0, t.length - 1) + "2").attr("checked", "checked")
}
function editBillingAddress() {
jQuery("#billingAddressSummary").hide(), jQuery(".cc-billing-address").hide().removeClass("hidden").fadeIn()
}
function showNewCardInputFields() {
jQuery(".cc-details").hasClass("hidden") && jQuery(".cc-details").hide().removeClass("hidden"), jQuery(".cc-details").slideDown(), jQuery("#btnEditBillingAddress").removeAttr("disabled")
}
function hideNewCardInputFields() {
jQuery(".cc-billing-address").slideUp(), jQuery(".cc-details").slideUp(), jQuery("#btnEditBillingAddress").attr("disabled", "disabled"), jQuery("#billingAddressSummary").hasClass("hidden") ? jQuery("#billingAddressSummary").hide().removeClass("hidden").slideDown() : jQuery("#billingAddressSummary").slideDown()
}
function getTicketSuggestions() {
var t = jQuery("#inputMessage").val();
t != lastTicketMsg && "" != t && (jQuery.post("submitticket.php", {
action: "getkbarticles",
text: t
}, function(t) {
t && (jQuery("#autoAnswerSuggestions").html(t), jQuery("#autoAnswerSuggestions").is(":visible") || jQuery("#autoAnswerSuggestions").hide().removeClass("hidden").slideDown())
}), lastTicketMsg = t), setTimeout("getTicketSuggestions()", 3e3)
}
function deleteContact(t, e) {
confirm(t) && (window.location = "clientarea.php?action=contacts&delete=true&id=" + e + "&token=" + csrfToken)
}
jQuery.fn.ForceNumericOnly = function() {
return this.each(function() {
$(this).keydown(function(t) {
var e = t.charCode || t.keyCode || 0;
return 8 == e || 9 == e || 13 == e || 46 == e || 110 == e || 190 == e || e >= 35 && 40 >= e || e >= 48 && 57 >= e || e >= 96 && 105 >= e
})
})
}, jQuery(window).load(function() {
$(window).scrollTop(0), window.location.hash && !$("#suggestionSearchResults").length && "#necessary-papers" != window.location.hash && $('[href="' + window.location.hash + '"]').length > 0 && ($('[href="' + window.location.hash + '"]').click(), "#tabOverview" != window.location.hash && "#tabNameservers" != window.location.hash && "#tabAddons" != window.location.hash && $("html, body").animate({
scrollTop: $(window.location.hash).offset().top - 300
}, 500)), "#necessary-papers" == window.location.hash && ($('[href="' + window.location.hash + '"]').click(), $("html, body").animate({
scrollTop: $("[href=" + window.location.hash + "]").offset().top - 80
}, 500)), $("#suggestionSearchResults").length && ($('[href="' + window.location.hash + '"]').length > 0 && $('[href="' + window.location.hash + '"]').click(), $("html, body").animate({
scrollTop: $(".domainchecker-tabs").offset().top - 120
}, 500))
}), $(document).ajaxComplete(function() {
$(".checkbox").length && $(".checkbox").iCheck({
checkboxClass: "icheckbox_flat-blue"
})
}), jQuery(document).ready(function() {
var frmTwoFactorActivation = $('input[name=2fasetup]').parent('form');
frmTwoFactorActivation.submit(function(e) {
e.preventDefault();
openModal(frmTwoFactorActivation.attr('action'), frmTwoFactorActivation.serialize(), 'Loading...');
});
/**
* Code will loop through each element that has the class markdown-editor and
* enable the Markdown editor.
*/
var count = 0,
editorName = 'clientMDE',
counter = 0;
jQuery(".markdown-editor").each(function( index ) {
count++;
var autoSaveName = jQuery(this).data('auto-save-name'),
footerId = jQuery(this).attr('id') + '-footer';
if (typeof autoSaveName == "undefined") {
autoSaveName = 'client_area';
}
window[editorName + count.toString()] = jQuery(this).markdown(
{
footer: '
',
autofocus: false,
savable: false,
resize: 'vertical',
iconlibrary: 'fa',
language: locale,
onShow: function(e){
var content = '',
save_enabled = false;
if(typeof(Storage) !== "undefined") {
// Code for localStorage/sessionStorage.
content = localStorage.getItem(autoSaveName);
save_enabled = true;
if (content && typeof(content) !== "undefined") {
e.setContent(content);
}
}
jQuery("#" + footerId).html(parseMdeFooter(content, save_enabled, saved));
},
onChange: function(e){
var content = e.getContent(),
save_enabled = false;
if(typeof(Storage) !== "undefined") {
counter = 3;
save_enabled = true;
localStorage.setItem(autoSaveName, content);
doCountdown();
}
jQuery("#" + footerId).html(parseMdeFooter(content, save_enabled));
},
onPreview: function(e){
var originalContent = e.getContent(),
parsedContent;
jQuery.ajax({
url: 'clientarea.php',
async: false,
data: {token: csrfToken, action: 'parseMarkdown', content: originalContent},
success: function (data) {
parsedContent = JSON.parse(data);
}
});
return parsedContent.body ? parsedContent.body : '';
},
additionalButtons: [
[{
name: "groupCustom",
data: [{
name: "cmdHelp",
title: "Help",
hotkey: "Ctrl+F1",
btnClass: "btn open-modal",
href: "submitticket.php?action=markdown",
icon: {
glyph: 'glyphicons glyphicons-question-sign',
fa: 'fa fa-question-circle',
'fa-3': 'icon-question-sign'
},
callback: function(e) {
e.$editor.removeClass("md-fullscreen-mode");
},
additionalAttr: [
{
name: 'data-modal-title',
value: markdownGuide
}
]
}]
}]
]
});
jQuery(this).closest("form").bind({
submit: function() {
if(typeof(Storage) !== "undefined") {
localStorage.removeItem(autoSaveName);
}
}
});
});
// Email verification
jQuery('#btnResendVerificationEmail').click(function() {
jQuery.post('clientarea.php',
{
'token': csrfToken,
'action': 'resendVerificationEmail'
}).done(function(data) {
jQuery('#btnResendVerificationEmail').prop('disabled', true);
});
});
/**
* Parse the content to populate the markdown editor footer.
*
* @param {string} content
* @param {bool} auto_save
* @param {string} [saveText]
* @returns {string}
*/
function parseMdeFooter(content, auto_save, saveText)
{
saveText = saveText || saving;
var pattern = /[a-zA-Z0-9_\u0392-\u03c9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,
m = [],
word_count = 0,
line_count = 0;
if (content) {
m = content.match(pattern);
line_count = content.split(/\\r\\n|\\r|\\n/).length;
}
for(var i = 0; i < m.length; i++) {
if(m[i].charCodeAt(0) >= 0x4E00) {
word_count += m[i].length;
} else {
word_count += 1;
}
}
return 'lines: ' + line_count
+ ' words: ' + word_count + ''
+ (auto_save ? ' ' + saveText + '' : '')
+ '
';
}
var musteriyorumsayfa = 2;
/**
* Countdown the save timeout. When zero, the span will update to show saved.
*/
function doCountdown()
{
if (counter >= 0) {
if (counter == 0) {
jQuery("span.markdown-save").html(saved);
}
counter--;
setTimeout(doCountdown, 1000);
}
}
$(document).on("click", ".smenu a", function(t) {
$(".nav.nav-tabs.nav-tabs-overflow.domain-tab-container li.active").removeClass("active")
}), $("#inputCardNumber").on("contextmenu", function() {
return !1
}), $('div[style="margin:0 0 10px 0;padding:10px 35px;background-color:#ffffd2;color:#555;font-size:16px;text-align:center;"]').remove(), $('p[style="text-align:center;"]').remove(), $(".scrollbar-macosx").scrollbar(), $(".add-form-control").length && $(".add-form-control").find("input, select").addClass("form-control"), $(".ccKeyboard").length && $('').appendTo(".ccKeyboard"), $(".ccKeyboard input").focus(function() {
$(this).closest(".ccKeyboard").find("#cckeyboard").fadeIn("fast")
}), $(".ccKeyboard input").ForceNumericOnly(), $(document).on("click", ".cck-nums span", function() {
var t = $(this).html(),
e = $(this).closest(".ccKeyboard").find("input").first();
$(this).hasClass("ccdelete") ? e.val(e.val().slice(0, -1)) : e.val(e.val() + t)
}), $("#type").change(function(t) {
$(".bootstrap-select").removeClass("open")
}), $("#main-menu .navbar-nav > li").mouseenter(function() {
$("#main-menu .navbar-nav > li.dropdown.open").length > 0 && !$(this).hasClass("open") && $(this).find("a").first().click()
});
var t = Math.max.apply(Math, $(".license-block img+p").map(function() {
return $(this).height()
}));
$(".license-block img+p").height(t);
var e = Math.max.apply(Math, $(".departments-container > div p").map(function() {
return $(this).height()
}));
$(".departments-container > div p").height(e);
var n = Math.max.apply(Math, $(".kb-block").map(function() {
return $(this).height()
}));
if ($(".kb-block").height(n), $(".table-reseller").first().find("tbody").find("tr").first().find("td").each(function() {
var t = $(this).index(),
e = $(this).width();
$("table:not(:first)").each(function() {
$(this).find("tbody").find("tr").first().find("td").eq(t).width(e)
})
}), $(".table-reseller-v2").first().find("tbody").find("tr").first().find("td").each(function() {
var t = $(this).index(),
e = $(this).width();
$("table").each(function() {
$(this).find("tbody").find("tr").first().find("td").eq(t).width(e)
})
}), $(".price-dd").length > 0 && $(".price-dd").each(function(t) {
var e = $(this).find("ul li.active");
$(this).find(".price").html(e.text()), $(this).next(".btn-cart").attr("href", e.attr("data-href"))
}), $("[data-slide]").click(function(t) {
t.preventDefault()
}), $(".price-dd .dropdown-menu li").click(function() {
var t = $(this);
t.parents("ul").siblings(".btn").find(".price").text(t.text()), t.siblings("li").removeClass("active"), t.addClass("active"), t.parents(".dropdown").siblings(".btn-cart").attr("href", t.attr("data-href")), t.closest(".price-dd").removeClass("open")
}), $(".selectpicker").on("loaded.bs.select", function(t) {
$(".bootstrap-select.btn-group .dropdown-menu li").click(function() {
$(".bootstrap-select.open").removeClass("open")
})
}), $("#inputDomain").length > 0 && "" != $("#inputDomain").val() && $("#btnCheckAvailability").click(), $(".ttip").tooltip({
placement: "bottom"
}), $(".ttipv2").tooltip({
placement: "bottom"
}), $(".ttipv3").tooltip({
placement: "bottom",
html: !0
}), $(document).on("click", ".dc-tab", function(t) {
var e = $(this).attr("href").substring($(this).attr("href").indexOf("#"));
return $("[href=" + e + "]").length > 0 ? ($("[href=" + e + "]").click(), $("html, body").animate({
scrollTop: $("[href=" + e + "]").offset().top - 150
}, 500), !1) : void 0
}), $(document).on("click", ".load-more-comments", function(t) {
t.preventDefault();
var e = 'https://www.guzel.net.tr/musteriyorumlari.php?sayfa='+musteriyorumsayfa;
return $.ajax({
url: e,
data: {
start: $(".comment-item").length,
limit: 3
},
beforeSend: function() {
$(".load-more-comments").find("i").toggleClass("fa-spinner fa-spin")
},
error: function() {},
success: function(t) {
musteriyorumsayfa = musteriyorumsayfa+1;
"" == t ? $(".load-more-comments").slideUp().remove() : ($(".comments").append(t), $(".load-more-comments").find("i").toggleClass("fa-spinner fa-spin"))
},
type: "GET"
}), !1
}), $(document).on("click", "#homepage-transfer", function(t) {
$('[name="direct"]').remove(), $(this).closest("form").attr("action", "cart.php?a=add"), $(this).closest("form").find('[name="domain"]').attr("name", "sld"), $("").attr({
type: "hidden",
value: "transfer",
name: "domain"
}).appendTo($(this).closest("form"))
}), $(document).on("click", ".hd-tlds-active", function(t) {
return $(".hd-tlds-others").fadeToggle(), !1
}), $(".hd-tlds-others input").on("ifToggled", function(t) {
var e = "";
return e = $(".hd-tlds-others input:checked").length > 1 ? "çoklu" : 1 == $(".hd-tlds-others input:checked").length ? $(".hd-tlds-others input:checked").val() : "uzantý seçiniz", $("#tld").val("." + e), $(".hd-tlds-active span").html(e), !1
}), $(".hd-tlds-others input:checked").length || $('.hd-tlds-others input[value="com"]').iCheck("check"), $(document).on("click", ".hd-tlds-others-more > a", function(t) {
return $(this).hide(), $(".hd-tlds-others-more > div").slideDown(), !1
}), $(document).on("click", ".tt > li > a", function(t) {
var e = $($(this).closest(".nav").attr("data-target"));
return e.find(".tt-prices").children().hide(), e.find(".tt-links").children().hide(), $($(this).attr("href").replace("#", ".")).css("display", "inline-block"), !1
}), $(".os-toggle-shell").click(function() {
var t = $(this),
e = t.find(".os-toggle-btn");
"left" == e.data("position") ? (e.data("position", "right"), e.animate({
left: "54px"
}, 200, function() {
t.siblings(".package-os").removeClass("active"), t.siblings(".os-win").addClass("active"), $(this).closest(".os-toggle-container").next(".p-os-linux").next(".p-os-win").show(), $(this).closest(".os-toggle-container").next(".p-os-linux").hide()
})) : (e.data("position", "left"), e.animate({
left: "5px"
}, 200, function() {
t.siblings(".package-os").removeClass("active"), t.siblings(".os-linux").addClass("active"), $(this).closest(".os-toggle-container").next(".p-os-linux").next(".p-os-win").hide(), $(this).closest(".os-toggle-container").next(".p-os-linux").show()
}))
}), $(".package-os").click(function() {
var t = $(this);
return t.hasClass("active") ? !1 : void(t.hasClass("os-linux") ? t.siblings(".os-toggle-shell").data("position", "right").click() : t.siblings(".os-toggle-shell").data("position", "left").click())
}), $("[data-toggle=offcanvas]").click(function() {
$(".row-offcanvas").toggleClass("active")
}), $("#nav").affix({
offset: {
top: 150
}
}), $(".checkbox").iCheck({
checkboxClass: "icheckbox_flat-blue"
}), $(document).on("click", ".thm-profile-notifications", function(t) {
return $(".thm-sub-notifications").fadeToggle("fast"), !1
}), $(document).on("click", ".dropdown-menu", function(t) {
"A" != t.target.nodeName && "hsm-image" != t.target.className && t.stopPropagation()
}), $(document).on("click", "body", function(t) {
$(t.target).hasClass("thm-customer-name") || $(t.target).hasClass("thm-profile-login") || 0 != $(t.target).parents(".thm-sub-menu").length || $(".thm-sub-menu").fadeOut("fast"), $(".thm-sub-notifications").fadeOut("fast"), $(t.target).closest(".hd-tlds-others").length || $(".hd-tlds-others").fadeOut("fast"), $(t.target).closest(".ccKeyboard").length || $("#cckeyboard").fadeOut("fast")
}), $(document).on("submit", "form.homepage-domaincheckerform", function(t) {
$(".hd-tlds-others input:checked").length || $('.hd-tlds-others input[value="com"]').iCheck("check")
}), $(document).on("click", ".thm-customer-name, .thm-profile-login", function(t) {
return $(".thm-sub-menu").fadeToggle("fast"), !1
}), jQuery(document).on("click", ".aggrement-read", function() {
return $(".aggrement-contents > div").hide(), $(".aggrement-item").removeClass("selected"), $(this).closest(".aggrement-item").addClass("selected"), $($(this).attr("href")).show(), !1
}), jQuery(document).on("click", ".help-item > a", function() {
return $(this).find("i").toggleClass("fa-minus"), $(this).next("div").find("p").slideToggle(), !1
}), jQuery(document).on("click", ".r-accordion > a", function() {
return $(this).find("i").toggleClass("fa-minus"), $(this).next("div").slideToggle(), !1
}), jQuery("#languageChooser").popover({
container: "body",
placement: "bottom",
template: '',
html: !0,
content: function() {
return jQuery("#languageChooserContent").html()
}
}), jQuery("#loginOrRegister").popover({
container: "body",
placement: "bottom",
template: '',
html: !0,
content: function() {
return jQuery("#loginOrRegisterContent").html()
}
}), jQuery("#accountNotifications").popover({
container: "body",
placement: "bottom",
template: '',
html: !0,
content: function() {
return jQuery("#accountNotificationsContent").html()
}
}), jQuery('[data-toggle="popover"]').popover({
html: !0
}), jQuery("body").on("click", function(t) {
jQuery('[data-toggle="popover"]').each(function() {
jQuery(this).is(t.target) || 0 !== jQuery(this).has(t.target).length || 0 !== jQuery(".popover").has(t.target).length || jQuery(this).popover("hide")
})
}), jQuery(".list-group-tab-nav a").click(function() {
if (jQuery(this).hasClass("disabled")) return !1;
jQuery(".list-group-tab-nav a").removeClass("active"), jQuery(this).addClass("active");
this.href.split("#")[1]
}), "" != jQuery(location).attr("hash").substr(1)) {
var i = jQuery(location).attr("hash");
jQuery(".page-bottom-tabs .tab-pane").removeClass("active"), jQuery(i).removeClass("fade").addClass("active"), jQuery(".page-bottom-tabs").find('[href="#' + i + '"]').length || jQuery(".page-bottom-tabs").find(".tab-pane").first().addClass("active"), jQuery(".list-group-tab-nav a").removeClass("active"), jQuery('a[href="' + i + '"]').addClass("active"), setTimeout(function() {
window.scrollTo(0, 0)
}, 1)
}
jQuery(".panel-collapsable .panel-heading").click(function(t) {
var e = jQuery(this);
e.parents(".panel").hasClass("panel-collapsed") ? (e.parents(".panel").removeClass("panel-collapsed").find(".panel-body").slideDown(), e.find(".collapse-icon i").removeClass("fa-plus").addClass("fa-minus")) : (e.parents(".panel").addClass("panel-collapsed").find(".panel-body").slideUp(), e.find(".collapse-icon i").removeClass("fa-minus").addClass("fa-plus"))
}), "#frmLogin".length > 0 && jQuery("#frmLogin input:text:visible:first").focus(), "#twofaactivation".length > 0 && jQuery("#twofaactivation input:text:visible:first,#twofaactivation input:password:visible:first").focus(), jQuery("#inputSubaccountActivate").click(function() {
null != jQuery("#inputSubaccountActivate:checked").val() ? jQuery("#subacct-container").removeClass("hidden") : jQuery("#subacct-container").addClass("hidden")
}), jQuery(".setBulkAction").click(function(t) {
t.preventDefault();
var e = jQuery(this).attr("id").replace("Link", "");
if (0 != jQuery("#" + e).length) {
var n = jQuery("#domainForm").attr("action");
jQuery("#domainForm").attr("action", n + "#" + e)
}
jQuery("#bulkaction").val(e), jQuery("#domainForm").submit()
}), jQuery(".stopEventBubble").click(function(t) {
t.stopPropagation()
}), jQuery(".tabControlLink").on("click", function(t) {
t.preventDefault();
var e = jQuery(this).attr("href");
jQuery("a[href='/" + e + "']").click()
}), jQuery(".ticket-reply .rating span.star").click(function(t) {
window.location = "viewticket.php?tid=" + jQuery(this).parent(".rating").attr("ticketid") + "&c=" + jQuery(this).parent(".rating").attr("ticketkey") + "&rating=rate" + jQuery(this).parent(".rating").attr("ticketreplyid") + "_" + jQuery(this).attr("rate")
}), jQuery("a.autoLinked").click(function(t) {
t.preventDefault();
var e = window.open();
e.opener = null, e.location = t.target.href
}), jQuery(".client-tickets .buttons-container button").click(function(t) {
var e = jQuery("#tableTicketsList").DataTable();
if (jQuery(this).hasClass("active")) jQuery(this).removeClass("active"), e.column(3).search("").draw();
else {
var n = ($(this), $(this).attr("data-original-title"));
jQuery(this).siblings("button").removeClass("active"), jQuery(this).addClass("active");
var i = "\\s*" + jQuery.fn.dataTable.util.escapeRegex(n) + "\\s*";
e.column(3).search(i, !0, !1, !0).draw()
}
t.preventDefault()
})
});
var lastTicketMsg;