{"id":27683,"date":"2025-09-07T01:02:37","date_gmt":"2025-09-07T01:02:37","guid":{"rendered":"https:\/\/yellow-hippopotamus-735340.hostingersite.com\/?page_id=27683"},"modified":"2025-09-10T00:10:13","modified_gmt":"2025-09-10T00:10:13","slug":"calc","status":"publish","type":"page","link":"https:\/\/atvadas.lv\/lv\/calc","title":{"rendered":"Calc"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"27683\" class=\"elementor elementor-27683\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8b6412b e-flex e-con-boxed e-con e-parent\" data-id=\"8b6412b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4c72f0d elementor-widget elementor-widget-html\" data-id=\"4c72f0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!-- jQuery core -->\n<script src=\"https:\/\/code.jquery.com\/jquery-3.7.1.min.js\"><\/script>\n\n<!-- jQuery UI (needed for tooltips) -->\n<link rel=\"stylesheet\" href=\"https:\/\/code.jquery.com\/ui\/1.13.3\/themes\/base\/jquery-ui.css\">\n<script src=\"https:\/\/code.jquery.com\/ui\/1.13.3\/jquery-ui.min.js\"><\/script>\n\n<script>\njQuery(function () {\n  var isMobile = 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n  var openTarget = null;\n\n  jQuery(document).tooltip({\n    items: '.info-icon',\n    show: null,\n    hide: { duration: 0 }, \/\/ ensure tooltip hides on mouseleave\n    track: false,\n    content: function() {\n      return jQuery(this).closest('label').find('.description').html();\n    },\n    open: function(event, ui) {\n      \/\/ prevent tooltips from sticking on radio focus\n      if (event.originalEvent && event.type === \"focusin\") {\n        jQuery(event.target).tooltip(\"close\");\n        return false;\n      }\n    }\n  });\n\n  function addTooltipIcon(label) {\n    var desc = label.find('.description');\n    if (!desc.length || jQuery.trim(desc.html()) === '' || label.find('.info-icon').length) return;\n\n    var firstSpan = label.find('span').first();\n    if (!firstSpan.length) return;\n\n    var icon = jQuery('<i class=\"info-icon\" title=\"\">\u2753<\/i>');\n    firstSpan.after(icon);\n\n    icon.tooltip({\n      show: null,\n      hide: { duration: 0 },\n      track: false,\n      content: desc.html(),\n      open: function(event, ui) {\n        if (event.originalEvent && event.type === \"focusin\") {\n          jQuery(event.target).tooltip(\"close\");\n          return false;\n        }\n      }\n    });\n\n    \/\/ force-close when clicking the icon itself\n    icon.on(\"click\", function() {\n      var $icon = jQuery(this);\n      setTimeout(function() {\n        if ($icon.data(\"ui-tooltip\")) {\n          $icon.tooltip(\"close\");\n        }\n      }, 0);\n    });\n  }\n\n  function processLabels() {\n    jQuery('[id^=\"ccb_app_\"] label').each(function() {\n      addTooltipIcon(jQuery(this));\n    });\n  }\n\n  processLabels();\n\n  var observer = new MutationObserver(function(mutations) {\n    mutations.forEach(function(mutation) {\n      jQuery(mutation.addedNodes).each(function() {\n        if (jQuery(this).is('label') || jQuery(this).find('label').length) {\n          processLabels();\n        }\n      });\n    });\n  });\n  observer.observe(document.querySelector(\"[id^='ccb_app_']\"), { childList: true, subtree: true });\n\n  if (isMobile) {\n    jQuery(document).on('click', \"[id^='ccb_app_'] label input[type='radio'], [id^='ccb_app_'] label select\", function(e) {\n      if (!isMobile) return;\n      var icon = jQuery(this).closest('label').find('.info-icon');\n      if (icon.length && icon.data('ui-tooltip')) {\n        icon.tooltip('open');\n        openTarget = icon;\n      }\n    });\n\n    jQuery(document).on('click', function(e) {\n      if (!isMobile) return;\n      if (openTarget && !jQuery(e.target).closest(openTarget).length && !jQuery(e.target).is('input, select')) {\n        openTarget.tooltip('close');\n        openTarget = null;\n      }\n    });\n  }\n});\n\n<\/script>\n<script>\n    \/\/ Bind click directly to the <li> elements\n$(document).on('click', '.ccb-dropdown__list li:not(:first-of-type)', function () {\n    var $li = $(this);\n\n    \/\/ Find the image directly under the clicked <li>\n    var $img = $li.children('img').first();\n    if ($img.length) {\n        \/\/ Remove previous duplicate\n        $('.duplicated-image-outside').remove();\n\n        \/\/ Clone the image and add a marker class\n        var $clone = $img.clone().addClass('duplicated-image-outside');\n        var $link = $('<a><\/a>').attr('href', $clone.attr('src')).attr('target', '_blank').append($clone);\n\n        \/\/ Insert the clone after the <li> parent or another desired container\n        $li.parent().parent().parent().after($link); \/\/ inserts after the <ul> containing the li\n    }\n});\n$(document).on('click', '.ccb-dropdown__list li:first-of-type', function () {\n\n$('.duplicated-image-outside').remove();\n});\n<\/script>\n<script>\n    document.querySelectorAll('input[type=\"radio\"]').forEach(radio => {\n      radio.addEventListener('mousedown', function (e) {\n        \/\/ If it's already checked, mark it so we can uncheck on click\n        if (this.checked) {\n          this.dataset.waschecked = \"true\";\n        } else {\n          this.dataset.waschecked = \"false\";\n        }\n      });\n\n      radio.addEventListener('click', function (e) {\n        if (this.dataset.waschecked === \"true\") {\n          this.checked = false;  \/\/ Deselect\n          this.dataset.waschecked = \"false\";\n        }\n      });\n    });\n  <\/script>\n  <style>\n    div.ccb_field_with_radio:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > label:nth-child(1) > span:nth-child(2){display:flex;align-items:center;\n    }\n    .ui-tooltip {\n        max-width: 500px;\n    }\n    label .description{display: none;}\n    .ccb-summary-item__options span:nth-child(2) \n    {\n      float: right;\n      position: relative;\n      position: absolute;\n      right: 21px;\n    }\n    .ccb-vertical{grid-template-columns:1.1fr 0.9fr}\n    \t\t\t.w100{width:100%!important;}\n.price{margin-left:auto;}\n.ccb-box-radio .ccb-radio-label .description {\n\tfont-size: 1em;\n\tcolor: var(--ccb-fields-description-color);\n}\n.ccb-group{overflow:visible!important}\n.ccb-main-widget{font-family:Poppins!important}\n.ccb-dropdown__list img{width:100px!important;height:100px!important}\n.ccb-dropdown__list{max-height:400px!important}\n.ccb-summary-list__titles{display:none;}\n.duplicated-image-outside{width:150px;\n    }\n.ccb-fields-wrapper{background-image: url(https:\/\/atvadas.lv\/wp-content\/uploads\/2025\/09\/branch-bg2.png);\n  background-repeat: no-repeat;\n  background-position: top right;\n  background-size: inherit;}\n  .ccb-subtotal-wrapper{position:sticky;top:0;}\n<\/style>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a0a7732 elementor-widget elementor-widget-shortcode\" data-id=\"1a0a7732\" data-element_type=\"widget\" data-e-type=\"widget\" data-no-translation=\"\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><p style=\"text-align: center\">No selected calculator<\/p><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-88dc095 elementor-widget elementor-widget-shortcode\" data-id=\"88dc095\" data-element_type=\"widget\" data-e-type=\"widget\" data-no-translation=\"\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t<style>.elementor-element-88dc095{display:none !important}<\/style>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_eb_attr":"","_glsr_average":0,"_glsr_ranking":0,"_glsr_reviews":0,"footnotes":""},"class_list":["post-27683","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/pages\/27683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/comments?post=27683"}],"version-history":[{"count":0,"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/pages\/27683\/revisions"}],"wp:attachment":[{"href":"https:\/\/atvadas.lv\/lv\/wp-json\/wp\/v2\/media?parent=27683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}