/**********************************************************************************************************************************
// Post-It Redesign Sitewide JS WWEN
// Modified:09/23/2014 (a1qq1zz)
// Author: a1qq1zz
/*********************************************************************************************************************************/
var config={
	logLvl:0	
};
var pGrabUrlParam=function(param){

	var gupURL = window.location.search.substring(1);
	var gupVAR= gupURL.split('&');
	for (var i = 0; i < gupVAR.length; i++) {
		var gupNAM = gupVAR[i].split('=');
		if (gupNAM[0] == param) {
			return gupNAM[1];
		}
	}

};
var siteLog=function(mssg){
	
	var mymssgprfx="";
			
	if(pGrabUrlParam('debug')=="siteJS"){
		 
		var myMSSG;
		
		if(mssg.indexOf('START')>-1){
			config.logLvl++;
		}
		
		if(config.logLvl==2){
			mymssgprfx="	";	
		}
		if(config.logLvl==3){
			mymssgprfx="		";	
		}
		if(config.logLvl==4){
			mymssgprfx="			";	
		}
		
		if(typeof mssg=='object'){
			
			for (var i = 0; i < mssg.length; i++) {
				
				myMSSG=mymssgprfx+"-- "+mssg[i];
				window.console && console.log(myMSSG);
				
			}
				
		}else if(typeof mssg=='string'){
			
				myMSSG=mymssgprfx+mssg;
				window.console && console.log(myMSSG);
				
		}
						
		if(mssg.indexOf('END')>-1){
			
			if(config.logLvl>1){
			
			}
			
			config.logLvl--;
			
		}
		
	}
	
};

var carConfig={
	'curCar':null, 
	'curCarID':null, 
	'curCarClass':null,
	'curCarAnimType':null, 
	'curCarDisTime':null,  
	'curCarSlideTotal':null,
	'carDisplay':null, 
	'carDisplayID':null,
	'carDisplayClass':null, 
	'carSlideItem':null, 
	'carSlideItemClass':null, 
	'carControls':null, 
	'carControlsID':null,
	'carControlsClass':null,
	'carControlsOuterWrapper':null,
	'carControlsOuterWrapperWidth':null,
	'carControlsInnerWrapper':null, 
	'carControlsWrapperMarginOffset':null,
	'carControlsItem':null,
	'carControlsItemID':null,  
	'carControlsItemClass':null, 
	'carControlsItemMargin':null,
	'carTabs':null,
	'carTabsID':null, 
	'carTabsClass':null, 
	'carTabsOuterWrapper':null,
	'carTabsInnerWrapper':null,
	'carTabsItem':null,
	'carTabsItemID':null, 
	'carTabsItemClass':null,
	'carTimeOut':null
}

