1var homepage = {}; 2var ajaxPackage = { 3 ajax: { 4 getSlickCharity: function (data, callback, errorCallback) { 5 var url = 'home/get_charities?responsive=1'; 6 7 ha.ajax.init(url, data, callback, errorCallback); 8 }, 9 } 10 11}; 12$.extend(true, homepage, ajaxPackage); 13var mainPackage = { 14 15 hostCode: 'HA', 16 17 init: function () { 18 homepage.bindEvent(); 19 homepage.slider.init(); 20 homepage.videoFancybox(); 21 homepage.featureText(); 22 }, 23 24 bindEvent: function(){ 25 $('#partner-block a.change-country').on('click', function(e){ 26 e.preventDefault(); 27 var country = $(this).data('country'); 28 homepage.slider.getSlickCharity(country); 29 30 }); 31 32 $('h1.tlt').textillate({ 33 // in animation settings 34 in: { 35 // effect name 36 effect: 'fadeInDown', 37 }, 38 }); 39 40 $('.hover-title').textillate({ 41 // in animation settings 42 in: { 43 // effect name 44 effect: 'fadeIn', 45 sync: true, 46 delay: 0 47 }, 48 }); 49 50 $('.hover-desc').on('mouseenter', function () { 51 $('#banner-title').addClass('hidden'); 52 $('.hover-title').addClass('hidden'); 53 var target = $(this).data('target'); 54 $('#desc-'+target).removeClass('hidden'); 55 $('#desc-'+target).textillate('start'); 56 }); 57 }, 58 59 videoFancybox: function () { 60 // Ajax 61 $('a#moment_video').fancybox({ 62 type: 'ajax', 63 autoSize: false, 64 autoWidth: false, 65 width: '60%', 66 autoHeight: true, 67 }); 68 }, 69 featureText: function(){ 70 $('.feature-text').fitText(1.4, { minFontSize: '16px', maxFontSize: '20px' }); 71 $('.banner-button').fitText(1.2, { minFontSize: '10px', maxFontSize: '18px' }); 72 }, 73 74 slider: { 75 init: function(){ 76 $('.slider1').retioSlider({ 77 'startOpacity' : .85, 78 'openOpacity' : 1, 79 'closeOpacity' : .85 80 }); 81 $('.slider2').retioSlider({ 82 'startOpacity' : .85, 83 'openOpacity' : 1, 84 'closeOpacity' : .85 85 }); 86 $('.slider3').retioSlider({ 87 'startOpacity' : .85, 88 'openOpacity' : 1, 89 'closeOpacity' : .85 90 }); 91 $('#banner-carousel').carousel({ 92 interval: 10000 93 }); 94 homepage.slider.getSlickCharity(); 95 if(homepage.hostCode == 'RF') 96 { 97 homepage.slider.loadMemorials('featured', $('.menu_tab li:first a')); 98 } 99 }, 100 101 getSlickCharity : function(){ 102 var country = $("#country").val(); 103 if(homepage.hostCode == 'RF'){ 104 country = 'uk'; 105 } 106 $('#partner-block .partner-carousel').html("<div style='text-align:center; padding: 20px 0;'><img src='public/images/ajaxLoader.gif' alt='loading'/></div>"); 107 108 homepage.ajax.getSlickCharity({country:country }, homepage.slider.slickPartnerRun); 109 }, 110 111 slickPartnerRun: function(data){ 112 if( $('.partner-carousel').hasClass('slick-initialized')) { 113 $('.partner-carousel').slick('unslick'); 114 } 115 $('#partner-block .charity-country a').each(function(){ 116 $(this).removeClass('active'); 117 }); 118 $('.partner-carousel').empty(); 119 $('#partner-block .partner-carousel').html(data.html); 120 $('#partner-block .partner-carousel').slick({ 121 slidesToShow: 6, 122 slidesToScroll: 6, 123 autoplay: false, 124 autoplaySpeed: 5000, 125 speed: 2000, 126 arrows: false, 127 dots: false, 128 dotsClass: 'partner-slick-dots', 129 customPaging: function(slick,index) { 130 return '<div class="paging-dot"></div>'; 131 }, 132 133 responsive: [{ 134 breakpoint: 1000, 135 settings: { 136 slidesToShow: 4, 137 slidesToScroll: 4 138 } 139 }, 140 { 141 breakpoint: 768, 142 settings: { 143 autoplay: false, 144 slidesToShow: 3, 145 slidesToScroll: 3, 146 dots: true 147 } 148 }, 149 { 150 breakpoint: 480, 151 settings: { 152 autoplay: false, 153 slidesToShow: 2, 154 slidesToScroll: 2, 155 dots: true 156 } 157 } 158 ]}); 159 }, 160 161 loadMemorials: function(kind, element, title) 162 { 163 $('#memorial-block .memorial-carousel').html("<div style='text-align:center; padding: 20px 0;'><img src='public/images/ajaxLoader.gif' alt='loading'/><div>"); 164 url = 'home/load_memorials?responsive=1'; 165 if(kind == 'featured' && homepage.hostCode == 'RF'){ 166 url = 'home/load_memorials_rf?responsive=1'; 167 } 168 $.ajax({ 169 url: url, 170 type: "POST", 171 data:{kind:kind}, 172 dataType: 'json', 173 success: function(data){ 174 if( $('.memorial-carousel').hasClass('slick-initialized')) { 175 $('.memorial-carousel').slick('unslick'); 176 $('.menu-tab li').each(function(){ 177 $(this).removeClass('active'); 178 }); 179 $(element).parent().addClass('active'); 180 $('.memorial-type-title span.active').html(title); 181 } 182 $('.memorial-carousel').empty(); 183 $('.memorial-carousel').html(data.html); 184 $('.memorial-carousel').slick({ 185 slidesToShow: 9, 186 slidesToScroll: 9, 187 autoplay: true, 188 autoplaySpeed: 9000, 189 speed: 2000,
190 arrows: false, 191 dots: true, 192 dotsClass: 'memorial-slick-dots', 193 customPaging: function(slick,index) { 194 return '<div class="paging-dot"></div>'; 195 }, 196 197 responsive: [ 198 { 199 breakpoint: 1280, 200 settings: { 201 slidesToShow: 7, 202 slidesToScroll: 7, 203 autoplaySpeed: 7000, 204 infinite: true, 205 dots: true 206 } 207 }, 208 { 209 breakpoint: 1000, 210 settings: { 211 slidesToShow: 6, 212 autoplaySpeed: 6000, 213 slidesToScroll: 6 214 } 215 }, 216 { 217 breakpoint: 768, 218 settings: { 219 autoplay: false, 220 slidesToShow: 5, 221 slidesToScroll: 5 222 } 223 }, 224 { 225 breakpoint: 600, 226 settings: { 227 autoplay: false, 228 slidesToShow: 4, 229 slidesToScroll: 4 230 } 231 }, 232 { 233 breakpoint: 500, 234 settings: { 235 autoplay: false, 236 dots: false, 237 slidesToShow: 3, 238 slidesToScroll: 3 239 } 240 }, 241 { 242 breakpoint: 360, 243 settings: { 244 autoplay: false, 245 arrows: true, 246 dots: false, 247 slidesToShow: 2, 248 slidesToScroll: 2 249 } 250 } 251 // You can unslick at a given breakpoint now by adding: 252 // settings: "unslick" 253 // instead of a settings object 254 ] 255 }); 256 } 257 }); 258 }, 259 }, 260}; 261$.extend(true, homepage, mainPackage); 262//# sourceMappingURL=sourcemap/homepage/homepage.js.map
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.