1"use strict"; 2 3// Countdown 4$('.countdown').each(function () { 5 var count = $(this); 6 $(this).countdown({ 7 zeroCallback: function (options) { 8 var newDate = new Date(), 9 newDate = newDate.setHours(newDate.getHours() + 130); 10 11 $(count).attr("data-countdown", newDate); 12 $(count).countdown({ 13 unixFormat: true 14 }); 15 } 16 }); 17}); 18 19 20$('.btn').button(); 21 22$("[rel='tooltip']").tooltip(); 23 24$('.form-group').each(function () { 25 var self = $(this), 26 input = self.find('input'); 27 28 input.focus(function () { 29 self.addClass('form-group-focus'); 30 }); 31 32 input.blur(function () { 33 if (input.val()) { 34 self.addClass('form-group-filled'); 35 } else { 36 self.removeClass('form-group-filled'); 37 } 38 self.removeClass('form-group-focus'); 39 }); 40}); 41 42$('.typeahead').typeahead({ 43 hint: true, 44 highlight: true, 45 minLength: 3, 46 limit: 8 47}, { 48 source: function (q, cb) { 49 return $.ajax({ 50 dataType: 'json', 51 type: 'get', 52 url: 'http://gd.geobytes.com/AutoCompleteCity?callback=?&q=' + q, 53 chache: false, 54 success: function (data) { 55 var result = []; 56 $.each(data, function (index, val) { 57 result.push({ 58 value: val 59 }); 60 }); 61 cb(result); 62 } 63 }); 64 } 65}); 66 67 68$.fn.datepicker.dates['es'] = { 69 days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"], 70 daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"], 71 daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"], 72 months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], 73 monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"] 74}; 75 76 77 78$('input.date-pick, .input-daterange, .date-pick-inline').datepicker({ 79 language: 'es', 80 format: 'dd/mm/yyyy', 81 todayHighlight: true 82}); 83 84 85 86$('input.date-pick, .input-daterange input[name="start"]').datepicker('setDate', 'today'); 87$('.input-daterange input[name="end"]').datepicker('setDate', '+7d'); 88 89$('input.time-pick').timepicker({ 90 minuteStep: 15, 91 showInpunts: false 92}); 93 94$('input.date-pick-years').datepicker({ 95 startView: 2 96}); 97 98 99 100 101$('.booking-item-price-calc .checkbox label').click(function () { 102 var checkbox = $(this).find('input'), 103 // checked = $(checkboxDiv).hasClass('checked'), 104 checked = $(checkbox).prop('checked'), 105 price = parseInt($(this).find('span.pull-right').html().replace('$', '')), 106 eqPrice = $('#car-equipment-total'), 107 tPrice = $('#car-total'), 108 eqPriceInt = parseInt(eqPrice.attr('data-value')), 109 tPriceInt = parseInt(tPrice.attr('data-value')), 110 value, 111 animateInt = function (val, el, plus) { 112 value = function () { 113 if (plus) { 114 return el.attr('data-value', val + price); 115 } else { 116 return el.attr('data-value', val - price); 117 } 118 }; 119 return $({ 120 val: val 121 }).animate({ 122 val: parseInt(value().attr('data-value')) 123 }, { 124 duration: 500, 125 easing: 'swing', 126 step: function () { 127 if (plus) { 128 el.text(Math.ceil(this.val)); 129 } else { 130 el.text(Math.floor(this.val)); 131 } 132 } 133 }); 134 }; 135 if (!checked) { 136 animateInt(eqPriceInt, eqPrice, true); 137 animateInt(tPriceInt, tPrice, true); 138 } else { 139 animateInt(eqPriceInt, eqPrice, false); 140 animateInt(tPriceInt, tPrice, false); 141 } 142}); 143 144 145$('div.bg-parallax').each(function () { 146 var $obj = $(this); 147 if ($(window).width() > 992) { 148 $(window).scroll(function () { 149 var animSpeed; 150 if ($obj.hasClass('bg-blur')) { 151 animSpeed = 10; 152 } else { 153 animSpeed = 15; 154 } 155 var yPos = -($(window).scrollTop() / animSpeed); 156 var bgpos = '50% ' + yPos + 'px'; 157 $obj.css('background-position', bgpos); 158 159 }); 160 } 161}); 162 163 164 165$(document).ready( 166 function () { 167/* 168 $('html').niceScroll({ 169 cursorcolor: "#000", 170 cursorborder: "0px solid #fff", 171 railpadding: { 172 top: 0, 173 right: 0, 174 left: 0, 175 bottom: 0 176 }, 177 cursorwidth: "10px",
178 cursorborderradius: "0px", 179 cursoropacitymin: 0.2, 180 cursoropacitymax: 0.8, 181 boxzoom: true, 182 horizrailenabled: false, 183 zindex: 9999 184 }); 185 186*/ 187 // Owl Carousel 188 var owlCarousel = $('#owl-carousel'), 189 owlItems = owlCarousel.attr('data-items'), 190 owlCarouselSlider = $('#owl-carousel-slider'), 191 owlNav = owlCarouselSlider.attr('data-nav'); 192 // owlSliderPagination = owlCarouselSlider.attr('data-pagination'); 193 194 owlCarousel.owlCarousel({ 195 items: owlItems, 196 navigation: true, 197 navigationText: ['', ''] 198 }); 199 200 owlCarouselSlider.owlCarousel({ 201 loop:false, 202 slideSpeed: 300, 203 paginationSpeed: 400, 204 // pagination: owlSliderPagination, 205 singleItem: true, 206 navigation: true, 207 navigationText: ['', ''], 208 transitionStyle: 'fade', 209 autoPlay: false 210 }); 211 212 213 // footer always on bottom 214 var docHeight = $(window).height(); 215 if ($('#main-footer').length){ 216 var footerHeight = $('#main-footer').height(); 217 var footerTop = $('#main-footer').position().top + footerHeight; 218 219 if (footerTop < docHeight) { 220 $('#main-footer').css('margin-top', (docHeight - footerTop) + 'px'); 221 } 222 223 } 224 } 225 226 227); 228 229 230$('.nav-drop').dropit(); 231 232 233$('.i-check, .i-radio').iCheck({ 234 checkboxClass: 'i-check', 235 radioClass: 'i-radio' 236}); 237 238 239 240$('.booking-item-review-expand').click(function (event) { 241 console.log('baz'); 242 var parent = $(this).parent('.booking-item-review-content'); 243 if (parent.hasClass('expanded')) { 244 parent.removeClass('expanded'); 245 } else { 246 parent.addClass('expanded'); 247 } 248}); 249 250 251$('.stats-list-select > li > .booking-item-rating-stars > li').each(function () { 252 var list = $(this).parent(), 253 listItems = list.children(), 254 itemIndex = $(this).index(); 255 256 $(this).hover(function () { 257 for (var i = 0; i < listItems.length; i++) { 258 if (i <= itemIndex) { 259 $(listItems[i]).addClass('hovered'); 260 } else { 261 break; 262 } 263 } 264 ; 265 $(this).click(function () { 266 for (var i = 0; i < listItems.length; i++) { 267 if (i <= itemIndex) { 268 $(listItems[i]).addClass('selected'); 269 } else { 270 $(listItems[i]).removeClass('selected'); 271 } 272 } 273 ; 274 }); 275 }, function () { 276 listItems.removeClass('hovered'); 277 }); 278}); 279 280 281 282$('.booking-item-container').children('.booking-item').click(function (event) { 283 if ($(this).hasClass('active')) { 284 $(this).removeClass('active'); 285 $(this).parent().removeClass('active'); 286 } else { 287 $(this).addClass('active'); 288 $(this).parent().addClass('active'); 289 $(this).delay(1500).queue(function () { 290 $(this).addClass('viewed'); 291 }); 292 } 293}); 294 295 296$('.form-group-cc-number input').payment('formatCardNumber'); 297$('.form-group-cc-date input').payment('formatCardExpiry'); 298$('.form-group-cc-cvc input').payment('formatCardCVC'); 299 300/* 301 302 303if ($('#map-canvas').length) { 304 var map, 305 service; 306 307 jQuery(function ($) { 308 $(document).ready(function () { 309 var latlng = new google.maps.LatLng(40.7564971, -73.9743277); 310 var myOptions = { 311 zoom: 16, 312 center: latlng, 313 mapTypeId: google.maps.MapTypeId.ROADMAP, 314 scrollwheel: false 315 }; 316 317 map = new google.maps.Map(document.getElementById("map-canvas"), myOptions); 318 319 320 var marker = new google.maps.Marker({ 321 position: latlng, 322 map: map 323 });
324 marker.setMap(map); 325 326 327 $('a[href="#google-map-tab"]').on('shown.bs.tab', function (e) { 328 google.maps.event.trigger(map, 'resize'); 329 map.setCenter(latlng); 330 }); 331 }); 332 }); 333} 334*/ 335 336$('.card-select > li').click(function () { 337 self = this; 338 $(self).addClass('card-item-selected'); 339 $(self).siblings('li').removeClass('card-item-selected'); 340 $('.form-group-cc-number input').click(function () { 341 $(self).removeClass('card-item-selected'); 342 }); 343}); 344// Lighbox gallery 345$('#popup-gallery').each(function () { 346 $(this).magnificPopup({ 347 delegate: 'a.popup-gallery-image', 348 type: 'image', 349 gallery: { 350 enabled: true 351 } 352 }); 353}); 354 355// Lighbox image 356$('.popup-image').magnificPopup({ 357 type: 'image' 358}); 359 360// Lighbox text 361$('.popup-text').magnificPopup({ 362 removalDelay: 500, 363 closeBtnInside: true, 364 callbacks: { 365 beforeOpen: function () { 366 this.st.mainClass = this.st.el.attr('data-effect'); 367 } 368 }, 369 midClick: true 370}); 371 372// Lightbox iframe 373$('.popup-iframe').magnificPopup({ 374 dispableOn: 700, 375 type: 'iframe', 376 removalDelay: 160, 377 mainClass: 'mfp-fade', 378 preloader: false 379}); 380 381 382$('.form-group-select-plus').each(function () { 383 var self = $(this), 384 btnGroup = self.find('.btn-group').first(), 385 select = self.find('select'); 386 btnGroup.children('label').last().click(function () { 387 btnGroup.addClass('hidden'); 388 select.removeClass('hidden'); 389 }); 390}); 391// Responsive videos 392$(document).ready(function () { 393 $("body").fitVids(); 394}); 395 396$(function ($) { 397 $("#twitter").tweet({ 398 username: "remtsoy", //!paste here your twitter username! 399 count: 3 400 }); 401}); 402 403$(function ($) { 404 $("#twitter-ticker").tweet({ 405 username: "remtsoy", //!paste here your twitter username! 406 page: 1, 407 count: 20 408 }); 409}); 410 411$(document).ready(function () { 412 var ul = $('#twitter-ticker').find(".tweet-list"); 413 var ticker = function () { 414 setTimeout(function () { 415 ul.find('li:first').animate({ 416 marginTop: '-4.7em' 417 }, 850, function () { 418 $(this).detach().appendTo(ul).removeAttr('style'); 419 }); 420 ticker(); 421 }, 5000); 422 }; 423 ticker(); 424}); 425$(function () { 426 $('#ri-grid').gridrotator({ 427 rows: 4, 428 columns: 8, 429 animType: 'random', 430 animSpeed: 1200, 431 interval: 1200, 432 step: 'random', 433 preventClick: false, 434 maxStep: 2, 435 w992: { 436 rows: 5, 437 columns: 4 438 }, 439 w768: { 440 rows: 6, 441 columns: 3 442 }, 443 w480: { 444 rows: 8, 445 columns: 3 446 }, 447 w320: { 448 rows: 5, 449 columns: 4 450 }, 451 w240: { 452 rows: 6, 453 columns: 4 454 } 455 }); 456 457}); 458 459 460$(function () { 461 $('#ri-grid-no-animation').gridrotator({ 462 rows: 4, 463 columns: 8, 464 slideshow: false, 465 w1024: { 466 rows: 4, 467 columns: 6 468 }, 469 w768: { 470 rows: 3, 471 columns: 3 472 }, 473 w480: { 474 rows: 4, 475 columns: 4 476 }, 477 w320: { 478 rows: 5, 479 columns: 4 480 }, 481 w240: { 482 rows: 6, 483 columns: 4 484 } 485 }); 486 487}); 488 489var tid = setInterval(tagline_vertical_slide, 2500); 490 491// vertical slide 492function tagline_vertical_slide() { 493 var curr = $("#tagline ul li.active"); 494 curr.removeClass("active").addClass("vs-out"); 495 setTimeout(function () { 496 curr.removeClass("vs-out"); 497 }, 500); 498 499 var nextTag = curr.next('li'); 500 if (!nextTag.length) { 501 nextTag = $("#tagline ul li").first(); 502 } 503 nextTag.addClass("active"); 504} 505 506function abortTimer() { // to be called when you want to stop the timer 507 clearInterval(tid); 508} 509 510/** 511 * Module for displaying "Waiting for..." dialog using Bootstrap 512 * 513 * @author Eugene Maslovich <[email protected]> 514 * 515 * 516 */ 517var waitingDialog = waitingDialog || (function ($) { 518 'use strict'; 519// Creating modal dialog's DOM 520 var $dialog = $( 521 '<div class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top:15%; overflow-y:visible;">' + 522 '<div class="modal-dialog modal-m">' + 523 '<div class="modal-content">' + 524 '<div class="modal-header"><h3 style="margin:0;"></h3></div>' + 525 '<div class="modal-body">' + 526 '<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>' + 527 '</div>' + 528 '</div></div></div>'); 529 return { 530 /** 531 * Opens our dialog 532 * @param message Custom message 533 * @param options Custom options: 534 * options.dialogSize - bootstrap postfix for dialog size, e.g. "sm", "m"; 535 * options.progressType - bootstrap postfix for progress bar type, e.g. "success", "warning". 536 */ 537 show: function (message, options) { 538// Assigning defaults 539 if (typeof options === 'undefined') { 540 options = {}; 541 } 542 var settings = $.extend({ 543 dialogSize: 'm', 544 progressType: '' 545 }, options); 546 if (typeof message === 'undefined') { 547 message = 'Loading'; 548 } 549// Configuring dialog
550 $dialog.find('.modal-dialog').attr('class', 'modal-dialog').addClass('modal-' + settings.dialogSize); 551 $dialog.find('.progress-bar').attr('class', 'progress-bar'); 552 if (settings.progressType) { 553 $dialog.find('.progress-bar').addClass('progress-bar-' + settings.progressType); 554 } 555 $dialog.find('h3').text(message); 556// Opening dialog 557 $dialog.modal(); 558 }, 559 /** 560 * Closes dialog 561 */ 562 hide: function () { 563 $dialog.modal('hide'); 564 } 565 }; 566})(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.