function fn_postit_autoCarousels(){
	
	/*LOG*/siteLog("-> Carousels (auto): START");
	
	clearTimeout(carConfig.carTimeOut);
	
	var curActiveControlIndex=$(carConfig.curCar).find('.'+carConfig.carControlsItemClass+'.active').index();
	var nxtActiveControlIndex;
	if(curActiveControlIndex+1==carConfig.curCarSlideTotal){
		nxtActiveControlIndex=0;
	}else{
		nxtActiveControlIndex=curActiveControlIndex+1;
	}
	
	var nxtcontrol=$(carConfig.curCar).find('.'+carConfig.carControlsItemClass+':eq('+nxtActiveControlIndex+')');
	
	var curSlideTitle=$(nxtcontrol).closest('.postitrd-carousel').attr('data-currentslide-title');
	var curSlideObj=$('.'+carConfig.carSlideItemClass+'[title="'+curSlideTitle+'"]');
	var nxtSlideObj=$('.'+carConfig.carSlideItemClass+'[title="'+$(nxtcontrol).attr('title')+'"]');
	$(nxtSlideObj).css('z-index',$(curSlideObj).css('z-index'));
	$(curSlideObj).css('z-index','0');
	
	fn_postit_setCarouselsInteract_animateItems(nxtSlideObj,curSlideObj);

	$(nxtcontrol).closest('.postitrd-carousel').attr('data-currentslide-title',$(nxtcontrol).attr('title'));
	$(nxtcontrol).closest('.postitrd-carousel').find('.'+carConfig.carControlsItemClass).removeClass('active');
	$(nxtcontrol).addClass('active');
	
	/*LOG*/siteLog("-> Carousels (auto): END");
	
	carConfig.carTimeOut=setTimeout('fn_postit_autoCarousels()',carConfig.curCarDisTime);
	
	
}
function fn_postit_setCarouselsInteract_animateItems(newSlide,oldSlide){
	$(newSlide).animate({opacity:1.0},2000);
	$(oldSlide).animate({opacity:0},3000);
}
function fn_postit_setCarouselsInteract_showItem(control, distime){
	
	/*LOG*/siteLog("-> Carousels (showitem): START");
	
	clearTimeout(carConfig.carTimeOut);
	
	var curSlideTitle=$(control).closest('.postitrd-carousel').attr('data-currentslide-title');
	var curSlideObj=$('.'+carConfig.carSlideItemClass+'[title="'+curSlideTitle+'"]');
	var nxtSlideObj=$('.'+carConfig.carSlideItemClass+'[title="'+$(control).attr('title')+'"]');
	$(nxtSlideObj).css('z-index',$(curSlideObj).css('z-index'));
	$(curSlideObj).css('z-index','0');
	
	fn_postit_setCarouselsInteract_animateItems(nxtSlideObj,curSlideObj);

	$(control).closest('.postitrd-carousel').attr('data-currentslide-title',$(control).attr('title'));
	$(control).closest('.postitrd-carousel').find('.'+carConfig.carControlsItemClass).removeClass('active');
	$(control).addClass('active');
	
	/*LOG*/siteLog("-> Carousels (showitem): END");
	
	carConfig.carTimeOut=setTimeout('fn_postit_autoCarousels()',distime);
	
}
function fn_postit_setCarouselsInteract(){
	
	/*LOG*/siteLog("-> Carousels (interaction): START");
	
	$(carConfig.curCar).find('div.'+carConfig.carControlsItemClass).each(function(i,e){
		$(this).click(function(){
			if($(this).attr('title')!=$(this).closest('.postitrd-carousel').attr('data-currentslide-title')){
				fn_postit_setCarouselsInteract_showItem($(this), 30000);
			}
		});
	});
	
	carConfig.carTimeOut=setTimeout('fn_postit_autoCarousels()', carConfig.curCarDisTime);
	
	/*LOG*/siteLog("-> Carousels (interaction): END");
	
}
function fn_postit_createCarousels_tabContainer(){
	
	if($(this).attr('data-tabs')=='Yes'){
		
		/*LOG*/siteLog("-> Carousels (tabs): START");
		
		carConfig.carTabs=$('<div id="'+carConfig.curCarID+'-Tabs" class="'+carConfig.curCarClass+'-tabs"></div>').appendTo(this);
		carConfig.carTabsID=$(carConfig.carTabs).attr('id');
		carConfig.carTabsClass=$(carConfig.carTabs).attr('class');
		carConfig.carTabsOuterWrapper=$('<div class="'+carConfig.carTabsClass+'-owrapper"></div>').appendTo(carConfig.carTabs);
		carConfig.carTabsInnerWrapper=$('<div class="'+carConfig.carTabsClass+'-iwrapper"></div>').appendTo(carConfig.carTabsOuterWrapper);
		
		$(carConfig.carDisplay).find('> div').each(function(j,f){
			carConfig.carDisplayItem=$(this);
			carConfig.carTabsItem=$('<div></div>').appendTo(carConfig.carTabsInnerWrapper);
			$(carConfig.carTabsItem).html($(carConfig.carDisplayItem).attr('title'));
		});
		
		/*LOG*/siteLog("-> Carousels (tabs): END");
		
	}
	
	fn_postit_setCarouselsInteract();	
	
}

