(function(){var b={};var a={common:{doRollOver:function(e,c){var d=document.getElementById(e);if(d.className.indexOf("Selected")==-1){d.className=c}},doRollOut:function(e,c){var d=document.getElementById(e);if(d.className.indexOf("Selected")==-1){d.className=c}},isCurrentPage:function(c){return window.location.pathname.indexOf(c)!=-1}},debtDiva:{common:{scrollNews:function(e,f){if(e){var d=$("#video_container").attr("scrollWidth")-$("#video_container").width();var c;if((e=="prev")&&(c1.debtDiva.scrollPos>0)){c1.debtDiva.scrollPos--;c=c1.debtDiva.scrollPos*f}else{if(e=="next"){c=(c1.debtDiva.scrollPos+1)*f;if(c>d){c=d}else{c1.debtDiva.scrollPos++}}else{return}}$("#video_container").animate({scrollLeft:c},"fast","linear")}},setupFaceBookShareLink:function(c){$("#facebookSmall").hover(function(){c1.common.doRollOver(this.id,"btnFacebookSmallHomeHover")},function(){c1.common.doRollOut(this.id,"btnFacebookSmallHome")});$("#facebookSmall")[0].href="http://www.facebook.com/sharer.php?u="+encodeURIComponent(c)+"&t=The Debt Diva"},setupTwitterShareLink:function(c){$("#twitterSmall").hover(function(){c1.common.doRollOver(this.id,"btnTwitterSmallHomeHover")},function(){c1.common.doRollOut(this.id,"btnTwitterSmallHome")});$("#twitterSmall")[0].href="http://twitter.com/home?status=Check out "+encodeURIComponent(c)},setWebTracking:function(d){var c=document.getElementById("newsFrameWebTracking");c.src="../../ui/webtracking.aspx?ContentName="+d},videoPlay:function(c){var d=new SWFObject(c,"mymovie","320","282","6","#FFFFFF");d.addParam("wmode","transparent");d.write("video")},videoStop:function(){var e=document.getElementById("video");if(e!=null){while(e.childNodes.length>0){var d=e.childNodes[0];e.removeChild(d)}}}},home:{docReady:function(c){c1.debtDiva.scrollPos=0;$("#aboutMeDiv").dialog({autoOpen:false,height:400,width:500});$("#learnMoreAboutMe").click(function(){var e=$(window).scrollTop();$("#aboutMeDiv").dialog("open");if($.browser.msie&&$.browser.version.substr(0,1)<8){scroll(0,e)}return false}).hover(function(){c1.common.doRollOver(this.id,"btnLearnMoreAboutMeHover")},function(){c1.common.doRollOut(this.id,"btnLearnMoreAboutMe")});$("#showWinners").hover(function(){c1.common.doRollOver(this.id,"btnShowWinnersHover")},function(){c1.common.doRollOut(this.id,"btnShowWinners")});var d=document.createElement("script");d.setAttribute("type","text/javascript");d.setAttribute("src","http://search.twitter.com/search.json?q=debtdiva&callback=TweetTick&rpp=20");document.getElementsByTagName("head")[0].appendChild(d);$("#prev").bind("click",function(e){c1.debtDiva.common.scrollNews("prev",67);return false});$("#next").bind("click",function(e){c1.debtDiva.common.scrollNews("next",67);return false});c1.debtDiva.common.setupFaceBookShareLink(c);c1.debtDiva.common.setupTwitterShareLink(c)},relativeTime:function(f){var g=Date.parse(f);var d=new Date();var c=d.getTime();var h=parseInt((c-g)/1000);if(h<0){return false}if(h<=5){return"Just now"}if(h<=20){return"Seconds ago"}if(h<=60){return"A minute ago"}if(h<3600){return parseInt(h/60)+" minutes ago"}if(h<=1.5*3600){return"One hour ago"}if(h<23.5*3600){return Math.round(h/3600)+" hours ago"}if(h<1.5*24*3600){return"One day ago"}var e=f.split(" ");return e[4].replace(/\:\d+$/,"")+" "+e[2]+" "+e[1]+(e[3]!=d.getFullYear()?" "+e[3]:"")},toggleHelpVideo:function(c,d){if(DetectFlashVer("8","0","0")){if(d!="False"){window.open(c,"_blank","scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no")}else{c1.debtDiva.common.setWebTracking(c);c1.debtDiva.common.videoPlay(c)}}},tweetTick:function(d){var c=$("#tweet-container");c.html("");$(d.results).each(function(e){var f='	<div class="tweet">							        <div class="txt">'+FormatTwitString(this.text)+'</div>							        <div class="time">'+c1.debtDiva.home.relativeTime(this.created_at)+"</div>							        </div>";c.append(f)});$("div.tweet:odd").css("background-color","#E4EBF0")}},master:{docReady:function(c){if(c1.common.isCurrentPage("in-the-news")){$("#btnInTheNews",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}else{if(c1.common.isCurrentPage("debt-diva-appearances")){$("#btnUpcomingAppearances",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}else{if(c1.common.isCurrentPage("debt-diva-tips")){$("#btnTips",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}else{if(c1.common.isCurrentPage("debt-diva-downloads")){$("#btnMoneyManagement",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}else{if(c1.common.isCurrentPage("media-inquiries")){$("#btnMediaInquiries",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}else{if(c1.common.isCurrentPage("money-makeover-contest")){$("#btnMoneyMakeoverContest",$("div#subPageWrapper div#subPageNav div#subNav")).addClass("selected")}}}}}}$("#facebook_sml")[0].href="http://www.facebook.com/sharer.php?u="+encodeURIComponent(c)+"&t=The Debt Diva";$("#twitter_sml")[0].href="http://twitter.com/home?status=Check out "+encodeURIComponent(c)}},news:{docReady:function(){c1.debtDiva.scrollPos=0;$("#prev").bind("click",function(c){c1.debtDiva.common.scrollNews("prev",162);return false});$("#next").bind("click",function(c){c1.debtDiva.common.scrollNews("next",162);return false});c1.debtDiva.news.loadDefaultVideo()},loadDefaultVideo:function(){c1.debtDiva.news.toggleHelpVideo("../../docimages/CareOneVideos/DebtDiva/debtdivacavuto/debtdivacavuto.swf","False")},toggleHelpVideo:function(c,e){var d=document.getElementById("video");d.style.paddingLeft="90px";if(DetectFlashVer("8","0","0")){if(e!="False"){window.open(c,"_blank","scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no")}else{var f=(d.style.display=="")?"block":d.style.display;d.style.display="block";c1.debtDiva.common.setWebTracking(c);c1.debtDiva.common.videoPlay(c)}}else{d.style.display="inline";d.innerHTML="To watch this video, <a href='http://www.adobe.com/go/getflash/' onclick='popUp(this.href, 2); return false;'><u>download</u></a> and install the latest version of <a href='http://www.adobe.com/go/getflash/' onclick='popUp(this.href, 2); return false;'><u>Flash</u></a> on your computer."}},toggleYouTubeVideo:function(d,f,c){var e=document.getElementById("video");if(DetectFlashVer("8","0","0")){var g=(e.style.display=="")?"block":e.style.display;e.style.display="block";c1.debtDiva.common.setWebTracking(d);PlayYouTubeVideo(e,d,f,c)}else{e.style.display="inline";e.innerHTML="To watch this video, <a href='http://www.adobe.com/go/getflash/' onclick='popUp(this.href, 2); return false;'><u>download</u></a> and install the latest version of <a href='http://www.adobe.com/go/getflash/' onclick='popUp(this.href, 2); return false;'><u>Flash</u></a> on your computer."}}}}};if(window.c1){$.extend(true,window.c1,a)}else{window.c1=a}})();function TweetTick(a){c1.debtDiva.home.tweetTick(a)}function FormatTwitString(a){a=" "+a;a=a.replace(/((ftp|https?):\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?)/gm,'<a href="$1" target="_blank">$1</a>');a=a.replace(/([^\w])\@([\w\-]+)/gm,'$1@<a href="http://twitter.com/$2" target="_blank">$2</a>');a=a.replace(/([^\w])\#([\w\-]+)/gm,'$1<a href="http://twitter.com/search?q=%23$2" target="_blank">#$2</a>');return a};
