$j('#ka_footerPowered').insertAfter('#builtBy');

//Change value of search field
$j(".ka_searchField").attr("value", "search..."); 
$j(".ka_searchField").attr("onFocus", "this.value='';");

$j('#ka_becomeAMember a:eq(0)').html('Sign In&nbsp;&nbsp;');	
$j('#ka_becomeAMember a:eq(1)').html('Sign Up');	
$j('#ka_becomeAMember a:eq(2)').hide();

$j('#ka_becomeAMember a:eq(1)').before('<b>&nbsp;&nbsp;Not Registered?</b>&nbsp;');
$j('#ka_becomeAMember a:eq(0)').before('<b>Already Registered?</b>&nbsp;');

// Rounded Corners Divs
if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp"){
    $j('#ka_rightColumn')
        .after('<div id="playContainer"></div>');
}

if (Ka.Info.PAGE == "login/userLogin.jsp"){
    $j('#ka_rightColumn')
        .after('<div id="playContainer"></div>');
}

if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp"){
	$j('#ka_rightColumn')
		.appendTo('#playContainer');
}

if (Ka.Info.PAGE == "login/userLogin.jsp"){
	$j('#ka_rightColumn')
		.appendTo('#playContainer');
}

if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp"){
	$j('#ka_leftColumn')
		.appendTo('#playContainer');
}

if (Ka.Info.PAGE == "login/userLogin.jsp"){
	$j('#ka_leftColumn')
		.appendTo('#playContainer');
	$j('#playContainer').before('<div id="loginHeader"></div>');
}
$j('#ka_profileContainer').before('<div id="profileHeader"></div>');

//Bubble Divs
if (Ka.Info.PAGE == "pages/shoutBoxPage.jsp"){
    $j('ul#ka_commentList li div.ka_bubbleComment')
        .before('<div class="bubbleTop"></div>')
        .after('<div class="bubbleBottom"></div>');
}


//Bubble Divs
if (Ka.Info.PAGE == "pages/mediaPlayPage.jsp"){
    $j('ul#ka_commentList li div.ka_bubbleComment')
        .before('<div class="bubbleTop"></div>')
        .after('<div class="bubbleBottom"></div>');
}

$j('#ka_commentList blockquote a span, #ka_commentList blockquote a div').each(function(){
    var newStyle = $j(this).attr('style').replace('24x24','48x48');
    $j(this).attr('style',newStyle);
});

//User Name Video Page:
$j('#ka_commentList .ka_contributorName').each(function(i,e){
$j(this)
    .text($j(this).text() +' says...')
   .appendTo($j(this).parents('div.ka_bubble').find('.bubbleTop'));
});

//Refresh comments
function redskinsSubmitComment() {
 tinyMCE.editors["text"].save();
 var text = $("text").value;
 if (text === "") {
  return;
 }
 DWRUtil.setValue("text", "");
 KickAppsBizComponent.addMessage(text, Ka.Info.MEDIAID, Ka.Info.MEDIATYPE, Ka.Info.USERID, 1024, Ka.Info.AFFILIATESITEID, function (bool) {
  if (bool) {
      location.href=location.href;
               
  } else {
      Ka.popup(Ka.Messages.ajaxError);
          $j('#ka_sendButton').removeAttr('disabled');
  }
 });
}

/*
$j('#ka_sendButton').removeAttr('onclick').click(function(){
    $j(this).val('Sending...').attr('disabled','disabled');
    redskinsSubmitComment();
});
*/

if (Ka.Info.PAGE=="search/searchPage.jsp"){
	$j('#ka_subTopFav').after('<li class="subscribe"><a target="_blank" href="http://www.redskins.com/gen/articles/Redskins_Podcast_11687.jsp">Redskins.com Podcast</a></li>');
	$j('#ka_subMostComment').after('<li class="createProfile"><a href="http://www.redskins.com/do/userRegistration?redskinsRule=true">Create Profile</a></li>');
}


if (Ka.Info.PAGE=="pages/mediaPlayPage.jsp"){
$j('#ka_playPageDetails').before('<div id="playHeader"><h3>Media Details</h3></div>');
$j('#ka_playPageStats').before('<div id="mediaHeader"><h3>Media Actions</h3></div>');
}

if (Ka.Info.USERID !== '') {
		$j('li.createProfile').hide();
	}
	

if  (Ka.Info.PAGE == 'pages/kickPlaceServerSide.jsp'){   $j('#ka_profileActivityFeed').insertAfter('#ka_profileUser');
}       


