1$(window).bind("load", function () { 2 $(function () { 3 $('#banner_slides') 4 .show() 5 .oneByOne({ 6 className: 'oneByOneSlide', 7 easeType: 'random', 8 slideShow: true, 9 slideShowDelay: 6000, 10 responsive: true 11 }); 12 }) 13}); 14 15$('document').ready(function () { 16 17 // Dropdowns 18 $('.dropdown').hover( 19 function () { 20 $(this).addClass('open') 21 }, 22 function () { 23 $(this).removeClass('open') 24 } 25 ); 26 27 process_thumbnails(); 28 29 // Top Main Menu mobile 30 $('<select class="form-control" />').appendTo("#topnav"); 31 var show_text = $("#topnav .sr-only").text(); 32 $("<option />", { 33 "selected": "selected", 34 "value": "", 35 "text": show_text 36 }).appendTo("#topnav select"); 37 // Populate dropdown with menu items 38 $("#topnav a").each(function () { 39 var el = $(this); 40 $("<option />", { 41 "value": el.attr("href"), 42 "text": el.text() 43 }).appendTo("#topnav select"); 44 }); 45 // To make dropdown actually work 46 // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/ 47 $("#topnav select").change(function () { 48 window.location = $(this).find("option:selected").val(); 49 }); 50 51 // Category Menu mobile 52 $('<select class="form-control" />').appendTo("nav.subnav"); 53 // Create default option "Go to..." 54 $("<option />", { 55 "selected": "selected", 56 "value": "", 57 "text": "Go to..." 58 }).appendTo("nav.subnav select"); 59 // Populate dropdown with menu items 60 $("nav.subnav a").each(function () { 61 var el = $(this); 62 $("<option />", { 63 "value": el.attr("href"), 64 "text": el.text() 65 }).appendTo("nav.subnav select"); 66 }); 67 // To make dropdown actually work 68 // To make more unobtrusive: http://css-tricks.com/4064-unobtrusive-page-changer/ 69 $("nav.subnav select").change(function () { 70 window.location = $(this).find("option:selected").val(); 71 }); 72 73 //show selected category 74 $(".subcategories ul li").hover(function () { 75 var curr_image = $(this).find('img').clone(); 76 var parent = $(this).closest('.subcategories').find('.cat_image'); 77 $(parent).html(curr_image); 78 $(parent).find('img').show(); 79 }, function () { 80 // change to parent category 81 var parent_image = $(this).closest('.subcategories').find('.parent_cat_image'); 82 var parent = $(this).closest('.subcategories').find('.cat_image'); 83 $(parent).html($(parent_image).find('img').clone()); 84 }); 85 86 // List & Grid View 87 $('#list').click(function () { 88 $(this).addClass('btn-orange').children('i').addClass('icon-white'); 89 $('.grid').fadeOut(); 90 $('.list').fadeIn(); 91 $('#grid').removeClass('btn-orange').children('i').removeClass('icon-white') 92 }); 93 $('#grid').click(function () { 94 $(this).addClass('btn-orange').children('i').addClass('icon-white'); 95 $('.list').fadeOut(); 96 $('.grid').fadeIn(); 97 $('#list').removeClass('btn-orange').children('i').removeClass('icon-white') 98 }); 99 100 // Product page tab 101 $('#myTab a:first').tab('show'); 102 $('#myTab a').click(function (e) { 103 e.preventDefault(); 104 $(this).tab('show'); 105 }); 106 107 if (self.document.location.hash == '#review') { 108 $('#myTab a:eq(1)').click(); 109 } 110 111 // Brand Carousal 112 $(window).load(function () { 113 $('#brandcarousal').carouFredSel({ 114 width: '100%', 115 scroll: 1, 116 auto: false, 117 prev: '#prev', 118 next: '#next', 119 //pagination: "#pager2", 120 mousewheel: true, 121 swipe: { 122 onMouse: true, 123 onTouch: true 124 } 125 }); 126 }); 127 128 $("#gotop").click(function () { 129 $("html, body").animate({scrollTop: 0}, "fast"); 130 return false; 131 }); 132 133 $('.top-search .button-in-search').click(function () { 134 $('#search_form').submit(); 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.