]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#246] second conversion of 0.1 semantic demo
authorScottDowne <sdowne@learn.senecac.on.ca>
Sun, 9 Jan 2011 22:04:43 +0000 (17:04 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Sun, 9 Jan 2011 22:04:43 +0000 (17:04 -0500)
demos/semantic_video/index.html
demos/semantic_video/style.css
demos/semantic_video/xml/webMadeMovies.xml
plugins/subtitle/popcorn.subtitle.js

index 80c9484f63a5962ab7633416078cb54f1cfe198c..c6f70e0af396e5acf2d004ec94bee989eb499401 100644 (file)
   <script src="../../plugins/webpage/popcorn.webpage.js"></script>
   <script src="../../plugins/googleMap/popcorn.googleMap.js"></script>
   <script src="../../plugins/footnote/popcorn.footnote.js"></script>
+  <script src="../../plugins/twitter/popcorn.twitter.js"></script>
+  <script src="../../plugins/subtitle/popcorn.subtitle.js"></script>
+  <script src="../../plugins/googleNews/popcorn.googleNews.js"></script>
+  <script src="../../plugins/tagThisPerson/popcorn.tagThisPerson.js"></script>
+  <script src="../../plugins/wikipedia/popcorn.wikipedia.js"></script>
+  <script src="../../plugins/flickr/popcorn.flickr.js"></script>
+
+
 
   <script src="../../parsers/parserXML/popcorn.parseXML.js"></script>
 
index 9f3eea4e90fbd7d358697f8544a108398a6f929a..34133b1b89a35f743962a7c5cde7bb70d2e95f07 100644 (file)
@@ -8,7 +8,7 @@ dl, dt, dd, ol, ul, li,
 fieldset, form, label, legend,
 table, caption, tbody, tfoot, thead, tr, th, td {
        margin: 0;
-       padding: 0;
+       padding: 0;video-div
        border: 0;
        outline: 0;
        font-size: 100%;
@@ -304,7 +304,7 @@ background: url(images/arro.png) no-repeat right -21px;
 }
 
 .video-div{
-position:relative;
+
 border: 2px solid #cc433c;
 margin-bottom: 15px;
 -webkit-box-shadow: -1px 1px 1px #d9d9d9;
@@ -748,4 +748,4 @@ top:-22px;
 width:23px;
 cursor: pointer;
 z-index: 999999;
-}
\ No newline at end of file
+}
index cf6837ac37d8a8ed5c76a5374d6686350d5239a1..55be40fb374b385754cad86e20676cad7b3fd2ec 100644 (file)
     <footnotes>
       <footnote in="00:00:00" out="00:14:00" target="footnotediv">Look around the page as info is updated!</footnote>
     </footnotes>
-    <!--<resources>
+    <resources>
       <footnote in="00:00:00" out="00:15:00" target="footnotediv">This video made exclusively for drumbeat.org </footnote>
-      <videotag target="inthisvideo" in="00:00:05:02" out="00:00:10:07">Steve Song</videotag>
-      <attribution in="00:00:05:02" out="00:00:10:07" target="container5" resourceid="villagetelcoattrib"></attribution>
-      <twitter in="00:00:05:02" out="00:00:10:07" title="Steve Song" source="from:stevesong" target="personaltwitter" width="238" height="120"/>
-      <wiki in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" lang="en" target="wikidiv"/>
+      <tagThisPerson target="inthisvideo" in="00:00:05:02" out="00:00:10:07" person="Steve Song" />
+      <!--<attribution in="00:00:05:02" out="00:00:10:07" target="container5" resourceid="villagetelcoattrib"></attribution>-->
+      <twitter in="00:00:05:02" out="00:00:10:07" title="Steve Song" src="@stevesong" target="personaltwitter" width="238" height="120"/>
+      <wikipedia in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" lang="en" target="wikidiv"/>
       <flickr in="00:00:05:02" out="00:00:10:07" target="personalflickr" userid="78868639@N00" numberofimages="8" padding="4px"/>
-      <googlenews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco"/>
+      <googleNews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco"/>
 
