1/** 2 * @package Joomla.Site 3 * @subpackage Templates.protostar 4 * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. 5 * @license GNU General Public License version 2 or later; see LICENSE.txt 6 * @since 3.2 7 */ 8 9(function($) 10{ 11 $(document).ready(function() 12 { 13 $('*[rel=tooltip]').tooltip() 14 15 // Turn radios into btn-group 16 $('.radio.btn-group label').addClass('btn'); 17 18 $('fieldset.btn-group').each(function() { 19 // Handle disabled, prevent clicks on the container, and add disabled style to each button 20 if ($(this).prop('disabled')) { 21 $(this).css('pointer-events', 'none').off('click'); 22 $(this).find('.btn').addClass('disabled'); 23 } 24 }); 25 26 $(".btn-group label:not(.active)").click(function() 27 { 28 var label = $(this); 29 var input = $('#' + label.attr('for')); 30 31 if (!input.prop('checked')) { 32 label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary'); 33 if (input.val() == '') { 34 label.addClass('active btn-primary'); 35 } else if (input.val() == 0) { 36 label.addClass('active btn-danger'); 37 } else { 38 label.addClass('active btn-success'); 39 } 40 input.prop('checked', true); 41 input.trigger('change'); 42 } 43 }); 44 $(".btn-group input[checked=checked]").each(function() 45 { 46 if ($(this).val() == '') { 47 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary'); 48 } else if ($(this).val() == 0) { 49 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger'); 50 } else { 51 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-success'); 52 } 53 }); 54 55 $('#back-top').on('click', function(e) { 56 e.preventDefault(); 57 $("html, body").animate({scrollTop: 0}, 1000); 58 }); 59 60 }) 61 62 63var hwSlideSpeed = 700; 64var hwTimeOut = 3000; 65var hwNeedLinks = true; 66 67$(document).ready(function(e) { 68 $('.slide').css( 69 {"position" : "absolute", "top":'0', "left": '0'}).hide().eq(0).show(); 70 var slideNum = 0; 71 var slideTime; 72 slideCount = $("#slider .slide").size(); 73 var animSlide = function(arrow){ 74 clearTimeout(slideTime); 75 $('.slide').eq(slideNum).fadeOut(hwSlideSpeed); 76 if(arrow == "next"){ 77 if(slideNum == (slideCount-1)){slideNum=0;} 78 else{slideNum++} 79 } 80 else if(arrow == "prew") 81 { 82 if(slideNum == 0){slideNum=slideCount-1;} 83 else{slideNum-=1} 84 } 85 else{ 86 slideNum = arrow; 87 } 88 $('.slide').eq(slideNum).fadeIn(hwSlideSpeed, rotator); 89 $(".control-slide.active").removeClass("active"); 90 $('.control-slide').eq(slideNum).addClass('active'); 91 } 92if(hwNeedLinks){ 93var $linkArrow = $('<a id="prewbutton" href="javascript:void(0);"></a><a id="nextbutton" href="javascript:void(0);"></a>') 94 .prependTo('#slider'); 95 $('#nextbutton').click(function(){ 96 animSlide("next"); 97 98 }) 99 $('#prewbutton').click(function(){ 100 animSlide("prew"); 101 }) 102} 103 var $adderSpan = ''; 104 $('.slide').each(function(index) { 105 $adderSpan += '<span class = "control-slide">' + index + '</span>'; 106 }); 107 // $('<div class ="sli-links">' + $adderSpan +'</div>').appendTo('#slider-wrap'); 108 $(".control-slide:first").addClass("active"); 109 110 $('.control-slide').click(function(){ 111 var goToNum = parseFloat($(this).text()); 112 animSlide(goToNum); 113 }); 114 var pause = false; 115 var rotator = function(){ 116 if(!pause){slideTime = setTimeout(function(){animSlide('next')}, hwTimeOut);} 117 } 118 $('#slider-wrap').hover( 119 function(){clearTimeout(slideTime); pause = true;}, 120 function(){pause = false; rotator(); 121 }); 122 rotator(); 123 124$('.multiple-items').slick({ 125 infinite: true, 126 slidesToShow: 1, 127 slidesToScroll: 1 128}); 129 130 131}); 132 133 134$(document).ready(function() { 135 136$(".menumain>.deeper.parent>a").attr("href", "javascript:void(0);"); 137 138 139 140 // $('.item-page').prepend( $('.breadcrumb') ); 141 // $('#phocagallery').prepend( $('.breadcrumb') ); 142 $('#content').prepend( $('.breadcrumb') ); 143 144 $( ".menumain>li" ).click(function() { 145 $(this).children(".nav-child" ).slideToggle(150); 146 }); 147 148 // $( ".menumain>li>ul>li" ).hover(function() { 149 // $(this).children(".nav-child" ).slideToggle(150); 150 // }); 151 152 $("#openlogin").click(function() { 153 $('.loginform').show(); 154 $('.overlay').show(); 155 }); 156 157 $("#closeform").click(function() { 158 $('.loginform').hide(); 159 $('.overlay').hide(); 160 }); 161 $(".overlay").click(function() { 162 $('.loginform').hide(); 163 $('.overlay').hide(); 164 }); 165}); 166 167 168 169 170 171 172})(jQuery);
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.