   # Load the Anchor Tab stylesheet.
   atStyleSheet =
     $("<link />")
-      .attr("href", "http://" + resourcesDomain + "/stylesheets/tab.css")
       .attr("rel", "stylesheet")
       .attr("type", "text/css")
+
+  if document.location.protocol == "https:"
+    atStyleSheet.attr("href", "//" + secureResourcesDomain + "/stylesheets/tab.css")
+  else
+    atStyleSheet.attr("href", "//" + resourcesDomain + "/stylesheets/tab.css")
 
   $("head").append atStyleSheet
 

  # then we'll have to refactor some of this code, I suppose.
  $ = jQuery # In case we're in compability mode.
  tabId = $("#anchortab-loader").data('tab-id')
  tabJson = "http://" + apiDomain + "/api/v1/embed/" + tabId

  $.ajax
    url: tabJson

  $input.attr('disabled', 'disabled')

  email = $input.val()
  submissionUri = "//" + apiDomain + "/api/v1/embed/" + tabId + "/submit"

  $.ajax
    url: submissionUri
