index 3937bae..1c742e4 100644
--- a/themes/media-brightcove-video.tpl.php
+++ b/themes/media-brightcove-video.tpl.php
@@ -20,4 +20,4 @@
  *  $options        // Various option overrides passed to the theme.
  */
 ?>
-<div id="<?php print $div_id; ?>" class="<?php print implode(' ', $classes); ?>"><?php print $output; ?></div>
\ No newline at end of file
+<div id="<?php print $div_id; ?>" class="<?php print implode(' ', $classes); ?>"></div><?php print $output; ?>
\ No newline at end of file
diff --git a/themes/media_brightcove.theme.inc b/themes/media_brightcove.theme.inc
index d3b9688..d08cf04 100644
--- a/themes/media_brightcove.theme.inc
+++ b/themes/media_brightcove.theme.inc
@@ -30,6 +30,15 @@ function template_preprocess_media_brightcove_video(&$variables) {
   static $count = 0;
 
   if ($variables['video_id']) {
+    if ($_SERVER['HTTPS'] == 'on') {
+      drupal_set_html_head('<script type="text/javascript" src="https://sadmin.brightcove.com/js/BrightcoveExperiences_all.js"></script>');
+      $variables['secure'] = 'true';
+    }
+    else {
+      drupal_set_html_head('<script type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences_all.js"></script>');
+      $variables['secure'] = 'false';
+    }
+    drupal_set_html_head('<script type="text/javascript">brightcove.createExperiences();</script>');
     $variables['width'] = !empty($variables['width']) ? $variables['width'] : (!empty($variables['options']['width']) ? $variables['options']['width'] : media_brightcove_variable_get('default_width'));
     $variables['height'] = !empty($variables['height']) ? $variables['height'] : (!empty($variables['options']['height']) ? $variables['options']['height'] : media_brightcove_variable_get('default_height'));
 
@@ -49,7 +58,7 @@ function template_preprocess_media_brightcove_video(&$variables) {
 
     $variables['player_id'] = check_plain($player_id);
     $variables['video_id'] = check_plain($variables['video_id']);
-    $variables['object_id'] = 'media-brightcove-video-'. ($count++);
+    $variables['object_id'] = 'myExperience'. $variables['video_id'];
     $variables['div_id'] = 'media-brightcove-'. ($count++);
     $variables['classes'] = array('media-brightcove');
     $variables['availability'] = TRUE;
@@ -83,7 +92,20 @@ function template_preprocess_media_brightcove_video(&$variables) {
         // @TODO: Tie this in.
         $autostart = $variables['options']['autoplay'] ? 'autoStart=true' : 'autoStart=false';
         $variables['output'] = <<<OUTPUT
-<object id="{$variables['object_id']}" width="{$variables['width']}" height="{$variables['height']}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"><param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/{$variables['player_id']}?isVid=1&isUI=1&publisherID={$variables['publisher_id']}" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="videoId={$variables['video_id']}&playerID={$variables['player_id']}&domain=embed&" /><param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" /><param name="allowFullScreen" value="true" /><param name="swLiveConnect" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://c.brightcove.com/services/viewer/federated_f9/{$variables['player_id']}?isVid=1&isUI=1&publisherID={$variables['publisher_id']}" bgcolor="#FFFFFF" flashVars="videoId={$variables['video_id']}&playerID={$variables['player_id']}&domain=embed&" base="http://admin.brightcove.com" name="flashObj" width="{$variables['width']}" height="{$variables['height']}" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>
+          <object id="{$variables['object_id']}" class="BrightcoveExperience">
+          <param name="bgcolor" value="#FFFFFF" />
+          <param name="width" value="{$variables['width']}" />
+          <param name="height" value="{$variables['height']}" />
+          <param name="playerID" value="{$variables['player_id']}" />
+          <param name="isVid" value="true" />
+          <param name="isUI" value="true" />
+          <param name="dynamicStreaming" value="true" />
+          <param name="@videoPlayer" value="{$variables['video_id']}" />
+          <param name="seamlesstabbing" value="false" />
+          <param name="allowFullScreen" value="true" />
+          <param name="swLiveConnect" value="true" />
+          <param name="secureConnections" value="{$variables['secure']}" />
+          </object>
 OUTPUT;
       }
     }
