Juttuvirta

uusimmat reseptit

Kaupalliset yhteistyöt

Muualta poimittua

X
');} if(jQuery('body').hasClass('single-post')) { var adPeriodFound = true; var nbrOfAdPlaces = jQuery('.content__body > p:not(:first) > .capitalized').closest('p').length; console.log('P count: ' + nbrOfAdPlaces); if(nbrOfAdPlaces == 0) { nbrOfAdPlaces = jQuery('.content__body > p').length; adPeriodFound = false; } if(document.documentElement.clientWidth >= 1020) { if (nbrOfAdPlaces >= 20) { createAdUnit(2, 'in-text', 'in-text-in-content ', 8, adPeriodFound) //createAdUnit(2, 'in-text', 'in-text-in-content ', 15, adPeriodFound) } else if (nbrOfAdPlaces >= 10) { createAdUnit(2, 'in-text', 'in-text-in-content ', 8, adPeriodFound) } //if(nbrOfAdPlaces >= 1){createAdUnit(2, 'in-text', 'in-text-in-content ', 7, adPeriodFound)}; } //if(nbrOfAdPlaces >= 2){createAdUnit(4, 'bluebillywig', '', 2, adPeriodFound)}; //if(nbrOfAdPlaces >= 4){createAdUnit(4, 'kpmyyntibanneri', '', nbrOfAdPlaces, adPeriodFound)}; } }) } function createAdUnit(adType, adUnit, adUnitStyle, adUnitIndex, adPeriod){ var adStyleBefore = '', adStyleAfter = '', mobAd = adUnit.indexOf('mob-') > -1 ? true : false; if(mobAd){ adStyleBefore = ''; adStyleAfter = ''; } if(adType 4){ var adStr = '
' + adStyleBefore + '