-      <twitter in="00:00:10:07" out="00:00:18:04" title="Oil Spill" source="#oilspill" target="twitter" width="238" height="120"/>
-      <googlenews in="00:00:10:07" out="00:00:18:04" target="googlenewsdiv" topic="Oil Spill"/>
-      <attribution in="00:00:10:07" out="00:00:18:04" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>
+      <twitter in="00:00:10:07" out="00:00:18:04" title="Oil Spill" src="#oilspill" target="twitter" width="238" height="120"/>
+      <googleNews in="00:00:10:07" out="00:00:18:04" target="googlenewsdiv" topic="Oil Spill"/>
+      <!--<attribution in="00:00:10:07" out="00:00:18:04" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>-->
 
-      <videotag target="inthisvideo" in="00:00:18:04" out="00:00:25:02">Keyboard Cat</videotag>
-      <twitter in="00:00:18:04" out="00:00:25:02" title="Keyboard Cat" source="#keyboardcat" target="twitter" width="238" height="120"/>
-      <attribution in="00:00:18:04" out="00:00:25:02" target="container5">KeyBoard Cat, Charlie Schmidt</attribution>
-      <googlenews in="00:00:18:04" out="00:00:25:02" target="googlenewsdiv" topic="Keyboard Cat"/>
+      <tagThisPerson target="inthisvideo" in="00:00:18:04" out="00:00:25:02" person="Keyboard Cat"/>
+      <twitter in="00:00:18:04" out="00:00:25:02" title="Keyboard Cat" src="#keyboardcat" target="twitter" width="238" height="120"/>
+      <!--<attribution in="00:00:18:04" out="00:00:25:02" target="container5">KeyBoard Cat, Charlie Schmidt</attribution>-->
+      <googleNews in="00:00:18:04" out="00:00:25:02" target="googlenewsdiv" topic="Keyboard Cat"/>
 
-      <videotag target="inthisvideo" in="00:00:28:09" out="00:00:29:07">Jeffrey Warren</videotag>
-      <attribution in="00:00:28:09" out="00:00:29:07" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>
-      <videotag target="inthisvideo" in="00:00:29:08" out="00:00:31:00">Village Telco Guy</videotag>
+      <tagThisPerson target="inthisvideo" in="00:00:28:09" out="00:00:29:07" person="Jeffrey Warren" />
+      <!--<attribution in="00:00:28:09" out="00:00:29:07" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>-->
+      <tagThisPerson target="inthisvideo" in="00:00:29:08" out="00:00:31:00" person="Village Telco Guy" />
 
-      <wiki in="00:00:32:00" out="00:00:41:00" resourceid="theinternet" numberOfWords="200" target="wikidiv"/>
-      <googlenews in="00:00:32:00" out="00:00:41:00" target="googlenewsdiv" topic="the internet"/>
+      <wikipedia in="00:00:32:00" out="00:00:41:00" resourceid="theinternet" numberOfWords="200" target="wikidiv"/>
+      <googleNews in="00:00:32:00" out="00:00:41:00" target="googlenewsdiv" topic="the internet"/>
 
-      <videotag target="inthisvideo" in="00:00:41:00" out="00:01:07:09">Jeffrey Warren</videotag>
+      <tagThisPerson target="inthisvideo" in="00:00:41:00" out="00:01:07:09" person="Jeffrey Warren" />
       <flickr in="00:00:41:00" out="00:01:07:09" target="personalflickr" userid="35034346917@N01" numberofimages="8" padding="4px"/>
-      <twitter in="00:00:41:00" out="00:01:07:09" title="Oil Spill" source="#oilspill" target="twitter" width="238" height="120"/>
-      <googlenews in="00:00:41:00" out="00:01:07:09" target="googlenewsdiv" topic="Oil Spill"/>
-      <location resourceid="grandislewiki" in="00:00:41:00" out="00:01:07:09" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>
-      <wiki in="00:00:41:00" out="00:01:07:09" resourceid="oilspill" numberOfWords="200" target="wikidiv"/>
+      <twitter in="00:00:41:00" out="00:01:07:09" title="Oil Spill" src="#oilspill" target="twitter" width="238" height="120"/>
+      <googleNews in="00:00:41:00" out="00:01:07:09" target="googlenewsdiv" topic="Oil Spill"/>
+      <!--<location resourceid="grandislewiki" in="00:00:41:00" out="00:01:07:09" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>-->
+      <wikipedia in="00:00:41:00" out="00:01:07:09" resourceid="oilspill" numberOfWords="200" target="wikidiv"/>
       <footnote in="00:00:41:00" out="00:01:07:09" target="footnotediv">Learn more about Grass Roots mapping at www.grassrootsmapping.org</footnote>
