1var nt; 2var nh; 3 4var TheaterPageID = 45; 5var AjaxURL = "/module/theater/ajax_public.php"; 6var JournalAjaxURL = "/module/infoblock/ajax_public.php"; 7var ChronicleAjaxURL = "/module/chronicle/ajax_public.php"; 8var PressAjaxURL = "/module/press/ajax_public.php"; 9var RadioAjaxURL = "/radio-muzkom/ajax.php?cmd=get_current_track_name"; 10var LNG_Download = "СкаÑаÑÑ"; 11 12// $.disAjaxWin.setOptions({ style: 'clear', shadow: "Y", shadow_opacity: 0.8, show_close: "N", effects: "N" }); 13 14//пÑи загÑÑзке Ñайла забиÑаем его Ð¸Ð¼Ñ Ð¸ заменÑем им ÑÐµÐºÑ Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ñ 15function handleFileSelect(evt) { 16 var files = evt.target.files; 17 18 for (var i = 0, f; i < files.length; i++) { 19 f = files[i]; 20 21 var reader = new FileReader(); 22 reader.onload = (function (theFile) { 23 return function (e) { 24 $(".btn_file span").text(theFile.name); 25 $(".btn_file").closest(".attach_file").addClass("active"); 26 }; 27 })(f); 28 reader.readAsDataURL(f); 29 } 30} 31 32function headerPagination() { 33 var wrap = $(".header .ticket_pagination"); 34 $(".header .slick-dots li button").each(function () { 35 $(this).attr("data-elem", $(this).text()); 36 var buyIink = $(this) 37 .closest(".main-slider") 38 .find('[data-slick-index="' + parseInt($(this).text() - 1) + '"]') 39 .data("performance"); 40 $("<span></span>") 41 .attr("data-elem", $(this).text()) 42 .attr("data-buylink", buyIink) 43 .appendTo(wrap); 44 }); 45 wrap.find("span").first().addClass("active"); 46} 47 48/*function headerNavWidth() { 49 if($('.fixed_active').length>0){ 50 var hcWidth = $('.fixed_active .header_cont .container').width(); 51 var logoWidth = $('.fixed_active .header_cont .logo').width(); 52 $('.fixed_active .header_nav_body').css({'width':hcWidth+'px','left':'-'+logoWidth+'px','display':'none'}); 53 }else { 54 $('.header_nav_body').css({'width':'1200px','left':'0px','display':'block'}); 55 } 56}*/ 57 58function resizeToCover() { 59 var min_w = 300; // минималÑÐ½Ð°Ñ ÑазÑеÑÐµÐ½Ð½Ð°Ñ Ð¨Ð¸Ñина видео 60 61 $(".main-slider .item").each(function () { 62 var elem_orig; 63 var elem_w_orig; 64 var elem_h_orig; 65 66 if ($(this).find("img").length > 0) { 67 elem_orig = $(this).find("img"); 68 elem_orig.parent().addClass("flexcenter"); 69 elem_w_orig = parseInt(elem_orig.width()); // иÑÑ Ð¾Ð´Ð½Ñе ÑазмеÑÑ img 70 elem_h_orig = parseInt(elem_orig.height()); 71 } else if ($(this).find("video").length > 0) { 72 elem_orig = $(this).find("video"); 73 elem_w_orig = parseInt(elem_orig.width()); // иÑÑ Ð¾Ð´Ð½Ñе ÑазмеÑÑ Ð²Ð¸Ð´ÐµÐ¾ 74 elem_h_orig = parseInt(elem_orig.height()); 75 } else if ($(this).find("iframe").length > 0) { 76 elem_orig = $(this).find("iframe"); 77 elem_w_orig = parseInt(elem_orig.width()); // иÑÑ Ð¾Ð´Ð½Ñе ÑазмеÑÑ Ð²Ð¸Ð´ÐµÐ¾ 78 elem_h_orig = parseInt(elem_orig.height()); 79 } else { 80 return; 81 } 82 83 // ÑÑÑановиÑе Ð´Ð»Ñ Ð¾ÐºÐ½Ð° пÑоÑмоÑÑа видео ÑÐ°Ð·Ð¼ÐµÑ Ð¾ÐºÐ½Ð° 84 $(this).width($(window).width()); 85 $(this).height($(window).height()); 86 87 // иÑполÑзоваÑÑ Ð½Ð°Ð¸Ð±Ð¾Ð»ÑÑий маÑÑÑабнÑй коÑÑÑиÑÐ¸ÐµÐ½Ñ Ð¿Ð¾ гоÑизонÑали / веÑÑикали 88 var scale_h = $(window).width() / elem_w_orig; 89 var scale_v = $(window).height() / elem_h_orig; 90 var scale = scale_h > scale_v ? scale_h : scale_v; 91 92 // не ÑазÑеÑаÑÑ Ð¼Ð°ÑÑÑабиÑÑемÑÑ ÑиÑÐ¸Ð½Ñ < минималÑÐ½Ð°Ñ Ð¨Ð¸Ñина видео 93 if (scale * elem_w_orig < min_w) { 94 scale = min_w / elem_w_orig; 95 } 96 97 // ÑепеÑÑ Ð¼Ð°ÑÑÑабиÑÑйÑе видео 98 elem_orig.width(scale * elem_w_orig); 99 elem_orig.height(scale * elem_h_orig); 100 101 // и ÑенÑÑиÑоваÑÑ ÐµÐ³Ð¾, пÑокÑÑÑÐ¸Ð²Ð°Ñ Ð¾ÐºÐ½Ð¾ пÑоÑмоÑÑа видео 102 elem_orig.css( 103 "marginLeft", 104 -(elem_orig.width() - $(window).width()) / 2 + "px" 105 ); 106 elem_orig.css( 107 "marginTop", 108 -(elem_orig.height() - $(window).height()) / 2 + "px" 109 ); 110 }); 111} 112 113function valid(e) {
114 $(this).find(".valid").removeClass("valid_error"); 115 116 $(this) 117 .find(".valid") 118 .each(function () { 119 if ($(this).hasClass("valid_name")) { 120 var $min = $(this).attr("minlength"); 121 var $textLeng = $(this).val().length; 122 if ($textLeng < $min) { 123 e.preventDefault(); 124 $(this).addClass("valid_error"); 125 } 126 } else if ($(this).hasClass("valid_email")) { 127 var $email = $(this) 128 .val() 129 .match(/^[0-9a-z-\.]+\@[0-9a-z-]{2,}\.[a-z]{2,}$/i); //пÑовеÑка на e-mail 130 if (!$email) { 131 e.preventDefault(); 132 // $(this).val(''); 133 $(this).addClass("valid_error"); 134 } 135 } else if ($(this).hasClass("valid_privacy")) { 136 if (!$(this).prop("checked")) { 137 $(this).closest("label").addClass("valid_error"); 138 } 139 } else if ($(this).val().length < $(this).attr("minlength")) { 140 e.preventDefault(); 141 $(this).addClass("valid_error"); 142 } 143 }); 144} 145 146function map() { 147 if (!document.getElementById("map")) return; 148 if ($(window).width() > 1024) { 149 // initMap() - ÑÑнкÑÐ¸Ñ Ð¸Ð½Ð¸ÑиализаÑии каÑÑÑ 150 function initMap() { 151 // ÐооÑдинаÑÑ ÑенÑÑа на каÑÑе. ШиÑоÑа: 56.2928515, ÐолгоÑа: 43.7866641 152 var centerLatLng = new google.maps.LatLng(55.0353724, 82.9266755); 153 // ÐбÑзаÑелÑнÑе опÑии Ñ ÐºÐ¾ÑоÑÑми бÑÐ´ÐµÑ Ð¿ÑоиниÑиализиÑованна каÑÑа 154 var mapOptions = { 155 center: centerLatLng, // ÐооÑдинаÑÑ ÑенÑÑа Ð¼Ñ Ð±ÐµÑем из пеÑеменной centerLatLng 156 zoom: 15, // ÐÑм по ÑмолÑаниÑ. ÐозможнÑе знаÑÐµÐ½Ð¸Ñ Ð¾Ñ 0 до 21 157 scrollwheel: true, 158 zoomControl: true, 159 navigationControl: false, 160 mapTypeControl: false, 161 scaleControl: false, 162 draggable: true, 163 disableDefaultUI: true, 164 styles: [ 165 { 166 featureType: "all", 167 elementType: "all", 168 stylers: [ 169 { hue: "#ff0000" }, 170 { saturation: -100 }, 171 { lightness: -30 }, 172 ], 173 }, 174 { 175 featureType: "all", 176 elementType: "labels", 177 stylers: [{ visibility: "on" }, { color: "#ff0000" }], 178 }, 179 { 180 featureType: "all", 181 elementType: "labels.text.fill", 182 stylers: [{ color: "#ffffff" }], 183 }, 184 { 185 featureType: "all", 186 elementType: "labels.text.stroke", 187 stylers: [{ color: "#353535" }], 188 }, 189 { 190 featureType: "administrative", 191 elementType: "labels", 192 stylers: [{ visibility: "on" }], 193 }, 194 { 195 featureType: "administrative.country", 196 elementType: "labels", 197 stylers: [{ visibility: "on" }], 198 }, 199 { 200 featureType: "administrative.province", 201 elementType: "labels", 202 stylers: [{ visibility: "off" }], 203 }, 204 { 205 featureType: "administrative.province", 206 elementType: "labels.text", 207 stylers: [{ visibility: "on" }], 208 }, 209 { 210 featureType: "administrative.locality", 211 elementType: "labels", 212 stylers: [{ visibility: "on" }], 213 }, 214 { 215 featureType: "administrative.locality", 216 elementType: "labels.text", 217 stylers: [{ hue: "#ff0000" }], 218 }, 219 { 220 featureType: "administrative.locality", 221 elementType: "labels.text.fill", 222 stylers: [{ color: "#a5a5a5" }], 223 }, 224 { 225 featureType: "administrative.locality", 226 elementType: "labels.text.stroke", 227 stylers: [{ color: "#5d5d5d" }], 228 }, 229 { 230 featureType: "administrative.neighborhood", 231 elementType: "labels", 232 stylers: [{ visibility: "off" }], 233 }, 234 { 235 featureType: "administrative.neighborhood", 236 elementType: "labels.text", 237 stylers: [{ visibility: "on" }], 238 }, 239 { 240 featureType: "administrative.land_parcel", 241 elementType: "labels", 242 stylers: [{ hue: "#ff0000" }, { visibility: "on" }], 243 }, 244 { 245 featureType: "landscape", 246 elementType: "geometry", 247 stylers: [{ color: "#656565" }], 248 }, 249 { 250 featureType: "landscape", 251 elementType: "labels", 252 stylers: [{ visibility: "on" }], 253 }, 254 { 255 featureType: "landscape.man_made", 256 elementType: "labels", 257 stylers: [{ visibility: "on" }], 258 }, 259 { 260 featureType: "landscape.natural", 261 elementType: "labels.text", 262 stylers: [{ visibility: "on" }], 263 }, 264 { 265 featureType: "landscape.natural.landcover", 266 elementType: "labels", 267 stylers: [{ visibility: "on" }], 268 }, 269 { 270 featureType: "landscape.natural.terrain", 271 elementType: "labels", 272 stylers: [{ visibility: "on" }], 273 }, 274 { 275 featureType: "poi", 276 elementType: "geometry.fill", 277 stylers: [{ color: "#505050" }], 278 }, 279 { 280 featureType: "poi", 281 elementType: "geometry.stroke", 282 stylers: [{ color: "#808080" }], 283 }, 284 { 285 featureType: "poi", 286 elementType: "labels", 287 stylers: [{ visibility: "off" }], 288 }, 289 { 290 featureType: "road", 291 elementType: "geometry", 292 stylers: [{ color: "#454545" }], 293 }, 294 { 295 featureType: "road", 296 elementType: "labels", 297 stylers: [{ visibility: "off" }], 298 }, 299 { 300 featureType: "road", 301 elementType: "labels.text", 302 stylers: [{ visibility: "on" }, { hue: "#ff0000" }], 303 }, 304 { 305 featureType: "road", 306 elementType: "labels.text.fill", 307 stylers: [{ color: "#b9b9b9" }], 308 }, 309 { 310 featureType: "transit", 311 elementType: "labels", 312 stylers: [ 313 { hue: "#000000" }, 314 { saturation: 100 }, 315 { lightness: -40 }, 316 { invert_lightness: true }, 317 { gamma: 1.5 },
318 { visibility: "off" }, 319 ], 320 }, 321 { 322 featureType: "water", 323 elementType: "labels", 324 stylers: [{ visibility: "off" }], 325 }, 326 ], 327 }; 328 // Создаем каÑÑÑ Ð²Ð½ÑÑÑи ÑлеменÑа #map 329 var map = new google.maps.Map(document.getElementById("map"), mapOptions); 330 331 new google.maps.Marker({ 332 position: centerLatLng, // ÐооÑдинаÑÑ ÑаÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¼Ð°ÑкеÑа. Рданном ÑлÑÑае кооÑдинаÑÑ Ð½Ð°Ñего маÑкеÑа ÑовпадаÑÑ Ñ ÑенÑÑом каÑÑÑ, но ÑазÑмееÑÑÑ Ð½Ð°Ð¼ никÑо не меÑÐ°ÐµÑ ÑоздаÑÑ Ð¾ÑделÑнÑÑ Ð¿ÐµÑеменнÑÑ Ð¸ ÑÑда помеÑÑиÑÑ Ð´ÑÑгие кооÑдинаÑÑ. 333 map: map, // ÐаÑÑа на коÑоÑÑÑ Ð½Ñжно добавиÑÑ Ð¼Ð°ÑÐºÐµÑ 334 title: "map_marker", // (ÐеобÑзаÑелÑно) ТекÑÑ Ð²ÑводимÑй в Ð¼Ð¾Ð¼ÐµÐ½Ñ Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ð° маÑÐºÐµÑ 335 icon: "/local/templates/mheads_teatr/media/img/map_marker.png", // (ÐеобÑзаÑелÑно) ÐÑÑÑ Ð´Ð¾ изобÑажениÑ, коÑоÑое бÑÐ´ÐµÑ Ð²ÑводиÑÑÑ Ð½Ð° каÑÑе вмеÑÑо ÑÑандаÑÑного маÑкеÑа 336 }); 337 338 /*$.getJSON("/newworld/media/js/map.json", {}, function(data){ 339 $.each(data.places, function(i, item){ 340 var marker = new google.maps.Marker({ 341 position: new google.maps.LatLng(item.lat, item.lng), 342 map: map, 343 title: item.title, 344 icon: item.icon 345 }); 346 347 /!* var infowindow = new google.maps.InfoWindow({ 348 content: "<h3>"+ item.title +"</h3><p>"+ item.description +"</p>" 349 });*!/ 350 351 google.maps.event.addListener(marker, 'click', function() { 352 infowindow.open(map, marker); 353 }); 354 }); 355 });*/ 356 } 357 // Ðдем полной загÑÑзки ÑÑÑаниÑÑ, поÑле ÑÑого запÑÑкаем initMap() 358 google.maps.event.addDomListener(window, "load", initMap); 359 } 360} 361 362$(document) 363 .on("click", ".header .ticket_pagination span", function (e) { 364 e.preventDefault(); 365 $( 366 '.header .slick-dots li button[data-elem="' + $(this).data("elem") + '"]' 367 ).trigger("click"); 368 369 var ticketLink = $(this).data("buylink"); 370 var $link = $(this).closest(".ticket").find(".ticket_buy"); 371 if (!ticketLink) $link.css("opacity", 0); 372 else $link.attr("href", ticketLink).css("opacity", 1); 373 374 $(this).closest(".ticket_pagination").find("span").removeClass("active"); 375 $(this).addClass("active"); 376 }) 377 .on("click", ".tab-menu li", function () { 378 var coltab = $(this).data("coltab"); 379 $(this).closest(".title").find(".poster_pagination_elem").hide(); 380 $(this) 381 .closest(".title") 382 .find('.poster_pagination_elem[data-colpag="' + coltab + '"]') 383 .show(); 384 }) 385 //ÐаÑÑомнÑй ÑÐµÐ»ÐµÐºÑ (section) 386 .on("click", ".section-header", function () { 387 var sect = $(this).closest(".section"); 388 sect.toggleClass("section__active"); 389 390 if (sect.hasClass("section__active")) { 391 $(".section").removeClass("section__active"); 392 sect.addClass("section__active"); 393 } 394 }) 395 .on("click", ".section-body li", function () { 396 var li_html = $(this).html(); 397 var li_data = $(this).data("select"); 398 var wrap = $(this).closest(".section"); 399 wrap.find(".calendar_title_data").html(li_html); 400 wrap.find(".section-input").val(li_data).trigger("change"); 401 wrap.removeClass("section__active"); 402 }) 403 .on("click", ".header_searth", function () { 404 $(this).addClass("active"); 405 }) 406 .on("click", ".header_menu_title", function () { 407 $(this).toggleClass("active"); 408 $(this).closest(".header_cont").toggleClass("active"); 409 if ($(this).hasClass("active")) { 410 $(this).closest(".header_cont").find(".header_cont_body").slideDown(); 411 $("body").addClass("mobile_menu_active"); 412 } else { 413 $(this).closest(".header_cont").find(".header_cont_body").slide
413Up(); 414 $("body").removeClass("mobile_menu_active"); 415 } 416 }) 417 // .on('click','.view_poster a',function(e){ 418 // e.preventDefault(); 419 // if(!$(this).hasClass('active')){ 420 // $(this).closest('.view_poster').find('a').removeClass('active'); 421 // $(this).addClass('active'); 422 // } 423 // }) 424 .on("submit", ".form_contacts", function (e) { 425 $(this).find(".valid_error").removeClass("valid_error"); 426 427 $(this) 428 .find(".valid") 429 .each(function () { 430 if ($(this).hasClass("valid_name")) { 431 var $min = $(this).attr("minlength"); 432 433 var $textLeng = $(this).val().length; 434 435 if ($textLeng < $min) { 436 e.preventDefault(); 437 $(this).addClass("valid_error"); 438 } 439 } else if ($(this).hasClass("valid_email")) { 440 var $email = $(this) 441 .val() 442 .match(/^[0-9a-z-\.]+\@[0-9a-z-]{2,}\.[a-z]{2,}$/i); //пÑовеÑка на e-mail 443 if (!$email) { 444 e.preventDefault(); 445 // $(this).val(''); 446 $(this).addClass("valid_error"); 447 } 448 }
448 else if ($(this).hasClass("valid_privacy")) { 449 if (!$(this).prop("checked")) { 450 e.preventDefault(); 451 $(this).closest("label").addClass("valid_error"); 452 } 453 } else if ($(this).val().length < $(this).attr("minlength")) { 454 e.preventDefault(); 455 $(this).addClass("valid_error"); 456 } 457 }); 458 }) 459 .on("click keyup change keypress", ".valid", function (e) { 460 if ($(this).hasClass("valid_name")) { 461 var $min = $(this).attr("minlength"); 462 var $textLeng = $(this).val().length; 463 464 if ($textLeng > $min) { 465 $(this).removeClass("valid_error"); 466 } 467 } else if ($(this).hasClass("valid_email")) { 468 var $email = $(this) 469 .val() 470 .match(/^[0-9a-z-\.]+\@[0-9a-z-]{2,}\.[a-z]{2,}$/i); //пÑовеÑка на e-mail 471 if ($email) { 472 $(this).removeClass("valid_error"); 473 } 474 } else if ($(this).hasClass("valid_privacy")) { 475 if ($(this).prop("checked")) { 476 $(this).closest("label").removeClass("valid_error"); 477 } 478 } else if ($(this).val().length >= $(this).attr("minlength")) { 479 $(this).removeClass("valid_error"); 480 } 481 }) 482 //Ðлик по ÑлеменÑÑ Ð°ÐºÐºÐ¾Ñдиона 483 .on("click", ".accordion_item", function () { 484 var $thisTitle = $(this); 485 var $thisItem = $(this).closest(".accordion_item"); 486 var $thisBody = $(this).closest(".accordion_item").find(".accordion_body"); 487 $thisItem.toggleClass("accordion_item_active"); 488 if ($thisItem.hasClass("accordion_item_active")) { 489 $thisBody.slideDown("fast"); 490 } else {
491 $thisBody.slideUp("fast"); 492 } 493 }) 494 //Ñдаление загÑÑженнÑÑ Ñайлов 495 .on("click", ".svg_remove_file", function (e) { 496 $(this).closest(".attach_file").removeClass("active"); 497 $(this).closest(".attach_file").find(".inp_file").val(""); 498 $(this) 499 .closest(".attach_file") 500 .find("button.btn_file span") 501 .text("ÐÑикÑепиÑÑ ÑезÑме"); 502 }) 503 .on("click", ".popup__close", function (e) { 504 e.preventDefault(); 505 $(this).closest(".popup_radio").fadeOut(400); 506 }) 507 .on("click", ".data_slider_elem a", function (e) {}) 508 .ready(function () { 509 //ÐагÑÑзка докÑменÑа 510 $(".btn_file").on("click", function (e) { 511 $(this).closest(".attach_file").find(".inp_file").trigger("click"); 512 }); 513 $(".inp_file").on("change", handleFileSelect); 514 515 //ÐагÑÑзка select 516 $(".section .section-input").each(function () { 517 if (!!$(this).val().trim()) { 518 var $thisVal = $(this).val(); 519 var $data = $(this) 520 .closest(".section") 521 .find(".section-body li[data-select=" + $thisVal + "]") 522 .html(); 523 $(this).closest(".section").find(".calendar_title_data").html($data); 524 } else { 525 var wrap = $(this).closest(".section"); 526 var title = wrap.find(".section-title").data("title"); 527 wrap.find(".calendar_title_data").html(title); 528 } 529 }); 530 531 //ÐагÑÑзка аккоÑдеона 532 if ($(".accordion").length) { 533 $(".accordion .accordion_item").each(function () { 534 $(this).removeClass("accordion_item_active"); 535 $(this).find(".accordion_body").hide(); 536 }); 537 } 538 539 //СкÑÑÑие ÑлеменÑов пÑи клике мимо 540 $(document).on("click touchend", function (e) { 541 if ($(e.target).closest(".section").length == 0) 542 $(".section").removeClass("section__active"); 543 544 if ($(e.target).closest(".header").length == 0) { 545 $(".header_menu_title").removeClass("active"); 546 $(".header_cont").removeClass("active"); 547 $(".fixed_active .header_cont_body").slideUp(); 548 $("body").removeClass("mobile_menu_active"); 549 } 550 551 if ($(e.target).closest(".header_searth").length == 0) { 552 $(".header_searth").removeClass("active").find(".input_searth").val(""); 553 } 554 if ( 555 $(e.target).closest(".popup_radio_main").length == 0 && 556 $(e.target).closest(".radio_wrap").length == 0 && 557 $(e.target).closest(".muzkom_title_elem .radio_but_modal").length == 0 558 ) { 559 $(".popup_radio").fadeOut(400); 560 } 561 }); 562 563 /*var header_slider = new Swiper('.header_slider', { 564 slidesPerView: 1, 565 loop: true, 566 effect: 'fade', 567 pagination: { 568 el: '.header_slider_pagination', 569 clickable: true, 570 renderBullet: function (index, className) { 571 return '<span class="' + className + '">' + (index + 1) + '</span>'; 572 }, 573 574 }, 575 });*/ 576 577 var month_slider = new Swiper(".month_slider", { 578 slidesPerView: "auto", 579 navigation: { 580 nextEl: ".swiper-button-next", 581 prevEl: ".swiper-button-prev", 582 }, 583 }); 584 585 var data_slider = new Swiper(".data_slider", { 586 slidesPerView: "auto", 587 navigation: { 588 nextEl: ".swiper-button-next", 589 prevEl: ".swiper-button-prev", 590 }, 591 }); 592 593 $(".main-slider .item").each(function (index) { 594 if ($(this).find("iframe").length > 0) { 595 var iframeSrc = $(this).find("iframe").attr("src"); 596 var idVideo = iframeSrc.split("/"); 597 if (index == 0) { 598 $(this) 599 .find("iframe") 600 .attr( 601 "src", 602 iframeSrc + 603 "?enablejsapi=1&rel=0&controls=0&showinfo=0&autoplay=1&loop=1&mute=1&mute=0&disablekb=1&playlist=" + 604 idVideo[idVideo.length - 1] 605 ); 606 } else { 607 $(this) 608 .find("iframe") 609 .attr( 610 "src", 611 iframeSrc + 612 "?enablejsapi=1&rel=0&controls=0&showinfo=0&autoplay=0&loop=1&mute=1&mute=0&disablekb=1&playlist=" + 613 idVideo[idVideo.length - 1] 614 ); 615 } 616 } 617 }); 618 619 $(function () { 620 // вÑполнÑеÑÑÑ Ð¿Ð¾Ñле загÑÑзки DOM 621 $(window).resize(function () { 622 resizeToCover(); 623 }); 624 $(window).trigger("resize"); 625 headerPagination(); 626 }); 627 628 $("[data-fancybox]").fancybox({ 629 image: { 630 protect: true, 631 }, 632 afterShow: function (instance, slide) { 633 $(this["src"] + " .detail-slaider .owl-item.active div.active2").on( 634 "click" 635 ); 636 var original = $( 637 this["src"] + " .detail-slaider .owl-item.active div.active2" 638 ).data("original"); 639 $(".big-slaid .d-wrap") 640 .empty() 641 .css({ 642 backgroundImage: "url(" + original + ")", 643 }); 644 delete original; 645 }, 646 }); 647 648 //ТÐÐЫ 649 if ($(".tab-wrap").length) { 650 var $wrapper = $(".tab-wrap"), 651 $allTabs = $wrapper.find(".tab-content > div"), 652 $tabMenu = $wrapper.find(".tab-menu li"); 653 654 $allTabs.not(":first-of-type").hide(); 655 $tabMenu.filter(":first-of-type").find(":first").width("100%"); 656 657 $tabMenu.each(function (i) { 658 i = ++i; 659 $(this).attr("data-tab", "tab" + i); 660 $(this).attr("data-Coltab", i); 661 }); 662 663 $allTabs.each(function (i) { 664 i = ++i; 665 $(this).attr("data-tab", "tab" + i); 666 $(this).attr("data-Coltab", i); 667 }); 668 669 $tabMenu.on("click", function () { 670 var dataTab = $(this).data("tab"), 671 $getWrapper = $(this).closest($wrapper); 672 673 $getWrapper.find($tabMenu).removeClass("active"); 674 $(this).addClass("active"); 675 676 $getWrapper.find($allTabs).hide(); 677 $getWrapper 678 .find($allTabs) 679 .filter("[data-tab=" + dataTab + "]") 680 .show(); 681 }); 682 } 683 684 $(window).on("load", function () { 685 $.when($(".preloader").fadeIn()).done(function () { 686 setTimeout(function () { 687 $(".tab-content_main").addClass("load"); 688 $(".preloader").fadeOut(); 689 }, 1000); 690 }); 691 692 var poster_slider1 = new Swiper(".poster_slider1", { 693 slidesPerView: "auto", 694 centeredSlides: true, 695 spaceBetween: 30, 696 pagination: { 697 el: ".swiper-pagination", 698 clickable: true, 699 }, 700 navigation: { 701 nextEl: ".swiper-button-next", 702 prevEl: ".swiper-button-prev", 703 }, 704 }); 705 var poster_slider2 = new Swiper(".poster_slider2", { 706 slidesPerView: "auto", 707 centeredSlides: true, 708 spaceBetween: 30, 709 pagination: { 710 el: ".swiper-pagination", 711 clickable: true, 712 }, 713 navigation: { 714 nextEl: ".swiper-button-next", 715 prevEl: ".swiper-button-prev", 716 }, 717 }); 718 var poster_slider3 = new Swiper(".poster_slider3", { 719 slidesPerView: "auto", 720 centeredSlides: true, 721 spaceBetween: 30, 722 pagination: { 723 el: ".swiper-pagination", 724 clickable: true, 725 }, 726 navigation: { 727 nextEl: ".swiper-button-next", 728 prevEl: ".swiper-button-prev", 729 }, 730 }); 731 732 var poster_slider4 = new Swiper(".poster_slider_photo", { 733 slidesPerView: "auto", 734 centeredSlides: true, 735 spaceBetween: 30, 736 slidesOffsetBefore: -405, 737 pagination: { 738 el: ".team_entry_photo .swiper-pagination", 739 clickable: true, 740 }, 741 navigation: { 742 nextEl: ".team_entry_photo .swiper-button-next", 743 prevEl: ".team_entry_photo .swiper-button-prev", 744 }, 745 breakpoints: { 746 1220: { 747 slidesOffsetBefore: 0, 748 centeredSlides: false, 749 }, 750 }, 751 }); 752 753 var poster_slider5 = new Swiper(".poster_slider_video", { 754 slidesPerView: "auto", 755 centeredSlides: true, 756 spaceBetween: 30, 757 slidesOffsetBefore: -405, 758 pagination: { 759 el: ".show_entry_video .swiper-pagination", 760 clickable: true, 761 }, 762 navigation: { 763 nextEl: ".show_entry_video .swiper-button-next", 764 prevEl: ".show_entry_video .swiper-button-prev", 765 }, 766 breakpoints: { 767 1220: { 768 slidesOffsetBefore: 0, 769 centeredSlides: false, 770 }, 771 }, 772 }); 773 }); 774 775 map(); 776 777 $(window).on("orientationchange resize", function () { 778 map(); 779 780 if ($(window).width() > 768) { 781 if ($("body").hasClass("fixed_active")) { 782 $(".header_cont_body").css("display", "none"); 783 } else { 784 $(".header_cont_body").css("display", "block"); 785 } 786 } else { 787 $(".header_cont_body").css("display", "none"); 788 $(".header_menu_title").removeClass("active"); 789 $(".header_cont").removeClass("active"); 790 } 791 //$('.header_cont_body').hide(); 792 }); 793 794 $(window).on("orientationchange resize load", function () { 795 nh = parseInt(($(".header").outerHeight(true) / 3) * 2); 796 797 /* headerNavWidth();*/ 798 799 $.when().done(function () {}); 800 }); 801 802 $(window).scroll(function () { 803 if ($(this).scrollTop() >= nh) { 804 $("body").addClass("fixed_active"); 805 if (!$("body").hasClass("mobile_menu_active")) { 806 $(".header_cont_body").css("display", "none"); 807 } 808 } else { 809 $("body").removeClass("fixed_active").removeClass("mobile_menu_active"); 810 $(".header_menu_title").removeClass("active"); 811 /*$('.header_cont_body').css('display','block');*/ 812 if ($(window).width() >= 768) { 813 $(".header_cont_body").removeAttr("style"); 814 } else { 815 $(".header_cont_body").css("display", "none"); 816 } 817 } 818 819 /* headerNavWidth();*/ 820 }); 821 822 /* ==============================================================*/ 823 824 // $.cookie("SelectedChronicleYear", '', { path: "/" }); 825 826 // if ($.cookie("Volume") && $.cookie("Volume") != null) { 827 // var volume = $.cookie("Volume"); 828 // } else { 829 // var volume = $.jPlayer.prototype.options.volume; 830 // } 831 832 // var myPlayer = $("#jquery_jplayer"), 833 // myPlayerData, 834 // fixFlash_mp4, // Flag: The m4a and m4v Flash player gives some old currentTime values when changed. 835 // fixFlash_mp4_id, // Timeout ID used with fixFlash_mp4 836 // ignore_timeupdate, // Flag used with fixFlash_mp4 837 // options = { 838 // 'volume': volume, 839 // ready: function(event) { 840 // // Hide the volume slider on mobile browsers. ie., They have no effect. 841 // if (event.jPlayer.status.noVolume) { 842 // // Add a class and then CSS rules deal with it. 843 // $(".jp-gui").addClass("jp-no-volume"); 844 // } 845 // // Determine if Flash is being used and the mp4 media type is supplied. BTW, Supplying both mp3 and mp4 is pointless. 846 // fixFlash_mp4 = event.jPlayer.flash.used && /m4a|m4v/.test(event.jPlayer.options.supplied); 847 // // Setup the player with media. 848 // $(this).jPlayer("setMedia", { 849 // mp3: "http://s02.radio-tochka.com:5000/stream" 850 // }); 851 // if ($.cookie("Autoplay") == 1) { 852 // $(this).jPlayer("play"); 853 // } 854 // }, 855 // volumechange: function(event) { 856 // if (event.jPlayer.options.muted) { 857 // myControl.volume.slider("value", 0); 858 // } else { 859 // myControl.volume.slider("value", event.jPlayer.options.volume); 860 // } 861 // }, 862 // swfPath: "js", 863 // supplied: "m4a, oga, mp3", 864 // cssSelectorAncestor: "#jp_container", 865 // wmode: "window", 866 // keyEnabled: true 867 // }, 868 // myControl = { 869 // volume: $(options.cssSelectorAncestor + " .jp-volume-slider") 870 // }; 871 872 // Instance jPlayer 873 // myPlayer.jPlayer(options); 874 875 // A pointer to the jPlayer data object 876 // myPlayerData = myPlayer.data("jPlayer"); 877 878 // Define hover states of the buttons 879 $(".jp-gui ul li").hover( 880 function () { 881 $(this).addClass("ui-state-hover"); 882 }, 883 function () { 884 $(this).removeClass("ui-state-hover"); 885 } 886 ); 887 888 // $("#volume,#volume_1").slider({ 889 // animate: "fast", 890 // max: 1, 891 // range: "min", 892 // step: 0.01, 893 // value: volume, 894 // slide: function(event, ui) { 895 // myPlayer.jPlayer("option", "muted", false); 896 // myPlayer.jPlayer("option", "volume", ui.value); 897 // } 898 // }); 899 900 // $("#jquery_jplayer").bind($.jPlayer.event.play, function(event) { // Add a listener to report the time play began 901 // $.cookie("Autoplay", 1); 902 // }); 903 // $("#jquery_jplayer").bind($.jPlayer.event.stop, function(event) { // Add a listener to report the time play began 904 // $.cookie("Autoplay", null); 905 // }); 906 // $("#jquery_jplayer").bind($.jPlayer.event.pause, function(event) { // Add a listener to report the time play began 907 // $.cookie("Autoplay", null); 908 // }); 909 // $("#jquery_jplayer").bind($.jPlayer.event.volumechange, function(event) { // Add a listener to report the time play began 910 // $.cookie("Volume", $("#jquery_jplayer").jPlayer("option", "volume")); 911 // }); 912 }); 913 914var radioModal = { 915 show: function () { 916 var self = this; 917 var $modal = $("#radio_modal"), 918 $inner = $modal.find(".popup_radio_main"); 919 $modal.show(0, function () {
920 //ÐолÑÑаем ÑиÑÐ¸Ð½Ñ Ð¸ вÑÑоÑÑ Ð¾ÐºÐ½Ð° 921 var winH = $(window).height(); 922 var winW = $(window).width(); 923 924 $modal.css("height", winH); 925 $modal.css("width", winW); 926 927 //УÑÑанавливаем вÑплÑваÑÑее окно по ÑенÑÑÑ 928 $inner.css("top", winH / 2 - $inner.height() / 2); 929 $inner.css("left", winW / 2 - $inner.width() / 2); 930 //ÑÑÑÐµÐºÑ Ð¿ÐµÑÐµÑ Ð¾Ð´Ð° 931 932 $modal.animate( 933 { 934 opacity: "1", 935 }, 936 400 937 ); 938 939 // self._startTracker(); 940 }); 941 }, 942 _trackerBusy: false, 943 _trackerTimer: null, 944 _startTracker: function () { 945 var self = this; 946 if (self._trackerTimer !== null) return; 947 948 function updateTrackName() { 949 if (self._trackerBusy !== true) { 950 self._trackerBusy = true; 951 $.ajax({ 952 url: RadioAjaxURL, 953 dataType: "json", 954 success: function (res) { 955 $(".js__radio_now_track").html(res.TrackName); 956 self._trackerBusy = false; 957 }, 958 error: function () { 959 self._trackerBusy = false; 960 }, 961 }); 962 } 963 } 964 updateTrackName(); 965 966 self._trackerTimer = setInterval(updateTrackName, 5000); 967 }, 968}; 969$(document).on("click", "[radio_modal]", function (e) { 970 e.preventDefault(); 971 radioModal.show(); 972});
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.