
var tm;if(!tm){tm={};}else if(typeof tm!="object"){throw new Error("tm already exists but is not an object");}
tm.iads={};$.root=$(document);tm.iads.offset=function(wrapper,xPos,yPos,height){wrapper.css({'left':xPos,'height':height,'top':yPos});};tm.iads.superfireplace=function(event){var offsets=event.data,height=$(window).height(),nWidth=$(offsets.wrapper).width(),nOffSet=$(offsets.wrapper).offset(),xPos=0,yPos=0;if(offsets.leftOffset!==undefined){xPos=nOffSet.left-offsets.leftOffset;yPos=0;tm.iads.offset($.root.find(".ad-superfireplaceleft"),xPos,yPos,height);}
if(offsets.rightOffset!==undefined){xPos=nOffSet.left+nWidth+offsets.rightOffset;yPos=0;tm.iads.offset($.root.find(".ad-superfireplaceright"),xPos,yPos,height);}
if(offsets.topOffset!==undefined){xPos=nOffSet.left;yPos=0;height=250;var contentOffset=offsets.topOffset;tm.iads.offset($.root.find(".ad-superfireplacetop"),xPos,yPos,height);$(offsets.wrapper).css({'margin-top':contentOffset});}
$.root.find("#superfireplace").css("display","block");};tm.iads.fireplace=function(event){var offsets=event.data,height=$(window).height(),nWidth=$(offsets.wrapper).width(),nOffSet=$(offsets.wrapper).offset(),xPos=0,yPos=0;if(offsets.leftOffset!==undefined){xPos=nOffSet.left-offsets.leftOffset;yPos=0;tm.iads.offset($.root.find(".ad-fireplaceleft"),xPos,yPos,height);}
if(offsets.rightOffset!==undefined){xPos=nOffSet.left+nWidth+offsets.rightOffset;yPos=0;tm.iads.offset($.root.find(".ad-fireplaceright"),xPos,yPos,height);}
if(offsets.topOffset!==undefined){xPos=nOffSet.left;yPos=0;height=105;var contentOffset=offsets.topOffset;tm.iads.offset($.root.find(".ad-fireplacetop"),xPos,yPos,height);$(offsets.wrapper).css({'margin-top':contentOffset});}
$.root.find(".ad-fireplacetop").parent().css("display","block");};tm.iads.gutterAd=function(event){var offsets=event.data,docWidth=$(window).width(),docHeight=$(window).height(),nHeight=$(offsets.wrapper).height(),nWidth=$(offsets.wrapper).width(),nOffSet=$(offsets.wrapper).offset(),adPosition="fixed",adTop=0,adWidth="120px";if(docWidth>1248){$(".ad-gutteradleft").css({'position':adPosition,'left':nOffSet.left-offsets.leftOffset,'height':docHeight,'width':adWidth,'top':adTop});$(".ad-gutteradright").css({'position':adPosition,'left':nOffSet.left+nWidth+offsets.rightOffset,'height':docHeight,'width':adWidth,'top':adTop});$("#gutter").css("display","block");}else{$("#gutter").css("display","none");}};
