1 var url; 2 var to; 3 var to2; 4 var intervalAd = null; 5 var error2Show = ''; 6 var playerAd = null; 7 var playerVid = null; 8 9$(document).ready(function() { 10 $('.col-categories').find('ul').find('li').on('mouseenter',function(){ 11 $(this).children('.sub-categs').stop().slideDown('fast'); 12 }); 13 $('.col-categories').find('ul').find('li').on('mouseleave',function(){ 14 $(this).children('.sub-categs').stop().slideUp('fast'); 15 }); 16 17 if( $('.seccion-interior-single').length>0 ){ 18 if( $('.description').find('#streaming').length>0 ){ 19 $('.profile-product').find('.product-thumb').hide(); 20 } 21 } 22 if( error2Show != '' ){ 23 $('#layer').find('.modal-body').html(error2Show); 24 $('#layer').modal('show'); 25 } 26 27 $(".seccion").find("a[href*='#']").click(function(event){ 28 event.preventDefault(); 29 var txt = $(this).attr('href'); 30 var name = txt.substr(1,txt.length); 31 var scroll = $("a[name='" + name + "']").offset().top; 32 $('html, body').scrollTop(scroll); 33 }); 34 if( $('#dateStart').length>0){ 35 $('#dateStart').datetimepicker({format: 'DD/MM/YYYY',pickTime:false}) 36 $('#dateStart').change(function(){ 37 console.log('change'); 38 if( $("#dateEnd").data("DateTimePicker") != undefined ) $("#dateEnd").data("DateTimePicker").destroy(); 39 $('#dateEnd').datetimepicker({format: 'DD/MM/YYYY',pickTime:false,minDate: $('#dateStart').val().replace('/','-').replace('/','-')}); 40 }); 41 } 42 43 if( $('#embed_ad').length > 0 ){ 44 if( $('iframe').length > 0 ){ 45 var iframeAd = document.getElementById("vimeo-ad"); 46 var iframeVid = document.getElementById("vimeo-video"); 47 playerAd = new Vimeo.Player(iframeAd); 48 playerVid = new Vimeo.Player(iframeVid); 49 playerAd.getDuration().then(function(duration) { 50 //console.log('totalTime',duration); 51 //setTimeout(function(){ playerAd.play(); },1000); 52 }); 53 playerAd.on('play', function() { 54 $('#embed_ad').find('.picVideoThroughAd').hide(); 55 $('#embed_ad').find('.tools').find('.btnSkip').show(); 56 intervalAd = setInterval(function(){ 57 let c = $('#embed_ad').find('.tools').find('.btnSkip').find('.counter'); 58 if( parseInt(c.html()) > 1 ){ 59 c.html( parseInt(c.html()) - 1 ); 60 }else{ 61 c.remove(); 62 clearInterval(intervalAd); 63 $('#embed_ad').find('.tools').find('.btnSkip').removeClass('disabled'); 64 $('#embed_ad').find('.tools').find('.btnSkip').click(function(){ 65 console.log('skip'); 66 $('#embed_ad').remove(); 67 $('#embed_video').show(); 68 playerVid.play(); 69 }); 70 } 71 },1000); 72 }); 73 $('#embed_video').hide(); 74 } 75 76 77 }else if( $('iframe').length > 0 ){ 78 var iframeVid = document.getElementById("vimeo-video"); 79 playerVid = new Vimeo.Player(iframeVid); 80 } 81 82 if( $('.seccion-product-single').length == 1 ){ 83 $("a[href*='seekPlayer']").each(function(){ 84 let t = $(this).attr('href').split('seekPlayer(')[1]; 85 t = eval( t.substr(0,t.length-1) ); 86 let url = document.location.href; 87 if( url.indexOf('#') > -1 ) url = url.split('#')[0]; 88 if( url.indexOf('?') > -1 ) url = url.split('?')[0]; 89 let tit = $(this).html(); 90 91 if( $(document).width() < 992 ){ 92 $(this).after(' <a href="whatsapp://send/?text='+tit+': '+url+'?tt='+t+'" class="ml5"><img src="/images/ico-whatsapp.svg" class="ico-share-whatsapp"></i></a>'); 93 }else{ 94 $(this).after(' <a href="https://web.whatsapp.com/send?text='+tit+': '+url+'?tt='+t+'" class="ml5" target="_blank"><img src="/images/ico-whatsapp.svg" class="ico-share-whatsapp"></i></a>'); 95 } 96 }); 97 } 98 99 if( $('.seccion-product-single').length == 1 && document.location.href.indexOf('#t') > -1 ){ 100 setTimeout(function(){ 101 let t = document.location.href.split('#t')[1]; 102 let seconds2Seek = 0; 103 if( t.indexOf(':') > -1 ){ 104 seconds2Seek = parseInt(t.split(':')[0])*60; 105 seconds2Seek += parseInt(t.split(':')[1]); 106 }else{ 107 seconds2Seek = t; 108 } 109 console.log(seconds2Seek); 110 seekPlayer(seconds2Seek); 111 playerVid.play(); 112 },1000); 113 } 114 if( $('.seccion-product-single').length == 1 && document.location.href.indexOf('?tt=') > -1 ){ 115 setTimeout(function(){ 116 let t = document.location.href.split('?tt=')[1]; 117 let seconds2Seek = 0; 118 if( t.indexOf(':') > -1 ){ 119 seconds2Seek = parseInt(t.split(':')[0])*60; 120 seconds2Seek += parseInt(t.split(':')[1]); 121 }else{ 122 seconds2Seek = t; 123 } 124 console.log(seconds2Seek); 125 seekPlayer(seconds2Seek); 126 playerVid.play(); 127 },1000); 128 } 129 130 131}); 132 133function seekPlayer(time){ 134 playerVid.setCurrentTime(time).then(function(seconds) { 135 // `seconds` indicates the actual time that the player seeks to 136 playerVid.play(); 137 }).catch(function(error) { 138 switch (error.name) { 139 case 'RangeError': 140 console.log('The time is less than 0 or greater than the video´s duration'); 141 break; 142 143 default: 144 console.log('Some other error occurred'); 145 break; 146 } 147 }); 148} 149 150function openDetailSearh(){ 151 if( $('.detailSearch').hasClass('hidden') ){ 152 $('.detailSearch').removeClass('hidden'); 153 }else{ 154 $('.detailSearch').addClass('hidden'); 155 } 156} 157 158function setScrollPos(obj){ 159 obj.parent().find('#scroll').val($(window).scrollTop()); 160} 161 162function validateSearchForm(){ 163 var frm = $('#search-form'); 164 let searchText = frm.find('#search-box').val().replaceAll(' ','+'); 165 if( frm.find('#search-box').val().length>1 ){ 166 if( $('.detailSearch').length==1 && !$('.detailSearch').hasClass('hidden') ){ 167 var dateStart = frm.find('#dateStart').val().replace('/','-').replace('/','-'); 168 var dateEnd = frm.find('#dateEnd').val().replace('/','-').replace('/','-'); 169 document.location.href= ''+frm.attr('action')+searchText+':'+dateStart+':'+dateEnd; 170 }else{ 171 document.location.href= ''+frm.attr('action')+searchText; 172 } 173 return false; 174 }else{ return false; } 175} 176 177function reloadThis(){ 178 document.location.reload(); 179} 180 181function validateContact(){ 182 if( grecaptcha.getResponse()=='' ){ 183 adv('alert','Atenció!','Has de verificar que no ets un robot per poder continuar'); 184 return false; 185 } 186 return true; 187} 188 189var onloadCallback = function() { 190 captchaId = grecaptcha.render('captcha', { 191 'sitekey' : '6Le9H1EUAAAAAPojIOyza5WNxcTF8hP7G05ja-iO' 192 }); 193}; 194 195function saveIntoCookieAdverts(id){ 196 var exdays = 0.5; 197 var cname = 'Adverts'; 198 var d = new Date(); 199 cookieData = getCookie(cname); 200 if( cookieData != '' ){ cvalue = cookieData+','+id; }else{ cvalue = id; } 201 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 202 var expires = "expires="+ d.toUTCString(); 203 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 204 205} 206 207function getCookie(cname) { 208 var name = cname + "="; 209 var decodedCookie = decodeURIComponent(document.cookie); 210 var ca = decodedCookie.split(';'); 211 for(var i = 0; i <ca.length; i++) { 212 var c = ca[i];
213 while (c.charAt(0) == ' ') { 214 c = c.substring(1); 215 } 216 if (c.indexOf(name) == 0) { 217 return c.substring(name.length, c.length); 218 } 219 } 220 return ""; 221} 222
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.