1(function ($) { 2 "use strict"; 3 /*------------------------------------------------------------------ 4 [Table of contents] 5 6 [1] navigation 7 [2] banner slider 8 [3] about video 9 [4] recent work tab 10 [5] funfact 11 [6] testmonial slider 12 [7] testmonial slider v2 13 [8] back to top 14 [9] wow animatation 15 [10] video popup 16 [11] our project grid layout 17 [12] gallery image popup 18 [13] header search 19 [14] about funfact 20 [15] company timeline 21 [16] testimonial slider 22 [17] contact form init 23 [18] preloader 24 -------------------------------------------------------------------*/ 25 26 $(window).on("load", function () { 27 /*========================================================== 28 prelaoder 29 ======================================================================*/ 30 $("#preloader").addClass("loaded"); 31 32 // preloader close 33 $(".cancel-preloader").on("click", function (e) { 34 e.preventDefault(); 35 if (!$("#preloader").hasClass("loaded")) { 36 $("#preloader").addClass("loaded"); 37 } 38 }); 39 40 /*========================================================== 41 our project grid layout 42 ======================================================================*/ 43 44 if ($(".xs-portfolio-grid").length > 0) { 45 var $portfolioGrid = $(".xs-portfolio-grid"), 46 colWidth = function () { 47 var w = $portfolioGrid.width(), 48 columnNum = 1, 49 columnWidth = 0; 50 if (w > 1200) { 51 columnNum = 3; 52 } else if (w > 900) { 53 columnNum = 3; 54 } else if (w > 600) { 55 columnNum = 2; 56 } else if (w > 450) { 57 columnNum = 2; 58 } else if (w > 385) { 59 columnNum = 1; 60 } 61 columnWidth = Math.floor(w / columnNum); 62 $portfolioGrid 63 .find(".xs-portfolio-grid-item") 64 .each(function () { 65 var $item = $(this), 66 multiplier_w = $item 67 .attr("class") 68 .match(/xs-portfolio-grid-item-w(\d)/), 69 multiplier_h = $item 70 .attr("class") 71 .match(/xs-portfolio-grid-item-h(\d)/), 72 width = multiplier_w 73 ? columnWidth * multiplier_w[1] 74 : columnWidth, 75 height = multiplier_h 76 ? columnWidth * multiplier_h[1] * 0.4 - 12 77 : columnWidth * 0.3; 78 $item.css({ 79 width: width, 80 //height: height 81 }); 82 }); 83 return columnWidth; 84 }, 85 isotope = function () { 86 $portfolioGrid.isotope({ 87 resizable: true, 88 itemSelector: ".xs-portfolio-grid-item", 89 masonry: { 90 columnWidth: colWidth(), 91 gutterWidth: 3, 92 }, 93 }); 94 }; 95 isotope(); 96 $(window).resize(isotope); 97 } // End is_exists 98 99 // filter items on button click 100 $(".filter").on("click", function () { 101 var filterValue = $(this).attr("data-filter"); 102 $(".grid").isotope({ filter: filterValue }); 103 $(".filter").removeClass("active").attr("aria-current", "false"); 104 $(this).addClass("active").attr("aria-current", "true"); 105 }); 106 107 // Klavye ile filtreleme tetiklemesi eklenmesi 108 $(".filter").on("keydown", function (e) { 109 if (e.key === "Enter" || e.key === " ") { 110 e.preventDefault(); 111 $(this).trigger("click"); 112 } 113 }); 114 }); 115 116 /*========================================================== 117 email patern 118 ======================================================================*/ 119 function email_pattern(email) { 120 var regex = 121 /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; 122 return regex.test(email); 123 } 124 125 /*========================================================== 126 navigation 127 ======================================================================*/ 128 if ($("#navigation1").length > 0) { 129 $("#navigation1").navigation({ 130 effect: "slide", 131 }); 132 } 133 134 /*========================================================== 135 banner slider 136 ======================================================================*/ 137 if ($(".banner-slider").length > 0) { 138 var bannerSlider = $(".banner-slider"); 139 bannerSlider.owlCarousel({ 140 items: 1, 141 loop: true, 142 mouseDrag: true, 143 touchDrag: true, 144 dots: false, 145 nav: true, 146 navText: [ 147 '<i class="icon icon-chevron-left"></i>', 148 '<i class="icon icon-chevron-right"></i>', 149 ], 150 autoplay: true, 151 autoplayTimeout: 5000, 152 autoplayHoverPause: true, 153 transitionStyle: "fade",
154 smartSpeed: 800, 155 responsive: { 156 // breakpoint from 0 up 157 0: { 158 nav: false, 159 }, 160 // breakpoint from 480 up 161 480: { 162 nav: false, 163 }, 164 // breakpoint from 768 up 165 991: { 166 nav: true, 167 }, 168 }, 169 }); 170 171 // Banner Slider Autoplay Play/Pause Toggle Control (WCAG 2.2.2) 172 $("#btn-toggle-play").on("click", function () { 173 var $button = $(this); 174 var $icon = $button.find("i"); 175 var $text = $button.find(".btn-text"); 176 177 if ($icon.hasClass("fa-pause")) { 178 // Stop autoplay 179 bannerSlider.trigger("stop.owl.autoplay"); 180 $icon.removeClass("fa-pause").addClass("fa-play"); 181 $text.text("Oynat"); 182 $button.attr("aria-label", "Slayt gösterisini baÅlat"); 183 } else { 184 // Start autoplay 185 bannerSlider.trigger("play.owl.autoplay", [5000]); 186 $icon.removeClass("fa-play").addClass("fa-pause"); 187 $text.text("Duraklat"); 188 $button.attr("aria-label", "Slayt gösterisini duraklat"); 189 } 190 }); 191 } 192 193 /*========================================================== 194 about video 195 ======================================================================*/ 196 $(".xs-video").magnificPopup({ 197 type: "iframe", 198 }); 199 200 /*========================================================== 201 recent work 202 ======================================================================*/ 203 $("#mixcontent").mixItUp({ 204 animation: { 205 effects: "fade translateX(50%)", 206 reverseOut: true, 207 duration: 1000, 208 }, 209 load: { 210 filter: "all", 211 }, 212 }); 213 214 /*========================================================== 215 funfact 216 ======================================================================*/ 217 var skl = true; 218 $(".funfact-sec").appear(); 219 220 $(".funfact-sec").on("appear", function () { 221 if (skl) { 222 $(".funfact-title").each(function () { 223 var $this = $(this); 224 jQuery({ Counter: 0 }).animate( 225 { Counter: $this.attr("data-counter") }, 226 { 227 duration: 8000, 228 easing: "swing", 229 step: function () { 230 var num = Math.ceil(this.Counter).toString(); 231 if (Number(num) > 99999) { 232 while (/(\d+)(\d{3})/.test(num)) { 233 num = num.replace(/(\d+)(\d{3})/, ""); 234 } 235 } 236 $this.html(num); 237 }, 238 } 239 ); 240 }); 241 skl = false; 242 } 243 }); 244 245 /*========================================================== 246 testmonial slider 247 ======================================================================*/ 248 if ($("#testmonial-slider").length > 0) { 249 var bannerSlider = $("#testmonial-slider"); 250 bannerSlider.owlCarousel({ 251 items: 1, 252 mouseDrag: true, 253 touchDrag: true, 254 dots: true, 255 autoplay: false, 256 autoplayTimeout: 5000, 257 autoplayHoverPause: true, 258 smartSpeed: 800, 259 }); 260 } 261 262 /*========================================================== 263 testmonial v2 slider 264 ======================================================================*/ 265 if ($("#testmonial-slider-v2").length > 0) { 266 var bannerSlider = $("#testmonial-slider-v2"); 267 bannerSlider.owlCarousel({ 268 items: 4, 269 mouseDrag: true, 270 touchDrag: true, 271 dots: false, 272 nav: true, 273 margin: 30, 274 navText: [ 275 '<i class="icon icon-arrow-left"></i>', 276 '<i class="icon icon-arrow-right"></i>', 277 ], 278 autoplay: false, 279 autoplayTimeout: 5000, 280 autoplayHoverPause: true, 281 smartSpeed: 600,
282 responsive: { 283 // breakpoint from 0 up 284 0: { 285 nav: true, 286 items: 1, 287 }, 288 // breakpoint from 480 up 289 480: { 290 nav: true, 291 items: 1, 292 }, 293 // breakpoint from 768 up 294 991: { 295 nav: true, 296 }, 297 }, 298 }); 299 } 300 if ($("#replaceTree").length > 0) { 301 var bannerSlider = $("#replaceTree"); 302 bannerSlider.owlCarousel({ 303 items: 5, 304 mouseDrag: true, 305 touchDrag: true, 306 dots: false, 307 nav: true, 308 margin: 30, 309 navText: [ 310 '<i class="icon icon-arrow-left"></i>', 311 '<i class="icon icon-arrow-right"></i>', 312 ], 313 autoplay: false, 314 autoplayTimeout: 5000, 315 autoplayHoverPause: true, 316 smartSpeed: 600, 317 responsive: { 318 // breakpoint from 0 up 319 0: { 320 nav: true, 321 items: 1, 322 }, 323 // breakpoint from 480 up 324 480: { 325 nav: true, 326 items: 1, 327 }, 328 // breakpoint from 768 up 329 991: { 330 nav: true, 331 }, 332 }, 333 }); 334 } 335 336 /*========================================================== 337 back to top 338 ======================================================================*/ 339 $("body, html").on("click", ".BackTo", function (e) { 340 e.preventDefault(); 341 $("html, body").animate({ scrollTop: 0 }, 1000, function () { 342 // Görsel kaydırma bitince klavye odaÄını sayfa baÅına taÅırız 343 document.body.focus(); 344 }); 345 }); 346 347 /*========================================================== 348 wow animated 349 ======================================================================*/ 350 var wow = new WOW({ 351 animateClass: "animated", 352 mobile: false, 353 }); 354 wow.init(); 355 356 /*========================================================== 357 video 358 ======================================================================*/ 359 $(".video-play-btn").magnificPopup({ 360 type: "iframe", 361 }); 362 363 /*============================================================= 364 image popup 365 =========================================================================*/ 366 367 $(".xs-image-popup").magnificPopup({ 368 type: "inline", 369 closeOnContentClick: false, 370 midClick: true, 371 callbacks: { 372 beforeOpen: function () { 373 this.st.mainClass = this.st.el.attr("data-effect"); 374 }, 375 open: function () { 376 // BK10 / 2.1.1: Dialog açılınca odak önce dialog'a gider; 377 // ekran okuyucu aria-labelledby ile dialog baÅlıÄını okur 378 var $content = this.content; 379 if ($content.is('[role="dialog"]')) { 380 $content.focus(); 381 } else { 382 $content.find('[role="dialog"]').first().focus(); 383 } 384 385 // Klavye odaÄını modal dıÅına çıkarmama (Focus Trap) 386 $content.on('keydown.mfpTrap', function (e) { 387 if (e.key === 'Tab') { 388 var focusableElements = $content.find('a, button, input, textarea, select, [tabindex="0"]').filter(':visible'); 389 var firstElement = focusableElements[0]; 390 var lastElement = focusableElements[focusableElements.length - 1]; 391 392 if (e.shiftKey) { // Shift + Tab 393 if (document.activeElement === firstElement) { 394 lastElement.focus(); 395 e.preventDefault(); 396 } 397 } else { // Tab 398 if (document.activeElement === lastElement) { 399 firstElement.focus(); 400 e.preventDefault(); 401 } 402 } 403 } 404 }); 405 }, 406 close: function () { 407 // BK10 / 2.1.1: Modal kapanınca odak tetikleyen elemana döner 408 this.content.off('keydown.mfpTrap'); 409 if (this.st && this.st.el) { 410 this.st.el.focus(); 411 } 412 } 413 }, 414 zoom: { 415 enabled: true, 416 duration: 500, // don't foget to change the duration also in CSS 417 }, 418 mainClass: "mfp-fade", 419 }); 420 421 /*========================================================== 422 header search 423 ======================================================================*/ 424 /*========================================================== 425 about funfact 426 ======================================================================*/ 427 var skl = true; 428 $(".about-inner-content").appear(); 429 430 $(".about-inner-content").on("appear", function () { 431 if (skl) { 432 $(".funfact-title").each(function () { 433 var $this = $(this); 434 jQuery({ Counter: 0 }).animate( 435 { Counter: $this.attr("data-counter") }, 436 {
437 duration: 8000, 438 easing: "swing", 439 step: function () { 440 var num = Math.ceil(this.Counter).toString(); 441 if (Number(num) > 99999) { 442 while (/(\d+)(\d{3})/.test(num)) { 443 num = num.replace(/(\d+)(\d{3})/, ""); 444 } 445 } 446 $this.html(num + "+"); 447 }, 448 } 449 ); 450 }); 451 skl = false; 452 } 453 }); 454 455 /*========================================================== 456 company timeline 457 ======================================================================*/ 458 if ($(".single-timeline-item .history-of-timeline").length > 0) { 459 $(".single-timeline-item .history-of-timeline").on( 460 "click", 461 function () { 462 var show_detail = $(this).parents(".single-timeline-item"); 463 show_detail.addClass("active"); 464 var sibhide = $(this) 465 .parents(".single-timeline-item") 466 .siblings() 467 .removeClass("active"); 468 return false; 469 } 470 ); 471 } 472 473 /*========================================================== 474 testmonial widget slider 475 ======================================================================*/ 476 if ($(".testmonial-widget").length > 0) { 477 var bannerSlider = $(".testmonial-widget"); 478 bannerSlider.owlCarousel({ 479 items: 1, 480 mouseDrag: true, 481 touchDrag: true, 482 dots: true, 483 autoplay: true, 484 autoplayTimeout: 5000, 485 autoplayHoverPause: true, 486 smartSpeed: 800, 487 }); 488 // Add pause/play control button for this autoplay slider 489 var $widgetSlider = $(".testmonial-widget"); 490 var $widgetButton = $('<button type="button" class="slider-control" aria-pressed="false" aria-label="Slider pause">Pause</button>'); 491 $widgetSlider.after($widgetButton); 492 $widgetButton.on('click', function () { 493 var isPaused = $(this).attr('aria-pressed') === 'true'; 494 if (isPaused) { 495 $widgetSlider.trigger('play.owl.autoplay'); 496 $(this).attr('aria-pressed', 'false').attr('aria-label', 'Slider pause').text('Pause'); 497 } else { 498 $widgetSlider.trigger('stop.owl.autoplay'); 499 $(this).attr('aria-pressed', 'true').attr('aria-label', 'Slider play').text('Play'); 500 } 501 }); 502 503 } 504 505 /*========================================================== 506 testmonial slider v3 507 ======================================================================*/ 508 if ($("#testmonial-slide").length > 0) { 509 var bannerSlider = $("#testmonial-slide"); 510 bannerSlider.owlCarousel({ 511 items: 1, 512 mouseDrag: true, 513 touchDrag: true, 514 dots: false, 515 nav: true, 516 autoplay: true, 517 navText: [ 518 '<i class="icon icon-chevron-left"></i>', 519 '<i class="icon icon-chevron-right"></i>', 520 ], 521 autoplayTimeout: 5000, 522 autoplayHoverPause: true, 523 smartSpeed: 800, 524 responsive: { 525 // breakpoint from 0 up 526 0: { 527 nav: false, 528 }, 529 // breakpoint from 480 up 530 480: { 531 nav: false, 532 }, 533 534 // breakpoint from 480 up 535 768: { 536 nav: true, 537 }, 538 // breakpoint from 768 up 539 991: { 540 nav: true, 541 }, 542 }, 543 }); 544 // Add pause/play control button for this autoplay slider 545 var $slideSlider = $("#testmonial-slide"); 546 var $slideButton = $('<button type="button" class="slider-control" aria-pressed="false" aria-label="Slider pause">Pause</button>'); 547 $slideSlider.after($slideButton); 548 $slideButton.on('click', function () { 549 var isPaused = $(this).attr('aria-pressed') === 'true'; 550 if (isPaused) { 551 $slideSlider.trigger('play.owl.autoplay'); 552 $(this).attr('aria-pressed', 'false').attr('aria-label', 'Slider pause').text('Pause'); 553 } else { 554 $slideSlider.trigger('stop.owl.autoplay'); 555 $(this).attr('aria-pressed', 'true').attr('aria-label', 'Slider play').text('Play'); 556 } 557 }); 558 } 559 560 /*========================================================== 561 testmonial slider v4 562 ======================================================================*/ 563 if ($("#testmonial-slider-v4").length > 0) { 564 var bannerSlider = $("#testmonial-slider-v4"); 565 bannerSlider.owlCarousel({ 566 items: 3, 567 mouseDrag: true, 568 margin: 30, 569 touchDrag: true, 570 dots: true, 571 autoplay: true, 572 autoplayTimeout: 5000, 573 autoplayHoverPause: true,
574 smartSpeed: 800, 575 responsive: { 576 // breakpoint from 0 up 577 0: { 578 nav: false, 579 items: 1, 580 }, 581 // breakpoint from 480 up 582 480: { 583 nav: false, 584 items: 1, 585 }, 586 587 // breakpoint from 480 up 588 768: { 589 nav: false, 590 items: 2, 591 }, 592 // breakpoint from 768 up 593 991: { 594 nav: false, 595 }, 596 }, 597 }); 598 // Add pause/play control button for this autoplay slider 599 var $v4Slider = $("#testmonial-slider-v4"); 600 var $v4Button = $('<button type="button" class="slider-control" aria-pressed="false" aria-label="Slider pause">Pause</button>'); 601 $v4Slider.after($v4Button); 602 $v4Button.on('click', function () { 603 var isPaused = $(this).attr('aria-pressed') === 'true'; 604 if (isPaused) { 605 $v4Slider.trigger('play.owl.autoplay'); 606 $(this).attr('aria-pressed', 'false').attr('aria-label', 'Slider pause').text('Pause'); 607 } else { 608 $v4Slider.trigger('stop.owl.autoplay'); 609 $(this).attr('aria-pressed', 'true').attr('aria-label', 'Slider play').text('Play'); 610 } 611 }); 612 } 613 /*========================================================== 614 contact form init 615 ======================================================================*/ 616 617 /*========================================================== 618 comment reply smooth scrolling 619 ======================================================================*/ 620 if ($(".comment-reply-link").length > 0) { 621 $(".comment-reply-link").on("click", function () { 622 $("html, body").animate( 623 { scrollTop: $(this.hash).offset().top - 100 }, 624 1000 625 ); 626 return false; 627 }); 628 } 629})(jQuery);
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.