-      <twitter in="00:01:07:10" out="00:01:25:07" title="Steve Song" source="from:stevesong" target="personaltwitter" width="238" height="120"/>
+      <twitter in="00:01:07:10" out="00:01:25:07" title="Steve Song" src="@stevesong" target="personaltwitter" width="238" height="120"/>
       <flickr in="00:01:07:10" out="00:01:25:07" target="personalflickr" userid="78868639@N00" numberofimages="8" padding="4px"/>
-      <location id="CapeTown" resourceid="capetownwiki" in="00:01:07:10" out="00:01:32:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>
-      <wiki in="00:01:07:10" out="00:01:32:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv"/>
-      <videotag target="inthisvideo" in="00:01:25:08" out="00:01:32:07">Michael Adeyeye</videotag>
+      <!--<location id="CapeTown" resourceid="capetownwiki" in="00:01:07:10" out="00:01:32:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>-->
+      <wikipedia in="00:01:07:10" out="00:01:32:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv"/>
+      <tagThisPerson target="inthisvideo" in="00:01:25:08" out="00:01:32:07" person="Michael Adeyeye" />
 
-      <videotag target="inthisvideo" in="00:01:32:08" out="00:01:38:02">Charlie Schmidt</videotag>
-      <twitter in="00:01:32:08" out="00:01:57:11" title="Charlie Schmidt" source="from:chuckieart" target="personaltwitter" width="238" height="120"/>
-      <location id="MITMediaLab" resourceid="mitmedialabhome" in="00:01:32:08" out="00:01:57:11" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>
-      <videotag target="inthisvideo" in="00:01:38:02" out="00:01:41:10">Keyboard Cat</videotag>
-      <videotag target="inthisvideo" in="00:01:41:11" out="00:01:57:11">Charlie Schmidt</videotag>
+      <tagThisPerson target="inthisvideo" in="00:01:32:08" out="00:01:38:02" person="Charlie Schmidt" />
+      <twitter in="00:01:32:08" out="00:01:57:11" title="Charlie Schmidt" src="@chuckieart" target="personaltwitter" width="238" height="120"/>
+      <!--<location id="MITMediaLab" resourceid="mitmedialabhome" in="00:01:32:08" out="00:01:57:11" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>-->
+      <tagThisPerson target="inthisvideo" in="00:01:38:02" out="00:01:41:10" person="Keyboard Cat" />
+      <tagThisPerson target="inthisvideo" in="00:01:41:11" out="00:01:57:11" person="Charlie Schmidt" />
 