function fn_postit_createCarousels_controlContainer(){
	
	// Controls Container
	if($(carConfig.curCar).attr('data-controls')=='Yes'){
		
		/*LOG*/siteLog("-> Carousels (controls): START");
		
		// Controls Container
		carConfig.carControls=$('<div id="'+carConfig.curCarID+'-Controls" class="'+carConfig.curCarClass+'-controls"></div>').appendTo(carConfig.curCar);// Add controls container
		carConfig.carControlsID=$(carConfig.carControls).attr('id');
		carConfig.carControlsClass=$(carConfig.carControls).attr('class');
		
		carConfig.carControlsOuterWrapper=$('<div class="'+carConfig.carControlsClass+'-owrapper"></div>').appendTo(carConfig.carControls);// Add outerwrapper to controls container
		carConfig.carControlsInnerWrapper=$('<div class="'+carConfig.carControlsClass+'-iwrapper"></div>').appendTo(carConfig.carControlsOuterWrapper);// Add innerwrapper to outerwrapper 
		
		
		$('#'+carConfig.carDisplayID+' .'+carConfig.carSlideItemClass).each(function(j,f){// Create control item
		
			carConfig.carControlsItem=$('<div id="'+carConfig.carControlsID+'-Item'+(j+1)+'" class="'+carConfig.carControlsClass+'-item" title="'+$(carConfig.curCar).find('.'+carConfig.carSlideItemClass+':eq("'+j+'")').attr('title')+'">'+j+'</div>').appendTo(carConfig.carControlsInnerWrapper);
			carConfig.carControlsItemID=$(carConfig.carControlsItem).attr('id')
			carConfig.carControlsItemClass=$(carConfig.carControlsItem).attr('class');
			
			if(j==0){
				carConfig.carControlsItemMargin=$(carConfig.carControlsItem).css('margin-right').replace('px','');
				$(carConfig.carControlsItem).addClass('active');
				$(carConfig.curCar).attr('data-currentslide-title',$(carConfig.carControlsItem).attr('title'));	
			}
			
			if(j==(carConfig.curCarSlideTotal-1)){
				$(carConfig.carControlsItem).addClass('last');
			}	
			
		});
		
		// Set control item wrapper width (control item width*number of items + sum of gutter between control items)
		carConfig.carControlsOuterWrapperWidth=Number($(carConfig.carControlsItem).width()*carConfig.curCarSlideTotal)+Number(carConfig.carControlsItemMargin*(carConfig.curCarSlideTotal-1));
		$(carConfig.carControlsInnerWrapper).width(carConfig.carControlsOuterWrapperWidth);
		
		// Set control item wrapper position appling a margin-left offset (wrapper parent width - wrapper width)
		carConfig.carControlsWrapperMarginOffset=$(carConfig.carControlsOuterWrapper).width()-carConfig.carControlsOuterWrapperWidth;
		$(carConfig.carControlsInnerWrapper).css({'margin-left':carConfig.carControlsWrapperMarginOffset+'px'});
		
		/*LOG*/siteLog("-> Carousels (controls): END");
		
	}
	
	fn_postit_createCarousels_tabContainer();	
	
}



