function mainVideoCookieControl(){if($(".main-bg-video").length>0){var n=GetMyCookie("MainVideoDisplay");null!=n?"open"==n?($(".chb-main-display").iCheck("check"),$(".top-area-video-content").removeClass("display-none"),$(".top-area-slider-content").addClass("display-none")):($(".chb-main-display").iCheck("uncheck"),$(".top-area-video-content").addClass("display-none"),$(".top-area-slider-content").removeClass("display-none")):($(".top-area-video-content").removeClass("display-none"),$(".top-area-slider-content").addClass("display-none"),$(".chb-main-display").iCheck("check"))}else $(".main-video-display").remove(),$(".top-area-slider-content").removeClass("display-none")}function LoadResources(){$("res").each(function(){var n=$(this).attr("data-key");$(this).html(GetResourceValue(n))}),$(".langplace").each(function(){var i=$(this).attr("resplace"),n=$(this).parent(),t=n.find("input[type=hidden]");0!=t.val()&&""!=t.val()||n.find(".langplace").attr("placeholder",GetResourceValue(i))}),$(".drpLang option").each(function(){var n=$(this).val();$(this).html(GetResourceValue(n))}),$(".drpLang2 option").each(function(){var n=$(this).html();$(this).html(GetResourceValue(n))}),$(".drpLang3 option").each(function(){var n=$(this).attr("res");$(this).html(GetResourceValue(n))}),$(".drpLangRes option").each(function(){var n=$(this).html();$(this).html(GetResourceValue(n))}),$(".lang").each(function(){var n=$(this).attr("placeholder");$(this).attr("placeholder",GetResourceValue(n))}),$(".btnlang").each(function(){var n=$(this).attr("value");$(this).attr("value",GetResourceValue(n))}),$(".product-term-desc").each(function(){var t=$(this).attr("data-groupid"),i={groupId:t};$.ajax({url:"/Management/GetProductTermLanguageDescription",data:$.toJSON(i),dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",success:function(n){"1"==n.Status&&$("#spanpt_"+t).html(n.Item)}})}),$("#hdnPageName").length&&"Payment"==$("#hdnPageName").val()&&$.post("/Management/GetTermsOfUsagePage",function(n){var t,i;if(1==n.Status&&null!=n.Item)for(t=0;t<n.Item.length;t++)"1"==n.Item[t].TermsOfUsageType?n.Item[t].Value.length>1?($(".payment-terms-of-usage-span").html(n.Item[t].Value),$(".terms-of-usage-two-content").removeClass("display-none")):$(".terms-of-usage-two-content").addClass("display-none"):"2"==n.Item[t].TermsOfUsageType&&(i="/AlbumMedia/document/"+n.Item[t].CompanyId+"/"+n.Item[t].Value,$(".payment-terms-of-usage-href").attr("href",i))})}function GetResourceValue(n){return null!=resources[n]?resources[n]:"*"+n}function SetLanguage(n){var t=$(n).attr("data-lang"),i=($(n),{Culture:t});$.ajax({url:"/Client/SetLanguage",data:$.toJSON(i),dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",success:function(n){"1"==n.Status&&(general.init(),$("#hdnPageName").length&&("DynamicPage"!=$("#hdnPageName").val()&&"Index"!=$("#hdnPageName").val()&&"Contact"!=$("#hdnPageName").val()||(location.href="/")),LoadResources())}})}function LoadDataTitle(){$(".lang-data-title").each(function(){var n=$(this).attr("data-key");$(this).attr("data-title",GetResourceValue(n))})}function LoadCurrencyConvert(){var n=GetSelectedCurrency(),t=null;$(".cur-price").each(function(){var i=$(this).attr("data-amount").replace(",","."),r=$(this).attr("data-code"),u=($(this).attr("data-class"),GetCurrency(r));null==n||null==u?($(this).html(TurkishCurrencyAmount(i)),t=r):($(this).html(ConvertTurkishCurrencyAmount(n,u,i)),t=n.Code)}),$(".cur-international-total-price").each(function(){var i=$(this).attr("data-amount").replace(",","."),r,u;""!=i?(r=$(this).attr("data-code"),u=GetCurrency(r),null==n||null==u?($(this).html(TurkishCurrencyAmount(i)),t=r):($(this).html(ConvertTurkishCurrencyAmount(n,u,i)),t=n.Code)):$(this).html("0")}),$(".cur-domestic-total-price").each(function(){var i=$(this).attr("data-amount").replace(",","."),r,u;""!=i?(r=$(this).attr("data-code"),u=GetCurrency(r),null==n||null==u?($(this).html(TurkishCurrencyAmount(i)),t=r):($(this).html(ConvertTurkishCurrencyAmount(n,u,i)),t=n.Code)):$(this).html("0")}),$(".cur-currency-code").html(t),$(".currency").each(function(){var t=$(this).attr("data-amount").replace(",","."),i=GetCurrency($(this).attr("data-code"));null==n||null==i?$(this).val(t):$(this).val(ConvertCurrencyAmount(n,i,t))}),$(".curcode").each(function(){var t=$(this).attr("data-code"),i=GetCurrency(t);null==n||null==i?$(this).html(t):$(this).html(n.Code)})}function GetSelectedCurrencyCode(){var n=GetSelectedCurrency();return null==n?"":n.Code}function GetSelectedCurrency(){var n=null;return null==currencies?n:($.each(currencies,function(t,i){if(i.IsSelected)return n=i}),n)}function GetCurrency(n){var t=null;return null==currencies?t:($.each(currencies,function(i,r){if(r.Code==n)return t=r}),t)}function ConvertCurrency(n,t){var i=GetSelectedCurrency(),r=GetCurrency(n);return null==i||null==r?t:ConvertCurrencyAmount(i,r,t)}function ConvertCurrencyString(n,t){var i=GetSelectedCurrency(),r=GetCurrency(n);return null==i||null==r?"<span class=''>"+TurkishCurrencyAmount(t)+"<\/span> "+n:"<span class=''>"+ConvertTurkishCurrencyAmount(i,r,t)+"<\/span> "+i.Code}function ConvertCurrency2(n,t,i){var r=GetCurrency(i),u=GetCurrency(n);return null==r||null==u?t:ConvertCurrencyAmount(r,u,t)}function ConvertCurrency3(n,t){var i=GetSelectedCurrency(),r=GetCurrency(n);return null==i||null==r?t+";"+n:ConvertCurrencyAmount(i,r,t)+";"+i.Code}function ConvertCurrencyAmount(n,t,i){return(i*t.CurrencyRate/n.CurrencyRate).toFixed(2)}function ConvertTurkishCurrency2(n,t,i){var r=GetCurrency(i),u=GetCurrency(n);return null==r||null==u?TurkishCurrencyAmount(t):ConvertTurkishCurrencyAmount(r,u,t)}function ConvertTurkishCurrencyAmount(n,t,i){var r=i*t.CurrencyRate/n.CurrencyRate;return new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2}).format(r).replace("₺","")}function TurkishCurrencyAmount(n){var t=n;return new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2}).format(t).replace("₺","")}function SetCurrency(n){var t={Code:$(n).attr("data-code")};$.ajax({url:"/Client/SetCurrency",data:$.toJSON(t),dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",success:function(n){"1"==n.Status&&window.location.reload()}})}function getGeneralTurkishCurrency(n){return new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2}).format(n).replace("₺","")}function GetCurrencyRatePrice(n,t){var i="",r=n.replace(",","."),u=GetCurrency(t),f=GetSelectedCurrency(),e;return f==null||u==null?i=r:(e=r*u.CurrencyRate/f.CurrencyRate,i=e),i}function SetGeneralInit(){LoadCurrencyConvert(),LoadResources()}$(function(){if($(".main-bg-video").length>0){var n="open";$(".chb-main-display").on("ifClicked",function(t){t.target.checked?($(".top-area-video-content").addClass("display-none"),$(".top-area-slider-content").removeClass("display-none"),n="close"):($(".top-area-video-content").removeClass("display-none"),$(".top-area-slider-content").addClass("display-none"),n="open"),createCookie("MainVideoDisplay",n,7)})}else $(".main-video-display").remove(),$(".top-area-slider-content").removeClass("display-none");mainVideoCookieControl(),$("#owl-carousel-default-slider").owlCarousel({singleItem:!0,autoPlay:!1})}),$(function(){LoadResources()}),$(function(){LoadCurrencyConvert()});var currencies=null,resources=null,general={init:function(){$.ajax({async:!1,url:"/Client/GeneralInit",type:"get",success:function(n){resources=n.Resources,currencies=n.Currencies}})}}