1 2$(function() { 3 4 function setupMarketTeasers() { 5 $('.s29MarketTeaser').each(function() { 6 7 var $teaser = $(this); 8 var width = $teaser.outerWidth(); 9 var targetClass; 10 if ($teaser.hasClass('s29_1x')) 11 { 12 if (width > 540) 13 targetClass = 's29_wide'; 14 else if (width < 320 && width >= 240) 15 targetClass = 's29_narrow s29_logoontop'; 16 else if (width < 240) 17 targetClass = 's29_narrow'; 18 else 19 targetClass = ''; 20 } 21 else if ($teaser.hasClass('s29_2x')) 22 { 23 if (width > 720) 24 targetClass = 's29_wide'; 25 else if (width < 480 && width >= 320) 26 targetClass = 's29_logoontop'; 27 else if (width < 320 && width >= 240) 28 targetClass = 's29_narrow s29_logoontop'; 29 else if (width < 240) 30 targetClass = 's29_narrow'; 31 else 32 targetClass = ''; 33 } 34 else if ($teaser.hasClass('s29_3x')) 35 { 36 if (width > 960) 37 targetClass = 's29_wide'; 38 else if (width < 580 && width >= 480) 39 targetClass = 's29_logoontop'; 40 else if (width < 480 && width >= 360) 41 targetClass = 's29_medium'; 42 else if (width < 360 && width >= 320) 43 targetClass = 's29_medium s29_logoontop'; 44 else if (width < 320 && width >= 240) 45 targetClass = 's29_narrow s29_logoontop'; 46 else if (width < 240) 47 targetClass = 's29_narrow'; 48 else 49 targetClass = ''; 50 } 51 else if ($teaser.hasClass('s29_4x')) 52 { 53 if (width > 1200) 54 targetClass = 's29_wide'; 55 else if (width < 760 && width >= 520) 56 targetClass = 's29_medium'; 57 else if (width < 520 && width >= 320 ) 58 targetClass = 's29_medium s29_logoontop'; 59 else if (width < 320 && width >= 240) 60 targetClass = 's29_narrow s29_logoontop'; 61 else if (width < 240) 62 targetClass = 's29_narrow'; 63 else 64 targetClass = ''; 65 } 66 $teaser.removeClass('s29_wide s29_medium s29_narrow s29_logoontop').addClass(targetClass); 67 68 $teaser.find('.s29_item').each(function() { 69 var $item = $(this); 70 if ($item.width() >= 280) 71 $item.addClass('s29_big'); 72 else 73 $item.removeClass('s29_big'); 74 }); 75 }); 76 } 77 78 $(window).resize(setupMarketTeasers); 79 80 setupMarketTeasers(); 81 82});
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.