1function setEqualHeight() { 2 var w25 = $('.anunturi_news_ .ubbcultural_box'); 3 var w75 = $('.anunturi_news_ .bx-wrapper ul'); 4 5 // ResetÄm înÄlÈimea ca sÄ evitÄm acumularea valorilor la resize 6 w25.css('height', 'auto'); 7 w75.css('height', 'auto'); 8 9 // CalculÄm înÄlÈimea maximÄ dintre cele douÄ 10 var maxHeight = Math.max(w25.outerHeight(), w75.outerHeight()); 11console.log(w25.outerHeight(),w75.outerHeight()); 12 // SetÄm aceeaÈi înÄlÈime ambelor coloane 13 console.log("height news",parseInt(maxHeight) + 'px'); 14 w25.css('height', parseInt(maxHeight) + 'px'); 15 w75.css('height', parseInt(maxHeight) + 'px'); 16} 17 18$(document).ready(function() { 19 timer = setTimeout(function () {setEqualHeight(); 20 }, 200); 21}); 22 23$(window).on('resize', function() { 24 timer = setTimeout(function () {setEqualHeight(); 25 }, 200); 26}); 27 28function moveCovid() { 29 $(".append-covid19").remove(); 30 $("#header #menu_sec .meniu_alegeri").each(function () { 31 elem = $(this).find("a").clone(); 32 elem.attr("style", "color: #fff; padding: 10px; background: #244160;"); 33 if ($(this).find("a").attr("href") == "/ro/infoubb/covid19/") { 34 $("#menu").prepend("<div class='append-covid19 w100 clearfix'></div>"); 35 $(elem).appendTo('.append-covid19'); 36 } 37 }) 38} 39 40function centenar() { 41 $(".ro #page").prepend("<div class=\"logo_centenar\"><img src=\"/img/logo_centenar_UBB.png\"></div>"); 42 $(".hu #page").prepend("<div class=\"logo_centenar\"><img src=\"/img/logo_centenar_UBB_hu.png\"></div>"); 43 44 $(".en #page").prepend("<div class=\"logo_centenar\"><img src=\"/img/logo_centenar_UBB_en.png\"></div>"); 45 $(".ge #page").prepend("<div class=\"logo_centenar\"><img src=\"/img/logo_centenar_UBB_de.png\"></div>"); 46 47 48} 49 50function styleelement() { 51 52 var setHeightvideo = Math.floor((window.innerWidth) / 3.5); 53 54 $(".bxslider li video").height(setHeightvideo); 55 //$(".ndx .bx-viewport").height(setHeightvideo); 56 //$(".bxslider li > .img").height(setHeightvideo); 57 58 if (window.innerWidth > 918) { 59 $(".info").css({ 60 bottom: 0, 61 top: 0 62 }); 63 } else { 64 $(".info").css({ 65 'bottom': '', 66 top: setHeightvideo 67 }); 68 } 69 70 71} 72 73/* ======================================================== SET COOKIE ======================*/ 74 75 76/*! 77 * jQuery Cookie Plugin v1.4.0 78 * https://github.com/carhartl/jquery-cookie 79 * 80 * Copyright 2013 Klaus Hartl 81 * Released under the MIT license 82 */ 83(function (factory) { 84 if (typeof define === 'function' && define.amd) { 85 define(['jquery'], factory); 86 } else { 87 factory(jQuery); 88 } 89}(function ($) { 90 var pluses = /\+/g; 91 92 function encode(s) { 93 return config.raw ? s : encodeURIComponent(s); 94 } 95 96 function decode(s) { 97 return config.raw ? s : decodeURIComponent(s); 98 } 99 100 function stringifyCookieValue(value) { 101 return encode(config.json ? JSON.stringify(value) : String(value)); 102 } 103 104 function parseCookieValue(s) { 105 if (s.indexOf('"') === 0) { 106 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 107 } 108 try { 109 s = decodeURIComponent(s.replace(pluses, ' ')); 110 return config.json ? JSON.parse(s) : s; 111 } catch (e) {} 112 } 113 114 function read(s, converter) { 115 var value = config.raw ? s : parseCookieValue(s); 116 return $.isFunction(converter) ? converter(value) : value; 117 } 118 var config = $.cookie = function (key, value, options) { 119 if (value !== undefined && !$.isFunction(value)) { 120 options = $.extend({}, config.defaults, options); 121 if (typeof options.expires === 'number') { 122 var days = options.expires, 123 t = options.expires = new Date(); 124 t.setTime(+t + days * 864e+5); 125 } 126 return (document.cookie = [encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join('')); 127 } 128 var result = key ? undefined : {}; 129 var cookies = document.cookie ? document.cookie.split('; ') : []; 130 for (var i = 0, l = cookies.length; i < l; i++) { 131 var parts = cookies[i].split('='); 132 var name = decode(parts.shift()); 133 var cookie = parts.join('='); 134 if (key && key === name) { 135 result = read(cookie, value); 136 break; 137 } 138 if (!key && (cookie = read(cookie)) !== undefined) { 139 result[name] = cookie; 140 } 141 } 142 return result; 143 }; 144 config.defaults = {}; 145 $.removeCookie = function (key, options) { 146 if ($.cookie(key) === undefined) { 147 return false; 148 } 149 $.cookie(key, '', $.extend({}, options, { 150 expires: -1 151 })); 152 return !$.cookie(key); 153 }; 154}
154)); 155 156 157/* ======================================================== EQUAL HEIGHT ON BXSLIDER ======================*/ 158 159/* ======================================================== EQUAL HEIGHT ======================*/ 160equalheight = function (container) { 161 $(container).matchHeight({ 162 byRow: true 163 }); 164} 165 166var timer, my_element; 167 168function delayHoverShow(element) { 169 timer = setTimeout(function () { 170 console.log("timer show"); 171 $(".sub-menu").removeClass("offhover"); 172 $(".sub-menu").removeClass("onhover"); 173 $(element).removeClass("offhover"); 174 $(element).addClass("onhover"); 175 }, 200); 176}; 177 178function delayHoverHide(element) { 179 timer = setTimeout(function () { 180 console.log("timer hide"); 181 $(".sub-menu").removeClass("offhover"); 182 $(".sub-menu").removeClass("onhover"); 183 $(element).removeClass("onhover"); 184 $(element).addClass("offhover"); 185 $(element).css({ 186 'display': 'none' 187 }); 188 }, 1000); 189}; 190 191$(document).on('ready', function () { 192 193 194 width = $(window).width(); 195 styleelement(); 196 $('.titleline').wrapInner('<span></span>'); 197 equalheight('#evenim h3'); 198 equalheight('#evenim .location'); 199 equalheight('.cercetare'); 200 equalheight('.cercetare_item_evenim_articol_title>a'); 201 equalheight('.cercetare_items>div.cercetare_item_link:nth-child(1)>.box>a'); 202 203 //equalheight('#anunt h3'); 204 //equalheight('#anunt li div'); 205 //equalheight('.ui-tabs-horizontal .ui-tabs-nav li a'); 206 //equalheight('.ui-tabs-horizontal .ui-tabs-nav li'); 207 equalheight('#sections .excerpt'); 208 equalheight('#sections li'); 209 equalheight('#sections li h3'); 210 equalheight('#section_promo_ .item'); 211 equalheight('.box h2'); 212 equalheight('.box .box_text'); 213 equalheight('.article_title'); 214 //equalheight('.box:not(.cercetare .box)'); 215 equalheight('.box:not(.organizatii_stud .box)'); 216 equalheight('#infotainment ul .w30'); 217 //equalheight('.anunturi_news_ .anunt_content'); 218 219 $(".anunt_parteneri").height($("#anunt li").height()); 220 $(".anunt_parteneri h3").height($("#anunt li h3").height()); 221 $(".anunt_parteneri div").height($("#anunt li div").height()); 222 223 if ($(window).width() > 900) { 224 225 $("#menu").css("display", "block"); 226 $("#menu_sec").css("display", "block"); 227 228 var delay = 300, 229 setTimeoutConst, 230 delay2 = 1000, 231 setTimeoutConst2; 232 233 $("#menu > div > ul > li > a").mouseover(function () { 234 $(".sub-menu").each(function () { 235 $(this).css('display', 'none'); 236 }); 237 my_element = $(this).parent().find(".sub-menu"); 238 setTimeoutConst = setTimeout(function () { 239 console.log("delay show"); 240 $(my_element).css('display', 'flex'); 241 }, delay); 242 }).mouseout(function () { 243 my_element = $(this).parent().find(".sub-menu"); 244 clearTimeout(setTimeoutConst); 245 setTimeoutConst2 = setTimeout(function () { 246 console.log("delay hide"); 247 var isHover = $("#menu").is(":hover"); 248 if (isHover !== true) { 249 $(my_element).css('display', 'none'); 250 } 251 }, delay2); 252 253 }); 254 255 $(".sub-menu").mouseout(function () { 256 my_element = $(".sub-menu"); 257 clearTimeout(setTimeoutConst); 258 setTimeoutConst2 = setTimeout(function () { 259 console.log("delay hide"); 260 var isHover = $("#menu").is(":hover"); 261 if (isHover !== true) { 262 $(my_element).css('display', 'none'); 263 } 264 }, delay2); 265 }); 266 267 $("#menu").addClass("arrow"); 268 $("#anunt").addClass("arrow"); 269 $("#footer .w60").addClass("center"); 270 $("#footer .w60 > div").addClass("left"); 271 /* ======================================================== PUT LEFT MENU DOWN ======================*/ 272 $("#menu #menu_sec").remove(); 273 $("#section_content #menu_section").css("display", "none"); 274 if ($(window).width() <= 1100) 275 $("#section_content_index #menu_section .cols-left").css("display", "none"); 276 /* ======================================================== Dropdown Menus Hover for Desktop, Click for Tablets/Phones? ======================*/ 277 function is_touch_device() { 278 return !!('ontouchstart' in window); 279 } 280 281 /* If mobile browser, prevent click on parent nav item from redirecting to URL */
282 if (is_touch_device()) { 283 $('#menu .sub-menu').each(function (index, ev) { 284 $(ev).prev('a').click(function (event) { 285 event.preventDefault(); 286 }); 287 }); 288 } 289 290 } else { 291 $("#menu").css("display", "none"); 292 $("#menu_sec").css("display", "none"); 293 $("#menu").removeClass("arrow"); 294 $("#anunt").removeClass("arrow"); 295 $("#footer .w60").removeClass("center"); 296 $("#footer .w60 > div").removeClass("left"); 297 $("#section_content #menu_section").css("display", "block"); 298 $("#section_content_index #menu_section .cols-left").css("display", "none"); 299 300 301 var hhh = $(".caption").outerHeight(); 302 $("#section_content_index").attr('style', 'margin-top:' + hhh + 'px!important'); 303 var hhh1 = $(window).width() / 3.75; 304 $(".page.section #section_content").attr('style', 'padding-top:' + hhh1 + 'px!important'); 305 306 /* ======================================================== PUT SUBSECTION MENU - in paginile din interior ======================*/ 307 if ($('#menu_section').length == 0) { 308 var path = window.location.pathname.split("/"); 309 var lang = path[1]; 310 var sect = path[2]; 311 var subsect = path[3]; 312 $.ajax({
313 url: "/include/menu-" + lang + ".php", 314 data: "function=meniu_sect§=" + sect + "&subsect=" + subsect, 315 }).done(function (response) { 316 $(".container").prepend(response); 317 if (response != "") { 318 $("#menu_section h2").replaceWith('<div class="toogle_menu_index_container"><span class="highlight_toggle_menu">' + $("#menu_section h2").text() + '</span><div class="menu-toggle-btn"><span></span><span></span><span></span></div></div>'); 319 $("#menu_section .cols-left ul").css("display", "none"); 320 $(".toogle_menu_index_container").on("click", function () { 321 $("#menu_section .cols-left ul").toggle(function () { 322 $(this).animate({ 323 'height': '0', 324 'width': '100%', 325 'opacity': '0' 326 }, 400), "ease" 327 }, 328 function () { 329 $(this).animate({ 330 'height': 'auto', 331 'width': '100%', 332 'opacity': '1' 333 }, 400), "ease" 334 }); 335 }); 336 } 337 }); 338 } 339 340 /* ======================================================== PUT LEFT MENU DOWN - in paginile din interior ======================*/ 341 $("#menu").append("<div id='menu_sec'>" + $("#menu_sec").html() + "</div>"); 342 343 344 } 345 /* ======================================================== deschide / inchide submeniu din meniu principal ======================*/ 346 $("body").on('click', ".menu-plus", function () { 347 $(this).toggleClass("menu-minus"); 348 console.log($(this).parent()); 349 $(this).parent().find(".sub-menu").toggle(); 350 $(this).parent().find(".menu_sec_submenu").toggle(); 351 }); 352 /* ======================================================== ??? ======================*/ 353 $(".cs-placeholder").on('click', function () { 354 $('head').append('<style type="text/css" id="arrowstyle">.arrow:after {z-index:0!important} .arrow:before {z-index:1!important;}</style>'); 355 if ($(".cs-optgroup-text").length == 0) $(".cs-options > ul").prepend("<li class='cs-optgroup-text'>" + $(".cs-options .cs-optgroup > span").html() + "</li>"); 356 $(".cs-options .cs-optgroup > span").remove(); 357 }); 358 359}); 360$(window).on('resize', function () { 361 362 363 styleelement(); 364 $(".append-covid19").remove(); 365 if ($(window).width() < 917) moveCovid(); 366 var w = $(window).width(); 367 368 if (typeof checkw == 'undefined') checkw = w; 369 if (w != checkw) { 370 371 checkw = w; 372 styleelement(); 373 equalheight('#evenim h3'); 374 equalheight('#evenim .location'); 375 equalheight('.cercetare'); 376 equalheight('.cercetare_item_evenim_articol_title>a'); 377 equalheight('.cercetare_items>div.cercetare_item_link:nth-child(1)>.box>a'); 378 //equalheight('#anunt h3'); 379 //equalheight('#anunt li div'); 380 equalheight('#sections li h3'); 381 equalheight('#sections .excerpt'); 382 equalheight('#sections li'); 383 equalheight('#section_promo_ .item'); 384 equalheight('.box h2'); 385 equalheight('.box .box_text'); 386 equalheight('.article_title h2'); 387 equalheight('.article_title span'); 388 //equalheight('.box'); 389 //equalheight('.box:not(.cercetare .box)'); 390 equalheight('.box:not(.organizatii_stud .box)'); 391 equalheight('#infotainment ul .w30'); 392 393 394 $(".anunt_parteneri").height($("#anunt li").height()); 395 $(".anunt_parteneri h3").height($("#anunt li h3").height()); 396 $(".anunt_parteneri div").height($("#anunt li div").height()); 397 398 if ($(window).width() > 900) { 399 400 $("#menu").css("display", "block"); 401 $("#menu_sec").css("display", "block"); 402 $("#section_content #menu_section").css("display", "none"); 403 $("#menu_section .cols-left").css("display", "block"); 404 405 var delay = 300, 406 setTimeoutConst, 407 delay2 = 1000, 408 setTimeoutConst2; 409 410 $("#menu > div > ul > li > a").mouseover(function () { 411 $(".sub-menu").each(function () { 412 $(this).css('display', 'none'); 413 }); 414 my_element = $(this).parent().find(".sub-menu"); 415 setTimeoutConst = setTimeout(function () {
416 console.log("delay show"); 417 $(my_element).css('display', 'flex'); 418 }, delay); 419 }).mouseout(function () { 420 my_element = $(this).parent().find(".sub-menu"); 421 clearTimeout(setTimeoutConst); 422 setTimeoutConst2 = setTimeout(function () { 423 console.log("delay hide"); 424 var isHover = $("#menu").is(":hover"); 425 if (isHover !== true) { 426 $(my_element).css('display', 'none'); 427 } 428 }, delay2); 429 430 }); 431 432 $(".sub-menu").mouseout(function () { 433 my_element = $(".sub-menu"); 434 clearTimeout(setTimeoutConst); 435 setTimeoutConst2 = setTimeout(function () { 436 console.log("delay hide"); 437 var isHover = $("#menu").is(":hover"); 438 if (isHover !== true) { 439 $(my_element).css('display', 'none'); 440 } 441 }, delay2); 442 }); 443 444 $("#section_content_index").removeAttr("style"); 445 446 $("#menu").addClass("arrow"); 447 /* ======================================================== PUT LEFT MENU DOWN ======================*/ 448 $("#menu #menu_sec").remove(); 449 if ($(window).width() <= 1100) { 450 $("#section_content_index #menu_section .cols-left").css("display", "none"); 451 } else {} 452 /* ======================================================== Dropdown Menus Hover for Desktop, Click for Tablets/Phones? ======================*/ 453 function is_touch_device() { 454 return !!('ontouchstart' in window); 455 } 456 457 /* If mobile browser, prevent click on parent nav item from redirecting to URL */ 458 if (is_touch_device()) { 459 $('#menu .sub-menu').each(function (index, ev) { 460 $(ev).prev('a').click(function (event) { 461 event.preventDefault(); 462 }); 463 }); 464 } 465 } else { 466 467 $("#menu").css("display", "none"); 468 $("#menu_sec").css("display", "none"); 469 $("#menu").removeClass("arrow"); 470 $("#section_content #menu_section").css("display", "block"); 471 472 var hhh = $(".caption").outerHeight(); 473 $("#section_content_index").attr('style', 'margin-top:' + hhh + 'px!important'); 474 var hhh1 = $(window).width() / 3.75; 475 $(".page.section #section_content").attr('style', 'padding-top:' + hhh1 + 'px!important'); 476 477 478 var path = window.location.pathname.split("/"); 479 if (path.length < 5) 480 $("#menu_section .cols-left").css("display", "none"); 481 $("#menu ul li a").unbind('mouseenter mouseleave'); 482 $("#menu ul li .sub-menu").unbind('mouseenter mouseleave'); 483 $("#menu ul li .menu-minus").each(function () { 484 $(this).toggleClass("menu-minus"); 485 $(this).parent().find(".sub-menu").toggle(); 486 }); 487 /* ======================================================== PUT SUBSECTION MENU ======================*/ 488 if ($('#menu_section').length == 0) { 489 var lang = path[1]; 490 var sect = path[2]; 491 var subsect = path[3]; 492 console.log() 493 $.ajax({
494 url: "/include/menu-" + lang + ".php", 495 data: "function=meniu_sect§=" + sect + "&subsect=" + subsect, 496 }).done(function (response) { 497 $(".container").prepend(response); 498 if (response != "") { 499 $("#menu_section h2").replaceWith('<div class="toogle_menu_index_container"><span class="highlight_toggle_menu">' + $("#menu_section h2").text() + '</span><div class="menu-toggle-btn"><span></span><span></span><span></span></div></div>'); 500 $("#menu_section .cols-left ul").css("display", "none"); 501 $(".toogle_menu_index_container").on("click", function () { 502 $("#menu_section .cols-left ul").toggle(function () { 503 $(this).animate({ 504 'height': '0', 505 'width': '100%', 506 'opacity': '0' 507 }, 400), "ease" 508 }, 509 function () { 510 $(this).animate({ 511 'height': 'auto', 512 'width': '100%', 513 'opacity': '1' 514 }, 400), "ease" 515 }); 516 }); 517 } 518 }); 519 } 520 /* ======================================================== PUT LEFT MENU DOWN ======================*/ 521 if ($("#menu #menu_sec").length == 0) $("#menu").append("<div id='menu_sec'>" + $("#menu_sec").html() + "</div>"); 522 } 523 524 } 525}); 526 527/*$(window).on('scroll', function() { 528 if($(window).width()>1082) 529 {$(".f-nav #menu").css("display","block");} 530 else 531 { 532 $(".f-nav #menu").css("display","none"); 533 } 534 535 536 });*/ 537 538$(window).on('load', function () { 539 540 $("#menu-toggle-btn").click(function () { 541 $("#menu-toggle-btn").toggleClass("js-transform"); 542 }); 543 $('<span class="menu-plus"></span>').insertAfter(".sub-menu"); 544 545 $("a.menu-plus").click(function () { 546 $(".sub-menu").slideToggle("fast"); 547 }); 548 549 $("a.menu-plus").click(function () { 550 $(".sub-menu").slideUp("fast"); 551 }); 552 553}); 554 555 556$("document").ready(function () { 557 /* ====================================== .lang_linii select ON CHANGE ========================================*/ 558 var linii_array = { 559 "Linia Maghiara": "https://www.ubbcluj.ro/hu/despre/organizare/linia_maghiara", 560 "Linia Germana-ro": "http://deutsch.ubbcluj.ro/", 561 "Linia Germana-hu": "http://deutsch.ubbcluj.ro/", 562 "Linia Germana-en": "http://deutsch.ubbcluj.ro/", 563 "Linia Germana-ge": "http://deutsch.ubbcluj.ro/" 564 }; 565 $(".lang_linii select").on('change', function () { 566 window.location.href = linii_array[$(this).val()]; 567 }); 568 569 /* ======================================================== FIX MENU ON TOP ======================*/ 570 var nav = $('.menufix'); 571 $(window).scroll(function () { 572 if ($(window).width() >= 900 && $(this).scrollTop() > 136) { 573 nav.addClass("f-nav_"); 574 } else { 575 nav.removeClass("f-nav_"); 576 } 577 }); 578 /* ======================================================== ARROW BEFORE/AFTER ON SECTIONS ======================*/ 579 if ($('.homepage.section').length != 0 || $('.page.section').length != 0) { 580 $('#menu').addClass('arrow blue_'); 581 } 582 /* ======================================================== ACTIVE CLASS ON MENU ======================*/ 583 var pathArray = window.location.pathname.split("/"); 584 console.log(pathArray.reverse()); 585 586 console.log(pathArray); 587 var pgurl = pathArray.reverse()[1] + "/" + pathArray[2]; 588 $("nav ul li a").each(function () { 589 var $current_url = $(this).attr("href").substr($(this).attr("href").indexOf(pgurl)); 590 if ($current_url == pgurl) 591 $(this).addClass("active"); 592 }); 593 594 595 /* ======================================================== RANDOM IMAGE ON SECTION CONTENT ======================*/ 596 if (pathArray.length >= 4) { // daca nu sunt pe index 597 var randomNum = Math.floor((Math.random() * 2) + 1); 598 $("<style type='text/css' id='dynamic' />").appendTo("head"); 599 pathArray = pathArray.reverse(); 600 console.log(pathArray); 601 if (pathArray.length == 4) { 602 var firstLevelPath = pathArray[0]; 603 var secondLevelPath = pathArray[1]; 604 var thirdLevelPath = pathArray[2]; 605 } 606 if (pathArray.length == 5) { 607 var firstLevelPath = pathArray[1]; 608 var secondLevelPath = pathArray[2]; 609 var thirdLevelPath = pathArray[3]; 610 } 611 612 613 var image_url = "/images/pict_section_" + firstLevelPath + "_" + randomNum + ".jpg"; 614 615 $.get(image_url).done(function () { 616 617 $("#dynamic").text(".page.section #section_content {background-image:url(" + image_url + ")};"); 618 }).fail(function () { 619 var new_image_url = "/images/pict_section_" + secondLevelPath + "_" + randomNum + ".jpg"; 620 $.get(new_image_url).done(function () { 621 image_url = "/images/pict_section_" + secondLevelPath + "_" + randomNum + ".jpg"; 622 $("#dynamic").text(".page.section #section_content {background-image:url(" + image_url + ")};"); 623 }).fail(function () { 624 var thirdLevelPath = pathArray[3]; 625 image_url = "/images/pict_section_" + thirdLevelPath + "_" + randomNum + ".jpg"; 626 $("#dynamic").text(".page.section #section_content {background-image:url(" + image_url + ")};"); 627 }); 628 });
629 } 630 /* ======================================================== FIXED GO TOP BUTTON ======================*/ 631 $(window).scroll(function () { 632 if ($(this).scrollTop() > 200) { 633 $('.go-top').fadeIn(200); 634 } else { 635 $('.go-top').fadeOut(200); 636 } 637 }); 638 639 $('.go-top').click(function (event) { 640 event.preventDefault(); 641 $('html, body').animate({ 642 scrollTop: 0 643 }, 500); 644 }); 645 /* ======================================================== VIEW FULL/MOBILE VERSION ====================== 646 var targetWidth = 980; 647 var deviceWidth = 'device-width'; 648 var viewport = $('meta[name="viewport"]'); 649 localStorage.isResponsive = (localStorage.isResponsive == undefined) ? 'true' : localStorage.isResponsive; 650 var showFullSite = function(){ 651 viewport.attr('content', 'width=' + targetWidth); 652 if(!$('#view-options #view-responsive').length){ 653 $('#view-options').append('<span id="view-responsive">vezi versiunea mobile</span>'); 654 } 655 localStorage.isResponsive = 'false'; 656 } 657 var showMobileOptimized = function(){ 658 localStorage.isResponsive = 'true'; 659 viewport.attr('content', 'width=' + deviceWidth); 660 } 661 if(Modernizr.localstorage){ 662 if(localStorage.isResponsive == 'false'){showFullSite();} 663 } 664 $("#view-full").on("click", function(){ 665 showFullSite(); 666 }); 667 $('#view-options').on("click", "#view-responsive", function(){ 668 showMobileOptimized(); 669 }); 670 671 672 ====== */ 673 674 /* ======================================================== MAGNIFIC POP-UP LIGHTBOX ======================*/ 675 $('.image-popup-vertical-fit').magnificPopup({ 676 type: 'image', 677 closeOnContentClick: true, 678 mainClass: 'mfp-img-mobile', 679 image: { 680 verticalFit: true 681 } 682 683 }); 684 685 $('.image-popup-fit-width').magnificPopup({ 686 type: 'image', 687 closeOnContentClick: true, 688 image: { 689 verticalFit: true 690 } 691 }); 692 693 $('.lightbox').magnificPopup({ 694 type: 'image', 695 closeOnContentClick: true, 696 closeBtnInside: false, 697 fixedContentPos: true, 698 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 699 image: { 700 verticalFit: true 701 }, 702 zoom: { 703 enabled: true, 704 duration: 300 // don't forget to change the duration also in CSS 705 } 706 }); 707 708 // This will create a single gallery from all elements that have class "gallery-item" 709 $('.gallery').magnificPopup({ 710 type: 'image', 711 gallery: { 712 enabled: true 713 } 714 }); 715 /* ======================================================== RESPONSIVE MENU - DETECT MOBILE ======================*/ 716 if ($(window).width() < 917) moveCovid(); 717 var deviceAgent = navigator.userAgent.toLowerCase(); 718 719 var isTouchDevice = Modernizr.touch 720 || (deviceAgent.match(/(iphone|ipod|ipad)/) 721 || deviceAgent.match(/(android)/) 722 || deviceAgent.match(/(iemobile)/) 723 || deviceAgent.match(/iphone/i) 724 || deviceAgent.match(/ipad/i) 725 || deviceAgent.match(/ipod/i) 726 || deviceAgent.match(/blackberry/i) 727 || deviceAgent.match(/bada/i)); 728 if (isTouchDevice) { 729 $("#menu").addClass("isMobile"); 730 } else { 731 if ($(window).width() > 1100) 732 $("#menu").addClass("isDesktop"); 733 else 734 $("#menu").addClass("isMobile"); 735 } 736 737 /* ======================================================== TOGGLE MENU ======================*/ 738 739 $('#toggle_menu').on("click", function () { 740 $('#menu').slideToggle( 741 function () { 742 $(this).animate({ 743 'height': '0', 744 'width': '100%', 745 'opacity': '0' 746 }, 400), "ease" 747 }, 748 function () { 749 $(this).animate({ 750 'height': 'auto', 751 'width': '100%', 752 'opacity': '1' 753 }, 400), "ease" 754 } 755 ); 756 757 }); 758 759 $("#menu_section").prepend('<div class="toogle_menu_index_container"><span class="highlight_toggle_menu">' + $(".title h1").text() + '</span><div class="menu-toggle-btn"><span></span><span></span><span></span></div></div>'); 760 761 762 $(".toogle_menu_index_container").on("click", function () { 763 $("#menu_section .cols-left").toggle(function () { 764 $(this).animate({ 765 'height': '0', 766 'width': '100%', 767 'opacity': '0' 768 }, 400), "ease" 769 }, 770 function () { 771 $(this).animate({ 772 'height': 'auto', 773 'width': '100%', 774 'opacity': '1' 775 }, 400), "ease" 776 }); 777 778 }); 779 780 /* ======================================================== TOGGLE ACCORDION - INFOUBB ======================*/ 781 $(".collapse").css("display", "none"); 782 $(".title_expand").click(function () { 783 $($(this).nextAll()[0]).slideToggle(); 784 }); 785 $(".title_expand").parent().each(function () { 786 $(this).find("h2").after("<span class='expandall'>[Expand All]</span>"); 787 }); 788 $(".expandall").click(function (event) { 789 event.preventDefault(); 790 onExpandAllClick($(this)); 791 }); 792 $(".collapseall").click(function (event) { 793 event.preventDefault(); 794 onCollapseAllClick($(this)); 795 }); 796 797 function onExpandAllClick(val) { 798 val.closest("div").find(".collapse").css("display", "block"); 799 val.addClass("collapseall"); 800 val.removeClass("expandall"); 801 val.text("[Colapse All]"); 802 val.unbind("click"); 803 val.click(function (event) { 804 event.preventDefault(); 805 onCollapseAllClick(val); 806 });
807 }; 808 809 function onCollapseAllClick(val) { 810 val.closest("div").find(".collapse").css("display", "none"); 811 val.addClass("expandall"); 812 val.removeClass("collapseall"); 813 val.text("[Expand All]"); 814 val.unbind("click"); 815 val.click(function (event) { 816 event.preventDefault(); 817 onExpandAllClick(val); 818 }); 819 }; 820 821 822}); 823/* ======================================================== COLLAPSE - EXPAND PANEL ======================*/ 824$(document).ready(function () { 825 var coll = document.getElementsByClassName("collapsible"); 826 827 var i; 828 829 for (i = 0; i < coll.length; i++) { 830 coll[i].addEventListener("click", function () { 831 832 this.classList.toggle("collapsible_active"); 833 var content = this.nextElementSibling; 834 if (content.style.maxHeight) { 835 content.style.maxHeight = null; 836 } else { 837 content.style.maxHeight = content.scrollHeight + "px"; 838 $('html, body').animate({ 839 scrollTop: $($(this)).offset().top - (160) 840 }, 600); 841 } 842 }); 843 } 844}); 845 846/* ======================================================== GALERIE-PORTOFOLIU TABS ======================*/ 847 848$(document).ready(function () { 849 $('ul#filter a').click(function () { 850 $(this).css('outline', 'none'); 851 $('ul#filter .current').removeClass('current'); 852 $(this).parent().addClass('current'); 853 854 // var filterVal = $(this).text().toLowerCase().replace('/\s+/g','-'); 855 // console.log(filterVal); 856 filterVal = $(this).text(); 857 var i = 0, 858 strLength = filterVal.length; 859 for (i; i < strLength; i++) { 860 filterVal = filterVal.replace(" ", "-"); 861 } 862 console.log(filterVal); 863 864 if (filterVal == 'Toate') { 865 $('ul#portofoliu li.hidden').removeClass('hidden').animate({ 866 "opacity": "1" 867 }, 1000, "linear"); 868 } else { 869 $('ul#portofoliu li').each(function () { 870 if (!$(this).hasClass(filterVal)) { 871 $(this).addClass('hidden').animate({ 872 "opacity": "0" 873 }, 1000, "linear"); 874 } else { 875 $(this).removeClass('hidden').animate({ 876 "opacity": "1" 877 }, 1000, "linear"); 878 } 879 }); 880 } 881 882 return false; 883 }); 884}); 885 886 887/* ======================================================== YOUTUBE GDPR ======================*/ 888 889 890function youtube(nume) { 891 892 var iframe = document.createElement("iframe"); 893 894 iframe.setAttribute("src", "https://www.youtube.com/embed/" + nume.dataset.id + "?autoplay=0&autohide=2&border=0&wmode=opaque&enablejsapi=1&rel=0" + nume.dataset.related + "&controls=" + nume.dataset.control + "&showinfo=" + nume.dataset.info); 895 iframe.setAttribute("frameborder", "0"); 896 iframe.setAttribute("id", "youtube-iframe"); 897 iframe.setAttribute("style", "width: 100%; height: 100%; position: absolute; top: 0; left: 0;"); 898 iframe.setAttribute("allow", "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"); 899 if (nume.dataset.fullscreen == 1) { 900 iframe.setAttribute("allowfullscreen", ""); 901 } 902 while (nume.firstChild) { 903 nume.removeChild(nume.firstChild); 904 } 905 nume.appendChild(iframe); 906 907} 908 909 910$(document).ready(function () { 911 912 $('.remember').change(function () { 913 if (this.checked = true) 914 $.cookie('youtube', 'yes', { 915 path: '/' 916 }); 917 $(".youtube-player").each(function () { 918 //youtube(this); 919 $('.youtube-player-info', this).css({ 920 'background': 'transparent' 921 }); 922 $('.youtube-player-img', this).css({ 923 'height': '100%', 924 'display': 'flex', 925 'align-items': 'center', 926 'justify-content': 'center', 927 'flex-direction': 'column' 928 }); 929 $('.youtube-player-remember', this).remove(); 930 $('.youtube-player-text', this).remove(); 931 932 }); 933 }) 934 935 var v = document.getElementsByClassName("youtube-player-img"); 936 937 if (typeof $.cookie('youtube') === 'undefined') { 938 for (var n = 0; n < v.length; n++) { 939 v[n].onclick = function () { 940 var v__ = $(this).parents('.youtube-player')[0]; 941 youtube(v__); 942 }; 943 } 944 } else { 945 $(".youtube-player").each(function () { 946 //youtube(this);
947 $('.youtube-player-info', this).css({ 948 'background': 'transparent' 949 }); 950 $('.youtube-player-img', this).css({ 951 'height': '100%', 952 'display': 'flex', 953 'align-items': 'center', 954 'justify-content': 'center', 955 'flex-direction': 'column' 956 }); 957 $('.youtube-player-remember', this).remove(); 958 $('.youtube-player-text', this).remove(); 959 $(this).on("click", function () { 960 youtube(this); 961 962 }); 963 964 }); 965 } 966 967}) 968// control ubbaccessibility 969$(document).ready(function () { 970 var resizeFontMin = 120; 971 var resizeFontMax = 180; 972 var resizeFont; 973 var resizeFontBaseClass = 'ubbaccessibility-resize-font-'; 974 var counter = 100; 975 976 $('.ubbaccessibility-toolbar-toggle').click(function () { 977 $('#ubbaccessibility-toolbar').toggleClass('ubbaccessibility-toolbar-open'); 978 }); 979 $('.ubbaccessibility-resize-plus-btn').click(function () { 980 $(this).addClass('active'); 981 if (!$('body').is('[class*="' + resizeFontBaseClass + '"]')) { // adauga prima data clasa 982 counter += 10; 983 $('body').addClass(resizeFontBaseClass + counter); 984 } else { // incrementeaza clasa 985 if (counter < resizeFontMax) { 986 $('body').removeClass(resizeFontBaseClass + counter); 987 counter += 10; 988 $('body').addClass(resizeFontBaseClass + counter); 989 } else { 990 counter = resizeFontMax; 991 } 992 } 993 }); 994 995 $('.ubbaccessibility-resize-minus-btn').click(function () { 996 997 if (!$('body').is('[class*="' + resizeFontBaseClass + '"]')) {} else { 998 if (counter > resizeFontMin) { 999 $('body').removeClass(resizeFontBaseClass + counter); 1000 counter -= 20; 1001 $('body').addClass(resizeFontBaseClass + counter); 1002 } else { 1003 //counter = 0; 1004 $('.ubbaccessibility-resize-plus-btn').removeClass('active'); 1005 $('body').removeClass(resizeFontBaseClass + counter); 1006 } 1007 } 1008 1009 }); 1010 1011 $('.ubbaccessibility-grayscale-btn').click(function () { 1012 $('.ubbaccessibility-background-group-btn').removeClass('active'); 1013 $(this).addClass('active'); 1014 $('body').removeClass('ubbaccessibility-high-contrast ubbaccessibility-negative-contrast ubbaccessibility-light-background'); 1015 $('body').toggleClass('ubbaccessibility-grayscale').css('background', '#2b2b2b'); 1016 if ($('body').is('[class*="ubbaccessibility-grayscale"')) { 1017 $('body').css('background', '#2b2b2b') 1018 } else { 1019 $('body').css('background', ''); 1020 $(this).removeClass('active'); 1021 } 1022 1023 }); 1024 $('.ubbaccessibility-high-contrast-btn').click(function () { 1025 $('.ubbaccessibility-background-group-btn').removeClass('active'); 1026 $(this).addClass('active'); 1027 $('body').removeClass('ubbaccessibility-grayscale ubbaccessibility-negative-contrast ubbaccessibility-light-background'); 1028 $('body').toggleClass('ubbaccessibility-high-contrast'); 1029 if ($('body').is('[class*="ubbaccessibility-high-contrast"')) {} else { 1030 $(this).removeClass('active'); 1031 } 1032 }); 1033 1034 $('.ubbaccessibility-negative-contrast-btn').click(function () { 1035 $('.ubbaccessibility-background-group-btn').removeClass('active'); 1036 $(this).toggleClass('active'); 1037 $('body').removeClass('ubbaccessibility-grayscale ubbaccessibility-high-contrast ubbaccessibility-light-background'); 1038 $('body').toggleClass('ubbaccessibility-negative-contrast'); 1039 if ($('body').is('[class*="ubbaccessibility-negative-contrast"')) {} else { 1040 $(this).removeClass('active'); 1041 } 1042 }); 1043 1044 $('.ubbaccessibility-light-background-btn').click(function () { 1045 $('.ubbaccessibility-background-group-btn').removeClass('active'); 1046 $(this).addClass('active'); 1047 $('body').removeClass('ubbaccessibility-grayscale ubbaccessibility-high-contrast ubbaccessibility-negative-contrast'); 1048 $('body').toggleClass('ubbaccessibility-light-background'); 1049 if ($('body').is('[class*="ubbaccessibility-light-background"')) {} else { 1050 $(this).removeClass('active'); 1051 } 1052 }); 1053 1054 $('.ubbaccessibility-links-underline-btn').click(function () { 1055 $(this).toggleClass('active'); 1056 $('body').toggleClass('ubbaccessibility-links-underline'); 1057 }); 1058 $('.ubbaccessibility-readable-font-btn').click(function () { 1059 $(this).toggleClass('active'); 1060 $('body').toggleClass('ubbaccessibility-readable-font'); 1061 }); 1062 $('.ubbaccessibility-reset-btn').click(function () { 1063 //$(this).addClass('active'); 1064 $('.ubbaccessibility-toolbar-item a').removeClass('active'); 1065 $('body').css('background', ''); 1066 //$('body').removeClass('ubbaccessibility-readable-font'); 1067 $("body").removeClass(function (index, className) { 1068 return (className.match(/\bubbaccessibility-\S+/g) || []).join(' '); 1069 });
1070 }); 1071 1072}); 1073 1074/* ======================================================== END ACCESSIBILITY ======================*/ 1075 1076/* ======================================================== SLIDER ======================*/ 1077 1078$(document).ready(function () { 1079 var width_anunturi_news_ = $('#anunt').width() - 50; 1080 $('.anunturi_news_').css('max-width', width_anunturi_news_); 1081}); 1082$(window).on('resize', function () { 1083 var width_anunturi_news_ = $('#anunt').width() - 50; 1084 console.log('width_anunturi_news_', width_anunturi_news_); 1085 $('.anunturi_news_').css('max-width', width_anunturi_news_); 1086}); 1087 1088/* ======================================================== OPEN SPECIFIC TAB - TAXE ======================*/ 1089$(document).ready(function () { 1090let searchParams = new URLSearchParams(window.location.search); 1091// parametru URL t - open specifiv tab 1092if (searchParams.has('t')) { 1093 var tab_param = searchParams.get('t'); 1094 var tab_button = document.getElementById(tab_param); 1095 console.log(tab_button); 1096 tab_button.classList.toggle("collapsible_active"); 1097 var tab_panel = tab_button.nextElementSibling; 1098 if (tab_panel.style.maxHeight) { 1099 tab_panel.style.maxHeight = null; 1100 } else { 1101 tab_panel.style.maxHeight = tab_panel.scrollHeight + "px"; 1102 $('html, body').animate({ 1103 scrollTop: $(tab_button).offset().top - (160) 1104 }, 600); 1105 } 1106 1107} 1108}); 1109 1110/* ======================================================== RESPONSIVE -TABLE ======================*/ 1111$(document).ready(function () { 1112 $('table').wrap('<div style="overflow-x:auto;"></div>'); 1113 1114}); 1115 1116/*ACTE DE STUDII expand panel*/ 1117$(document).ready(function(){console.log("ready"); 1118 $(".anchor_modalitati_plata_taxe").on("click",function(e){ 1119 e.preventDefault(); 1120 console.log("click",$("#modalitati_plata_taxe").hasClass("collapsible_active"),$("#modalitati_plata_taxe").offset().top); 1121 $('html, body').animate({ 1122 scrollTop: $("#modalitati_plata_taxe").offset().top 1123 }, 600); 1124 if(!$("#modalitati_plata_taxe").hasClass("collapsible_active")) 1125 $("#modalitati_plata_taxe").trigger("click"); 1126 1127 }) 1128})
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.