Edit in JSFiddle

require(['jquery'], function (JetCSKJQ) {

	var jq1 = JetCSKJQ; 

	//% Display Database Name using jQuery once the document is ready;
	
	if (window.self == window.top){
		jq1(document).ready(function(){

		   //% Make sure we are only adding the div once;
		   if ( jq1("#cskdbnamecontainer").length === 0 ) {

		      //% Add div to display DB Name;
		      jq1( "#PT_HEADER, #ptbr_header_container").prepend( "<div id='cskdbnamecontainer' align='center'><span id='cskdbname'>Test Environment: %dbname</span><a href='#' id='cskdbnamehide'>Hide</a></div>" );

		      //% Add jQuery to hide the DB Name when the 'Hide' link is clicked;
		      jq1("#cskdbnamehide").click(function(){
		         jq1("#cskdbnamecontainer").hide();
		      });

		   }
	
		});
	}
	
});