-      <videotag target="inthisvideo" in="00:02:09:00" out="00:03:07:05">Jonathan Zittrain</videotag>
-      <twitter in="00:02:09:00" out="00:03:07:05" title="Jonathan Zittrain" source="from:zittrain" target="personaltwitter" width="238" height="120"/>
-      <location resourceid="harvardlawhome" in="00:02:09:00" out="00:03:07:05" lat="42.4222" long="-88.6137" target="container2" zoom="12"/>
-      <wiki in="00:02:09:00" out="00:02:20:00" resourceid="zittrain" numberOfWords="200" target="wikidiv"/>
-      <wiki in="00:02:20:01" out="00:02:23:00" resourceid="compuserve" numberOfWords="200" target="wikidiv"/>
-      <wiki in="00:02:23:01" out="00:02:26:00" resourceid="aol" numberOfWords="200" target="wikidiv"/>
-      <wiki in="00:02:26:01" out="00:02:33:00" resourceid="prodigy" numberOfWords="200" target="wikidiv"/>
+      <tagThisPerson target="inthisvideo" in="00:02:09:00" out="00:03:07:05" person="Jonathan Zittrain" />
+      <twitter in="00:02:09:00" out="00:03:07:05" title="Jonathan Zittrain" source="@zittrain" target="personaltwitter" width="238" height="120"/>
+      <!--<location resourceid="harvardlawhome" in="00:02:09:00" out="00:03:07:05" lat="42.4222" long="-88.6137" target="container2" zoom="12"/>-->
+      <wikipedia in="00:02:09:00" out="00:02:20:00" resourceid="zittrain" numberOfWords="200" target="wikidiv"/>
+      <wikipedia in="00:02:20:01" out="00:02:23:00" resourceid="compuserve" numberOfWords="200" target="wikidiv"/>
+      <wikipedia in="00:02:23:01" out="00:02:26:00" resourceid="aol" numberOfWords="200" target="wikidiv"/>
+      <wikipedia in="00:02:26:01" out="00:02:33:00" resourceid="prodigy" numberOfWords="200" target="wikidiv"/>
 
-      <attribution in="00:02:15:09" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
+      <!--<attribution in="00:02:15:09" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
       <attribution in="00:02:17:01" out="00:02:20:00" target="container5" resourceid="aolattrib"></attribution>
       <attribution in="00:02:20:01" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
       <attribution in="00:02:17:01" out="00:02:26:00" target="container5" resourceid="aolattrib"></attribution>
       <attribution in="00:02:26:01" out="00:02:33:00" target="container5" resourceid="prodigyattrib"></attribution>
       <attribution in="00:02:37:00" out="00:02:47:00" target="container5" resourceid="networksattrib"></attribution>
       <attribution in="00:02:47:01" out="00:02:55:00" target="container5" resourceid="bankattrib"></attribution>
-      <attribution in="00:03:07:10" out="00:03:29:00" target="container5" resourceid="bankattrib"></attribution>
+      <attribution in="00:03:07:10" out="00:03:29:00" target="container5" resourceid="bankattrib"></attribution>-->
 
-      <wiki in="00:02:41:00" out="00:02:57:00" resourceid="internetprotocol" numberOfWords="200" target="wikidiv"/>
-      <wiki in="00:02:57:01" out="00:03:03:00" resourceid="timbernerslee" numberOfWords="200" target="wikidiv"/>
-      <twitter in="00:02:57:01" out="00:03:03:00" title="Tim Berners-Lee" source="from:timberners_lee" target="twitter" width="238" height="120"/>
+      <wikipedia in="00:02:41:00" out="00:02:57:00" resourceid="internetprotocol" numberOfWords="200" target="wikidiv"/>
+      <wikipedia in="00:02:57:01" out="00:03:03:00" resourceid="timbernerslee" numberOfWords="200" target="wikidiv"/>
+      <twitter in="00:02:57:01" out="00:03:03:00" title="Tim Berners-Lee" src="@timberners_lee" target="twitter" width="238" height="120"/>
 
-      <googlenews in="00:02:57:01" out="00:03:03:00" target="googlenewsdiv" topic="Tim Berners-Lee"/>
+      <googleNews in="00:02:57:01" out="00:03:03:00" target="googlenewsdiv" topic="Tim Berners-Lee"/>
 
-      <wiki in="00:03:03:01" out="00:03:28:00" resourceid="worldwideweb" numberOfWords="200" target="wikidiv"/>
-      <googlenews in="00:03:03:01" out="00:03:28:00" target="googlenewsdiv" topic="World Wide Web"/>
+      <wikipedia in="00:03:03:01" out="00:03:28:00" resourceid="worldwideweb" numberOfWords="200" target="wikidiv"/>
+      <googleNews in="00:03:03:01" out="00:03:28:00" target="googlenewsdiv" topic="World Wide Web"/>
 
