1"use strict"; 2 3$('ul.slimmenu').slimmenu({ 4 resizeWidth: '992', 5 collapserTitle: 'Main Menu', 6 animSpeed: 250, 7 indentChildren: true, 8 childrenIndenter: '' 9}); 10 11 12// Countdown 13$('.countdown').each(function() { 14 var count = $(this); 15 $(this).countdown({ 16 zeroCallback: function(options) { 17 var newDate = new Date(), 18 newDate = newDate.setHours(newDate.getHours() + 130); 19 20 $(count).attr("data-countdown", newDate); 21 $(count).countdown({ 22 unixFormat: true 23 }); 24 } 25 }); 26}); 27 28 29$('.btn').button(); 30 31$("[rel='tooltip']").tooltip(); 32 33$('.form-group').each(function() { 34 var self = $(this), 35 input = self.find('input'); 36 37 input.focus(function() { 38 self.addClass('form-group-focus'); 39 }) 40 41 input.blur(function() { 42 if (input.val()) { 43 self.addClass('form-group-filled'); 44 } else { 45 self.removeClass('form-group-filled'); 46 } 47 self.removeClass('form-group-focus'); 48 }); 49}); 50 51/*$('.typeahead').typeahead({ 52 hint: true, 53 highlight: true, 54 minLength: 3, 55 limit: 8 56}, { 57 source: function(q, cb) { 58 return $.ajax({ 59 dataType: 'json', 60 type: 'get', 61 url: 'http://gd.geobytes.com/AutoCompleteCity?callback=?&q=' + q, 62 chache: false, 63 success: function(data) { 64 var result = []; 65 $.each(data, function(index, val) { 66 result.push({ 67 value: val 68 }); 69 }); 70 cb(result); 71 } 72 }); 73 } 74});*/ 75 76 77 78$('input.time-pick').timepicker({ 79 minuteStep: 15, 80 showInpunts: false 81}) 82 83$('input.date-pick-years').datepicker({ 84 startView: 2 85}); 86 87 88 89 90$('.booking-item-price-calc .checkbox label').click(function() { 91 var checkbox = $(this).find('input'), 92 // checked = $(checkboxDiv).hasClass('checked'), 93 checked = $(checkbox).prop('checked'), 94 price = parseInt($(this).find('span.pull-right').html().replace('$', '')), 95 eqPrice = $('#car-equipment-total'), 96 tPrice = $('#car-total'), 97 eqPriceInt = parseInt(eqPrice.attr('data-value')), 98 tPriceInt = parseInt(tPrice.attr('data-value')), 99 value, 100 animateInt = function(val, el, plus) { 101 value = function() { 102 if (plus) { 103 return el.attr('data-value', val + price); 104 } else { 105 return el.attr('data-value', val - price); 106 } 107 }; 108 return $({ 109 val: val 110 }).animate({ 111 val: parseInt(value().attr('data-value')) 112 }, { 113 duration: 500, 114 easing: 'swing', 115 step: function() { 116 if (plus) { 117 el.text(Math.ceil(this.val)); 118 } else { 119 el.text(Math.floor(this.val)); 120 } 121 } 122 }); 123 }; 124 if (!checked) { 125 animateInt(eqPriceInt, eqPrice, true); 126 animateInt(tPriceInt, tPrice, true); 127 } else { 128 animateInt(eqPriceInt, eqPrice, false); 129 animateInt(tPriceInt, tPrice, false); 130 } 131}); 132 133 134$('div.bg-parallax').each(function() { 135 var $obj = $(this); 136 if($(window).width() > 992 ){ 137 $(window).scroll(function() { 138 var animSpeed; 139 if ($obj.hasClass('bg-blur')) { 140 animSpeed = 10; 141 } else { 142 animSpeed = 15; 143 } 144 var yPos = -($(window).scrollTop() / animSpeed); 145 var bgpos = '50% ' + yPos + 'px'; 146 $obj.css('background-position', bgpos); 147 148 }); 149 } 150}); 151 152 153 154$(document).ready( 155 function() { 156/* 157 $('html').niceScroll({ 158 cursorcolor: "#000", 159 cursorborder: "0px solid #fff", 160 railpadding: { 161 top: 0, 162 right: 0, 163 left: 0, 164 bottom: 0 165 }, 166 cursorwidth: "10px",
167 cursorborderradius: "0px", 168 cursoropacitymin: 0.2, 169 cursoropacitymax: 0.8, 170 boxzoom: true, 171 horizrailenabled: false, 172 zindex: 9999 173 }); 174 175*/ 176 // Owl Carousel 177 var owlCarousel = $('#owl-carousel'), 178 owlItems = owlCarousel.attr('data-items'), 179 owlCarouselSlider = $('#owl-carousel-slider'), 180 owlNav = owlCarouselSlider.attr('data-nav'); 181 // owlSliderPagination = owlCarouselSlider.attr('data-pagination'); 182 183 owlCarousel.owlCarousel({ 184 items: owlItems, 185 navigation: true, 186 navigationText: ['', ''] 187 }); 188 189 owlCarouselSlider.owlCarousel({ 190 slideSpeed: 300, 191 paginationSpeed: 400, 192 // pagination: owlSliderPagination, 193 singleItem: true, 194 navigation: true, 195 navigationText: ['', ''], 196 transitionStyle: 'fade', 197 autoPlay: 4500 198 }); 199 200 201 // footer always on bottom 202 if ( $("#main-footer").length ) { //pregunta si existe 203 var docHeight = $(window).height(); 204 var footerHeight = $('#main-footer').height(); 205 var footerTop = $('#main-footer').position().top + footerHeight; 206 207 if (footerTop < docHeight) { 208 $('#main-footer').css('margin-top', (docHeight - footerTop) + 'px'); 209 } 210 } 211 } 212); 213 214 215$('.nav-drop').dropit(); 216 217 218$("#price-slider").ionRangeSlider({ 219 min: 130, 220 max: 575, 221 type: 'double', 222 prefix: "$", 223 // maxPostfix: "+", 224 prettify: false, 225 hasGrid: true 226}); 227 228$('.i-check, .i-radio').iCheck({ 229 checkboxClass: 'i-check', 230 radioClass: 'i-radio' 231}); 232 233 234 235$('.booking-item-review-expand').click(function(event) { 236 console.log('baz'); 237 var parent = $(this).parent('.booking-item-review-content'); 238 if (parent.hasClass('expanded')) { 239 parent.removeClass('expanded'); 240 } else { 241 parent.addClass('expanded'); 242 } 243}); 244 245 246$('.stats-list-select > li > .booking-item-rating-stars > li').each(function() { 247 var list = $(this).parent(), 248 listItems = list.children(), 249 itemIndex = $(this).index(); 250 251 $(this).hover(function() { 252 for (var i = 0; i < listItems.length; i++) { 253 if (i <= itemIndex) { 254 $(listItems[i]).addClass('hovered'); 255 } else { 256 break; 257 } 258 }; 259 $(this).click(function() { 260 for (var i = 0; i < listItems.length; i++) { 261 if (i <= itemIndex) { 262 $(listItems[i]).addClass('selected'); 263 } else { 264 $(listItems[i]).removeClass('selected'); 265 } 266 }; 267 }); 268 }, function() { 269 listItems.removeClass('hovered'); 270 }); 271}); 272 273 274 275$('.booking-item-container').children('.booking-item').click(function(event) { 276 if ($(this).hasClass('active')) { 277 $(this).removeClass('active'); 278 $(this).parent().removeClass('active'); 279 } else { 280 $(this).addClass('active'); 281 $(this).parent().addClass('active'); 282 $(this).delay(1500).queue(function() { 283 $(this).addClass('viewed') 284 }); 285 } 286}); 287 288 289$('.form-group-cc-number input').payment('formatCardNumber'); 290$('.form-group-cc-date input').payment('formatCardExpiry'); 291$('.form-group-cc-cvc input').payment('formatCardCVC'); 292 293 294 295 296 297 298 299$('.card-select > li').click(function() { 300 self = this; 301 $(self).addClass('card-item-selected'); 302 $(self).siblings('li').removeClass('card-item-selected'); 303 $('.form-group-cc-number input').click(function() { 304 $(self).removeClass('card-item-selected'); 305 }); 306}); 307// Lighbox gallery 308$('#popup-gallery').each(function() { 309 $(this).magnificPopup({ 310 delegate: 'a.popup-gallery-image', 311 type: 'image', 312 gallery: { 313 enabled: true 314 } 315 }); 316}); 317 318// Lighbox image 319$('.popup-image').magnificPopup({ 320 type: 'image' 321}); 322 323// Lighbox text 324$('.popup-text').magnificPopup({ 325 removalDelay: 500, 326 closeBtnInside: true, 327 callbacks: { 328 beforeOpen: function() { 329 this.st.mainClass = this.st.el.attr('data-effect'); 330 } 331 }, 332 midClick: true 333}); 334 335// Lightbox iframe 336$('.popup-iframe').magnificPopup({ 337 dispableOn: 700, 338 type: 'iframe', 339 removalDelay: 160, 340 mainClass: 'mfp-fade', 341 preloader: false 342}); 343 344 345$('.form-group-select-plus').each(function() { 346 var self = $(this), 347 btnGroup = self.find('.btn-group').first(), 348 select = self.find('select'); 349 btnGroup.children('label').last().click(function() { 350 btnGroup.addClass('hidden'); 351 select.removeClass('hidden'); 352 });
353}); 354// Responsive videos 355$(document).ready(function() { 356 $("body").fitVids(); 357}); 358 359$(function($) { 360 $("#twitter").tweet({ 361 username: "remtsoy", //!paste here your twitter username! 362 count: 3 363 }); 364}); 365 366$(function($) { 367 $("#twitter-ticker").tweet({ 368 username: "remtsoy", //!paste here your twitter username! 369 page: 1, 370 count: 20 371 }); 372}); 373 374$(document).ready(function() { 375 var ul = $('#twitter-ticker').find(".tweet-list"); 376 var ticker = function() { 377 setTimeout(function() { 378 ul.find('li:first').animate({ 379 marginTop: '-4.7em' 380 }, 850, function() { 381 $(this).detach().appendTo(ul).removeAttr('style'); 382 }); 383 ticker(); 384 }, 5000); 385 }; 386 ticker(); 387}); 388$(function() { 389 //ANULADA POR INCOMPATIBILIDAD CON INGENICO 390 /* $('#ri-grid').gridrotator({ 391 rows: 4, 392 columns: 8, 393 animType: 'random', 394 animSpeed: 1200, 395 interval: 1200, 396 step: 'random', 397 preventClick: false, 398 maxStep: 2, 399 w992: { 400 rows: 5, 401 columns: 4 402 }, 403 w768: { 404 rows: 6, 405 columns: 3 406 }, 407 w480: { 408 rows: 8, 409 columns: 3 410 }, 411 w320: { 412 rows: 5, 413 columns: 4 414 }, 415 w240: { 416 rows: 6, 417 columns: 4 418 } 419 }); 420*/ 421}); 422 423 424$(function() { 425 //ANULADA POR INCOMPATIBILIDAD CON INGENICO 426 /* $('#ri-grid-no-animation').gridrotator({ 427 rows: 4, 428 columns: 8, 429 slideshow: false, 430 w1024: { 431 rows: 4, 432 columns: 6 433 }, 434 w768: { 435 rows: 3, 436 columns: 3 437 }, 438 w480: { 439 rows: 4, 440 columns: 4 441 }, 442 w320: { 443 rows: 5, 444 columns: 4 445 }, 446 w240: { 447 rows: 6, 448 columns: 4 449 } 450 }); 451*/ 452}); 453 454var tid = setInterval(tagline_vertical_slide, 2500); 455 456// vertical slide 457function tagline_vertical_slide() { 458 var curr = $("#tagline ul li.active"); 459 curr.removeClass("active").addClass("vs-out"); 460 setTimeout(function() { 461 curr.removeClass("vs-out"); 462 }, 500); 463 464 var nextTag = curr.next('li'); 465 if (!nextTag.length) { 466 nextTag = $("#tagline ul li").first(); 467 } 468 nextTag.addClass("active"); 469} 470 471function abortTimer() { // to be called when you want to stop the timer 472 clearInterval(tid); 473}
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.