function fn_postit_createCarousels_initSlides(){
	
	/*LOG*/siteLog("-> Carousels (slides): START");
	
	// Loop through each slide
	$(carConfig.curCar).find('.'+carConfig.carSlideItemClass).each(function(j,f){
		
		// Grab slide instance
		carConfig.carSlideItem=$(this);
		
		// Set slide instance id
		$(carConfig.carSlideItem).attr("id",carConfig.carDisplayID+"-Item"+(j+1));
		
		// Set slide instance z-index
		$(carConfig.carSlideItem).css({'z-index':(carConfig.curCarSlideTotal-j)});
		
		if(j==0){
			
			// first slide class "active" applied
			$(carConfig.carSlideItem).addClass('active');
			
			// first slide opacity is 100%
			$(carConfig.carSlideItem).css({'opacity':1});
		
		}else{
			
			// remaining slides opacity is 0%
			$(carConfig.carSlideItem).css({'opacity':0});
			
		}
			
	
	});
	
	/*LOG*/siteLog("-> Carousels (slides): END");	
	
	fn_postit_createCarousels_controlContainer();

}
function fn_postit_createCarousels_displayContainer(){
	
	/*LOG*/siteLog("-> Carousels (display container): START");
	
	// Display Container - wrap all slides in this container
	var objId=carConfig.curCarID+'-Display';
	var objCl=carConfig.curCarClass+'-display';
	$(carConfig.curCar).children('.'+carConfig.carSlideItemClass).wrapAll('<div id="'+objId+'" class="'+objCl+'"></div>');
	
	// Display Container - grab id & class name
	carConfig.carDisplayID=objId;
	carConfig.carDisplayClass=objCl;
	
	// Display Container - set width and height to width and height applied to carousel or parent container.
	$('#'+carConfig.carDisplayID).width($('#'+carConfig.curCarID).width());
	$('#'+carConfig.carDisplayID).height($('#'+carConfig.curCarID).height());
	
	/*LOG*/siteLog("-> Carousels (display container): END");
	
	fn_postit_createCarousels_initSlides();
	
	
	
}