-      <googlenews in="00:03:28:00" out="00:03:32:00" target="googlenewsdiv" topic="Wikipedia"/>
-      <wiki in="00:03:28:01" out="00:03:32:00" resourceid="wikipedia" numberOfWords="200" target="wikidiv"/>
+      <googleNews in="00:03:28:00" out="00:03:32:00" target="googlenewsdiv" topic="Wikipedia"/>
+      <wikipedia in="00:03:28:01" out="00:03:32:00" resourceid="wikipedia" numberOfWords="200" target="wikidiv"/>
 
-      <wiki in="00:03:36:00" out="00:03:43:00" resourceid="openstandards" numberOfWords="200" target="wikidiv"/>
+      <wikipedia in="00:03:36:00" out="00:03:43:00" resourceid="openstandards" numberOfWords="200" target="wikidiv"/>
 
-      <videotag target="inthisvideo" in="00:03:09:00" out="00:03:16:00">NCSA guy</videotag>
-      <videotag target="inthisvideo" in="00:03:16:01" out="00:03:18:05">Computer Chronicles guy #1</videotag>
-      <videotag target="inthisvideo" in="00:03:16:02" out="00:03:21:00">Computer Chronicles guy #2</videotag>
-      <videotag target="inthisvideo" in="00:03:21:01" out="00:03:28:06">Computer Chronicles guy #3</videotag>
+      <tagThisPerson target="inthisvideo" in="00:03:09:00" out="00:03:16:00" person="NCSA guy" />
+      <tagThisPerson target="inthisvideo" in="00:03:16:01" out="00:03:18:05" person="Computer Chronicles guy #1" />
+      <tagThisPerson target="inthisvideo" in="00:03:16:02" out="00:03:21:00" person="Computer Chronicles guy #2" />
+      <tagThisPerson target="inthisvideo" in="00:03:21:01" out="00:03:28:06" person="Computer Chronicles guy #3" />
 
-      <videotag target="inthisvideo" in="00:03:43:00" out="00:03:56:00">Jonathan Zittrain</videotag>
-      <twitter in="00:03:43:00" out="00:03:56:00" title="Jonathan Zittrain" source="from:zittrain" target="personaltwitter" width="238" height="120"/>
+      <tagThisPerson target="inthisvideo" in="00:03:43:00" out="00:03:56:00" person="Jonathan Zittrain" />
+      <twitter in="00:03:43:00" out="00:03:56:00" title="Jonathan Zittrain" src="@zittrain" target="personaltwitter" width="238" height="120"/>
       <footnote in="00:03:43:00" out="00:03:57:00" target="footnotediv">Read Zittrain's book 'The Future of the Internet — And How to Stop It'</footnote>
 
-      <videotag target="inthisvideo" in="00:03:59:00" out="00:04:03:05">Mona Kasra</videotag>
-      <videotag target="inthisvideo" in="00:04:03:06" out="00:04:07:00">Noah Workman</videotag>
-      <twitter in="00:04:03:06" out="00:04:07:00" title="Noah Workman" source="from:noahworkman" target="personaltwitter" width="238" height="120"/>
-      <videotag target="inthisvideo" in="00:04:03:06" out="00:04:13:01">Wilken Sanches</videotag>
-      <attribution in="00:04:10:00" out="00:04:13:00" target="container5" resourceid="attrib"></attribution>
-      <videotag target="inthisvideo" in="00:04:13:02" out="00:04:19:05">Keechang Kim</videotag>
-      <twitter in="00:04:19:06" out="00:04:24:01" title="Celine Celines" source="from:celinecelines" target="personaltwitter" width="238" height="120"/>
-      <videotag target="inthisvideo" in="00:04:19:06" out="00:04:24:01">Celine Celines</videotag>
+      <tagThisPerson target="inthisvideo" in="00:03:59:00" out="00:04:03:05" person="Mona Kasra" />
+      <tagThisPerson target="inthisvideo" in="00:04:03:06" out="00:04:07:00" person="Noah Workman" />
+      <twitter in="00:04:03:06" out="00:04:07:00" title="Noah Workman" src="@noahworkman" target="personaltwitter" width="238" height="120"/>
+      <tagThisPerson target="inthisvideo" in="00:04:03:06" out="00:04:13:01" person="Wilken Sanches" />
+      <!--<attribution in="00:04:10:00" out="00:04:13:00" target="container5" resourceid="attrib"></attribution>-->
+      <tagThisPerson target="inthisvideo" in="00:04:13:02" out="00:04:19:05" person="Keechang Kim" />
+      <twitter in="00:04:19:06" out="00:04:24:01" title="Celine Celines" src="from:celinecelines" target="personaltwitter" width="238" height="120"/>
+      <tagThisPerson target="inthisvideo" in="00:04:19:06" out="00:04:24:01" person="Celine Celines" />
       <flickr in="00:04:19:06" out="00:04:24:01" target="personalflickr" userid="13072070@N00" numberofimages="8" padding="4px"/>
