var accentMap = { "á": "a", "é": "e", "ó": "o", "ő": "o", "ö": "o", "í": "i", "ú": "u", "ü": "u", "ű": "u", "ă": "a", "î": "i", "â": "a", "ș": "s", "ț": "t" }; var normalize = function (term) { var ret = ""; for (var i = 0; i < term.length; i++) { ret += accentMap[ term.charAt(i) ] || term.charAt(i); } return ret; }; function autocomplet($search, names) { var contentHeight = $(window).height() - 68, contentWidth = $(window).width(); $($search).autocomplete({ open: function() {if(contentWidth <= 670){$('.ui-autocomplete').css({'max-height':contentHeight,'overflow-y':'auto','overflow-x':'hidden'})}}, source: function (request, response) { var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response($.grep(names, function (value) { value = value.label || value.value || value; return matcher.test(value) || matcher.test(normalize(value)); })); }, minLength: 2, change: function (event, ui) { if (this.onchange){ this.onchange(); } } }); } function autocomplet2($search, names) { var contentHeight = $(window).height() - 68, contentWidth = $(window).width(); $($search).autocomplete({ open: function() {if(contentWidth <= 670){$('.ui-autocomplete').css({'max-height':contentHeight,'overflow-y':'auto','overflow-x':'hidden'})}}, source: function (request, response) { var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response($.grep(names, function (value) { value = value.label || value.value || value; return matcher.test(value) || matcher.test(normalize(value)); })); }, minLength: 3, change: function (event, ui) { if (this.onchange){ this.onchange(); } } }); }var elementList = ['searchtext_nr'], separatorList = [''], mobileMax = 655, searchBarWidth = 635, searchBarDiff = 130, mobileMenuDiff = $('#search').height() + 136, element_clickCount = 0, screenHeight = $(window).height(), screenWidth = $(window).width(), element_int; if(screenWidth <= mobileMax){ var MenuHeight = screenHeight - mobileMenuDiff, mobileSearchWidth = screenWidth - searchBarDiff; }else{ var mobileSearchWidth = searchBarWidth, MenuHeight = screenHeight - mobileMenuDiff; } $("#mobile_menu_logo").attr("data-chckd","false"); $("#mobile_search_container, #search_shadow").css("width",mobileSearchWidth); $(".mobile_ext_menu_int").css("height",MenuHeight); $(window).on('resize', function(){ var screenHeight = $(window).height(), screenWidth = $(window).width(), MenuHeight, mobileSearchWidth; if(screenWidth <= mobileMax){ MenuHeight = screenHeight - mobileMenuDiff, mobileSearchWidth = screenWidth - searchBarDiff; if($("#mobile_menu_logo").attr("data-chckd")=="true"){ $('.page').width($(window).width()); $('#mobile_menu').css('display','inherit'); $('body').css('overflow-x','hidden'); $('.page_background, .two_color_bg').width('calc(100% - 200px)'); } }else{ $(".page_background, .page, .googleMap").css("width",""); $("#mapcontainer, .googleMap").css("width","100%"); $('#mobile_menu').css('display',''); $('.floatleft_box, .not_found').width(''); mobileSearchWidth = searchBarWidth; } $(".ui-autocomplete").css("max-height","100%"); $("#mobile_search_container, #search_shadow").css("width",mobileSearchWidth); }); function animate_mobile_menu(){ $('#mobile_menu_logo').attr('onclick',''); if ($("#mobile_menu_logo").attr("data-chckd")=="false"){ $('body').css('overflow-x','hidden'); $('#mobile_menu').css('display','inherit'); $('.page').width($(window).width()); $('.two_color_bg').animate({ "left": "+=200px" }, 500); $('.page_background').animate({ width: ($(window).width() - 200) + 'px'}, 500, function (){ $('body').css('overflow-x','hidden'); $('.page_background, .two_color_bg').width('calc(100% - 200px)'); $('.page').width($(window).width()); complete:$('#mobile_menu_logo').attr('onclick','animate_mobile_menu()'); complete:$('#mobile_menu_logo').attr("data-chckd","true"); }); $('.floatleft_box, .not_found').width($(window).width()); $('#mapcontainer').animate({width: ($(window).width() - 200) + 'px'}, 500,function () { $('#mapcontainer').width('calc(100% - 200px)'); }); }else if($("#mobile_menu_logo").attr("data-chckd")=="true"){ $('.page').width($(window).width()); $('.two_color_bg').animate({ "left": "-=200px" }, 500); $('.page_background').animate({ width: ($(window).width()) + 'px'}, 500,function () { $('.page_background, .page').width(''); $('.two_color_bg').width('100%'); complete:$('#mobile_menu').css('display','none'); complete:$('body').css({'overflow-x':'','background':''}); complete:$('#mobile_menu_logo').attr('onclick','animate_mobile_menu()'); complete:$('#mobile_menu_logo').attr("data-chckd","false"); }); $('.floatleft_box, .not_found').width($(window).width()); $('#mapcontainer').animate({width: ($(window).width()) + 'px'}, 500,function () { $('#mapcontainer').width('100%'); complete:$('.floatleft_box, .not_found').width(''); complete:$('#mobile_menu').css('display','none'); complete:$('#mobile_menu_logo').attr('onclick','animate_mobile_menu()'); }); } } $(window).load(function(){ if(screenWidth <= mobileMax){ $(window).on("scroll",function(){ $('.categories_background').css('background','#d3d3d3 url("https://dosarejustitie.ro/includes/background_categories.jpg") no-repeat center top'); $('.footer_background').css('background','#595959 url("https://dosarejustitie.ro/includes/background_footer.jpg") center top no-repeat'); setTimeout(function(){ $('.gpse').append('
Caută mai multe date oficiale:


'); },1000); setTimeout(function(){ $('.footer_fb').append('
datascop.ro
') },3000); $(window).off("scroll") }) }else{ $('.gpse').append('
Caută mai multe date oficiale:


'); $('.footer_fb').append('
datascop.ro
'); $('.categories_background').css('background','#d3d3d3 url("https://dosarejustitie.ro/includes/background_categories.jpg") no-repeat center top'); $('.footer_background').css('background','#595959 url("https://dosarejustitie.ro/includes/background_footer.jpg") center top no-repeat') } });