function fn_postit_createCarousels(){
	
	/*LOG*/siteLog("-> Carousels: START");
	
	$('.postitrd-carousel').each(function(i,e){
			
		carConfig.curCar=$(this);
		
		carConfig.curCarID=$(carConfig.curCar).attr('id');
		
		carConfig.curCarClass=$(carConfig.curCar).attr('class');
		
		carConfig.curCarAnimType=$(carConfig.curCar).attr('data-transition');
		
		carConfig.curCarDisTime=$(carConfig.curCar).attr('data-auto')*1000;
		
		carConfig.curCarSlideTotal=$(carConfig.curCar).find('.banner-item').size();
		
		carConfig.carSlideItemClass=$(carConfig.curCar).find('.banner-item').attr('class');

		if(carConfig.curCarSlideTotal>1){

			fn_postit_createCarousels_displayContainer();
			
		}
		
	});
	
	/*LOG*/siteLog("-> Carousels: END");
}
/* Webtrend tags */
function fn_postit_applyMetrics(){
	
	/*LOG*/siteLog("-> Metrics: START");
	
	var myHref = "/wps/portal/3M/en_US/PostItNA/Home/Ideas/Evernote/";
	var myHref2 = "/wps/portal/3M/en_US/PostItNA/Home/Ideas/Evernote";
	var myHref3 = "/wps/portal/3M/en_US/PostItNA/Home/Products/?N=4327+3294632424&rt=r3";
	
	if( document.location.pathname+window.location.search == myHref) {
	$('head').append("<meta name='WT.cg_n' content='PI_EVERNOTE'>"+"<meta name='WT.cg_s' content='PI_EVERNOTE_ALL'>");
	}
	else if( document.location.pathname+window.location.search == myHref2) {
	$('head').append("<meta name='WT.cg_n' content='PI_EVERNOTE'>"+"<meta name='WT.cg_s' content='PI_EVERNOTE_ALL'>");
	}
	else if( document.location.pathname+window.location.search == myHref3) {
	$('head').append("<meta name='WT.cg_n' content='WTB_ROLLUP'>"+"<meta name='WT.cg_s' content='WTB_WTBPG_LOAD'>");
	}
	else if( document.location.pathname+window.location.search == myHref3) {
	$('head').append("<meta name='WT.cg_n' content='WTB_ROLLUP'>"+"<meta name='WT.cg_s' content='WTB_WTBPG_LOAD'>");
	}
	else if( document.location.pathname.indexOf('en_US/PostItNA/Home/Offers/Coupons') > -1 ) {
	$('head').append("<meta name='WT.cg_n' content='CPN_ROLLUP'>"+"<meta name='WT.cg_s' content='CPN_CPNPG_LOAD'>");
	}
     if( document.location.pathname.indexOf('/wps/portal/3M/en_US/PostItNA/Home/Ideas/Dry-Erase-Surface/') > -1 ) {
 $('a[href="www.post-it.com/wps/portal/3M/en_US/PostItNA/Home/Ideas/Articles/the-nerdery/"]').click(function(){
 dcsMultiTrack('WT.cg_n','LEARN_MORE','WT.cg_s','LEARN_NERDERY','DCS.dcsuri',window.location.pathname+'LEARN_NERDERY','WT.ti','LEARN_NERDERY');ga('send', 'event', 'LEARN MORE', 'CLICK', 'LEARN MORE DES', {'nonInteraction': 1});
 });
 $('a[href="www.post-it.com/wps/portal/3M/en_US/PostItNA/Home/Ideas/Articles/Summit/"]').click(function(){
 dcsMultiTrack('WT.cg_n','LEARN_MORE','WT.cg_s','LEARN_SUMMIT','DCS.dcsuri',window.location.pathname+'LEARN_SUMMIT','WT.ti','LEARN_SUMMIT');ga('send', 'event', 'LEARN MORE', 'CLICK', 'LEARN MORE DES', {'nonInteraction': 1});
 });
 $('a[href="www.post-it.com/wps/portal/3M/en_US/PostItNA/Home/Ideas/Articles/little-design/"]').click(function(){
 dcsMultiTrack('WT.cg_n','LEARN_MORE','WT.cg_s','LEARN_LITTLEDESIGN','DCS.dcsuri',window.location.pathname+'LEARN_LITTLEDESIGN','WT.ti','LEARN_LITTLEDESIGN');ga('send', 'event', 'LEARN MORE', 'CLICK', 'LEARN MORE DES', {'nonInteraction': 1});
 });
 $('a[href="www.post-it.com/wps/portal/3M/en_US/PostItNA/Home/Products/?N=4327+8705489&rt=r3"]').click(function(){
 dcsMultiTrack('WT.cg_n','SEE_PRODUCTS','WT.cg_s','SEEPRODUCTS_DRYERASE','DCS.dcsuri',window.location.pathname+'SEEPRODUCTS_DRYERASE','WT.ti','SEEPRODUCTS_DRYERASE');ga('send', 'event', 'SEE PRODUCTS', 'CLICK', 'SEE PRODUCTS DES', {'nonInteraction': 1});
 });
 }
 $(".evernote-link-everdownload").click(function(){dcsMultiTrack('WT.cg_n','PI_EVERNOTE','WT.cg_s','PI_EVERNOTE_CLICK','DCS.dcsuri',window.location.pathname+'PI_EVERNOTE_CLICK','WT.ti','PI_EVERNOTE_CLICK');ga('send', 'event', 'EVERNOTE', 'CLICK', 'EVERNOTE SIGNUP CLICK', {'nonInteraction': 1});});
 $("#camera-AlsoLike").click(function(){dcsMultiTrack('WT.cg_n','PI_EVERNOTE','WT.cg_s','PI_EVERNOTE_CLICK','DCS.dcsuri',window.location.pathname+'PI_EVERNOTE_CLICK','WT.ti','PI_EVERNOTE_CLICK');ga('send', 'event', 'EVERNOTE', 'CLICK', 'EVERNOTE SIGNUP CLICK', {'nonInteraction': 1});});
 
 if( document.location.pathname.indexOf('en_US/PostItNA/Home/Ideas/Articles') > -1 ) {
 $('head').append("<meta name='WT.seg_1' content='Article'>");
 }
 else if( document.location.pathname.indexOf('en_US/PostItNA/Home/Products/') > -1 ) {
 $('head').append("<meta name='WT.seg_2' content='Products'>");
 };
 
 if( document.location.pathname.indexOf('/wps/portal/3M/en_US/PostItNA/Home/Ideas/Articles/') > -1 ) {
$(".headingtext-block a").click(function(){
dcsMultiTrack('WT.cg_n','Article Page clicks','WT.cg_s','Body items: '+this.href,'DCS.dcsuri',window.location.pathname+'ArticlePageClicks','WT.ti','Article Page Clicks','WT.dl','99')
});
$(".postitrd-article-rcol-feature-wrap a").click(function(){
dcsMultiTrack('WT.cg_n','Article Page clicks','WT.cg_s','Right column items: '+this.href,'DCS.dcsuri',window.location.pathname+'ArticlePageClicksRightColumnItems','WT.ti','Article Page Clicks - Right column items','WT.dl','99')
});
$(".postitrd-article-alsolike a").click(function(){
dcsMultiTrack('WT.cg_n','Article Page clicks','WT.cg_s','Also Like items: '+this.href,'DCS.dcsuri',window.location.pathname+'ArticlePageClicksAlsoLikeItems','WT.ti','Article Page Clicks - Also Like items','WT.dl','99')
});	
} 
    

	$("#psn1 a").click(function(){dcsMultiTrack('WT.cg_n','GLOBAL_HEADER','WT.cg_s','HEADER_PRODUCTS','DCS.dcsuri',window.location.pathname+'HEADER_PRODUCTS','WT.ti','HEADER_PRODUCTS')});
	$("#psn2 a").click(function(){dcsMultiTrack('WT.cg_n','GLOBAL_HEADER','WT.cg_s','HEADER_IDEAS','DCS.dcsuri',window.location.pathname+'HEADER_IDEAS','WT.ti','HEADER_IDEAS')});
	$("#psn3 a").click(function(){dcsMultiTrack('WT.cg_n','GLOBAL_HEADER','WT.cg_s','HEADER_OFFERS','DCS.dcsuri',window.location.pathname+'HEADER_OFFERS','WT.ti','HEADER_OFFERS')});
	$("#psn4 a").click(function(){dcsMultiTrack('WT.cg_n','GLOBAL_HEADER','WT.cg_s','HEADER_PERKS','DCS.dcsuri',window.location.pathname+'HEADER_PERKS','WT.ti','HEADER_PERKS')});
	$("#ftrlink-wtb").click(function(e){dcsMultiTrack('WT.cg_n','WTB_ROLLUP','WT.cg_s','WTB_GLOBAL_FOOTER','DCS.dcsuri',window.location.pathname+'WTB_GLOBAL_FOOTER','WT.dl','99')});
	$("#coupon-fullad a").click(function(){dcsMultiTrack('WT.cg_n','CPN_ROLLUP;COUPONS','WT.cg_s','CPN_CATEGORY;COUPONS_FULL_ADHESIVE','DCS.dcsuri',window.location.pathname+'COUPONS_FULL_ADHESIVE','WT.ti','COUPONS_FULL_ADHESIVE','WT.dl','99','WT.si_cs','1');ga('send', 'event', 'COUPON', 'CLICK', 'COUPON CLICK', {'nonInteraction': 1});});
	$(".wallgallery-button-left").click(function(e){dcsMultiTrack('WT.cg_n','WALL_ART','WT.cg_s','WALLART_BROWSE_PRODUCTS','DCS.dcsuri',window.location.pathname+'WALLART_BROWSE_PRODUCTS','WT.dl','99')});
	$(".wallgallery-button-right").click(function(e){dcsMultiTrack('WT.cg_n','WALL_ART;CPN_ROLLUP;COUPONS','WT.cg_s','WALLART_COUPONS;CPN_CATEGORY;COUPONS_WALLART','DCS.dcsuri',window.location.pathname+'COUPONS_WALLART','WT.dl','99')});
	$("#wtbCIButton").click(function(){dcsMultiTrack('WT.cg_n','WTB_ROLLUP','WT.cg_s','WTB_PDP','DCS.dcsuri',window.location.pathname+'WTB_PDP','WT.ti','WTB_PDP');ga('send', 'event', 'WHERE TO BUY', 'CLICK', 'WTB PRODUCT PAGE', {'nonInteraction': 1});});
	$("#learnMoreButton").click(function(){dcsMultiTrack('WT.cg_n','WTB_ROLLUP','WT.cg_s','WTB_PDP_BUYNOW','DCS.dcsuri',window.location.pathname+'WTB_PDP_BUYNOW','WT.ti','WTB_PDP_BUYNOW');ga('send', 'event', 'WHERE TO BUY', 'CLICK', 'WTB PRODUCT BUY NOW', {'nonInteraction': 1});});
	$("#POSTITRD-PLA .lnk-download").click(function(){dcsMultiTrack('WT.cg_n','APPS','WT.cg_s','APPS_POSTIT_PLUS','DCS.dcsuri',window.location.pathname+'APPS_POSTIT_PLUS','WT.ti','APPS_POSTIT_PLUS','WT.si_cs','1');ga('send', 'event', 'APPS', 'CLICK', 'APP DOWNLOAD', {'nonInteraction': 1});});

	/*LOG*/siteLog("-> Metrics: END");

}
/* Webtrend tags end */
function fn_postit_adjustSearch(){
	
	/*LOG*/siteLog("-> Search: START");

	$('#GSAMainContent').removeAttr('width').addClass('searchRslt');
	
	/*LOG*/siteLog("-> Search: END");
	
}
function fn_postit_hitVideos(){
	
	/*LOG*/siteLog("-> Videos: START");
	
	if($(".int-video").size()>0){
		$(".int-video").MMMVideosWColorbox({'autostart':'true'});
	}
	
	/*LOG*/siteLog("-> Videos: END");
	
}
function fn_postit_articleSpecs(){
	
	/*LOG*/siteLog("-> Article Specs: START");

	// Article Specs
	$('.postitrd-article-specs').find('> div').each(function(i,d){
		var specsList=["SubjTopicAuthor","Materials","GradeTime"];
		$(this).attr('id',specsList[i]);
		$(this).find('> p').each(function(j,e){
			var elmntLabels=["heading","text"];
			$(this).find('> span').each(function(k,f){
				$(this).addClass(elmntLabels[k]);
			});
		});
	});
	
	// Article Steps
	$('.step-block').each(function(index, element) {
		$(this).addClass('step-block-color'+(index % 4));
	});	
	
	/*LOG*/siteLog("-> Article Specs: END");
	
}
function fn_postit_adjustProductCatalog(){
	
	/*LOG*/siteLog("-> Product Catalog Adjust: START");
	
	//Search image replacement in the Product Catalog
	$("#searchButton").attr('src', '/3MContentRetrievalAPI/BlobServlet?assetId=1361760842957&assetType=MMM_Image&blobAttribute=ImageFile');	
	
	/*LOG*/siteLog("-> Product Catalog Adjust: END");
	
}
function fn_postit_adjustFooter(){
	
	/*LOG*/siteLog("-> Footer Adjust: START");
	
	$('#sitefoot0').find('a').remove();	
	
	/*LOG*/siteLog("-> Footer Adjust: END");
	
}
function fn_postit_adjustHeader(){
	
	/*LOG*/siteLog("-> Header Adjust: START");
	
	// Header wrap inner
	$('#mmmheader').wrapInner('<div class="postitrd-header-wrap"></div>');
	
	// Header Search
	$('#searchValue').val('Search our site').css('color','#999999').focus(function(){
		$(this).css('color','#666666');
		$(this).val('').focusout(function(){
			if($(this).val()==''){
				$(this).val('Search our site').css('color','#999999');
			}
		});
	});
	
	/*LOG*/siteLog("-> Header Adjust: END");
	
}

$(document).ready(function() {
	
	/*LOG*/siteLog("-> Post-it (Ready): START");

	fn_postit_adjustHeader();
	
	fn_postit_adjustFooter();
	
	fn_postit_adjustSearch();
	
	fn_postit_createCarousels();
	
	fn_postit_adjustProductCatalog()
	
	fn_postit_articleSpecs();

	fn_postit_applyMetrics();
	
	/*LOG*/siteLog("-> Post-it (Ready): END");

});
