1//validare recaptcha sugestii, intrebari si feedback din pagina articol 2function verifyCallbackEx1(response) { 3 $(".verification_case #response1").val(response); 4}; 5function verifyCallbackEx2(response) { 6 $(".verification_case_question #response2").val(response); 7}; 8function onloadCallback() { 9 if ( $('#case_verification1').length ) { 10 grecaptcha.render(document.getElementById('case_verification1'), { 11 'sitekey' : '6LcGlRkTAAAAAA6o8ASNkpVwtgoFpbUj9fZnxJmh', 12 'theme' : 'light', 13 'callback' : verifyCallbackEx1 14 }); 15 } 16 if ( $('#case_verification2').length ) { 17 grecaptcha.render(document.getElementById('case_verification2'), { 18 'sitekey' : '6LcGlRkTAAAAAA6o8ASNkpVwtgoFpbUj9fZnxJmh', 19 'callback' : verifyCallbackEx2 20 }); 21 } 22}; 23function showQuestionForm() { 24 // AfiÈeazÄ formularul de sugestii Èi ascunde butonul de afiÈare 25 jQuery("#addQuestionForm").hide(); 26 jQuery('#addQuestionFormMsg').hide(); 27 28 jQuery('#questionForm').show(); 29 jQuery('#showQuestionForm').hide(); 30} 31function submitFeedback(feed_val, article_id){ 32 var formData = {article_id: article_id,feedback: feed_val}; 33 $.ajax({ 34 url: AMVC_WEB_PATH+"index.php?module=HealthCenterPrezentare&action=add_article_feedback", 35 type: "POST", 36 data: formData, 37 success: function (response) { 38 responseDecode = JSON.parse(response); 39 if (responseDecode.success == 1){ 40 $(".feedback-buttons").hide(); 41 $(".more_feedback").show(); 42 if(feed_val == "2" || feed_val == 2){ 43 $("#feedbackMsg1").hide(); 44 $("#feedbackMsg2").show(); 45 $("#feedbackMsg2").html(responseDecode.message); 46 //afisare formular trimite sugestie 47 jQuery("#addQuestionForm").hide(); 48 jQuery('#addQuestionFormMsg').hide(); 49 jQuery('#questionForm').show(); 50 jQuery('.sendArtQuestion').show(); 51 }else{ 52 $("#feedbackMsg2").hide(); 53 $("#feedbackMsg1").show(); 54 $("#feedbackMsg1").html(responseDecode.message); 55 } 56 }else{ 57 $("#feed_message").html(responseDecode.message); 58 } 59 }, 60 error: function (error) {$("#feed_message").html(responseDecode.message);} 61 }); 62} 63function incarcaRecaptcha() { 64 var script = document.createElement('script'); 65 script.src = "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"; 66 script.async = true; 67 script.defer = true; 68 document.head.appendChild(script); 69} 70 71//Functii header 72 73$(document).ready(function(){ 74 //setari manechin 75 if(jQuery('.symptomSearch').length > 0){ 76 var topPos = jQuery('.symptomSearch').offset().top; 77 window.scrollTo({ top: topPos, behavior: 'smooth' }); 78 } 79 // setarea background-ului la meniul principal 80 jQuery('div.level-2-menu').hover( 81 function() {jQuery(this).closest('li').children('a').addClass('active');}, 82 function() {jQuery(this).closest('li').children('a').removeClass('active');} 83 ); 84 85 //Elemente sticky 86 jQuery('.sticky').each(function(){ 87 var elpoz = jQuery(this).offset(); 88 var el = jQuery(this) 89 jQuery(window).scroll(function() { 90 var scroll = jQuery(window).scrollTop(); 91 if (scroll >= elpoz.top) { 92 el.addClass('fixed'); 93 } else { 94 el.removeClass('fixed'); 95 } 96 }); 97 }); 98 99 //Redimensionare sub-div-uri header in functie inaltime 100 var lvl2div = jQuery('.level-2-menu'); 101 lvl2div.each(function(){ 102 var h = jQuery(this).height(); 103 jQuery(this).find('.lvl2-col-left, .lvl2-col-mid, .lvl2-col-right').css('height', h); 104 }); 105 106 //Adaugare paddin-top la content in functie de dimensiunea headerului. 107/* 108 function positionHeader(){ 109 var status = 0; 110 var incaodata = setInterval(function(){ 111 var headerh = jQuery('header').height(); 112 jQuery('div.content').css('padding-top', headerh); 113 if(jQuery('div.continut')){ 114 jQuery('div.continut').css('padding-top', headerh); 115 }}, 50 ); 116 117 if(status ==1){ 118 clearInterval(incaodata); 119 } 120 status = 1; 121 } 122 positionHeader(); 123*/ 124 125 126 /*jQuery('#main-navigation').hover( 127 function(){ 128 jQuery('div.content').css('opacity','0.3'); 129 jQuery('div.continut').css('opacity','0.3'); 130 jQuery('div.content-custom').css('opacity','0.3'); 131 132 }, 133 function(){ 134 jQuery('div.content').css('opacity','1'); 135 jQuery('div.continut').css('opacity','1'); 136 jQuery('div.content-custom').css('opacity','1'); 137 } 138 )*/ 139if(jQuery('.feedback-box').length > 0){ 140 var pozitieElement = jQuery('.feedback-box').offset().top; 141 var incarcat = false; 142 console.log("incarcat:"+incarcat); 143 144} 145 146jQuery(window).scroll(function(e){
147 if( jQuery(this).scrollTop() > 100 ){ 148 jQuery('div.bk2top').fadeIn(300); 149 } else { 150 jQuery('div.bk2top').fadeOut(300); 151 } 152 153 if(jQuery('.feedback-box').length > 0){ 154 //incarca dinamic recaptcha 155 // CalculÄm poziÈia div-ului Èi a scroll-ului 156 var pozitieScroll = jQuery(window).scrollTop(); 157 //console.log('pozitieElement:'+pozitieElement+'; pozitieScroll:'+pozitieScroll); 158 // DacÄ am scrollat pânÄ la element 159 if (pozitieScroll > pozitieElement) { 160 if(incarcat === false){ 161 incarcaRecaptcha(); 162 console.log("inc"); 163 incarcat = true; 164 } 165 } else { 166 console.log("st"); 167 } 168 } 169 170 171}) 172jQuery('div.bk2top').click(function(){ 173 $.scrollTo(0,500,{axis:'y', offset: -50}) 174}) 175 176 /*sugestii, intrebari si feedback din pagina articol*/ 177 jQuery(".submitQuestion").on("click", function(event){ 178 event.preventDefault(); 179 $(".submitQuestion").prop("disabled", true); 180 var article_id = jQuery("#article_id").val(); 181 var captcha = $(".verification_case #response1").val(); 182 var article_suggestion = jQuery("#article_suggestion").val(); 183 var formData = { 184 article_id: article_id, 185 article_suggestion: article_suggestion, 186 captcha: captcha 187 }; 188 $.ajax({ 189 url: AMVC_WEB_PATH+"index.php?module=HealthCenterPrezentare&action=add_article_suggestion", 190 type: "POST", 191 data: formData, 192 success: function (response) { 193 responseDecode = JSON.parse(response); 194 if (responseDecode.success == 1){ 195 $(".submitQuestion").prop("disabled", true); 196 $("#questionForm").hide(); 197 $("#questionFormMsg").show().html(responseDecode.message); 198 }else{ 199 $(".submitQuestion").prop("disabled", false); 200 $("#questionFormMsg").hide().empty(); 201 $("#questionForm").show(); 202 $("#message").html(responseDecode.message); 203 } 204 }, 205 error: function (error) { 206 $(".submitQuestion").prop("disabled", false); 207 $("#questionFormMsg").hide().empty(); 208 $("#questionForm").show(); 209 $("#message").html(responseDecode.message); 210 } 211 }); 212 }) 213 if(window.location.hash == '#sendQ'){ 214 var isLogged = 0; 215 if($("#isLogged").length > 0){ 216 isLogged = $("#isLogged").val(); 217 } 218 if (isLogged == 0) { 219 var formData = {'method' : 'add_article_question','is_mobile': 0}; 220 $.ajax({ 221 type: 'POST', 222 url : AMVC_WEB_PATH + "index.php?module=show_new_login.ajxinternal", 223 data: formData, 224 dataType: 'html' 225 }).done(function (data) { 226 if($("#show_login_wp").length <= 0){ 227 $('body').append(data); 228 $('html').css('overflow','hidden'); 229 } 230 }); 231 }else{ 232 $('#addQuestionFormMsg').hide(); 233 $("#addQuestionForm").show(); 234 $('#questionForm').hide(); 235 $('.sendArtQuestion').hide(); 236 window.location.hash = ''; 237 $('html,body').animate({scrollTop: $("#addQuestionForm").offset().top}, 1000); 238 } 239 } 240 $(".sendArtQuestion").on("click", function(e){ 241 var isLogged = 0; 242 if($("#isLogged").length > 0){ 243 isLogged = $("#isLogged").val(); 244 } 245 if (isLogged == 0) { 246 e.preventDefault(); 247 var formData = { 248 'method' : 'add_article_question', 249 'is_mobile': 0 250 }; 251 $.ajax({ 252 type: 'POST', 253 url : AMVC_WEB_PATH + "index.php?module=show_new_login.ajxinternal", 254 data: formData, 255 dataType: 'html' 256 }).done(function (data) { 257 if($("#show_login_wp").length <= 0){ 258 $('body').append(data); 259 $('html').css('overflow','hidden'); 260 } 261 }); 262 }else{ 263 $('#addQuestionFormMsg').hide(); 264 $("#addQuestionForm").show(); 265 $('#questionForm').hide(); 266 $('.sendArtQuestion').hide(); 267 } 268 }); 269 270 271 jQuery(".submitArticleQuestion").on("click", function(event){ 272 event.preventDefault(); 273 jQuery("#messageQuestion").empty(); 274 jQuery(".submitArticleQuestion").prop("disabled", true); 275 var article_id = jQuery("#article_id_question").val(); 276 var captcha = $(".verification_case_question #response2").val(); 277 var article_question_title = jQuery("#article_question_title").val(); 278 var article_question = jQuery("#article_question").val(); 279 var article_group_id = jQuery("#article_group_id").val(); 280 var formData = { 281 article_id: article_id, 282 article_group_id: article_group_id, 283 article_question_title: article_question_title, 284 article_question: article_question, 285 captcha: captcha 286 }; 287 jQuery.ajax({ 288 url: AMVC_WEB_PATH+"index.php?module=HealthCenterPrezentare&action=add_article_question", 289 type: "POST", 290 data: formData, 291 success: function (response) { 292 responseDecode = JSON.parse(response); 293 if (responseDecode.success == 1){ 294 jQuery("#addQuestionFormMsg").show(); 295 jQuery("#addQuestionFormMsg").html(responseDecode.message); 296 jQuery("#addQuestionForm").hide(); 297 }else{ 298 jQuery("#messageQuestion").html(responseDecode.message); 299 jQuery("#addQuestionFormMsg").hide().empty(); 300 jQuery("#addQuestionForm").show(); 301 jQuery(".submitArticleQuestion").prop("disabled", false); 302 } 303 }, 304 error: function (error) { 305 jQuery("#messageQuestion").html(responseDecode.message); 306 jQuery("#addQuestionFormMsg").hide().empty(); 307 jQuery("#addQuestionForm").show(); 308 jQuery(".submitArticleQuestion").prop("disabled", false); 309 } 310 }); 311 }) 312 313 314}); 315/*Redirectare ptr linkuri externe */ 316function goToExternalLink(url){ 317 if(url.substr(0,7) != 'http://') { 318 if(url.substr(0,8) != 'https://'){ 319 url = 'http://'+url; 320 } 321 } 322 window.open(url); 323} 324 325function setCookie(name,value,days){ 326 if (days){ 327 var date = new Date(); 328 date.setTime(date.getTime()+(days*24*60*60*1000)); 329 var expires = "; expires="+date.toGMTString(); 330 } 331 else var expires = ""; 332 document.cookie = name+"="+value+expires+"; path=/"; 333} 334 335function getCookie(name){ 336 var nameEQ = name + "="; 337 var ca = document.cookie.split(';'); 338 for(var i=0;i < ca.length;i++) { 339 var c = ca[i];
340 while (c.charAt(0)==' ') c = c.substring(1,c.length); 341 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 342 } 343 return null; 344 } 345 346function deleteCookie(name) { 347 setCookie(name,"",-1); 348} 349 350 351 352// script afisare ads in-article 353 if(jQuery('#banner_promovare').length > 0 && jQuery('#banner_promovare_articol').length > 0) { 354 var myDiv1Para = $('#banner_promovare').remove(); 355 myDiv1Para.find('script').remove(); 356 jQuery('#banner_promovare_articol').html(myDiv1Para.html()); 357 jQuery('#banner_promovare').show(); 358 } 359 if(jQuery('#banner_italtrade').length > 0 && jQuery('#banner_italtrade_articol').length > 0) { 360 var myDiv1Para = jQuery('#banner_italtrade').remove(); 361 myDiv1Para.find('script').remove(); 362 jQuery('#banner_italtrade_articol').html(myDiv1Para.html()); 363 jQuery('#banner_italtrade').show(); 364 } 365 if(jQuery('#banner_gral').length > 0 && jQuery('#banner_gral_articol').length > 0) { 366 var myDiv1Para = jQuery('#banner_gral').remove(); 367 myDiv1Para.find('script').remove(); 368 jQuery('#banner_gral_articol').html(myDiv1Para.html()); 369 jQuery('#banner_gral').show(); 370 } 371 if(jQuery('#banner_interior').length > 0 && jQuery('#banner_interior_articol').length > 0) { 372 //var myDiv1Para = $('#banner_interior').remove(); 373 //myDiv1Para.find('script').remove(); 374 //$('#banner_interior_articol').html(myDiv1Para.html()); 375 //$('#banner_interior').show(); 376 } 377 378// Script Sticky Ads 379// pentru scroll_ads_boxes 380var initial_position = 0; 381var alpha_offset = 0; 382var alpha_top = 0; 383var alpha_height = 0; 384var sum = 0; 385var beta_height = 0; 386var box_height = 0; 387 388// pentru scroll_blurred_article 389var initial_position_blur = 0; 390var blurred_height = 0; 391var blur_box_height = 0; 392 393jQuery(document).ready(function(){ 394 if(document.getElementById('col-alpha')) 395 { 396 alpha_offset = jQuery('#col-alpha').offset(); 397 alpha_top = alpha_offset.top; 398 alpha_height = jQuery('#col-alpha').height(); 399 sum = alpha_height*1 + alpha_top*1; 400 } 401}); 402 403jQuery(window).load(function(){ 404 jQuery(window).scroll(function(){ 405 scroll(); 406 }); 407}); 408 409 410function scroll(){ 411 var scroll = new Array(); 412 scroll = getScrollXY(); 413 414 if(document.getElementById('sticky_left') && document.getElementById('sticky_right')){ 415 scroll_branding(scroll); 416 } 417// if(document.getElementById('box_articol_sticky')){ 418// scroll_ads_boxes(scroll); 419// } 420 if(document.getElementById('box_sticky')){ 421 scroll_sticky_boxes(scroll); 422 } 423 if(document.getElementById('box_sticky')){ 424 scroll_blurred_article(scroll); 425 } 426 if(document.getElementById('box_clinici_promovate')){ 427 // verificarea boxurilor cu clinici promovate 428 box_clinici_promovate(scroll); 429 } 430 // note: you can use window.innerWidth and window.innerHeight to access the width and height of the viewing area 431} 432 433function scroll_branding(scroll){ 434 if(scroll[1] > 125) { 435 document.getElementById('sticky_left').style.position = "fixed"; 436 document.getElementById('sticky_left').style.top = "0px"; 437 document.getElementById('sticky_right').style.position = "fixed"; 438 document.getElementById('sticky_right').style.top = "0px"; 439 } 440 else{ 441 document.getElementById('sticky_left').style.position = "absolute"; 442 document.getElementById('sticky_right').style.position = "absolute"; 443 document.getElementById('sticky_left').style.top = "125px"; 444 document.getElementById('sticky_right').style.top = "125px"; 445 } 446} 447 448function scroll_sticky_boxes(scroll){ 449 if(beta_height == 0){ 450 beta_height = $('#box_sticky').height(); 451 } 452 if(initial_position == 0){ 453 var offset = $('#box_sticky').offset(); 454 initial_position = offset.top; 455 } 456 box_height = $('#box_sticky').height(); 457 box_height = box_height*1; 458 459 if(scroll[1] > initial_position){ 460 document.getElementById('box_sticky').style.position = "fixed"; 461 document.getElementById('box_sticky').style.top = "15px"; 462 document.getElementById('box_sticky').style.marginTop = "0px"; 463 } 464 else if(scroll[1] <= initial_position){ 465 document.getElementById('box_sticky').style.position = "static"; 466 document.getElementById('box_sticky').style.marginTop = "15px"; 467 } 468} 469 470 471function scroll_blurred_article(scroll){ 472 if(document.getElementById('position_blur_article')){ 473 if(blurred_height == 0){ 474 var blur_offset = $('#position_blur_article').offset(); 475 var blur_top = blur_offset.top; 476 477 var article_bottom_offset = $('#google_adsense').offset(); 478 var article_bottom_top = article_bottom_offset.top; 479 480 blurred_height = article_bottom_top-blur_top; 481 } 482 if(initial_position_blur == 0){ 483 var offset = $('#box_sticky').offset(); 484 initial_position_blur = offset.top; 485 } 486 487 blur_box_height = $('#box_sticky').height(); 488 blur_box_height = blur_box_height*1; 489 490 if(blur_box_height < blurred_height){ 491 var article_bottom_offset = $('#google_adsense').offset(); 492 var article_bottom_top = article_bottom_offset.top; 493 494 if(scroll[1] > initial_position_blur){ 495 if(scroll[1] > (article_bottom_top*1 - blur_box_height*1 - 150)){ 496 $('#box_sticky').css('position','static'); 497 $('#box_sticky').css('margin-top',(blurred_height*1 - blur_box_height*1 - 100) + "px"); 498 } 499 else{ 500 $('#box_sticky').css('position','fixed'); 501 $('#box_sticky').css('top','50px'); 502 $('#box_sticky').css('margin-top','0px'); 503 } 504 } 505 else if(scroll[1] <= initial_position_blur){ 506 $('#box_sticky').css('position','static'); 507 $('#box_sticky').css('margin-top','50px'); 508 } 509 } 510 511 } 512} 513 514function getScrollXY(){ 515 var scrOfX = 0, scrOfY = 0; 516 if( typeof( window.pageYOffset ) == 'number' ) { 517 //Netscape compliant 518 scrOfY = window.pageYOffset; 519 scrOfX = window.pageXOffset; 520 } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { 521 //DOM compliant 522 scrOfY = document.body.scrollTop; 523 scrOfX = document.body.scrollLeft; 524 } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { 525 //IE6 standards compliant mode 526 scrOfY = document.documentElement.scrollTop; 527 scrOfX = document.documentElement.scrollLeft; 528 } 529 return [ scrOfX, scrOfY ]; 530} 531 532 533if (jQuery("#zc_protv_surprise").length && jQuery("#zc_protv_surprise").is(":visible")) { 534 jQuery("#zc_protv_surprise").hide(); 535} 536jQuery(function($) { 537 //make a anonymous self calling function on document.ready so the variables declared here won't hoist and interract with anything else 538 (function(){ 539 if(jQuery("#zc_protv_surprise").length) { 540 var live_box = document.querySelector('#zc_protv_surprise'); 541 var latimeOptima = 1580; 542 var latimeSite = 978; 543 $(window).on("scroll resize",function(){ 544 var checkTrigger = 0; 545 var screen_width = jQuery(window).width() - 50; 546 var calculBaraDreapta = (screen_width - latimeSite)/2; 547 var translateul = latimeOptima - latimeSite - calculBaraDreapta - calculBaraDreapta; 548 549 if(translateul < 295){ 550 var rezultat = translateul; 551 } else { 552 var rezultat = 295; 553 } 554 555 if(jQuery(window).scrollTop() >= 595) { 556 jQuery('#zc_protv_surprise').css({"position":"fixed","top":"255px"}); 557 if(checkTrigger == 0){ 558 if(jQuery("div[id^='ZtrFloat']").is(":visible") && ("div[id^='ZtrFloat']").length) { 559 jQuery('#zc_protv_surprise').fadeIn("fast"); 560 jQuery(".protv_close").fadeToggle(300); 561 jQuery(".protv_logo").fadeToggle(0); 562 jQuery("#protv_container-iframe-4o240272 iframe").animate({width:'toggle'},350, function(){ 563 jQuery(".protv_logo").fadeToggle(300); 564 if(screen_width < latimeOptima && checkVirgin == 0){ 565 jQuery("#zc_protv_surprise").css({"transform":"translateX("+rezultat+"px)"}).animate({right:'0'},11);; 566 } else { 567 jQuery("#zc_protv_surprise").css({"right":"0","transform":"translateX(0)"}); 568 } 569 }); 570 checkTrigger = 1; 571 } else { 572 jQuery('#zc_protv_surprise').fadeIn("fast"); 573 if(screen_width < latimeOptima && checkVirgin == 0){ 574 jQuery("#zc_protv_surprise").css({"transform":"translateX("+rezultat+"px)"}).animate({right:'0'},11);; 575 } else { 576 jQuery("#zc_protv_surprise").css({"right":"0","transform":"translateX(0)"}); 577 } 578 checkTrigger = 1; 579 } 580 } 581 } else { 582 jQuery('#zc_protv_surprise').css({"position":"absolute","top":"855px"}); 583 } 584 }); 585 var checkVirgin = 0; 586 jQuery(".protv_logo, .protv_close").on("click", function() { 587 if(checkVirgin == 0 && jQuery(window).width() <= 1580){ 588 jQuery("#zc_protv_surprise").css({"transition":".2s","right":'0',"transform":'translateX(0)'},250); 589 }else if (checkVirgin == 0 && jQuery(window).width() > 1580){ 590 jQuery("#protv_container-iframe-4o240272 iframe").animate({width:'toggle'},350); 591 jQuery(".protv_close").fadeToggle(300); 592 }else{ 593 jQuery("#protv_container-iframe-4o240272 iframe").animate({width:'toggle'},350); 594 jQuery(".protv_close").fadeToggle(300); 595 } 596 checkVirgin = 1; 597 }); 598 //small hack to trigger an event when clicking inside the iframe 599 var protv_iframe_mouseover = false; 600 window.addEventListener('blur', function(){ 601 if(protv_iframe_mouseover) { 602 gtag("event", 'SfatulMedicului.ro', {"event_category":"InterPromoPROTV", "event_label": document.location.href,"event_value":1}); 603 } 604 }); 605 live_box.addEventListener('mouseover', function() { 606 protv_iframe_mouseover = true; 607 }); 608 live_box.addEventListener('mouseout', function() { 609 protv_iframe_mouseover = false; 610 }); 611 } 612 })(); 613}); 614 615//Hardcodare reparare banner celadrin, de comentat/sters dupa 1 aprilie 2016 (nu glumesc) 616//EDIT: de reactivat in cazul in care va fi nevoie, daca nu se poate face click in spatele bannerului dupa ce il inchizi 617//jQuery(window).on("scroll", function(){ 618// if(jQuery("#stickyCeladrin").is(":hidden")) { 619// jQuery(document).ready(function(){ 620// jQuery("div#ZtrFloatHtml3B").hide(); 621// }); 622// } 623//}); 624 625/*** Pozitionare Banner-top/bilboard */ 626 627/* 628var headerh = jQuery('header').height(); 629jQuery('div.content').css('padding-top', headerh);
630if(jQuery('div.continut')){ 631 jQuery('div.continut').css('padding-top', headerh); 632} 633*/ 634 635/*** Script StickyBoiron */ 636(function($) { 637 jQuery(document).ready(function() { 638 var buton_sticky = jQuery("#sticky_boiron .close"), 639 bara_sticky = jQuery("#sticky_boiron .bara"), 640 inaltime_bara_sticky = 35, //inaltimea barei care ramane 641 banner_sticky = jQuery("#sticky_boiron"), 642 close_button = jQuery("#sticky_boiron .closed"); 643 buton_sticky.click(function(){ 644 var inaltime_sticky = jQuery("#sticky_boiron").outerHeight(true); 645 if(banner_sticky.hasClass('closed')){ 646 bara_sticky.css({height:0}); 647 banner_sticky.css({bottom:0}); 648 banner_sticky.removeClass('closed'); 649 close_button.hide(); 650 gtag('event','Open', {'event_category':'StickyBoiron','event_label':'Click'}); 651 }else{ 652 bara_sticky.css({height:inaltime_bara_sticky}); 653 banner_sticky.css({bottom:-inaltime_sticky}); 654 banner_sticky.addClass('closed'); 655 close_button.show(); 656 gtag('event','Close', {'event_category':'StickyBoiron','event_label':'Click'}); 657 } 658 }); 659 }); 660})(jQuery); 661 662 663/*** Script Motion Acordeon */ 664var number_of_triggers = 4; 665var current_trigger = 1; 666var interval = 0; 667jQuery(document).ready(function(){ 668 jQuery('.helvetica').click(function(){ 669 clearInterval(interval); 670 current_trigger = $(this).attr('rel') * 1; 671 startAnimation(); 672 }); 673 674 // dau drumul la primul interval 675 jQuery('#trigger-pasul-1').click(); 676}); 677 678function startAnimation(){ 679// interval = setInterval(function(){ 680// current_trigger = (current_trigger+1)%(number_of_triggers+1); 681// if(current_trigger == 0) current_trigger = 1; 682// $('#trigger-pasul-'+current_trigger).click(); 683// }, 4000); 684} 685 686 687/** WIDGET Hover **/ 688jQuery(window).load(function(){ 689 jQuery('#listaHover li').hover(function(e){ 690 jQuery(this).addClass('list-hover'); 691 },function(){ 692 jQuery(this).removeClass('list-hover'); 693 }); 694 695 /**WIDGET Smooth Scroller **/ 696 jQuery("#wrapper .scroll").click(function(e){ 697 e.preventDefault(); 698 var url = jQuery(this).attr('href'); 699 700 if(jQuery(this.getAttribute('href', 2)).offset()){ 701 urlOffset = jQuery(this.getAttribute('href', 2)).offset().top; 702 jQuery('html').animate({scrollTop:urlOffset}, 500, function(){ 703 window.location.href = url; 704 }); 705 } 706 }); 707}); 708 709// OVERLAYER 710var overlayerBg, overlayerTarget; 711jQuery(function() { 712 overlayerBg = jQuery('#ovBg'); 713 overlayerBg.click(closeOverlayer); 714}); 715 716 717function openOverlayer(target){ 718 overlayerTarget = $(target); 719 overlayerTarget.appendTo('body'); 720 overlayerBg.fadeIn(); 721 overlayerBg.add(overlayerTarget).addClass('active'); 722} 723function closeOverlayer(){ 724 overlayerBg.fadeOut(); 725 overlayerBg.add(overlayerTarget).removeClass('active'); 726} 727 728//de deschis popup newsletter 729jQuery(document).ready(function() { 730 //slidere general id="box_articol_sticky" 731 // if($("body").outerHeight() > 2400) { 732 // setTimeout(function(){ 733 // jQuery('#box_articol_sticky').each(function(){ 734 // var pozitiesus = jQuery(this).offset(); 735 // var astaeste = jQuery(this) 736 // jQuery(window).scroll(function() { 737 // var scrollxyz = jQuery(window).scrollTop(); 738 // if(scrollxyz >= pozitiesus.top) { 739 // astaeste.addClass('fixed'); 740 // } else { 741 // astaeste.removeClass('fixed'); 742 // } 743 // //oprit jos 744 // var pozitiejos = jQuery("footer").offset().top - jQuery("#box_articol_sticky").outerHeight() - 15; 745 // if ($(".inrudite").length) { 746 // var pozitiejosinrudite = jQuery(".inrudite").offset().top - jQuery("#box_articol_sticky").outerHeight() - 15; 747 // if(scrollxyz >= pozitiejosinrudite) { 748 // jQuery("#box_articol_sticky").addClass("absolut-benefic"); 749 // jQuery("#box_articol_sticky").css("top", pozitiejosinrudite - jQuery("#second-top-row").outerHeight() - jQuery("#main-navigation").outerHeight()); 750 // } else { 751 // jQuery("#box_articol_sticky").removeClass("absolut-benefic"); 752 // jQuery("#box_articol_sticky").removeAttr("style"); 753 // } 754 // } else { 755 // if(scrollxyz >= pozitiejos) { 756 // jQuery("#box_articol_sticky").addClass("absolut-benefic"); 757 // jQuery("#box_articol_sticky").css("top", pozitiejos - jQuery("#second-top-row").outerHeight() - jQuery("#main-navigation").outerHeight()); 758 // } else { 759 // jQuery("#box_articol_sticky").removeClass("absolut-benefic"); 760 // jQuery("#box_articol_sticky").removeAttr("style"); 761 // } 762 // } 763 // }); 764 // }); 765 // }, 4000); 766 // } 767 768 if( $("#col-alpha").height() > $("#col-beta").height() ){ 769 //$("#col-beta").height($("#col-alpha").height()); 770 $("#col-beta").css("min-height", $("#col-alpha").height()); 771 } 772 773 774 function newsMeIn(){ 775 var formData = {}; 776 $.ajax ({ 777 type : 'POST', 778 url : window.AMVC_WEB_PATH+"index.php?module=abonare_newsletter_overlay.ajxinternal", 779 data : formData, 780 dataType : 'html' 781 }).done (function(data) { 782 $('body').append(data); 783 $(".container-responsive-newsletter-2016").delay(100).fadeIn("fast"); 784 $(".backlight-newsletter-2016").delay(100).fadeIn("fast"); 785 if ($("#zc_protv_surprise").length && $("#zc_protv_surprise").is(":visible")) { 786 $("#zc_protv_surprise").hide(0); 787 }
788 if(cookiesSocialMedia == 1) { 789 $(".social-media-span").append(`<div id="fb-root"></div><script>(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.1';fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>`); 790 $(".social-media-span").css({"height":"auto","margin-top":"-10px"}); 791 } 792 }) 793 } 794 $("#buton-deschidere-newsletter-2016").on("click", function(){ 795 if($(".container-responsive-newsletter-tot").length){ 796 $(".container-responsive-newsletter-tot").fadeIn("fast") 797 } else { 798 newsMeIn(); 799 } 800 }); 801 if(window.location.href.indexOf("mailUp") > -1) { 802 newsMeIn(); 803 } 804 function logMeIn(){ 805 var formData = { 806 'method': 'login_general', 807 }; 808 // method=ask_question 809 /*$.ajax({ 810 type: 'POST', 811 url: AMVC_WEB_PATH + "index.php?module=loginOverlay.ajxinternal", 812 data: formData, 813 dataType: 'html' 814 }) 815 .done(function (data) { 816 $('body').append(data); 817 login_loaded = 1; 818 $(".container-responsive-general-2016").delay(100).fadeIn("fast"); 819 $(".backlight-general-2016").delay(100).fadeIn("fast"); 820 });*/ 821 $.ajax({ 822 type: 'POST', 823 url : AMVC_WEB_PATH + "index.php?module=show_new_login.ajxinternal", 824 data: formData, 825 dataType: 'html' 826 }).done(function (data) { 827 if($("#show_login_wp").length <= 0){ 828 $('body').append(data); 829 $('html').css('overflow','hidden'); 830 } 831 }); 832 } 833 $('.login-general').on('click', function() { 834 logMeIn(); 835 }); 836 if(window.location.href.indexOf("loginUp") > -1) { 837 logMeIn(); 838 } 839 if(window.location.href.indexOf("inregistrareUp") > -1) { 840 logMeIn(); 841 } 842 843 $('.signin-general').on('click', function() { 844 var formData = { 845 'method': 'login_general', 846 }; 847 // method=ask_question 848 /*$.ajax({ 849 type: 'POST', 850 url: AMVC_WEB_PATH + "index.php?module=loginOverlay.ajxinternal", 851 data: formData, 852 dataType: 'html' 853 }) 854 .done(function (data) { 855 $('body').append(data); 856 login_loaded = 1; 857 $(".container-responsive-general-2016").delay(100).fadeIn("fast"); 858 $(".backlight-general-2016").delay(100).fadeIn("fast"); 859 });*/ 860 $.ajax({ 861 type: 'POST', 862 url : AMVC_WEB_PATH + "index.php?module=show_new_login.ajxinternal", 863 data: formData, 864 dataType: 'html' 865 }).done(function (data) { 866 if($("#show_login_wp").length <= 0){ 867 $('body').append(data); 868 $('html').css('overflow','hidden'); 869 } 870 }); 871 }); 872 //promovare clickmed 873 $('.show_clickmed_info').on('click', function(){ 874 var bkd = '<div class="clickmed_promotion_wp clickmed_promotion_in"></div>'; 875 if($("#clickmed_promotion").length > 0){ 876 $("#clickmed_promotion").before(bkd); 877 $("#clickmed_promotion").css("display","block"); 878 } 879 }) 880 $('.close_clickmed_promotion').on('click', function(){ 881 var bkd = '<div class="clickmed_promotion_wp clickmed_promotion_in"></div>'; 882 if($("#clickmed_promotion").length > 0){ 883 $(".clickmed_promotion_wp").remove(); 884 $("#clickmed_promotion").css("display","none"); 885 } 886 }) 887 888 //ARTICOLE allOk == 1 inseamna ca e pagina de articol 889 if(allOk == 1){ 890 $(".taburi-slider-2016").click(function () { 891 var here = $(this); 892 $(".tab-slider-2016").removeClass("tab-deschis-slider-2016").hide(); 893 $("#tab"+here.data("no")+"-slider-2016").fadeIn(400); 894 $(".taburi-slider-2016").removeClass("taburi-slide-2016-activ"); 895 here.addClass("taburi-slide-2016-activ"); 896 $(".container-cu-firme-slider-2016, .container-cu-firme-servicii-2016").removeClass("container-cu-firme-deschis-slider-2016"); 897 $(".fader-slider-2016, #plus"+here.data("no")+"-slider-2016, .hide-this-babe-slider-2016").show(); 898 $(".minimize-container-slider-2016, .hide-this-slider-2016, .sageata-in-mjos, .sageata-in-bjos, .fader-slider-2016").hide(); 899 $(".hide-info-slider-2016").removeClass("info-firma-slider-2016"); 900 $("html, body").animate({scrollTop: $(window).scrollTop()-1}, 1, function(){$("html, body").animate({scrollTop: $(window).scrollTop()+1}, 1);}); 901 }); 902 $(".plus-slider-2018").on({mouseenter: function() {$(this).find($(".sageata-in-mjos, .sageata-in-bjos")).fadeIn(100);},mouseleave: function() {$(this).find($(".sageata-in-mjos, .sageata-in-bjos")).fadeOut(100);}}); 903 $(".plus-slider-2018").click(function() { 904 var here = $(this); 905 $("#plus"+here.data("no")+"-slider-2016, .hide-this-babe-slider-2016, .fader-slider-2016").hide(); 906 $("#tab"+here.data("no")+"-slider-2016").addClass("tab-deschis-slider-2016"); 907 $(".container-cu-firme-slider-2016").addClass("container-cu-firme-deschis-slider-2016"); 908 $("#minus"+here.data("no")+"-slider-2016").fadeIn("slow"); 909 $(".hide-info-slider-2016").addClass("info-firma-slider-2016").show(); 910 $("html, body").animate({scrollTop: $(window).scrollTop()-1}, 1, function(){$("html, body").animate({scrollTop: $(window).scrollTop()+1}, 1);}); 911 912 $(".hide-this-slider-2016").show(); 913 }); 914 $(".minimize-container-slider-2016").click(function() { 915 var here = $(this); 916 $("#tab"+here.data("no")+"-slider-2016").removeClass("tab-deschis-slider-2016"); 917 $(".container-cu-firme-slider-2016").removeClass("container-cu-firme-deschis-slider-2016"); 918 $(".hide-this-slider-2016").hide(); 919 $("#minus"+here.data("no")+"-slider-2016").fadeOut("slow"); 920 $(".fader-slider-2016, .hide-this-babe-slider-2016, #plus"+here.data("no")+"-slider-2016").show(); 921 $(".sageata-in-mjos, .sageata-in-bjos").hide(); 922 923 $(".hide-info-slider-2016").removeClass("info-firma-slider-2016"); 924 }); 925 //de schimbat butoanele de oferte si de salvare articol 926 $(".buton1-slider-2016").click(function () { 927 $(".slide-toggle-slider-2016").slideToggle("fast", function () { 928 $(".slide-toggle-slider-2016").removeClass("max-height-slider-2016"); 929 $(".buton1-slider-2016").toggleClass("offer-asdf-slider-2016").toggleClass("close-asdf-slider-2016"); 930 $(".tt-buton1-offer, .tt-buton1-close").hide(); 931 }); 932 }); 933 var check1 = 0; 934 $(this).scroll(function(){ 935 //verifica daca se incarca sliderul. o singura data 936 if(check1 == 0){ 937 if($("#complet-slider-2016").is(":visible")) { 938 gtag('event','Load', {'event_category':'Clinics Slider Desktop','event_label':'Show Slider Clinics'}); 939 check1 = 1; 940 } 941 } 942 //ga clinici, doctori, servicii 943 $(".firme-tabX-2016").each(function(){ 944 if($(this).data("checked") == 0 && $(this).is(":visible")){ 945 $(this).data("checked",1);
946 var numecont = $(this).data("numecont"); 947 if($(this).data("tip") == "clinica"){ 948 gtag('event','Load - clinici', {'event_category':'Clinics Slider Desktop','event_label':numecont}); 949 } else if($(this).data("tip") == "medic"){ 950 gtag('event','Load - medici', {'event_category':'Clinics Slider Desktop','event_label':numecont}); 951 } else if($(this).data("tip") == "serviciu"){ 952 gtag('event','Load - servicii', {'event_category':'Clinics Slider Desktop','event_label':numecont}); 953 } 954 } 955 }); 956 }); 957 if (!$("#buton1-slider-2016").length) { 958 $("#tab2-slider-2016").show(); 959 $("#buton2-slider-2016").addClass("taburi-slide-2016-activ"); 960 } 961 if (!$("#buton1-slider-2016").length && !$("#buton2-slider-2016").length) { 962 $("#tab3-slider-2016").show(); 963 $("#buton3-slider-2016").addClass("taburi-slide-2016-activ"); 964 } 965 //anunturi tag 966 if(window.location.href.indexOf("articolsalvat") > -1) { 967 $("#anunt-general-error").fadeIn("fast"); 968 $("#anunt-general-text").html("Articolul a fost salvat cu succes."); 969 } else if(window.location.href.indexOf("dejasalvat") > -1) { 970 $("#anunt-general-error").fadeIn("fast"); 971 $("#anunt-general-text").html("Articolul este deja salvat in contul tau."); 972 } 973 $(".buton1-slider-2016").on("click", function() { 974 if ($(".buton1-slider-2016").hasClass("close-asdf-slider-2016")) { 975 gtag('event','Close', {'event_category':'Clinics Slider Desktop', 'event_label':'Close Slider'}); 976 } else { 977 gtag('event','Click', {'event_category':'Clinics Slider Desktop','event_label':'Reopen Slider Clinics'}); 978 } 979 }); 980 } 981});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.