1$(document).ready(function(){ 2 3 //RESIZE SLIDES 4 $(window).resize(function(){ 5 altura = $(window).height(); 6 ancho = $(window).width(); 7 if( ancho > 767 ){ 8 //$('#map, .fullheight').height( altura ); 9 $('.fullheight').css({"min-height": altura}) 10 $('.halfheight').css({"min-height": altura/2}) 11 }else{ 12 //$('.fullheight').height( altura - 100 ); 13 $('.fullheight').css({"min-height": altura - 100}) 14 $('.halfheight').css({"min-height": altura/2}) 15 } 16 17 //resize slides 18 //$('.fullheight').height( altura ); 19 $('.halfheight').height( altura/2 ); 20 }); 21 $(window).trigger('resize'); 22 23 24 //ANIMACIONES 25 var navbar = $('.navbar-custom'), 26 header = $('.swiper-slide .img-bg.fullheight'), 27 slide = $('.home-slider'), 28 slider_text = $('.call-to-container'), 29 block_info_all = $('.flex-block .info'), 30 btn_call_to = $('.call-to-container .btn-call-to-action'); 31 logo_seccion = $('.logo-seccion'); 32 33 //header.css('opacity',0); 34 tl_scroll = new TimelineLite(); 35 36 tl = new TimelineLite(); 37 tl 38 .to(header, 1, {autoAlpha:.3, ease:Power2.easeOut}) 39 .from(slide, 1.3, {autoAlpha:0, ease:Power1.easeOut}) 40 //.from(navbar, 0.5, {autoAlpha:0, y:-180, ease:Power2.easeOut}) 41 //.from(slider_text, 0.3, {autoAlpha:0, ease:Power2.easeOut}, '-=0.15') 42 43 .staggerFrom(btn_call_to, 0.5, {autoAlpha:0, y: 500, ease:Power2.easeOut}, 0.2); 44 45 //tl.pause(); 46 47 $('#toggle-form').click(function(){ 48 $('.get-user-details').slideToggle(); 49 return false; 50 }); 51 52 //labels en formas
53 $('.selectpicker').on('shown.bs.select', function(){ 54 form_control = $(this); 55 label = form_control.closest('span').prev('label'); 56 label.addClass('shrink'); 57 }); 58 $('.selectpicker').on('hide.bs.select', function(){ 59 form_control = $(this); 60 label = form_control.closest('span').prev('label'); 61 62 if( !form_control.val() ){ //si no hay ningun valor en el campo, al quitar el focus, se quita la clase tambien 63 label.removeClass('shrink'); 64 } 65 }); 66 67 $('.form-control').on('focus', function(){ 68 form_control = $(this); 69 label = form_control.closest('span').prev('label'); 70 label.addClass('shrink'); 71 }); 72 $('.form-control').on('focusout', function(){ 73 form_control = $(this); 74 label = form_control.closest('span').prev('label'); 75 76 if( !form_control.val() ){ //si no hay ningun valor en el campo, al quitar el focus, se quita la clase tambien 77 label.removeClass('shrink'); 78 } 79 }); 80 81 $('.form-control').on('focus', function(){ 82 form_control = $(this); 83 label = form_control.closest('span').prev('label'); 84 label.addClass('shrink'); 85 }); 86 87 //al cerrar el modal, detiene el video 88 $("#video_modal").on('hidden.bs.modal', function (e) { 89 $("#video_modal iframe").attr("src", $("#video_modal iframe").attr("src")); 90 }); 91 92 93 // Javascript to enable link to tab 94 var url = document.location.toString(); 95 if (url.match('#')) { 96 $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); 97 } 98 99 // Change hash for page-reload 100 $('.nav-tabs a').on('shown.bs.tab', function (e) { 101 window.location.hash = e.target.hash; 102 }) 103 104 $('.local-nav').affix({ 105 offset: { 106 top: $('#page-header-id-1').height() 107 } 108 }); 109 110 //MENU TOGGLE / MENU OVERLAY 111 $('.navbar-toggle').click(function(){ 112 $(this).toggleClass("open"); 113 $('.menu-wrapper').toggleClass('active'); 114 $('body').toggleClass('no-scroll'); 115 return true; 116 }); 117 118 119 //SWIPER 120 var swiper_home = new Swiper('.fullscreen-slider', { 121 pagination: { 122 el: '.swiper-pagination-home', 123 clickable: true, 124 }, 125 grabCursor: true, 126 autoplay: 4500, 127 speed: 600, 128 preventClicks: false, 129 preventClicksPropagation: false, 130 slidesPerView: "auto", 131 }); 132 133 var swiper = new Swiper('.testimonials-slider', { 134 pagination: { 135 el: '.swiper-pagination', 136 clickable: true, 137 }, 138 effect: 'coverflow', 139 navigation: { 140 nextEl: '.swiper-button-next', 141 prevEl: '.swiper-button-prev', 142 }, 143 coverflow: { 144 rotate: 0, 145 stretch: 0, 146 depth: 200, 147 modifier: 5, 148 slideShadows : true 149 } 150 }); 151 152 var swiper = new Swiper('.partners-slider', { 153 // your settings ... 154 autoplay: { 155 delay: 2000, 156 }, 157 //loop: true, 158 navigation: { 159 nextEl: '.btn-next', 160 prevEl: '.btn-prev', 161 }, 162 slidesPerView: 2, 163 //slidesPerColumn: 2, 164 spaceBetween: 10, 165 breakpoints: { 166 768: { 167 slidesPerView: 1, 168 slidesPerColumn: 1 169 } 170 } 171 }); 172 173 $('#btn-reveal-gallery').on('click', function (e) { 174 175 $('#hidden-gallery').slideToggle(); 176 var swiper_galeria = new Swiper('.gallery-slider', { 177 slidesPerView: 'auto', 178 grabCursor: true, 179 spaceBetween: 0, 180 speed: 600, 181 pagination: { 182 el: '.swiper-pagination-home', 183 clickable: true, 184 }, 185 navigation: { 186 nextEl: '.swiper-button-next', 187 prevEl: '.swiper-button-prev', 188 }, 189 autoplay: { 190 delay: 2500, 191 disableOnInteraction: true, 192 }, 193 //autoplayDisableOnInteraction: true, 194 breakpoints: { 195 768: { 196 slidesPerView: 1, 197 spaceBetween: 0 198 } 199 } 200 }); 201 202 }); 203 204 $(".board-slider-wrap").each(function(index, element){ 205 var $this = $(this); 206 $this.find(".swiper-container").addClass("instance-" + index); 207 $this.find(".swiper-pagination").addClass("pagination-" + index); 208 $this.find(".swiper-button-prev").addClass("btn-prev-" + index); 209 $this.find(".swiper-button-next").addClass("btn-next-" + index); 210 var swiper = new Swiper(".instance-" + index, { 211 // your settings ... 212 navigation: { 213 nextEl: '.btn-next-' + index, 214 prevEl: '.btn-prev-' + index, 215 }, 216 pagination: { 217 el: '.pagination-' + index, 218 clickable: true, 219 }, 220 slidesPerView: 2, 221 spaceBetween: 10, 222 breakpoints: { 223 768: { 224 slidesPerView: 1, 225 slidesPerColumn: 1 226 } 227 } 228 }); 229 }); 230 231 232 233 //SCROLL 234 $(function() { 235 $('li.scroll a, .scroll-to').click(function() { 236 var target = $(this.hash); 237 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 238 if (target.length) { 239 $('html,body').animate({ 240 scrollTop: target.offset().top 241 }, 1000); 242 return false;
243 } 244 }); 245 }); 246 247 248 //Cache reference to window and animation items 249 var $animation_elements = $('.animate'); 250 var $window = $(window); 251 252 //pone las secciones con opacity 0 253 // $animation_elements.animate({ 254 // opacity:0 255 // }) 256 257 function check_if_in_view() { 258 var window_height = $window.height(); 259 var window_top_position = $window.scrollTop(); 260 var window_bottom_position = (window_top_position + window_height); 261 262 $.each($animation_elements, function() { 263 var $element = $(this); 264 var element_height = $element.outerHeight(); 265 var element_top_position = $element.offset().top; 266 var element_bottom_position = (element_top_position + element_height); 267 268 //check to see if this current container is within viewport 269 if ((element_bottom_position >= window_top_position) && 270 (element_top_position <= window_bottom_position)) { 271 $element.addClass('in-view'); 272 273 } else { 274 $element.removeClass('in-view'); 275 } 276 }); 277 current_scroll = $window.scrollTop(); 278 } 279 $window.on('scroll resize', check_if_in_view); 280 $window.trigger('scroll'); 281 282 283 284});
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.