if ( location.protocol == "http:" )
	location.href = location.href.replace( /^http:/, "https:" ).replace( /:\d+/, '' );