1jQuery(document).ready(function($) { 2 "use strict"; 3 new WOW().init(); 4 $(window).on("load", function() { 5 $('#status').delay(0).fadeOut(); 6 $('#preloader').delay(0).fadeOut('slow'); 7 }); 8 $('.tags li').hover(function() { 9 $(this).find('a').toggleClass("wow flipInY animated"); 10 }); 11 $('.f-social li').hover(function() { 12 $(this).find('a').toggleClass("wow swing animated"); 13 }); 14 $('.social a').hover(function() { 15 $(this).find('p').toggleClass("wow fadeInDown animated"); 16 }); 17 $('a.read-more').hover(function() { 18 $(this).find('span').toggleClass("wow flipInY animated"); 19 }); 20 $.scrollUp(); 21 //$('.open-popup-link').magnificPopup({ 22 // removalDelay: 500, 23 // callbacks: { 24 // beforeOpen: function() { 25 // this.st.mainClass = this.st.el.attr('data-effect'); 26 // } 27 // }, 28 // midClick: true 29 //}); 30 //$('#image-popups').magnificPopup({ 31 // delegate: 'a', 32 // type: 'image', 33 // removalDelay: 500, 34 // callbacks: { 35 // beforeOpen: function() { 36 // this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 37 // this.st.mainClass = this.st.el.attr('data-effect'); 38 // } 39 // }, 40 // closeOnContentClick: true, 41 // midClick: true 42 //}); 43 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 44 disableOn: 700, 45 type: 'iframe', 46 mainClass: 'mfp-fade', 47 removalDelay: 160, 48 preloader: false, 49 50 fixedContentPos: false 51 }); 52 //$('.popup-img').magnificPopup({ 53 // type: 'image' 54 //}); 55 //$('.gallery-item').magnificPopup({ 56 // type: 'image', 57 // gallery: { 58 // enabled: true 59 // } 60 //}); 61 //$('.masonry-item a.more').hover(function() { 62 // $(this).animate({ 63 // paddingLeft: '30px' 64 // }, 400); 65 //}, function() { 66 // $(this).animate({ 67 // paddingLeft: 15 68 // }, 400); 69 //}); 70 var datetime = null, 71 date = null; 72 var update = function () { 73 74 var language = getUrlParameter('lang'); 75 moment.lang(language); 76 date = moment(new Date()); 77 datetime.html(date.format('dddd, D MMMM YYYY, h:mm:ss a')); 78 }; 79 datetime = $('#time-date') 80 update(); 81 setInterval(update, 1000); 82 //$(".search-container").hide(); 83 //$(".toggle-search").on("click", function(e) { 84 // e.preventDefault(); 85 // e.stopPropagation(); 86 // $(".search-container").slideToggle(500, function() { 87 // $("#search-bar").focus(); 88 // }); 89 //}); 90 91 //$(document).click(function(e) { 92 // var searchWrap = $(".search-container");
93 // if (!searchWrap.is(e.target) && searchWrap.has(e.target).length === 0) { 94 // searchWrap.slideUp(500); 95 // } 96 //}); 97 98 //$("#banner-thumbs").owlCarousel({ 99 // autoPlay: true, 100 // navigation: false, 101 // stopOnHover: true, 102 // pagination: false, 103 // items: 4, 104 // itemsDesktop: [1199, 4], 105 // itemsDesktopSmall: [979, 3], 106 // itemsTablet: [768, 3], 107 // itemsMobile: [479, 1], 108 //}); 109 //$("#banner-thumbs-bmk").owlCarousel({ 110 // autoPlay: true, 111 // navigation: false, 112 // stopOnHover: true, 113 // pagination: false, 114 // items: 4, 115 // itemsDesktop: [1199, 1], 116 // itemsDesktopSmall: [979, 1], 117 // itemsTablet: [768, 1], 118 // itemsMobile: [479, 1], 119 //}); 120 //$("#banner-thumbs-res").owlCarousel({ 121 // autoPlay: true, 122 // navigation: false, 123 // stopOnHover: true, 124 // pagination: false, 125 // items: 4, 126 // itemsDesktop: [1199, 3], 127 // itemsDesktopSmall: [979, 2], 128 // itemsTablet: [768, 2], 129 // itemsMobile: [479, 1], 130 //}); 131 //$("#banner-thumbs-hotel").owlCarousel({ 132 // autoPlay: true, 133 // navigation: false, 134 // stopOnHover: true, 135 // pagination: false, 136 // items: 4, 137 // itemsDesktop: [1199, 2], 138 // itemsDesktopSmall: [979, 2], 139 // itemsTablet: [768, 2], 140 // itemsMobile: [479, 1], 141 //}); 142 //$("#banner-thumbs-plan").owlCarousel({ 143 // autoPlay: false, 144 // navigation: true, 145 // stopOnHover: true, 146 // pagination: false, 147 // items: 2, 148 // itemsDesktop: [1199, 2], 149 // itemsDesktopSmall: [979, 2], 150 // itemsTablet: [768, 2], 151 // itemsMobile: [479, 1], 152 //}); 153 //$("#banner-thumbs-plan-1col").owlCarousel({ 154 // autoPlay: 5000, 155 // navigation: true, 156 // stopOnHover: true, 157 // pagination: false, 158 // items: 1, 159 // itemsDesktop: [1199, 1], 160 // itemsDesktopSmall: [979, 1], 161 // itemsTablet: [768, 1], 162 // itemsMobile: [479, 1], 163 //}); 164 //$("#vid-thumbs").owlCarousel({ 165 // navigation: false, 166 // pagination: true, 167 // slideSpeed: 300, 168 // paginationSpeed: 400, 169 // singleItem: true, 170 //}); 171 //$("#owl-lifestyle").owlCarousel({ 172 // autoPlay: false, 173 // navigation: true, 174 // pagination: false, 175 // items: 3, 176 // itemsDesktop: [1199, 3], 177 // itemsDesktopSmall: [979, 2], 178 // itemsTablet: [768, 2], 179 // itemsMobile: [479, 1], 180 //}); 181 //$("#owl-video-new").owlCarousel({ 182 // autoPlay: false, 183 // navigation: true, 184 // pagination: false, 185 // items: 1, 186 // itemsDesktop: [1199, 1], 187 // itemsDesktopSmall: [979, 1], 188 // itemsTablet: [768, 1], 189 // itemsMobile: [479, 1], 190 //}); 191 //$("#owl-video-view").owlCarousel({ 192 // autoPlay: false, 193 // navigation: true, 194 // pagination: false, 195 // items: 1, 196 // itemsDesktop: [1199, 3], 197 // itemsDesktopSmall: [979, 2], 198 // itemsTablet: [768, 2], 199 // itemsMobile: [479, 1], 200 //}); 201 //$("#owl-blog").owlCarousel({ 202 // navigation: true, 203 // pagination: false, 204 // slideSpeed: 300, 205 // paginationSpeed: 400, 206 // singleItem: true, 207 //}); 208 //var time = 4; 209 //var $progressBar, $bar, $elem, isPause, tick, percentTime; 210 //var sync1 = $("#sync1"); 211 //var sync2 = $("#sync2"); 212 //sync1.owlCarousel({ 213 // singleItem: true, 214 // slideSpeed: 1000, 215 // navigation: true, 216 // pagination: false, 217 // transitionStyle: "fadeUp", 218 // afterAction: syncPosition, 219 // responsiveRefreshRate: 200, 220 // afterInit: progressBar, 221 // afterMove: moved, 222 // startDragging: pauseOnDragging 223 //}); 224 //sync2.owlCarousel({ 225 // items: 4, 226 // itemsDesktop: [1199, 4], 227 // itemsDesktopSmall: [979, 3], 228 // itemsTablet: [768, 3], 229 // itemsMobile: [479, 3], 230 // pagination: false, 231 // responsiveRefreshRate: 100, 232 // afterInit: function(el) { 233 // el.find(".owl-item").eq(0).addClass("synced"); 234 // } 235 //}); 236 237 //function syncPosition(el) { 238 // var current = this.currentItem; 239 // $("#sync2").find(".owl-item").removeClass("synced").eq(current).addClass("synced") 240 // if ($("#sync2").data("owlCarousel") !== undefined) { 241 // center(current) 242 // } 243 //} 244 //$("#sync2").on("click", ".owl-item", function(e) { 245 // e.preventDefault(); 246 // var number = $(this).data("owlItem"); 247 // sync1.trigger("owl.goTo", number); 248 //}); 249 250 //function center(number) { 251 // var sync2visible = sync2.data("owlCarousel").owl.visibleItems; 252 // var num = number; 253 // var found = false; 254 // for (var i in sync2visible) { 255 // if (num === sync2visible[i]) { 256 // var found = true; 257 // } 258 // } 259 // if (found === false) { 260 // if (num > sync2visible[sync2visible.length - 1]) { 261 // sync2.trigger("owl.goTo", num - sync2visible.length + 2) 262 // } else { 263 // if (num - 1 === -1) { 264 // num = 0; 265 // } 266 // sync2.trigger("owl.goTo", num); 267 // } 268 // } else if (num === sync2visible[sync2visible.length - 1]) { 269 // sync2.trigger("owl.goTo", sync2visible[1]) 270 // } else if (num === sync2visible[0]) { 271 // sync2.trigger("owl.goTo", num - 1) 272 // } 273 //} 274 275 //function progressBar(elem) { 276 // $elem = elem; 277 // buildProgressBar(); 278 // start(); 279 //} 280 281 //function buildProgressBar() { 282 // $progressBar = $("<div>", { 283 // id: "progressBar" 284 // });
285 // $bar = $("<div>", { 286 // id: "bar" 287 // }); 288 // $progressBar.append($bar).prependTo($elem); 289 //} 290 291 //function start() { 292 // percentTime = 0; 293 // isPause = false; 294 // tick = setInterval(interval, 10); 295 //}; 296 297 //function interval() { 298 // if (isPause === false) { 299 // percentTime += 1 / time; 300 // $bar.css({ 301 // width: percentTime + "%" 302 // }); 303 // if (percentTime >= 100) { 304 // $elem.trigger('owl.next') 305 // } 306 // } 307 //} 308 309 //function pauseOnDragging() { 310 // isPause = true; 311 //} 312 313 //function moved() { 314 // clearTimeout(tick); 315 // start(); 316 //} 317 //jQuery($elem).on('mouseover', function() { 318 // isPause = true; 319 //}); 320 //jQuery($elem).on('mouseout', function() { 321 // isPause = false; 322 //}); 323}); 324var getUrlParameter = function getUrlParameter(sParam) { 325 var sPageURL = window.location.pathname, 326 sURLVariables = sPageURL.split('/'), 327 sParameterName = 'vi', 328 i; 329 if (isEmpty(sPageURL) || sPageURL==='/') 330 return 'vi'; 331 else { 332 for (i = 0; i < sURLVariables.length; i++) { 333 334 sParameterName = sURLVariables[i]; 335 if (sParameterName === 'vi' || sParameterName === 'en') 336 return sParameterName; 337 } 338 } 339}; 340function isEmpty(item) { 341 if (item) { 342 return false; 343 } else { 344 return true; 345 } 346} 347var loading = { 348 showLoading: function () { 349 $('.load-more-page').show(); 350 $("body").css({ "pointer-events": "none" }); 351 }, 352 showLoadingMobile: function () { 353 $('.load-more-page-mobile').show(); 354 $("body").css({ "pointer-events": "none" }); 355 }, 356 hideLoadingMobile: function () { 357 $('.load-more-page-mobile').hide(); 358 $("body").css({ "pointer-events": "auto" }); 359 }, 360 hideLoading: function () { 361 $('.load-more-page').hide(); 362 $("body").css({ "pointer-events": "auto" }); 363 } 364} 365 366var loadingBox = { 367 showLoading: function () { 368 $('#loading-box').show(); 369 $("body").css({ "pointer-events": "none" }); 370 }, 371 hideLoading: function () { 372 $('#loading-box').hide(); 373 $("body").css({ "pointer-events": "auto" }); 374 } 375} 376 377var config = { 378 UrlImage: function (url) { 379 var regExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; 380 var value = ""; 381 if (!regExp.test(url)) { 382 value = "https://scontent.iocvnpt.com/resources/portal/" + url; 383 } else { 384 value = url; 385 } 386 return value; 387 } 388} 389 390function isMobile() { 391 if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
391sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4)) || navigator.userAgent.match(/iPad/i) != null) { 392 return true; 393 } else { 394 return false; 395 } 396} 397 398//function remove unicode character vietnamese 399function convertToUnsignChar(source) { 400 source = source.toLowerCase(); 401 source = source.replace(/à |á|ạ|ả|ã|â|ầ|ấ|áº|ẩ|ẫ|Ä|ằ|ắ|ặ|ẳ|ẵ/g, "a"); 402 source = source.replace(/è|é|ẹ|ẻ|ẽ|ê|á»|ế|á»|á»|á» /g, "e"); 403 source = source.replace(/ì|Ã|á»|á»|Ä©/g, "i"); 404 source = source.replace(/ò|ó|á»|á»|õ|ô|á»|á»|á»|á»|á»|Æ¡|á»|á»|ợ|á»|ỡ/g, "o"); 405 source = source.replace(/ù|ú|ụ|á»§|Å©|ư|ừ|ứ|á»±|á»|ữ/g, "u"); 406 source = source.replace(/ỳ|ý|ỵ|á»·|ỹ/g, "y"); 407 source = source.replace(/Ä/g, "d"); 408 source = source.replace(/!|@@|\$|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\'|\"|\&|\#|\[|\]|~/g, "-"); 409 source = source.replace(/-+-/g, "-"); //thay thế nhiá»u dấu - thà nh 1 dấu - 410 source = source.replace(/^\-+|\-+$/g, ""); //cắt bá» ký tá»± - á» Äầu và cuá»i chuá»i 411 return source; 412} 413 414function translateDetectLange(text) { 415 var url = 'https://translate.yandex.net/api/v1.5/tr.json/detect?key=trnsl.1.1.20180801T035451Z.d7ed5d2acf60cb17.4ea1f03fbad49f12eb8dcf6219d2f5edbda59a0d&text=' + text + ''; 416 var data; 417 $.ajax({
418 type: "GET", 419 async: false, 420 url: url, 421 success: function (res) { 422 if (res.code == 200) { 423 data = res.lang; 424 } else { 425 data = 0 426 } 427 } 428 }); 429 430 return data; 431} 432 433function translateName(text, lang, currentLang) { 434 435 var url = "https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180801T035451Z.d7ed5d2acf60cb17.4ea1f03fbad49f12eb8dcf6219d2f5edbda59a0d&text=" + text + "&lang=" + lang + "-" + currentLang + ""; 436 437 var data = ""; 438 $.ajax({ 439 type: "GET", 440 async: false, 441 url: url, 442 success: function (res) { 443 data = res.text["0"].trim().toLowerCase(); 444 } 445 }); 446 447 return data; 448} 449 450function isAlphanumeric(str) { 451 return /^[0-9a-zA-Z]+$/.test(str); 452}
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.