1$(window).bind("load", function() { 2 $(function () { 3 $('#banner_slides').show(); 4 $('#banner_slides').oneByOne({ 5 className: 'oneByOneSlide', 6 easeType: 'random', 7 slideShow: true, 8 slideShowDelay: 6000, 9 responsive: true 10 }); 11 }) 12}); 13 14$('document').ready(function () { 15 16 // Dropdowns 17 $('.dropdown').hover( 18 function () { 19 $(this).addClass('open') 20 }, 21 function () { 22 $(this).removeClass('open') 23 } 24 ); 25 26 process_thumbnails(); 27 28 // Top Main Menu mobile 29 $('<select class="form-control" />').appendTo("#topnav"); 30 var show_text = $("#topnav .sr-only").text(); 31 $("<option />", { 32 "selected": "selected", 33 "value": "", 34 "text": show_text 35 }).appendTo("#topnav select"); 36 // Populate dropdown with menu items 37 $("#topnav a").each(function () { 38 var el = $(this); 39 $("<option />", { 40 "value": el.attr("href"), 41 "text": el.text() 42 }).appendTo("#topnav select"); 43 }); 44 // To make dropdown actually work 45 // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/ 46 $("#topnav select").change(function () { 47 window.location = $(this).find("option:selected").val(); 48 }); 49 50 // Category Menu mobile 51 $('<select class="form-control" />').appendTo("nav.subnav"); 52 // Create default option "Go to..." 53 $("<option />", { 54 "selected": "selected", 55 "value": "", 56 "text": "Go to..." 57 }).appendTo("nav.subnav select"); 58 // Populate dropdown with menu items 59 $("nav.subnav a").each(function () { 60 var el = $(this); 61 $("<option />", { 62 "value": el.attr("href"), 63 "text": el.text() 64 }).appendTo("nav.subnav select"); 65 }); 66 // To make dropdown actually work 67 // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/ 68 $("nav.subnav select").change(function () { 69 window.location = $(this).find("option:selected").val(); 70 }); 71 72 //show selected category 73 $(".subcategories ul li").hover(function () { 74 var curr_image = $(this).find('img').clone(); 75 var parent = $(this).closest('.subcategories').find('.cat_image'); 76 $(parent).html(curr_image); 77 $(parent).find('img').show(); 78 }, function(){ 79 // change to parent category 80 var parent_image = $(this).closest('.subcategories').find('.parent_cat_image'); 81 var parent = $(this).closest('.subcategories').find('.cat_image'); 82 $(parent).html($(parent_image).find('img').clone()); 83 }); 84 85 // List & Grid View 86 $('#list').click(function () { 87 $(this).addClass('btn-orange').children('i').addClass('icon-white') 88 $('.grid').fadeOut() 89 $('.list').fadeIn() 90 $('#grid').removeClass('btn-orange').children('i').removeClass('icon-white') 91 }); 92 $('#grid').click(function () { 93 $(this).addClass('btn-orange').children('i').addClass('icon-white') 94 $('.list').fadeOut() 95 $('.grid').fadeIn() 96 $('#list').removeClass('btn-orange').children('i').removeClass('icon-white') 97 }); 98 99 // Prdouctpagetab 100 $('#myTab a:first').tab('show') 101 $('#myTab a').click(function (e) { 102 e.preventDefault(); 103 $(this).tab('show'); 104 }); 105 106 if(self.document.location.hash=='#review'){ 107 $('#myTab a:eq(1)').click(); 108 } 109 110 // Brand Carousal 111 $(window).load(function () { 112 $('#brandcarousal').carouFredSel({ 113 width: '100%', 114 scroll: 1, 115 auto: false, 116 prev: '#prev', 117 next: '#next', 118 //pagination: "#pager2", 119 mousewheel: true, 120 swipe: { 121 onMouse: true, 122 onTouch: true 123 } 124 }); 125 }); 126 127 $("#gotop").click(function () { 128 $("html, body").animate({ scrollTop: 0 }, "fast"); 129 return false; 130 });
131 132 $('.top-search .button-in-search').click(function(){ 133 $('#search_form').submit(); 134 }); 135 136}) 137 138// Flexsliders 139$(window).load(function () { 140 141 // Flexslider index banner 142 $('#mainslider').flexslider({ 143 animation: "slide", 144 start: function (slider) { 145 $('body').removeClass('loading'); 146 } 147 }); 148 // Flexslider side banner 149 $('#mainsliderside').flexslider({ 150 animation: "slide", 151 start: function (slider) { 152 $('body').removeClass('loading'); 153 } 154 }); 155 // Flexslider Category banner 156 $('#catergoryslider').flexslider({ 157 animation: "slide", 158 start: function (slider) { 159 $('body').removeClass('loading'); 160 } 161 }); 162 163 // Flexslider Brand 164 $('#advertise').flexslider({ 165 animation: "fade", 166 start: function (slider) { 167 $('body').removeClass('loading'); 168 } 169 }); 170 171 // Flexslider Blog 172 $('#blogslider').flexslider({ 173 animation: "fade", 174 start: function (slider) { 175 $('body').removeClass('loading'); 176 } 177 }); 178 179 // Flexslider Musthave 180 $('#musthave').flexslider({ 181 animation: "fade", 182 start: function (slider) { 183 $('body').removeClass('loading'); 184 } 185 }); 186 187 $('#testimonialsidebar').flexslider({ 188 animation: "slide", 189 start: function (slider) { 190 $('body').removeClass('loading'); 191 } 192 }); 193 194}); 195 196function process_thumbnails() { 197 // Product thumbnails 198 $('.thumbnail').each(function () { 199 $(this).hover( 200 function () { 201 $(this).children('.shortlinks').fadeIn() 202 }, 203 function () { 204 $(this).children('.shortlinks').fadeOut() 205 }); 206 }); 207} 208 209$(window).scroll(function () { 210 if ($(this).scrollTop() > 50) { 211 $('#gotop').fadeIn(500); 212 } else { 213 $('#gotop').fadeOut(500); 214 } 215}); 216 217 218function openModalRemote(id, url){ 219 var modal = $(id); 220 var modalBody = $(id +' .modal-body'); 221 modal.on('show.bs.modal', function () { 222 modalBody.load(url) 223 }).modal(); 224}
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.