/** 
  TripleM and Mix Custom Functionality 
    CHANGELOG: 
      20080829 - Born. 
      20081002 - Added tweaks that were included in the fd.todaynetwork.custom.js TripleM carve. 
      20081024 - Added TripleM ads fix to pass the timezone in the ad url. 
      20081224 - Make sure we pass through all ad parameters. 
      20100118 - Updated function for generating SiteAdvertDesc for ads. (Whe) 
 **/ 
var adSizes={acquisitionpromo:"1x1",acquisitionad:"1x1",domainresizable:"1x1",enttop:"60x18",lastop:"60x18",weatherad:"65x55",emailfriendsponsor:"100x29",toolbox:"115x28",whatsonad:"140x25",mmmpodcast:"145x30",mmmfooty:"145x30",mmmonair:"145x30",mmmpoll:"145x30",homeweatherad:"180x30",bizquotebox:"192x16",travelfeature:"192x51",techfeature:"192x51",sportfeature:"192x51",sectiontool:"282x60",scoreboard:"290x60",dlbox1:"292x65",dlbox2:"292x65",multilink:"295x60",multilink:"300x105",featad:"300x36",textad:"300x28",traveltextad:"300x28",networkad:"300x250",multilink:"300x55",minibar:"300x40",promobox:"300x125",bizlink:"300x20",promobox:"300x145",mmmpollresults:"330x40",mmmshowsponsor:"330x40",mmmpodcastlisten:"400x100",acquisitionminilink:"638x20",resizable:"638x68",wideresizable:"645x40",domaintext:"0x1",iwos:"3x1"};
if(window.FD){FD.getSiteAdvertDesc=function(A){var C,B;var D=A.params;if(D&&D.site){if(D.site.toUpperCase()=="TRIPLEM"&&D.cat!=D.timezone){if(D.cat2){D.cat3=D.cat2}if(D.cat1){D.cat2=D.cat1}if(D.cat){D.cat1=D.cat}D.cat=D.timezone}C=[siteAdvertDesc.group,D.site,D.cat,siteAdvertDesc.section].join(".");B=[siteAdvertDesc.section,D.site].join(".");if(D.cat){B+="."+D.cat;if(D.cat1){B+="."+D.cat1;if(D.cat2){B+="."+D.cat2}}}}return{redir:"/adredirect.html?ad=",area:B.toUpperCase(),site:C.toUpperCase()}}}if(window.FD){FD.triplem=new Class({Implements:[Events,Options],options:{},initialize:function(){this.setOptions();
this._initAutoSearchInputs();this._initUITweaks()},_initAutoSearchInputs:function(){var B=$$("form.frmSearch input");for(var A=0;A<B.length;A++){if(B[A].type=="text"){if(B[A].value!=""){B[A].addClass("userInput")}B.addEvent("focus",function(D){if(D&&D.target){var C=$(D.target);if(C.type=="text"&&C.value==C.defaultValue){C.value="";C.addClass("userInput")}}}.bind(this));B.addEvent("blur",function(D){if(D&&D.target){var C=$(D.target);if(C.type=="text"&&C.value==""){C.value=C.defaultValue;C.removeClass("userInput")
}}}.bind(this))}}},_initUITweaks:function(){rounded_fix=$$(".rounded-1");if(rounded_fix.length>=1){rounded_fix[rounded_fix.length-1].addClass("noborder")}a=$$(".panel .poll");for(var A=0;A<a.length;A++){if(a[A].parentNode.className!="mainCol"){a[A].id="pollWrap"+A;var E=document.createElement("div");E.className="rounded-poll";var D=document.getElementById("pollWrap"+A);E.appendChild(D.cloneNode(true));D.parentNode.replaceChild(E,D)}}b=$$("ul.pagination");for(var A=0;A<b.length;A++){b[A].id="p"+A;
var E=document.createElement("del");E.className="pagination_centre";E.id="paginationwrap"+A;var D=document.getElementById("p"+A);E.appendChild(D.cloneNode(true));D.parentNode.replaceChild(E,D);wrapper2=document.createElement("div");wrapper2.style.textAlign="center";var C=document.getElementById("paginationwrap"+A);wrapper2.appendChild(C.cloneNode(true));C.parentNode.replaceChild(wrapper2,C)}a=$("submit_search");if(a){a.value=""}if($$(".membershipcontroltab")){if($$(".fRows")[0]){$$(".fRows")[0].addClass("white")
}}if(window.ActiveXObject&&document.getElementById&&!window.XMLHttpRequest){var B=document.getElementsByTagName("ul");for(i=0;i<B.length;i++){if(B[i].parentNode.className=="hover"||B[i].parentNode.className=="panel showheader"){this.setIEOvers(B[i])}}}},setIEOvers:function(B){listItems=B.getElementsByTagName("li");for(k=0;k<listItems.length;k++){var A=listItems[k];A.onmouseover=function(){this.className+=" over"};A.onmouseout=function(){this.className=this.className.replace(" over","")}}}});var triplem;
function initTriplem(){triplem=new FD.triplem()}FD.register("Triplem",1)};