Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''js''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Todas as áreas do Fórum

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Desenvolvimento e Banco de Dados
    • HTML e CSS
    • Java
    • Javascript
    • .NET
    • PHP
    • Python
    • Ruby
    • Mobile
    • Ambientes de Desenvolvimento
    • Arquitetura e Métodos Ágeis
    • Banco de Dados
    • DevOps
    • Desenvolvimento de Games
    • E-Commerce e Pagamentos Online
    • SEO e Otimizações
    • WordPress
    • Algoritmos & Outras Tecnologias
  • Design e Produto
    • Fotografia
    • Photoshop
    • Design de interfaces e UX
    • Edição/Produção de Vídeos
    • Marketing Online
    • Desenho, Ilustração e 3D
  • Entretenimento e uso pessoal
    • Geral
    • Segurança & Malwares
    • Gadgets e wearable
    • Softwares e Apps
    • Entretenimento

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Encontrado 214 registros

  1. d4v1

    validar campos

    Olá, eu tenho 3 campos e preciso que quando clicar em enviar, só envie se os campos estiver com os respectivos dados preenchidos estiver certo, no momento, só esta validando e enviando o campo CPF, ambos JS de de calculo esta funcionando, mas esta validando apenas CPF, se digitar o CPF certo e clicar em enviar ele prossegue para o submit, o campo NF eu queria que o numero minimo e máximo seja 9 números, existe essa possibilidade ? não digitar nada mais e nada menos que 9 números ?! deixei o link do pen pra teste. Desde já obrigado. //calculo C.N.P.J is_cnpj = function (c) { var b = [6,5,4,3,2,9,8,7,6,5,4,3,2]; if(/0{14}/.test(c)) return false; if((c = c.replace(/[^\d]/g,"")).length != 14) return false; for (var i = 0, n = 0; i < 12; n += c[i] * b[++i]); if(c[12] != (((n %= 11) < 2) ? 0 : 11 - n)) return false; for (var i = 0, n = 0; i <= 12; n += c[i] * b[i++]); if(c[13] != (((n %= 11) < 2) ? 0 : 11 - n)) return false; return true; }; cnpjCheck = function (el) { document.getElementById('cnpjResponse').innerHTML = is_cnpj(el.value)? '<span style="color:green">válido</span>' : '<span style="color:red">inválido</span>'; if(el.value=='') document.getElementById('cnpjResponse').innerHTML = ''; } //calculo C.P.F function verificarCPF(strCpf) { if (!/[0-9]{11}/.test(strCpf)) return false; if (strCpf === "00000000000") return false; var soma = 0; for (var i = 1; i <= 9; i++) { soma += parseInt(strCpf.substring(i - 1, i)) * (11 - i); } var resto = soma % 11; if (resto === 10 || resto === 11 || resto < 2) { resto = 0; } else { resto = 11 - resto; } if (resto !== parseInt(strCpf.substring(9, 10))) { return false; } soma = 0; for (var i = 1; i <= 10; i++) { soma += parseInt(strCpf.substring(i - 1, i)) * (12 - i); } resto = soma % 11; if (resto === 10 || resto === 11 || resto < 2) { resto = 0; } else { resto = 11 - resto; } if (resto !== parseInt(strCpf.substring(10, 11))) { return false; } return true; } function validarNome() { var strCpf = document.getElementById('cpf1').value; if (!verificarCPF(strCpf)) { alert("CPF inválido"); return; } document.getElementById('frm').submit(); } <body> <div class="corpo"> <form id="form-contato" action="xml.php" method="post"> <div class="content"> <ul style="margin: auto"> <li> <label for="nf">C.N.P.J</label> <input id="is_cnpj" type="text" onkeyup="cnpjCheck(this)" placeholder="ex: 26.394.240/0001-01" maxlength="18"><span id="cnpjResponse"></span> </li> <li> <label for="cpf">digite aqui seu CPF</label> <input type="text" id="cpf1" name="txtCPF" placeholder="ex: 070.680.938-68" /> <li><label for="nf">Numero da nota fiscal</label> <input name="nf" type="text" placeholder="Ex: 001234" onkeydown="limita(this);" onkeyup="limita(this);" style="width: 10%;" style="text-align: center;"> </li> </ul> <div style="margin: auto"> <div><button type="button" id="btn1" onclick='javascript:validarNome()'>Enviar</button> </div> https://codepen.io/d4v1fr/pen/ZMqaGO?editors=1010
  2. karina pereira refacho

    [Resolvido] transformar Js em php

    Pessoal tenho um script em js gostaria de rodar ele somente no php e não tenho noção de php, como eu faria isso segue o codigo abaixo //the seed pair itself var clientSeed = "5e3c6ad2-2874-4693-81ea-73d241b3c06b"; var serverSeed = "2304528a-c364-4b48-94d4-0f232bd65a2d"; var nonce = 130; //bet made with seed pair //crypto lib for hmac function var crypto = require('crypto'); var roll = function(key, text) { var hash = crypto.createHmac('sha512', key).update(text).digest('hex'); var index = 0; var lucky = parseInt(hash.substring(index * 5, index * 5 + 5), 16); //keep grabbing characters from the hash while greater than while (lucky >= Math.pow(10, 6)) { index++; lucky = parseInt(hash.substring(index * 5, index * 5 + 5), 16); //if we reach the end of the hash, just default to highest number if (index * 5 + 5 > 128) { lucky = 99.99; break; } } lucky %= Math.pow(10, 4); lucky /= Math.pow(10, 2); return lucky; } console.log(roll(serverSeed, clientSeed+'-'+nonce)); Desde já agradeço a atenção de todos
  3. AlexandreHenrique

    Mudar via JS a URL contida no location do onclick

    Olá. como mudar via JS o valor contido no Location do onclick de um botão? tentei com document.getElementById(); mas não deu certo. O caso é esse: Tenho o botão <input type="button" id="bt" onClick="window.location='page.php'"> Através de uma função JS quero mudar de page.php para novapage.php A função é: function mudarURL(u){ var url = u; document.getElementById('bt').onclick = url; } ao ser chamada, a função recebe o valor "novapage.php" e armazena em "var url", em seguida envia a nova URL para o Location do botão. grato galera!!
  4. Salve, meus amigos! Estou começando meus estudos em programação, ainda na fase de lógica da programação. O código abaixo é para executar a seguinte tarefa: pegar, através do input (id = "inputValor" no HTML) três valores numéricos, através da função insereValor, colocar esses valores no array recebeValor e depois fazer a média desses valores. Limitei a função insereValor em 3 valores, e depois a função mediaFunc faz a média desses 3 valores. O problema: parece que o loop (while) só retorna o primeiro valor como numérico, os outros valores surgem como isNaN = true. Ou seja, não tenho como fazer o cálculo de média, pois o resultado da NaN. O que estou fazendo de errado? Obrigado. <meta charset = "UTF-8"> <input id = "inputValor" /> <button id = "botaoInsere">Inserir</button> <p id = "pegaTexto"></p> <script type="text/javascript"> function mediaFunc(v1, v2, v3){ var media = parseInt((v1 + v2 + v3) / limite); return media; } function insereValor(){ while(posicao < limite) { //pega o valor inputado no campo em branco. recebeValor.push(parseInt(document.getElementById("inputValor").value)); //acrescenta uma posição no array. Ou seja, vai para a próxima posição. posicao++; inputValor.focus(); return recebeValor; } mediaFunc(); inputValor.focus(); } var posicao = 0; var limite = 3; var recebeValor = []; var botaoInsere = document.getElementById('botaoInsere'); botaoInsere.onclick = insereValor; </script>
  5. Olá, sou novo na area e estou com dificuldades para acha uma solução do meu interesse. bom o que eu quero que a função faça é o seguinte: Na chamada da <canvas></canvas> ele pega um valor percentual , o problema é que no JS ele já está com o percentual programado, o que eu queria é que eu enviasse a partir do PHP o valor percentual que vai ser OBS como está no JS já as ID criadas com valores programados: circleGraph("graph_1",0,100,0); circleGraph("graph_2",0,50,50); circleGraph("graph_3",0,20,80); circleGraph("graph_4",0,70,30); circleGraph("graph_5",0,70,30); circleGraph("graph_6",100,0,0); No js ta assim, porém eu queria que ele preenchesse os valores de porcentagem de acordo com o que eu vou exibir do banco. Tipo teria como eu fazer algo que ele enviasse o valor para o js ou algo do tipo Mais o menos assim <canvas id="<script>circleGraph("graph_3",0,<?=$Valor1?>,<?=$Valor2?>)</script>" width="142" height="142"></canvas> por favor quem souber solução me ajude alguma forma. <li> <div class="g_wrap"><canvas id="graph_2" width="142" height="142"></canvas><span class="bg"></span></div> <strong><span>Ocupação<br> base</span><span class="align"></span></strong> <ul class="per"> <li class="exo_b">56</li> <li class="exo_b last">44</li> </ul> </li>
  6. drx

    Como enviar acão com jquery

    Olá pessoal! Como que eu faço para enviar uma ação via jquery ou Ajax, de forma que eu carregue na mesma página as informações enviadas? Tipo assim: Eu clico em uma imagem (Adicionar no Carrinho)... e quero adicionar no carrinho logo abaixo na mesma página. <td height="10"><a href="carrinho_vitrine.php?acao=add&id='.$id.'"> <img src="img/comprar-1.png" name="btn_add_v2" id="btn_add_v2" height="50" width="120" align="center" title="Adicionar ao Carrinho" value="btn_add_v2" style="visibility:visible;"></a></td> Desde já agradeço.
  7. Olá, venho através deste post pedi a ajuda de pessoas que já teve o mesmo problema ou pessoas que sabe o motivo de ocorrer o problema, de vez em quando quando eu entro na url me aparece o seguinte ERROR: https://prnt.sc/k41ctj se alguém souber o motivo do error por favor me relate uma forma de resolver essa dor de cabeça.
  8. DarthEduu

    Valores chartJS não se repetir

    Pessoal, bom dia! Tô com um problema aqui, seguinte, tenho esse gráfico, os valores já estão funcionando belezinha, mas os valores em tempo, por exemplo no final onde ambos são 98, ou qualquer outro valor que se repita, tipo: 10 > 10 > 30 > 50 > 90 > 60 > 60 ele fique em um ponto só eliminando o repetido, ou seja, onde está 10 ou 60 vire apenas 10 ou 60 e não se repetindo. Não sei se fui claro kkk mas aqui está um print e meu código. <script language="javascript" type="text/javascript"> function rampa_mostura() { //temperaturas var temperatura_glucanase = form_eficiencia_epata_1.glucasane.value; var valor_1 = form_eficiencia_epata_1.glucasane.value; var valor_2 = valor_1; var valor_3 = form_eficiencia_epata_1.protease.value; var valor_4 = valor_3; var valor_5 = form_eficiencia_epata_1.beta_amilase.value; var valor_6 = valor_5; var valor_7 = form_eficiencia_epata_1.alfa_amilase.value; var valor_8 = valor_7; var valor_9 = form_eficiencia_epata_1.inativacao.value; var valor_10 = valor_9; //tempos var tempo_1 = 0; var tempo_2 = parseInt(tempo_1)+parseInt(form_eficiencia_epata_1.glucanase_min.value); var tempo_3 = parseInt(tempo_2)+parseInt(valor_3-valor_2); var tempo_4 = parseInt(tempo_3)+parseInt(form_eficiencia_epata_1.protease_min.value); var tempo_5 = parseInt(tempo_4)+parseInt(valor_5-valor_3); var tempo_6 = parseInt(tempo_5)+parseInt(form_eficiencia_epata_1.beta_amilase_min.value); var tempo_7 = parseInt(tempo_6)+parseInt(valor_7-valor_6); var tempo_8 = parseInt(tempo_7)+parseInt(form_eficiencia_epata_1.alfa_amilase_min.value); var tempo_9 = parseInt(tempo_8)+parseInt(valor_9-valor_8); var tempo_10 = parseInt(tempo_9)+parseInt(form_eficiencia_epata_1.inativacao_min.value); var ctx = document.getElementById('myChart').getContext('2d'); var chart = new Chart(ctx, { // The type of chart we want to create type: 'line', // The data for our dataset data: { //tempo labels: [tempo_1,tempo_2,tempo_3,tempo_4,tempo_5,tempo_6,tempo_7,tempo_8,tempo_9,tempo_10], datasets: [{ label: "Rampa de temperatura - Mostura", backgroundColor: 'transparent', borderColor: '#FFB22B', borderWidth: 3, radius: 5, //temperatura data: [valor_1,valor_2,valor_3,valor_4,valor_5,valor_6,valor_7,valor_8,valor_9,valor_10], }] }, // Configuration options go here options: { elements: { line: { tension: 0, // disables bezier curves } }, title:{ display: true, fontSize: 20, text: "RAMPA DE TEMPERATURA" }, labels:{ fontStyle: "bold" }, scales: { xAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Tempo em minutos' } }], yAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Temperatura em ºC' } }] } } }); } </script>
  9. DarthEduu

    ChartJS - Dúvida "simples" ao gerar um gráfico.

    Pessoal, primeiramente boa tarde! Seguinte, estou utilizando o chartJS para manipular um gráfico, mas estou com um problema, os valores que eu seto no data dele, forjam valores automáticos na temperatura, mas eu queria setar manualmente esses valores da temperatura, alguém sabe como faço para manipular esses dados? (apenas da temperatura). Esse é meu código JS <script> var ctx = document.getElementById('myChart').getContext('2d'); var chart = new Chart(ctx, { // The type of chart we want to create type: 'line', // The data for our dataset data: { labels: ["0", "5", "10", "15", "20", "25", "30", "35","40","45","50","55","60","65","70","75","80","85","90","95","100","105","110","115","120","125","130","135"], datasets: [{ label: "Rampa de temperatura - mostura", backgroundColor: 'transparent', borderColor: '#FFB22B', borderWidth: 3, radius: 5, data: [102, 130, 201, 340,220,150,450,560,670,560,810,150,160,150,105,103,120,110,180,310,410,510,310,110,310,410,510,110,], }] }, // Configuration options go here options: { title:{ display: true, fontSize: 20, text: "RAMPA DE TEMPERATURA" }, labels:{ fontStyle: "bold" }, scales: { xAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Tempo em minutos' } }], yAxes: [{ display: true, scaleLabel: { display: true, labelString: 'Temperatura em ºC' } }] } } }); </script>
  10. ggbelgamo

    Pegar objeto completo do value

    Estou populando um select através de um list que retorna anoInicio e anoFim. Porém, na hora de mandar esses valores SELECIONADOS como parâmetro pro C# via ajax, o c# identica os valores como sendo nulos. Como resolver? Controller C# que popula o select na view: anos = repository.SearchByFilter(filter).Where(w => w.ModelosTrator.Any(i1 => i1.IdModeloTrator == idModeloTrator)) .Select(s => new AnosDto { AnoInicio = s.AnoInicio, AnoFim = s.AnoFim }) .Distinct() .ToList(); Aqui populo a select, e quando inspeciono no navegador meu value do option está assim: [object Object] //POPULA OS ANOS var selectbox = $('.selectAno'); selectbox.empty(); selectbox.append('<option>Selecione o ano</option>'); $.each(data, function (i, d) { selectbox.append('<option value="' + d + '">' + d.Ano + '</option>'); }); Método recebe o parâmetro com nul após a requisição ajaxl: Desde já agradeço a atenção e colaboração!
  11. Pitag346

    Audio Streaming

    Olá pessoal, beleza? Estou com um pequeno problema... Tenho um servidor streaming onde toca alguns audios, mas não é sempre que o navegador executa o audio, como assim ? Tipo as vezes eu acesso o site e toca normalmente o que está na tag <audio> ... Mas as vezes eu acesso e não toca... Sei que consigo sanar isso com javascript ou jquery, mas não tenho esse conhecimento. OBS: O problema não é meu servidor pq se eu acessa-lo diretamente ele funciona sem parar em nenhum momento. Meu código html: <audio id="audio" autoplay="autoplay"> <source src="https://streaming.meuservidor.com.br/;" type="audio/mpeg" /> <source src="https://streaming.meuservidor.com.br/stream.ogg" type="audio/ogg" /> </audio> Um detalhe importante, mesmo quando estava com somente 1 source src, acontecia isso, pensei q era culpa da velocidade da conexão mas não é acredito eu. Obrigado amigos.
  12. Stephanie Ferreira

    woocommerce ajax 0

    Quando eu clico para adicionar um produto pela home, o tema abre esta pop-up pro carrinho ali no cantinho: http://prntscr.com/jjixa1 Mas o link cai pra este: https://kitboxclub.com.br/wp-admin/admin-ajax.php Pelo que entendi do código, é um problema de jQuery e eu não entendo nada de jQuery, o tema da loja é http://nitro.woorockets.com/ Isso foi feito pelo antigo desenvolvedor que passou a perna na gente e eu sou a designer que ta tentando arrumar.. SOCORRO? A página que eu preciso de ajuda: https://kitboxclub.com.br/ O código que eu acho que está o problema é esse: https://pastebin.com/tyFtfep7 pq foi o único que achei o link admin-ajax.php dentro dele, mas não entendo nada de .js
  13. Luiz Carlos Ferreira

    Paginação em PHP e JSON.

    Olá, Alguém pode me ajudar a fazer a paginação desse JSON, tentei fazer com incremento e decremento, mas não consegui. Eu precisava também de imprimir todas as pagina em uma, pra mim enviar para o BD, nessa API tem 158 pagina e 4740 produtos. { "_links": { "self": { "href": "https://app.com.br/api/products?page=2" }, "first": { "href": "https://app.com.br/api/products" }, "last": { "href": "https://app.com.br/api/products?page=158" }, "prev": { "href": "https://app.com.br/api/products?page=1" }, "next": { "href": "https://app.com.br/api/products?page=3" } },
  14. Luiz Barbosa Abreu

    Plugin Bootstrap taginput nao relaciona com banco de dados

    <?php //print_r($contract_odontograma); //exit; init_head(); ?> <div id="wrapper"> <div class="content"> <div class="row"> <?php include_once(APPPATH . 'views/admin/includes/alerts.php'); ?> <div class="col-md-7"> <div class="panel_s"> <div class="panel-heading"> <?php echo $title; ?> <h3 class="no-margin text-success"><?php echo _l('create_odontograma'); ?></h3> </div> <div class="panel-body"> <!-- sms fim --> <?php if(isset($contract_odontograma)) { ?> <a href="#" class="btn btn-default" data-toggle="modal" data-target="#renew_contract_modal"> <i class="fa fa-refresh"></i> </a> <hr /> <div class="clearfix"></div> <?php } ?> <?php echo form_open_multipart($this->uri->uri_string(),array('id'=>'contract-form')); ?> <!-- sms mannha --> <!-- sms msg --> <div class="row"> <div class="col-md-12"> <div class="panel_s"> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="msm_manha" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->msm_manha == 1){echo 'checked';}}; ?>> <label for="msm_manha"><?php echo ('Enviar 1 SMS por dia na parte da manhã até a data final'); ?></label> </div> <div class="panel-heading"> <?php echo ('SMS Manhã'); ?> </div> <div class="panel-body"> <?php $data = array( 'name' => 'sms_message_manha', 'id' => 'sms_message', 'rows' => '3', 'class' => 'form-control', 'value' => isset($contract_odontograma) ? $contract_odontograma->sms_message_manha : '' ); echo form_textarea($data); ?> </div> </div> </div> </div> </div> <!-- sms mannha --> <!-- sms msg --> <div class="row"> <div class="col-md-12"> <div class="panel_s"> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="msm_tarde" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->msm_tarde == 1){echo 'checked';}}; ?>> <label for="msm_tarde"><?php echo ('Enviar 1 SMS por dia na parte da tarde até a data final'); ?></label> </div> <div class="panel-heading"> <?php echo ('SMS Tarde'); ?> </div> <div class="panel-body"> <?php $data = array( 'name' => 'sms_message_tarde', 'id' => 'sms_message', 'rows' => '3', 'class' => 'form-control', 'value' => isset($contract_odontograma) ? $contract_odontograma->sms_message_tarde : '' ); echo form_textarea($data); ?> </div> </div> </div> </div> </div> <!-- fim --> <!-- sms mannha --> <!-- sms msg --> <div class="row"> <div class="col-md-12"> <div class="panel_s"> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="msm_noite" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->msm_noite == 1){echo 'checked';}}; ?>> <label for="msm_noite"><?php echo ('Enviar 1 SMS por dia na parte da noite até a data final'); ?></label> </div> <div class="panel-heading"> <?php echo ('SMS Noite'); ?> </div> <div class="panel-body"> <?php $data = array( 'name' => 'sms_message_noite', 'id' => 'sms_message', 'rows' => '3', 'class' => 'form-control', 'value' => isset($contract_odontograma) ? $contract_odontograma->sms_message_noite : '' ); echo form_textarea($data); ?> </div> </div> </div> </div> </div> <!-- fim --> <?php /* * RELACIONAMENTO COM MÉDICO * */ $rel_type = ''; $rel_id = ''; if(isset($contract_odontograma) || ($this->input->get('rel_id') && $this->input->get('rel_type'))){ if($this->input->get('rel_id')){ $rel_id = $this->input->get('rel_id'); $rel_type = $this->input->get('rel_type'); } else { $rel_id = $contract_odontograma->rel_id; $rel_type = $contract_odontograma->rel_type; } echo form_hidden('contract_rel_id',$rel_id); } /* * FIM RELACIONAMENTO COM MÉDICO */ ?> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="trash" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->trash == 1){echo 'checked';}}; ?>> <label for="trash"><?php echo _l('contract_trash'); ?></label> </div> </div> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="not_visible_to_client" <?php if(isset($contract_odontograma)){if($contract_odontograma->not_visible_to_client == 1){echo 'checked';}}; ?>> <label for=""><?php echo _l('contract_not_visible_to_client'); ?></label> </div> </div> <?php $selected = (isset($contract_odontograma) ? $contract_odontograma->client : ''); ?> <?php echo render_select('client',$clients,array('userid','company'),'contract_client_string',$selected); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->subject : ''); ?> <?php echo render_input('subject','contract_subject_odontograma',$value,'text',array('data-toggle'=>'tooltip','title'=>'contract_subject_tooltip')); ?> <div class="row"> <div class="col-md-6"> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->datestart : _d(date('Y-m-d'))); ?> <?php echo render_date_input('datestart','contract_start_odontograma',$value); ?> </div> <div class="col-md-6"> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dateend : ''); ?> <?php echo render_date_input('dateend','contract_end_odontograma',$value); ?> </div> </div> <!-- - RELACIONAMENTO COM MÉDICO - --> <div class="row"> <div class="col-md-12"> <label for="rel_type" class="control-label"><?php echo ('Procedimento para Médico '); ?></label> <div class="form-group"> <select name="rel_type" class="selectpicker" id="rel_type" data-width="100%"> <option value=""></option> <!-- <option value="project" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'project'){echo 'selected';}} ?>><?php echo _l('projects'); ?></option> --> <option value="staff" <?php if(isset($contract_odontograma) || $this->input->get('staffid')){if($rel_type == 'staff'){echo 'selected';}} ?>><?php echo _l('contract_medico'); ?></option> <!-- <option value="invoice" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'invoice'){echo 'selected';}} ?>><?php echo _l('invoice'); ?></option> --> <!-- <option value="customer" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'customer'){echo 'selected';}} ?>><?php echo _l('customer'); ?></option> --> <!-- <option value="invoice" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'invoice'){echo 'selected';}} ?>><?php echo _l('Invoice'); ?></option> --> <!-- <option value="estimate" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'estimate'){echo 'selected';}} ?>><?php echo _l('estimate'); ?></option> --> <!-- <option value="contract" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'contract'){echo 'selected';}} ?>><?php echo _l('contract'); ?></option> --> <!-- <option value="ticket" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'ticket'){echo 'selected';}} ?>><?php echo _l('ticket'); ?></option> --> <!-- <option value="expense" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'expense'){echo 'selected';}} ?>><?php echo _l('expense'); ?></option> --> <!-- <option value="lead" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'lead'){echo 'selected';}} ?>><?php echo _l('lead'); ?></option> --> <!-- <option value="proposal" <?php if(isset($contract_odontograma) || $this->input->get('rel_type')){if($rel_type == 'proposal'){echo 'selected';}} ?>><?php echo _l('proposal'); ?></option> --> </select> </div> <div class="form-group hide" id="rel_id_wrapper2"> <select name="rel_id" id="rel_id" class="selectpicker" data-width="100%" data-live-search="true"></select> </div> </div> </div> <!-- sms --> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="trash" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->trash == 1){echo 'checked';}}; ?>> <label for="trash"><?php echo _l('contract_trash'); ?></label> </div> </div> <div class="form-group"> <div class="checkbox checkbox-primary"> <input type="checkbox" name="not_visible_to_client" <?php if(isset($contract_odontograma)){if($contract_odontograma->not_visible_to_client == 1){echo 'checked';}}; ?>> <label for=""><?php echo _l('contract_not_visible_to_client'); ?></label> </div> </div> <!-- sms fim --> <!-- FIM RELACIONAMENTO COM MÉDICO --> <?php $selected = (isset($contract_odontograma) ? $contract_odontograma->contract_type : ''); ?> <?php echo render_select('contract_type',$types,array('id','name'),'contract_type2',$selected); ?> <div class="checkbox checkbox-primary"> <input type="checkbox" name="dados_descr_1" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->dados_descr_1 == 1){echo 'checked';}}; ?>> <label for="dados_descr_1"><?php echo ('Preencher com os dados do tipo de procedimento'); ?></label> </div> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->description : ''); ?> <?php echo render_textarea('description','contract_description',$value,array('rows'=>10)); ?> <?php $selected = (isset($contract_odontograma) ? $contract_odontograma->contract_type : ''); ?> <?php echo render_select('contract_type',$types,array('id','name'),'contract_type2',$selected); ?> <div class="checkbox checkbox-primary"> <input type="checkbox" name="dados_descr_2" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->dados_descr_2 == 1){echo 'checked';}}; ?>> <label for="dados_descr_2"><?php echo ('Preencher com os dados do tipo de procedimento'); ?></label> </div> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->description2 : ''); ?> <?php echo render_textarea('description2','contract_description',$value,array('rows'=>10)); ?> <?php $selected = (isset($contract_odontograma) ? $contract_odontograma->contract_type : ''); ?> <?php echo render_select('contract_type',$types,array('id','name'),'contract_type2',$selected); ?> <div class="checkbox checkbox-primary"> <input type="checkbox" name="dados_descr_3" data-toggle="tooltip" title="<?php echo _l('contract_trash_tooltip'); ?>" <?php if(isset($contract_odontograma)){if($contract_odontograma->dados_descr_3 == 1){echo 'checked';}}; ?>> <label for="dados_descr_3"><?php echo ('Preencher com os dados do tipo de procedimento'); ?></label> </div> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->description3: ''); ?> <?php echo render_textarea('description3','contract_description',$value,array('rows'=>10)); ?> <!-- divs --> <div class="row"> <div class="col-md-6"> <!-- DENTES FORMS --> <input class="btn btn-danger" value="Dente 1" readonly data-toggle="collapse" data-target="#demo"> <div id="demo" class="collapse"> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_l: ''); ?> <?php echo render_textarea('dente1_l','Dente 1 L',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_v: ''); ?> <?php echo render_textarea('dente1_v','Dente 1 V',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_d: ''); ?> <?php echo render_textarea('dente1_d','Dente 1 D',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_m: ''); ?> <?php echo render_textarea('dente1_m','Dente 1 M',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_0: ''); ?> <?php echo render_textarea('dente1_0','Dente 1 (0)',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente1_valor: ''); ?> <?php echo render_textarea('dente1_valor','Dente 1 Valor',$value,array('rows'=>1)); ?> </div><p> <!-- DENTES FORMS --> </div> <!-- fim coluna 1 --> <div class="col-md-6"> <!-- DENTES FORMS --> <input class="btn btn-danger" value="Dente 2" readonly data-toggle="collapse" data-target="#demo2"> <div id="demo2" class="collapse"> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_l: ''); ?> <?php echo render_textarea('dente2_l','Dente 2 L',$value,array('rows'=>1)); ?> <?php/* echo render_input('tbltuss_odontograma','task_add_edit_tuss', '', array('id' => 'tbltuss_odontograma'), '', 'typeahead'); */?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_v: ''); ?> <?php echo render_textarea('dente2_v','Dente 2 V',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_d: ''); ?> <?php echo render_textarea('dente2_d','Dente 2 D',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_m: ''); ?> <?php echo render_textarea('dente2_m','Dente 2 M',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_0: ''); ?> <?php echo render_textarea('dente2_0','Dente 2 (0)',$value,array('rows'=>1)); ?> <?php $value = (isset($contract_odontograma) ? $contract_odontograma->dente2_valor: ''); ?> <?php echo render_textarea('dente2_valor','Dente 2 Valor',$value,array('rows'=>1)); ?> </div><p> <!-- DENTES FORMS --> </div> <!-- fim coluna 2 --> </div> <!-- fim --> <link href="<?php echo site_url('assets/plugins/bootstrap/css/multiple-select.css');?>" rel="stylesheet"> <div class="form-group"> <div class="form-group"> <label>Email address</label> <input type="email" class="form-control" placeholder="Enter email"> </div> <label>Month</label> <select multiple="multiple" id="ms" name="multi[]"> <option value="Janeiro">January</option> <option value="Feveiro">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> </div> <!-- DENTES FORMS --> <!-- area --> <!-- --> <?php/* echo render_input('tbltuss_odontograma','task_add_edit_tuss', '', array('id' => 'tbltuss_odontograma'), '', 'typeahead'); */?> <!-- --> <!-- ----> <?php /* * ALTERADO DE $rel_id PARA $rel_id2 PARA NÃO CONFLITAR * */ ?> <?php $rel_id2 = (isset($contract_odontograma) ? $contract_odontograma->id : false); ?> <?php echo render_custom_fields('contracts_odontograma',$rel_id2); ?> <?php /* FIM */ ?> <?php /* * INCLUÍDO BOTÃO PARA IMPRIMIR * Criado por: * 19/09/2016 */ ?> <?php if ($contract_odontograma->id) { ?> <div class="form-group"> <div class="form-tip"><?php echo _l('contract_print_tip')?></small></div> </div> <button type="button" class="btn btn-default pull-left" onclick="print_contract_odontograma(<?php echo $contract_odontograma->id; ?>); return false;"> <?php echo _l('print'); ?> </button> <?php } ?> <?php /* FIM BOTÃO PARA IMPRIMIR*/ ?> <button type="submit" class="btn btn-info pull-right"><?php echo _l('submit'); ?></button> <?php echo form_close(); ?> </div> </div> </div> <?php if(isset($contract_odontograma)) { ?> <div class="col-md-7"> <div class="panel_s"> <div class="panel-heading"><?php echo ('Anexos importantes'); ?></div> <div class="panel-body"> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"> <a href="#tab_attachments" aria-controls="tab_attachments" role="tab" data-toggle="tab"> <?php echo _l('contract_attachments'); ?> </a> </li> <li role="presentation"> <!-- <a href="#tab_renewals" aria-controls="tab_renewals" role="tab" data-toggle="tab"> --> <!-- <?php echo _l('no_contract_renewals_history_heading'); ?> --> </a> </li> <li role="presentation"> <!-- <a href="#tab_tasks" aria-controls="tab_tasks" role="tab" data-toggle="tab"> --> <!-- <?php echo _l('tasks'); ?> --> </a> </li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane ptop10 active" id="tab_attachments"> <?php echo form_open(admin_url('contracts_odontograma/add_contract_attachment/'.$contract_odontograma->id),array('id'=>'contract-attachments-form','class'=>'dropzone')); ?> <?php echo form_close(); ?> <div id="contract_attachments" class="mtop30"> <?php $data = '<div class="row">'; foreach($contract_odontograma->attachments as $attachment) { $data .= '<div class="display-block contract-attachment-wrapper" style="padding:0px;">'; $data .= '<div class="col-md-10">'; $data .= '<div class="pull-left"><i class="'.get_mime_class($attachment['filetype']).'"></i></div>'; $data .= '<a href="'.site_url('download/file/contract/'.$attachment['id']).'">'.$attachment['file_name'].'</a>'; $data .= '<p class="text-muted">'.$attachment["filetype"].'</p>'; $data .= '</div>'; $data .= '<div class="col-md-2 text-right">'; $data .= '<a href="#" class="text-danger" onclick="delete_contract_attachment_odontograma(this,'.$attachment['id'].'); return false;"><i class="fa fa fa-times"></i></a>'; $data .= '</div>'; $data .= '<div class="clearfix"></div><hr/>'; $data .= '</div>'; } $data .= '</div>'; echo $data; ?> </div> </div> <div role="tabpanel" class="tab-pane ptop10" id="tab_renewals"> <?php if(count($contract_odontograma_renewal_history) == 0){ echo _l('no_contract_renewals_found'); } foreach($contract_odontograma_renewal_history as $renewal){ ?> <div class="display-block"> <a href="<?php echo admin_url('profile/'.$renewal['renewed_by']); ?>"> <?php echo staff_profile_image($renewal['renewed_by'],array('staff-profile-image-small','pull-left mright10')); ?> </a> <div class="media-body"> <div class="display-block"> <?php echo _l('contract_renewed_by',"<a href=".admin_url('profile/'.$renewal['renewed_by']).">".$renewal['firstname'] . ' ' . $renewal['lastname']."</a>"); ?> <a href="<?php echo admin_url('contracts_odontograma/delete_renewal/'.$renewal['id'] . '/'.$renewal['contractid']); ?>" class="pull-right"><i class="fa fa-remove"></i></a> <br /> <small class="text-muted"><?php echo _dt($renewal['date_renewed']); ?></small> <hr /> <span class="text-success bold" data-toggle="tooltip" title="<?php echo _l('contract_renewal_old_start_date',_d($renewal['old_start_date'])); ?>"> <?php echo _l('contract_renewal_new_start_date',_d($renewal['new_start_date'])); ?> </span> <br /> <?php if(is_date($renewal['new_end_date'])){ $tooltip = ''; if(is_date($renewal['old_end_date'])){ $tooltip = _l('contract_renewal_old_end_date',_d($renewal['old_end_date'])); } ?> <span class="text-success bold" data-toggle="tooltip" title="<?php echo $tooltip; ?>"> <?php echo _l('contract_renewal_new_end_date',_d($renewal['new_end_date'])); ?> </span> <br/> <?php } ?> <?php if($renewal['new_value'] > 0){ $contract_odontograma_renewal_value_tooltip = ''; if($renewal['old_value'] > 0){ $contract_odontograma_renewal_value_tooltip = ' data-toggle="tooltip" data-title="'._l('contract_renewal_old_value',_format_number($renewal['old_value'])).'"'; } ?> <span class="text-success bold"<?php echo $contract_odontograma_renewal_value_tooltip; ?>> <?php echo _l('contract_renewal_new_value',_format_number($renewal['new_value'])); ?> </span> <br /> <?php } ?> </div> </div> <hr /> </div> <?php } ?> </div> <div role="tabpanel" class="tab-pane ptop10" id="tab_tasks"> <?php init_relation_tasks_table(array('data-new-rel-id'=>$contract_odontograma->id,'data-new-rel-type'=>'contract')); ?> </div> </div> </div> </div> </div> <?php } ?> </div> </div> </div> <?php init_tail(); ?> <?php if(isset($contract_odontograma)){ ?> <!-- init table tasks --> <script> init_rel_tasks_table(<?php echo $contract_odontograma->id; ?>,'contract'); </script> <div class="modal animated fadeIn" id="renew_contract_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <?php echo form_open(admin_url('contracts_odontograma/renew'),array('id'=>'renew-contract-form')); ?> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="myModalLabel"> <?php echo _l('contract_renew_heading'); ?> </h4> </div> <div class="modal-body"> <?php $new_end_date_assume = ''; if(!empty($contract_odontograma->dateend)){ $dStart = new DateTime($contract_odontograma->datestart); $dEnd = new DateTime($contract_odontograma->dateend); $dDiff = $dStart->diff($dEnd); $new_end_date_assume = _d(date('Y-m-d', strtotime(date('Y-m-d', strtotime('+' . $dDiff->days . 'DAY'))))); } ?> <?php echo render_date_input('new_start_date','contract_start_date',_d(date('Y-m-d'))); ?> <?php echo render_date_input('new_end_date','contract_end_date',$new_end_date_assume); ?> <?php echo render_input('new_value','contract_value',$contract_odontograma->contract_value,'number'); ?> <?php echo form_hidden('contractid',$contract_odontograma->id); ?> <?php echo form_hidden('old_start_date',$contract_odontograma->datestart); ?> <?php echo form_hidden('old_end_date',$contract_odontograma->dateend); ?> <?php echo form_hidden('old_value',$contract_odontograma->contract_value); ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _l('close'); ?></button> <button type="submit" class="btn btn-info" onclick="update_lead_status_canban(); return false;"><?php echo _l('submit'); ?></button> </div> </div> <?php echo form_close(); ?> </div> </div> <?php } ?> <script> Dropzone.autoDiscover = false; if($("#contract-attachments-form").length>0){ var contractAttachmentsForm = new Dropzone("#contract-attachments-form", { addRemoveLinks: true, complete:function(file){ if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) { window.location.reload(); } } }); } $(document).ready(function(){ _validate_form($('#contract-form'),{client:'required',datestart:'required',subject:'required'}); _validate_form($('#renew-contract-form'),{new_start_date:'required'}); /* * PREENCHE O SELECT COM MÉDICO * */ init_relation_data2(); $('select[name="rel_type"]').on('change', function() { init_relation_data2(); }); /* FIM PREENCHE O SELECT COM MÉDICO */ }); function delete_contract_attachment_odontograma(wrapper,id){ $.get(admin_url + 'contracts_odontograma/delete_contract_attachment_odontograma/'+id,function(response){ if(response.success == true){ $(wrapper).parents('.contract-attachment-wrapper').remove(); } },'json'); } /* * PREENCHE O SELECT COM MÉDICO * */ function init_relation_data2(data) { var data = {}; var contract_rel_id = $('input[name="contract_rel_id"]'); var type = $('select[name="rel_type"]'); data.type = type.val(); if (contract_rel_id.length > 0) { if (data.type == '') { return; } else { $('#rel_id_wrapper2').removeClass('hide'); data.rel_id = contract_rel_id.val(); } } else { if (data.type == '') { $('#rel_id_wrapper2').addClass('hide'); return; } else { $('#rel_id_wrapper2').removeClass('hide'); } } $.post(admin_url + 'misc/get_relation_data', data).success(function(response) { $('#rel_id').html(response); $('#rel_id').val(data.rel_id); $('#rel_id').selectpicker('refresh'); $('#rel_id').change(); }); } /* FIM PREENCHE O SELECT COM MÉDICO */ </script> </body> </html>
  15. Stephanie Ferreira

    woocommerce erro carinho ajax 0

    Quando eu clico para adicionar um produto pela home, o tema abre esta pop-up pro carrinho ali no cantinho: http://prntscr.com/jjixa1 Mas o link cai pra este: https://kitboxclub.com.br/wp-admin/admin-ajax.php Pelo que entendi do código, é um problema de jQuery e eu não entendo nada de jQuery, o tema da loja é http://nitro.woorockets.com/ Isso foi feito pelo antigo desenvolvedor que passou a perna na gente e eu sou a designer que ta tentando arrumar.. SOCORRO? A página que eu preciso de ajuda: https://kitboxclub.com.br/ var isLocalStorageSupported=function(){var c="test",b=window.sessionStorage;try{b.setItem(c,"1");b.removeItem(c);return true}catch(a){return false}};(function(E){E.WR=E.WR||{};E.function_rotate_device={};E.fn.WR_ImagesLoaded=function(ad){var ab=function(af,ag){var ae=new Image;ae.onload=ag;ae.src=af};var aa=this.find("img").toArray().map(function(ae){return ae.src});if(aa.length){var ac=0;E(aa).each(function(ae,af){ab(af,function(){ac++;if(ac==aa.length){ad()}})})}else{ad()}};E.fn.WR_ImagesLazyload=function(af,ah){var ac=E(window),aa=af||0,ab=window.devicePixelRatio>1,ad=ab?"data-src-retina":"data-src-lazyload",ag=this,ae;this.one("WR_ImagesLazyload",function(){var aj=this.getAttribute(ad);aj=aj||this.getAttribute("data-src-lazyload");if(aj){this.setAttribute("src",aj);if(typeof ah==="function"){ah.call(this)}}});function ai(){var aj=ag.filter(function(){var al=E(this);if(al.is(":hidden")){return}var ak=ac.scrollTop(),an=ak+ac.height(),ao=al.offset().top,am=ao+al.height();return am>=ak-aa&&ao<=an+aa});ae=aj.trigger("WR_ImagesLazyload");ag=ag.not(ae)}ac.on("scroll.WR_ImagesLazyload resize.WR_ImagesLazyload lookup.WR_ImagesLazyload",ai);ai();return this};var D=function(){return(/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent||navigator.vendor||window.opera)};function v(ab,ac){var aa=false;E.each(ab,function(ad,ae){if(ae.name==ac){aa=true;return}});return aa}function l(aa,ac,ab){E.each(aa,function(ad,ae){if(ae.name==ac){aa.push({name:ab,value:ae.value});delete aa[ad]}});return aa}function J(aa){var ab={};E.each(aa,function(ac,ad){if(ad!=undefined){ab[ad.name]=ad.value}});return ab}function w(ac){if(typeof ac!="string"||ac.search("&")==-1){return false}var ae={},ab,aa,ad;ab=ac.split("&");for(ad=0;ad<ab.length;ad++){aa=ab[ad].split("=");ae[aa[0]]=decodeURIComponent(aa[1])}return ae}function q(){E(".hb-search .open.show-full-screen").on("click",function(){var ai=E(this);var ae=ai.parents(".hb-search");var ac=ae.find(".hb-search-fs")[0].outerHTML;E("body").append(ac);var ad=E(this).attr("data-background-style");var af=E(this).attr("data-layout");var ag=E("body > .hb-search-fs");if(af=="topbar"&&E(this).hasClass("active-topbar")){aa()}else{switch(af){case"full-screen":ag.fadeIn(300);E("html").addClass("no-scroll");break;case"topbar":var ah=E("#wpadminbar");var ab=ah.length?ah.height():"0";E(this).addClass("active-topbar");ag.css({display:"block",top:(ab-80)+"px"}).animate({top:ab+"px"});E("body > .wrapper-outer").css({position:"relative",top:"0px"}).animate({top:"80px"});break}ag.addClass(ad+" "+af);ag.find(".close").attr("data-layout",af);ag.find("form input").focus()}});function aa(){var ae=E("body > .hb-search-fs .close");var ac=ae.attr("data-layout");switch(ac){case"full-screen":E("body > .hb-search-fs").fadeOut(300,function(){E("html").removeClass("no-scroll");E("body > .hb-search-fs").remove();E("body > .wrapper-outer").removeAttr("style")});break;case"topbar":var ad=E("#wpadminbar");var ab=ad.length?ad.height():"0";E("body > .hb-search-fs").animate({top:(ab-80)+"px"},function(){E(this).remove()});E("body > .wrapper-outer").animate({top:"0px"},function(){E(this).removeAttr("style")});break}E(".header .hb-search").find(".open.active-topbar").removeClass("active-topbar")}E("body").on("click",".hb-search-fs .close",function(){aa()});E(".header .hb-search.dropdown .open").click(function(){var ai=E(this);var an=ai.closest(".hb-search");var ae=an.find(".search-form:first");var ah=E(".header .hb-search.dropdown").index(an);var ak=an[0].getBoundingClientRect();var ao=parseInt(an.css("borderTopWidth"));var aq=parseInt(an.css("borderBottomWidth"));E(".header .hb-search.dropdown:not(:eq("+ah+"))").removeClass("active-dropdown");if(an.hasClass("active-dropdown")){an.removeClass("active-dropdown");ae.removeClass("set-width")}else{S(ai,".hb-search",function(at){an.removeClass("active-dropdown");ae.removeClass("set-width")});ae.removeAttr("style");var ac=E(window).width();if(ae.width()>(ac-10)){ae.css("width",(ac-10));ae.addClass("set-width")}var ac=E(window).width();var ad=ae[0].getBoundingClientRect();var ab=ai[0].getBoundingClientRect();var ar=(ac>1024)?parseInt(WR_Data_Js.offset):0;if(ac<(ad.right+5)){var am=(ad.right+5+ar)-ac;ae.css("left",-am+"px")}else{if(ad.left<(5+ar)){ae.css("left","5px")}}var al=(an.attr("data-margin-top")=="empty")?an.attr("data-margin-top"):parseInt(an.attr("data-margin-top"));if(ai.closest(".sticky-row-scroll").length||al=="empty"){var af=ai.closest((ai.closest(".sticky-row-scroll").length?".sticky-row":".hb-section-outer"))[0].getBoundingClientRect();var aj=parseInt((af.bottom-ak.bottom)+(ak.height-ao));ae.css("top",aj)}else{if(al>0){ae.css("top",(al+(ak.height-(ao+aq))))}}an.addClass("active-dropdown");var ap=an.find(".wrls-form");if(ap.length){var ag=an.find(".cate-search-outer").width()}setTimeout(function(){an.find(".txt-search").focus()},300)}});E(".header .hb-search.expand-width .open").on("click",function(ao){var an=E(this);var ar=an.closest(".hb-search");var ae=ar.find(".search-form form");var af=ae[0].getBoundingClientRect();var al=af.width;var ap=an.closest(".header");var aj=ap.hasClass("vertical-layout");var au=true;if(ar.hasClass("expan-width-active")){ae.stop(true,true).css({overflow:"hidden"}).animate({width:"0px"},200,function(){ar.removeClass("expan-width-active");ae.removeAttr("style");var aw=an.closest(".container").find(".hide-expand-search");aw.css("visibility","").animate({opacity:1},200,function(){aw.removeClass("hide-expand-search");E(this).css("opacity","")})})}else{S(an,".hb-search",function(aw){ae.stop(true,true).css({overflow:"hidden"}).animate({width:"0px"},200,function(){ar.removeClass("expan-width-active");ae.removeAttr("style");var ax=an.closest(".container").find(".hide-expand-search");ax.css("visibility","").animate({opacity:1},200,function(){ax.removeClass("hide-expand-search");E(this).css("opacity","")})})});var ab=an[0].getBoundingClientRect();var ak=ab.left+ab.width/2;var ah=document.body.offsetWidth;var av=ar.outerWidth();if(aj){var am=ar[0].getBoundingClientRect();var aq=ap[0].getBoundingClientRect();if(ap.hasClass("left-position-vertical")){au=(am.left-aq.left-10)>=af.width?false:true}else{au=(aq.right-am.right-10)>=af.width?true:false}}else{au=ak*2<ah}if(au){var at=ar.nextUntil();if(at.length){var ad=0;var ai=function(){ae.stop(true,true).css({left:av+5,width:0,overflow:"hidden",visibility:"initial"}).animate({width:al},200,function(){E(this).css("overflow","")})};if(!aj){at.each(function(aw,ax){if(ad<al){E(ax).animate({opacity:0},200,function(){E(ax).css("visibility","hidden")});E(ax).addClass("hide-expand-search")}ad+=E(ax).outerWidth(true);if(ad>al){return false}});setTimeout(ai,200)}else{ai()}}else{ae.stop(true,true).css({left:av+5,width:0,overflow:"hidden",visibility:"initial"}).animate({width:al},200,function(){E(this).css("overflow","")})}}else{var ag=ar.prevUntil();if(ag.length){var ac=0;var ai=function(){ae.stop(true,true).css({right:av+5,width:0,overflow:"hidden",visibility:"initial"}).animate({width:al},200,function(){E(this).css("overflow","")})};if(!aj){ag.each(function(aw,ax){if(ac<al){E(ax).animate({opacity:0},200,function(){E(ax).css("visibility","hidden")});E(ax).addClass("hide-expand-search")}ac+=E(ax).outerWidth(true);if(ac>al){return false}});setTimeout(ai,200)}else{ai()}}else{ae.stop(true,true).css({right:av+5,width:0,overflow:"hidden",visibility:"initial"}).animate({width:al},200,function(){E(this).css("overflow","")})}}ar.addClass("expan-width-active");setTimeout(function(){ar.find(".txt-search").focus()},300)}});E(".header .hb-search.boxed .open").on("click",function(){var ac=E(this);var ab=ac.parents(".hb-search");ab.find('input[type="submit"]').trigger("click")})}function r(){E(".hb-cart.sidebar").click(function(){var aj=E(this);var an=aj.find(".cart-control-sidebar");var al=aj.find(".hb-minicart")[0].outerHTML;if(!E("body > .hb-cart-outer").length){E("body").append('<div class="hb-cart-outer"></div>')}E("body > .hb-cart-outer").html('<span class="wr-close-mobile"><span></span></span>'+al);if(!E("body > .overlay-sidebar").length){var am=E('<div class="overlay-sidebar"></div>').click(function(){aa(E(this))});E("body").append(am)}E("html").addClass("no-scroll");var af=an.attr("data-animation");var ai=an.attr("data-position");var ag=E("body > .overlay-sidebar");var ad=E("body > .wrapper-outer");var ah=E(".hb-cart-outer .hb-minicart");var ao=E(".hb-cart-outer .hb-minicart .widget_shopping_cart_content");ag.addClass("active").attr("data-animation",af).attr("data-position",ai);ah.attr("style","");ad.attr("style","");ag.attr("style","");ao.attr("style","");ag.css({display:"block"}).animate({opacity:1});ah.addClass(ai);ah.css("opacity",1);var ak=ah[0].getBoundingClientRect();var ae=function(){var at=E(".hb-cart-outer .widget_shopping_cart_content > .cart_list-outer");var av=E(".hb-cart-outer .hb-minicart").width();var au=at.width();var ax=E(".hb-cart-outer .widget_shopping_cart_content > .price-checkout").outerWidth(true);if(av<(au+ax)){var ar=E(".hb-cart-outer");var aw=E(".hb-cart-outer .cart_list-outer");var at=E(".hb-cart-outer .cart_list");ar.addClass("cart-slider");var ay=av-ax;var aq=at.width();var ap=parseInt(((aq-ay)+50)/80)+1;ar.attr("data-items",ap);aw.width(ay);aw.prepend('<div class="control"><div class="prev control-item"><div class="prev-inner control-inner"></div></div><div class="disabled next control-item"><div class="next-inner control-inner"></div></div></div>')}};switch(ai){case"position-sidebar-right":ah.css({visibility:"visible",right:"-"+ak.width+"px"}).animate({right:"0px"});if(af=="sidebar-push"||af=="sidebar-fall-down"||af=="sidebar-fall-up"){ad.css({position:"relative",right:"0px"}).animate({right:ak.width+"px"})}switch(af){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ao.css({position:"relative",top:"-300px"}).animate({top:"0px"});break;case"sidebar-fall-up":ao.css({position:"relative",top:"300px"}).animate({top:"0px"});break}break;case"position-sidebar-left":ah.css({visibility:"visible",left:"-"+ak.width+"px"}).animate({left:"0px"});if(af=="sidebar-push"||af=="sidebar-fall-down"||af=="sidebar-fall-up"){ad.css({position:"relative",left:"0px"}).animate({left:ak.width+"px"})}switch(af){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ao.css({position:"relative",top:"-300px"}).animate({top:"0px"});break;case"sidebar-fall-up":ao.css({position:"relative",top:"300px"}).animate({top:"0px"});break}break;case"position-sidebar-top":ah.addClass("active");if(af=="sidebar-slide-in-on-top"||af=="sidebar-push"||af=="sidebar-fall-down"){ah.css({visibility:"visible",transform:"translate(0%, -100%)"}).animate({transform:"translate(0%, 0%)"})}ae();switch(af){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ao.css({position:"relative",top:"-150px",opacity:0}).animate({top:"0px",opacity:1});break;case"sidebar-fall-up":ah.css({overflow:"hidden",visibility:"visible",transform:"translate(0%, -100%)"}).animate({transform:"translate(0%, 0%)"},function(){E(this).css("overflow","")});ao.css({position:"relative",top:"150px",opacity:0}).animate({top:"0px",opacity:1});break}break;case"position-sidebar-bottom":if(af=="sidebar-slide-in-on-top"||af=="sidebar-push"||af=="sidebar-fall-up"){ah.css({visibility:"visible",transform:"translate(0%, 100%)"}).animate({transform:"translate(0%, 0%)"})}ae();switch(af){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ah.css({overflow:"hidden",visibility:"visible",transform:"translate(0%, 100%)"}).animate({transform:"translate(0%, 0%)"},function(){ah.css("overflow","")});ao.css({position:"relative",top:"-150px",opacity:0}).animate({top:"0px",opacity:1});break;case"sidebar-fall-up":ao.css({position:"relative",top:"150px",opacity:0}).animate({top:"0px",opacity:1});break}break}});function aa(ak){ak.removeClass("active");var ah=ak.attr("data-animation");var ad=ak.attr("data-position");var ae=E(".hb-cart-outer .hb-minicart .widget_shopping_cart_content");var ai=E(".active-icon-cart-sidebar");var af=E(".hb-cart-outer .hb-minicart");var aj=E("body > .wrapper-outer");ak.animate({opacity:0},function(){ak.hide()});setTimeout(function(){E(".hb-cart.sidebar .hb-minicart").html(E("body > .hb-cart-outer .hb-minicart").html()).find("input.edit-number").each(function(al,am){if(parseInt(E(am).data("value-old"))&&E(am).attr("value")!=E(am).data("value-old")){E(am).attr("value",E(am).data("value-old"))}});E("body > .hb-cart-outer").remove();ak.remove();E("html").removeClass("no-scroll");aj.removeAttr("style")},500);var ag=af[0].getBoundingClientRect();switch(ad){case"position-sidebar-right":af.animate({right:"-"+ag.width+"px"});if(ah=="sidebar-push"||ah=="sidebar-fall-down"||ah=="sidebar-fall-up"){aj.animate({right:"0px"})}switch(ah){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ae.animate({top:"-300px"});break;case"sidebar-fall-up":ae.animate({top:"300px"});break}break;case"position-sidebar-left":af.animate({left:"-"+ag.width+"px"});if(ah=="sidebar-push"||ah=="sidebar-fall-down"||ah=="sidebar-fall-up"){aj.animate({left:"0px"})}switch(ah){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ae.animate({top:"-300px"});break;case"sidebar-fall-up":ae.animate({top:"300px"});break}break;case"position-sidebar-top":E(".hb-cart-outer .hb-minicart .action-top-bottom").remove();if(ah=="sidebar-slide-in-on-top"||ah=="sidebar-push"||ah=="sidebar-fall-down"){af.animate({top:"-120px"})}if(ah=="sidebar-push"||ah=="sidebar-fall-down"||ah=="sidebar-fall-up"){aj.animate({top:"0px"})}switch(ah){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":ae.animate({top:"-150px",opacity:0});break;case"sidebar-fall-up":af.css("overflow","hidden").animate({top:"-120px"},function(){E(this).css("overflow","")});ae.animate({top:"150px",opacity:0});break}break;case"position-sidebar-bottom":E(".hb-cart-outer .hb-minicart .action-top-bottom").remove();if(ah=="sidebar-slide-in-on-top"||ah=="sidebar-push"||ah=="sidebar-fall-up"){af.animate({bottom:"-120px"})}if(ah=="sidebar-push"||ah=="sidebar-fall-down"||ah=="sidebar-fall-up"){aj.animate({bottom:"0px"})}switch(ah){case"sidebar-slide-in-on-top":break;case"sidebar-push":break;case"sidebar-fall-down":af.css("overflow","hidden").animate({bottom:"-120px"},function(){E(this).css("overflow","initial")});ae.animate({top:"-150px",opacity:0});break;case"sidebar-fall-up":ae.animate({top:"150px",opacity:0});break}break}setTimeout(function(){aj.removeAttr("style");af.removeAttr("style");E(".hb-cart-outer .hb-minicart").removeAttr("style");ae.removeAttr("style");ak.removeAttr("style")},500)}if(E.fn.hoverIntent){E("body").hoverIntent({over:function(){var aj=E(this);var am=aj.find(".hb-minicart-outer:first");var ah=aj.find(".link-cart:first")[0].getBoundingClientRect();am.removeAttr("style");var ad=am[0].getBoundingClientRect();var ag=E(window).width(),ak=E(window).height();var aq=(ag>1024)?parseInt(WR_Data_Js.offset):0;if(ag<(ad.right+5+aq)){var an=((ad.right+5)-ag)+aq;am.css("left",-an+"px")}else{if(ad.left<(5+aq)){am.css("left","5px")}}aj.addClass("active-dropdown");var al=(aj.attr("data-margin-top")=="empty")?aj.attr("data-margin-top"):parseInt(aj.attr("data-margin-top"));if(aj.closest(".sticky-row-scroll").length||al=="empty"){var af=aj[0].getBoundingClientRect();var ap=aj.closest((aj.closest(".sticky-row-scroll").length?".sticky-row":".hb-section-outer"))[0].getBoundingClientRect();var ao=parseInt(ap.bottom-ah.bottom);var ai=parseInt(ap.bottom-ah.top);if(aj.find(".hover-area").length==0){aj.append('<span class="hover-area" style="height:'+ao+'px"></span>')}am.css("top",ai)}else{if(al>0){if(aj.find(".hover-area").length==0){aj.append('<span class="hover-area" style="height:'+al+'px"></span>')}var af=aj[0].getBoundingClientRect();am.css("top",(al+ah.height))}}ad=am[0].getBoundingClientRect();if(ad.bottom>ak){var ae=ad.height-(ad.bottom-ak)-5;am.css({overflowY:"scroll",height:ae})}},out:function(){var ad=E(this);ad.removeClass("active-dropdown");ad.find(".hover-area").remove()},timeout:0,sensitivity:1,interval:0,selector:".hb-cart.dropdown"})}E("body").on("click",".hb-cart-outer.cart-slider .control .prev",function(){var ah=E(this);var af=ah.closest(".hb-cart-outer");var ae=parseInt(af.attr("data-items"));if(af.attr("data-item")>=ae){return}var ag=(af.attr("data-item")==undefined)?1:(parseInt(af.attr("data-item"))+1);var ad=af.find(".cart_list");af.attr("data-item",ag);ad.css("right",-(ag*80));if(ae==ag){ah.addClass("disabled")}E(".hb-cart-outer.cart-slider .control .next").removeClass("disabled")});E("body").on("click",".hb-cart-outer.cart-slider .control .next",function(){var ag=E(this);var ae=ag.closest(".hb-cart-outer");if(ae.attr("data-item")==undefined||ae.attr("data-item")==0){return}var af=parseInt(ae.attr("data-item"))-1;var ad=ae.find(".cart_list");ae.attr("data-item",af);if(af==0){ag.addClass("disabled")}E(".hb-cart-outer.cart-slider .control .prev").removeClass("disabled");ad.css("right",-(af*80))});E("body").on("click",".widget_shopping_cart_content .remove-item .remove",function(af){af.preventDefault();var ag=E(this),ae=ag.closest(".hb-minicart"),ad=ag.attr("data-product_id");ag.addClass("loading");E.ajax({type:"POST",url:WRAjaxURL,data:{action:"wr_product_remove",cart_item_key:ad},success:function(aj){if(aj){aj=E.parseJSON(aj);if(ae.hasClass("position-sidebar-top")||ae.hasClass("position-sidebar-bottom")){var ah=ag.closest(".cart-slider");if(ah.length){var ai=parseInt(ah.attr("data-items"));ah.attr("data-items",(ai-1));if(ai==1){ah.removeClass("cart-slider");ah.find(".cart_list-outer").removeAttr("style")}}E('li[data-key="'+ad+'"]').hide(300,function(){E('li[data-key="'+ad+'"]').remove()})}else{E('li[data-key="'+ad+'"]').slideUp(300,function(){E('li[data-key="'+ad+'"]').remove()})}if(E(".mini-price").length){E(".mini-price").html(aj.price_total)}if(E(".hb-cart .cart-control .count").length){E(".hb-cart .cart-control .count").html(aj.count_product)}if(aj.count_product==0){if(E(".hb-minicart .total").length){E(".hb-minicart .total").hide()}if(E(".hb-minicart .buttons").length){E(".hb-minicart .buttons").hide()}if(!E(".hb-minicart .product_list_widget .empty").length){E(".hb-minicart .product_list_widget").append('<li class="empty">'+aj.empty+"</li>")}}}}})});E(document).ajaxComplete(function(af,aj,ae){var ad=ae.url;var ah=(typeof ae.data!="undefined")?ae.data:"";if(ad.search("wc-ajax=add_to_cart")!=-1){if(!isLocalStorageSupported()){return window.location.reload()}if(ae.data!=undefined&&aj.responseJSON!=undefined&&aj.responseJSON.cart_hash!=undefined){var ak=w(ae.data);E.ajax({type:"POST",url:WRAjaxURL,data:{action:"wr_add_to_cart_message",product_id:ak.product_id},success:function(an){if(an.message==undefined){return false}E("body > .wr-notice-cart-outer").remove();var al='<div class="wr-notice-cart-outer pf ptr"><div class="wr-notice-cart"><div class="icon-notice"><i class="nitro-icon-cart-9"></i></div><div class="text-notice">'+an.message+"</div></div></div>";E("body").append(al);var am=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(am);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},"10");setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},"5000")}})}else{if(ae.data!=undefined&&aj.responseJSON!=undefined&&aj.responseJSON.error==true){E.ajax({type:"POST",url:WRAjaxURL,data:{action:"wr_add_to_cart_error"},success:function(an){if(an.message==undefined){return false}E("body > .wr-notice-cart-outer").remove();var al='<div class="wr-notice-cart-outer pf ptr error"><div class="wr-notice-cart"><div class="icon-notice"><i class="nitro-icon-cart-9"></i></div><div class="text-notice">'+an.message+"</div></div></div>";E("body").append(al);var am=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(am);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},"10");setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},"5000")}})}}}if(ae.data!=undefined){var ak=w(ae.data);if(ak.action=="add_to_wishlist"){E("body > .wr-notice-cart-outer").remove();var ag='<div class="wr-notice-cart-outer pf ptr"><div class="wr-notice-cart"><div class="icon-notice"><i class="fa fa-heart-o"></i></div><div class="text-notice"><div> '+aj.responseJSON.message+' </div><a class="db" href="'+aj.responseJSON.wishlist_url+'">'+WR_Data_Js["View Wishlist"]+"</a></div></div></div>";E("body").append(ag);var ai=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(ai);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},"10");setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},"5000")}}if(ae.data!=undefined){var ak=w(ae.data);if(ad.search("wc-ajax=add_to_cart")!=-1&&ak.remove_from_wishlist_after_add_to_cart!=undefined){E(".woocommerce-message").hide();setTimeout(function(){if(E(".wishlist_table tbody tr").length<=1){E(".wishlist_table").remove();E("#yith-wcwl-form").addClass("empty")}},1000)}}});E(document.body).on("wc_fragments_loaded wc_fragments_refreshed added_to_cart",function(){if(isLocalStorageSupported()){if(window.wc_cart_fragments_params!==undefined&&wc_cart_fragments_params.fragment_name!==undefined){var ad=E.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name));if(ad&&typeof ad.wr_total_price!="undefined"&&typeof ad.wr_count_item!="undefined"){E(".hb-cart .cart-control .count").html(ad.wr_count_item);E(".mini-price").html(ad.wr_total_price)}}}});var ac;E("body").on("blur change",".widget_shopping_cart_content .edit-number",function(){var ak=E(this),ag=ak.closest(".mini_cart_item"),af=ag.attr("data-key"),ae=ak.val(),ad=ak.closest(".hb-minicart").attr("data-slidebar-position"),aj=ak.attr("data-max"),ai=ak.attr("data-value-old"),ah=ag.find(".multiplication");ah.removeClass("loading");if(ac){clearTimeout(ac)}ac=setTimeout(function(){if(ae==""||ae==0||ai==ae){return}if(aj&&parseInt(ae)>parseInt(aj)){var al=WR_Data_Js.wr_error_cannot_add,al=al.replace(/%d/g,aj);alert(al);return}ah.addClass("loading");E.ajax({type:"POST",url:WR_CART_URL,data:{"wr-action-cart":"update_cart",cart_item_key:af,cart_item_number:ae},success:function(am){if(am.count_product==0){if(E(".hb-minicart .total").length){E(".hb-minicart .total").hide()}if(E(".hb-minicart .buttons").length){E(".hb-minicart .buttons").hide()}if(!E(".hb-minicart .product_list_widget .empty").length){E(".hb-minicart .product_list_widget").append('<li class="empty">'+am.empty+"</li>")}}if(E(".mini-price").length){E(".mini-price").html(am.price_total)}if(E(".hb-cart .cart-control .count").length){E(".hb-cart .cart-control .count").html(am.count_product)}ah.removeClass("loading");ak.attr("data-value-old",ae)}})},50)});if(WR_Data_Js.ajax_add_to_cart_single!="no"||parseInt(WR_Data_Js.buy_now_button_enabled)){E(window).load(function(){var ad=document.querySelector("form.cart"),af;if(ad){af=E._data(ad,"events");E.WR.form_add_to_cart_events={};for(var ah in af){if(["click","submit"].indexOf(ah)<0){continue}E.WR.form_add_to_cart_events[ah]=[];for(var ae=0;ae<af[ah].length;ae++){if(ah=="click"){var ag=E(ad).find(af[ah][ae].selector);if(ag[0]&&ag[0].type!="submit"){continue}}E.WR.form_add_to_cart_events[ah].push({handler:af[ah][ae].handler,selector:af[ah][ae].selector})}for(var ae=0,ai=E.WR.form_add_to_cart_events[ah].length;ae<ai;ae++){E("form.cart").off(ah,E.WR.form_add_to_cart_events[ah][ae].selector,E.WR.form_add_to_cart_events[ah][ae].handler)}}E("form.cart").on("submit",function(aj){if(E.WR.form_add_to_cart_processing){aj.preventDefault()}})}});E("body").on("click",".quickview-modal form.cart .wr_single_add_to_cart_ajax, .product-type-subscription .cart .single_add_to_cart_button",function(ad){ad.preventDefault();ad.stopPropagation();var ae=E(this);window.wr_add_to_cart_ajax(ae,ad)});E("form.cart .wr_single_add_to_cart_ajax, .product-type-subscription .cart .single_add_to_cart_button").click(function(ad){var ae=E(this);ad.preventDefault();if(!E.WR.form_add_to_cart_processing){E.WR.form_add_to_cart_processing=true;if(typeof yith_wapo_general!="undefined"){setTimeout(function(){if(yith_wapo_general.do_submit){window.wr_add_to_cart_ajax(ae,ad)}},100)}else{window.wr_add_to_cart_ajax(ae,ad)}}else{ad.stopPropagation()}});E(".floating-add-to-cart .floating_button").click(function(ad){ad.preventDefault();ad.stopPropagation();var ae=E(this);E("form.cart .single_add_to_cart_button").trigger("click")});window.wr_add_to_cart_ajax=function(ai,af,an){var am=ai.closest("form"),ad=am.serializeArray(),aj=E(".floating-add-to-cart .floating_button"),ae=function(at){var at=at.match(/<script id="tp-notice-html"[^>]*>(\{"status":[^\r\n]+\})<\/script>/);if(!at){E.ajax({type:"POST",url:WRAjaxURL,data:{product_id:ad["add-to-cart"],action:"wr_add_to_cart_message",url_only:"true"},success:function(au){if(au!=undefined){window.location=au;return}}});return}at=E.parseJSON(at[1]);if(typeof an=="function"){return an(at)}if(at.status=="true"){if(at.redirect!=undefined){window.location=at.redirect;return}E("body > .wr-notice-cart-outer").remove();var ao=at.notice;ao=ao.replace(/&quot;/g,'"');var ap=ao.match(/<a[^>]+>.?[^<]*<\/a[^>]*>/)[0];ao.replace(/(<a[^>]+>.?[^<]*<\/a[^>]*>)(.*$)/);ao=ao.replace(/(<a[^>]+>.?[^<]*<\/a[^>]*>)(.*$)/,"$2");ao=ao.replace(/(".?[^"]*")(.*)/,"<div><b>$1</b>$2</div>");at.notice=ap+ao;var aq='<div class="wr-notice-cart-outer pf ptr"><div class="wr-notice-cart"><div class="icon-notice"><i class="nitro-icon-cart-9"></i></div><div class="text-notice">'+at.notice+"</div></div></div>";E("body").append(aq);var ar=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(ar);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},10);setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},500);ai.addClass("added");aj.addClass("added");E(document.body).trigger("updated_wc_div")}else{if(at.status=="false"){E("body > .wr-notice-cart-outer").remove();var aq='<div class="wr-notice-cart-outer pf ptr error"><div class="wr-notice-cart"><div class="icon-notice"><i class="nitro-icon-cart-9"></i></div><div class="text-notice">'+at.notice+"</div></div></div>";E("body").append(aq);var ar=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(ar);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},10);setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},5000);ai.addClass("error");aj.addClass("error")}}ai.removeClass("loading");ai.prop("disabled",false);aj.removeClass("loading");aj.prop("disabled",false)};ai.prop("disabled",true);ai.addClass("loading");ai.removeClass("added error");aj.addClass("loading");aj.removeClass("added error");if(!am.find('input[name="wr-action-cart"]').length){am.append('<input type="hidden" name="wr-action-cart" value="add_to_cart" />')}for(var ak in E.WR.form_add_to_cart_events){for(var ah=0;ah<E.WR.form_add_to_cart_events[ak].length;ah++){if(E.WR.form_add_to_cart_events[ak][ah].handler){var al=ai.closest("form");if(E.WR.form_add_to_cart_events[ak][ah].selector){al=al.find(E.WR.form_add_to_cart_events[ak][ah].selector)}if(al.length){E.WR.form_add_to_cart_events[ak][ah].handler.call(al[0],af)}}}}if(!isLocalStorageSupported()){am.append('<input type="hidden" name="add_to_cart_normally" value="1" />')}else{var ag=E("iframe#wr_nitro_add_to_cart_iframe");if(!ag.length){ag=E("<iframe />",{id:"wr_nitro_add_to_cart_iframe",name:"wr_nitro_add_to_cart_iframe",src:"about:blank"}).css({position:"absolute",top:ai.offset().top+"px",left:ai.offset().left+"px",width:ai.outerWidth()+"px",height:ai.outerHeight()+"px",opacity:0,visibility:"hidden"});E(document.body).append(ag)}ag.show().off("load").on("load",function(ao){ae(typeof ao.target.contentDocument.documentElement.outerHTML!="undefined"?ao.target.contentDocument.documentElement.outerHTML:ao.target.contentDocument.documentElement.innerHTML);ag.hide()});am.attr("target","wr_nitro_add_to_cart_iframe")}E.WR.form_add_to_cart_processing=false;am.submit()}}E("body").on("show_variation","form.cart.variations_form",function(af,ae,ad){af.preventDefault();var ag=E(this);if(ad){ag.find(".single_buy_now").removeAttr("disabled").removeClass("disabled");ag.find(".single_add_to_cart_button").removeAttr("disabled").removeClass("disabled");ag.find(".woocommerce-variation-add-to-cart").removeAttr("disabled").removeClass("disabled");E(".floating-add-to-cart button").removeAttr("disabled");ag.find(".single_buy_now").removeClass("wr-notice-tooltip");ag.find(".single_buy_now .notice-tooltip").remove();ag.find(".single_add_to_cart_button").removeClass("wr-notice-tooltip");ag.find(".single_add_to_cart_button .notice-tooltip").remove();ag.find(".woocommerce-variation-add-to-cart").removeClass("wr-notice-tooltip");ag.find(".woocommerce-variation-add-to-cart .notice-tooltip").remove();E(".floating-add-to-cart button").removeClass("wr-notice-tooltip");E(".floating-add-to-cart button .notice-tooltip").remove()}else{ag.find(".single_buy_now").attr("disabled","disabled").addClass("disabled");ag.find(".single_add_to_cart_button").attr("disabled","disabled").addClass("disabled");ag.find(".woocommerce-variation-add-to-cart").attr("disabled","disabled").addClass("disabled");E(".floating-add-to-cart button").attr("disabled","disabled").addClass("disabled");if(ag.find(".single_buy_now .notice-tooltip").length==0){ag.find(".single_buy_now").addClass("wr-notice-tooltip");ag.find(".single_buy_now").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(ag.find(".single_add_to_cart_button .notice-tooltip").length==0){ag.find(".single_add_to_cart_button").addClass("wr-notice-tooltip");ag.find(".single_add_to_cart_button").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(ag.find(".woocommerce-variation-add-to-cart .notice-tooltip").length==0){ag.find(".woocommerce-variation-add-to-cart").addClass("wr-notice-tooltip");ag.find(".woocommerce-variation-add-to-cart").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(E(".floating-add-to-cart button .notice-tooltip").length==0){E(".floating-add-to-cart button").addClass("wr-notice-tooltip");E(".floating-add-to-cart button").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}}});E("body").on("hide_variation","form.cart.variations_form",function(af,ae,ad){af.preventDefault();var ag=E(this);ag.find(".single_buy_now").attr("disabled","disabled").addClass("disabled");ag.find(".single_add_to_cart_button").attr("disabled","disabled").addClass("disabled");ag.find(".woocommerce-variation-add-to-cart").attr("disabled","disabled").addClass("disabled");E(".floating-add-to-cart button").attr("disabled","disabled").addClass("disabled");if(ag.find(".single_buy_now .notice-tooltip").length==0){ag.find(".single_buy_now").addClass("wr-notice-tooltip");ag.find(".single_buy_now").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(ag.find(".single_add_to_cart_button .notice-tooltip").length==0){ag.find(".single_add_to_cart_button").addClass("wr-notice-tooltip");ag.find(".single_add_to_cart_button").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(ag.find(".woocommerce-variation-add-to-cart .notice-tooltip").length==0){ag.find(".woocommerce-variation-add-to-cart").addClass("wr-notice-tooltip");ag.find(".woocommerce-variation-add-to-cart").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}if(E(".floating-add-to-cart button .notice-tooltip").length==0){E(".floating-add-to-cart button").addClass("wr-notice-tooltip");E(".floating-add-to-cart button").append('<span class="notice-tooltip">'+WR_Data_Js.wr_noice_tooltip+"</span>")}});var ab=function(ae){var ai=function(al){if(al.status=="true"){var am=WR_Data_Js.checkout_url;if(parseInt(WR_Data_Js.buy_now_button_action)==2){window.location.href=am}else{if(am.indexOf("?")>-1){am=am+"&wr-buy-now=check-out"}else{am=am+"?wr-buy-now=check-out"}if(typeof E.fn.magnificPopup!="undefined"){E.magnificPopup.close();setTimeout(function(){E.magnificPopup.open({items:{src:am},type:"iframe",mainClass:"mfp-fade wr-buy-now"})},100)}}E(document.body).trigger("updated_wc_div")}else{if(al.status=="false"){E("body > .wr-notice-cart-outer").remove();var aj='<div class="wr-notice-cart-outer pf ptr error"><div class="wr-notice-cart"><div class="icon-notice"><i class="nitro-icon-cart-9"></i></div><div class="text-notice">'+al.notice+"</div></div></div>";E("body").append(aj);var ak=E('<span class="close-notice"></span>').click(function(){E(this).closest(".wr-notice-cart-outer").removeClass("active")});E("body .wr-notice-cart").prepend(ak);setTimeout(function(){E("body > .wr-notice-cart-outer").addClass("active")},10);setTimeout(function(){E("body > .wr-notice-cart-outer").removeClass("active")},5000);ah.addClass("error");ag.addClass("error")}}ah.removeClass("loading");ah.prop("disabled",false);ag.removeClass("loading");ag.prop("disabled",false)};if(ae===true){return ai({status:"true"})}ae.preventDefault();ae.stopPropagation();var ah=E(this),ad=ah.closest("form"),ag=E(".floating-add-to-cart .floating_button"),af=function(){if(!isLocalStorageSupported()){ad.append('<input type="hidden" name="buy_now" value="1" />')}window.wr_add_to_cart_ajax(ah,ae,ai)};if(parseInt(WR_Data_Js.buy_now_checkout_type)==1){ah.prop("disabled",true);ah.addClass("loading");ah.removeClass("added error");ag.addClass("loading");ag.removeClass("error");E.ajax({url:WRAjaxURL,data:{action:"wr_clear_cart",_nonce:_nonce_wr_nitro},complete:function(aj){af()}})}else{af()}};if(parseInt(WR_Data_Js.in_buy_now_process)){ab(true)}E("form.cart .single_buy_now").click(ab);E("body").on("click",".quickview-modal form.cart .single_buy_now",ab);E(".floating-add-to-cart .single_buy_now").click(function(ad){ad.preventDefault();ad.stopPropagation();E("form.cart .single_buy_now").trigger("click")});E(document).on("gform_pre_conditional_logic",function(ad,ae){setTimeout(function(){var ag=E("#gform_submit_button_"+ae).is(":visible");if(!ag){var af=E('[id="gform_submit_button_'+ae+'"]');af.show().prop("disabled",true)}else{var ag=E("#gform_submit_button_"+ae).is(":disabled"),af=E('[id="gform_submit_button_'+ae+'"]');if(ag){af.show().prop("disabled",false)}else{af.show().prop("disabled",true)}}})});E("body").on("click",".woocommerce-cart .cart-table .product-remove a",function(){var ae=E(this),ad=ae.closest("tr").find(".product-name > a").text().trim();E(document).ajaxComplete(function(aj,al,ah){var ag=ah.url,ak=(typeof ah.data!="undefined")?ah.data:"";if(ag.indexOf("?remove_item=")!=-1){var af=E(".woocommerce-message"),am=af.find("a")[0].outerHTML,ai=WR_Data_Js.removed_notice.replace("%s",'"'+ad+'"');E(".woocommerce-message").html(ai+am)}})})}function s(){E(".hb-sidebar .icon-sidebar").click(function(){E(this).closest(".hb-sidebar").addClass("active");E("html").addClass("no-scroll")});E(".hb-sidebar .content-sidebar > .overlay").click(function(){E(this).closest(".hb-sidebar").removeClass("active");E("html").removeClass("no-scroll")})}function d(){E(".hb-currency .list .item").click(function(){var ad=E(this),aa=ad.closest("form"),ac=aa.find(".currency-value"),ab=ad.attr("data-id");ac.val(ab);aa.submit()})}function o(){E("body.wr-desktop").on("click",".hb-menu .menu-icon-action",function(){var ap=E(this);var av=ap.parents(".hb-menu");ap.find(".wr-burger-scale").addClass("wr-acitve-burger");var an=av.find(".site-navigator-outer")[0].outerHTML;if(!E("body > .hb-menu-outer").length){E("body").append('<div class="hb-menu-outer"></div>')}E("body > .hb-menu-outer").html(an);setTimeout(function(){var ay=E(".hb-menu-outer .navigator-column").height();var ax=E(".hb-menu-outer .navigator-column-inner").height();if(ay<ax){E(".hb-menu-outer").addClass("hb-menu-scroll")}},500);if(!E("body > .hb-overlay-menu").length){E("body").append('<div class="hb-overlay-menu"></div>')}var ao=ap.attr("data-layout");var aw=ap.attr("data-effect");var am=ap.attr("data-position");var ak=ap.attr("data-animation");var ah=E("body > .wrapper-outer");var aj=E("body > .hb-menu-outer .sidebar-style");var ar=E("body > .hb-menu-outer");var au=E("body > .hb-menu-outer ul.site-navigator");var al=E("body > .hb-overlay-menu");var at=E("body > .hb-menu-outer .fullscreen-style");E("html").addClass("no-scroll");if(ao=="fullscreen"){switch(aw){case"none":at.show();break;case"fade":at.fadeIn(100);break;case"scale":setTimeout(function(){at.addClass("scale-active")},100);break}}else{if(ao=="sidebar"){var ai=aj.innerWidth();al.attr("data-position",am);al.attr("data-animation",ak);al.fadeIn();aj.css("opacity",1);var aq=E("#wpadminbar");if(aq.length){aj.css("top",aq.height()+"px")}else{aj.css("top","0px")}switch(am){case"left":aj.css({visibility:"visible",left:"-"+ai+"px"}).animate({left:"0px"});if(ak=="push"||ak=="fall-down"||ak=="fall-up"){ah.css({position:"relative",left:"0px"}).animate({left:ai+"px"})}switch(ak){case"slide-in-on-top":break;case"push":break;case"fall-down":au.css({position:"relative",top:"-300px"}).animate({top:"0px"});break;case"fall-up":au.css({position:"relative",top:"300px"}).animate({top:"0px"});break}break;case"right":aj.css({visibility:"visible",right:"-"+ai+"px"}).animate({right:"0px"});if(ak=="push"||ak=="fall-down"||ak=="fall-up"){ah.css({position:"relative",right:"0px"}).animate({right:ai+"px"})}switch(ak){case"slide-in-on-top":break;case"push":break;case"fall-down":au.css({position:"relative",top:"-300px"}).animate({top:"0px"});break;case"fall-up":au.css({position:"relative",top:"300px"}).animate({top:"0px"});break}break}}}});E("body").on("click",".fullscreen-style .close",function(){E(".wr-burger-scale").removeClass("wr-acitve-burger");var aj=E(this);var ai=aj.parents(".hb-menu-outer");var ah=aj.attr("data-effect");switch(ah){case"none":ai.remove();break;case"fade":ai.find(".site-navigator-outer").fadeOut(300,function(){ai.remove()});break;case"scale":ai.find(".site-navigator-outer").removeClass("scale-active");setTimeout(function(){ai.remove()},300);break}E("html").removeClass("no-scroll");E("body > .wrapper-outer").removeAttr("style")});E("body").on("click",".hb-overlay-menu",function(){E(".wr-burger-scale").removeClass("wr-acitve-burger");var ao=E(this);var ai=ao.attr("data-position");var ak=ao.attr("data-animation");var am=E("body > .wrapper-outer");var aj=E("body > .hb-menu-outer .sidebar-style");var an=E("body > .hb-menu-outer ul.site-navigator");var ah=aj.innerWidth();var al=aj.innerHeight();ao.fadeOut();setTimeout(function(){E("body > .hb-menu-outer").remove();ao.remove();E("html").removeClass("no-scroll");E("body > .wrapper-outer").removeAttr("style")},500);switch(ai){case"left":aj.animate({left:"-"+ah+"px"});if(ak=="push"||ak=="fall-down"||ak=="fall-up"){am.animate({left:"0px"})}switch(ak){case"slide-in-on-top":break;case"push":break;case"fall-down":an.animate({top:"-300px"});break;case"fall-up":an.animate({top:"300px"});break}break;case"right":aj.animate({right:"-"+ah+"px"});if(ak=="push"||ak=="fall-down"||ak=="fall-up"){am.animate({right:"0px"})}switch(ak){case"slide-in-on-top":break;case"push":break;case"fall-down":an.animate({top:"-300px"});break;case"fall-up":an.animate({top:"300px"});break}break}});E("body").on("click",".header .menu-more .icon-more",function(aA){var aw=E(this);var an=aw.closest(".site-navigator-inner");var ah=aw.closest(".menu-more");var am=an.find(".site-navigator");var at=an.find(".nav-more");var av=an.find(" > .site-navigator .item-hidden");var ap=E(".header .menu-more").index(ah);var ao=aw.closest(".element-item");E(".header .menu-more:not(:eq("+ap+"))").removeClass("active-more");if(ah.hasClass("active-more")){ah.removeClass("active-more")}else{S(aw,".hb-menu",function(aD){ah.removeClass("active-more")});at.html("");at.removeAttr("style");var az=E(window).width();var aj=at[0].getBoundingClientRect();var ay=(az>1024)?parseInt(WR_Data_Js.offset):0;if(az<(aj.right+5)){var aq=(aj.right+5+ay)-az;at.css("left",-aq+"px")}else{if(aj.left<(5+ay)){at.css("left","5px")}}var aC=(ao.attr("data-margin-top")=="empty")?ao.attr("data-margin-top"):parseInt(ao.attr("data-margin-top"));var ai=ah[0].getBoundingClientRect();if(aw.closest(".sticky-row-scroll").length||aC=="empty"){var ak=aw.closest((aw.closest(".sticky-row-scroll").length?".sticky-row":".hb-section-outer"))[0].getBoundingClientRect();var al=ai.top+ai.height;var ax=ak.top+ak.height;var aB=parseInt(ax-al);var au=parseInt(aB+ai.height);at.css("top",au)}else{if(aC>0){at.css("top",(aC+ai.height))}}if(av.length){var ar="";E.each(av,function(){ar+=E(this)[0].outerHTML});at.html('<ul class="animation-'+ao.attr("data-animation")+" "+am.attr("class")+'">'+ar+"</ul>")}setTimeout(function(){ah.addClass("active-more")},10)}});if(E.fn.hoverIntent){var ad=function(aC){var aH="";var aJ=aC[0].getBoundingClientRect();var aF=E(window).width();var ar=(aF>1024)?parseInt(WR_Data_Js.offset):0;var aL=(aC.closest(".hb-menu").attr("data-margin-top")=="empty")?aC.closest(".hb-menu").attr("data-margin-top"):parseInt(aC.closest(".hb-menu").attr("data-margin-top"));if(aC.hasClass("wrmm-item")){var ax=aC.find(" > .mm-container-outer");ax.attr("style","display:block");var ai=aC.closest(".container")[0].getBoundingClientRect();var aF=E(window).width();var aw=ai.width;var az=ai.right;var av=0;var ao=0;var aA=ax.attr("data-width");if(aA==="full"){av=aw;if((av+10+ar*2)>=aF){av=aw-10;az-=5}}else{if(aA==="full-width"){av=aF-10-(ar*2);az=5+ar}else{av=parseInt(aA)?parseInt(aA):aw;if((av+10+ar*2)>=aF){av=aF-10-(ar*2);az-=5}}}ax.width(av);var aG=ax[0].getBoundingClientRect();if(aA=="full-width"){ao=-(aG.left-az)}else{if(aA=="full"){ao=((aG.right-az)>0)?-(parseInt(aG.right-az)):0}else{ao=(aG.right>(aF-5-(ar*2)))?(-(aG.right-(aF-5-ar))):0}}aH={display:"block",left:ao,width:av};if(aC.closest(".sticky-row-scroll").length||aL=="empty"){var ap=aC.closest((aC.closest(".sticky-row-scroll").length?".sticky-row":".hb-section-outer"))[0].getBoundingClientRect();var at=aJ.top+aJ.height;var aD=ap.top+ap.height;var aI=parseInt(aD-at);var ay=parseInt(aI+aJ.height);aH.top=ay;if(aC.children(".hover-area").length==0){aC.append('<span class="hover-area" style="height:'+(ay-aJ.height)+'px"></span>')}}else{if(aL>0){aH.top=aL+aJ.height;if(aC.children(".hover-area").length==0){aC.append('<span class="hover-area" style="height:'+aL+'px"></span>')}}}var aK=ax.find(".mm-container").width();var aj=0;E.each(ax.find(".mm-container > .mm-col"),function(){var aM=E(this);var aN=aM.outerWidth();aj+=aN;aM.removeClass("mm-last-row");if(aj==aK){aM.addClass("mm-last-row");aj=0}else{if(aj>aK){aM.prev().addClass("mm-last-row");aj=aN}}})}else{var ax=aC.find(" > ul.sub-menu");ax.attr("style","display:block");if(ax.length==0){return false}var aG=ax[0].getBoundingClientRect();var aF=E(window).width();var ao=Math.round(aG.right-aF+ar);if(aC.hasClass("menu-default")){ao=(ao>0)?(-ao-5):0;if(aC.closest(".sticky-row-scroll").length||aL=="empty"){var ap=aC.closest((aC.closest(".sticky-row-scroll").length?".sticky-row":".hb-section-outer"))[0].getBoundingClientRect();var at=aJ.top+aJ.height;var aD=ap.top+ap.height;var aI=parseInt(aD-at);var aq=parseInt(aI+aJ.height);if(aC.children(".hover-area").length==0){aC.append('<span class="hover-area" style="height:'+(aq-aJ.height)+'px"></span>')}}else{if(aL>0){var aq=aL+aJ.height;if(aC.children(".hover-area").length==0){aC.append('<span class="hover-area" style="height:'+aL+'px"></span>')}}}}else{var aB=aC.closest("ul");var an=parseInt(aB.css("left"));if(an<0){var ah=aB[0].getBoundingClientRect();ao=(aG.width<(ah.left-ar))?-aG.width:aG.width}else{if(WR_Data_Js.rtl==1&&aC.hasClass("menu-item-lv1")){ao=-aG.width}else{ao=(ao>0)?-aG.width:aG.width}}var am=E(window).height();var au=E("#wpadminbar").length?((E("#wpadminbar").css("position")=="fixed")?E("#wpadminbar").height():0):0;var al=am-(aG.top+aG.height)-ar;if(aG.height>(am-10-au-ar)){al=-(aG.top-au-5-ar)}else{al=al<5?(al-5):0}}aH={display:"block",left:ao};if(typeof al!=="undefined"){aH.top=al}if(typeof aq!=="undefined"){aH.top=aq}}ax.css(aH);var aE=aC.closest(".hb-menu").attr("data-animation");switch(aE){case"none":ax.css({opacity:"1"});break;case"fade":ax.stop(true,true).css({pointerEvents:"none"}).animate({opacity:"1"},150,function(){aH.pointerEvents="";ax.css(aH)});break;case"left-to-right":var ao=parseInt(ax.css("left"));ax.stop(true,true).css({pointerEvents:"none",left:(ao-50)+"px"}).animate({opacity:"1",left:ao+"px"},300,function(){aH.pointerEvents="";ax.css(aH)});break;case"right-to-left":var ao=parseInt(ax.css("left"));ax.stop(true,true).css({pointerEvents:"none",left:(ao+50)+"px"}).animate({opacity:"1",left:ao+"px"},300,function(){aH.pointerEvents="";ax.css(aH)});break;case"bottom-to-top":var ak=parseInt(ax.css("top"));var ao=parseInt(ax.css("left"));ax.stop(true,true).css({pointerEvents:"none",left:ao+"px",top:(ak+30)+"px"}).animate({opacity:"1",top:ak+"px"},300,function(){aH.pointerEvents="";ax.css(aH)});break;case"scale":var ao=parseInt(ax.css("left"));ax.css({pointerEvents:"none",left:ao+"px",transform:"scale(0.8)"}).animate({opacity:"1",transform:"scale(1)"},250,function(){aH.pointerEvents="";ax.css(aH)});break}aC.addClass("menu-hover")};setTimeout(function(){E(".wr-desktop header.header.horizontal-layout .active-menu").each(function(){ad(E(this))})},1000);E(".wr-desktop header.header.horizontal-layout").hoverIntent({over:function(){var ah=E(this);if(ah.hasClass("active-menu")){return}ad(ah)},out:function(){var al=E(this);if(al.hasClass("active-menu")){return}al.children(".hover-area").remove();if(al.hasClass("wrmm-item")){var aj=al.find(" > .mm-container-outer")}else{var aj=al.find("ul.sub-menu")}al.find(" > .menu-item-link .hover-area").removeAttr("style");var ak=al.closest(".hb-menu").attr("data-animation");switch(ak){case"none":al.removeClass("menu-hover");aj.removeAttr("style");break;case"fade":aj.stop(true,true).animate({opacity:"0"},150,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"left-to-right":var ai=parseInt(aj.css("left"))-50;aj.stop(true,true).animate({opacity:"0",left:ai+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"right-to-left":var ai=parseInt(aj.css("left"))+50;aj.stop(true,true).animate({opacity:"0",left:ai+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"bottom-to-top":var ah=parseInt(aj.css("top"))+50;aj.stop(true,true).animate({opacity:"0",top:ah+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"scale":aj.stop(true,true).animate({opacity:"0",transform:"scale(0.8)"},250,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break}},timeout:0,sensitivity:1,interval:0,selector:".site-navigator li.menu-item"});var af=function(az){var aC="";var aA=E(window).width();var aw=0;if(az.closest(".menu-more").length==1){var ai=az.closest(".menu-more");var aj=ai[0].getBoundingClientRect();var aB=aA-aj.right;if(aj.left>aB){aw=1}}else{aw=az.closest(".vertical-layout.right-position-vertical").length||az.closest(".sidebar-style.right-position").length}var aq=(aA>1024)?parseInt(WR_Data_Js.offset):0;var aD=az[0].getBoundingClientRect();var am=E(window).height();if(az.hasClass("wrmm-item")){var av=az.find(" > .mm-container-outer");av.attr("style","display:block");var at=av.attr("data-width");if(aw==1){var au=aD.left-aq;if(at=="full"||at>au){at=au-5}av.width(at);var ak=av[0].getBoundingClientRect();var ar=E("#wpadminbar").length?((E("#wpadminbar").css("position")=="fixed")?E("#wpadminbar").height():0):0;var an=am-(ak.top+ak.height)-aq;if(ak.height>(am-10-ar-aq)){an=-(ak.top-ar-5-aq)}else{an=an<5?(an-5):0}aC={display:"block",width:at,left:-at,top:an}}else{var au=aA-aD.right-aq;if(at=="full"||at>au){at=au-5}av.width(at);var ak=av[0].getBoundingClientRect();var ar=E("#wpadminbar").length?((E("#wpadminbar").css("position")=="fixed")?E("#wpadminbar").height():0):0;var an=am-(ak.top+ak.height)-aq;if(ak.height>(am-10-ar-aq)){an=-(ak.top-ar-5-aq)}else{an=an<5?(an-5):0}aC={display:"block",width:at,left:parseInt(aD.width),top:an}}}else{var av=az.find(" > ul.sub-menu");if(!av.length){return false}av.attr("style","display:block");var ak=av[0].getBoundingClientRect();if(az.hasClass("menu-default")){if(aw==1){var ap=-parseInt(ak.width)}else{var ap=parseInt(aD.width)}}else{var ay=az.closest("ul");var ah=ay[0].getBoundingClientRect();var ap=(ak.width>(aA-ah.right-aq-5))?-ak.width:ak.width;var ao=parseInt(ay.css("left"));if(ao<0){var ap=(ak.width<ah.left-5-aq)?-ak.width:ak.width}}var ar=E("#wpadminbar").length?((E("#wpadminbar").css("position")=="fixed")?E("#wpadminbar").height():0):0;var an=am-(ak.top+ak.height)-aq;if(ak.height>(am-10-ar-aq)){an=-(ak.top-ar-5-aq)}else{an=an<5?(an-5):0}aC={display:"block",left:ap,top:an}}var ax=(az.closest(".menu-more").length==1)?az.closest(".element-item").attr("data-animation"):az.closest(".site-navigator-outer").attr("data-effect-vertical");if(az.closest(".hb-menu-scroll").length&&az.hasClass("menu-item-lv0")){if(ak.height>(am-10-aq*2-ar)){aC.top=5}else{if((aD.top+ak.height)>(am-5-aq)){aC.top=aD.top-((aD.top+ak.height)-am);aC.top-=aq*2+ar+5}else{aC.top=aD.top-aq-ar}}}av.css(aC);switch(ax){case"none":av.css({visibility:"visible",opacity:"1"});break;case"fade":av.stop(true,true).animate({opacity:"1"},300,function(){av.css(aC)});break;case"left-to-right":var ap=parseInt(av.css("left"));av.stop(true,true).css({left:(ap-50)+"px"}).animate({opacity:"1",left:ap+"px"},300,function(){av.css(aC)});break;case"right-to-left":var ap=parseInt(av.css("left"));av.stop(true,true).css({left:(ap+50)+"px"}).animate({opacity:"1",left:ap+"px"},300,function(){av.css(aC)});break;case"bottom-to-top":var al=parseInt(av.css("top"));var ap=parseInt(av.css("left"));av.stop(true,true).css({left:ap+"px",top:(al+50)+"px"}).animate({opacity:"1",top:al+"px"},300,function(){av.css(aC)});break;case"scale":av.css({left:ap+"px",transform:"scale(0.8)"}).animate({opacity:"1",transform:"scale(1)"},300,function(){av.css(aC)});break}az.addClass("menu-hover")};setTimeout(function(){E(".vertical-layout .text-layout .animation-vertical-normal .active-menu").each(function(){af(E(this))})},1000);E("body").hoverIntent({over:function(){var ah=E(this);if(ah.hasClass("active-menu")){return}af(ah)},out:function(){var al=E(this);if(al.hasClass("active-menu")){return}if(al.hasClass("wrmm-item")){var aj=al.find(" > .mm-container-outer")}else{var aj=al.find("ul.sub-menu")}var ak=(al.closest(".menu-more").length==1)?al.closest(".element-item").attr("data-animation"):al.closest(".site-navigator-outer").attr("data-effect-vertical");switch(ak){case"none":al.removeClass("menu-hover");aj.removeAttr("style");break;case"fade":aj.stop(true,true).animate({opacity:"0"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"left-to-right":var ai=parseInt(aj.css("left"))-50;aj.stop(true,true).animate({opacity:"0",left:ai+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"right-to-left":var ai=parseInt(aj.css("left"))+50;aj.stop(true,true).animate({opacity:"0",left:ai+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"bottom-to-top":var ah=parseInt(aj.css("top"))+50;aj.stop(true,true).animate({opacity:"0",top:ah+"px"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break;case"scale":aj.stop(true,true).animate({opacity:"0",transform:"scale(0.8)"},300,function(){al.removeClass("menu-hover");aj.removeAttr("style")});break}},timeout:1,sensitivity:6,interval:0,selector:".vertical-layout .text-layout .animation-vertical-normal .site-navigator li.menu-item, .hb-menu-outer .sidebar-style.animation-vertical-normal .site-navigator li.menu-item, .menu-more .nav-more .site-navigator li.menu-item"})}var ag={};E("body").on("click",".mm-container .mm-has-children",function(aq){aq.preventDefault();var ao=E(this);var aj=ao.closest("ul");var an=ao.closest("li");var al=ao.closest(".mm-col");var ai=an.find(" > ul");aj.addClass("slide-hide");ai.addClass("slide-show");if(!al.find(".prev-slide").length){al.find(" > li > ul.sub-menu").prepend('<li class="prev-slide"><i class="fa fa-angle-left"></i></li>')}var am=ao.closest(".mm-col").find(" > li > ul");var ap=ai.height();var ah=am.find(".prev-slide").outerHeight();var ak=ap+ah;if(am.height()<ak){am.height(ak)}});E("body").on("click",".mm-container .prev-slide",function(al){var am=E(this);var aj=am.closest(".mm-col");var ai=am.closest(".mm-container");var ak=aj.find(".slide-show:last").removeClass("slide-show");var ah=aj.find(".slide-hide:last");if(aj.find(".slide-hide").length==1){am.closest("ul").css("height","");am.remove()}ah.removeClass("slide-hide")});E("body").on("click",".vertical-layout .hb-menu .animation-vertical-slide .icon-has-children, .hb-menu-outer .animation-vertical-slide .icon-has-children",function(ay){ay.preventDefault();var au=E(this);var ak=au.closest(".site-navigator-outer");var am=au.closest("li");var aj=am.find(" > ul > li");var an=au.closest("ul");var aq=an.find(" > li ");var ar=Object.keys(ag).length+1;var al=au.closest("a").find(".menu_title").text();var ap=am.find((am.hasClass("wrmm-item")?" .mm-container-outer ":" > ul "));var av=ap.height();var at=ak.find(".site-navigator");var ao=at.height();var ah="";if(av>ao){at.attr("style","height:"+av+"px;")}am.addClass("active-slide").addClass("slide-level-"+ar);if(!am.find(" > ul > li.menu-item-has-children").length){am.find(" > ul ").addClass("not-padding-icon")}if(aq.length){var az=aq.length;aq.each(function(aA,aB){setTimeout(function(){E(aB).addClass("slide-left");if(az==(aA+1)){if(am.hasClass("wrmm-item")){am.addClass("slide-normal")}}},100*aA)})}if(aj.length&&!am.hasClass("wrmm-item")){setTimeout(function(){aj.each(function(aA,aB){setTimeout(function(){E(aB).addClass("slide-normal")},100*aA)})},100)}ag[ar]=al;ak.find(".menu-breadcrumbs-outer").addClass("show-breadcrumbs");ak.find(".item-breadcrumbs").remove();if(Object.keys(ag).length){E.each(ag,function(aA,aB){ah+='<div class="element-breadcrumbs item-breadcrumbs"><i class="fa fa-long-arrow-right"></i><span class="title-breadcrumbs" data-level="'+aA+'">'+aB+"</span></div>"})}ak.find(".menu-breadcrumbs").append(ah);if(ak.hasClass("fullscreen-style")){var aw=au.closest(".navigator-column-inner")[0].getBoundingClientRect();var ax=E(window).width();var ai=ax-aw.left;ak.find(".menu-breadcrumbs-outer").css("width",parseInt(ai));au.closest(".navigator-column-inner").width(aw.width)}});E("body").on("click",".vertical-layout .menu-breadcrumbs .element-breadcrumbs .title-breadcrumbs, .hb-menu-outer .animation-vertical-slide .menu-breadcrumbs .element-breadcrumbs .title-breadcrumbs",function(){var al=E(this);var ak=al.attr("data-level");var aj=al.closest(".site-navigator-outer");var ai=Object.keys(ag).length;var ah=al.closest(".menu-breadcrumbs");if(ak==ai){return}if(aj.find(".slide-level-"+ai+".wrmm-item").length){aj.find(".slide-level-"+ai+".wrmm-item").removeClass("slide-normal")}else{aj.find(".slide-level-"+ai+"> ul > li").each(function(am,an){setTimeout(function(){E(an).removeClass("slide-normal")},100*am)})}if(ak=="all"){setTimeout(function(){var am=aj.find(".site-navigator > li").length;aj.find(".site-navigator > li").each(function(an,ao){setTimeout(function(){E(ao).removeClass("slide-left");if(am==(an+1)){E(ao).closest(".site-navigator").removeAttr("style");aj.find(".slide-normal").removeClass("slide-normal");aj.find(".slide-left").removeClass("slide-left");for(var ap=1;ap<=ai;ap++){aj.find(".slide-level-"+ap).removeClass("slide-level-"+ap)}aj.find(".active-slide").removeClass("active-slide");al.closest(".menu-breadcrumbs-outer").removeClass("show-breadcrumbs");setTimeout(function(){ag={};ah.find(".item-breadcrumbs").remove()},300)}},100*an)})},100)}else{setTimeout(function(){var am=aj.find(".slide-level-"+ak+" > ul > li").length;aj.find(".slide-level-"+ak+" > ul > li").each(function(an,ao){setTimeout(function(){E(ao).removeClass("slide-left");if(am==(an+1)){aj.find(".slide-level-"+ak+" ul ul .slide-normal").removeClass("slide-normal");aj.find(".slide-level-"+ak+" ul ul .slide-left").removeClass("slide-left");for(var ap=ak;ap<=ai;ap++){if(ap!=ak){aj.find(".slide-level-"+ap).removeClass("slide-level-"+ap)}}aj.find(".slide-level-"+ak+" .active-slide").removeClass("active-slide");for(var ap=ak;ap<=ai;ap++){if(ap!=ak){delete ag[ap];ah.find('.title-breadcrumbs[data-level="'+ap+'"]').parent().remove()}}}},100*an)})},100)}});E("body").on("click",".vertical-layout .hb-menu .animation-vertical-accordion .icon-has-children, .hb-menu-outer .animation-vertical-accordion .icon-has-children",function(ai){ai.preventDefault();var aj=E(this);var ah=aj.closest("li");if(ah.hasClass("active-accordion")){ah.removeClass("active-accordion");if(ah.find(" > .mm-container-outer").length){ah.find(" > .mm-container-outer").stop(true,true).slideUp(300)}else{ah.find(" > .sub-menu").stop(true,true).slideUp(300)}}else{ah.addClass("active-accordion");if(ah.find(" > .mm-container-outer").length){ah.find(" > .mm-container-outer").stop(true,true).slideDown(300)}else{ah.find(" > .sub-menu").stop(true,true).slideDown(300)}}});function ac(ah){var ai=0;E.each(ah,function(){var ak=E(this);if(ak.hasClass("hb-menu")&&ak.hasClass("text-layout")){var aj=(ak.outerWidth(true)-ak.find(".site-navigator-outer").width())+47;ai+=aj}else{var aj=ak.outerWidth(true);ai+=aj}});return ai}function ae(am,an,ak){var ah=0;var aj=0;E.each(am,function(){var ap=E(this);var ao=ap.outerWidth(true);ah+=ao});if(ah<an){aj=an-ah}if(aj){var ai=ak.prevAll(".hb-flex");if(ai.length){var al=parseInt(aj/ai.length);ai.width(al);ai.addClass("not-flex")}else{ak.css("marginLeft",(aj+parseInt(ak.css("marginLeft"))))}}}function aa(){E.each(E(".horizontal-layout .hb-section-outer"),function(){var aw=E(this);var at=aw.find(".hb-menu.text-layout");var ak=aw.find(".element-item.center-element");var aj=aw.find(".hb-flex");if(at.length){at.find(".site-navigator > .menu-item").removeClass("item-hidden");at.find(".menu-more").remove();aw.find(".center-element").removeAttr("style");aj.removeAttr("style");aj.removeClass("not-flex");if(ak.hasClass("hb-menu")&&ak.hasClass("text-layout")){var ao=aw.find(".hb-section > .container");var au=ao[0].getBoundingClientRect();var an=au.width-(parseInt(ao.css("borderLeftWidth"))+parseInt(ao.css("borderRightWidth"))+parseInt(ao.css("paddingLeft"))+parseInt(ao.css("paddingRight")));var aq=ak.prevAll(':not(".hb-flex")');var ai=ak.nextAll(':not(".hb-flex")');var av=ac(aq);var ar=ac(ai);var am=(av>ar)?av:ar;var ah=ak.outerWidth(true);var al=an-(am*2);if(ah>=al){ab(ak,al)}var ap=parseInt((an-ak.outerWidth(true))/2);ab(aq,ap);ab(ai,ap);ae(aq,ap,ak)}else{if(ak.length){ak.removeAttr("style");var ao=aw.find(".hb-section > .container");var au=ao[0].getBoundingClientRect();var an=au.width-(parseInt(ao.css("borderLeftWidth"))+parseInt(ao.css("borderRightWidth"))+parseInt(ao.css("paddingLeft"))+parseInt(ao.css("paddingRight")));var ap=parseInt((an-ak.outerWidth(true))/2);var aq=ak.prevAll(':not(".hb-flex")');var ai=ak.nextAll(':not(".hb-flex")');ab(aq,ap);ab(ai,ap);ae(aq,ap,ak)}else{var ao=aw.find(".hb-section > .container");var au=ao[0].getBoundingClientRect();var an=au.width-(parseInt(ao.css("borderLeftWidth"))+parseInt(ao.css("borderRightWidth"))+parseInt(ao.css("paddingLeft"))+parseInt(ao.css("paddingRight")));ab(aw.find(".element-item:not(.hb-flex)"),an)}}}else{if(ak.length){aw.find(".center-element").removeAttr("style");aw.find(".hb-flex").removeAttr("style");aj.removeClass("not-flex");var ao=aw.find(".hb-section > .container");var au=ao[0].getBoundingClientRect();var an=au.width-(parseInt(ao.css("borderLeftWidth"))+parseInt(ao.css("borderRightWidth"))+parseInt(ao.css("paddingLeft"))+parseInt(ao.css("paddingRight")));var ap=parseInt((an-ak.outerWidth(true))/2);var aq=ak.prevAll(':not(".hb-flex")');ae(aq,ap,ak)}}})}function ab(an,am){var ao=[];var ak=[];E.each(an,function(){var ar=E(this);if(ar.hasClass("hb-menu")&&ar.hasClass("text-layout")){ao.push(ar)}else{ak.push(ar)}});var ap=ao.length;E.each(ak,function(){am-=E(this).outerWidth(true)});var ai=parseInt(am/ap);var ah=0;var al=false;var aq=[];var aj=0;E.each(ao,function(){var ar=E(this).outerWidth(true);if(ar<ai){ah+=ai-ar}else{aq.push(aj)}aj++});ai+=parseInt(ah/aq.length);E.each(aq,function(aA,au){var aw=E(ao[au]);var az=aw.find(".site-navigator > .menu-item");if(!az.length){return}var ay=aw.outerWidth(true);var ar=aw.find(".site-navigator-outer").width();var ax=ai-((ay-ar)+52);var av=0;var at=false;E.each(az,function(aB,aC){av+=E(this).outerWidth(true);if(av>=ax){E(this).addClass("item-hidden");at=true}});if(at){aw.find(".site-navigator-inner").append('<div class="menu-more"><div class="icon-more"><span class="wr-burger-menu"></span><i class="fa fa-caret-down"></i></div><div class="nav-more"></div></div>')}})}aa();E(window).resize(_.debounce(function(){aa()},300))}function O(){function aa(){var ak=E(".header .sticky-row");var ap=ak.closest(".hb-section-outer");var ag=ap.height();var aq=ap.offset();var al=aq.top+ag;var ar=E(window).scrollTop();var ao=0;var ac=0;var ai=E("#wpadminbar");var an=E(".header .sticky-row .hb-search.dropdown");var aj=E(".header .sticky-row .hb-cart.dropdown");var ab=E(".wr-desktop .header .sticky-row .menu-more");var ad=E(".wr-desktop .header.horizontal-layout .sticky-row .hb-menu.text-layout .menu-item");if(ai.length){var ae=E(window).width();if(ae>600){ac=ai.height();ak.css("top",ac+"px")}}ap.height(ag+"px");if(ar>al){ak.addClass("sticky-row-scroll")}E.function_rotate_device.sticky_row=function(){ak.removeClass("sticky-row-scroll").removeClass("sticky-row-scroll-down").removeClass("sticky-row-scroll-up");ap.removeAttr("style");ag=ap.height();ap.height(ag+"px");aq=ap.offset();al=aq.top+ag};var am=106;var af=function(){ar=E(window).scrollTop();var av=ak.hasClass("sticky-row-scroll-up");var at=ak.hasClass("sticky-row-scroll");if(!av&&!at&&(ar>(al-ac))){an.removeClass("active-dropdown");aj.removeClass("active-dropdown");ab.removeClass("active-more");ad.trigger("mouseleave")}if(ar>al){if(!at){ak.addClass("sticky-row-scroll")}if(ar<(al+150)){if(am<106){am+=6;ak.css("transform","translateY(-"+am+"%)")}}else{if(ar>ao){if(am<106){am+=6;ak.css("transform","translateY(-"+am+"%)")}var au=ak.hasClass("sticky-row-scroll-down");if(!au){ak.addClass("sticky-row-scroll-down").removeClass("sticky-row-scroll-up")}}else{if(am>0){am-=6;ak.css("transform","translateY(-"+am+"%)")}if(!av){ak.addClass("sticky-row-scroll-up").removeClass("sticky-row-scroll-down")}}}}else{if(at){ak.removeClass("sticky-row-scroll").removeClass("sticky-row-scroll-up").removeClass("sticky-row-scroll-down");ak.css("transform","");am=106}}ao=ar};var ah=function(){ar=E(window).scrollTop();if(ar>(aq.top-ac)){ak.addClass("sticky-row-scroll")}else{ak.removeClass("sticky-row-scroll")}};if(E(".header .sticky-row").hasClass("sticky-normal")){E(window).scroll(ah);ap.find(".hb-section").height(ag+"px")}else{E(window).scroll(af)}}if(E(".header .sticky-row").length){setTimeout(function(){E(".header").WR_ImagesLoaded(function(){aa()})},50)}}function R(){var aa=E(".pageloader");if(!aa.length){return}E(window).on("pageshow",function(ab){if(ab.originalEvent!=undefined&&ab.originalEvent.persisted){aa.hide();aa.children().hide()}});E(window).on("beforeunload",function(){aa.fadeIn(300,function(){aa.children().fadeIn(300)})});aa.fadeOut(800);aa.children().fadeOut("slow")}function U(){var ae=[];var ad=E(".header .site-navigator > li");var aa=E("#wpadminbar").outerHeight();E(".wr-scroll-animated, .wr-scroll-animated *, .menu-item-link").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var ai=E(this.hash);if(!this.hash.slice(1)){return}var ah=E(window).width();var aj=(ah>1024)?parseInt(WR_Data_Js.offset):0;ai=ai.length?ai:E("[name="+this.hash.slice(1)+"]");if(ai.length){var af=E(".header .sticky-row");var ag=parseInt(af.attr("data-height"));if(!ag){ag=af.height()}E("html,body").stop().animate({scrollTop:ai.offset().top-aa-aj+1-ag+"px"},1200);return false}}});E.each(E(".header .site-navigator > li > a"),function(){var ah=E(this);var af=ah.attr("href");if(af!=undefined){if(af.match(/^#/gi)!=null){var ag=E(af);if(ag.length){ae.push(ag)}}}});var ac=_.debounce(function(){var ag=E(this);var af=ag.scrollTop();E.each(ae,function(){var aj=E(this);var an=aj.offset();var am=aj.outerHeight();var ai=aj.attr("id");var ak=E(".header .sticky-normal.sticky-row-scroll").height();if(af>=(an.top-aa-ak)&&af<=(an.top+am-aa-ak)){var al=E('.header .site-navigator > li > a[href="#'+ai+'"]');var ah=al.closest("li");ad.removeClass("current-menu-ancestor").removeClass("current-menu-item");ah.addClass("current-menu-item");return}})},10);var ab=function(){requestAnimationFrame(ac)};if(ae.length){E(window).scroll(ab)}}function Z(){var ac=E(".primary-sidebar-sticky");if(!ac.length){return}var ah=E(window),af=E(".primary-sidebar-inner"),an=parseInt(ac.css("marginTop")),ai=parseInt(af.css("marginTop")),ad=E("#wpadminbar"),al=E(".header .sticky-row"),am=al.attr("data-height"),ab=ad.length?parseInt(ad.height()):0,ag=parseInt(ac.find(".widget:last").css("marginBottom")),aa=false,aj=false;if(ai==0){if(an==0){ac.addClass("fixed-margin");an=30;aj=true}}else{an=0;aa=true}af.width(af.width());var ae=_.debounce(function(){var au=ah.width();if(au<=785){ac.removeClass("fixed-bottom fixed-top");return}if(au<=1008){var aC=0}else{var aC=parseInt(WR_Data_Js.offset)}var ap=af.height(),av=af.outerHeight(true),ay=ac.height(),aA=ah.height(),aB=al.length?((am!=0)?parseInt(am):al.height()):0,ax=ab+aB+an+aC,az=aA-ax-aC;if(ap>az||av>=ay){ac.removeClass("fixed-bottom fixed-top");return}var aw=E(this),aq=aw.scrollTop(),at=ac.offset(),ao=aq+aA,ay=ac.height(),aD=at.top+ay+(aA-ap)-ax,ar=aj?(ax-an):ax;if(aa){aD-=ai}af.css("top",ar);if(aq>(at.top-ax)&&ao<aD){if(ac.hasClass("fixed-bottom")){ac.removeClass("fixed-bottom")}ac.addClass("fixed-top");ac.addClass("fixing")}else{if(ao>aD){if(ac.hasClass("fixed-top")){ac.removeClass("fixed-top")}ac.addClass("fixed-bottom");ac.addClass("fixing")}else{ac.removeClass("fixed-bottom fixed-top fixing")}}},10);var ak=function(){requestAnimationFrame(ae)};E(window).scroll(ak);ak()}E.WR.Lightbox=function(){if(typeof E.fn.nivoLightbox=="undefined"){return setTimeout(function(){E.WR.Lightbox()},100)}E('a[data-lightbox^="nivo"]').each(function(){if(!E(this).data("nivo-lightbox-initialized")){E(this).nivoLightbox({effect:"fall",keyboardNav:true,clickOverlayToClose:true});E(this).data("nivo-lightbox-initialized",true)}})};function u(){if(E(".pagination[layout]").length>0){var ag=parseInt(E(".pagination").find(".page-ajax.enable").attr("data-page"));var ai=E(".pagination[layout]").attr("layout");var an=E(".pagination[layout-style]").attr("layout-style");var ab=E("."+("masonry"==an?"wr-nitro-masonry":"products"));var aj=false;var ah=E(".page-ajax"),al=E(ah).find("a").attr("href"),ak=".products",ao=".page-ajax a",af=E(ao).attr("href"),ae=2;var ac=E(".products .product").length;var aa=function(){E.get(al+"",function(aq){var at=E(ak,aq).wrapInner("").html(),ap=E(ak,aq).find(".product");ac+=ap.length;E(".woocommerce-result-count span").html(ac);E(at).WR_ImagesLoaded(function(){af=E(ao,aq).attr("href");ab.append(ap).isotope("appended",ap)});E(ao).text("...");if(ag>ae){if(WR_Data_Js.permalink=="plain"){var ar=al.replace(/paged=+[0-9]+/gi,"paged="+(ae+1))}else{var ar=al.replace(/page\/+[0-9]+\//gi,"page/"+(ae+1)+"/")}E(ao).attr("href",ar)}else{E(ao).removeAttr("href").addClass("disabled")}aj=false;ae++})};if(ab.length){ab.WR_ImagesLoaded(function(){if("masonry"==an){ab.isotope({itemSelector:".product",masonry:{columnWidth:".grid-sizer"}})}else{ab.isotope({itemSelector:".product",layoutMode:"fitRows"})}})}if("loadmore"==ai){E(".page-ajax a").on("click",function(ap){ap.preventDefault();ah=E(".page-ajax");al=E(ah).find("a").attr("href");ak=".products";ao=".page-ajax a";af=E(ao).attr("href");if(!al){return}E(ao).html('<i class="fa fa-circle-o-notch fa-spin"></i>');aa()})}else{if("infinite"==ai){var am=function(){ab=E("."+("masonry"==an?"wr-nitro-masonry":"products"));ah=E(".page-ajax");al=E(ah).find("a").attr("href");ak=".products";ao=".page-ajax a";af=E(ao).attr("href");var ap=ab.offset().top+ab.height()-E(window).scrollTop();if(ap<window.innerHeight&&ap>0&&!aj){if(!al){return}aj=true;E(ao).html('<i class="fa fa-circle-o-notch fa-spin"></i>');aa()}};var ad=function(){requestAnimationFrame(am)};E(window).scroll(ad)}}}}function e(){if(typeof ScrollReveal!="undefined"){window.sr=ScrollReveal().reveal(".wr-item-animation",{duration:700})}}E.WR.Carousel=function(){if(typeof E.fn.owlCarousel=="undefined"){return setTimeout(E.WR.Carousel,100)}E(".wr-nitro-carousel").each(function(){var al=E(this);if(!al.data("owl-carousel-initialized")){if(al.hasClass("exclude-carousel")){return}var ar=al.data("owl-options");if(ar!==undefined){var an=("true"==ar.autoplay)?true:false,ac=(ar.autoplayTimeout)?ar.autoplayTimeout:"5000",ad=ar.items,ai=("true"==ar.nav)?true:false,at=("true"==ar.dots)?true:false,aq=("true"==ar.autoplayHoverPause)?true:false,ae=ar.desktop,ao=ar.tablet,ak=ar.mobile,am=ar.sm_mobile,ag=ar.custom_responsive,ah=("true"==ar.rtl)?true:false,aj=(ar.loop)?ar.loop:true,ab=("true"==ar.autoHeight)?true:false,aa=(ar.animateIn)?ar.animateIn:"",af=(ar.animateOut)?ar.animateOut:"",ap={items:1,autoplay:an,autoplayTimeout:ac,autoplayHoverPause:aq,nav:ai,dots:at,loop:aj,autoHeight:ab,smartSpeed:400,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],rtl:ah};ap.items=ad;if(!aa&&!ab&&"1"!=ad&&"true"!=ag){ap.responsive={0:{items:ak},584:{items:ao},784:{items:ad}}}else{ap.responsive={0:{items:am},376:{items:ak},601:{items:ao},769:{items:ae},993:{items:ad}}}if(aa){ap.animateIn=aa}if(af){ap.animateOut=af}al.owlCarousel(ap)}al.data("owl-carousel-initialized",true)}})};function A(){var aa=E(".wr-nitro-masonry");aa.each(function(ad,af){var ae=E(this).data("masonry");if(ae!==undefined){var ac=ae.selector,ab=ae.columnWidth;E(this).WR_ImagesLoaded(function(){E(af).isotope({percentPosition:true,itemSelector:ac,masonry:{columnWidth:ab}})})}})}function h(){var aa=E(".wr-nitro-countdown");aa.each(function(af,ah){var ag=E(this).data("time");if(ag!==undefined){var ae=ag.day,ad=ag.month,ac=ag.year,ab=ad+"/ "+ae+"/ "+ac+" 00:00:00";E(ah).countdown({date:ab,render:function(ai){E(this.el).html("<div class='pr'><span class='db color-primary'>"+this.leadingZeros(ai.days,2)+"</span><span class='db tu ls-1 color-dark'>"+WR_Data_Js.wr_countdown_days+"</span></div><div class='pr'><span class='db color-primary'>"+this.leadingZeros(ai.hours,2)+"</span><span class='db tu ls-1 color-dark'>"+WR_Data_Js.wr_countdown_hrs+"</span></div><div class='pr'><span class='db color-primary'>"+this.leadingZeros(ai.min,2)+"</span><span class='db tu ls-1 color-dark'>"+WR_Data_Js.wr_countdown_mins+"</span></div><div class='pr'><span class='db color-primary'>"+this.leadingZeros(ai.sec,2)+"</span><span class='db tu ls-1 color-dark'>"+WR_Data_Js.wr_countdown_secs+"</span></div>")}})}})}function H(){var aa=E("#wr-back-top");E(window).scroll(function(){if(E(this).scrollTop()!=0){aa.fadeIn()}else{aa.fadeOut()}});aa.click(function(){E("body, html").animate({scrollTop:0},800)})}function t(){E(".search-results .search-item .entry-content p, .search-results .search-item .entry-title a").each(function(ac,ad){var aa=E(".search-results .result-list").attr("data-key");var ae=E(ad).text();var ab=aa.split(" ");E.each(ab,function(ag,af){var ah=new RegExp("("+af+")","gi");ae=ae.replace(ah,'<span class="highlight">$1</span>');E(ad).html(ae)})})}function x(){E("body").delegate(".product__compare .product__btn","click",function(){E(this).next().find(".compare").trigger("click");return false})}function j(){if(E(".single-product .product-type-booking").length){E(".woocommerce-message").show()}}function K(){var aa=function(ab){if(parseInt(Number(ab))==ab){return ab}return ab.toFixed(2)};E("body").on("click",".quantity a.plus",function(ad){var ae=E(this).parent().parent().find("input"),ab=Number(ae.attr("step")),ac=aa(Number(ae.val())+ab);ae.val(ac);ae.trigger("change")});E("body").on("click",".quantity a.minus",function(ad){var ae=E(this).parent().parent().find("input"),ab=Number(ae.attr("step")),ac=aa(Number(ae.val())-ab);if(ac<ab){ac=ab}ae.val(ac);ae.trigger("change")})}function z(){E("body").on("click",".btn-quickview",function(ab){var ad=E(this);ad.addClass("loading");var ac=ad.attr("data-prod"),aa={action:"wr_quickview",product:ac,wr_view_image:"wr_quickview"};E.post(WRAjaxURL,aa,function(ae){ae=E(ae);ae.find(".wr-custom-attribute .has-image-gallery[data-value]").each(function(){var af=E(this).attr("data-href"),ag=af+"&wr_view_image=wr_quickview";E(this).attr("data-href",ag)});if(typeof E.fn.magnificPopup!="undefined"){E.magnificPopup.open({items:{src:ae},mainClass:"mfp-fade mfp-quickview",removalDelay:300,callbacks:{open:function(){if(typeof wc_add_to_cart_variation_params!=="undefined"){E(".variations_form").each(function(){E(this).wc_variation_form().find(".variations select:eq(0)").change()})}}}})}ad.removeClass("loading");setTimeout(function(){if(E(".quickview-modal form").hasClass("variations_form")){E(".quickview-modal form.variations_form").wc_variation_form()}E(".wr-images-quickview").WR_ImagesLoaded(function(){var af=E(".wr-images-quickview").outerHeight();E(".quickview-modal .info").css({height:af,overflow:"auto"})})},100)});ab.preventDefault();ab.stopPropagation()});E("body").on("click",".mfp-quickview .open-popup-link",function(aa){aa.preventDefault();aa.stopPropagation();E(".quickview-modal").addClass("active-sizeguide");E(".quickview-modal-inner").hide()});E("body").on("click",".wr-sizeguide .sizeguide-close",function(aa){E(".quickview-modal").removeClass("active-sizeguide");E(".quickview-modal-inner").show()})}function N(){E("body").on("click",".product-type-simple .btn-buynow, .wr-buy-now .btn-buynow",function(ab){var ac=E(this);ac.addClass("loading");var aa={action:"wr_quickbuy",product_id:ac.attr("data-product-id")};if(ac.attr("data-checkout")!=undefined&&ac.attr("data-payment-info")!=undefined){aa.shortcode_checkout=ac.attr("data-checkout");aa.shortcode_payment=ac.attr("data-payment-info")}E.ajax({type:"POST",url:WRAjaxURL,data:aa,success:function(ad){if(ad.status=="true"){if(ad.type=="redirect"){window.location.href=ad.checkout_url}else{if(ad.type=="modal"){if(ad.checkout_url.indexOf("?")!=-1){ad.checkout_url=ad.checkout_url+"&wr-buy-now=check-out"}else{ad.checkout_url=ad.checkout_url+"?wr-buy-now=check-out"}if(typeof E.fn.magnificPopup!="undefined"){E.magnificPopup.open({items:{src:ad.checkout_url},type:"iframe",mainClass:"mfp-fade wr-buy-now",removalDelay:300})}}}}else{if(ad.status=="false"){}}ac.removeClass("loading")}});ab.preventDefault();ab.stopPropagation()})}function i(){E("body").on("click",".wc-switch a",function(af){af.preventDefault();var ah=E(this);if(ah.hasClass("active")||ah.hasClass("loading")){return}var ad=ah.closest(".wc-switch");ad.find("a").removeClass("active");ah.addClass("active");var ae=ah.attr("data-layout");var aa=function(ak){var aj="";if(ak.indexOf("?")!=-1){var ai=(WR_Data_Js.wc_archive_style=="list")?"grid":WR_Data_Js.wc_archive_style;if(ak.indexOf("switch="+ai)!=-1){aj=ak.replace("switch="+ai,"switch="+ae)}else{if(ak.indexOf("switch=list")!=-1){aj=ak.replace("switch=list","switch="+ae)}else{if(ak.indexOf("?switch=")!=-1||ak.indexOf("&switch=")!=-1){aj=ak.replace("switch=","");aj=aj+"&switch="+ae}else{aj=ak+"&switch="+ae}}}}else{aj=ak+"?switch="+ae}return aj};var ag=aa(window.location.href);history.pushState({},"",ag);E("#shop-main .woocommerce-pagination ul li a.page-numbers").each(function(aj,ak){var al=E(this);var ai=al.attr("href");al.attr("href",aa(ai))});if(E("#shop-main .products").length==1){ah.addClass("loading");E.get(ag,function(ai){var ak=E(".products",ai);if(ak.length){ak.addClass("products-ajax").hide();var aj=ak[0].outerHTML;var al=E("#shop-main .products");al.after(aj);al.fadeOut(200,function(){E("#shop-main .products-ajax").show()})}ah.removeClass("loading")})}else{var ab=E("#shop-main .products."+ae+"-layout");var ac=E("#shop-main .products:not(."+ae+"-layout)");ac.hide();ab.show()}})}function V(){E(".btn-newacc, .register .btn-backacc").on("click",function(aa){E(".form-container.login, .form-container.register").toggleClass("opened")});E(".btn-lostpw, .lost-password .btn-backacc").on("click",function(aa){E(".form-container.login, .form-container.lost-password").toggleClass("opened")})}function L(){E("#tab-description").show().closest(".description_tab").addClass("active");E(".accordion-tabs .tab-heading").click(function(ac){ac.preventDefault();var ad=E(this);var aa=ad.closest(".accordion_item");var ab=ad.closest(".accordion-tabs");if(aa.hasClass("active")){aa.removeClass("active");aa.find(".entry-content").stop(true,true).slideUp()}else{ab.find(".accordion_item").removeClass("active");aa.addClass("active");ab.find(".entry-content").stop(true,true).slideUp();aa.find(".entry-content").stop(true,true).slideDown()}})}function G(){if(E(".p-single-action .single_add_to_cart_button").length==0){return}E(window).load(function(){var ai=E(".footer"),af=E(".p-single-action .single_add_to_cart_button"),ac=af.offset().top+af.height(),aj=ai.height(),ab=E(window).height(),ah=E(document).height(),ae=E(window).width(),ad=((ae>1024)?parseInt(WR_Data_Js.offset):0)+10;var aa=function(){var am=E(window).scrollTop(),an=E(".actions-fixed"),ak=ai.offset().top-an.height()-15,al=ak-am;if(am>ac){an.slideDown()}else{an.slideUp()}if(am+ab<ah-aj){an.css({bottom:ad+"px",top:"auto"})}else{an.css({bottom:"auto",top:al})}};var ag=function(){requestAnimationFrame(aa)};E(window).scroll(ag)})}function a(){E(".product-categories .cat-parent > .children, .widget_nav_menu .menu-item-has-children > .sub-menu").before('<span class="fa fa-angle-down pa tc"></span>');E("body").on("click",".product-categories .cat-parent .fa",function(){E(this).closest(".cat-parent").toggleClass("active").find("> .children").stop(true,false).slideToggle()});E("body").on("click",".widget_nav_menu .menu-item-has-children .fa",function(){E(this).closest(".menu-item-has-children").toggleClass("active").find("> .sub-menu").stop(true,false).slideToggle()});E(".product-categories .count").each(function(){var ab=E(this);var aa=ab.text().replace("(","").replace(")","");ab.text(aa)})}function S(aa,ab,ad){E(".wrapper-outer").on("mousedown vmousedown",function ac(af){var ag=E(ab).index(aa.closest(ab));var ae=E(ab).index(E(af.target).closest(ab));if(ag!=ae){E("body").off("mousedown vmousedown");ad.call(af)}})}function m(aa,ad,ac){E(".wrapper-outer").on("mousedown vmousedown",function ab(af){var ae=E(ad).index(E(af.target).closest(ad));if(ae==-1){E("body").off("mousedown vmousedown");ac.call(af)}})}function Q(){E(window).resize(function(){var ac=E(window).height();var ab=E(window).width();if(typeof window.is_vertical_mobile==="undefined"){window.is_vertical_mobile=(ac<ab)?true:false}if(ac<ab&&window.is_vertical_mobile){window.is_vertical_mobile=false;aa()}else{if(ac>ab&&!window.is_vertical_mobile){window.is_vertical_mobile=true;aa()}}});function aa(){E.each(E.function_rotate_device,function(ab,ac){ac.call()})}}function M(){var aa=E(".wr-nitro-horizontal");if(aa.length>0){var ae=aa.data("owl-options");if(ae!==undefined){var ad=("true"==ae.autoplay)?true:false,ac=("true"==ae.dots)?true:false,af=("true"==ae.loop)?true:false,ab=("true"==ae.mousewheel)?true:false;aa.owlCarousel({items:4,loop:true,nav:false,autoplay:ad,dots:ac,autoWidth:true});if(ab==true){aa.on("mousewheel",".owl-stage",function(ag){if(ag.deltaY>0){aa.trigger("prev.owl")}else{aa.trigger("next.owl")}ag.preventDefault()})}}}}function C(){var ab=E(".gallery-cover");var aa=E(".gallery-thumb");var af=6;var ad=true;if(!ab.length>0){return}ab.owlCarousel({items:1,slideSpeed:2000,nav:true,animateOut:"fadeOut",animateIn:"fadeIn",autoplay:true,dots:false,loop:true,navText:["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"]}).on("changed.owl.carousel",ae);aa.on("initialized.owl.carousel",function(){aa.find(".owl-item").eq(0).addClass("current")}).owlCarousel({items:af,dots:false,nav:false,smartSpeed:200,slideSpeed:500,slideBy:af,responsiveRefreshRate:100}).on("changed.owl.carousel",ac);function ae(ah){var ai=ah.item.count-1;var ak=Math.round(ah.item.index-(ah.item.count/2)-0.5);if(ak<0){ak=ai}if(ak>ai){ak=0}aa.find(".owl-item").removeClass("current").eq(ak).addClass("current");var aj=aa.find(".owl-item.active").length-1;var al=aa.find(".owl-item.active").first().index();var ag=aa.find(".owl-item.active").last().index();if(ak>ag){aa.data("owl.carousel").to(ak,100,true)}if(ak<al){aa.data("owl.carousel").to(ak-aj,100,true)}}function ac(ag){if(ad){var ah=ag.item.index;ab.data("owl.carousel").to(ah,100,true)}}aa.on("click",".owl-item",function(ah){ah.preventDefault();var ag=E(this).index();ab.data("owl.carousel").to(ag,300,true)})}function y(){E(".wr-mobile .hb-menu .has-children-mobile").click(function(){var ad=E(this);var ab=ad.closest(".item-link-outer");var ac=ad.closest("li");var aa=ac.find(" > ul:first");if(ab.hasClass("active-submenu")){aa.stop(true,true).slideUp(function(){var ah=ad.closest(".site-navigator-inner");var af=ad.closest(".site-navigator");var ae=af[0].getBoundingClientRect();var ag=E(window).height();var ai=ag-ae.top;if(ae.height<=ai){ah.css("height","")}});ab.removeClass("active-submenu")}else{aa.stop(true,true).slideDown(function(){var ag=ad.closest(".site-navigator-inner");var ae=ag[0].getBoundingClientRect();var af=E(window).height();var ah=af-ae.top;if(ae.height>ah){ag.height(ah)}});ab.addClass("active-submenu")}});E(".wr-mobile .hb-menu .menu-icon-action").click(function(){var ac=E(this);var aa=ac.closest(".hb-menu");var ab=aa.find(".site-navigator-inner");if(ac.hasClass("active-menu")){ab.stop(true,true).slideUp();ac.removeClass("active-menu")}else{S(ac,".hb-menu",function(ad){ab.stop(true,true).slideUp();ac.removeClass("active-menu")});ab.stop(true,true).slideDown(function(){var ad=ab[0].getBoundingClientRect();var ae=E(window).height();var af=ae-ad.top;if(ad.height>af){E(this).height(af)}});ac.addClass("active-menu")}});E.function_rotate_device.menu_mobile=function(){E.each(E(".wr-mobile .hb-menu .menu-icon-action.active-menu"),function(ab,af){var ah=E(af);var ac=ah.closest(".hb-menu");var ae=ac.find(".site-navigator-inner");ae.css("height","");var aa=ae[0].getBoundingClientRect();var ad=E(window).height();var ag=ad-aa.top;if(aa.height>ag){ae.height(ag)}else{ae.css("height","")}})}}function c(){var aa=E(".nitro-member .member a");var ab=E(".nitro-member .info > p").height();E(".nitro-member.style-2 .info").css("bottom",-(ab+16));aa.mouseenter(function(ac){E(this).find(".name").fadeIn()});aa.mouseleave(function(ac){E(this).find(".name").hide()});aa.mousemove(function(af){var ad=af.pageX,ah=af.pageY,ag=E(this).offset(),ae=ad-ag.left,ac=ah-ag.top;E(this).find(".name").css({top:(ac+20)+"px",left:(ae-15)+"px"})});aa.on("click",function(){var ai=E(this),al=ai.closest(".member"),ag=ai.closest(".nitro-member"),ao=ag.find(".member"),am=ao.index(al)+1,af=ao.length,ac=ag.width(),an=al[0].getBoundingClientRect(),ae=parseInt(ac/an.width),ak=ai.next();if(af<=ae){var aj=af}else{if(am<=ae){var aj=(ae-am)+am}else{var aj=(parseInt(am/ae)+(am%ae==0?0:1))*ae;if(af<aj){aj=af}}}var ad=ag.find(".member").get(aj-1);ad=E(ad).next();if(al.hasClass("active-member")){al.removeClass("active-member");E(".member-container").slideUp(500,function(){E(this).remove()})}else{ao.removeClass("active-member");al.addClass("active-member");var ah=ag.find(".member").get(aj-1);if(ad.hasClass("member-container")){E(".member-container").fadeOut(300,function(){E(this).html(ak.html());E(this).fadeIn(300)})}else{if(E(".member-container").length){E(".member-container").slideUp(500,function(){E(this).remove();var ap=ag.find(".member").get(aj-1);E(ap).after('<div class="member-container clear">'+ak.html()+"</div>");E(".member-container").slideDown()})}else{E(".member-container").remove();var ah=ag.find(".member").get(aj-1);E(ah).after('<div class="member-container clear">'+ak.html()+"</div>");E(".member-container").slideDown(500)}}}})}function T(){var aa=E(".galleries .nitro-gallery-masonry");if(aa.length){aa.each(function(){var ae=E(this),ad=ae.attr("data-layout");ae.WR_ImagesLoaded(function(){if(ad=="masonry"){ae.isotope({filter:"*",percentPosition:true,masonry:{columnWidth:".grid-sizer"}})}else{ae.isotope({filter:"*",percentPosition:true,layoutMode:"fitRows"})}})})}E(".gallery-cat a").click(function(){var ad=E(this).attr("data-filter");E(this).closest(".galleries").find(".nitro-gallery-masonry").isotope({filter:ad,transitionDuration:"0.3s"})});var ab=E(".gallery-cat"),ac=ab.find("a");ac.click(function(){var ae=E(this);if(ae.hasClass("selected")){return false}var ad=ae.parents(".gallery-cat");ad.find(".selected").removeClass("selected");ae.addClass("selected")});if(window.innerWidth<=769){E(".filter-on-mobile").on("click",function(){E(this).next().slideToggle()});E(".gallery-cat a[data-filter]").on("click",function(){var ad=E(this).text();E(this).parent().siblings(".filter-on-mobile").find("span").text(ad);E(this).parent().slideToggle()})}}function Y(){var aa=E('.sc-cat-list[data-expand="true"]').children("a");E('.sc-cat-list[data-expand="true"] ul').hide();aa.on("click",function(){E(this).next().slideToggle()});if(E(".sc-cat-mobile").length>0){E(".sc-cat-mobile").on("click",function(){E(this).toggleClass("expanded").next().toggleClass("expanded")})}}function b(){E("body").on("click",".yith-wcwl-add-button .add_to_wishlist",function(aa){aa.preventDefault();E(this).css("opacity","0")});E("body").on("click",".wishlist-submit.add_to_wishlist",function(aa){aa.preventDefault();E(this).find(".ajax-loading").show();E(this).find(".wishlist-icon").hide()});E("body").on("click",".yith-wcwl-remove-button a",function(ad){ad.preventDefault();var af=E(this);var aa=af.closest(".yith-wcwl-add-to-wishlist");var ae=aa.find(".yith-wcwl-remove-button .ajax-loading");var ac=aa.find(".yith-wcwl-add-button .add_to_wishlist");af.css("opacity","0");ae.css("visibility","visible");ac.css("opacity","1");var ab={action:"wr_remove_product_wishlish",_nonce:_nonce_wr_nitro,product_id:af.attr("data-product-id")};E.ajax({type:"POST",url:WRAjaxURL,data:ab,success:function(ag){if(ag.status=="true"){ae.css("visibility","hidden");aa.find(".yith-wcwl-remove-button").hide();aa.find(".yith-wcwl-add-button").show();af.css("opacity","1")}}})})}function X(){E(".wr-buy-now .btn-buynow").click(function(){if(!E("body").hasClass("woocommerce-page")){E("body").addClass("woocommerce-page")}})}function F(){E(".nitro-separator").each(function(){var ab=E(this).find("span").width(),ac=E(this).attr("data-align");switch(ac){case"left":if(E("body").hasClass("rtl")){E(this).find(".sep").css("margin-right",ab+20)}else{E(this).find(".sep").css("margin-left",ab+20)}break;case"right":if(E("body").hasClass("rtl")){E(this).find(".sep").css("margin-left",ab+20)}else{E(this).find(".sep").css("margin-right",ab+20)}break;case"center":var aa=(E(this).width()-ab)/2-20;E(this).find(".sep-left, .sep-right").css("width",aa);break}})}function n(){if(typeof E.fn.magnificPopup=="undefined"){return setTimeout(n,100)}if(E(".sc-video").length>0){E(".sc-video-popup").each(function(aa,ad){var ac=E(this).data("popup");if(ac!==undefined){var ab=("true"==ac.control)?"controls=1":"controls=0";E(ad).magnificPopup({type:"iframe",mainClass:"mfp-fade",removalDelay:300,iframe:{markup:'<div class="mfp-iframe-scaler"><button type="button" class="mfp-close">×</button><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1&showinfo=0&"+ab},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"}}}})}});if(E(".sc-yt-trigger").length>0){E.getScript("https://www.youtube.com/iframe_api");E(".sc-yt-trigger").each(function(){var ac=E(this),aa=ac.next();setTimeout(function ab(){if(typeof YT!=="object"){return setTimeout(ab,1000)}if(typeof YT.Player!=="function"){return setTimeout(ab,1000)}var ad;ad=new YT.Player(aa.get(0),{events:{onReady:function(ae){ac.on("click",function(af){ae.target.playVideo();ac.css("opacity",0);aa.show();af.preventDefault()})}}})},1000)})}if(E(".sc-vm-trigger").length>0){E(".sc-vm-trigger").each(function(){var ad=E(this),ac=ad.next(),aa="*";ad.on("click",function(ae){ab("play");ad.css("opacity",0);ac.show();ae.preventDefault()});function ab(ah,ag){var af={method:ah};if(ag){af.value=ag}var ae=JSON.stringify(af);ac[0].contentWindow.postMessage(ae,aa)}})}}}function W(){var ab=E(".nitro-timeline.style-2");var aa=function(){ab.removeClass("style-2").addClass("style-1");if(E(window).width()<568){ab.removeClass("style-2").addClass("style-1")}else{ab.removeClass("style-1").addClass("style-2")}};if(ab.length>0){aa();E(window).resize(function(){aa()})}}function I(){var aa=function(){E.each(E(".list-blog.has-featured-img .has-post-thumbnail .entry-title"),function(){var ac=E(this);var ab=ac.closest(".has-post-thumbnail");ab.removeClass("blog-res");if(ac.width()<180){ab.addClass("blog-res")}})};aa();E(window).resize(function(){aa()})}function k(){E(".woof_auto_show").parent().addClass("woof_auto_show_outer")}function p(){if(E(".p-video").length>0){E(".p-video-link").magnificPopup({type:"iframe"});E(".p-video-file").magnificPopup({type:"inline"})}}function g(){if(E(".wr-open-cf7").length>0){E(".wr-open-cf7").magnificPopup({disableOn:700,type:"inline",removalDelay:300,mainClass:"mfp-fade"})}}function f(){E("body").on("click",".wc-show-sidebar",function(aa){E("body").toggleClass("slide-to-left");E("html").addClass("no-scroll");E("#shop-mobile-sidebar").before('<div class="mask-overlay"></div>');m(E(this),"#shop-mobile-sidebar",function(){E("body").removeClass("slide-to-left");E("html").removeClass("no-scroll");E(".mask-overlay").remove()})})}function P(){if(E(".term-description").length>0){var ab=E(".term-description"),aa=ab.height();if(aa>78){ab.wrapInner('<div class="term-description-inner"></div>');ab.append('<a class="term-more dib mgt10 bg-primary color-white" href="#">'+WR_Data_Js.show_more+"</a>");ab.children(".term-description-inner").css({height:78,overflow:"hidden"});E("body").on("click",".term-more",function(){ab.children(".term-description-inner").toggleClass("term-show-hide");(E(this).text()==WR_Data_Js.show_more)?E(this).text(WR_Data_Js.show_less):E(this).text(WR_Data_Js.show_more)})}}}function B(){if(E(".flex-control-thumbs").length>0){var aa=E(".flex-control-thumbs li").length;if(aa>5){E(".woocommerce-product-gallery__wrapper").WR_ImagesLoaded(function(){setTimeout(function(){E(".flex-control-thumbs").scrollbar()},800)})}}}E(document).ready(function(){E("body").on("click",".vc_tta-tab a",function(aa){aa.preventDefault()});if((WR_Data_Js!=undefined&&WR_Data_Js.blogParallax==1||WR_Data_Js.pageParallax==1||WR_Data_Js.bodyParallax==1)&&!D()){if(window.skrollr){skrollr.init({forceHeight:false})}}if(E(".open-popup-link").length){E(".addition-product .open-popup-link, .addition-product .price br").remove()}y();O();q();r();s();o();d();U();Z();E.WR.Lightbox();E.WR.Carousel();A();h();H();t();Q();C();u();e();k();b();j();x();K();z();N();V();i();L();G();p();g();f();P();B();c();T();Y();X();F();n();W();I();a();R()});E(window).load(function(){M()})})(jQuery);
  16. Eu quero criar uma pagina simples com um formulário com os campos nome e telefone e os dados serem gravados em um arquivo. Pensei em usar json ou xml mas nao sei exatamente se essas linguagens são destinadas a isso. A minha intensão é criar uma lista telefônica e que o usuário possa criar, alterar e excluir os dados caso necessite. Pra mim seria facil usar php e mysql, mas no meu caso não posso usar um servidor. Fico grato a quem puder me dar uma sugestão.
  17. Olá sou novato em vue.js, estou com dificuldade para fazer o efeito de quando rolar a div mudar de cor. exemplos http://themes.semicolonweb.com/html/canvas/ https://planet.training/?ref=madewithvuejs.com
  18. manoaj

    ERRO DURANTE O USO DO LONG POLLING

    Pessoal estou usando o long polling pra me retornar notificacoes em tempo real, esta tudo funcionando normalmente, estou inserindo os dados no db e o codigo me retorna as novas notificacoes, mas se eu der um refresh na pagina ela fica em um loop infinito tentando atualizar e gerando esse erro no meu php MySQL server has gone away. Como resolvo e o que siguinifica esse erro dentro desse contexto?
  19. weltonaparecido

    Converter código em C/C++ para Javascript

    tenho um código em C++ e gostaria de fazer ele idêntico para Javascript mas não tenho conhecimento pra isso, alguem pode me ajudar?? Segue o código abaixo em C++: #include <stdio.h> #include <string.h> #include <stdlib.h> char * unidades[] = { "Zero", "Um", "Dois", "Tres", "Quatro", "Cinco", "Seis", "Sete", "Oito", "Nove" }; char * dez_vinte[] = { "", "Onze", "Doze", "Treze", "Quatorze", "Quinze", "Dezesseis", "Dezessete", "Dezoito", "Dezenove" }; char * dezenas[] = { "", "Dez", "Vinte", "Trinta", "Quarenta", "Cinquenta", "Sessenta", "Setenta", "Oitenta", "Noventa" }; char * centenas[] = { "", "Cento", "Duzentos", "Trezentos", "Quatrocentos", "Quinhentos", "Seiscentos", "Setecentos", "Oitocentos", "Novecentos" }; char * strcatb( char * dst, const char * src ) { size_t len = strlen(src); memmove( dst + len, dst, strlen(dst) + 1 ); memcpy( dst, src, len ); return dst; } char * traduzir_numero( char * nome, int n ) { int c = n / 100; int d = n / 10 - c * 10; int u = n - (n / 10) * 10; int dv = d * 10 + u; strcpy( nome, unidades[ u ] ); if( n < 10 ) return nome; if ( (dv > 10) && (dv < 20) ) { strcpy( nome, dez_vinte[ dv - 10 ] ); } else { if( u == 0 ) { strcpy( nome, dezenas[ d ] ); } else { strcatb( nome, " e " ); strcatb( nome, dezenas[d] ); } } if( n < 100 ) return nome; if( (d == 0) && ( u == 0 ) ) { if( c == 1 ) strcpy( nome, "Cem" ); else strcpy( nome, centenas[c] ); } else { strcatb( nome, " e " ); strcatb( nome, centenas[c] ); } return nome; } int main( int argc, char * argv[] ) { int i = 0; char extenso[ 100 ] = {0}; int num[] = { 0, 1, 10, 13, 100, 123, 321, 111, 333, 777, 910, -1 }; while( num != -1 ) { traduzir_numero( extenso, num ); printf( "%d: %s\n", num, extenso ); i++; } return 0; printf("\n\nFim..."); getchar(); }
  20. Tenho um site estático em HTML (site), e um blog em Wordpress em um subdiretório desse site (blog). Fiz download de um tema para esse blog e fui customizando para que o header e o footer fiquem iguais ao site, linquei todos os links (CSS, JS) corretamente, estaria tudo certo se não fosse pelo Menu principal do header. Como vocês podem ver pelos links ele está desconfigurando no blog. Já passei horas inspecionando tudo e não consigo achar a solução. Acredito que alguma parte do CSS ou do JS do tema que baixei está interferindo nele, mas não consigo identificar o(s) erro(s). Por isso peço a ajuda de alguém com mais experiência e agradeço muito a atenção desde já!
  21. Julio Cavallari

    [Resolvido] Conversão função JS para PHP

    Tenho um função js que converte uma string formatada em ISO8601 para formato padrão de tempo. function formatTimeVideoYoutube(time) { var str_pad = function (input, pad) { var str = input.replace(/\D/, ''); return (pad + str).slice(-pad.length); }; var formatTime = function (full, h, m, s) { var hour = h ? str_pad(h, '00') : '00'; var minute = m ? str_pad(m, '00') : '00'; var second = s ? str_pad(s, '00') : '00'; var timeVideo; if(hour == '00'){ timeVideo = minute +':'+ second; }else{ timeVideo = hour +':'+ minute +':'+ second; } return timeVideo; }; var regex = /^PT(\d+H)?(\d+M)?(\d+S)?$/i; return time.replace(regex, formatTime); } E queria converter ela pra PHP O retorno que tenho é o seguinte "PT1H9M58S" Onde PT sempre vai existir na string; 1H será as horas, nesse caso é 1 hora; 9M será os minutos, no caso são 9 minutos; E 58S será os segundos, nesse caso 58 segundo. "01:09:58" Porém se alguma parte for 00, a string não vai possuir esse dado. Ex: "PT1H58S" = "01:00:58"
  22. Vitor Leite

    Atualização em Tempo real.

    Oi pessoal. Estou tentando criar uma aplicação para treinar e exercitar a programação em geral. Porém, me deparei com um embate que nunca havia me pegado. Contextualizando, se eu adicionar um valor no BANCO DE DADOS, como posso apresentar esse valor ao usuário em tempo real? Sem sobrecarregar o servidor? Pesquisando no Google, encontrei o Socket.io, porém ele necessita de NodeJS, que é uma coisa que eu não manjo e não consigo aprender de jeito algum (principalmente a parte de como eu iria aplica-lo em uma hospedagem). Tem alguma outra forma, mais simples possível, de receber atualizações em tempo real?
  23. Olá, pessoas, eu gostaria de saber como envio uma variável php para um outro documento javascript por meio do Ajax. A variável PHP em questão é essa: $json = json_encode(simplexml_load_string($show)); Aqui ela me retorna o valor de uma string, porem vi que o Json tem uma função Json.parse, que converte tudo isso para objetos, assim, fica mais fácil manipular para fazer uma tabela, porém, eu quero fazer as coisas separadas, a página php recebe esses valores e a javascript manda para o html onde o usuário verá seu cadastro, se, houver um método mais fácil e seguro eu aceito também, de modo geral, enviar essa variável para uma página JS/Json e lá farei a tabela com as informações
  24. Boa noite, galera. Estou graduando Sistemas de Informação e tentando conseguir um estágio, mas como até então não encontrei nenhuma oportunidade, quero começar a gastar o tempo que me resta da faculdade com algo que vá fortalecer meu currículo. Queria saber de vocês que tem experiência na área, o que eu posso fazer? Queria algo tipo uma certificação, pensei no 70-480 da Microsoft (HTML5, JavaScript e CSS3), mas não sei se isso teria peso no meu currículo (se sim, avisem-me pfvr!). Também poderia estudar para um certificado PHP, mas não sei um que valha o esforço. Obs: eu sei que estudando para essas certificações eu aprenderia muito, e é isso que importa. Mas eu realmente quero juntar o "APRENDER" ao "PAPEL" (currículo) To falando de certificações mas qualquer coisa que destacasse meu currículo seria legal, mas não tenho dinheiro rs. EU: eu amo JavaScript e já to 2 anos estudando e colocando em prática com joguinhos e em meu site. Também sei o básico de PHP, e gosto. Provavelmente vocês dirão que depende do meu objetivo profissional: eu não sei. Eu amo lógica, e por isso acabo gostando bastante de programar em PHP e JS, mas tenho medo porque dizem que está difícil pra programadores ($$) atualmente. Muito obrigado pela atenção pessoal, desculpem se postei no local errado, não achei um que se encaixasse melhor em dúvidas de carreira.
  25. manoaj

    Pegar indice e valor do indice no array

    Boa noite pessoal. Meu js esta me retornando o seguinte array Array ( [0] => Array ( [5] => 5 ) [1] => Array ( [7] => 7 ) [2] => Array ( [6] => 9 ) [3] => Array ( [2] => 2 ) [4] => Array ( [9] => 10 ) ) Notem q existe 5 arrays dentro do primeiro, eu gostaria de pegar os indices e o valor de cada um para poder fazer uma consulta no banco. os indices e seus respectivos valores sao ids. e eu preciso fazer uma consulta para verificar esses ids Ex.: 5 e amigo de 5 7 e amigo de 7 6 e amigo de 9 2 e amigo de 2 9 e amigo de 10 o meu problema e q n sei como coletar esses valores nesse array com o php.
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.