// Global script that handles standard BC features
var $j = jQuery.noConflict();
$j(document).ready(function() {

// Blog Settings
   
	// Gather all comment links and assign click function to toggle corresponding div
  $j(".post-body .links a.commentToggle").click(function () { 
      var thisTarget = $j(this).attr('href');
      $j(thisTarget).slideToggle(); 
      $j(this).blur();
      return false;
    });

  // Do the same for trackback links
  $j(".post-body .links a.trackbackToggle").click(function () { 
      var thisTarget = $j(this).attr('href');
      $j(thisTarget).slideToggle(); 
      $j(this).blur();
      return false;
    });
    
  //Remove the {module_fullname} from comment form 
  //$j(".form input").each(function (i) {
    //if (this.val == '{module_fullname}') {
      //$j(this).val('');
    //}
    //});


	// Show the Invitational Sponsors
	if (/\/_blog\/Next_Level_Invitational/.test(window.location)) {

	// Pull the Invitational Sponsor Data from the blog description
		var invData = $j("#InvData").html();
		var invCountdown = $j("#InvCountdown").html();
		
		$j("#InvData").remove();
		$j("#InvCountdown").remove();
		$j("#InvSponsors").html(invData);
		$j("#InvSponsors").show().parent().prepend("<h4>Event Countdown</h4><div id='invCountdown'>"+invCountdown+"</div><hr/>");
	}

  
}); 

function launchWS(winName) {

//window height and width
myHeight = screen.height*.80;
myWidth = 784;

//widow height bounds
if ( myHeight < 556 ) {
myHeight = 556;
} else if (myHeight>700) {
myHeight = 700;
}

//get screen size, and cacl center screen positioning
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - myWidth / 2;
var toppos = (height / 2 - myHeight / 2) - 40;

//open window
msgWindow=window.open(winName,"ws_window","toolbar=no,location=no,directories=no,resizable=yes,menubar=no,scrollbars=no,status=yes,width=" + myWidth + ",height="+ myHeight + ", left=" + leftpos + ",top=" + toppos);

//focus window
setTimeout('msgWindow.focus()',1);
}