-      <lastfm in="00:40:00" out="01:24:00" artist="yacht" target="lastfmdiv"/>
+      <!--<lastfm in="00:40:00" out="01:24:00" artist="yacht" target="lastfmdiv"/>-->
          
     </resources>
 
-    <map>
+    <!--<map>
       <googleMap resourceid="capetownwiki" in="00:00:03:00" out="00:00:11:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>
       <googleMap resourceid="grandislewiki" in="00:00:11:07" out="00:00:19:07" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>
       <googleMap resourceid="mitmedialabhome" in="00:00:19:08" out="00:00:27:00" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>
       <googleMap resourceid="saopaulowiki" in="00:04:07:02" out="00:04:13:01" lat="-23.5489" long="-46.6388 " target="container2" zoom="8"/>
       <googleMap resourceid="seoulwiki" in="00:04:13:02" out="00:04:19:05" lat="37.5665" long="126.9780" target="container2" zoom="8"/>
       <googleMap resourceid="montrealwiki" in="00:04:19:06" out="00:04:24:01" lat="45.5089" long="-73.5542 " target="container2" zoom="8"/>
-    </map>
+    </map>-->
 
     <subtitles languagesrc="language" accessibilitysrc="accessibility">
       <subtitles language="en" align="center">
         <subtitle in="00:04:07:01" out="00:04:08:06">producing and sharing music</subtitle>
         <subtitle in="00:04:08:07" out="00:04:10:01">using Creative Commons</subtitle>
       </subtitles>
-    </subtitles>-->
+    </subtitles>
     <webpages>
       <webpage in="00:04:00:08" out="00:04:19:00" target="iframes" resourceid="monahomepage" width="100"/>
       <webpage in="00:04:19:06" out="00:04:24:01" target="iframes" resourceid="celinehomepage" width="100"/>
index 9a07e7bd356facd0b30eb14d152a96e450aff42b..27ad26b188a4cd1009674cb4bc6bc995b7d623e3 100644 (file)
@@ -7,19 +7,43 @@
 
   // just a little tool function
   // calculates the top and left position of an element
