1// navigator.sayswho= (function(){ 2 // var ua= navigator.userAgent; 3 // var tem; 4 // var M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; 5 // if(/trident/i.test(M[1])){ 6 // tem= /\brv[ :]+(\d+)/g.exec(ua) || []; 7 // return 'IE '+(tem[1] || ''); 8 // } 9 // if(M[1]=== 'Chrome'){ 10 // tem= ua.match(/\b(OPR|Edge)\/(\d+)/); 11 // if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera'); 12 // } 13 // M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; 14 // if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]); 15 // return M.join(' '); 16// })(); 17 18// alert(navigator.sayswho); 19 20 var scroll_pos = 0; 21 var height_banner_scroll = 200; 22 var page_body_width = window.innerWidth; 23 // console.log('page_body', page_body_width); 24 25 //øèðèíà îòîáðàæåíèÿ êîíòåíòà 26 function func_page_body_width(){ 27 page_body_width = window.innerWidth; 28 // console.log('page_body', page_body_width); 29 }; 30 $(window).resize('resize', func_page_body_width); 31 32$(document).ready(function () { 33 34 //Èçîáðàæåíèå âèêòîðèíû\ãîëîñîâàíèÿ 35 function func_quiz_img_size() { 36 let quiz_img_width = $(".title_quiz_img ").innerWidth(); 37 quiz_img_height = quiz_img_width * 186 / 420; 38 $('.title_quiz_img').css('height', Math.round(quiz_img_height) + 'px' ); 39 40 }; 41 42 func_quiz_img_size(); 43 $(window).resize('resize', func_quiz_img_size); 44 45 46 47 48 //ñèíåå áîêîâîå ìåíþ ñ èêîíêàìè 49 function func_top_right_icons() { 50 setTimeout(function(){ 51 var top_right_icons = $(".block_header").height(); 52 top_right_icons = top_right_icons + 20; 53 $(".block_right_blue_buttons").css({'top': top_right_icons + 'px', 'transition': 'all 0.3s linear'}); 54 }, 500); 55 }; 56 57 $(document).on( 'scroll', func_top_right_icons); 58 $(window).resize('resize', func_top_right_icons); 59 60 $(window).scroll(function() { 61 scroll_pos = $(document).scrollTop(); 62 var right_icons_height_hide = $(".footer_copyright_join").height(); 63 var raznica= $(document).height() - scroll_pos - $(window).height(); 64 65 if (raznica <= (right_icons_height_hide + 50)) { 66 $(".block_right_blue_buttons").addClass('block_right_blue_buttons_hide'); 67 } 68 else{ 69 $(".block_right_blue_buttons").removeClass('block_right_blue_buttons_hide'); 70 } 71 }); 72 73 //Îãðàíè÷åíèå ïîêàçà ñèìâîëîâ â íîâîñòè 74 if (document.querySelector('.main_page')) { 75 $(".block_single_news_text").text(function(i, text) { 76 if (text.length >= 250) { 77 text = text.substring(0, 250); 78 var lastIndex = text.lastIndexOf(" "); // ïîçèöèÿ ïîñëåäíåãî ïðîáåëà 79 text = text.substring(0, lastIndex) + '...'; // îáðåçàåì äî ïîñëåäíåãî ñëîâà 80 } 81 82 $(this).text(text); 83 84 }); 85 }; 86 //êíîïêà ââåðõ 87 88 var button_right_calc = $('.button_up').css('right'); 89 90 function button_right_calc_func() { 91 if (page_body_width > 1800){ 92 button_right_calc = $(window).width() - $('.block_all_page').width(); 93 button_right_calc = button_right_calc/2 94 95 $(".button_up").css('right', button_right_calc); 96 } 97 }; 98 99 $(window).scroll(function() { 100 101 if ( $(document).scrollTop() > 300) { 102 button_right_calc_func() 103 $(".button_up").removeClass('button_up_hide'); 104 } 105 else{ 106 $('.button_up').addClass('button_up_hide'); 107 } 108 }); 109 110 111 112 113 $('.button_up').on('click', function() { 114 window.scrollTo({top: 0, behavior: 'smooth'}); 115 }); 116 117 $(window).resize('resize', button_right_calc_func); 118 119 //ñòàòè÷íûå áàííåðû, øèðèíà ïî âåáèíàðàì 120 121 122 123 function func_vebinar_width() { 124 var vebinar_width = $(".block_center_vnim_tiles").innerWidth(); 125 vebinar_width = vebinar_width - 30 126 $('.block_static_banner').css('width', vebinar_width + 'px' ); 127 128 }; 129 130 func_vebinar_width(); 131 $(window).resize('resize', func_vebinar_width); 132 133 134 //ñèíåå ìåíþ ïðè ñêðîëëå 135 136 function hide_blue_menu() { 137 // console.log(scroll_pos); 138 139 140 scroll_pos = $(this).scrollTop(); 141 if (scroll_pos > height_banner_scroll) { 142 $('.block_head_blue_menu').addClass('hide_blue_menu'); 143 144 $('.block_head').addClass('head_height_after_scroll_hide'); 145
146 $('.block_title').addClass('block_title_scroll'); 147 } 148 else{ 149 $('.block_head_blue_menu').removeClass('hide_blue_menu'); 150 151 $('.block_head').removeClass('head_height_after_scroll_hide'); 152 153 $('.block_title').removeClass('block_title_scroll'); 154 } 155 156 157 158 159 160 }; 161 hide_blue_menu(); 162 window.addEventListener('scroll', hide_blue_menu) 163 164 165 //äëÿ ìåíþ 166 167 168 169//ïóíêòû ìåíþ âåðòèêàëüíîå îòêðûòèå 170$('.one_unit_arrow_box').bind({ 171 "click": function(){ 172 var idhref = $(this).attr('id'); 173 // console.log("idhref =", idhref); 174 $('.unit_one_box').animate({height: 'hide'}, 500); 175 $('.one_unit_arrow').addClass("arrow_close"); 176 $('.one_unit_arrow').removeClass("arrow_open"); 177 $('.one_unit_title').removeClass("text_blue"); 178 179 180 if ($('#box_'+idhref).css('display') == 'none') { 181 // console.log("box_" + idhref); 182 $('#box_'+idhref).animate({height: 'show'}, 500); 183 $('#'+idhref+' .one_unit_arrow').addClass("arrow_open"); 184 $('#'+idhref+' .one_unit_arrow').removeClass("arrow_close"); 185 $('#'+idhref+' .one_unit_title').addClass("text_blue"); 186 187 } else { 188 $('#'+idhref+' .one_unit_arrow').addClass("arrow_close"); 189 $('#'+idhref+' .one_unit_arrow').removeClass("arrow_open"); 190 $('#box_'+idhref).animate({height: 'hide'}, 500); 191 } 192 193 } 194}); 195 196 197//Ìåíþ ðàñïîëîæåíèå èêîíîê, åñëè àâòîðèçàöèÿ 198 199function log_out_icon(){ 200 if (document.querySelector('.log_out.icon_size')){ 201 $('.block_top_icons .search').css('right','130px'); 202 $('.block_top_icons .bell').css('right','90px'); 203 $('.block_top_icons .user').css('right','50px'); 204 } 205} 206 207log_out_icon(); 208 209//îòêðûòèå ìåíþ 210$('.block_top_icons .list').bind({ 211 "click": function(){ 212 $('.block_left_menu_all').removeClass('block_left_menu_all_close'); 213 $('.block_left_menu_all').addClass('block_left_menu_all_open'); 214 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 215 $('body').addClass('no_scroll_all_page'); 216 } 217}); 218 219 220//çàêðûòèå ìåíþ 221$('.menu_close_button').bind({ 222 "click": function(){ 223 $('.block_left_menu_all').removeClass('block_left_menu_all_open'); 224 $('.block_left_menu_all').addClass('block_left_menu_all_close'); 225 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 226 $('body').removeClass('no_scroll_all_page'); 227 } 228}); 229 230 231 //îòêðûòèå ïîèñêà 232$('.block_top_icons .search').bind({ 233 "click": function(){ 234 $('.block_search_all').removeClass('block_seach_hide'); 235 $('.block_search_all').addClass('block_seach_show'); 236 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 237 $('body').addClass('no_scroll_all_page'); 238 } 239}); 240 241 242$('.form_close_button').bind({ 243 "click": function(){ 244 $('.block_search_all').addClass('block_seach_hide'); 245 $('.block_search_all').removeClass('block_seach_show'); 246 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 247 $('body').removeClass('no_scroll_all_page'); 248 } 249}); 250 251 252 //çàêðûòü âñ¸ 253$('.dark_layer_blocker').bind({ 254 "click": function(){ 255 hide_all_opens(); 256 hide_filter(); 257 } 258}); 259 260 $(window).resize('resize', function () { 261 let auth_1 = document.getElementById("id_auth_lich_kab").classList.contains('show'); 262 let auth_2 = false; 263 let auth_3 = false; 264 if (document.querySelector('.block_auth_lich_kab.vebinar_window.show')){ 265 auth_2 = true; 266 } 267 if (document.querySelector('.block_auth_lich_kab.vebinar_window_reg.show')){ 268 auth_3 = true; 269 } 270 if ((auth_1 === true) || (auth_2 === true) || (auth_3 === true) ){ 271 } 272 else{ 273 hide_all_opens(); 274 } 275 hide_filter(); 276 }); 277 278 279 280function hide_all_opens(){ 281 $('.block_left_menu_all').removeClass('block_left_menu_all_open'); 282 $('.block_left_menu_all').addClass('block_left_menu_all_close'); 283 $('body').removeClass('no_scroll_all_page'); 284 $('.block_search_all').addClass('block_seach_hide'); 285 $('.block_search_all').removeClass('block_seach_show'); 286 $('.block_news_razdel_menu').removeClass('block_news_razdel_menu_open'); 287 288 $('.handle').removeClass('show'); 289 $('.block_lk_razdel_menu').removeClass('show_menu'); 290 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 291 $('.handle_catalog').removeClass('show'); 292 $('.block_catalog_menu_inner').removeClass('show_menu'); 293 294 295 $('.frame_show_big_image').css('display','none'); 296 $('.handle_catalog_onas').removeClass('show'); 297 $('.block_buttons_razdel').removeClass('show_menu'); 298 299 300 $('#id_auth_lich_kab').removeClass('show'); 301 $('.block_subscribe_popup').removeClass('show'); 302 $('.block_auth_lich_kab.vebinar_window').removeClass('show'); 303 $('.block_auth_lich_kab.vebinar_window_reg').removeClass('show'); 304 305 $('.vebinar_window_reg .block_inner').removeAttr('style'); 306 $('.vebinar_window_reg .block_successfully').removeAttr('style'); 307}; 308 309 310 311 312//îòêðûòèå ìåíþ â ëè÷íîì êàáèíåòå 313$('.handle').bind({ 314 "click": function(){ 315 $('.handle').toggleClass('show'); 316 $('.block_lk_razdel_menu').toggleClass('show_menu'); 317 $('.dark_layer_blocker').toggleClass('show_dark_layer_blocker'); 318 $('body').toggleClass('no_scroll_all_`'); 319 } 320}); 321 322 323 324 325 326 327 328 329 330 331 332 333 334 //îòêðûâàþùååñÿ ìåíþ footer 335 336 337$('.footer_column_row').bind({ 338 "click": function(){ 339 if (page_body_width <= 900){ 340 let idhref = $(this).attr('id'); 341 $('.footer_single_text_box').animate({height: 'hide'}, 500); 342 $('.footer_arrow').removeClass("footer_arrow_open"); 343 344 345 if ($('#box_'+idhref).css('display') == 'none') { 346 $('#box_'+idhref).animate({height: 'show'}, 500); 347 $('#'+idhref+' .footer_arrow').addClass("footer_arrow_open"); 348 349 } else { 350 $('#'+idhref+' .footer_arrow').removeClass("footer_arrow_open"); 351 $('#box_'+idhref).animate({height: 'hide'}, 500); 352 } 353 }else{ 354 355 }; 356
357 } 358}); 359 360$(window).on('resize', function(){ 361 if (page_body_width > 900 ){ 362 $(".footer_arrow_open").removeClass("footer_arrow_open"); 363 $('.footer_single_text_box').css('display', 'block') 364 } 365 if (page_body_width <= 900){ 366 $(".footer_arrow_open").removeClass("footer_arrow_open"); 367 $('.footer_single_text_box').css('display', 'none') 368 } 369 370}); 371 372 373 374 375 //áàííåð ïåðâûé. ðàñ÷åò âûñîòû îòíîñèòåëüíî øèðèíû îòîáðàæåíèÿ 376 377 function block_banner_height() { 378 var block_banner_w = $(".block_banner").outerWidth(); 379 380 // if (page_body_width > 768) { 381 var block_banner_h = block_banner_w * 46 / 180; 382 // } 383 // if (page_body_width > 500 && page_body_width <= 768) { 384 // var block_banner_h = block_banner_w * 239 / 728; 385 // } 386 // if (page_body_width > 0 && page_body_width <= 500) { 387 // var block_banner_h = block_banner_w * 33 / 48; 388 // } 389 390 391 392 $('.mySwiper_banner .swiper-wrapper').css('height', block_banner_h + 'px' ); 393 $('.mySwiper_banner .swiper-slide').css('height', block_banner_h + 'px' ); 394 395 }; 396 block_banner_height(); 397 $(window).resize('resize', block_banner_height); 398 399 400 //Áàííåð íà ñòðàíèöå ýëåêòðîííûõ ðåñóðñîâ 401 402 function block_banner_el_res_height() { 403 var block_banner_w = $(".block_banner_el_res").outerWidth(); 404 405 var block_banner_h = block_banner_w * 20 / 134; 406 407 $('.mySwiper_banner_el_res .swiper-wrapper').css('height', block_banner_h + 'px' ); 408 $('.mySwiper_banner_el_res .swiper-slide').css('height', block_banner_h + 'px' ); 409 410 }; 411 block_banner_el_res_height(); 412 $(window).resize('resize', block_banner_el_res_height); 413 414 415 //Èíòåðåñíî è ïîëåçíî âûñîòà èçîáðàæåíèé 416 417 function block_interesno_polezno_tile_height() { 418 var block_interesno_polezno_tile_w = $(".block_interesno_polezno_tile").outerWidth(); 419 var block_interesno_polezno_tile_h = block_interesno_polezno_tile_w * 43 / 46; 420 $('.block_interesno_polezno_tile').css('height', block_interesno_polezno_tile_h + 'px' ); 421 422 423 }; 424 setTimeout(block_interesno_polezno_tile_height, 100); 425 $(window).resize('resize',function(){ 426 setTimeout(block_interesno_polezno_tile_height, 200) 427 }); 428 429 430 431 432 433 // Ñêðèïòû àêòóàëüíûå âåáèíàðû, åñëè åñòü êíîïêà ïðèñîåäèíèòüñÿ 434 435 436 //ðàçìåð áàííåðà íà ñòðàíèöå 437 438 439 440 441 442 // Âûñîòà áàííåðà íà ñòðàíèöå âåáèíàðîâ 443 function vebinar_banner_relevant_height() { 444 var vebinar_banner_relevant_w = $(".vebinar_banner_relevant").outerWidth(); 445 446 if (page_body_width > 600) { 447 var vebinar_banner_relevant_h = vebinar_banner_relevant_w * 162 / 1030; 448 // console.log('page_body_width', page_body_width); 449 } 450 if (page_body_width > 0 && page_body_width <= 600) { 451 var vebinar_banner_relevant_h = vebinar_banner_relevant_w * 197 / 320; 452 } 453 454 // console.log('vebinar_banner_relevant_h', vebinar_banner_relevant_h); 455 vebinar_banner_relevant_h= Math.round(vebinar_banner_relevant_h); 456 $('.vebinar_banner_relevant').css('height', vebinar_banner_relevant_h + 'px' ); 457 458 }; 459 setTimeout(vebinar_banner_relevant_height, 100); 460 $(window).resize('resize', vebinar_banner_relevant_height); 461 462 463 464 465 // Ïîäåëèòüñÿ â ñîö ñåòÿõ ïîçèöèîíèðîâàíèå îòíîñèòåëüíî öåíòðà ñèíåé êíîïêè 466 467 468 if (document.querySelector('.button_join_vebinar')) { 469 470 function func_block_icons_share() { 471 // console.log('page_body_width', page_body_width); 472 if (page_body_width > 1500) { 473 let element = document.getElementsByClassName('button_join_vebinar'); 474 let element_2 = document.getElementsByClassName('block_all_page'); 475 476 let x_elem = element[0].offsetLeft - 50; 477 let x_elem_2 = element_2[0].offsetLeft - 50; 478 479 480 // console.log('button_join_vebinar', x_elem); 481 x_elem = x_elem - x_elem_2; 482 483 // console.log('button_join_vebinar', x_elem); 484 // console.log('x_elem', x_elem) 485 486 let block_width_1 = $(".button_join_vebinar").innerWidth(); 487 let block_width_2 = $(".block_icons_share_zag").innerWidth(); 488 489 x_elem = x_elem + ((block_width_1 - block_width_2) /2); 490 491 // console.log('block_width_1', block_width_1); 492 493 $('.block_icons_share').css({ 494 'margin-left': x_elem + 'px', 495 'display' : 'inline-block' 496 497 }); 498 } 499 else{ // console.log('x_elem', x_elem) 500 x_elem = 0; 501 $('.block_icons_share').css({ 502 'margin-left': x_elem + 'px', 503 'display' : 'block' 504 505 }); 506 } 507 }; 508 509 510 $(window).resize('resize', func_block_icons_share); 511 setTimeout(func_block_icons_share, 100); 512 } 513 514 // Ïîäåëèòüñÿ â ñîö ñåòÿõ ïîçèöèîíèðîâàíèå îòíîñèòåëüíî öåíòðà ïðàâîãî áëîêà 515 516 517 518 519 520 // Ïîäåëèòüñÿ â ñîö ñåòÿõ ïîçèöèîíèðîâàíèå îòíîñèòåëüíî öåíòðà áëîêà íîâîñòåé 521 522 523 if (document.querySelector('.block_icons_share_fix')) { 524 525 function func_block_icons_share_news() { 526 if (page_body_width > 1280) { 527 let block_width_1 = $(".block_all_page").innerWidth(); 528 let block_width_2 = $(".block_left_dop").innerWidth(); 529 530 let x_elem = block_width_1 - block_width_2; 531 x_elem = x_elem / 2; 532 x_elem = x_elem + block_width_2; 533 534 x_elem_2 = $(".block_icons_share_zag").innerWidth(); 535 x_elem_2 = x_elem_2 /2; 536 537 x_elem = x_elem - x_elem_2; 538 // console.log('x_elem_2', x_elem_2); 539 // console.log('block_width_1', block_width_1); 540 // console.log('block_width_2', block_width_2); 541 542 $('.block_icons_share').css({ 543 'margin-left': x_elem + 'px', 544 // 'display' : 'inline-block' 545 }); 546 } 547 else{ 548 x_elem = 0; 549 $('.block_icons_share').css({ 550 'margin-left': x_elem + 'px', 551 'display' : 'block' 552 553 }); 554 } 555 }; 556 557 558 $(window).resize('resize', func_block_icons_share_news); 559 setTimeout(func_block_icons_share_news, 150); 560 } 561 562 563 564 565 566 // Ïîäåëèòüñÿ â ñîö ñåòÿõ ïîçèöèîíèðîâàíèå îòíîñèòåëüíî öåíòðà áëîêà àðõèâíûõ âåá
566èíàðîâ 567 568 569 570 if (document.querySelector('.block_vebinar_archive_card')) { 571 572 function func_block_icons_share() { 573 if (page_body_width > 1500) { 574 let element = document.getElementsByClassName('block_vebinar_archive_card'); 575 let element_2 = document.getElementsByClassName('block_all_page'); 576 577 578 let x_elem = element[0].offsetLeft - 50; 579 let x_elem_2 = element_2[0].offsetLeft - 50; 580 581 582 x_elem = x_elem - x_elem_2; 583 584 585 // console.log('x_elem', x_elem); 586 587 let block_width_1 = $(".block_vebinar_archive_card").innerWidth(); 588 let block_width_2 = $(".block_icons_share_zag").innerWidth(); 589 590 x_elem = x_elem + (block_width_1 - block_width_2) /2 591 592 // console.log('block_width_1', block_width_1); 593 594 $('.block_icons_share').css({ 595 'margin-left': x_elem + 'px', 596 'display' : 'inline-block' 597 598 }); 599 } 600 else{ 601 x_elem = 0; 602 $('.block_icons_share').css({ 603 'margin-left': x_elem + 'px', 604 'display' : 'block' 605 606 }); 607 } 608 }; 609 610 611 $(window).resize('resize', func_block_icons_share); 612 setTimeout(func_block_icons_share, 50); 613 } 614 615 616 617 // Ïîäåëèòüñÿ â ñîö ñåòÿõ ïîçèöèîíèðîâàíèå îòíîñèòåëüíî ïðàâîãî áëîêà ñòðàíèöû ïðåäìåòîâ 618 619 620 621 if (document.querySelector('.predmety_area')) { 622 623 function func_block_icons_share() { 624 if (page_body_width > 1200) { 625 let element = document.getElementsByClassName('predmety_area'); 626 let element_2 = document.getElementsByClassName('block_all_page'); 627 628 629 let x_elem = element[0].offsetLeft - 0; 630 let x_elem_2 = element_2[0].offsetLeft - 50; 631 632 633 x_elem = x_elem - x_elem_2; 634 635 636 // console.log('x_elem', x_elem); 637 638 let block_width_1 = $(".predmety_area").innerWidth(); 639 let block_width_2 = $(".block_icons_share_zag").innerWidth(); 640 641 x_elem = x_elem + (block_width_1 - block_width_2) /2 642 643 // console.log('block_width_1', block_width_1); 644 645 $('.block_icons_share').css({ 646 'margin-left': x_elem + 'px', 647 'display' : 'inline-block' 648 649 }); 650 } 651 else{ 652 x_elem = 0; 653 $('.block_icons_share').css({ 654 'margin-left': x_elem + 'px', 655 'display' : 'block' 656 657 }); 658 } 659 }; 660 661 662 $(window).resize('resize', func_block_icons_share); 663 setTimeout(func_block_icons_share, 50); 664 } 665 666 667 668 669 670 671 672// Ôèëüòðû ïîêàç îêíà ïðè íàâåäåíèè 673 674 675 //îáëàñòü ïîêàçà âñïëûâàþùåãî îêíà ôèëüòðîâ â ïîëíîýêðàííîì ðåæèìå 676 677var coordinate_zag; 678var elem_id; 679 680 681 function vebinar_archive_filter_point_area_width(){ 682 $(".vebinar_archive_filter_point_area").css({'margin-top': '0px'}); 683 if ((page_body_width > 1200) && (document.querySelector('.vebinar_archive_filter_box_zag_point'))){ 684 let elem_width; 685 if(document.querySelector('.block_subs_proj')){ 686 elem_width = $(".block_all_page").outerWidth() - $(".block_catalog_area_left").outerWidth() - $(".block_right_blue_buttons").outerWidth() + 20; 687 // console.log('elem_width',elem_width); 688 } 689 else{ 690 elem_width = $(".block_all_page").outerWidth() - $(".relevant_vebinar_main_left").outerWidth() - $(".block_right_blue_buttons").outerWidth() + 20; 691 } 692 $(".vebinar_archive_filter_point_area").css({'width': elem_width + 'px'}); 693 694 695 let numb_column = elem_width / 3; 696 697 //Ñ÷èòàþ âåðèòèêàëüíûé ñäâèã âñïëûâàþùåãî ìåíþ, ÷òîáû áûëî â îáëàñòè ïîêàçà 698 let block_head_height = $('.block_head').outerHeight(); 699 700 let sdvig_top = coordinate_zag.top; 701 sdvig_top = sdvig_top - block_head_height; 702 703 704 let height_area = $('#show_' + elem_id).outerHeight() / 2; 705 let all_screen_height = document.documentElement.clientHeight; 706 all_screen_height = all_screen_height - block_head_height; 707 let height_area_zag = $('.vebinar_archive_filter_box_zag_point').outerHeight() 708 709 let sdvig_bottom = all_screen_height - sdvig_top - height_area_zag; 710 let margin_top; 711 // console.log('sdvig_top', sdvig_top); 712 // console.log('sdvig_bottom', sdvig_bottom); 713 // console.log('height_area', height_area); 714 // console.log('all_screen_height', all_screen_height); 715 716 if ((all_screen_height > height_area * 2) && (sdvig_top > height_area ) && (sdvig_bottom > height_area )){ 717 // console.log('óñëîâèå 1'); 718 margin_top = height_area; 719 $(".vebinar_archive_filter_point_area").css({'margin-top': '-'+ height_area + 'px'}); 720 } 721 else if ((all_screen_height > height_area * 2) && (sdvig_top < height_area ) && (sdvig_bottom > height_area )){ 722 // console.log('óñëîâèå 2'); 723 margin_top = sdvig_top + height_area_zag - 5; 724 $(".vebinar_archive_filter_point_area").css({'margin-top': '-'+ margin_top + 'px'}); 725 } 726 else if ((all_screen_height > height_area * 2) && (sdvig_top > height_area ) && (sdvig_bottom < height_area )){ 727 // console.log('óñëîâèå 3'); 728 margin_top = height_area * 2 - sdvig_bottom + 5; 729 $(".vebinar_archive_filter_point_area").css({'margin-top': '-'+ margin_top + 'px'}); 730 } 731 else{ 732 // console.log('óñëîâèå else'); 733 margin_top = sdvig_top + height_area_zag - 5; 734 $(".vebinar_archive_filter_point_area").css({'margin-top': '-'+ margin_top + 'px'}); 735 } 736 } 737 }; 738 739 // $(window).resize('resize', vebinar_archive_filter_point_area_width); 740$(window).on('resize', function(){ 741 $(".vebinar_archive_filter_point_area").css({'margin-top': '0px'}); 742 $(".vebinar_archive_filter_point_area").css({'width': 'auto'}); 743}); 744 745 746 747$('.vebinar_archive_filter_box_zag_point').bind({ 748 "mouseenter ": function(){ 749 if (page_body_width > 1200) { 750 coordinate_zag = this.getBoundingClientRect(); 751 elem_id = undefined; 752 let div_show = null; 753 elem_id = $(this).attr("ID"); 754 vebinar_archive_filter_point_area_width(); 755 $('#show_' + elem_id).show(); 756 757 $('#show_' + elem_id).bind({ 758 "mouseenter": function(){ 759 if (page_body_width > 1200) { 760 $('#show_' + elem_id).show(); 761 } 762 }, 763 "mouseleave": function(){ 764 if (page_body_width > 1200) { 765 $('#show_' + elem_id).hide(); 766 } 767 }, 768 }); 769 770 771 772 } 773 else{ 774 775 } 776 }, 777 "mouseleave": function(){ 778 if (page_body_width > 1200) { 779 elem_id = $(this).attr("ID"); 780 $('#show_' + elem_id).hide(); 781 } 782 } 783 784}); 785 786$('.point_area').bind({ 787 "click ": function(){ 788 let elem_id_area = $(this).parent().parent().attr("ID") 789 elem_id_area = elem_id_area.replace("show_", ""); 790 if (this.classList.contains('point_area_choosen')){ 791 if (document.querySelector('.block_show_catalog')){ 792 func_clear_archive_filter(); 793 }else{ 794 func_clear_filter_subs(); 795 } 796 797 if (document.querySelector('.block_predmet_menu_left')){ 798 $('.block_blue_border').removeClass('hide'); 799 } 800 801 } 802 else{ 803 if (document.querySelector('#vebinar_filter_tag_show')){ 804 document.getElementById("vebinar_filter_tag_show").innerHTML = ""; 805 } 806 $(".vebinar_archive_filter_box_zag_point").removeClass("vebinar_archive_filter_box_zag_point_choosen"); 807 $(".point_area").removeClass("point_area_choosen"); 808 $(".vebinar_archive_filter_roli_point").removeClass("roli_point_choosen"); 809 810 811 $('#' + elem_id_area).addClass('vebinar_archive_filter_box_zag_point_choosen'); 812 $(this).addClass('point_area_choosen'); 813 814 815 let print_img_class = $('.point_area_choosen').find(".point_area_img").children()[0].classList.item(0); 816 let print_img = $('.' + print_img_class).css("background-image"); 817 print_img = print_img.replace('url(','').replace(')','').replace(/\"/gi, ""); 818 print_img = "<div class='class_icon_predmety' style=' background-image: url(" + print_img + "); '></div>"; 819 820 821 let print_elem = $('.point_area_choosen').children()[1].innerText; 822 print_elem = "<div style='position:relative; display:table-cell; vertical-align:middle; padding-left:10px;'>" + print_elem + "</div>"; 823 let print_block; 824 if (document.querySelector('.block_predmet_menu_left')){ 825 print_block = "<div style='display:table; margin-top:-25px;'>" + print_img + print_elem + "</div>"; 826 } 827 else{ 828 print_block = "<div style='display:table;'>" + print_img + print_elem + "</div>"; 829 } 830 831 if (document.querySelector('#vebinar_filter_tag_show')){ 832 div_show = document.getElementById('vebinar_filter_tag_show'); 833 div_show.innerHTML += print_block; 834 } 835 836 if (document.querySelector('.block_predmet_menu_left')){ 837 $('.block_blue_border').addClass('hide'); 838 } 839 840 } 841 842 }, 843}); 844 845 846 847$('.vebinar_archive_filter_roli_point').bind({ 848 "click ": function(){ 849 if (this.classList.contains('roli_point_choosen')){ 850 func_clear_archive_filter(); 851 } 852 else{ 853 document.getElementById("vebinar_filter_tag_show").innerHTML = ""; 854 $(".vebinar_archive_filter_box_zag_point").removeClass("vebinar_archive_filter_box_zag_point_choosen"); 855 $(".point_area").removeClass("point_area_choosen"); 856 $(".vebinar_archive_filter_roli_point").removeClass("roli_point_choosen"); 857 858 $(this).addClass('roli_point_choosen'); 859 let print_elem = $('.roli_point_choosen').children()[0].innerText; 860 div_show = document.getElementById('vebinar_filter_tag_show'); 861 div_show.innerHTML += print_elem; 862 } 863 } 864 865}); 866 867 868 869 870 871 872 // î÷èñòèòü âûáîð ôèëüòðà 873 function func_clear_archive_filter(){ 874 875 // if (document.querySelector('.block_predmet_menu_left')){ 876 // document.getElementById("vebinar_filter_tag_show").innerHTML = "Íîâèíêè"; 877 // } 878 // else{ 879 // document.getElementById("vebinar_filter_tag_show").innerHTML = ""; 880 // } 881 882 883 $(".vebinar_archive_filter_box_zag_point").removeClass("vebinar_archive_filter_box_zag_point_choosen"); 884 $(".point_area").removeClass("point_area_choosen"); 885 $(".vebinar_archive_filter_roli_point").removeClass("roli_point_choosen"); 886 }; 887 888 $('.clear_achive_filter').click(func_clear_archive_filter); 889 890 891 892 // î÷èñòèòü âûáîð íà ñòðàíèöå ïðåäìåòû è ïðîåêòû 893 function func_clear_filter_subs(){ 894 $(".vebinar_archive_filter_box_zag_point").removeClass("vebinar_archive_filter_box_zag_point_choosen"); 895 $(".point_area").removeClass("point_area_choosen"); 896 $(".vebinar_archive_filter_roli_point").removeClass("roli_point_choosen"); 897 }; 898 899 900 901 // î÷èñòèòü âûáîð ôèëüòðà íàæàòèåì íà ñàì ôèëüòð íà ñòðàíèöå 902// $('.vebinar_filter_tag_show').bind({ 903 // "click ": function(){ 904 // if (document.querySelector('.block_predmet_menu_left')){ 905 // document.getElementById("vebinar_filter_tag_show").innerHTML = "Íîâèíêè"; 906 // } 907 // else{ 908 // func_clear_archive_filter 909 // } 910 // } 911 912// }); 913 914 915 916 917 918 919 920// ïóíêòû ìåíþ âåðòèêàëüíîå îòêðûòèå ìîáèëüíûé ýêðàí 921 922 923 $('.menu_close_button_filter_box').on('click', 924 function(){ 925 hide_filter(); 926 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 927 }); 928 $('.vebinar_archive_choose_filter_img').on('click', function(){open_close_filter_menu(); }); 929 930 // Îáðàáîòêà êíîïêè ïîêàçà ìåíþ ôèëüòðîâ â ìîáèëüíîì âèäå 931 function open_close_filter_menu() { 932 $('.vebinar_archive_filter_box').removeClass('filter_close'); 933 $('.vebinar_archive_filter_box').addClass('filter_open'); 934 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 935 $('body').addClass('no_scroll_all_page'); 936 }; 937 938 function hide_filter() { 939 $('.vebinar_archive_filter_box').removeClass('filter_open'); 940 $('.vebinar_archive_filter_box').addClass('filter_close'); 941 $('body').removeClass('no_scroll_all_page'); 942 }; 943 944 945 946 947$('.predmety_all_fix .menu_close_button_filter_box').bind({ 948 "click ": function(){ 949 $('.handle_catalog').removeClass('show'); 950 $('.block_catalog_menu_inner').removeClass('show_menu'); 951 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 952 } 953 954}); 955 956 957$('.vebinar_archive_filter_mobile').bind({ 958 "click ": function(){ 959 if (page_body_width <= 1200){ 960 let idhref = $(this).attr('id'); 961 $('.vebinar_archive_filter_mobile_kid').animate({height: 'hide'}, 500); 962 $('.arrow').removeClass("arrow_filter_open"); 963 964 if ($('#show_'+idhref).css('display') == 'none') { 965 $('#show_'+idhref).animate({height: 'show'}, 500); 966 $('#'+idhref+' .arrow').addClass("arrow_filter_open"); 967 968 } else { 969 $('#show'+idhref).animate({height: 'hide'}, 500); 970 $('#'+idhref+' .arrow').removeClass("arrow_filter_open"); 971 } 972 973 } 974 975 } 976 977}); 978 979 980$(window).on('resize', function(){ 981 $('.vebinar_archive_filter_point_area_roli').css('display','block'); 982 $('#box_zag_point_0 .arrow').addClass("arrow_filter_open"); 983 984 $('.vebinar_archive_filter_point_area').css('display','none'); 985 $('.vebinar_archive_filter_box_zag_point .arrow').removeClass("arrow_filter_open"); 986 987 988 989}); 990 991 992//Âèäåîèíñòðóêöèÿ è ñåðòèôèêàò â ñèíåé ðàìêå 993$('#block_blue_border_text_video_instr').bind({ 994 "click ": function(){ 995 let idhref = $(this).attr('id'); 996 997 if ($('#show_'+idhref).css('display') == 'none') { 998 $('#show_'+idhref).animate({height: 'show'}, 500); 999 $('#'+idhref+' .blue_border_arrow').addClass("blue_border_arrow_open"); 1000 // console.log('if'); 1001 1002 } else { 1003 $('#show_'+idhref).animate({height: 'hide'}, 500); 1004 $('#'+idhref+' .blue_border_arrow').removeClass("blue_border_arrow_open"); 1005 // console.log('else'); 1006 } 1007 1008 } 1009 1010}); 1011 1012 1013//Óáèðàåì íèæíþþ ãðàíèöó ó ïîñëåäíåãî ýëåìåíòà â ëåâîì áëîêå 1014 1015 1016 1017$( ".el_resurs_block_left_area .el_resurs_left_area:last" ).css("border-bottom","solid 0px #ffffff"); 1018 1019 1020$( ":last" ).css("border-bottom","solid 0px #ffffff"); 1021 1022 1023 1024//Ðàçìåð îòîáðàæåíèÿ èçîáðàæåíèé ïðåçåíòàöèÿ è ìàòåðèàëû íà ñòðàíèöå âåáèíàðîâ 1025 function presentation_banner_height() { 1026 let presentation_banner_w = $(".block_vebinar_card_more_presentation_area").outerWidth(); 1027 presentation_banner_h = presentation_banner_w * 170 / 267; 1028 1029 $('.block_vebinar_card_more_presentation_img').css('height', presentation_banner_h + 'px' ); 1030 1031 }; 1032 presentation_banner_height(); 1033 $(window).resize('resize', presentation_banner_height); 1034 1035 1036//Ñ÷èòàåì âûñîòó çàãîëîâêà ïðåçåíòàöèé è ìàòåðèàëîâ äëÿ ñêà÷èâàíèÿ, ÷òîáû êíîïêà ñêà÷àòü áûëà íà îäíîì óðîâíå ó âñåõ 1037 1038 1039 function presentation_zag_height() { 1040 var max_h = 0; 1041 var h_block = 0; 1042 1043 1044 $(".block_vebinar_card_more_img_text_prezent .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").css('height', ''); 1045 1046 $(".block_vebinar_card_more_img_text_prezent .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").each(function () { 1047 let h_block = parseInt($(this).height()); 1048 // console.log('max_h', max_h); 1049 if(h_block > max_h) { 1050 max_h = h_block; 1051 1052 }; 1053 1054 $(".block_vebinar_card_more_img_text_prezent .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").each(function () { 1055 $(this).height(max_h); 1056 // console.log('max_h_in', max_h); 1057 }); 1058 1059 }); 1060 }; 1061 1062 1063 presentation_zag_height(); 1064 $(window).resize('resize', presentation_zag_height); 1065 1066 1067 function material_zag_height() { 1068 var max_h = 0; 1069 var h_block = 0; 1070 1071 1072 $(".block_vebinar_card_more_img_text_material .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").css('height', ''); 1073 1074 $(".block_vebinar_card_more_img_text_material .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").each(function () { 1075 let h_block = parseInt($(this).height()); 1076 // console.log('max_h', max_h); 1077 if(h_block > max_h) { 1078 max_h = h_block; 1079 1080 }; 1081 1082 $(".block_vebinar_card_more_img_text_material .block_vebinar_card_more_presentation_block .block_vebinar_card_more_presentation_zag").each(function () { 1083 $(this).height(max_h); 1084 // console.log('max_h_in', max_h); 1085 }); 1086 1087 }); 1088 }; 1089 1090 1091 material_zag_height(); 1092 $(window).resize('resize', material_zag_height); 1093 1094 1095 1096//Ñòðàíèöà íîâîñòåé íàæàòèå, âûáîð ðàçäåëà 1097 1098if (document.querySelector('.razdel_clickable')) { 1099 $('.news_block_razdel_area_text').bind({ 1100 "click": function(){ 1101 if (this.classList.contains('news_block_razdel_area_text_choosen')){ 1102 $('.news_block_razdel_area_text').re
1102moveClass("news_block_razdel_area_text_choosen"); 1103 } 1104 else{ 1105 $('.news_block_razdel_area_text').removeClass("news_block_razdel_area_text_choosen"); 1106 $(this).addClass("news_block_razdel_area_text_choosen"); 1107 } 1108 1109 1110 1111 1112 1113 } 1114 }); 1115}; 1116 //îòêðûòèå ìåíþ íà ñòðàíèöå íîâîñòåé + çàêðûòèå + î÷èñòèòü ôèëüòð 1117$('.block_icon_menu_razdel').bind({ 1118 "click": function(){ 1119 $('.block_news_razdel_menu').addClass('block_news_razdel_menu_open'); 1120 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1121 $('body').addClass('no_scroll_all_page'); 1122 } 1123}); 1124 1125$('.menu_close_filter_razdel_box').bind({ 1126 "click": function(){ 1127 hide_all_opens(); 1128 } 1129}); 1130 1131$('.clear_achive_filter_razdel').bind({ 1132 "click": function(){ 1133 $('.news_block_razdel_area_text').removeClass("news_block_razdel_area_text_choosen") 1134 } 1135}); 1136 1137 1138 1139// Âûñîòà èçîáðàäåíèÿ â íîâîñòè 1140function news_main_image_height() { 1141 let news_main_image_height_w = $(".news_main_image").outerWidth(); 1142 1143 // if (page_body_width > 600) { 1144 let news_main_image_height_h = news_main_image_height_w * 400 / 1200; 1145 // console.log('news_main_image_height_h', news_main_image_height_h); 1146 // } 1147 // if (page_body_width > 0 && page_body_width <= 600) { 1148 // var vebinar_banner_relevant_h = vebinar_banner_relevant_w * 197 / 320; 1149 // } 1150 1151 // console.log('vebinar_banner_relevant_h', vebinar_banner_relevant_h); 1152 news_main_image_height_h= Math.round(news_main_image_height_h); 1153 $('.news_main_image').css('height', news_main_image_height_h + 'px' ); 1154 1155}; 1156news_main_image_height(); 1157$(window).resize('resize', news_main_image_height); 1158 1159 1160 1161 1162// function block_single_news_caorusel_width() { 1163 // let cont_width = $(".block_single_news_area").outerWidth(); 1164 // $('.block_single_news_caorusel .owl-stage-outer').css('width', cont_width + 'px'); 1165// } 1166 1167// block_single_news_caorusel_width(); 1168// $(window).resize('resize', block_single_news_caorusel_width); 1169 1170// Âåáèíàðû, âåðòèêàëüíûé ñëàéäåð íà ñòðàíèöå îäíîé íîâîñòè 1171 1172 // function owl_carousel_vertical_left(){ 1173 // console.log('page_body', page_body_width); 1174 // if (page_body_width <= 1280) { 1175 // $('.show_owl_carousel_vertical_left').removeClass('owl_carousel_vertical_left'); 1176 // } 1177 // else{ 1178 // $('.show_owl_carousel_vertical_left').addClass('owl_carousel_vertical_left'); 1179 // } 1180 // }; 1181 1182 1183 // $(window).resize('resize', owl_carousel_vertical_left); 1184 // setTimeout(owl_carousel_vertical_left, 50); 1185 1186 1187 1188 1189// Âåáèíàðû, âåðòèêàëüíûé ñëàéäåð 1190 1191 // function func_owl_carousel_vertical_1(){ 1192 // if (page_body_width <= 1500) { 1193 // $('.relevant_vebinar_main_right').removeClass('owl_carousel_vertical'); 1194 // } 1195 // else{ 1196 // $('.relevant_vebinar_main_right').addClass('owl_carousel_vertical'); 1197 // } 1198 // }; 1199 1200 1201 // $(window).resize('resize', func_owl_carousel_vertical_1); 1202 // setTimeout(func_owl_carousel_vertical_1, 50); 1203 1204 1205 1206 1207// Êàðóñåëü ñ ðåñàéçîì èçîáðàæåíèé 1208 1209 1210 // function func_owl_carousel_vertical_size(){ 1211 // if (document.querySelector('.owl_carousel_vertical')) { 1212 // console.log('åñòü') 1213 // $(".owl-carousel").each(function(index, el) { 1214 // var containerWidth = $('.owl-stage ').height(); 1215 // containerWidth = containerWidth - 10; 1216 // console.log('containerWidth', containerWidth); 1217 // $(el).find("img").each(function(index, img) { 1218 // var w = $(img).prop('naturalWidth'); 1219 // var h = $(img).prop('naturalHeight'); 1220 // $(img).css({ 1221 // 'height': Math.round(containerWidth * h / w) + 'px' 1222 // }); 1223 // $(img).parents(".owl-item").css("height", (Math.round(containerWidth * h / w) + 30 ) + 'px'); 1224 // }); 1225 // }); 1226 // } 1227 // else{ 1228 // console.log('íåò') 1229 // $(".owl-carousel").each(function(index, el) { 1230 // var containerHeight = $(el).height(); 1231 // $(el).find("img").each(function(index, img) { 1232 // var w = $(img).prop('naturalWidth'); 1233 // var h = $(img).prop('naturalHeight'); 1234 // $(img).css({ 1235 // 'width': Math.round(containerHeight * w / h) + 'px' 1236 // }); 1237 // $(img).parents(".owl-item").css("width", (Math.round(containerHeight * w / h) + 30 ) + 'px'); 1238 // }); 1239 // }); 1240 1241 // }; 1242 // }; 1243 1244 1245 1246 // $(".owl-carousel").owlCarousel({ 1247 // items: 6, 1248 // margin: 1, 1249 // nav: true, 1250 // loop: true, 1251 // autoplay: false, 1252 // autoplayTimeout: 1000, 1253 // smartSpeed: 1000, 1254 // onInitialized: function(){ 1255 // setTimeout(func_owl_carousel_vertical_size(), 250); 1256 // $(this).trigger("refresh"); 1257 // }, 1258 // onResize: function(){ 1259 // setTimeout(func_owl_carousel_vertical_size(), 250) 1260 // $(this).trigger("refresh"); 1261 // }, 1262 // onResized: function(){ 1263 // setTimeout(func_owl_carousel_vertical_size(), 250) 1264 // $(this).trigger("refresh"); 1265 // } 1266 1267 // , 1268 1269 // responsive:{ 1270 // 1500:{ 1271 // items:6 1272 // }, 1273 // 1000:{ 1274 // items:5 1275 // }, 1276 // 900:{ 1277 // items:4 1278 // }, 1279 // 500:{ 1280 // items:3 1281 // }, 1282 // 0:{ 1283 // items:2 1284 // } 1285 // } 1286 // }); 1287 1288 1289 1290 1291//Öåíòðîâêà èíïóòîâ ââîäà íà ñòðàíèöê ëè÷íîãî êàáèíåòà 1292 1293 1294function input_with_near_text_margin() { 1295 let input_with_near_text_w = $(".input_with_near_text").outerWidth(); 1296 let left_w = $("#pad_reg").outerWidth(); 1297 1298 // console.log('input_with_near_text_w', input_with_near_text_w); 1299 // console.log('left_w', left_w); 1300 $(".input_with_near_text .left").css('padding-left', '0px') ; 1301 if (page_body_width > 800) { 1302 let sdvig_input = (input_with_near_text_w / 2.79) - ( left_w / 2); 1303 $(".input_with_near_text .left").css('padding-left', sdvig_input +'px') ; 1304 } 1305 1306}; 1307input_with_near_text_margin(); 1308$(window).resize('resize', input_with_near_text_margin); 1309 1310 1311 1312 1313 1314 1315 1316//Êàòàëîã, ðàñêðûâàþùèåñÿ ñïèñêè 1317 1318 1319 1320 1321 1322 1323$('.catalog_single_area_open_close').bind({ 1324 "click": function(){ 1325 var idhref = $(this).attr('id'); 1326 // console.log("idhref =", idhref); 1327 $('.box_catalog_text_area').animate({height: 'hide'}, 500); 1328 // $('.catalog_single_area_open_close_second_level').animate({height: 'hide'}, 500); 1329 $('.catalog_single_area_arrow').addClass("arrow_close"); 1330 $('.catalog_single_area_arrow').removeClass("arrow_open"); 1331 // $('.one_unit_title').removeClass("text_blue"); 1332 1333 1334 if ($('#box_'+idhref).css('display') == 'none') { 1335 // console.log("box_" + idhref); 1336 $('#box_'+idhref).animate({height: 'show'}, 500); 1337 $('#'+idhref+' .catalog_single_area_arrow').addClass("arrow_open"); 1338 $('#'+idhref+' .catalog_single_area_arrow').removeClass("arrow_close"); 1339 // $('#'+idhref+' .one_unit_title').addClass("text_blue"); 1340 1341 } else { 1342 $('#'+idhref+' .catalog_single_area_arrow').addClass("arrow_close"); 1343 $('#'+idhref+' .catalog_single_area_arrow').removeClass("arrow_open"); 1344 // $('#box_'+idhref).animate({height: 'hide'}, 500); 1345 } 1346 1347 } 1348}); 1349 1350$('.catalog_single_area_open_close_second_level').bind({ 1351 "click": function(){ 1352 var idhref = $(this).attr('id'); 1353 // console.log("idhref =", idhref); 1354 $('.box_catalog_text_area_second_level').animate({height: 'hide'}, 500); 1355 $('.catalog_single_area_arrow').addClass("arrow_close"); 1356 $('.catalog_single_area_arrow').removeClass("arrow_open"); 1357 $('.one_unit_title').removeClass("text_blue"); 1358 1359 1360 if ($('#box_'+idhref).css('display') == 'none') { 1361 // console.log("box_" + idhref); 1362 $('#box_'+idhref).animate({height: 'show'}, 500); 1363 $('#'+idhref+' .catalog_single_area_arrow').addClass("arrow_open"); 1364 $('#'+idhref+' .catalog_single_area_arrow').removeClass("arrow_close"); 1365 1366 } else { 1367 $('#'+idhref+' .catalog_single_area_arrow').addClass("arrow_close"); 1368 $('#'+idhref+' .catalog_single_area_arrow').removeClass("arrow_open"); 1369 $('#box_'+idhref).animate({height: 'hide'}, 500); 1370 } 1371 1372 } 1373}); 1374 1375 1376 1377 1378//Êàòàëîã. Ïåðåêëþ÷åíèå íà ñòðàíèöå 2 óðîâíÿ. Êëàññû\äîï êíîïêè 1379$('.block_icon_menu_razdel').bind({ 1380 "click": function(){ 1381 $('.block_news_razdel_menu').addClass('block_news_razdel_menu_open'); 1382 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1383 $('body').addClass('no_scroll_all_page'); 1384 } 1385}); 1386 1387 1388 1389//îòêðûòèå ìåíþ â êàòàëîãå 1390$('.single_button_area').bind({ 1391 "click": function(){ 1392 $('.single_button_area').removeClass('active'); 1393 $(this).addClass('active'); 1394 } 1395}); 1396 1397 1398 1399//Çàìåíà íàäïèñè â êàòàëîãå 1400 1401$('.box_catalog_text_area div').bind({ 1402 "click ": function(){ 1403 1404 if (document.querySelector('.zag_show_catalog')) { 1405 1406 if (this.classList.contains('.catalog_single_area_open_close_second_level')) { 1407 // console.log('åñòü'); 1408 }else{ 1409 if (this.classList.contains('box_catalog_text_area_choosen')){ 1410 if (document.querySelector('.block_show_catalog.author_page')){ 1411 document.getElementById("id_zag_show_catalog").innerHTML = ""; 1412 } 1413 else{ 1414 document.getElementById("id_zag_show_catalog").innerHTML = "Íîâèíêè"; 1415 } 1416 $(this).removeClass('box_catalog_text_area_choosen'); 1417 $('.block_show_catalog_inner').show(); 1418 $('.catalog_back_fix').css('display', 'none'); 1419 1420 $('.zag_show_catalog').removeClass('author_page_fix'); 1421 1422 } 1423 else{ 1424 document.getElementById("id_zag_show_catalog").innerHTML = ""; 1425 $(".box_catalog_text_area div").removeClass("box_catalog_text_area_choosen"); 1426 $('.catalog_single_area_text').removeClass('box_catalog_text_area_choosen'); 1427 1428 $(this).addClass('box_catalog_text_area_choosen'); 1429 let print_elem_catalog = $('.box_catalog_text_area_choosen').html(); 1430 div_show = document.getElementById('id_zag_show_catalog'); 1431 div_show.innerHTML = print_elem_catalog; 1432 if (document.querySelector('.block_show_catalog.author_page')){ 1433 $('.zag_show_catalog').addClass('author_page_fix'); 1434 } 1435 1436 // console.log('print_elem_catalog', print_elem_catalog) 1437 // if ( print_elem_catalog === "Ëèòåðàòóðà | À.Â. Ãóëèí, À.Í. Ðîìàíîâà, À.Â. Ô¸äîðîâ, Å.À. Ðîæåíöåâà"){ 1438 // $('.block_show_catalog_inner').hide(); 1439 // $('.block_show_catalog_inner_literature').show(); 1440 // $('.catalog_back_fix').css('display', 'block'); 1441 // } 1442 // else{ 1443 // $('.block_show_catalog_inner').show(); 1444 // $('.block_show_catalog_inner_literature').hide(); 1445 // $('.catalog_back_fix').css('display', 'none'); 1446 // $('.zag_show_catalog').removeClass('author_page_fix'); 1447 // } 1448 } 1449 } 1450 } 1451 1452 }, 1453}); 1454 1455 1456$('.catalog_single_area_click').bind({ 1457 "click ": function(){ 1458 1459 if (document.querySelector('.zag_show_catalog')) { 1460 console.log('0'); 1461 if (this.classList.contains('catalog_single_area_click_choosen')){ 1462 document.getElementById("id_zag_show_catalog").innerHTML = "Íîâèíêè"; 1463 $(this).find(".catalog_single_area_text").removeClass('box_catalog_text_area_choosen'); 1464 $('.block_show_catalog_inner').show(); 1465 $('.catalog_back_fix').css('display', 'none'); 1466 $(this).removeClass('catalog_single_area_click_choosen'); 1467 1468 } 1469 else{ 1470 $(this).addClass('catalog_single_area_click_choosen'); 1471 $(".box_catalog_text_area div").removeClass("box_catalog_text_area_choosen"); 1472 $('.catalog_single_area_text').removeClass('box_catalog_text_area_choosen'); 1473 1474 $(this).find(".catalog_single_area_text").addClass('box_catalog_text_area_choosen'); 1475 let print_elem_catalog = $('.box_catalog_text_area_choosen').html(); 1476 div_show = document.getElementById('id_zag_show_catalog'); 1477 div_show.innerHTML = print_elem_catalog; 1478 1479 } 1480 } 1481 1482 if (document.querySelector('.block_show_catalog.author_page')) { 1483 // console.log('its work'); 1484 $('.zag_show_catalog').addClass('author_page_fix'); 1485 } 1486 }, 1487}); 1488 1489 1490 1491$('.single_letter').bind({ 1492 "click ": function(){ 1493 1494 if (document.querySelector('.single_letter')) { 1495 if (this.classList.contains('letter_orange')){ 1496 $(this).removeClass('letter_orange'); 1497 } 1498 else{ 1499 $(".single_letter").removeClass("letter_orange"); 1500 $(this).addClass('letter_orange'); 1501 } 1502 } 1503 }, 1504}); 1505 1506 1507 1508 1509 1510 1511function show_back_button(){ 1512 if (document.querySelector('#id_zag_show_catalog')) { 1513 $('.catalog_back_fix').css('display', 'none'); 1514 } 1515 1516} 1517 1518show_back_button(); 1519 1520//ïåðåêëþ÷åíèå êàðòèíîê íà ñòðàíèöå èçäàíèÿ è ïðîñ÷åò ðàçìåðà 1521 1522$('#id_big_image').bind({ 1523 "click": function(){ 1524 let img_src = $(this).attr('src'); 1525 1526 let img_height = $(this)[0].naturalHeight;
1527 let img_width = $(this)[0].naturalWidth; 1528 1529 let win_height = window.innerHeight; 1530 let win_width = window.innerWidth; 1531 1532 let inner_height; 1533 let inner_width; 1534 1535 1536 if (img_height >= win_height ){ 1537 console.log('h_bigger'); 1538 win_height = win_height - 80; 1539 inner_width = img_width * win_height / img_height; 1540 inner_height = win_height; 1541 1542 1543 1544 } 1545 else if (img_width >= win_width) { 1546 1547 win_width = win_width - 80; 1548 inner_height = img_height * win_width / img_width; 1549 inner_width = win_width; 1550 } 1551 else{ 1552 inner_height = img_height; 1553 inner_width = img_width; 1554 } 1555 1556 1557 $('.frame_show_big_image').css('display', 'block'); 1558 $('.frame_show_big_image .inner_image').css({ 1559 'display':'block', 1560 'background':'url(' + img_src + ')', 1561 'background-size': 'contain', 1562 'background-repeat':'no-repeat', 1563 'height': inner_height + 'px', 1564 'width': inner_width + 'px', 1565 }); 1566 1567 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1568 } 1569}); 1570 1571 1572 1573 1574$('.single_preview').bind({ 1575 "click": function(){ 1576 let img_src = $(this).children('img').attr('src'); 1577 // console.log('img_src', img_src); 1578 const set_src = document.querySelector('#id_big_image'); 1579 1580 // console.log('set_src', set_src); 1581 set_src.setAttribute('src', img_src); 1582 func_size_big_image_container(); 1583 1584 } 1585}); 1586 1587 1588function func_size_big_image_container(){ 1589 1590 $('.big_image').css({ 1591 'height': 530 + 'px', 1592 'width': 420 + 'px', 1593 }); 1594 1595 let img_height = $('#id_big_image')[0].naturalHeight; 1596 let img_width = $('#id_big_image')[0].naturalWidth; 1597 // console.log('img_height', img_height); 1598 // console.log('img_width', img_width); 1599 1600 let k_res = img_height / img_width; 1601 1602 // console.log('k_res', k_res); 1603 1604 1605 let container_height = parseInt($('.big_image').css('height')); 1606 let container_width = parseInt($('.big_image').css('width')); 1607 // console.log('container_height', container_height); 1608 // console.log('container_width', container_width); 1609 1610 1611 let inner_height; 1612 let inner_width; 1613 1614 1615 if ((img_height >= container_height ) && (k_res >=1)){ 1616 // console.log('h_bigger'); 1617 inner_height = container_height; 1618 inner_width = img_width * container_height / img_height; 1619 if (inner_width > container_width){ 1620 // console.log('if_1'); 1621 inner_width = container_width; 1622 inner_height = img_height * container_width / img_width; 1623 } 1624 1625 1626 1627 } 1628 else if ((img_width >= container_width) && (k_res <1)) { 1629 // console.log('w_bigger'); 1630 1631 inner_width = container_width; 1632 inner_height = img_height * container_width / img_width; 1633 if (inner_height > container_height){ 1634 console.log('if_2'); 1635 inner_height = container_height; 1636 inner_width = img_width * container_height / img_height; 1637 } 1638 1639 } 1640 else{ 1641 inner_height = img_height; 1642 inner_width = img_width; 1643 } 1644 1645 // console.log('inner_height', inner_height); 1646 // console.log('inner_width', inner_width); 1647 1648 1649 $('.big_image').css({ 1650 1651 'height': inner_height + 'px', 1652 'width': inner_width + 'px', 1653 }); 1654 1655} 1656 1657if (document.querySelector('#id_big_image')) { 1658 func_size_big_image_container(); 1659 $(window).resize('resize', func_size_big_image_container); 1660} 1661 1662function button_flip_book(){ 1663 let flip_offset = $('#id_big_image')[0].offsetLeft; 1664 let flip_width = $('#id_big_image')[0].offsetWidth; 1665 1666 let padding_block_catalog = parseInt($('.block_catalog_area').css('padding-left')); 1667 1668 let but_flip_width = $('.catalog_button_flip')[0].offsetWidth; 1669 1670 // console.log('flip_offset',flip_offset); 1671 // console.log('flip_width',flip_width); 1672 // console.log('but_flip_width',but_flip_width); 1673 1674 let flip_margin = flip_offset + flip_width/2 - but_flip_width/2 - padding_block_catalog; 1675 1676 $('.catalog_button_flip').css({ 1677 'margin-left': flip_margin + 'px', 1678 }) 1679} 1680if (document.querySelector('#id_big_image')) { 1681 button_flip_book(); 1682 $(window).resize('resize', button_flip_book); 1683} 1684 1685 1686 1687 1688 1689$('#frame_show_big_image_close').bind({ 1690 "click": function(){ 1691 1692 $('.frame_show_big_image').css('display', 'none'); 1693 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 1694 } 1695}); 1696 1697 1698 1699 1700 1701// Êàòàëîã. Ëåâîå ìåíþ 1702 1703 1704 1705$('.handle_catalog').bind({ 1706 "click": function(){ 1707 $('.handle_catalog').toggleClass('show'); 1708 $('.block_catalog_menu_inner').toggleClass('show_menu'); 1709 $('.dark_layer_blocker').toggleClass('show_dark_layer_blocker'); 1710 } 1711}); 1712 1713 1714 1715$('.handle_catalog_onas').bind({ 1716 "click": function(){ 1717 $('.handle_catalog_onas').toggleClass('show'); 1718 $('.block_catalog_menu_inner').toggleClass('show_menu'); 1719 $('.block_buttons_razdel').toggleClass('show_menu'); 1720 $('.dark_layer_blocker').toggleClass('show_dark_layer_blocker'); 1721 } 1722}); 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738//Êíîïêè îêíà àâòîðèçàöèè 1739 1740$('#auth_lich_kab').bind({ 1741 "click": function(){ 1742 $('#id_auth_lich_kab').addClass('show'); 1743 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1744 } 1745}); 1746$('.bell').bind({ 1747 "click": function(){ 1748 if (window.innerWidth > 370){ 1749 var bell_right = parseInt($('.bell').css('right')); 1750 bell_right = bell_right - 6; 1751 $('.block_subscribe_popup').css('right', bell_right + 'px'); 1752 } 1753 1754 $('.block_subscribe_popup').addClass('show'); 1755 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1756 } 1757}); 1758 1759 1760$('.subscribe_block .button_lk_join').bind({ 1761 "click": function(){ 1762 if (window.innerWidth > 370){ 1763 var bell_right = parseInt($('.bell').css('right')); 1764 bell_right = bell_right - 6; 1765 $('.block_subscribe_popup').css('right', bell_right + 'px'); 1766 } 1767 1768 $('.block_subscribe_popup').addClass('show'); 1769 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1770 } 1771}); 1772 1773 1774 1775$('.block_subscribe_popup .button_lk_join').bind({ 1776 "click": function(){ 1777 1778 console.log('button ok'); 1779 $('#static-form-container button').click() 1780 } 1781}); 1782 1783 1784$('#id_auth_vebinar').bind({ 1785 "click": function(){ 1786 $('.block_auth_lich_kab.vebinar_window').addClass('show'); 1787 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1788
1789 } 1790}); 1791 1792$('#id_reg_vebinar').bind({ 1793 "click": function(){ 1794 $('.block_auth_lich_kab.vebinar_window_reg').addClass('show'); 1795 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 1796 1797 } 1798}); 1799 1800$('.button_close_serv_wind').bind({ 1801 "click": function(){ 1802 $('#id_auth_lich_kab').removeClass('show'); 1803 $('.block_subscribe_popup').removeClass('show'); 1804 $('.block_auth_lich_kab.vebinar_window').removeClass('show'); 1805 $('.block_auth_lich_kab.vebinar_window_reg').removeClass('show'); 1806 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 1807 $('.vebinar_window_reg .block_inner').removeAttr('style'); 1808 $('.vebinar_window_reg .block_successfully').removeAttr('style'); 1809 } 1810}); 1811 1812 1813$('.eye').bind({ 1814 "click": function(){ 1815 $(this).toggleClass('eye_open'); 1816 1817 1818 } 1819}); 1820$('.block_auth_lich_kab .remember_block .me .check').bind({ 1821 "click": function(){ 1822 $(this).toggleClass('me_open'); 1823 document.getElementById('id_remember_me').click(); 1824 1825 } 1826}); 1827$('.block_auth_lich_kab .remember_block .me .check_vebinar').bind({ 1828 "click": function(){ 1829 $(this).toggleClass('me_open'); 1830 document.getElementById('id_remember_me_vebinar').click(); 1831 1832 } 1833}); 1834$('.block_auth_lich_kab .block_agree .check_box').bind({ 1835 "click": function(){ 1836 $(this).toggleClass('allow'); 1837 1838 1839 } 1840}); 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856/*Ïåðåêëþ÷àòåëü âèäåî íà ñòðàíèöå âåáèíàðà*/ 1857 1858 1859 1860$('.tabs_button').bind({ 1861 "click": function(){ 1862 1863 1864 if (this.classList.contains('active')){ 1865 1866 } 1867 else{ 1868 if (this.classList.contains('youtube')){ 1869 1870 $(this).parent().parent().children('.video_area').removeClass('active'); 1871 $(this).siblings().removeClass('active'); 1872 $(this).addClass('active'); 1873 $(this).parent().parent().children('.youtube_area').addClass('active'); 1874 func_video_size() 1875 1876 1877 } 1878 else if (this.classList.contains('rutube')){ 1879 $(this).parent().parent().children('.video_area').removeClass('active'); 1880 $(this).siblings().removeClass('active'); 1881 $(this).addClass('active'); 1882 $(this).parent().parent().children('.rutube_area').addClass('active'); 1883 func_video_size();} 1884 else if (this.classList.contains('ok')){ 1885 $(this).parent().parent().children('.video_area').removeClass('active'); 1886 $(this).siblings().removeClass('active'); 1887 $(this).addClass('active'); 1888 $(this).parent().parent().children('.ok_area').addClass('active'); 1889 func_video_size(); 1890 } 1891 else { 1892 $(this).parent().parent().children('.video_area').removeClass('active'); 1893 $(this).siblings().removeClass('active'); 1894 $(this).addClass('active'); 1895 $(this).parent().parent().children('.vk_area').addClass('active'); 1896 func_video_size(); 1897 } 1898 } 1899 } 1900}); 1901 1902 1903/*Ðåñàéç îêíà äëÿ âèäåî*/ 1904 1905 1906 1907 if (document.querySelector('.block_video_tabs')) { 1908 function func_video_size_vebinar() { 1909 1910 $('.video_area').css('width', 0 + 'px' ); 1911 $('.video_area').css('height', 0 + 'px' ); 1912 1913 let video_area_width = $(".block_video_tabs").innerWidth(); 1914 // console.log ('block_video_tabs',video_area_width); 1915 let video_area_width_pad = parseInt($(".block_video_tabs ").css('padding-left')); 1916 video_area_width_pad = video_area_width_pad + parseInt($(".block_video_tabs ").css('padding-right')); 1917 video_area_width = video_area_width - video_area_width_pad; 1918 1919 1920 video_area_height = video_area_width * 315 / 560; 1921 1922 $('.video_area').css('width', Math.round(video_area_width) + 'px' ); 1923 $('.video_area').css('height', Math.round(video_area_height) + 'px' ); 1924 1925 }; 1926 1927 setTimeout(func_video_size_vebinar, 50); 1928 $(window).resize('resize', func_video_size_vebinar); 1929 } 1930 1931 if (document.querySelector('.block_single_news_video .block_video_tabs')) { 1932 function func_video_size() { 1933 1934 $('.block_single_news_video .video_area').css('width', 0 + 'px' ); 1935 $('.block_single_news_video .video_area').css('height', 0 + 'px' ); 1936 1937 let video_area_width = $(".block_single_news_video .block_video_tabs").innerWidth(); 1938 // console.log ('block_video_tabs',video_area_width); 1939 let video_area_width_pad = parseInt($(".block_single_news_video .block_video_tabs ").css('padding-left')); 1940 video_area_width_pad = video_area_width_pad + parseInt($(".block_single_news_video .block_video_tabs ").css('padding-right')); 1941 video_area_width = video_area_width - video_area_width_pad; 1942 1943 1944 video_area_height = video_area_width * 315 / 560; 1945 1946 $('.block_single_news_video .video_area').css('width', Math.round(video_area_width) + 'px' ); 1947 $('.block_single_news_video .video_area').css('height', Math.round(video_area_height) + 'px' ); 1948 1949 }; 1950
1951 setTimeout(func_video_size, 50); 1952 $(window).resize('resize', func_video_size); 1953 } 1954 1955 /*äâà âèäåî â îäíîì áëîêå*/ 1956 if (document.querySelector('.block_single_news_video_double .block_video_tabs')) { 1957 function func_video_size_double() { 1958 1959 $('.block_single_news_video_double .video_area').css('width', 0 + 'px' ); 1960 $('.block_single_news_video_double .video_area').css('height', 0 + 'px' ); 1961 1962 let video_area_width = $(".block_single_news_video_double .block_video_tabs").innerWidth(); 1963 // console.log ('block_video_tabs',video_area_width); 1964 let video_area_width_pad = parseInt($(".block_single_news_video_double .block_video_tabs ").css('padding-left')); 1965 video_area_width_pad = video_area_width_pad + parseInt($(".block_single_news_video_double .block_video_tabs ").css('padding-right')); 1966 video_area_width = video_area_width - video_area_width_pad; 1967 1968 1969 video_area_height = video_area_width * 315 / 560; 1970 1971 $('.block_single_news_video_double .video_area').css('width', Math.round(video_area_width) + 'px' ); 1972 $('.block_single_news_video_double .video_area').css('height', Math.round(video_area_height) + 'px' ); 1973 1974 }; 1975 1976 setTimeout(func_video_size_double, 50); 1977 $(window).resize('resize', func_video_size_double); 1978 } 1979 /*òðè âèäåî â îäíîì áëîêå*/ 1980 if (document.querySelector('.block_single_news_video_triple .block_video_tabs')) { 1981 function func_video_size_triple() { 1982 1983 $('.block_single_news_video_triple .video_area').css('width', 0 + 'px' ); 1984 $('.block_single_news_video_triple .video_area').css('height', 0 + 'px' ); 1985 1986 let video_area_width = $(".block_single_news_video_triple .block_video_tabs").innerWidth(); 1987 // console.log ('video_area_width',video_area_width); 1988 let video_area_width_pad = parseInt($(".block_single_news_video_triple .block_video_tabs ").css('padding-left')); 1989 video_area_width_pad = video_area_width_pad + parseInt($(".block_single_news_video_triple .block_video_tabs ").css('padding-right')); 1990 video_area_width = video_area_width - video_area_width_pad ; 1991 1992 1993 video_area_height = video_area_width * 315 / 560; 1994 1995 $('.block_single_news_video_triple .video_area').css('width', Math.round(video_area_width) + 'px' ); 1996 $('.block_single_news_video_triple .video_area').css('height', Math.round(video_area_height) + 'px' ); 1997 1998 }; 1999 2000 setTimeout(func_video_size_triple, 50); 2001 $(window).resize('resize', func_video_size_triple); 2002 } 2003 2004 2005 2006/*Êàòàëîã. ïîäñêàçêà ïðè íàâåäåíèè íà íàçâàíèå*/ 2007 2008 2009 2010if (document.querySelector('.block_show_catalog_inner_area')) { 2011 $('.single_book_area').bind({ 2012 "mouseenter": function(){ 2013 2014 if (document.querySelector('#show_block')){ 2015 document.querySelector('#show_block').removeAttribute('id'); 2016 } 2017 2018 let rem_zag = $(this).find('.single_book_main_text')[0].innerHTML; 2019 // console.log('rem_zag', rem_zag); 2020 $(this)[0].setAttribute('id', 'show_block'); 2021 // console.log('this', $(this)[0]); 2022 2023 var rect = this.getBoundingClientRect(); 2024 // console.log('rect.left', rect.left); 2025 // console.log('rect.top', rect.top); 2026 2027 2028 document.getElementById("id_tooltip_area_zag").innerHTML = '<div class="cloud"></div>'; 2029 let div_show = document.getElementById('id_tooltip_area_zag'); 2030 div_show.innerHTML += rem_zag; 2031 2032 let tooltip_width = $('.single_book_area').innerWidth();//øèðèíà áëîêà îòîáðàæåíèÿ 2033 tooltip_width = Math.round(tooltip_width) ; 2034 // console.log('tooltip_width', tooltip_width); 2035 2036 2037 let tooltip_area_pad = parseInt($('.tooltip_zag').css('padding-left')) + parseInt($('.tooltip_zag').css('padding-right')) + 2 * parseInt($('.tooltip_zag').css('borderWidth'));//âíóòðåííèå ïàääèíãè è ãðàíèöà 2038 // console.log('tooltip_area_pad', tooltip_area_pad); 2039 2040 tooltip_width = tooltip_width - tooltip_area_pad - 2;//ïî 1 ïèêñåëÿ îòñòóïû ïî êðàÿì 2041 $('.tooltip_area').css({'width': tooltip_width + 'px'});//êîñòûëü äëÿ äàëüíåéøåãî ïåðåñ÷åòà âûñîòû áëîêà, èíà÷å ïðè ïåðâîì çàïóñêå êîñÿ÷èò 2042 let top_pad_1 = $(this).find('.single_book_main_img')[0].offsetHeight; 2043 let top_pad_2 = document.getElementById('id_tooltip_area_zag').offsetHeight; 2044 2045 // console.log('top_pad_1', top_pad_1); 2046 // console.log('top_pad_2', top_pad_2); 2047 2048 // console.log('rect.top', rect.top); 2049 let height_original = $(this).find('.single_book_main_text')[0].scrollHeight; 2050 let height_visible = parseInt($(this).find('.single_book_main_text').css('height')); 2051 let height_visible_padding = parseInt($(this).find('.single_book_main_text').css('padding-top')); 2052 height_visible = height_visible + height_visible_padding; 2053 2054 // console.log('height_original', height_original); 2055 // console.log('height_visible', height_visible); 2056 2057 if ( height_original > height_visible + 1){ 2058 // console.log('if'); 2059 $('.tooltip_area').css({ 2060 'visibility':'visible', 2061 'left': rect.left + 2 + 'px', 2062 'top': rect.top + top_pad_1 - top_pad_2 + 20 + 'px' 2063 }) 2064 2065 $('.tooltip_area').bind({ 2066 "mouseenter": function(){ 2067 $('.tooltip_area').css({ 2068 'visibility':'visible', 2069 'cursor':'pointer', 2070 2071 }) 2072 $('#show_block').addClass('single_book_area_hover'); 2073 } 2074 2075 }); 2076 $('.tooltip_area').bind({ 2077 "mouseleave": function(){ 2078 $('#show_block').removeClass('single_book_area_hover'); 2079 if (document.querySelector('#show_block')){ 2080 document.querySelector('#show_block').removeAttribute('id'); 2081 } 2082 2083 } 2084 2085 }); 2086 } 2087 2088 } 2089 }); 2090 2091 $('.single_book_area').bind({ 2092 "mouseleave": function(){ 2093 2094 2095 $('.tooltip_area').css({ 2096 'visibility':'hidden', 2097 }) 2098 } 2099 }); 2100} 2101 2102$(function(){ 2103 $(window).scroll(function(){ 2104 $('.tooltip_area').css({ 2105 'visibility':'hidden', 2106 }) 2107 }); 2108}); 2109 2110 2111/*Êàòàëîã. ðàçìåð êàðòèíîê â êàðòî÷êå*/ 2112 2113 2114 2115/*Êàòàëîã ÓÌÊ. ïîäñêàçêà ïðè íàâåäåíèè íà íàçâàíèå*/ 2116 2117 2118 2119if (document.querySelector('.annotation_block_umk')) { 2120 $('.single_block').bind({ 2121 "mouseenter": function(){ 2122 2123 if (document.querySelector('#show_block')){ 2124 document.querySelector('#show_block').removeAttribute('id'); 2125 } 2126 2127 let rem_zag = $(this).find('.text')[0].innerHTML; 2128 // console.log('rem_zag', rem_zag); 2129 $(this)[0].setAttribute('id', 'show_block'); 2130 // console.log('this', $(this)[0]); 2131 2132 var rect = this.getBoundingClientRect(); 2133 // console.log('rect.left', rect.left); 2134 // console.log('rect.top', rect.top); 2135 2136 2137 document.getElementById("id_tooltip_area_zag_umk").innerHTML = '<div class="cloud"></div>'; 2138 let div_show = document.getElementById('id_tooltip_area_zag_umk'); 2139 div_show.innerHTML += rem_zag; 2140 2141 let tooltip_width = $('.single_block ').innerWidth();//øèðèíà áëîêà îòîáðàæåíèÿ 2142 tooltip_width = Math.round(tooltip_width) ; 2143 // console.log('tooltip_width', tooltip_width); 2144 2145 2146 let tooltip_area_pad = parseInt($('.tooltip_zag').css('padding-left')) + parseInt($('.tooltip_zag').css('padding-right')) + 2 * parseInt($('.tooltip_zag').css('borderWidth'));//âíóòðåííèå ïàääèíãè è ãðàíèöà 2147 // console.log('tooltip_area_pad', tooltip_area_pad); 2148 2149 2150 let height_original = $(this).find('.text')[0].scrollHeight; 2151 let height_visible = parseInt($(this).find('.text').css('height')); 2152 2153 let top_pad = document.getElementById('id_tooltip_area_zag_umk').offsetHeight; 2154 2155 // console.log('height_original', height_original); 2156 // console.log('height_visible', height_visible); 2157 2158 2159 if ( height_original > height_visible){ 2160 $(this).css({ 2161 'cursor':'pointer', 2162 }); 2163 2164 $('.tooltip_zag_umk').css({ 2165 'width': tooltip_width + 'px', 2166 'visibility':'visible', 2167 'left': rect.left + 2 + 'px', 2168 'top': rect.top - top_pad - 5 + 'px', //5px - ñâäèã îò òåêñòà ââåðõ, ÷òîáû íå ñëèïàëîñü 2169 }) 2170 } 2171 2172 2173 } 2174 }); 2175 2176 $('.single_block').bind({ 2177 "mouseleave": function(){ 2178 $('.single_block').css({ 2179 'cursor':'default', 2180 }); 2181 2182 $('.tooltip_zag_umk').css({ 2183 'visibility':'hidden', 2184 }) 2185 } 2186 }); 2187} 2188 2189$(function(){ 2190 $(window).scroll(function(){ 2191 $('.tooltip_zag_umk').css({ 2192 'visibility':'hidden', 2193 }) 2194 }); 2195}); 2196 2197 2198 2199 2200 2201 2202 2203 2204/*swiper êàðóñåëü*/ 2205 function show_vertical_swiper_func() { 2206 if ((page_body_width > 1500) && (document.querySelector('.relevant_vebinar_main_right')) && (document.querySelector('.swiper'))){ 2207 $('.relevant_vebinar_main_right').addClass('show_vertical_swiper'); 2208 $('.relevant_vebinar_main_right').removeClass('show_horizontal_swiper') 2209 2210 } 2211 if ((page_body_width <= 1500) && (document.querySelector('.relevant_vebinar_main_right')) && (document.querySelector('.swiper'))){ 2212 $('.relevant_vebinar_main_right').removeClass('show_vertical_swiper'); 2213 $('.relevant_vebinar_main_right').addClass('show_horizontal_swiper'); 2214 2215 } 2216 2217 if ((page_body_width > 1280) && (document.querySelector('.left_books_block')) && (document.querySelector('.swiper'))){ 2218 $('.left_books_block').addClass('show_vertical_swiper_left'); 2219 $('.left_books_block').removeClass('show_horizontal_swiper_left'); 2220 } 2221 if ((page_body_width <= 1280) && (document.querySelector('.left_books_block')) && (document.querySelector('.swiper'))){ 2222 $('.left_books_block').addClass('show_horizontal_swiper_left'); 2223 $('.left_books_block').removeClass('show_vertical_swiper_left'); 2224 2225 } 2226 if ((document.querySelector('.block_book_carousel_all')) && (document.querySelector('.swiper'))){ 2227 $('.block_book_carousel_all').addClass('show_horizontal_swiper'); 2228 2229 } 2230 2231 2232 }; 2233 2234 show_vertical_swiper_func(); 2235 $(window).resize('resize', show_vertical_swiper_func); 2236 2237 2238var sliderElement = document.querySelector(".mySwiper"); 2239var sliderElement_news_img = document.querySelector(".mySwiper_news_img"); 2240var swiperSlider = {}; 2241var sliderType = document.querySelector('.show_horizontal_swiper') ? "horizontal_type" : "vertical_type"; 2242var sliderType_left = document.querySelector('.show_horizontal_swiper_left') ? "horizontal_type" : "vertical_type"; 2243 2244 2245 function initSlider_vebinar(type) { 2246 var sliderSettings = {}; 2247 if (type === "vertical_type") { 2248 sliderSettings = { 2249 slidesPerView: "auto", 2250 direction: 'vertical', 2251 // autoplay: { 2252 // delay: 4000, 2253 // }, 2254 spaceBetween: 30, 2255 loop: true, 2256 navigation: { 2257 nextEl: ".button_prev", 2258 prevEl: ".button_next", 2259 }, 2260 }; 2261 } else { 2262 sliderSettings = { 2263 slidesPerView: "auto", 2264 direction: 'horizontal', 2265 // autoplay: { 2266 // delay: 4000, 2267 // }, 2268 spaceBetween: 30, 2269 loop: true, 2270 navigation: { 2271 nextEl: ".button_prev", 2272 prevEl: ".button_next", 2273 }, 2274 }; 2275 } 2276 // Ïðîâåðÿåì, åñòü ëè â îáúåêòå ñëàéäåðà ìåòîä destroy, è åñëè åñòü - âûçûâàåì åãî. 2277 if (swiperSlider.destroy && typeof swiperSlider.destroy === "function") { 2278 swiperSlider.destroy(); 2279 } 2280 swiperSlider = new Swiper(sliderElement, sliderSettings); 2281 } 2282 2283if ((document.querySelector('.show_horizontal_swiper'))|| (document.querySelector('.show_vertical_swiper')) ){ 2284 initSlider_vebinar(sliderType); 2285} 2286 2287if ((document.querySelector('.show_horizontal_swiper_left'))|| (document.querySelector('.show_vertical_swiper_left')) ){ 2288 initSlider_vebinar(sliderType_left); 2289} 2290 2291 2292 2293 2294window.addEventListener("resize", () => { 2295 if (document.querySelector('.show_horizontal_swiper')) { 2296 sliderType = "horizontal_type"; 2297 initSlider_vebinar(sliderType); 2298 } else if (document.querySelector('.show_vertical_swiper')) { 2299 sliderType = "vertical_type"; 2300 initSlider_vebinar(sliderType); 2301 } 2302}); 2303window.addEventListener("resize", () => { 2304 if (document.querySelector('.show_horizontal_swiper_left')) { 2305 sliderType_left = "horizontal_type"; 2306 initSlider_vebinar(sliderType_left); 2307 } else if (document.querySelector('.show_vertical_swiper_left')) { 2308 sliderType_left = "vertical_type"; 2309 initSlider_vebinar(sliderType_left); 2310 } 2311}); 2312 2313 2314 2315 2316
2317 2318 //Êàðóñåëü íà ñòðàíèöå íîâîñòåé äëÿ êàðòèíîê â òåêñòà 2319 2320function func_mySwiper_news_img(){ 2321 var mySwiper_news_img = new Swiper('.mySwiper_news_img',{ 2322 slidesPerView: "auto", 2323 direction: 'horizontal', 2324 // autoplay: { 2325 // delay: 3000, 2326 // }, 2327 spaceBetween: 30, 2328 // loop: true, 2329 navigation: { 2330 nextEl: ".button_prev", 2331 prevEl: ".button_next", 2332 }, 2333 }); 2334} 2335 func_mySwiper_news_img(); 2336 $(window).resize('resize', func_mySwiper_news_img); 2337 2338 2339 2340 2341 //Êàðóñåëü áàííåðîâ íà ãëàâíîé ñòðàíèöå 2342 2343function func_mySwiper_banner(){ 2344 var mySwiper_news_img = new Swiper('.mySwiper_banner',{ 2345 loop: true, 2346 speed: 1000, // added(slide speed) 2347 effect: 'fade', // added(apply fade effect) 2348 autoplay: { 2349 delay: 2000, 2350 }, 2351 pagination: { 2352 el: '.swiper-pagination', 2353 type: 'bullets', 2354 clickable: true, 2355 }, 2356 navigation: { 2357 nextEl: ".right_button", 2358 prevEl: ".left_button", 2359 }, 2360 }); 2361} 2362 func_mySwiper_banner(); 2363 $(window).resize('resize', func_mySwiper_banner); 2364 2365 2366 2367function func_mySwiper_banner_el_res(){ 2368 var mySwiper_news_img = new Swiper('.mySwiper_banner_el_res',{ 2369 loop: true, 2370 speed: 1000, // added(slide speed) 2371 effect: 'fade', // added(apply fade effect) 2372 autoplay: { 2373 delay: 2000, 2374 }, 2375 pagination: { 2376 el: '.swiper-pagination', 2377 type: 'bullets', 2378 clickable: true, 2379 }, 2380 navigation: { 2381 nextEl: ".right_button", 2382 prevEl: ".left_button", 2383 }, 2384 }); 2385} 2386 func_mySwiper_banner_el_res(); 2387 $(window).resize('resize', func_mySwiper_banner_el_res); 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400// ×àñòíûì ëèöàì. Ïðàâàÿ êàðòèíêà â áëîêå 2401 2402 2403// function private_right_img_size(){ 2404 // if (document.querySelector('.private_area')) { 2405 // let total_temp; 2406 // if (page_body_width > 950){ 2407 // total_temp = 240; 2408 // } 2409 // else{ 2410 // total_temp = 150; 2411 // } 2412 2413 2414 2415 2416 // let temp_all = [...document.querySelectorAll(".private_area .img_right img")]; 2417 // temp_all.forEach((temp) => { 2418 // $('.private_area .img_right img').css('max-width', total_temp); 2419 // }); 2420 // temp_all.forEach((temp) => { 2421 // if (temp.offsetWidth < total_temp) { 2422 // total_temp = temp.offsetWidth; 2423 // } 2424 // }); 2425 2426 // total_temp_2 = total_temp * 25 / 24; 2427 // $('.private_area .img_right img').css('max-width', total_temp); 2428 // $('.private_area .img_right img').css('max-height', total_temp_2); 2429 // } 2430// } 2431 2432// private_right_img_size(); 2433// $(window).resize('resize', private_right_img_size); 2434 2435 2436 2437 2438 2439$('.icon_delivery').bind({ 2440 "mouseover": function(){ 2441 let temp_src = $(this).children('img').attr('src'); 2442 temp_src = temp_src.slice(0, -4); 2443 temp_src = temp_src + '_hover.svg'; 2444 // console.log('temp_src', temp_src); 2445 $(this).children('img').attr('src', temp_src); 2446 }, 2447 "mouseout": function(){ 2448 let temp_src = $(this).children('img').attr('src'); 2449 temp_src = temp_src.slice(0, -10);
2450 temp_src = temp_src + '.svg'; 2451 // console.log('temp_src', temp_src); 2452 $(this).children('img').attr('src', temp_src); 2453 // console.log('temp_src',temp_src); 2454 } 2455}); 2456 2457 2458 2459 2460 2461/*Óâåëè÷åíèå äîï êàðòèíîê â êàðóñåëè íà ñòðàíèöà Êàòàëîã 3 óðîâíÿ*/ 2462 2463 2464 2465 2466$('.zoom').bind({ 2467 "click": function(){ 2468 let img_src = $(this).attr('src'); 2469 2470 let img_height = $(this)[0].naturalHeight; 2471 let img_width = $(this)[0].naturalWidth; 2472 2473 2474 let win_height = window.innerHeight; 2475 let win_width = window.innerWidth; 2476 2477 let inner_height; 2478 let inner_width; 2479 2480 2481 if (img_height >= win_height ){ 2482 // console.log('if_1'); 2483 win_height = win_height - 80; 2484 inner_width = img_width * win_height / img_height; 2485 inner_height = win_height; 2486 if (inner_width > win_width){ 2487 win_width = win_width - 40; 2488 inner_height = img_height * win_width / img_width; 2489 inner_width = win_width; 2490 } 2491 2492 2493 2494 } 2495 else if (img_width >= win_width) { 2496 // console.log('if_2'); 2497 2498 win_width = win_width - 80; 2499 inner_height = img_height * win_width / img_width; 2500 inner_width = win_width; 2501 if (inner_height > win_height){ 2502 console.log('if_2'); 2503 win_height = win_height - 40; 2504 inner_width = img_width * win_height / img_height; 2505 inner_height = win_height; 2506 2507 } 2508 } 2509 else{ 2510 2511 // console.log('if_3'); 2512 inner_height = img_height; 2513 inner_width = img_width; 2514 } 2515 2516 2517 2518 $('.frame_show_big_image').css('display', 'block'); 2519 $('.frame_show_big_image .inner_image').css({ 2520 'display':'block', 2521 'background':'url(' + img_src + ')', 2522 'background-size': 'contain', 2523 'background-repeat':'no-repeat', 2524 'height': inner_height + 'px', 2525 'width': inner_width + 'px', 2526 }); 2527 2528 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 2529 } 2530}); 2531 2532 2533 2534/*Êàê è ãäå êóïèòü. Ñòðàíèöà ïîäïèñêè ïî ïî÷òå. Ðàñêðûâàøêà*/ 2535 2536$('.table_podpiska .title').bind({ 2537 "click": function(){ 2538 2539 // $(".table_podpiska .text").animate({height: 'hide'}, 500); 2540 // $(this).children('div').addClass("arrow_close"); 2541 // $(this).children('div').removeClass("arrow_open"); 2542 2543 2544 if ($(this).next(".text").css('display') == 'none') { 2545 2546 $(this).next(".text").animate({height: 'show'}, 500); 2547 $(this).children('div').addClass("arrow_open"); 2548 $(this).children('div').removeClass("arrow_close"); 2549 2550 } else { 2551 $(this).next(".text").animate({height: 'hide'}, 500); 2552 $(this).children('div').addClass("arrow_close"); 2553 $(this).children('div').removeClass("arrow_open"); 2554 } 2555 } 2556}); 2557 2558 2559$(window).on('resize', function(){ 2560 if (page_body_width > 750 ){ 2561 $(".table_podpiska .title_arrow").removeClass("arrow_open"); 2562 $(".table_podpiska .title_arrow").addClass("arrow_close"); 2563 $('.table_podpiska .text').css('display', 'block') 2564 } 2565 if (page_body_width <= 750){ 2566 $(".table_podpiska .title_arrow").removeClass("arrow_open"); 2567 $(".table_podpiska .title_arrow").addClass("arrow_close"); 2568 $('.table_podpiska .text').css('display', 'none') 2569 2570 } 2571 2572}); 2573 2574 2575/*Êàê è ãäå êóïèòü. Âîïðîñ îòâåò. Ðàñêðûâàøêà*/ 2576 2577$('.block_faq_single .title').bind({ 2578 "click": function(){ 2579 2580 // $(".table_podpiska .text").animate({height: 'hide'}, 500); 2581 // $(this).children('div').addClass("arrow_close"); 2582 // $(this).children('div').removeClass("arrow_open"); 2583 2584 2585 if ($(this).next(".text_block").css('display') == 'none') { 2586 2587 $(this).next(".text_block").animate({height: 'show'}, 500); 2588 $(this).toggleClass("active"); 2589 2590 } else { 2591 $(this).next(".text_block").animate({height: 'hide'}, 500); 2592 $(this).toggleClass("active"); 2593 } 2594 } 2595}); 2596 2597 2598 2599/*Êàòàëîã. îêíî ïîèñêà. ïîäñêàçêà*/ 2600 2601 2602 $('.block_catalog_search.show_hint input').bind({
2603 "focus": function(){ 2604 2605 console.log('hint'); 2606 2607 let hint_temp = document.querySelector('.block_catalog_search.show_hint'); 2608 hint_temp = hint_temp.getBoundingClientRect(); 2609 2610 let hint_pad_top = parseInt($('.block_catalog_search.show_hint').css('padding-top')); 2611 let hint_inner_height = parseInt($('.block_catalog_search.show_hint .block_catalog_search_inner').css('height')); 2612 2613 $('.block_seach_hint').css({ 2614 'display':'block', 2615 'left': hint_temp.left, 2616 'top': hint_temp.top + hint_pad_top + hint_inner_height + window.scrollY, 2617 'width': hint_temp.width - 2 +'px', 2618 }) 2619 2620 2621 2622 2623 }, 2624 "blur": function(){ 2625 $('.block_seach_hint').css({ 2626 'display':'none', 2627 }) 2628 } 2629 }); 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645/*Ðàçìåð êàðòû íà ñòðàíèöå êîíòàêòû Î íàñ*/ 2646 2647 2648 2649 2650function map_size_contacts(){ 2651 let map_width = parseInt($('.contacts_map_size').css('width')); 2652 // console.log('map_width', map_width); 2653 let map_height = map_width * 56/80; 2654 // console.log('map_height', map_height); 2655 $('.contacts_map_size').css('height', map_height + 'px') 2656 $('.contact_map_1 iframe').css({ 2657 'height': map_height - 2 + 'px', 2658 'width': map_width - 2 + 'px', 2659 }) 2660 2661} 2662 map_size_contacts(); 2663 $(window).resize('resize', map_size_contacts); 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676/*Îá èçäàíèè. Ïðàâîâàÿ èíôîðìàöèÿ. Ðàñêðûâàøêà*/ 2677 2678// $('.block_accrodion_area .header').bind({ 2679 // "click": function(){ 2680 2681 2682 2683 // if ($(this).children(".inner_area").css('display') == 'none') { 2684 2685 // $(this).children(".inner_area").animate({height: 'show'}, 500); 2686 // $(this).children('.header').children('.title').children('.title_arrow').addClass("arrow_open"); 2687 // $(this).children('.header').children('.title').children('.title_arrow').removeClass("arrow_close"); 2688 2689 // } else { 2690 // $(this).children(".inner_area").animate({height: 'hide'}, 500); 2691 // $(this).children('.header').children('.title').children('.title_arrow').addClass("arrow_close"); 2692 // $(this).children('.header').children('.title').children('.title_arrow').removeClass("arrow_open"); 2693 // } 2694 // } 2695// }); 2696 2697 2698$(window).on('resize', function(){ 2699 $(".block_accrodion_area .title_arrow").removeClass("arrow_open"); 2700 $(".block_accrodion_area .title_arrow").addClass("arrow_close"); 2701 $('.block_accrodion_area .inner_area').css('display', 'none') 2702}); 2703 2704 2705$('.block_accrodion_area .header').bind({ 2706 "click": function(){ 2707 2708 2709 if ($(this).next(".inner_area").css('display') == 'none') { 2710 2711 $(this).next(".inner_area").animate({height: 'show'}, 500); 2712 $(this).parent().children('.header').children('.title').children('.title_arrow').removeClass("arrow_close"); 2713 $(this).parent().children('.header').children('.title').children('.title_arrow').addClass("arrow_open"); 2714 2715 } else { 2716 $(this).next(".inner_area").animate({height: 'hide'}, 500); 2717 2718 $(this).parent().children('.header').children('.title').children('.title_arrow').addClass("arrow_close"); 2719 $(this).parent().children('.header').children('.title').children('.title_arrow').removeClass("arrow_open"); 2720 } 2721 } 2722}); 2723 2724 2725 2726 2727 2728 2729 2730 2731/*Îá èçäàòåëüñòâå. Ñòðàíèöà ïîäïèñêè ïî ïî÷òå. Ðàñêðûâàøêà*/ 2732 2733 2734 2735$('.table_area.line_block .td_0').bind({ 2736 "click": function(){ 2737 2738 if ($(this).parent(0).children(".line_block_inner").css('display') == 'none') { 2739 $(this).parent(0).children(".line_block_inner").animate({height: 'show'}, 500); 2740 $(this).toggleClass("active"); 2741 2742 } else { 2743 $(this).parent(0).children(".line_block_inner").animate({height: 'hide'}, 500); 2744 $(this).toggleClass("active"); 2745 } 2746 } 2747}); 2748 2749 2750 2751 2752$(window).on('resize', function(){ 2753 2754 $('.table_area.line_block .td_0').removeClass("active"); 2755 2756 if (page_body_width > 950 ){ 2757 $('.table_area.line_block .line_block_inner').css('display', 'flex'); 2758 } 2759 if (page_body_width <= 950 ){ 2760 2761 $('.table_area.line_block .line_block_inner').css('display', 'none') 2762 } 2763}); 2764 2765 2766 2767//Øèðèíà ôîðìû ïîääåðæêè 2768 2769 2770function support_width_area(){ 2771 if (document.querySelector('#formHolder')){ 2772 let support_width = $('#formHolder').attr('data-width'); 2773 2774 if (($(window).width()) > 720 ){ 2775 2776 } 2777 else{ 2778 support_width = $(window).width() - 40; 2779 // console.log('page_body_width',support_width); 2780 $('#formHolder').css('width', support_width + 'px'); 2781 $('.fieldWrapper').css('margin-inline', '0px'); 2782 } 2783 2784 2785 2786 2787 } 2788 2789 2790} 2791 support_width_area(); 2792 $(window).resize('resize', support_width_area); 2793 2794 2795 2796 2797 2798 2799 2800 2801//3ä ìîäåëè. ðàçìåð îòîáðàæåíèÿ 2802 2803 2804 2805 2806// function width_3d_area(){ 2807 // if (document.querySelector('.model_area_efu')){ 2808 // if ((window.innerWidth > 1650) || ((window.innerWidth < 1349) && (window.innerWidth > 1100)) || (window.innerWidth < 650)){ 2809 // let width_area_model = $(".model_area").innerWidth();
2810 // width_area_model = width_area_model - 30; 2811 2812 // let height_mode_2 = width_area_model * 9 / 16; 2813 // let height_mode_3 = width_area_model * 3 / 4; 2814 2815 // $('#model_02').empty(); 2816 // $('#model_03').empty(); 2817 // $('#model_04').empty(); 2818 // $('#model_05').empty(); 2819 2820 // let apnd_2 = '<div class="icon_arrows"></div><iframe id="model_02_frame" src="../image/el_res/efu/02/index.xhtml" frameborder="0"></iframe>'; 2821 // let apnd_3 = '<div class="icon_arrows"></div><iframe id="model_03_frame" src="../image/el_res/efu/03/index.xhtml" frameborder="0"></iframe>'; 2822 // let apnd_4 = '<div class="icon_arrows"></div><iframe id="model_04_frame" src="../image/el_res/efu/04/index.xhtml" frameborder="0"></iframe>'; 2823 // let apnd_5 = '<div class="icon_arrows"></div><iframe id="model_05_frame" src="../image/el_res/efu/05/index.xhtml" frameborder="0"></iframe>'; 2824 2825 // if (window.innerWidth > 650){ 2826 // $('#model_02').append(apnd_2); 2827 // $('#model_05').append(apnd_5); 2828 2829 // $("#model_02 iframe").css({ 2830 // 'width': Math.round(width_area_model) + 'px', 2831 // 'height': Math.round(height_mode_2) + 'px', 2832 // }) 2833 // $("#model_05 iframe").css({ 2834 // 'width': Math.round(width_area_model) + 'px', 2835 // 'height': Math.round(height_mode_3) + 'px', 2836 // }) 2837 // } 2838 2839 // $('#model_03').append(apnd_3); 2840 // $('#model_04').append(apnd_4); 2841 2842 // $("#model_03 iframe").css({ 2843 // 'width': Math.round(width_area_model) + 'px', 2844 // 'height': Math.round(height_mode_3) + 'px', 2845 // }) 2846 // $("#model_04 iframe").css({ 2847 // 'width': Math.round(width_area_model) + 'px', 2848 // 'height': Math.round(height_mode_2) + 'px', 2849 // }) 2850 2851 2852 2853 2854 // } 2855 2856 2857 // if (((window.innerWidth <= 1650) && (window.innerWidth > 1350)) || ((window.innerWidth <= 1100) && (window.innerWidth >= 650) )){ 2858 // let width_efu_video_right = $(".efu_video_right").innerWidth(); 2859 // let width_efu_video_right_gap = parseInt($('.model_area_efu').css('gap')); 2860 // width_efu_video_right = width_efu_video_right - width_efu_video_right_gap; 2861 2862 // let width_left_model = Math.round(width_efu_video_right * 0.57) - 30; 2863 // let width_right_model = Math.round(width_efu_video_right * 0.43) - 30; 2864 2865 // let height_mode_2 = width_left_model * 9 / 16; 2866 // let height_mode_3 = width_right_model * 3 / 4; 2867 2868 // $('#model_02').empty(); 2869 // $('#model_03').empty(); 2870 // $('#model_04').empty(); 2871 // $('#model_05').empty(); 2872 2873 // let apnd_2 = '<div class="icon_arrows"></div><iframe id="model_02_frame" src="../image/el_res/efu/02/index.xhtml" frameborder="0"></iframe>'; 2874 // let apnd_3 = '<div class="icon_arrows"></div><iframe id="model_03_frame" src="../image/el_res/efu/03/index.xhtml" frameborder="0"></iframe>'; 2875 // let apnd_4 = '<div class="icon_arrows"></div><iframe id="model_04_frame" src="../image/el_res/efu/04/index.xhtml" frameborder="0"></iframe>'; 2876 // let apnd_5 = '<div class="icon_arrows"></div><iframe id="model_05_frame" src="../image/el_res/efu/05/index.xhtml" frameborder="0"></iframe>'; 2877 // $('#model_02').append(apnd_2); 2878 // $('#model_03').append(apnd_3); 2879 // $('#model_04').append(apnd_4); 2880 // $('#model_05').append(apnd_5); 2881 2882 2883 // $("#model_02 iframe").css({ 2884 // 'width': Math.round(width_left_model) + 'px', 2885 // 'height': Math.round(height_mode_2) + 'px', 2886 // }) 2887 // $("#model_03 iframe").css({ 2888 // 'width': Math.round(width_right_model) + 'px', 2889 // 'height': Math.round(height_mode_3) + 'px', 2890 // }) 2891 // $("#model_04 iframe").css({ 2892 // 'width': Math.round(width_left_model) + 'px', 2893 // 'height': Math.round(height_mode_2) + 'px', 2894 // }) 2895 // $("#model_05 iframe").css({ 2896 // 'width': Math.round(width_right_model) + 'px', 2897 // 'height': Math.round(height_mode_3) + 'px', 2898 // }) 2899 2900 2901 // } 2902 // } 2903 2904// } 2905 2906 2907 // width_3d_area(); 2908 2909 // $(window).resize('resize', function () { 2910 // width_3d_area(); 2911 // if (document.querySelector('#model_02_frame')){ 2912 // document.getElementById('model_02_frame').src = document.getElementById('model_02_frame').src; 2913 // } 2914 // if (document.querySelector('#model_03_frame')){ 2915 // document.getElementById('model_03_frame').src = document.getElementById('model_03_frame').src; 2916 // } 2917 // if (document.querySelector('#model_04_frame')){ 2918 // document.getElementById('model_04_frame').src = document.getElementById('model_04_frame').src; 2919 // } 2920 // if (document.querySelector('#model_05_frame')){ 2921 // document.getElementById('model_05_frame').src = document.getElementById('model_05_frame').src; 2922 // } 2923 // }); 2924 2925 2926function width_3d_area(){ 2927 if (document.querySelector('.model_area_efu_single')){ 2928 2929 let width_efu_video_right = $(".model_area_efu_single").innerWidth(); 2930 2931 let width_right_model = Math.round(width_efu_video_right) - 30; 2932 2933 let height_mode_3 = width_right_model * 3 / 4; 2934 2935 $('#model_03').empty(); 2936 2937 let apnd_3 = '<div class="icon_arrows"></div><iframe id="model_03_frame" src="../image/el_res/efu/03/index.xhtml" frameborder="0"></iframe>'; 2938 2939 $('#model_03').append(apnd_3); 2940 2941 2942 2943 $("#model_03 iframe").css({ 2944 'width': Math.round(width_right_model) + 'px', 2945 'height': Math.round(height_mode_3) + 'px', 2946 }) 2947 2948 2949 } 2950 2951} 2952 2953 2954 width_3d_area(); 2955 2956 $(window).resize('resize', function () { 2957 width_3d_area(); 2958 2959 if (document.querySelector('#model_03_frame')){ 2960 document.getElementById('model_03_frame').src = document.getElementById('model_03_frame').src; 2961 } 2962 2963 }); 2964 2965 2966 2967function width_double_video(){ 2968 2969 if (document.querySelector('.video_area_efu_double')){ 2970 2971 if ((window.innerWidth > 1650) || ((window.innerWidth < 1349) && (window.innerWidth > 1100)) || (window.innerWidth < 650)){ 2972 let width_area_model = $(".video_area_efu").innerWidth();
2973 width_area_model = width_area_model - 30; 2974 2975 let height_mode_2 = width_area_model * 9 / 16; 2976 let height_mode_3 = width_area_model * 3 / 4; 2977 2978 $("#video_2 video").css({ 2979 'width': Math.round(width_area_model) + 'px', 2980 'height': Math.round(height_mode_2) + 'px', 2981 }) 2982 $("#video_5 video").css({ 2983 'width': Math.round(width_area_model) + 'px', 2984 'height': Math.round(height_mode_3) + 'px', 2985 }) 2986 } 2987 2988 2989 2990 if (((window.innerWidth <= 1650) && (window.innerWidth > 1350)) || ((window.innerWidth <= 1100) && (window.innerWidth >= 650) )){ 2991 let width_efu_video_right = $(".efu_video_right").innerWidth(); 2992 let width_efu_video_right_gap = parseInt($('.video_area_efu').css('gap')); 2993 width_efu_video_right = width_efu_video_right - width_efu_video_right_gap; 2994 let width_left_model = Math.round(width_efu_video_right * 0.57) - 30; 2995 let width_right_model = Math.round(width_efu_video_right * 0.43) - 30; 2996 2997 let height_mode_2 = width_left_model * 9 / 16; 2998 let height_mode_3 = width_right_model * 3 / 4; 2999 3000 $("#video_2 video").css({ 3001 'width': Math.round(width_left_model) + 'px', 3002 'height': Math.round(height_mode_2) + 'px', 3003 }) 3004 $("#video_5 video").css({ 3005 'width': Math.round(width_right_model) + 'px', 3006 'height': Math.round(height_mode_3) + 'px', 3007 }) 3008 3009 } 3010 } 3011} 3012 3013 width_double_video(); 3014 $(window).resize('resize', width_double_video); 3015 3016 3017 3018 3019 3020/*Âûñîòà òðåáîâàíèé äëÿ óñòàíîâêè*/ 3021 3022 3023function setup_height_text_area(){ 3024 if (document.querySelector('.eos_fix_req')){ 3025 $(".eos_fix_req .link_windows .text_area").css('height', 'auto'); 3026 $(".eos_fix_req .link_android .text_area").css('height', 'auto'); 3027 3028 if (window.innerWidth > 600){ 3029 let height_text_area_android = $(".eos_fix_req .link_android .text_area").innerHeight() - parseInt($(".eos_fix_req .link_android .text_area").css('padding-top')); 3030 let height_text_area_windows = $(".eos_fix_req .link_windows .text_area").innerHeight() - parseInt($(".eos_fix_req .link_windows .text_area").css('padding-top')); 3031 // console.log('height_text_area_android', height_text_area_android); 3032 // console.log('height_text_area_windows', height_text_area_windows); 3033 3034 if (height_text_area_android >= height_text_area_windows){ 3035 $(".eos_fix_req .link_windows .text_area").css('height', height_text_area_android + 'px'); 3036 $(".eos_fix_req .link_android .text_area").css('height', height_text_area_android + 'px'); 3037 } 3038 else{ 3039 $(".eos_fix_req .link_windows .text_area").css('height', height_text_area_windows + 'px'); 3040 $(".eos_fix_req .link_android .text_area").css('height', height_text_area_windows + 'px'); 3041 } 3042 } 3043 3044 } 3045} 3046 3047 3048 setup_height_text_area(); 3049 $(window).resize('resize', setup_height_text_area); 3050 3051 3052 3053/*Îïðåäåëåíèå ìîáèëüíûé èëè íåò*/ 3054 3055(function(){var a,b,c,d,e,f,g,h,i,j;b=window.device,a={},window.device=a,d=window.document.documentElement,j=window.navigator.userAgent.toLowerCase(),a.ios=function(){return a.iphone()||a.ipod()||a.ipad()},a.iphone=function(){return!a.windows()&&e("iphone")},a.ipod=function(){return e("ipod")},a.ipad=function(){return e("ipad")},a.android=function(){return!a.windows()&&e("android")},a.androidPhone=function(){return a.android()&&e("mobile")},a.androidTablet=function(){return a.android()&&!e("mobile")},a.blackberry=function(){return e("blackberry")||e("bb10")||e("rim")},a.blackberryPhone=function(){return a.blackberry()&&!e("tablet")},a.blackberryTablet=function(){return a.blackberry()&&e("tablet")},a.windows=function(){return e("windows")},a.windowsPhone=function(){return a.windows()&&e("phone")},a.windowsTablet=function(){return a.windows()&&e("touch")&&!a.windowsPhone()},a.fxos=function(){return(e("(mobile;")||e("(tablet;"))&&e("; rv:")},a.fxosPhone=function(){return a.fxos()&&e("mobile")},a.fxosTablet=function(){return a.fxos()&&e("tablet")},a.meego=function(){return e("meego")},a.cordova=function(){return window.cordova&&"file:"===location.protocol},a.nodeWebkit=function(){return"object"==typeof window.process},a.mobile=function(){return a.androidPhone()||a.iphone()||a.ipod()||a.windowsPhone()||a.blackberryPhone()||a.fxosPhone()||a.meego()},a.tablet=function(){return a.ipad()||a.androidTablet()||a.blackberryTablet()||a.windowsTablet()||a.fxosTablet()},a.desktop=function(){return!a.tablet()&&!a.mobile()},a.television=function(){var a;for(television=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html"],a=0;a<television.length;){if(e(television[a]))return!0;a++}return!1},a.portrait=function(){return window.innerHeight/window.innerWidth>1},a.landscape=function(){return window.innerHeight/window.innerWidth<1}
3055,a.noConflict=function(){return window.device=b,this},e=function(a){return-1!==j.indexOf(a)},g=function(a){var b;return b=new RegExp(a,"i"),d.className.match(b)},c=function(a){var b=null;g(a)||(b=d.className.replace(/^\s+|\s+$/g,""),d.className=b+" "+a)},i=function(a){g(a)&&(d.className=d.className.replace(" "+a,""))},a.ios()?a.ipad()?c("ios ipad tablet"):a.iphone()?c("ios iphone mobile"):a.ipod()&&c("ios ipod mobile"):a.android()?c(a.androidTablet()?"android tablet":"android mobile"):a.blackberry()?c(a.blackberryTablet()?"blackberry tablet":"blackberry mobile"):a.windows()?c(a.windowsTablet()?"windows tablet":a.windowsPhone()?"windows mobile":"desktop"):a.fxos()?c(a.fxosTablet()?"fxos tablet":"fxos mobile"):a.meego()?c("meego mobile"):a.nodeWebkit()?c("node-webkit"):a.television()?c("television"):a.desktop()&&c("desktop"),a.cordova()&&c("cordova"),f=function(){a.landscape()?(i("portrait"),c("landscape")):(i("landscape"),c("portrait"))},h=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(h,f,!1):window.attachEvent?window.attachEvent(h,f):window[h]=f,f(),"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:window.device=a}).call(this); 3056 3057 3058 3059 isMobile = !device.desktop(); 3060 // console.log(isMobile); 3061 3062 if(isMobile){ 3063 if (document.querySelector('#bibl_video1')){ 3064 document.getElementById("bibl_video1").addEventListener("pause", function(){ playVideo("bibl_video1"); }); 3065 console.log('#bibl_video1'); 3066 } 3067 if (document.querySelector('#bibl_video2')){ 3068 document.getElementById("bibl_video2").addEventListener("pause", function(){ playVideo("bibl_video2"); }); 3069 console.log('#bibl_video2'); 3070 } 3071 if (document.querySelector('#bibl_video3')){ 3072 document.getElementById("bibl_video3").addEventListener("pause", function(){ playVideo("bibl_video3"); }); 3073 console.log('#bibl_video3'); 3074 } 3075 3076 3077 if (document.querySelector('#video_model_2')){ 3078 document.getElementById("video_model_2").addEventListener("pause", function(){ playVideo("video_model_2"); }); 3079 console.log('#bibl_video3'); 3080 } 3081 if (document.querySelector('#video_model_4')){ 3082 document.getElementById("video_model_4").addEventListener("pause", function(){ playVideo("video_model_4"); }); 3083 console.log('#bibl_video3'); 3084 } 3085 if (document.querySelector('#video_model_5')){ 3086 document.getElementById("video_model_5").addEventListener("pause", function(){ playVideo("video_model_5"); }); 3087 console.log('#bibl_video3'); 3088 } 3089 if (document.querySelector('#mob_video1')){ 3090 document.getElementById("mob_video1").addEventListener("pause", function(){ playVideo("mob_video1"); }); 3091 } 3092 if (document.querySelector('#mob_video2')){ 3093 document.getElementById("mob_video2").addEventListener("pause", function(){ playVideo("mob_video2"); }); 3094 } 3095 if (document.querySelector('#mob_video3')){ 3096 document.getElementById("mob_video3").addEventListener("pause", function(){ playVideo("mob_video3"); }); 3097 } 3098 3099 $("#cont_1").on("click", function(){ 3100 // console.log("c2 clicked"); 3101 if(this.paused) this.play(); else this.pause(); 3102 }); 3103 $("#cont_2").on("click", function(){ 3104 // console.log("c2 clicked"); 3105 if(this.paused) this.play(); else this.pause(); 3106 }); 3107 $("#cont_3").on("click", function(){ 3108 // console.log("c2 clicked"); 3109 if(this.paused) this.play(); else this.pause(); 3110 }); 3111 $("#cont_4").on("click", function(){ 3112 // console.log("c2 clicked"); 3113 if(this.paused) this.play(); else this.pause(); 3114 }); 3115 3116 } 3117 3118 3119 3120function playVideo(videoID){ 3121 var videoElement = document.getElementById(videoID); 3122 videoElement.play(); 3123 console.log('play'); 3124} 3125 3126 3127 3128 3129 3130/*Ïîäìåíà ôîðì*/ 3131 3132 3133function input_placeholder_left(){ 3134 let vis_input = $('#input_left'); 3135 vis_input.on('input', function () { 3136 let a = vis_input.val(); 3137 test = document.getElementById("all_news_form").querySelector("input"); 3138 test.value = a; 3139 3140 }); 3141} 3142// function input_placeholder_footer(){ 3143 // let vis_input = $('#input_footer'); 3144 // vis_input.on('input', function () { 3145 // let a = vis_input.val(); 3146 // test = document.getElementById("all_news_form").querySelector("input"); 3147 // test.value = a; 3148 // }); 3149// } 3150function input_placeholder_bell(){ 3151 let vis_input = $('#input_bell'); 3152 vis_input.on('input', function () { 3153 let a = vis_input.val(); 3154 test = document.getElementById("all_news_form").querySelector("input"); 3155 test.value = a; 3156 }); 3157} 3158 3159// function input_placeholder_vebinar(){ 3160 // let vis_input = $('#input_vebinar'); 3161 // vis_input.on('input', function () { 3162 // let a = vis_input.val(); 3163 // test = document.getElementById("webinar_from").querySelector("input"); 3164 // test.value = a; 3165 // }); 3166// }
3167 setTimeout(input_placeholder_left, 100); 3168 // setTimeout(input_placeholder_footer, 100); 3169 setTimeout(input_placeholder_bell, 100); 3170 // setTimeout(input_placeholder_vebinar, 100); 3171 3172 3173 3174 3175 3176//Îãðàíè÷åíèå íà ïîêàç êîëè÷åñòâà ýëåìåíòîâ áëîêà íà ñòðàíèöå ïîèñêà 3177 3178 3179 //Áëîê Êíèãè 3180 3181 // function show_books(elem){ 3182 3183 // var sum_books = $('.block_show_catalog_inner_area'); 3184 // var kids = sum_books.children().length; 3185 // for (var i=5; i <= kids; i++){ 3186 // console.log('sum_books.children()', sum_books.children()) 3187 3188 // } 3189 // } 3190 3191 3192// show_books(); 3193 3194 3195 3196// function page_subs_proj_flex_to_grid_change() { 3197 // if (page_body_width <= 900) { 3198 // $('.subs_proj_area.flex').addClass('grid'); 3199 // console.log('work'); 3200 // } 3201 // else{ 3202 // $('.subs_proj_area.flex').removeClass('grid'); 3203 // } 3204 3205 3206// }; 3207 3208// page_subs_proj_flex_to_grid_change(); 3209// $(window).resize('resize', page_subs_proj_flex_to_grid_change); 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224//Ôîðìèðîâàíèå Ñïèñêà ðåãèîíîâ ïî ñòîëáöàì 3225 3226 3227function build_columns(){ 3228 if (document.querySelector('.block_links_region')){ 3229 var catalog_numb_elem = $(".block_links_region.no_show .link").length;//îáùåå êîëè÷åñòâî ýëåìåíòîâ 3230 var i;//Äëÿ óäîáñòâà ðàáîòû ñ id 3231 var temp_id;//ñþäà çàïèñûâàåòñÿ âðåìåííûé àéäè äëÿ ïîñòðîåíèå 3232 var temp_div;// çàïèñûâàþòñÿ âíóòðåííîñòè div 3233 var paste_div; //èñïîëüçóåòñÿ äëÿ ñáîðêè ñòîëáöà 3234 3235 3236 3237 for (i = 1; i < catalog_numb_elem+1 ; i++) {//i ñ åäèíèöû äëÿ äàëüíåéøåãî ïðîñ÷åòà ïî ñòîëáöàì 3238 $(".block_links_region.no_show .content_area").eq(i-1).attr('id', i); 3239 } 3240 3241 //î÷èùàåì êîëîíêè äëÿ âñòàâêè 3242 $('.block_links_region.grid_columns').innerHTML =''; 3243 3244 3245 if (page_body_width >= 1100){ 3246 $('.block_links_region.show .grid_columns').attr('id','colums_3s'); 3247 document.getElementById('colums_3s' ).innerHTML ='<div class="column_area column_1"></div>\n\t\t\t\t<div class="column_area column_2">\n\t\t\t\t</div><div class="column_area column_3"></div>' 3248 3249 var numb_elem_column = Math.ceil(catalog_numb_elem/3); 3250 console.log('column = ',numb_elem_column); 3251 for (i = 1; i < catalog_numb_elem + 1; i++) { 3252 if ( i >= 2*numb_elem_column+1){ 3253 temp_div = document.getElementById(i); 3254 paste_div = document.getElementById('colums_3s' ).getElementsByClassName( 'column_3' )[0]; 3255 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3256 } 3257 else if ( i >= numb_elem_column+1){ 3258 temp_div = document.getElementById(i); 3259 paste_div = document.getElementById('colums_3s' ).getElementsByClassName( 'column_2' )[0]; 3260 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3261 }else{ 3262 temp_div = document.getElementById(i); 3263 paste_div = document.getElementById('colums_3s' ).getElementsByClassName( 'column_1' )[0]; 3264 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3265 3266 } 3267 } 3268 } 3269 3270 if ((page_body_width < 1100)&&(page_body_width >= 680)){ 3271 $('.block_links_region.show .grid_columns').attr('id','colums_2s'); 3272 document.getElementById('colums_2s' ).innerHTML ='<div class="column_area column_1"></div>\n\t\t\t\t<div class="column_area column_2">' 3273 3274 for (i = 1; i < catalog_numb_elem + 1; i++) { 3275 if ( i % 2 === 0){ 3276 var temp_div = document.getElementById(i); 3277 var paste_div = document.getElementById('colums_2s' ).getElementsByClassName( 'column_2' )[0]; 3278 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3279 }else{ 3280 var temp_div = document.getElementById(i); 3281 var paste_div = document.getElementById('colums_2s' ).getElementsByClassName( 'column_1' )[0]; 3282 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3283 3284 } 3285 } 3286 } 3287 3288 if ((page_body_width < 680)){ 3289 $('.block_links_region.show .grid_columns').attr('id','colums_1s'); 3290 document.getElementById('colums_1s' ).innerHTML ='<div class="column_area column_1"></div>' 3291 for (i = 1; i < catalog_numb_elem + 1; i++) { 3292 var temp_div = document.getElementById(i); 3293 var paste_div = document.getElementById('colums_1s' ).getElementsByClassName( 'column_1' )[0]; 3294 paste_div.innerHTML = paste_div.innerHTML + temp_div.innerHTML; 3295 } 3296 } 3297 3298 } 3299} 3300 3301build_columns(); 3302 3303$(window).resize(function(){ 3304 build_columns() 3305}); 3306 3307 3308 3309/*Zoom äëÿ âñåõ ñòðàíèö*/ 3310 3311if (document.querySelector('.frame_show_big_image')){ 3312 3313}else{ 3314 $('body').append( 3315 '<div class="frame_show_big_image">'+ 3316 '<div class="inner_image"></div>'+ 3317 '<div id="frame_show_big_image_close"></div>'+ 3318 '</div>') 3319} 3320 3321 function zoomImg(){ 3322 let img_src = $(this).attr('src'); 3323 3324 let img_height = $(this)[0].naturalHeight;
3325 let img_width = $(this)[0].naturalWidth; 3326 3327 3328 let win_height = window.innerHeight; 3329 let win_width = window.innerWidth; 3330 3331 let inner_height; 3332 let inner_width; 3333 3334 3335 if (img_height >= win_height ){ 3336 // console.log('if_1'); 3337 win_height = win_height - 80; 3338 inner_width = img_width * win_height / img_height; 3339 inner_height = win_height; 3340 if (inner_width > win_width){ 3341 win_width = win_width - 40; 3342 inner_height = img_height * win_width / img_width; 3343 inner_width = win_width; 3344 } 3345 3346 3347 3348 } 3349 else if (img_width >= win_width) { 3350 // console.log('if_2'); 3351 3352 win_width = win_width - 80; 3353 inner_height = img_height * win_width / img_width; 3354 inner_width = win_width; 3355 if (inner_height > win_height){ 3356 console.log('if_2'); 3357 win_height = win_height - 40; 3358 inner_width = img_width * win_height / img_height; 3359 inner_height = win_height; 3360 3361 } 3362 } 3363 else{ 3364 3365 // console.log('if_3'); 3366 inner_height = img_height; 3367 inner_width = img_width; 3368 } 3369 3370 3371 3372 $('.frame_show_big_image').css('display', 'block'); 3373 $('.frame_show_big_image .inner_image').css({ 3374 'display':'block', 3375 'background':'url(' + img_src + ')', 3376 'background-size': 'contain', 3377 'background-repeat':'no-repeat', 3378 'height': inner_height + 'px', 3379 'width': inner_width + 'px', 3380 }); 3381 3382 $('.dark_layer_blocker').addClass('show_dark_layer_blocker'); 3383 } 3384 3385 3386 3387 3388 $('#frame_show_big_image_close').bind({ 3389 "click": function(){ 3390 $('.frame_show_big_image').css('display', 'none'); 3391 $('.dark_layer_blocker').removeClass('show_dark_layer_blocker'); 3392 } 3393 }); 3394 3395 3396 3397 3398 3399 3400 3401});
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.