This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
function toFixed(x, n) { //x - число, n - количество знаков | |
if(isNaN(x) || isNaN(n)) return false; | |
var m = Math.pow(10,n); | |
return Math.round(x*m)/m; | |
} | |
var items = document.querySelectorAll("*[data-price]"); | |
for (var i = 0, l = items.length; i < l; i++) { | |
var fix = parseInt(items[i].getAttribute("data-fixed"), 10) || 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Блок с описанием пака--> | |
<div class="b-list-describe"> | |
<div class="b-describe-package hide" s18n data-package="Basic"> | |
Period Basic | |
</div> | |
<div class="b-describe-package hide" s18n data-package="Standart"> | |
Period Standart | |
</div> | |
<div class="b-describe-package hide" s18n data-package="Optimal"> | |
Period Optimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lang = $("html").attr("lang"); | |
var _prices = { | |
"en": { | |
Basic : ["8 528", "16 692", "32 659", "47 900"], | |
Standart : [0, "32 659", "63 867", "93 623"], | |
Optimal : [0, "63 867", "124 831", "182 892"], | |
Expert : [0, "124 831", "243 855", "357 054"], | |
Unreal : [0, 0, "476 099", "696 730"], | |
Epic : [0, 0, "928 973", "1 358 623"] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".unreal-form-call").on("click", function() { | |
var t = $(this) | |
, e = t.data("period") ? t.data("period") : null | |
, i = ["Unreal", "Epic"] | |
, n = t.data("type"); | |
d.then(function(t) { | |
var s = t.find("#orderUnrealForm") | |
, r = s.find("#packages") | |
, o = s.find("#period") | |
, a = s.find("#period option") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
//str = 'My Name is %NAME% and my age is %AGE%.' | |
//{"%NAME%":"Mike","%AGE%":"26","%EVENT%":"20"} | |
function format(str, replacements) { | |
var _replacements = {}; | |
for (var k in replacements) { | |
_replacements["%" + k + "%"] = replacements[k]; | |
} | |
return str.replace(/%\w+%/g, function(all) { | |
return _replacements[all] || all; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"Protein":{"value":25,"key":"Protein","label":"Protein","color":"#1AA0E0","items":{"Red Meat":{"value":20,"label":"Red Meat","color":"#1AA0E0"},"Fatty Fish":{"value":30,"label":"Fatty Fish","color":"#DF8A40"},"Non Fatty Fish":{"value":10,"label":"Non Fatty Fish","color":"#868452"},"Shellfish":{"value":20,"label":"Shellfish","color":"#BA4E33"},"Eggs":{"value":5,"label":"Eggs","color":"#FBA026"},"Soy":{"value":5,"label":"Soy","color":"#D14841"},"Poultry":{"value":5,"label":"Poultry","color":"#75706B"},"Beans / Peas":{"value":5,"label":"Beans / Peas","color":"#FAC51C"}}},"Fats":{"value":30,"color":"#DF8A40","label":"Fats","items":{"Nuts":{"value":25,"label":"Nuts","color":"#1AA0E0"},"Oils":{"value":30,"label":"Oils","color":"#DF8A40"},"Speards":{"value":5,"label":"Speards","color":"#868452"},"Mayo & Salad Dressings":{"value":40,"label":"Mayo & Salad Dressings","color":"#BA4E33"}}},"Dairy":{"value":15,"label":"Dairy","color":"#BA4E33","stripe":true,"items":{"Butter":{"value":40,"label":"Butter","color":"#1AA0E0" |
NewerOlder