

/** 
* @filepath: /shows/dancing-with-the-stars/site.js
* @timestamp: 1258494044
*/

(function($){$(document).ready(function(){if($('#submit-design').length){$('#submit-design').click(function(){if(abcdm.abccom.Utils.userCheck('slt')===true){submitCostume();return false;}else{abcdm.abccom.Register.init('ht','f33e8a54d8dbeb2b819eea30e68adb71',{'callback':function(){window.location.replace("the-costume");}});return false;}
return false;});}
if($("#the-costume-iframe").length){if(abcdm.abccom.Utils.userCheck('slt')===true){return false;}else{abcdm.abccom.Register.init('ht','f33e8a54d8dbeb2b819eea30e68adb71',{'callback':function(){window.location.reload(true);}});return false;}}});displayThankyou=function(){username=abcdm.abccom.Register.getUserByCookies();if(abcdm.abccom.Utils.userCheck(checkRegType)===true){}else{var redirect=location.href.replace("?","/");redirect=redirect.replace(/&/g,"/");window.location.replace(redirect);return false;}
var redirect=location.href.replace("?","/");redirect=redirect.replace(/&/g,"/");$('#vote-user-id').html(username);$('#thank-you-header').show();$('#thanksForVoting').show()
var queryString=window.top.location.search.substring(1);var voteChoice=getParameter(queryString,'voteChoice');if(voteChoice&&voteChoice!='null'){$('#votedChoice').html($('#'+voteChoice).parent().children('h5').html().replace(/(<([^>]+)>)/ig,""));$('#votedChoiceSub').html($('#'+voteChoice).parent().children('h5').html().replace(/(<([^>]+)>)/ig,""));$('#votedChoiceEmail').html($('#'+voteChoice).parent().children('h5').html().replace(/(<([^>]+)>)/ig,""));var donateTxt='Vote to keep '+$('#'+voteChoice).parent().children('h5').html().replace(/(<([^>]+)>)/ig,"")+' dancing on ABC! \n\n http://cdn.abc.go.com/dancing-with-the-stars/vote/begin';if(location.href.indexOf('design-a-dance')>0){donateTxt='Vote for the costume of '+$('#'+voteChoice).parent().children('h5').html().replace(/(<([^>]+)>)/ig,"")+' on Dancing with the Stars on ABC. \n\n http://abc.go.com/dancing-with-the-stars/design-a-dance-vote';}
document.getElementById('donateStatusMsgTextarea').value=donateTxt.replace('amp;','');}
$('#votedChoiceImage').attr('src',$('#answerImage'+voteChoice).attr('src'));$('#votedChoiceImageEmail').attr('src',$('#answerImage'+voteChoice).attr('src'));if(abcdm.abccom.Vote.getVoteCount()==1){abcdm.abccom.SocialLink.donateStatus.init('facebook');}};revealVotes=function(){displayThankyou();if(abcdm.abccom.Utils.userCheck(checkRegType)===true){}else{abcdm.abccom.Register.init(requiredRegType,'f33e8a54d8dbeb2b819eea30e68adb71',{'callback':function(){location.reload(true)}});}
var oVoteData=abcdm.abccom.Vote.getVoteCookie()||{};var myVotes=getMyVotes(oVoteData);jQuery.each(myVotes,function(){$('#votedImageBlock'+this).show();$('#votedBadge'+this).text(parseInt($('#votedBadge'+this).text())+1);});};}(jQuery));$(function(){$('.mosaicHeader').html('<a href="/shows/prep-and-landing/">prep and landing</a>');});