-  var offset = function(elem) {
-    if(!elem) elem = this;
+  var offset = function(obj) {
+    var left, top;
+    left = top = 0;
+    if (obj.offsetParent) {
+        do {
+            left += obj.offsetLeft;
+            top  += obj.offsetTop;
+        } while (obj = obj.offsetParent);
+    }
+    return {
+        left : left,
+        top : top
+    };
+  };
 
-    var x = elem.offsetLeft;
-    var y = elem.offsetTop;
+  // translates whatever is in options.container into selected language
+  var translate = function( options, text ) {
 
-    while (elem = elem.offsetParent) {
-      x += elem.offsetLeft;
-      y += elem.offsetTop;
-    }
+    options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
+
+    google.language.translate( text, '', options.selectedLanguage, function( result ) {
+
+      options.container.innerHTML = result.translation;
 
-    return { left: x, top: y };
-  }
+    } );
+  };
+
+
+/*
+      // Find element offset
+      if (element.offsetParent) {
+        do {
+          offsetX += element.offsetLeft;
+          offsetY += element.offsetTop;
+        } while ((element = element.offsetParent));
+      }
+*/
 
   Popcorn.plugin( "subtitle" , {
     
@@ -53,7 +77,7 @@
 
           // the video element must have height and width defined
           this.container.style.width      = this.video.offsetWidth + "px";
-          //this.container.style.top        = offset( this.video ).top + "px";
+          this.container.style.top        = offset( this.video ).top + this.video.offsetHeight - 65 + "px";
           this.container.style.left       = offset( this.video ).left + "px";
 
           this.video.parentNode.appendChild( this.container );
           options.container = this.container;
         }
 
-        options.translatedText = options.text;
-        var selectedLanguage = ( options.language || "" ),
-            // declared as a function, it can be called, but does nothing if not needed
-            toggleSubtitles = function() {},
-            accessibility = document.getElementById( options.accessibilitysrc ),
+        var accessibility = document.getElementById( options.accessibilitysrc ),
             that = this;
 
-        if ( options.languagesrc ) {
-          var languageSrc = document.getElementById( options.languagesrc );
-
-          var updateLanguage = function() {
+        options.showSubtitle = function() {
+          options.container.innerHTML = options.text;
+        };
+        options.toggleSubtitles = function() {};
+        options.that = this;
+        
 
-            selectedLanguage = document.getElementById( options.languagesrc ).options[ languageSrc.selectedIndex ].value;
+        if ( options.languagesrc ) {
+          options.showSubtitle = translate;
+          options.languageSrc = document.getElementById( options.languagesrc );
+          options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
 
-            google.language.translate( options.text, '', selectedLanguage, function( result ) {
+          if ( !this.languageSources ) {
+            this.languageSources = {};
+          }
 
-              options.translatedText = result.translation;
+          
 
-            } );
+          if ( !this.languageSources[ options.languagesrc ] ) {
+            this.languageSources[ options.languagesrc ] = {};
+            
+          }
 
-            google.language.translate( options.container.innerHTML, '', selectedLanguage, function( result ) {
+          if ( !this.languageSources[ options.languagesrc ][ options.target ] ) {
+            this.languageSources[ options.languagesrc ][ options.target ] = true;
 
-              options.container.innerHTML = result.translation;
-              toggleSubtitles(); // update visuals if accessibility is used
+            options.languageSrc.addEventListener( "change", function() {
 
-            } );
 
-            that.container.style.top = offset( that.video ).top + that.video.offsetHeight - ( 40 + that.container.offsetHeight ) + "px";
+              options.toggleSubtitles();
+              options.showSubtitle( options, options.container.innerHTML );
 
-          };
+            }, false );
 
-          languageSrc.addEventListener( "change", updateLanguage, false );
+          }
 
-          // initiate it once to set starting state
-          updateLanguage();
         }
 
         if ( accessibility ) {
-
-          toggleSubtitles = function() {
-
-            if ( accessibility.checked || selectedLanguage !== ( options.language || "") ) {
-              options.container.style.display = "inline";
-            } else if ( selectedLanguage === ( options.language || "") ) {
-              options.container.style.display = "none";
+          options.accessibility = accessibility;
+
+          options.toggleSubtitles = function() {
+            options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
+            if ( options.accessibility.checked || options.selectedLanguage !== ( options.language || "") ) {
+              options.display = "inline";
+              options.container.style.display = options.display;
+            } else if ( options.selectedLanguage === ( options.language || "") ) {
+              options.display = "none";
+              options.container.style.display = options.display;
             }
-            that.container.style.top = offset( that.video ).top + that.video.offsetHeight - ( 40 + that.container.offsetHeight ) + "px";
 
           };
 
-          accessibility.addEventListener( "change", toggleSubtitles, false );
+          options.accessibility.addEventListener( "change", options.toggleSubtitles, false );
 
           // initiate it once to set starting state
-          toggleSubtitles();
+          options.toggleSubtitles();
         }
 
       },
        * options variable
        */
       start: function(event, options){
-        options.container.innerHTML = options.translatedText;
-        this.container.style.top = offset( this.video ).top + this.video.offsetHeight - ( 40 + this.container.offsetHeight ) + "px";
+        options.container.style.display = options.display;
+        options.showSubtitle( options, options.text );
       },
       /**
        * @member subtitle 
        * options variable
        */
       end: function(event, options){
+        options.container.style.display = options.display;
         options.container.innerHTML = "";
       }