1/** 2 * @package Helix3 Framework 3 * @author JoomShaper http://www.joomshaper.com 4 * @copyright Copyright (c) 2010 - 2016 JoomShaper 5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later 6 */ 7 8jQuery(function ($) { 9 10 // ************ START Helix 1.4 JS ************** // 11 // **************************************************** // 12 13 //Default 14 if (typeof sp_offanimation === 'undefined' || sp_offanimation === '') { 15 sp_offanimation = 'default'; 16 } 17 18 if (sp_offanimation == 'default') { 19 $('#offcanvas-toggler').on('click', function (event) { 20 event.preventDefault(); 21 $('.off-canvas-menu-init').addClass('offcanvas'); 22 }); 23 24 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 25 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 26 event.preventDefault(); 27 $('.off-canvas-menu-init').removeClass('offcanvas'); 28 }); 29 } 30 31 // Slide Top Menu 32 if (sp_offanimation == 'slidetop') { 33 $('#offcanvas-toggler').on('click', function (event) { 34 event.preventDefault(); 35 $('.off-canvas-menu-init').addClass('slide-top-menu'); 36 }); 37 38 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 39 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 40 event.preventDefault(); 41 $('.off-canvas-menu-init').removeClass('slide-top-menu'); 42 }); 43 } 44 45 //Full Screen 46 if (sp_offanimation == 'fullscreen') { 47 $('#offcanvas-toggler').on('click', function (event) { 48 event.preventDefault(); 49 $('.off-canvas-menu-init').addClass('full-screen-off-canvas'); 50 }); 51 $(document).ready(function () { 52 $('.off-canvas-menu-init').addClass('full-screen'); 53 }); 54 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 55 event.preventDefault(); 56 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas'); 57 }); 58 } 59 60 //Quantity plus minus 61 $.initQuantity = function ($control) { 62 $control.each(function () { 63 var $this = $(this), 64 data = $this.data("inited-control"), 65 $plus = $(".input-group-addon:last", $this), 66 $minus = $(".input-group-addon:first", $this), 67 $value = $(".form-control", $this); 68 if (!data) { 69 $control.attr("unselectable", "on").css({ 70 "-moz-user-select": "none", 71 "-o-user-select": "none", 72 "-khtml-user-select": "none", 73 "-webkit-user-select": "none", 74 "-ms-user-select": "none", 75 "user-select": "none" 76 }).bind("selectstart", function () { 77 return false 78 }); 79 $plus.click(function () { 80 var val = 81 parseInt($value.val()) + 1; 82 $value.val(val); 83 return false 84 }); 85 $minus.click(function () { 86 var val = parseInt($value.val()) - 1; 87 $value.val(val > 0 ? val : 1); 88 return false 89 }); 90 $value.blur(function () { 91 var val = parseInt($value.val()); 92 $value.val(val > 0 ? val : 1) 93 }) 94 } 95 }) 96 }; 97 $.initQuantity($(".quantity-control")); 98 $.initSelect = function ($select) { 99 $select.each(function () { 100 var $this = $(this), 101 data = $this.data("inited-select"), 102 $value = $(".value", $this), 103 $hidden = $(".input-hidden", $this), 104 $items = $(".dropdown-menu li > a", $this); 105 if (!data) { 106 $items.click(function (e) { 107 if ($(this).closest(".sort-isotope").length > 108 0) e.preventDefault(); 109 var data = $(this).attr("data-value"), 110 dataHTML = $(this).html(); 111 $this.trigger("change", { 112 value: data, 113 html: dataHTML 114 }); 115 $value.html(dataHTML); 116 if ($hidden.length) $hidden.val(data) 117 }); 118 $this.data("inited-select", true) 119 } 120 }) 121 }; 122 123 124 //Full screen from top 125 if (sp_offanimation == 'fullScreen-top') { 126 $('#offcanvas-toggler').on('click', function (event) { 127 event.preventDefault(); 128 $('.off-canvas-menu-init').addClass('full-screen-off-canvas-ftop'); 129 }); 130 $(document).ready(function () { 131 $('.off-canvas-menu-init').addClass('full-screen-ftop'); 132 }); 133 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 134 event.preventDefault(); 135 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas-ftop'); 136 }); 137 } 138 139 //Dark with plus 140 if (sp_offanimation == 'drarkplus') { 141 $('#offcanvas-toggler').on('click', function (event) { 142 event.preventDefault(); 143 $('.off-canvas-menu-init').addClass('new-look-off-canvas'); 144 }); 145 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 146 $(document).ready(function () { 147 $('.off-canvas-menu-init').addClass('new-look'); 148 }); 149 $('.close-offcanvas,.offcanvas-overlay').on('click', function (event) { 150 event.preventDefault(); 151 $('.off-canvas-menu-init').removeClass('new-look-off-canvas'); 152 }); 153 } 154 155 // if sticky header 156 157 158 if ($("body.sticky-header").length > 0) { 159 160 var fixedSection = $('#sp-header-bottom'); 161 // sticky nav 162 var headerHeight = fixedSection.outerHeight(); 163 var stickyNavTop = fixedSection.offset().top; 164 fixedSection.addClass('animated'); 165 fixedSection.before('<div class="nav-placeholder"></div>'); 166 $('.nav-placeholder').height('inherit'); 167 168 //add class 169 fixedSection.addClass('menu-fixed-out'); 170 var stickyNav = function () { 171 var scrollTop = $(window).scrollTop(); 172 173 if (scrollTop > stickyNavTop) { 174 fixedSection.removeClass('menu-fixed-out').addClass('menu-fixed'); 175 $('.nav-placeholder').height(headerHeight); 176 } else if (scrollTop <= stickyNavTop) { 177 178 179 if (fixedSection.hasClass('menu-fixed')) { 180 fixedSection.removeClass('menu-fixed').addClass('menu-fixed-out'); 181 $('.nav-placeholder').height('inherit'); 182 } 183 } 184 }; 185 stickyNav(); 186 $(window).scroll(function () { 187 stickyNav(); 188 189 }); 190 191 192 } 193 194 var lastScrollTop = 0; 195 $(window).scroll(function(event) { 196 var scrTop = $(this).scrollTop(); 197 if( scrTop > lastScrollTop ) { 198 if($('#sp-header-bottom').hasClass('menu-fixed')) { 199 $('.menu-fixed').addClass('hidden-menu'); 200 } 201 } else { 202 if($('#sp-header-bottom').hasClass('menu-fixed')) { 203 $('.menu-fixed').removeClass('hidden-menu'); 204 } 205 } 206 lastScrollTop = scrTop; 207 }); 208 // go to top 209 if (typeof sp_gotop === 'undefined') { 210 sp_gotop = ''; 211 } 212 213 if (sp_gotop) { 214 // go to top 215 $(window).scroll(function () { 216 if ($(this).scrollTop() > 100) { 217 $('.scrollup').fadeIn(); 218 } else { 219 $('.scrollup').fadeOut(400); 220 } 221 }); 222 223 $('.scrollup').click(function () { 224 $("html, body").animate({ 225 scrollTop: 0 226 }, 600); 227 return false;
228 }); 229 } // has go to top 230 231 // Preloader 232 if (typeof sp_preloader === 'undefined') { 233 sp_preloader = ''; 234 } 235 236 if (sp_preloader) { 237 $(document).ready(function() { 238 if ($('.sp-loader-with-logo').length > 0) { 239 move(); 240 } 241 setTimeout(function () { 242 $('.sp-pre-loader').fadeOut(); 243 }, 2000); 244 }); 245 } // has preloader 246 //preloader Function 247 function move() { 248 var elem = document.getElementById("line-load"); 249 var width = 1; 250 var id = setInterval(frame, 10); 251 function frame() { 252 if (width >= 100) { 253 clearInterval(id); 254 } else { 255 width++; 256 elem.style.width = width + '%'; 257 //console.log(elem.style.width); 258 259 } 260 //$('#line-load').append('<span class="count">'+width+'</span>'); 261 $('.homepage .sp-pre-loader').find('.run-number').html(width); 262 } 263 } 264 // ************ END:: Helix 1.4 JS ************** // 265 // **************************************************** // 266 267 // ************** START Mega SCRIPT *************** // 268 // **************************************************** // 269 270 //mega menu 271 $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative'); 272 $('.sp-menu-full').each(function () { 273 $(this).parent().addClass('menu-justify'); 274 }); 275 276 // boxlayout 277 if ($("body.layout-boxed").length > 0) { 278 var windowWidth = $('#sp-header-bottom').parent().outerWidth(); 279 $("#sp-header-bottom").css({"max-width": windowWidth, "left": "auto"}); 280 } 281 282 // ************** END:: Mega SCRIPT *************** // 283 // **************************************************** // 284 285 // ************** START Others SCRIPT *************** // 286 // **************************************************** // 287 288 //Tooltip 289 $('[data-toggle="tooltip"]').tooltip(); 290 291 // Article Ajax voting 292 $(document).on('click', '.sp-rating .star', function (event) { 293 event.preventDefault(); 294 295 var data = { 296 'action': 'voting', 297 'user_rating': $(this).data('number'), 298 'id': $(this).closest('.post_rating').attr('id') 299 }; 300 301 var request = { 302 'option': 'com_ajax', 303 'plugin': 'helix3', 304 'data': data, 305 'format': 'json' 306 }; 307 308 $.ajax({ 309 type: 'POST', 310 data: request, 311 beforeSend: function () { 312 $('.post_rating .ajax-loader').show(); 313 }, 314 success: function (response) { 315 var data = $.parseJSON(response.data); 316 317 $('.post_rating .ajax-loader').hide(); 318 319 if (data.status == 'invalid') { 320 $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast'); 321 } else if (data.status == 'false') { 322 $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast'); 323 } else if (data.status == 'true') { 324 var rate = data.action; 325 $('.voting-symbol').find('.star').each(function (i) { 326 if (i < rate) { 327 $(".star").eq(-(i + 1)).addClass('active'); 328 } 329 }); 330 331 $('.post_rating .voting-result').text('Thank You!').fadeIn('fast'); 332 } 333 334 }, 335 error: function () { 336 $('.post_rating .ajax-loader').hide(); 337 $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast'); 338 } 339 }); 340 }); 341 342 // ************** END:: Others SCRIPT *************** // 343 // **************************************************** // 344 345 // ************** START FullPage SCRIPT *************** // 346 // **************************************************** // 347 348 349 // ************** END:: FullPage SCRIPT *************** // 350 // **************************************************** // 351});
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.