function SaveFeedback(){return $.ajax({url:"/Privat/Feedback",type:"post",data:{checksum:$("#checksum").val(),commentType:$("#commentType").val(),comment:$("#comment").val()}}).done(function(){votedItem.addClass("useful-text").css("display","block");votedItem.html('<span class="medium">Tack för att du bidrar med dina synpunkter.<\/span>');$("#comment").val("");$("#modalComment").modal("hide")}),!1}function HidePopup(){$("#modalComment").modal("hide")}function OnContactFormSuccess(n){n.Status==="OK"?($(this).append('<div class="cover-up"><div class="center-content">Tack, vi har mottagit ditt meddelande och återkommer så snart som möjligt.<\/div><\/div>'),ga("send","pageview","/lead/foretag/tack-"+n.Subject),$(this).data("busy",!0),$("html, body").animate({scrollTop:$(".center-content",$(this)).offset().top-85},600)):$("#divErrorAlert").length?$("#divErrorAlert").html(n.Error).show():alert(n.Error)}function OnCorporateProductLeadFormSuccess(n){n.Status==="OK"?($(this).append('<div class="cover-up"><div class="center-content">Vi har tagit emot er förfrågan och återkommer inom kort.<\/div><\/div>'),ga("send","pageview","/lead/foretag/tack-"+n.Product),$(this).data("busy",!0),$("html, body").animate({scrollTop:$(this).offset().top-85},600)):alert(n.Error)}function OnContactFormBegin(){if($(this).data("busy"))return!1;$(this).data("busy",!0);window.Loader(1)}function OnContactFormFailure(){alert("Hoppsan, något blev fel, försök igen eller kontakta kundservice.")}function OnContactFormComplete(){$(this).data("busy",!1);window.Loader(0)}var votedItem=!1;$(document).ready(function(){$(".was-it-useful .useful-buttons a").click(function(n){if(n.preventDefault(),$(this).attr("id")==="YESbtn"||$(this).attr("id")==="NObtn"){var t=$(this).attr("id")==="YESbtn"?!0:!1,i=window.location.pathname;votedItem=$(this).parent();$.ajax({url:"/Privat/VoteTroubleshoot",type:"post",data:{path:i,vote:t}}).done(function(n){$("#modalComment").modal("hide");t===!0?(votedItem.addClass("useful-text").css("display","block"),votedItem.html('<span class="medium">Tack för att du bidrar med dina synpunkter.<\/span>')):($("#divComment").html(n),$("#modalComment").modal("show"))})}});$(".faq-vote").click(function(n){n.preventDefault();var t=$(this).attr("data-vote");votedItem=$(this).parent();$.ajax({url:"/Privat/VoteFAQ",type:"post",data:{id:$(this).parents(".faq-item").attr("data-itemid"),vote:t==="1"?!0:!1}}).done(function(n){$("#modalComment").modal("hide");t==="1"?(votedItem.addClass("useful-text").css("display","block"),votedItem.html('<span class="medium">Tack för att du bidrar med dina synpunkter.<\/span>')):($("#divComment").html(n),$("#modalComment").modal("show"))})});$("#CommentForm [name=comment]").on("input",function(){$("#charcount").html($(this).val().length)});$("#InterestedServiceType :checkbox").change(function(){var n="";$.each($("#InterestedServiceType :checkbox:checked"),function(){n+=$(this).val()+", "});$("#ServiceType").val($.trim(n,", "))})})