Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleaned up public dir

  • Loading branch information...
commit a3a01519762481c4598d7124f68616102d486c0e 1 parent b81094a
Phuong Dinh authored
Showing with 0 additions and 22,962 deletions.
  1. +0 −66 public/Transcriptions-f1rc.xml
  2. +0 −66 public/Transcriptions-f2rc.xml
  3. BIN  public/images/rails.png
  4. +0 −1  public/info/me.json
  5. +0 −2  public/javascripts/application.js
  6. +0 −341 public/javascripts/avalon/iuplayer.js
  7. +0 −1  public/javascripts/avalon/jquery.rdfquery.rdfa.min-1.0.js
  8. +0 −146 public/javascripts/avalon/oac_rdf.js
  9. +0 −266 public/javascripts/avalon/oac_rdfjson.js
  10. +0 −129 public/javascripts/avalon/oac_utils.js
  11. +0 −118 public/javascripts/avalon/uuid.js
  12. +0 −491 public/javascripts/blacklight/blacklight.js
  13. +0 −965 public/javascripts/controls.js
  14. +0 −368 public/javascripts/date-picker/booking/index.html
  15. +0 −84 public/javascripts/date-picker/calendarHTML.txt
  16. +0 −511 public/javascripts/date-picker/css/datepicker.css
  17. +0 −229 public/javascripts/date-picker/css/demo.css
  18. +0 −798 public/javascripts/date-picker/index.html
  19. +0 −2,898 public/javascripts/date-picker/js/datepicker.js
  20. +0 −1  public/javascripts/date-picker/js/datepicker.packed.js
  21. +0 −9 public/javascripts/date-picker/js/lang/ar.js
  22. +0 −9 public/javascripts/date-picker/js/lang/cs.js
  23. +0 −10 public/javascripts/date-picker/js/lang/da.js
  24. +0 −10 public/javascripts/date-picker/js/lang/de.js
  25. +0 −9 public/javascripts/date-picker/js/lang/en.js
  26. +0 −13 public/javascripts/date-picker/js/lang/eo.js
  27. +0 −9 public/javascripts/date-picker/js/lang/es.js
  28. +0 −23 public/javascripts/date-picker/js/lang/et.js
  29. +0 −7 public/javascripts/date-picker/js/lang/fi.js
  30. +0 −69 public/javascripts/date-picker/js/lang/fr.js
  31. +0 −9 public/javascripts/date-picker/js/lang/he.js
  32. +0 −9 public/javascripts/date-picker/js/lang/hu.js
  33. +0 −9 public/javascripts/date-picker/js/lang/id.js
  34. +0 −11 public/javascripts/date-picker/js/lang/it.js
  35. +0 −9 public/javascripts/date-picker/js/lang/kr.js
  36. +0 −8 public/javascripts/date-picker/js/lang/lt.js
  37. +0 −9 public/javascripts/date-picker/js/lang/lv.js
  38. +0 −9 public/javascripts/date-picker/js/lang/nl.js
  39. +0 −9 public/javascripts/date-picker/js/lang/no.js
  40. +0 −10 public/javascripts/date-picker/js/lang/pl.js
  41. +0 −11 public/javascripts/date-picker/js/lang/pt-br.js
  42. +0 −9 public/javascripts/date-picker/js/lang/pt.js
  43. +0 −11 public/javascripts/date-picker/js/lang/ru.js
  44. +0 −9 public/javascripts/date-picker/js/lang/se.js
  45. +0 −9 public/javascripts/date-picker/js/lang/si.js
  46. +0 −9 public/javascripts/date-picker/js/lang/tr.js
  47. +0 −240 public/javascripts/date-picker/language/index.html
  48. BIN  public/javascripts/date-picker/media/Thumbs.db
  49. BIN  public/javascripts/date-picker/media/backstripes.gif
  50. BIN  public/javascripts/date-picker/media/bg_header.jpg
  51. BIN  public/javascripts/date-picker/media/bullet1.gif
  52. BIN  public/javascripts/date-picker/media/bullet2.gif
  53. BIN  public/javascripts/date-picker/media/cal-grey.gif
  54. BIN  public/javascripts/date-picker/media/cal.gif
  55. BIN  public/javascripts/date-picker/media/gradient-e5e5e5-ffffff.gif
  56. +0 −974 public/javascripts/dragdrop.js
  57. +0 −1,123 public/javascripts/effects.js
  58. +0 −39 public/javascripts/hydra/mediashelf.datepicker.js
  59. +0 −67 public/javascripts/hydra/mediashelf.placeholder.js
  60. +0 −756 public/javascripts/jquery-ui-1.8.1.custom.min.js
  61. +0 −675 public/javascripts/jquery.form.js
  62. +0 −1,793 public/javascripts/jquery.ui.datepicker.js
  63. +0 −6,001 public/javascripts/prototype.js
  64. +0 −202 public/javascripts/rails.js
  65. +0 −2  public/javascripts/spin.min.js
  66. +0 −4 public/javascripts/swfobject.js
  67. 0  public/stylesheets/.gitkeep
  68. +0 −493 public/stylesheets/blacklight/blacklight.css
  69. +0 −116 public/stylesheets/hydra/html_refactor.css
  70. +0 −18 public/stylesheets/hydra/hydrangea-split-button.css
  71. +0 −292 public/stylesheets/hydra/hydrangea.css
  72. +0 −149 public/stylesheets/hydra/ie-styles.css
  73. +0 −1,702 public/stylesheets/hydra/styles.css
  74. BIN  public/stylesheets/jquery/ui-lightness/images/ui-anim_basic_16x16.gif
  75. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  76. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  77. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
  78. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
  79. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
  80. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
  81. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_558fd0_500x100.png
  82. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  83. BIN  public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  84. BIN  public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png
  85. BIN  public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png
  86. BIN  public/stylesheets/jquery/ui-lightness/images/ui-icons_2e4f81_256x240.png
  87. BIN  public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png
  88. BIN  public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png
  89. +0 −486 public/stylesheets/jquery/ui-lightness/jquery-ui-1.8.1.custom.css
  90. +0 −31 public/stylesheets/yui.css
View
66 public/Transcriptions-f1rc.xml
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rdf:RDF
- xmlns:cnt="http://www.w3.org/2008/content#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:dcterms="http://purl.org/dc/terms/"
- xmlns:dms="http://dms.stanford.edu/ns/"
- xmlns:exif="http://www.w3.org/2003/12/exif/ns#"
- xmlns:foaf="http://xmlns.com/foaf/0.1/"
- xmlns:oac="http://www.openannotation.org/ns/"
- xmlns:ore="http://www.openarchives.org/ore/terms/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
->
-
- <rdf:Description rdf:about="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80f">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/TextAnnotation"/>
- <rdf:type rdf:resource="http://www.openannotation.org/ns/Annotation"/>
- <oac:hasBody rdf:resource="http://vov.indiana.edu/demo1/Line-f1r-15"/>
- <oac:hasTarget rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=73,83,240,135&amp;t=npt:0,5"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=73,83,240,135&amp;t=npt:0,5">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/CanvasSegment"/>
- <dcterms:isPartOf rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Line-f1r-15">
- <rdf:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
- <rdf:type rdf:resource="http://www.w3.org/2008/content#ContentAsText"/>
- <dc:title>Video #1</dc:title>
- <cnt:chars>Cheerios Rocket kit</cnt:chars>
- <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
- </rdf:Description>
-
- <rdf:Description rdf:about="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80z">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/TextAnnotation"/>
- <rdf:type rdf:resource="http://www.openannotation.org/ns/Annotation"/>
- <oac:hasBody rdf:resource="http://vov.indiana.edu/demo1/Line-f1r-16"/>
- <oac:hasTarget rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=23,53,200,145&amp;t=npt:5,25"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=23,53,200,145&amp;t=npt:5,25">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/CanvasSegment"/>
- <dcterms:isPartOf rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Line-f1r-16">
- <rdf:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
- <rdf:type rdf:resource="http://www.w3.org/2008/content#ContentAsText"/>
- <dc:title>Video #2</dc:title>
- <cnt:chars>Felix and his Golden Goose</cnt:chars>
- <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
- </rdf:Description>
-
- <rdf:Description rdf:nodeID="bCfJsWeh175">
- <rdf:first rdf:resource="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80f"/>
- <rdf:rest rdf:nodeID="bCfJsWeh185"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/Canvas"/>
- <dc:title>M804 f1r</dc:title>
- <exif:width rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">480</exif:width>
- <exif:height rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</exif:height>
- </rdf:Description>
-
-</rdf:RDF>
View
66 public/Transcriptions-f2rc.xml
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rdf:RDF
- xmlns:cnt="http://www.w3.org/2008/content#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:dcterms="http://purl.org/dc/terms/"
- xmlns:dms="http://dms.stanford.edu/ns/"
- xmlns:exif="http://www.w3.org/2003/12/exif/ns#"
- xmlns:foaf="http://xmlns.com/foaf/0.1/"
- xmlns:oac="http://www.openannotation.org/ns/"
- xmlns:ore="http://www.openarchives.org/ore/terms/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
->
-
- <rdf:Description rdf:about="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80f">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/TextAnnotation"/>
- <rdf:type rdf:resource="http://www.openannotation.org/ns/Annotation"/>
- <oac:hasBody rdf:resource="http://vov.indiana.edu/demo1/Line-f1r-15"/>
- <oac:hasTarget rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=73,83,240,135&amp;t=npt:13,25"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=73,83,240,135&amp;t=npt:13,25">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/CanvasSegment"/>
- <dcterms:isPartOf rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Line-f1r-15">
- <rdf:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
- <rdf:type rdf:resource="http://www.w3.org/2008/content#ContentAsText"/>
- <dc:title>Scene 1 - Charity</dc:title>
- <cnt:chars>Here we see a bunch of people lined up for Felix. What's that gold stuff he's handing out?</cnt:chars>
- <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
- </rdf:Description>
-
- <rdf:Description rdf:about="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80z">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/TextAnnotation"/>
- <rdf:type rdf:resource="http://www.openannotation.org/ns/Annotation"/>
- <oac:hasBody rdf:resource="http://vov.indiana.edu/demo1/Line-f1r-16"/>
- <oac:hasTarget rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=23,53,200,145&amp;t=npt:26,40"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r#xywh=23,53,200,145&amp;t=npt:26,40">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/CanvasSegment"/>
- <dcterms:isPartOf rdf:resource="http://vov.indiana.edu/demo1/Canvas-f1r"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Line-f1r-16">
- <rdf:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
- <rdf:type rdf:resource="http://www.w3.org/2008/content#ContentAsText"/>
- <dc:title>Scene 2 - The Goose</dc:title>
- <cnt:chars>In the back, the Golden Goose is laying gold eggs continuously. Felix grinds them into gold coins</cnt:chars>
- <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
- </rdf:Description>
-
- <rdf:Description rdf:nodeID="bCfJsWeh175">
- <rdf:first rdf:resource="urn:uuid:c437ff82-4081-4fad-a89c-1a8a3093c80f"/>
- <rdf:rest rdf:nodeID="bCfJsWeh185"/>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://vov.indiana.edu/demo1/Canvas-f1r">
- <rdf:type rdf:resource="http://dms.stanford.edu/ns/Canvas"/>
- <dc:title>M804 f1r</dc:title>
- <exif:width rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">480</exif:width>
- <exif:height rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</exif:height>
- </rdf:Description>
-
-</rdf:RDF>
View
BIN  public/images/rails.png
Deleted file not rendered
View
1  public/info/me.json
@@ -1 +0,0 @@
-{"username":"admin","roles":["ROLE_ADMIN","ROLE_ANONYMOUS","ROLE_OAUTH_USER","ROLE_USER"],"org":{"id":"mh_default_org","anonymousRole":"ROLE_ANONYMOUS","name":"Opencast Project","adminRole":"ROLE_ADMIN","properties":{"engageui.links_media_module.enable":"true","logo_small":"\/engage\/ui\/img\/mh_logos\/OpencastLogo.png","adminui.chunksize":"2024","engageui.link_mobile_redirect.description":"For more information have a look at the official site.","engageui.annotations.enable":"true","adminui.series_prepopulate.enable":"false","adminui.i18n_tab_users.enable":"false","engageui.link_download.enable":"true","engageui.link_mobile_redirect.url":"http:\/\/opencast.org\/matterhorn\/","logo_large":"\/engage\/ui\/img\/mh_logos\/MatterhornLogo_large.png","adminui.i18n_tab_episode.enable":"false","engageui.link_mobile_redirect.enable":"false"}}}
View
2  public/javascripts/application.js
@@ -1,2 +0,0 @@
-// Place your application-specific JavaScript functions and classes here
-// This file is automatically included by javascript_include_tag :defaults
View
341 public/javascripts/avalon/iuplayer.js
@@ -1,341 +0,0 @@
-
-(function($){
-
-
-$.widget("ui.iuplayer", {
- options: {
- library: 'jwplayer', // using jwplayer by default
- width: '480',
- height: '270'
- },
- _init: function(){
- // Inserts progressbar placeholders
- this.element.after('<div id="controls" >'
- + ' <div id="progressBar">'
- + ' <div id="progressElapsed"></div>'
- + ' </div>'
- + ' <div id="notes">'
- + ' </div>'
- + '</div>');
-
- // Initiates using a chosen player library
- if (this.options.library === 'jwplayer') {
- var jwmap = {
- 'id': 'playerID',
- 'width': this.options.width,
- 'height': this.options.height,
- 'dock': 'true',
- 'controlbar.position': 'bottom',
- 'bufferlength': '0',
- 'repeat': 'always',
- modes: [
- {
- type: 'flash',
- src: "http://pawpaw.dlib.indiana.edu:3000/jwplayer/player.swf",
- config: { skin: "http://pawpaw.dlib.indiana.edu:3000/jwplayer/modieus5.zip"}
- }
- ,{type:'html5'}
- ]
- };
-
- // If there is a playlist, loads the playlist options
- if (this.options.playlistfile) {
- jwmap['playlistfile'] = this.options.playlistfile;
- jwmap['playlist.position'] = this.options.playlistposition;
- jwmap['playlist.size'] = 1;
- }
- else {
- jwmap['provider'] = this.options.provider;
- jwmap['streamer'] = this.options.streamer;
- jwmap['file'] = this.options.file;
- }
-
- jwplayer(this.element.attr('id')).setup(jwmap);
- }
-
- var totalW = $("#progressBar").width();
- var barOffsetLeft = $("#progressBar").offset().left;
- var durList = 0;
-
- // Keeps track of which video is being played
- var curVid = 0;
-
- // Keeps track of all videos start/end time
- var vidStart = [];
- var vidEnd = [];
-
- // Tricks jwplayer into preloading
- jwplayer().play();
- jwplayer().pause();
-
- $('#progressBar').click(function(e){
-
- var dur = getDuration();
- if (dur == 0) {
- jwplayer().play();
- }
- var x = e.pageX - barOffsetLeft;
- var elapsed = getTimeFromOffset(x);
- playVidIndexFromElapsed(elapsed);
- })
-
- function getDuration() {
- return durList == 0 ? jwplayer().getDuration() : durList;
- }
-
- // Returns elapsed time of the mashup based on elapsed time of current video
- function getPlaylistElapsed(vidPosition) {
- var pos = 0;
- for (var i = 0; i < curVid; i++) {
- pos += vidEnd[i] - vidStart[i];
- }
-
- return pos + vidPosition - vidStart[curVid];
- }
-
- // Plays index of current vid in a playlist, based on elapsed time
- function playVidIndexFromElapsed(time) {
- var temp = 0;
- for (var i = 0; i < vidStart.length; i++) {
- var prevTemp = temp;
- temp += vidEnd[i] - vidStart[i];
- if (temp > time) {
- if (curVid != i) {
- curVid = i;
- jwplayer().playlistItem(curVid);
- }
- jwplayer().seek(time - prevTemp + vidStart[i]);
- return;
- }
- }
- }
-
- function getPlaylistDuration() {
- var list = jwplayer().getPlaylist();
- if (list == null) {
- return 0;
- }
-
- var dur = 0;
- for (var i in list) {
- dur += list[i].duration - list[i].start;
- vidStart[i] = list[i].start;
- vidEnd[i] = list[i].duration;
- }
-
- return dur;
- }
-
- // Gets position on progressbar from elapsed time, factoring in playlist
- function getOffsetFromTime(time) {
- var dur = getDuration();
- return totalW * time / dur;
- }
-
- // Gets elapsed time from position on progressbar, with playlist in mind
- function getTimeFromOffset(offset) {
- var dur = getDuration();
- return dur * offset / totalW;
- }
-
-
- /*******************************************
- **** Annotations processing & populating ***
- ********************************************/
-
- var annosGlob = null;
- var metaReady = false;
- var annoStart = []; // start time of each anno
- var annoEnd = []; // end time of each anno
-
- // The marker positioning can only be calculated once duration metadata gets here
- jwplayer().onMeta(function(data){
- if (durList == 0) {
- durList = getPlaylistDuration();
- }
- if (!metaReady && getDuration() > 0) {
- metaReady = true;
- checkMetaAndAnnoComplete();
- }
- })
-
- // Stores annotations in a global object and waits for metadata to arrive
- function storeAnnos(annos) {
- annoGlob = annos;
- checkMetaAndAnnoComplete();
- }
-
- // Calculates annotations marker & box positioning, populates into player
- function processAnnos(annos) {
-
- // Gets annotation of current playing video.
- // An annotation file might contain annos for different videos in a playlist or a mashup
- var curAnnos = annos["http://vov.indiana.edu/demo1/Canvas-f1r"];
-
- // Iterates through annos collection
- for (var i in curAnnos) {
- var anno = curAnnos[i];
-
- // Creates a marker
- var annoMarker = $('<div class="marker lv' + i + '"></div>');
-
- // Positions it on the progress bar
- // Here Im assuming timecode is the 2nd param in media fragment. TODO: make it flexible
- annoStart.push(anno.targets[0].fragments[1].fragmentInfo[0]);
- annoEnd.push(anno.targets[0].fragments[1].fragmentInfo[1]);
- annoMarker.css('left', getOffsetFromTime(annoStart[i]) + 'px');
- $('#progressElapsed').before(annoMarker);
-
- // Creates an actual annotation to be put under the progress bar
- var annoNote = $('<div class="note lv' + i + '"><span class="title">' + anno.body.title + '</span><span class="expand">[+]</span></div>');
-
- if (i == curAnnos.length - 1) {
- var css = annoNote.css('border');
- annoNote.css('border-bottom', '2px solid');
- }
- $('#notes').append(annoNote);
-
- // Creates a bubble overlaid on to the video
- var annoBox = anno.targets[0].fragments[0].fragmentInfo;
- var map = {
- 'left': annoBox[0] + 'px',
- 'top': annoBox[1] + 'px',
- 'width': annoBox[2] + 'px',
- 'height': annoBox[3] + 'px',
- }
- var bubble = $('<div class="bubble lv' + i + '">' + anno.body.value + '<span class="bottomRight"></span></div>').css(map);
-
- $('object').before(bubble);
- }
- }
-
- function checkMetaAndAnnoComplete() {
- if (metaReady && annoGlob) {
- processAnnos(annoGlob);
- }
- }
-
- fetch_annotations(this.options.annotationfile, storeAnnos);
-
-
- /*******************************************
- ******** Progress bar manipulation *********
- ********************************************/
-
- // Keeps track of the last time we processed
- var prevT = 0;
- jwplayer().onTime(function(data){
- var totalT = getDuration();
- var curT = getPlaylistElapsed(data.position);
- var curW = totalW * curT / totalT;
- $("#progressElapsed").width(curW);
-
- // Checks every second to see if we need to display any bubble
- if ( Math.floor(curT) - prevT > 0 || curT < prevT ) {
-
- // Remembers the time so we can check if we've already run this job in this second
- prevT = Math.floor(curT);
- for (var i in annoStart) {
- var curBubble = $('.bubble.lv' + i);
- if (curT >= annoStart[i] && curT < annoEnd[i]) {
- // Displays time left for this bubble
- curBubble.find('.bottomRight').html(annoEnd[i] - prevT);
-
- // Shows bubble if not already
- if (curBubble.css('display') === 'none') {
- curBubble.show();
- }
- }
- else if ((curT < annoStart[i] || curT >= annoEnd[i]) && curBubble.css('display') != 'none') {
- curBubble.hide();
- }
- }
- }
- })
-
-
- // Moves on to the next video in the playlist when current one is done
- jwplayer().onPlaylistItem(function(data){
- curVid = data.index;
- })
-
- $('.expand').live('click', function(){
- var change = 30;
-
- // Gets parent of clicked item
- var parent = $(this).parent();
-
- // Increases parent height
- parent.height(parent.height() + change);
-
- // Finds current level of parent
- var classList = parent.attr('class').split(/\s+/);
- $.each( classList, function(index, item){
- if (item.indexOf('lv') == 0) {
- var i = parseInt(item.substr(2));
-
- // Lengthens markers at lower levels
- for (var j = i + 1; j < 100; j++) {
- var nextMarker = $('.marker.lv' + j);
- if (!nextMarker[0]) {
- break;
- }
- nextMarker.height(nextMarker.height() + change);
- }
- }
- });
-
- $(this).attr('class', 'collapse').html('[-]');
- })
-
- $('.collapse').live('click', function(){
- var change = 30;
-
- // Gets parent of clicked item
- var parent = $(this).parent();
-
- // Increases parent height
- parent.height(parent.height() - change);
-
- // Finds current level of parent
- var classList = parent.attr('class').split(/\s+/);
- $.each( classList, function(index, item){
- if (item.indexOf('lv') == 0) {
- var i = parseInt(item.substr(2));
-
- // Lengthens markers at lower levels
- for (var j = i + 1; j < 100; j++) {
- var nextMarker = $('.marker.lv' + j);
- if (!nextMarker[0]) {
- break;
- }
- nextMarker.height(nextMarker.height() - change);
- }
- }
- });
-
- $(this).attr('class', 'expand').html('[+]');
- })
-
- $('.title').live('click', function(){
- var change = 30;
-
- // Gets parent of clicked item
- var parent = $(this).parent();
-
- // Finds current level of parent
- var classList = parent.attr('class').split(/\s+/);
- $.each( classList, function(index, item){
- if (item.indexOf('lv') == 0) {
- var i = parseInt(item.substr(2));
-
- jwplayer().seek(annoStart[i]);
- }
- });
- })
-
- },
- _create: function() {}
-});
-
-})(jQuery);
View
1  public/javascripts/avalon/jquery.rdfquery.rdfa.min-1.0.js
@@ -1 +0,0 @@
-(function(c){var d={},a=/^(([a-z][\-a-z0-9+\.]*):)?(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i,g,b=function(j){var h=j.match(a);if(h===null){throw"Malformed URI: "+j}return{scheme:h[1]?h[2].toLowerCase():undefined,authority:h[3]?h[4]:undefined,path:h[5]||"",query:h[6]?h[7]:undefined,fragment:h[8]?h[9]:undefined}},f=function(j){var k="",h=[];if(/\./.test(j)){while(j!==undefined&&j!==""){if(j==="."||j===".."){j=""}else{if(/^\.\.\//.test(j)){j=j.substring(3)}else{if(/^\.\//.test(j)){j=j.substring(2)}else{if(/^\/\.(\/|$)/.test(j)){j="/"+j.substring(3)}else{if(/^\/\.\.(\/|$)/.test(j)){j="/"+j.substring(4);k=k.replace(/\/?[^\/]+$/,"")}else{h=j.match(/^(\/?[^\/]*)(\/.*)?$/);j=h[2];k=k+h[1]}}}}}}return k}else{return j}},e=function(h,j){if(h.authority!==""&&(h.path===undefined||h.path==="")){return"/"+j}else{return h.path.replace(/[^\/]+$/,"")+j}};c.uri=function(k,j){var h;k=k||"";if(d[k]){return d[k]}j=j||c.uri.base();if(typeof j==="string"){j=c.uri.absolute(j)}h=new c.uri.fn.init(k,j);if(d[h]){return d[h]}else{d[h]=h;return h}};c.uri.fn=c.uri.prototype={scheme:undefined,authority:undefined,path:undefined,query:undefined,fragment:undefined,init:function(k,j){var h={};j=j||{};c.extend(this,b(k));if(this.scheme===undefined){this.scheme=j.scheme;if(this.authority!==undefined){this.path=f(this.path)}else{this.authority=j.authority;if(this.path===""){this.path=j.path;if(this.query===undefined){this.query=j.query}}else{if(!/^\//.test(this.path)){this.path=e(j,this.path)}this.path=f(this.path)}}}if(this.scheme===undefined){throw"Malformed URI: URI is not an absolute URI and no base supplied: "+k}return this},resolve:function(h){return c.uri(h,this)},relative:function(p){var n,o,m=0,k,l=[],h="";if(typeof p==="string"){p=c.uri(p,{})}if(p.scheme!==this.scheme||p.authority!==this.authority){return p.toString()}if(p.path!==this.path){n=p.path.split("/");o=this.path.split("/");if(n[1]!==o[1]){h=p.path}else{while(n[m]===o[m]){m+=1}k=m;for(;m<o.length-1;m+=1){l.push("..")}for(;k<n.length;k+=1){l.push(n[k])}h=l.join("/")}h=p.query===undefined?h:h+"?"+p.query;h=p.fragment===undefined?h:h+"#"+p.fragment;return h}if(p.query!==undefined&&p.query!==this.query){return"?"+p.query+(p.fragment===undefined?"":"#"+p.fragment)}if(p.fragment!==undefined&&p.fragment!==this.fragment){return"#"+p.fragment}return""},toString:function(){var h="";if(this._string){return this._string}else{h=this.scheme===undefined?h:(h+this.scheme+":");h=this.authority===undefined?h:(h+"//"+this.authority);h=h+this.path;h=this.query===undefined?h:(h+"?"+this.query);h=this.fragment===undefined?h:(h+"#"+this.fragment);this._string=h;return h}}};c.uri.fn.init.prototype=c.uri.fn;c.uri.absolute=function(h){return c.uri(h,{})};c.uri.resolve=function(j,h){return c.uri(j,h)};c.uri.relative=function(j,h){return c.uri(h,{}).relative(j)};c.uri.base=function(){return c(document).base()};c.fn.base=function(){var h=c(this).parents().andSelf().find("base").attr("href"),j=c(this)[0].ownerDocument||document,k=c.uri.absolute(j.location===null?document.location.href:j.location.href);return h===undefined?k:c.uri(h,k)}})(jQuery);(function(b){var a=/\sxmlns(?::([^ =]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;b.fn.xmlns=function(h,d,j){var f=this.eq(0),m=f.data("xmlns"),k=f[0],n,c,g,l=h?"xmlns:"+h:"xmlns",o,r,q=false;if(d===undefined){if(h===undefined){if(m===undefined){m={};if(k.attributes&&k.attributes.getNamedItemNS){for(g=0;g<k.attributes.length;g+=1){n=k.attributes[g];if(/^xmlns(:(.+))?$/.test(n.nodeName)){h=/^xmlns(:(.+))?$/.exec(n.nodeName)[2]||"";o=n.nodeValue;if(h===""||o!==""){m[h]=b.uri(n.nodeValue);q=true}}}}else{r=/<[^>]+>/.exec(k.outerHTML);n=a.exec(r);while(n!==null){h=n[1]||"";o=n[2]||n[3];if(h===""||o!==""){m[h]=b.uri(n[2]||n[3]);q=true}n=a.exec(r)}a.lastIndex=0}j=j||(k.parentNode.nodeType===1?f.parent().xmlns():{});m=q?b.extend({},j,m):j;f.data("xmlns",m)}return m}else{if(typeof h==="object"){for(c in h){if(typeof h[c]==="string"){this.xmlns(c,h[c])}}this.find("*").andSelf().removeData("xmlns");return this}else{if(m===undefined){m=f.xmlns()}return m[h]}}}else{this.find("*").andSelf().removeData("xmlns");return this.attr(l,d)}};b.fn.removeXmlns=function(e){var c,f,d;if(typeof e==="object"){if(e.length===undefined){for(f in e){if(typeof e[f]==="string"){this.removeXmlns(f)}}}else{for(d=0;d<e.length;d+=1){this.removeXmlns(e[d])}}}else{c=e?"xmlns:"+e:"xmlns";this.removeAttr(c)}this.find("*").andSelf().removeData("xmlns");return this};b.fn.qname=function(d){var c,f,e;if(d===undefined){if(this[0].outerHTML===undefined){d=this[0].nodeName.toLowerCase()}else{d=/<([^ >]+)/.exec(this[0].outerHTML)[1].toLowerCase()}}if(d==="?xml:namespace"){throw"XMLinHTML: Unable to get the prefix to resolve the name of this element"}c=/^(([^:]+):)?([^:]+)$/.exec(d);f=c[2]||"";e=this.xmlns(f);if(e===undefined&&f!==""){throw"MalformedQName: The prefix "+f+" is not declared"}return{namespace:e,localPart:c[3],prefix:f,name:d}}})(jQuery);(function(b){var a=function(c){return c.replace(/[ \t\n\r]+/," ").replace(/^ +/,"").replace(/ +$/,"")};b.typedValue=function(d,c){return b.typedValue.fn.init(d,c)};b.typedValue.fn=b.typedValue.prototype={representation:undefined,value:undefined,datatype:undefined,init:function(e,c){var f;if(b.typedValue.valid(e,c)){f=b.typedValue.types[c];this.representation=e;this.datatype=c;this.value=f.value(f.strip?a(e):e);return this}else{throw {name:"InvalidValue",message:e+" is not a valid "+c+" value"}}}};b.typedValue.fn.init.prototype=b.typedValue.fn;b.typedValue.types={};b.typedValue.types["http://www.w3.org/2001/XMLSchema#string"]={regex:/^.*$/,strip:false,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#boolean"]={regex:/^(?:true|false|1|0)$/,strip:true,value:function(c){return c==="true"||c==="1"}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#decimal"]={regex:/^[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)$/,strip:true,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#integer"]={regex:/^[\-\+]?[0-9]+$/,strip:true,value:function(c){return parseInt(c,10)}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#int"]={regex:/^[\-\+]?[0-9]+$/,strip:true,value:function(c){return parseInt(c,10)}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#float"]={regex:/^(?:[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)(?:[eE][\-\+]?[0-9]+)?|[\-\+]?INF|NaN)$/,strip:true,value:function(c){if(c==="-INF"){return -1/0}else{if(c==="INF"||c==="+INF"){return 1/0}else{return parseFloat(c)}}}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#double"]={regex:b.typedValue.types["http://www.w3.org/2001/XMLSchema#float"].regex,strip:true,value:b.typedValue.types["http://www.w3.org/2001/XMLSchema#float"].value};b.typedValue.types["http://www.w3.org/2001/XMLSchema#duration"]={regex:/^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+))?S)?)$/,validate:function(d){var c=this.regex.exec(d);return c[2]||c[3]||c[4]||c[5]||c[6]||c[7]},strip:true,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#dateTime"]={regex:/^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):(([0-9]{2})(\.([0-9]+))?)((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,validate:function(d){var c=this.regex.exec(d),g=parseInt(c[1],10),j=c[10]===undefined||c[10]==="Z"?"+0000":c[10].replace(/:/,""),f;if(g===0||parseInt(j,10)<-1400||parseInt(j,10)>1400){return false}try{g=g<100?Math.abs(g)+1000:g;month=parseInt(c[2],10);day=parseInt(c[3],10);if(day>31){return false}else{if(day>30&&!(month===1||month===3||month===5||month===7||month===8||month===10||month===12)){return false}else{if(month===2){if(day>29){return false}else{if(day===29&&(g%4!==0||(g%100===0&&g%400!==0))){return false}}}}}f=""+g+"/"+c[2]+"/"+c[3]+" "+c[4]+":"+c[5]+":"+c[7]+" "+j;f=new Date(f);return true}catch(h){return false}},strip:true,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#date"]={regex:/^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,validate:function(e){var c=this.regex.exec(e),f=parseInt(c[1],10),g=parseInt(c[2],10),d=parseInt(c[3],10),h=c[10]===undefined||c[10]==="Z"?"+0000":c[10].replace(/:/,"");if(f===0||g>12||d>31||parseInt(h,10)<-1400||parseInt(h,10)>1400){return false}else{return true}},strip:true,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#gMonthDay"]={regex:/^--([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,validate:function(e){var c=this.regex.exec(e),f=parseInt(c[1],10),d=parseInt(c[2],10),g=c[3]===undefined||c[3]==="Z"?"+0000":c[3].replace(/:/,"");if(f>12||d>31||parseInt(g,10)<-1400||parseInt(g,10)>1400){return false}else{if(f===2&&d>29){return false}else{if((f===4||f===6||f===9||f===11)&&d>30){return false}else{return true}}}},strip:true,value:function(c){return c}};b.typedValue.types["http://www.w3.org/2001/XMLSchema#anyURI"]={regex:/^.*$/,strip:true,value:function(c,d){var e=b.extend({},b.typedValue.defaults,d);return b.uri.resolve(c,e.base)}};b.typedValue.defaults={base:b.uri.base(),namespaces:{}};b.typedValue.valid=function(e,c){var f=b.typedValue.types[c];if(f===undefined){throw"InvalidDatatype: The datatype "+c+" can't be recognised"}else{e=f.strip?a(e):e;if(f.regex.test(e)){return f.validate===undefined?true:f.validate(e)}else{return false}}}})(jQuery);(function(a){a.curie=function(f,c){var g=a.extend({},a.curie.defaults,c||{}),b=/^(([^:]*):)?(.+)$/.exec(f),h=b[2],d=b[3],e=g.namespaces[h];if(/^:.+/.test(f)){if(g.reservedNamespace===undefined||g.reservedNamespace===null){throw"Malformed CURIE: No prefix and no default namespace for unprefixed CURIE "+f}else{e=g.reservedNamespace}}else{if(h){if(e===undefined){throw"Malformed CURIE: No namespace binding for "+h+" in CURIE "+f}}else{if(g.charcase==="lower"){f=f.toLowerCase()}else{if(g.charcase==="upper"){f=f.toUpperCase()}}if(g.reserved.length&&a.inArray(f,g.reserved)>=0){e=g.reservedNamespace;d=f}else{if(g.defaultNamespace===undefined||g.defaultNamespace===null){throw"Malformed CURIE: No prefix and no default namespace for unprefixed CURIE "+f}else{e=g.defaultNamespace}}}}return a.uri(e+d)};a.curie.defaults={namespaces:{},reserved:[],reservedNamespace:undefined,defaultNamespace:undefined,charcase:"preserve"};a.safeCurie=function(d,c){var b=/^\[([^\]]+)\]$/.exec(d);return b?a.curie(b[1],c):a.uri(d)};a.createCurie=function(f,b){var e=a.extend({},a.curie.defaults,b||{}),d=e.namespaces,c;f=a.uri(f).toString();if(e.reservedNamespace!==undefined&&f.substring(0,e.reservedNamespace.toString().length)===e.reservedNamespace.toString()){c=f.substring(e.reservedNamespace.toString().length);if(a.inArray(c,e.reserved)===-1){c=":"+c}}else{a.each(d,function(h,g){if(f.substring(0,g.toString().length)===g.toString()){c=h+":"+f.substring(g.toString().length);return null}})}if(c===undefined){throw"No Namespace Binding: There's no appropriate namespace binding for generating a CURIE from "+f}else{return c}};a.fn.curie=function(c,b){var d=a.extend({},a.fn.curie.defaults,{namespaces:this.xmlns()},b||{});return a.curie(c,d)};a.fn.safeCurie=function(d,b){var c=a.extend({},a.fn.curie.defaults,{namespaces:this.xmlns()},b||{});return a.safeCurie(d,c)};a.fn.createCurie=function(d,b){var c=a.extend({},a.fn.curie.defaults,{namespaces:this.xmlns()},b||{});return a.createCurie(d,c)};a.fn.curie.defaults={reserved:["alternate","appendix","bookmark","cite","chapter","contents","copyright","first","glossary","help","icon","index","last","license","meta","next","p3pv1","prev","role","section","stylesheet","subsection","start","top","up"],reservedNamespace:"http://www.w3.org/1999/xhtml/vocab#",defaultNamespace:undefined,charcase:"lower"}})(jQuery);(function(F){var f={},c={},t={},C={},r={},j="http://www.w3.org/2001/XMLSchema#",w="http://www.w3.org/1999/02/22-rdf-syntax-ns#",v="http://www.w3.org/2000/01/rdf-schema#",z=/^<(([^>]|\\>)*)>$/,T=/^("""((\\"|[^"])*)"""|"((\\"|[^"])*)")(@([a-z]+(-[a-z0-9]+)*)|\^\^(.+))?$/,g=/(("""((\\"|[^"])*)""")|("(\\"|[^"]|)*")|(<(\\>|[^>])*>)|\S)+/g,x=databankSeed=new Date().getTime()%1000,k=function(){x+=1;return"b"+x.toString(16)},K=function(){databankSeed+=1;return"data"+databankSeed.toString(16)},l=function(X,Y){if(typeof X==="string"){try{return F.rdf.resource(X,Y)}catch(aa){try{return F.rdf.blank(X,Y)}catch(Z){throw"Bad Triple: Subject "+X+" is not a resource: "+Z}}}else{return X}},R=function(Y,X){if(Y==="a"){return F.rdf.type}else{if(typeof Y==="string"){try{return F.rdf.resource(Y,X)}catch(Z){throw"Bad Triple: Property "+Y+" is not a resource: "+Z}}else{return Y}}},N=function(X,Z){if(typeof X==="string"){try{return F.rdf.resource(X,Z)}catch(ab){try{return F.rdf.blank(X,Z)}catch(aa){try{return F.rdf.literal(X,Z)}catch(Y){throw"Bad Triple: Object "+X+" is not a resource or a literal "+Y}}}}else{return X}},a=function(aa,Y,Z){var X;if(typeof Y==="string"){X=Y.substring(1);if(Z[X]&&Z[X]!==aa){return null}else{Z[X]=aa;return Z}}else{if(Y===aa){return Z}else{return null}}},U=function(Y,X){return F.map(Y,function(Z){var aa=X.exec(Z);return aa===null?null:{bindings:aa,triples:[Z]}})},q=function(X,Z,Y){return F.map(X,function(ac,aa){var ab=F.map(Z,function(ad){var ae=true;F.each(ad.bindings,function(ag,af){if(!(ac.bindings[ag]===undefined||ac.bindings[ag]===af)){ae=false;return false}});return ae?ad:null});if(ab.length>0){return F.map(ab,function(ad){return{bindings:F.extend({},ac.bindings,ad.bindings),triples:F.unique(ac.triples.concat(ad.triples))}})}else{return Y?ac:null}})},V=function(X,Z){var Y,aa,ab;if(Z.filterExp!==undefined&&!F.isFunction(Z.filterExp)){if(X.union===undefined){Y=typeof Z.filterExp.subject==="string"?"":Z.filterExp.subject;aa=typeof Z.filterExp.property==="string"?"":Z.filterExp.property;ab=typeof Z.filterExp.object==="string"?"":Z.filterExp.object;if(X.queries[Y]===undefined){X.queries[Y]={}}if(X.queries[Y][aa]===undefined){X.queries[Y][aa]={}}if(X.queries[Y][aa][ab]===undefined){X.queries[Y][aa][ab]=[]}X.queries[Y][aa][ab].push(Z)}else{F.each(X.union,function(ad,ac){V(ac,Z)})}}},A=function(X){X.length=0;X.matches=[];F.each(X.children,function(Y,Z){A(Z)});F.each(X.partOf,function(Y,Z){A(Z)})},H=function(Y,X){if(X.length>0){F.each(Y.children,function(Z,aa){J(aa,X)});F.each(Y.partOf,function(Z,aa){H(aa,X)});F.each(X,function(aa,Z){Y.matches.push(Z);Array.prototype.push.call(Y,Z.bindings)})}},J=function(Z,Y){var X;if(Z.union===undefined){if(Z.top||Z.parent.top){X=Z.alphaMemory}else{Y=Y||Z.parent.matches;if(F.isFunction(Z.filterExp)){X=F.map(Y,function(aa,ab){return Z.filterExp.call(aa.bindings,ab,aa.bindings,aa.triples)?aa:null})}else{X=q(Y,Z.alphaMemory,Z.filterExp.optional)}}}else{X=F.map(Z.union,function(aa){return aa.matches})}H(Z,X)},p=function(Z,Y){var X;if(Z.filterExp.optional){A(Z);J(Z)}else{if(Z.top||Z.parent.top){X=[Y]}else{X=q(Z.parent.matches,[Y],false)}H(Z,X)}},P=function(Y,Z){var X,aa=Y.filterExp.exec(Z);if(aa!==null){X={triples:[Z],bindings:aa};Y.alphaMemory.push(X);p(Y,X)}},d=function(X,Y){X.alphaMemory.splice(F.inArray(Y,X.alphaMemory),1);A(X);J(X)},B=function(X,Y){F.each(X,function(Z,aa){P(aa,Y)})},m=function(X,Y){F.each(X,function(Z,aa){d(aa,Y)})},e=function(X,ab){var Y=ab.subject,Z=ab.property,aa=ab.object;if(X.union===undefined){if(X.queries[Y]!==undefined){if(X.queries[Y][Z]!==undefined){if(X.queries[Y][Z][aa]!==undefined){B(X.queries[Y][Z][aa],ab)}if(X.queries[Y][Z][""]!==undefined){B(X.queries[Y][Z][""],ab)}}if(X.queries[Y][""]!==undefined){if(X.queries[Y][""][aa]!==undefined){B(X.queries[Y][""][aa],ab)}if(X.queries[Y][""][""]!==undefined){B(X.queries[Y][""][""],ab)}}}if(X.queries[""]!==undefined){if(X.queries[""][Z]!==undefined){if(X.queries[""][Z][aa]!==undefined){B(X.queries[""][Z][aa],ab)}if(X.queries[""][Z][""]!==undefined){B(X.queries[""][Z][""],ab)}}if(X.queries[""][""]!==undefined){if(X.queries[""][""][aa]!==undefined){B(X.queries[""][""][aa],ab)}if(X.queries[""][""][""]!==undefined){B(X.queries[""][""][""],ab)}}}}else{F.each(X.union,function(ad,ac){e(ac,ab)})}},s=function(X,ab){var Y=ab.subject,Z=ab.property,aa=ab.object;if(X.union===undefined){if(X.queries[Y]!==undefined){if(X.queries[Y][Z]!==undefined){if(X.queries[Y][Z][aa]!==undefined){m(X.queries[Y][Z][aa],ab)}if(X.queries[Y][Z][""]!==undefined){m(X.queries[Y][Z][""],ab)}}if(X.queries[Y][""]!==undefined){if(X.queries[Y][""][aa]!==undefined){m(X.queries[Y][""][aa],ab)}if(X.queries[Y][""][""]!==undefined){m(X.queries[Y][""][""],ab)}}}if(X.queries[""]!==undefined){if(X.queries[""][Z]!==undefined){if(X.queries[""][Z][aa]!==undefined){m(X.queries[""][Z][aa],ab)}if(X.queries[""][Z][""]!==undefined){m(X.queries[""][Z][""],ab)}}if(X.queries[""][""]!==undefined){if(X.queries[""][""][aa]!==undefined){m(X.queries[""][""][aa],ab)}if(X.queries[""][""][""]!==undefined){m(X.queries[""][""][""],ab)}}}}else{F.each(X.union,function(ad,ac){s(ac,ab)})}},n=function(ac){var ab={},Y,X,Z,aa;for(Y=0;Y<ac.length;Y+=1){X=ac[Y];Z=X.subject.value.toString();aa=X.property.value.toString();if(ab[Z]===undefined){ab[Z]={}}if(ab[Z][aa]===undefined){ab[Z][aa]=[]}ab[Z][aa].push(X.object.dump())}return ab},W=function(ab){var ag,ad,Y,ae,Z,aa,ac,X,af=[];for(ag in ab){ad=(ag.substring(0,2)==="_:")?F.rdf.blank(ag):F.rdf.resource("<"+ag+">");for(Y in ab[ag]){ae=F.rdf.resource("<"+Y+">");for(ac=0;ac<ab[ag][Y].length;ac+=1){Z=ab[ag][Y][ac];if(Z.type==="uri"){aa=F.rdf.resource("<"+Z.value+">")}else{if(Z.type==="bnode"){aa=F.rdf.blank(Z.value)}else{if(Z.datatype!==undefined){aa=F.rdf.literal(Z.value,{datatype:Z.datatype})}else{X={};if(Z.lang!==undefined){X.lang=Z.lang}aa=F.rdf.literal('"'+Z.value+'"',X)}}}af.push(F.rdf.triple(ad,ae,aa))}}}return af},E=function(aa,Z,Y,ab){var ac=aa.ownerDocument,X;if(Z!==undefined&&Z!==null){if(ac.createAttributeNS){X=ac.createAttributeNS(Z,Y);X.nodeValue=ab;aa.attributes.setNamedItemNS(X)}else{X=ac.createNode(2,Y,Z);X.nodeValue=ab;aa.attributes.setNamedItem(X)}}else{X=ac.createAttribute(Y);X.nodeValue=ab;aa.attributes.setNamedItem(X)}return aa},y=function(Y,X,Z){if(Z){E(Y,"http://www.w3.org/2000/xmlns/","xmlns:"+Z,X)}else{E(Y,undefined,"xmlns",X)}return Y},D=function(Z,X){var ab,ac="",aa,Y=false;if(Z!==undefined&&Z!==null){if(/:/.test(X)){aa=/([^:]+):/.exec(X)[1]}Y=true}if(document.implementation&&document.implementation.createDocument){ab=document.implementation.createDocument(Z,X,null);if(Y){y(ab.documentElement,Z,aa)}return ab}else{ab=new ActiveXObject("Microsoft.XMLDOM");ab.async="false";if(aa===undefined){ac=' xmlns="'+Z+'"'}else{ac=" xmlns:"+aa+'="'+Z+'"'}ab.loadXML("<"+X+ac+"/>");return ab}},h=function(Z,Y,X){var ab=Z.ownerDocument,aa;if(Y!==undefined&&Y!==null){aa=ab.createElementNS?ab.createElementNS(Y,X):ab.createNode(1,X,Y)}else{aa=ab.createElement(X)}Z.appendChild(aa);return aa},M=function(Y,aa){var Z=Y.ownerDocument,X;X=Z.createTextNode(aa);Y.appendChild(X);return Y},u=function(Z,X){var ad,ab,Y,ac;try{ab=new ActiveXObject("Microsoft.XMLDOM");ab.async="false";ab.loadXML("<temp>"+X+"</temp>")}catch(aa){ad=new DOMParser();ab=ad.parseFromString("<temp>"+X+"</temp>","text/xml")}for(Y=0;Y<ab.documentElement.childNodes.length;Y+=1){Z.appendChild(ab.documentElement.childNodes[Y].cloneNode(true))}return Z},L=function(ak,am){var ai=D(w,"rdf:RDF"),ad=n(ak),Y=am.namespaces||{},Z,al,ae,X,af,ab,aj,aa,ah,ag,ac;for(Z in Y){y(ai.documentElement,Y[Z],Z)}for(al in ad){if(ad[al][F.rdf.type.value]!==undefined){aa=/(.+[#\/])([^#\/]+)/.exec(ad[al][F.rdf.type.value][0].value);ag=aa[1];ah=aa[2];for(Z in Y){if(Y[Z]===ag){ac=Z;break}}ae=h(ai.documentElement,ag,ac+":"+ah)}else{ae=h(ai.documentElement,w,"rdf:Description")}if(/^_:/.test(al)){E(ae,w,"rdf:nodeID",al.substring(2))}else{E(ae,w,"rdf:about",al)}for(X in ad[al]){if(X!==F.rdf.type.value.toString()||ad[al][X].length>1){aa=/(.+[#\/])([^#\/]+)/.exec(X);ag=aa[1];ah=aa[2];for(Z in Y){if(Y[Z]===ag){ac=Z;break}}for(ab=(X===F.rdf.type.value.toString()?1:0);ab<ad[al][X].length;ab+=1){aj=ad[al][X][ab];af=h(ae,ag,ac+":"+ah);if(aj.type==="uri"){E(af,w,"rdf:resource",aj.value)}else{if(aj.type==="literal"){if(aj.datatype!==undefined){if(aj.datatype==="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"){E(af,w,"rdf:parseType","Literal");u(af,aj.value)}else{E(af,w,"rdf:datatype",aj.datatype);M(af,aj.value)}}else{if(aj.lang!==undefined){E(af,"http://www.w3.org/XML/1998/namespace","xml:lang",aj.lang);M(af,aj.value)}else{M(af,aj.value)}}}else{E(af,w,"rdf:nodeID",aj.value.substring(2))}}}}}}return ai},S=function(X){switch(X){case"http://www.w3.org/1999/02/22-rdf-syntax-ns":return"rdf";case"http://www.w3.org/XML/1998/namespace":return"xml";case"http://www.w3.org/2000/xmlns/":return"xmlns";default:throw ("No default prefix mapped for namespace "+X)}},b=function(Z,Y,X){var ab;if(Z.hasAttributeNS){return Z.hasAttributeNS(Y,X)}else{try{ab=/:/.test(X)?/:(.+)$/.exec(X)[1]:X;return Z.attributes.getQualifiedItem(ab,Y)!==null}catch(aa){return Z.getAttribute(S(Y)+":"+X)!==null}}},G=function(Z,Y,X){var ab;if(Z.getAttributeNS){return Z.getAttributeNS(Y,X)}else{try{ab=/:/.test(X)?/:(.+)$/.exec(X)[1]:X;return Z.attributes.getQualifiedItem(ab,Y).nodeValue}catch(aa){return Z.getAttribute(S(Y)+":"+X)}}},I=function(X){return X.localName||X.baseName},o=function(Z,aa){var Y,X;if(b(Z,w,"about")){Y=G(Z,w,"about");X=F.rdf.resource("<"+Y+">",{base:aa})}else{if(b(Z,w,"ID")){Y=G(Z,w,"ID");X=F.rdf.resource("<#"+Y+">",{base:aa})}else{if(b(Z,w,"nodeID")){Y=G(Z,w,"nodeID");X=F.rdf.blank("_:"+Y)}else{X=F.rdf.blank("[]")}}}return X},O=function(ap,Z,aa,au){var ac,af,ad,ag,aq,ak,au,aj,ai,ae=1,at,ar,am,X=[],ab,ao,al={},Y,ah=[];au=G(ap,"http://www.w3.org/XML/1998/namespace","lang")||au;aa=G(ap,"http://www.w3.org/XML/1998/namespace","base")||aa;if(au!==null&&au!==undefined&&au!==""){al={lang:au}}ac=o(ap,aa);if(Z&&(ap.namespaceURI!==w||I(ap)!=="Description")){ad=F.rdf.type;aq=F.rdf.resource("<"+ap.namespaceURI+I(ap)+">");ah.push(F.rdf.triple(ac,ad,aq))}for(aj=0;aj<ap.attributes.length;aj+=1){af=ap.attributes.item(aj);if(af.namespaceURI!==undefined&&af.namespaceURI!=="http://www.w3.org/2000/xmlns/"&&af.namespaceURI!=="http://www.w3.org/XML/1998/namespace"&&af.prefix!=="xmlns"&&af.prefix!=="xml"){if(af.namespaceURI!==w){ad=F.rdf.resource("<"+af.namespaceURI+I(af)+">");aq=F.rdf.literal('"'+af.nodeValue+'"',al);ah.push(F.rdf.triple(ac,ad,aq))}else{if(I(af)==="type"){ad=F.rdf.type;aq=F.rdf.resource("<"+af.nodeValue+">",{base:aa});ah.push(F.rdf.triple(ac,ad,aq))}}}}for(aj=0;aj<ap.childNodes.length;aj+=1){af=ap.childNodes[aj];if(af.nodeType===1){if(af.namespaceURI===w&&I(af)==="li"){ad=F.rdf.resource("<"+w+"_"+ae+">");ae+=1}else{ad=F.rdf.resource("<"+af.namespaceURI+I(af)+">")}au=G(af,"http://www.w3.org/XML/1998/namespace","lang")||au;if(au!==null&&au!==undefined&&au!==""){al={lang:au}}if(b(af,w,"resource")){ag=G(af,w,"resource");aq=F.rdf.resource("<"+ag+">",{base:aa})}else{if(b(af,w,"nodeID")){ag=G(af,w,"nodeID");aq=F.rdf.blank("_:"+ag)}else{if(b(af,w,"parseType")){ab=G(af,w,"parseType");if(ab==="Literal"){try{ao=new XMLSerializer();ag=ao.serializeToString(af.getElementsByTagName("*")[0])}catch(an){ag="";for(ai=0;ai<af.childNodes.length;ai+=1){ag+=af.childNodes[ai].xml}}aq=F.rdf.literal(ag,{datatype:w+"XMLLiteral"})}else{if(ab==="Resource"){Y=O(af,false,aa,au);if(Y.length>0){aq=Y[Y.length-1].subject;ah=ah.concat(Y)}else{aq=F.rdf.blank("[]")}}else{if(ab==="Collection"){if(af.getElementsByTagName("*").length>0){for(ai=0;ai<af.childNodes.length;ai+=1){ag=af.childNodes[ai];if(ag.nodeType===1){X.push(ag)}}at=F.rdf.blank("[]");aq=at;for(ai=0;ai<X.length;ai+=1){ag=X[ai];Y=O(ag,true,aa,au);if(Y.length>0){am=Y[Y.length-1].subject;ah=ah.concat(Y)}else{am=o(ag)}ah.push(F.rdf.triple(at,F.rdf.first,am));if(ai===X.length-1){ah.push(F.rdf.triple(at,F.rdf.rest,F.rdf.nil))}else{ar=F.rdf.blank("[]");ah.push(F.rdf.triple(at,F.rdf.rest,ar));at=ar}}}else{aq=F.rdf.nil}}}}}else{if(b(af,w,"datatype")){ag=af.childNodes[0].nodeValue;aq=F.rdf.literal(ag,{datatype:G(af,w,"datatype")})}else{if(af.getElementsByTagName("*").length>0){for(ai=0;ai<af.childNodes.length;ai+=1){ag=af.childNodes[ai];if(ag.nodeType===1){Y=O(ag,true,aa,au);if(Y.length>0){aq=Y[Y.length-1].subject;ah=ah.concat(Y)}else{aq=o(ag)}}}}else{if(af.childNodes.length>0){ag=af.childNodes[0].nodeValue;aq=F.rdf.literal('"'+ag+'"',al)}else{Y=O(af,false,aa,au);if(Y.length>0){aq=Y[Y.length-1].subject;ah=ah.concat(Y)}else{aq=F.rdf.blank("[]")}}}}}}}ah.push(F.rdf.triple(ac,ad,aq));if(b(af,w,"ID")){ak=F.rdf.resource("<#"+G(af,w,"ID")+">",{base:aa});ah.push(F.rdf.triple(ak,F.rdf.subject,ac));ah.push(F.rdf.triple(ak,F.rdf.property,ad));ah.push(F.rdf.triple(ak,F.rdf.object,aq))}}}return ah},Q=function(Y){var X,aa,Z,ab=[];if(Y.documentElement.namespaceURI===w&&I(Y.documentElement)==="RDF"){aa=G(Y.documentElement,"http://www.w3.org/XML/1998/namespace","lang");base=G(Y.documentElement,"http://www.w3.org/XML/1998/namespace","base")||F.uri.base();for(X=0;X<Y.documentElement.childNodes.length;X+=1){Z=Y.documentElement.childNodes[X];if(Z.nodeType===1){ab=ab.concat(O(Z,true,base,aa))}}}else{ab=O(Y.documentElement,true)}return ab};F.typedValue.types["http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"]={regex:/^.*$/m,strip:false,value:function(X){return X}};F.rdf=function(X){return new F.rdf.fn.init(X)};F.rdf.fn=F.rdf.prototype={rdfquery:"0.9",init:function(X){var Y;X=X||{};this.parent=X.parent;this.union=X.union;this.top=this.parent===undefined&&this.union===undefined;if(this.union===undefined){if(X.databank===undefined){this.databank=this.parent===undefined?F.rdf.databank(X.triples,X):this.parent.databank}else{this.databank=X.databank}}else{Y=F.map(this.union,function(Z){return Z.databank});Y=F.unique(Y);if(Y[1]!==undefined){this.databank=F.rdf.databank(undefined,{union:Y})}else{this.databank=Y[0]}}this.children=[];this.partOf=[];this.filterExp=X.filter;this.alphaMemory=[];this.matches=[];this.length=0;if(this.filterExp!==undefined){if(!F.isFunction(this.filterExp)){V(this.databank,this);this.alphaMemory=U(this.databank.triples(),this.filterExp)}}J(this);return this},base:function(X){if(X===undefined){return this.databank.base()}else{this.databank.base(X);return this}},prefix:function(Y,X){if(X===undefined){return this.databank.prefix(Y)}else{this.databank.prefix(Y,X);return this}},add:function(aa,Y){var Z,X;if(aa.rdfquery!==undefined){if(aa.top){X=this.databank.add(aa.databank);Z=F.rdf({parent:this.parent,databank:X});return Z}else{if(this.top){X=aa.databank.add(this.databank);Z=F.rdf({parent:aa.parent,databank:X});return Z}else{if(this.union===undefined){Z=F.rdf({union:[this,aa]});this.partOf.push(Z);aa.partOf.push(Z);return Z}else{this.union.push(aa);aa.partOf.push(this)}}}}else{if(typeof aa==="string"){Y=F.extend({},{base:this.base(),namespaces:this.prefix(),source:aa},Y);aa=F.rdf.pattern(aa,Y)}if(aa.isFixed()){this.databank.add(aa.triple(),Y)}else{Z=this;this.each(function(ac,ad){var ab=aa.triple(ad);if(ab!==null){Z.databank.add(ab,Y)}})}}return this},remove:function(Y,X){if(typeof Y==="string"){X=F.extend({},{base:this.base(),namespaces:this.prefix()},X);Y=F.rdf.pattern(Y,X)}if(Y.isFixed()){this.databank.remove(Y.triple(),X)}else{query=this;this.each(function(aa,ab){var Z=Y.triple(ab);if(Z!==null){query.databank.remove(Z,X)}})}return this},load:function(Y,X){this.databank.load(Y,X);return this},except:function(X){return F.rdf({databank:this.databank.except(X.databank)})},where:function(Z,Y){var ac,ab,aa,X;Y=Y||{};if(typeof Z==="string"){ab=Y.base||this.base();aa=F.extend({},this.prefix(),Y.namespaces||{});X=Y.optional||false;Z=F.rdf.pattern(Z,{namespaces:aa,base:ab,optional:X})}ac=F.rdf(F.extend({},Y,{parent:this,filter:Z}));this.children.push(ac);return ac},optional:function(Y,X){return this.where(Y,F.extend({},X||{},{optional:true}))},about:function(Y,X){return this.where(Y+" ?property ?value",X)},filter:function(Z,aa){var X,Y;if(typeof Z==="string"){if(aa.constructor===RegExp){X=function(){return aa.test(this[Z].value)}}else{X=function(){return this[Z].type==="literal"?this[Z].value===aa:this[Z]===aa}}}else{X=Z}Y=F.rdf({parent:this,filter:X});this.children.push(Y);return Y},select:function(aa){var Z=[],Y,X;for(Y=0;Y<this.length;Y+=1){if(aa===undefined){Z[Y]=this[Y]}else{Z[Y]={};for(X=0;X<aa.length;X+=1){Z[Y][aa[X]]=this[Y][aa[X]]}}}return Z},describe:function(ab){var Y,X,aa,Z=[];for(Y=0;Y<ab.length;Y+=1){aa=ab[Y];if(aa.substring(0,1)==="?"){aa=aa.substring(1);for(X=0;X<this.length;X+=1){Z.push(this[X][aa])}}else{Z.push(aa)}}return this.databank.describe(Z)},eq:function(X){return this.filter(function(Y){return Y===X})},reset:function(){var X=this;while(X.parent!==undefined){X=X.parent}return X},end:function(){return this.parent},size:function(){return this.length},sources:function(){return F(F.map(this.matches,function(X){return[X.triples]}))},dump:function(X){var Y=F.map(this.matches,function(Z){return Z.triples});X=F.extend({namespaces:this.databank.namespaces,base:this.databank.base},X||{});return F.rdf.dump(Y,X)},get:function(X){return(X===undefined)?F.makeArray(this):this[X]},each:function(X){F.each(this.matches,function(Z,Y){X.call(Y.bindings,Z,Y.bindings,Y.triples)});return this},map:function(X){return F(F.map(this.matches,function(Y,Z){return X.call(Y.bindings,Z,Y.bindings,Y.triples)}))},jquery:function(){return F(this)}};F.rdf.fn.init.prototype=F.rdf.fn;F.rdf.gleaners=[];F.rdf.dump=function(ac,X){var Z=F.extend({},F.rdf.dump.defaults,X||{}),ab=Z.format,Y=Z.serialize,aa;if(ab==="application/json"){aa=n(ac,Z);return Y?F.toJSON(aa):aa}else{if(ab==="application/rdf+xml"){aa=L(ac,Z);if(Y){if(aa.xml){return aa.xml.replace(/\s+$/,"")}else{serializer=new XMLSerializer();return serializer.serializeToString(aa)}}else{return aa}}else{throw"Unrecognised dump format: "+ab+". Expected application/json or application/rdf+xml."}}};F.rdf.dump.defaults={format:"application/json",serialize:false,namespaces:{}};F.fn.rdf=function(){var X=[];if(F(this)[0]&&F(this)[0].nodeType===9){return F(this).children("*").rdf()}else{if(F(this).length>0){X=F(this).map(function(Y,Z){return F.map(F.rdf.gleaners,function(aa){return aa.call(F(Z))})});return F.rdf({triples:X,namespaces:F(this).xmlns()})}else{return F.rdf()}}};F.extend(F.expr[":"],{about:function(Y,aa,X){var Z=F(Y),ac=X[3]?Z.safeCurie(X[3]):null,ab=false;F.each(F.rdf.gleaners,function(ad,ae){ab=ae.call(Z,{about:ac});if(ab){return null}});return ab},type:function(Y,aa,X){var Z=F(Y),ab=X[3]?Z.curie(X[3]):null,ac=false;F.each(F.rdf.gleaners,function(ad,ae){if(ae.call(Z,{type:ab})){ac=true;return null}});return ac}});F.rdf.databank=function(Y,X){return new F.rdf.databank.fn.init(Y,X)};F.rdf.databank.fn=F.rdf.databank.prototype={init:function(Z,X){var Y;Z=Z||[];X=X||{};this.id=K();if(X.union===undefined){this.queries={};this.tripleStore={};this.objectStore={};this.baseURI=X.base||F.uri.base();this.namespaces=F.extend({},X.namespaces||{});for(Y=0;Y<Z.length;Y+=1){this.add(Z[Y])}}else{this.union=X.union}return this},base:function(X){if(this.union===undefined){if(X===undefined){return this.baseURI}else{this.baseURI=X;return this}}else{if(X===undefined){return this.union[0].base()}else{F.each(this.union,function(Z,Y){Y.base(X)});return this}}},prefix:function(Z,X){var Y={};if(this.union===undefined){if(Z===undefined){return this.namespaces}else{if(X===undefined){return this.namespaces[Z]}else{this.namespaces[Z]=X;return this}}}else{if(X===undefined){F.each(this.union,function(ab,aa){F.extend(Y,aa.prefix())});if(Z===undefined){return Y}else{return Y[Z]}}else{F.each(this.union,function(ab,aa){aa.prefix(Z,X)});return this}}},add:function(ab,Y){var aa=(Y&&Y.base)||this.base(),Z=F.extend({},this.prefix(),(Y&&Y.namespaces)||{}),X;if(ab===this){return this}else{if(ab.tripleStore!==undefined){if(this.union===undefined){X=F.rdf.databank(undefined,{union:[this,ab]});return X}else{this.union.push(ab);return this}}else{if(typeof ab==="string"){ab=F.rdf.triple(ab,{namespaces:Z,base:aa,source:ab})}if(this.union===undefined){if(this.tripleStore[ab.subject]===undefined){this.tripleStore[ab.subject]=[]}if(F.inArray(ab,this.tripleStore[ab.subject])===-1){this.tripleStore[ab.subject].push(ab);if(ab.object.type==="uri"||ab.object.type==="bnode"){if(this.objectStore[ab.object]===undefined){this.objectStore[ab.object]=[]}this.objectStore[ab.object].push(ab)}e(this,ab)}}else{F.each(this.union,function(ad,ac){ac.add(ab)})}return this}}},remove:function(ac,Z){var ab=(Z&&Z.base)||this.base(),aa=F.extend({},this.prefix(),(Z&&Z.namespaces)||{}),ad,X,Y;if(typeof ac==="string"){ac=F.rdf.triple(ac,{namespaces:aa,base:ab,source:ac})}ad=this.tripleStore[ac.subject];if(ad!==undefined){ad.splice(F.inArray(ac,ad),1)}if(ac.object.type==="uri"||ac.object.type==="bnode"){X=this.objectStore[ac.object];if(X!==undefined){X.splice(F.inArray(ac,X),1)}}s(this,ac);return this},except:function(Y){var X=Y.tripleStore,Z=[];F.each(this.tripleStore,function(ab,ac){var aa=X[ab];if(aa===undefined){Z=Z.concat(ac)}else{F.each(ac,function(ae,ad){if(F.inArray(ad,aa)===-1){Z.push(ad)}})}});return F.rdf.databank(Z)},triples:function(){var X=[];if(this.union===undefined){F.each(this.tripleStore,function(Z,Y){X=X.concat(Y)})}else{F.each(this.union,function(Z,Y){X=X.concat(Y.triples().get())});X=F.unique(X)}return F(X)},size:function(){return this.triples().length},describe:function(aa){var Y,Z,X,ac={},ab=[];while(aa.length>0){Z=aa.pop();if(ac[Z]===undefined){if(Z.value===undefined){Z=F.rdf.resource(Z)}if(this.tripleStore[Z]!==undefined){for(Y=0;Y<this.tripleStore[Z].length;Y+=1){X=this.tripleStore[Z][Y];ab.push(X);if(X.object.type==="bnode"){aa.push(X.object)}}}if(this.objectStore[Z]!==undefined){for(Y=0;Y<this.objectStore[Z].length;Y+=1){X=this.objectStore[Z][Y];ab.push(X);if(X.subject.type==="bnode"){aa.push(X.subject)}}}ac[Z]=true}}return F.unique(ab)},dump:function(X){X=F.extend({namespaces:this.namespaces,base:this.base},X||{});return F.rdf.dump(this.triples(),X)},load:function(Y){var X,Z;if(Y.ownerDocument!==undefined){Z=Q(Y)}else{Z=W(Y)}for(X=0;X<Z.length;X+=1){this.add(Z[X])}return this},toString:function(){return"[Databank with "+this.size()+" triples]"}};F.rdf.databank.fn.init.prototype=F.rdf.databank.fn;F.rdf.pattern=function(ab,ad,aa,Z){var ac,X,Y;if(aa===undefined){Z=ad||{};X=F.trim(ab).match(g);if(X.length===3||(X.length===4&&X[3]===".")){ab=X[0];ad=X[1];aa=X[2]}else{throw"Bad Pattern: Couldn't parse string "+ab}Y=(Z.optional===undefined)?F.rdf.pattern.defaults.optional:Z.optional}if(r[ab]&&r[ab][ad]&&r[ab][ad][aa]&&r[ab][ad][aa][Y]){return r[ab][ad][aa][Y]}ac=new F.rdf.pattern.fn.init(ab,ad,aa,Z);if(r[ac.subject]&&r[ac.subject][ac.property]&&r[ac.subject][ac.property][ac.object]&&r[ac.subject][ac.property][ac.object][ac.optional]){return r[ac.subject][ac.property][ac.object][ac.optional]}else{if(r[ac.subject]===undefined){r[ac.subject]={}}if(r[ac.subject][ac.property]===undefined){r[ac.subject][ac.property]={}}if(r[ac.subject][ac.property][ac.object]===undefined){r[ac.subject][ac.property][ac.object]={}}r[ac.subject][ac.property][ac.object][ac.optional]=ac;return ac}};F.rdf.pattern.fn=F.rdf.pattern.prototype={init:function(Y,aa,ab,X){var Z=F.extend({},F.rdf.pattern.defaults,X);this.subject=Y.toString().substring(0,1)==="?"?Y:l(Y,Z);this.property=aa.toString().substring(0,1)==="?"?aa:R(aa,Z);this.object=ab.toString().substring(0,1)==="?"?ab:N(ab,Z);this.optional=Z.optional;return this},fill:function(aa){var X=this.subject,Y=this.property,Z=this.object;if(typeof X==="string"&&aa[X.substring(1)]){X=aa[X.substring(1)]}if(typeof Y==="string"&&aa[Y.substring(1)]){Y=aa[Y.substring(1)]}if(typeof Z==="string"&&aa[Z.substring(1)]){Z=aa[Z.substring(1)]}return F.rdf.pattern(X,Y,Z,{optional:this.optional})},exec:function(Y){var X={};X=a(Y.subject,this.subject,X);if(X===null){return null}X=a(Y.property,this.property,X);if(X===null){return null}X=a(Y.object,this.object,X);return X},isFixed:function(){return typeof this.subject!=="string"&&typeof this.property!=="string"&&typeof this.object!=="string"},triple:function(Y){var X=this;if(!this.isFixed()){X=this.fill(Y)}if(X.isFixed()){return F.rdf.triple(X.subject,X.property,X.object,{source:this.toString()})}else{return null}},toString:function(){return this.subject+" "+this.property+" "+this.object}};F.rdf.pattern.fn.init.prototype=F.rdf.pattern.fn;F.rdf.pattern.defaults={base:F.uri.base(),namespaces:{},optional:false};F.rdf.triple=function(aa,ac,Z,Y){var ad,ab,X;if(Z===undefined){Y=ac;X=F.trim(aa).match(g);if(X.length===3||(X.length===4&&X[3]===".")){aa=X[0];ac=X[1];Z=X[2]}else{throw"Bad Triple: Couldn't parse string "+aa}}ab=(Y&&Y.graph)||"";if(C[ab]&&C[ab][aa]&&C[ab][aa][ac]&&C[ab][aa][ac][Z]){return C[ab][aa][ac][Z]}ad=new F.rdf.triple.fn.init(aa,ac,Z,Y);ab=ad.graph||"";if(C[ab]&&C[ab][ad.subject]&&C[ab][ad.subject][ad.property]&&C[ab][ad.subject][ad.property][ad.object]){return C[ab][ad.subject][ad.property][ad.object]}else{if(C[ab]===undefined){C[ab]={}}if(C[ab][ad.subject]===undefined){C[ab][ad.subject]={}}if(C[ab][ad.subject][ad.property]===undefined){C[ab][ad.subject][ad.property]={}}C[ab][ad.subject][ad.property][ad.object]=ad;return ad}};F.rdf.triple.fn=F.rdf.triple.prototype={init:function(Y,aa,ab,X){var Z;Z=F.extend({},F.rdf.triple.defaults,X);this.subject=l(Y,Z);this.property=R(aa,Z);this.object=N(ab,Z);this.graph=Z.graph===undefined?undefined:l(Z.graph,Z);this.source=Z.source;return this},isFixed:function(){return true},triple:function(X){return this},dump:function(){var Z={},X=this.subject.value.toString(),Y=this.property.value.toString();Z[X]={};Z[X][Y]=this.object.dump();return Z},toString:function(){return this.subject+" "+this.property+" "+this.object+" ."}};F.rdf.triple.fn.init.prototype=F.rdf.triple.fn;F.rdf.triple.defaults={base:F.uri.base(),source:[document],namespaces:{}};F.rdf.resource=function(Z,X){var Y;if(f[Z]){return f[Z]}Y=new F.rdf.resource.fn.init(Z,X);if(f[Y]){return f[Y]}else{f[Y]=Y;return Y}};F.rdf.resource.fn=F.rdf.resource.prototype={type:"uri",value:undefined,init:function(ac,Y){var X,ab,aa,Z;if(typeof ac==="string"){X=z.exec(ac);Z=F.extend({},F.rdf.resource.defaults,Y);if(X!==null){this.value=F.uri.resolve(X[1].replace(/\\>/g,">"),Z.base)}else{if(ac.substring(0,1)===":"){aa=Z.namespaces[""];if(aa===undefined){throw"Malformed Resource: No namespace binding for default namespace in "+ac}else{this.value=F.uri.resolve(aa+ac.substring(1))}}else{if(ac.substring(ac.length-1)===":"){ab=ac.substring(0,ac.length-1);aa=Z.namespaces[ab];if(aa===undefined){throw"Malformed Resource: No namespace binding for prefix "+ab+" in "+ac}else{this.value=F.uri.resolve(aa)}}else{try{this.value=F.curie(ac,{namespaces:Z.namespaces})}catch(ad){throw"Malformed Resource: Bad format for resource "+ad}}}}}else{this.value=ac}return this},dump:function(){return{type:"uri",value:this.value.toString()}},toString:function(){return"<"+this.value+">"}};F.rdf.resource.fn.init.prototype=F.rdf.resource.fn;F.rdf.resource.defaults={base:F.uri.base(),namespaces:{}};F.rdf.type=F.rdf.resource("<"+w+"type>");F.rdf.label=F.rdf.resource("<"+v+"label>");F.rdf.first=F.rdf.resource("<"+w+"first>");F.rdf.rest=F.rdf.resource("<"+w+"rest>");F.rdf.nil=F.rdf.resource("<"+w+"nil>");F.rdf.subject=F.rdf.resource("<"+w+"subject>");F.rdf.property=F.rdf.resource("<"+w+"property>");F.rdf.object=F.rdf.resource("<"+w+"object>");F.rdf.blank=function(X){var Y;if(c[X]){return c[X]}Y=new F.rdf.blank.fn.init(X);if(c[Y]){return c[Y]}else{c[Y]=Y;return Y}};F.rdf.blank.fn=F.rdf.blank.prototype={type:"bnode",value:undefined,id:undefined,init:function(X){if(X==="[]"){this.id=k();this.value="_:"+this.id}else{if(X.substring(0,2)==="_:"){this.id=X.substring(2);this.value=X}else{throw"Malformed Blank Node: "+X+" is not a legal format for a blank node"}}return this},dump:function(){return{type:"bnode",value:this.value}},toString:function(){return this.value}};F.rdf.blank.fn.init.prototype=F.rdf.blank.fn;F.rdf.literal=function(Z,X){var Y;if(t[Z]){return t[Z]}Y=new F.rdf.literal.fn.init(Z,X);if(t[Y]){return t[Y]}else{t[Y]=Y;return Y}};F.rdf.literal.fn=F.rdf.literal.prototype={type:"literal",value:undefined,lang:undefined,datatype:undefined,init:function(ab,Y){var X,Z,aa=F.extend({},F.rdf.literal.defaults,Y);if(aa.lang!==undefined&&aa.datatype!==undefined){throw"Malformed Literal: Cannot define both a language and a datatype for a literal ("+ab+")"}if(aa.datatype!==undefined){Z=F.safeCurie(aa.datatype,{namespaces:aa.namespaces});F.extend(this,F.typedValue(ab.toString(),Z))}else{if(aa.lang!==undefined){this.value=ab.toString();this.lang=aa.lang}else{if(typeof ab==="boolean"){F.extend(this,F.typedValue(ab.toString(),j+"boolean"))}else{if(typeof ab==="number"){F.extend(this,F.typedValue(ab.toString(),j+"double"))}else{if(ab==="true"||ab==="false"){F.extend(this,F.typedValue(ab,j+"boolean"))}else{if(F.typedValue.valid(ab,j+"integer")){F.extend(this,F.typedValue(ab,j+"integer"))}else{if(F.typedValue.valid(ab,j+"decimal")){F.extend(this,F.typedValue(ab,j+"decimal"))}else{if(F.typedValue.valid(ab,j+"double")&&!/^\s*([\-\+]?INF|NaN)\s*$/.test(ab)){F.extend(this,F.typedValue(ab,j+"double"))}else{X=T.exec(ab);if(X!==null){this.value=(X[2]||X[4]).replace(/\\"/g,'"');if(X[9]){Z=F.rdf.resource(X[9],aa);F.extend(this,F.typedValue(this.value,Z.value))}else{if(X[7]){this.lang=X[7]}}}else{throw"Malformed Literal: Couldn't recognise the value "+ab}}}}}}}}}return this},dump:function(){var X={type:"literal",value:this.value.toString()};if(this.lang!==undefined){X.lang=this.lang}else{if(this.datatype!==undefined){X.datatype=this.datatype.toString()}}return X},toString:function(){var X='"'+this.value+'"';if(this.lang!==undefined){X+="@"+this.lang}else{if(this.datatype!==undefined){X+="^^<"+this.datatype+">"}}return X}};F.rdf.literal.fn.init.prototype=F.rdf.literal.fn;F.rdf.literal.defaults={base:F.uri.base(),namespaces:{},datatype:undefined,lang:undefined}})(jQuery);(function(h){var D={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",xsd:"http://www.w3.org/2001/XMLSchema#"},B=D.rdf+"XMLLiteral",k=h.fn.curie.defaults,v=/\s([^ =]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^ >]+))/g,n=h.rdf.resource("<>"),z=function(H){var F="",E,G;if(!/&/.test(H)){return H}while(H.length>0){E=/([^&]*)(&([^;]+);)(.*)/g.exec(H);if(E===null){F+=H;break}F+=E[1];G=E[3];H=E[4];if(G.charAt(0)==="#"){if(G.charAt(1)==="x"){F+=String.fromCharCode(parseInt(G.substring(2),16))}else{F+=String.fromCharCode(parseInt(G.substring(1),10))}}else{switch(G){case"amp":F+="&";break;case"nbsp":F+=String.fromCharCode(160);break;case"quot":F+='"';break;case"apos":F+="'";break;default:F+="&"+G+";"}}}return F},u=function(F){var G,K,M,O,E,N,J,H,L={},I={};K=F[0];L[":length"]=0;if(K.attributes&&K.attributes.getNamedItemNS){J=K.attributes;for(G=0;G<J.length;G+=1){M=J[G];if(/^xmlns(:(.+))?$/.test(M.nodeName)&&M.nodeValue!==""){H=/^xmlns(:(.+))?$/.exec(M.nodeName)[2]||"";L[H]=h.uri(M.nodeValue);L[":length"]+=1}else{if(/rel|rev|lang|xml:lang/.test(M.nodeName)){I[M.nodeName]=M.nodeValue===""?undefined:M.nodeValue}else{if(/about|href|src|resource|property|typeof|content|datatype/.test(M.nodeName)){I[M.nodeName]=M.nodeValue===null?undefined:M.nodeValue}}}}}else{O=/<[^>]+>/.exec(K.outerHTML);M=v.exec(O);while(M!==null){E=M[1];N=M[2]||M[3]||M[4];if(/^xmlns/.test(E)&&E!=="xmlns:"&&N!==""){H=/^xmlns(:(.+))?$/.exec(E)[2]||"";L[H]=h.uri(N);L[":length"]+=1}else{if(/about|href|src|resource|property|typeof|content|datatype|rel|rev|lang|xml:lang/.test(E)){I[E]=z(N)}}M=v.exec(O)}v.lastIndex=0}return{atts:I,namespaces:L}},y=function(F,E){var G=F[0].getAttribute(E);if(E==="rev"||E==="rel"||E==="lang"||E==="xml:lang"){G=G===""?undefined:G}return G===null?undefined:G},e=function(E){return h.rdf.resource(E)},d=function(F,G,E){if(F.substring(0,2)==="_:"){return h.rdf.blank(F)}else{try{return e(h.curie(F,E))}catch(H){return undefined}}},g=function(I,G,F){var E=/^\[([^\]]+)\]$/.exec(I),H=F.base||G.base();return E?d(E[1],G,F):e(h.uri(I,H))},o=function(H,G,E){var F,I,J=[];H=H&&H.split?H.split(/[ \t\n\r\x0C]+/g):[];for(F=0;F<H.length;F+=1){if(H[F]!==""){I=d(H[F],G,E);if(I!==undefined){J.push(I)}}}return J},f=function(H,J,E){var F,G,I=[];J=J.type==="uri"?J:h.rdf.resource(J,E);H=H&&H.split?H.split(/\s+/):[];for(F=0;F<H.length;F+=1){if(H[F]!==""){G=d(H[F],null,E);if(G!==J){I.push(H[F])}}}return I.reverse().join(" ")},x=function(I,F,H){var G,J,K,E;F=F||{};K=F.atts||u(I).atts;G=H===undefined?K.rel!==undefined||K.rev!==undefined:H;J=K.resource;J=J===undefined?K.href:J;if(J===undefined){J=G?h.rdf.blank("[]"):J}else{E=F.curieOptions||h.extend({},k,{namespaces:I.xmlns()});J=g(J,I,E)}return J},r=function(K,G,J){var I,L,E,F,H=false;G=G||{};L=G.atts||u(K).atts;E=G.curieOptions||h.extend({},k,{namespaces:K.xmlns(),base:K.base()});I=J===undefined?L.rel!==undefined||L.rev!==undefined:J;if(L.about!==undefined){F=g(L.about,K,E)}if(F===undefined&&L.src!==undefined){F=g(L.src,K,E)}if(!I&&F===undefined&&L.resource!==undefined){F=g(L.resource,K,E)}if(!I&&F===undefined&&L.href!==undefined){F=g(L.href,K,E)}if(F===undefined){if(/head|body/i.test(K[0].nodeName)){F=n}else{if(L["typeof"]!==undefined){F=h.rdf.blank("[]")}else{if(K[0].parentNode.nodeType===1){F=G.object||x(K.parent())||r(K.parent()).subject;H=!I&&L.property===undefined}else{F=n}}}}return{subject:F,skip:H}},s=function(F,E){var G;E=E||{};if(E.atts){G=E.atts.lang;G=G||E.atts["xml:lang"]}else{G=F[0].getAttribute("lang");G=(G===null||G==="")?F[0].getAttribute("xml:lang"):G;G=(G===null||G==="")?undefined:G}if(G===undefined){if(E.lang){G=E.lang}else{if(F[0].parentNode.nodeType===1){G=s(F.parent())}}}return G},p=function(E){switch(E){case"<":return"&lt;";case'"':return"&quot;";case"&":return"&amp;"}},w=function(F,G){var H,I="",J,L,E,K,M;F.contents().each(function(){var N=h(this),O=N[0];if(O.nodeType===1){E=O.nodeName.toLowerCase();I+="<"+E;if(O.outerHTML){M=/<[^>]+>/.exec(O.outerHTML);L=v.exec(M);while(L!==null){if(!/^jQuery/.test(L[1])){I+=" "+L[1]+"=";I+=L[2]?L[3]:'"'+L[1]+'"'}L=v.exec(M)}v.lastIndex=0}else{J=O.attributes;for(H=0;H<J.length;H+=1){L=J.item(H);I+=" "+L.nodeName+'="';I+=L.nodeValue.replace(/[<"&]/g,p);I+='"'}}if(!G){K=N.xmlns("");if(K!==undefined&&N.attr("xmlns")===undefined){I+=' xmlns="'+K+'"'}}I+=">";I+=w(N,true);I+="</"+E+">"}else{if(O.nodeType===8){I+="<!--";I+=O.nodeValue;I+="-->"}else{I+=O.nodeValue}}});return I},C=function(G){var V,J,E,Z,Q,U,P,X,W,N,K,H,R,O,L,T=[],F,S,M,Y,I=this.children();G=G||{};O=G.forward||[];L=G.backward||[];F=u(this);S=F.atts;G.atts=S;M=G.namespaces||this.xmlns();if(F.namespaces[":length"]>0){M=h.extend({},M);for(Y in F.namespaces){if(Y!==":length"){M[Y]=F.namespaces[Y]}}}G.curieOptions=h.extend({},k,{namespaces:M,base:this.base()});J=r(this,G);Z=s(this,G);if(J.skip){H=G.forward;R=G.backward;J=G.subject;E=G.object}else{J=J.subject;if(O.length>0||L.length>0){N=G.subject||r(this.parent()).subject;for(V=0;V<O.length;V+=1){W=h.rdf.triple(N,O[V],J,{source:this[0]});T.push(W)}for(V=0;V<L.length;V+=1){W=h.rdf.triple(J,L[V],N,{source:this[0]});T.push(W)}}E=x(this,G);P=o(S["typeof"],this,G.curieOptions);for(V=0;V<P.length;V+=1){W=h.rdf.triple(J,h.rdf.type,P[V],{source:this[0]});T.push(W)}K=o(S.property,this,G.curieOptions);if(K.length>0){Q=S.datatype;U=S.content;if(Q!==undefined&&Q!==""){Q=h.curie(Q,G.curieOptions);if(Q===B){X=h.rdf.literal(w(this),{datatype:B})}else{if(U!==undefined){X=h.rdf.literal(U,{datatype:Q})}else{X=h.rdf.literal(this.text(),{datatype:Q})}}}else{if(U!==undefined){if(Z===undefined){X=h.rdf.literal('"'+U+'"')}else{X=h.rdf.literal(U,{lang:Z})}}else{if(I.length===0||Q===""){Z=s(this,G);if(Z===undefined){X=h.rdf.literal('"'+this.text()+'"')}else{X=h.rdf.literal(this.text(),{lang:Z})}}else{X=h.rdf.literal(w(this),{datatype:B})}}}for(V=0;V<K.length;V+=1){W=h.rdf.triple(J,K[V],X,{source:this[0]});T.push(W)}}H=o(S.rel,this,G.curieOptions);R=o(S.rev,this,G.curieOptions);if(S.resource!==undefined||S.href!==undefined){if(H!==undefined){for(V=0;V<H.length;V+=1){W=h.rdf.triple(J,H[V],E,{source:this[0]});T.push(W)}}H=[];if(R!==undefined){for(V=0;V<R.length;V+=1){W=h.rdf.triple(E,R[V],J,{source:this[0]});T.push(W)}}R=[]}}I.each(function(){T=T.concat(C.call(h(this),{forward:H,backward:R,subject:J,object:E||J,lang:Z,namespaces:M}))});return T},t=function(E){var F,G;if(E&&E.about!==undefined){G=u(this).atts;if(E.about===null){return G.property!==undefined||G.rel!==undefined||G.rev!==undefined||G["typeof"]!==undefined}else{return r(this,{atts:G}).subject.value===E.about}}else{if(E&&E.type!==undefined){F=y(this,"typeof");if(F!==undefined){return E.type===null?true:this.curie(F)===E.type}return false}else{return C.call(this)}}},A=1,q=function(I,F,H){var E,G,J;try{G=I.createCurie(H)}catch(K){if(H.toString()===B){I.attr("xmlns:rdf",D.rdf);G="rdf:XMLLiteral"}else{E=/^(.+[\/#])([^#]+)$/.exec(H);I.attr("xmlns:ns"+A,E[1]);G="ns"+A+":"+E[2];A+=1}}J=y(I,F);if(J!==undefined){if(h.inArray(G,J.split(/\s+/))===-1){I.attr(F,J+" "+G)}}else{I.attr(F,G)}},m=function(G,E,H){var F;if(H.type==="bnode"){F="[_:"+H.id+"]"}else{F=h(G).base().relative(H.value)}G.attr(E,F)},b=function(G,E){var F=r(G).subject;if(E!==F){m(G,"about",E)}G.removeData("rdfa.subject")},c=function(F,E){var G=x(F);if(E!==G){m(F,"resource",E)}F.removeData("rdfa.objectResource")},a=function(E,F){E.wrapInner("<span></span>").children("span").attr("lang",F);return E},j=function(P){var J,M,F,I,S,Q,G,K,E,H,O,L,N,R=this.xmlns();S=this;N=u(this).atts;if(typeof P==="string"){P=h.rdf.triple(P,{namespaces:R,base:this.base()})}else{if(P.rdfquery){j.call(this,P.sources().get(0));return this}else{if(P.length){for(L=0;L<P.length;L+=1){j.call(this,P[L])}return this}}}M=N.rel!==undefined||N.rev!==undefined;F=M||N.property!==undefined||N["typeof"]!==undefined;if(P.object.type!=="literal"){Q=r(this,{atts:N},true).subject;K=x(this,{atts:N},true);I=!F&&N.resource===undefined;G=Q===P.subject;E=K===P.object;if(P.property===h.rdf.type){if(G){q(this,"typeof",P.object.value)}else{if(F){S=this.wrapInner("<span />").children("span");q(S,"typeof",P.object.value);if(K!==P.subject){b(S,P.subject)}}else{q(this,"typeof",P.object.value);b(this,P.subject)}}}else{if(G){if(E){q(this,"rel",P.property.value)}else{if(I||!F){q(this,"rel",P.property.value);c(this,P.object)}else{S=this.wrap("<span />").parent();q(S,"rev",P.property.value);b(S,P.object)}}}else{if(Q===P.object){if(K===P.subject){q(this,"rev",P.property.value)}else{if(I||!F){q(this,"rev",P.property.value);c(this,P.subject)}else{S=this.wrap("<span />").parent();q(S,"rel",P.property.value);b(S,P.subject)}}}else{if(E){if(F){S=this.wrapInner("<span />").children("span");q(S,"rev",P.property.value);c(S,P.subject);S=S.wrapInner("<span />").children("span");b(S,P.object);S=this}else{b(this,P.subject);q(this,"rel",P.property.value)}}else{if(K===P.subject){if(F){S=this.wrapInner("<span />").children("span");q(S,"rel",this.property.value);c(S,P.object);S=S.wrapInner("<span />").children("span");b(S,K);S=this}else{b(this,P.object);q(this,"rev",P.property.value)}}else{if(F){S=this.wrapInner("<span />").children("span");q(S,"rel",P.property.value);b(S,P.subject);c(S,P.object);if(S.children("*").length>0){S=this.wrapInner("<span />").children("span");b(S,Q)}S=this}else{q(S,"rel",P.property.value);b(this,P.subject);c(this,P.object);if(this.children("*").length>0){S=this.wrapInner("<span />").children("span");b(S,Q);S=this}}}}}}}}else{Q=r(this,{atts:N}).subject;K=x(this,{atts:N});G=Q===P.subject;J=this.text()!==P.object.value;if(N.property!==undefined){O=N.content;E=O!==undefined?O===P.object.value:!J;if(G&&E){q(this,"property",P.property.value)}else{S=this.wrapInner("<span />").children("span");return j.call(S,P)}}else{if(K===P.subject){S=this.wrapInner("<span />").children("span");return j.call(S,P)}q(this,"property",P.property.value);b(this,P.subject);if(J){if(P.object.datatype&&P.object.datatype.toString()===B){this.html(P.object.value)}else{this.attr("content",P.object.value)}}H=s(this);if(P.object.lang){if(H!==P.object.lang){this.attr("lang",P.object.lang);if(J){a(this,H)}}}else{if(P.object.datatype){q(this,"datatype",P.object.datatype)}else{if(!J){this.attr("datatype","")}if(H!==undefined){this.attr("lang","");if(J){a(this,H)}}}}}}this.parents().andSelf().trigger("rdfChange");return S},l=function(K){var I,L,J,E,F,H,G=this.xmlns();L=u(this).atts;if(K.length){for(i=0;i<K.length;i+=1){l.call(this,K[i])}return this}hasRelation=L.rel!==undefined||L.rev!==undefined;hasRDFa=hasRelation||L.property!==undefined||L["typeof"]!==undefined;if(hasRDFa){if(K.property!==undefined){if(L.property!==undefined){J=f(L.property,K.property,{namespaces:G});if(J===""){this.removeAttr("property")}else{this.attr("property",J)}}if(L.rel!==undefined){E=f(L.rel,K.property,{namespaces:G});if(E===""){this.removeAttr("rel")}else{this.attr("rel",E)}}if(L.rev!==undefined){F=f(L.rev,K.property,{namespaces:G});if(F===""){this.removeAttr("rev")}else{this.attr("rev",F)}}}if(K.type!==undefined){if(L["typeof"]!==undefined){H=f(L["typeof"],K.type,{namespaces:G});if(H===""){this.removeAttr("typeof")}else{this.attr("typeof",H)}}}if(L.property===this.attr("property")&&L.rel===this.attr("rel")&&L.rev===this.attr("rev")&&L["typeof"]===this.attr("typeof")){return l.call(this.parent(),K)}}this.parents().andSelf().trigger("rdfChange");return this};h.fn.rdfa=function(E){if(E===undefined){var F=h.map(h(this),function(G){return C.call(h(G))});return h.rdf({triples:F})}else{h(this).each(function(){j.call(h(this),E)});return this}};h.fn.removeRdfa=function(E){h(this).each(function(){l.call(h(this),E)});return this};h.rdf.gleaners.push(t)})(jQuery);
View
146 public/javascripts/avalon/oac_rdf.js
@@ -1,146 +0,0 @@
-
-// Simple wrapper on fetchTriples
-function fetch_annotations(uri, callback) {
- var qry = $.rdf(opts);
- fetchTriples(uri, qry, cb_process_annoList, callback);
-}
-
-//Pull rdf/xml file and parse to triples
-function fetchTriples(uri, qry, fn, callback) {
- // Check we've not already pulled this uri
- if (topinfo['done'].indexOf(uri) > -1) {
- fn(qry,uri, callback);
- } else {
- topinfo['done'].push(uri);
- }
-
- $.ajax({
- url: uri,
- accepts: "application/rdf+xml",
- success: function(data, status, xhr) {
- try {
- var resp = qry.databank.load(data);
- } catch(e) {
- alert('Broken RDF/XML: ' + e)
- }
- if (qry != null) {
- fn(qry, uri, callback);
- }
- return;
- },
- error: function(XMLHttpRequest, status, errorThrown) {
- alert('Can not fetch data from ' + uri);
- }
- });
-}
-
-function cb_process_annoList(qry, uri, callback) {
-
- var externalFiles = {};
- var annos = buildAllAnnos(qry);
- var allAnnos = topinfo['annotations'];
-
- try {
-
- for (var a=0,anno;anno=annos[a];a++) {
-
- var tgts = [];
- for (var t=0,target;target=anno.targets[t];t++) {
-
- if (target.partOf != null) {
- var tid = target.partOf.id;
- } else {
- var tid = target.id;
- }
- tgts.push(tid);
-
- if (allAnnos[tid] == undefined) {
- allAnnos[tid] = [];
- }
- allAnnos[tid].push(anno);
-
- if (target.fragmentType == 'xml') {
- var pid = target.partOf.id;
- if (externalFiles[pid]== undefined) {
- externalFiles[pid] = [];
- }
- externalFiles[pid].push([anno, target]);
- anno.finished -= 1;
- }
- if (target.constraint != null && !target.constraint.value) {
- var pid = target.constraint.id;
- if (externalFiles[pid]== undefined) {
- externalFiles[pid] = [];
- }
- externalFiles[pid].push([anno, target.constraint]);
- anno.finished -= 1;
- }
- }
-
- // And maybe load resources for the Body
- if (anno.body.fragmentType == 'xml') {
- var pid = anno.body.partOf.id;
- if (externalFiles[pid]== undefined) {
- externalFiles[pid] = [];
- }
- externalFiles[pid].push([anno, anno.body]);
- anno.finished -= 1;
- }
- if (anno.body.constraint != null && !anno.body.constraint.value) {
- var pid = anno.body.constraint.id;
- if (externalFiles[pid]== undefined) {
- externalFiles[pid] = [];
- }
- externalFiles[pid].push([anno, anno.body.constraint]);
- anno.finished -= 1;
- }
- }
-
-
- } catch(e) {alert('error: ' + e) }
-
-
- topinfo['annotations'] = allAnnos;
-
- // Try to force GC on the query
- delete qry.databank;
- qry = null;
-
- // Do something with the annotations here
- callback(allAnnos);
-
- // And launch AJAX queries for any external XML docs
- for (var uri in externalFiles) {
- $.ajax(
- {url: uri, dataType: "xml",
- success: function(data, status, xhr) {
- try {
- // We have the XML now, so walk through all annos for it
- var remotes = externalFiles[uri];
- for (var i=0,inf; inf=remotes[i]; i++) {
- var anno = inf[0];
- var what = inf[1];
- if (what.fragmentType == 'xml') {
- var sel = what.fragmentInfo[0];
- var txtsel = what.fragmentInfo[1];
- var btxt = $(data).find(sel).text().substring(txtsel[0], txtsel[1]);
- } else {
- var btxt = data;
- }
- what.value = btxt;
- anno.finished += 1;
- }
- // Do something with the annos here
- process_annotations();
-
- } catch(e) {
- alert('Broken data in ' + anno.id + ':' + e)
- }
- },
- error: function(XMLHttpRequest, status, errorThrown) {
- alert('Can not fetch data from ' + uri);
- }
- }
- );
- }
-}
View
266 public/javascripts/avalon/oac_rdfjson.js
@@ -1,266 +0,0 @@
-
-
-function buildAllAnnos(query, type) {
- query.reset();
- if (type != undefined) {
- var typres = query.where('?anno a ' + type);
- }
- var annos = {};
- var result = query.where('?anno oac:hasBody ?body')
- .each(function() {annos[this.anno.value.toString()]=1;});
- query.reset();
-
-// This is inane, but faster than anything involving queries
- return rdfToJson(annos, query.databank.dump());
-}
-
-
-// Sometimes the dump syntax has multiple copies
-// if there are circular refs. Probably a bug in RDFQuery
-function uniqueValueList(list) {
- var hash = {};
- for (var i=0,item;item=list[i];i++) {
- hash[item.value] = 1;
- }
- var res = [];
- for (j in hash) {
- res.push(j);
- }
- return res;
-}
-
-function rdfToJson(annos, dump) {
- var nss = opts.namespaces;
- var annoObjs = [];
-
- for (var id in annos) {
- if (topinfo['builtAnnos'].indexOf(id) > -1) {
- continue;
- } else {
- topinfo['builtAnnos'].push(id);
- }
-
- var anno = new jAnno(id);
- anno.extractInfo(dump);
- // Must be exactly one body. Ignore past first
- var bodid = dump[id][nss['oac']+'hasBody'][0]['value'];
- var bod = new jBodyTarget(bodid);
- bod.extractInfo(dump);
- anno.body = bod;
- var tgts = dump[id][nss['oac']+'hasTarget'];
- var uniqtgts = uniqueValueList(tgts);
- for (t in uniqtgts) {
- var tid = uniqtgts[t];
- var tgt = new jBodyTarget(tid);
- tgt.extractInfo(dump);
- anno.targets.push(tgt)
- }
- annoObjs.push(anno);
- }
- return annoObjs;
-}
-
-
-function jAnno(id) {
- this.id = id;
- this.types = [];
- this.creator = null;
- this.title = "";
- this.body = null;
- this.targets = [];
- this.zOrder = 0;
- this.finished = 1;
- this.painted = 0;
-}
-
-
-jAnno.prototype.extractInfo = function(info) {
- var nss = opts.namespaces;
- var me = info[this.id]
- var typs = me[nss['rdf']+'type'];
- this.types = uniqueValueList(typs);
- if (me[nss['dc']+'title'] != undefined) {
- this.title = me[nss['dc']+'title'][0]['value'];
- }
-
-}
-
-var extractSimple = function(info) {
-
- var me = info[this.id];
- if (me == undefined) {
- // No info about resource at all
- return;
- }
- var nss = opts.namespaces;
-
- if (me[nss['rdf']+'type'] != undefined) {
- var typs = me[nss['rdf']+'type'];
- this.types= uniqueValueList(typs);
- }
- if (me[nss['dc']+'title'] != undefined) {
- this.title = me[nss['dc']+'title'][0]['value'];
- }
- if (me[nss['cnt']+'chars'] != undefined) {
- this.value = me[nss['cnt']+'chars'][0]['value'];
- }
- if (me[nss['dc']+'format'] != undefined) {
- this.format = me[nss['dc']+'format'][0]['value'];
- }
- if (me[nss['exif']+'height'] != undefined) {
- this.height = parseInt(me[nss['exif']+'height'][0]['value']);
- }
- if (me[nss['exif']+'width'] != undefined) {
- this.width = parseInt(me[nss['exif']+'width'][0]['value']);
- }
- if (me[nss['dc']+'extent'] != undefined) {
- this.extent = parseInt(me[nss['dc']+'extent'][0]['value']);
- }
-
-}
-
-
-function jBodyTarget(id) {
- this.id = id;
- this.fragments = [];
-
- var hidx = id.indexOf('#');
- if (hidx > -1) {
- // Check for fragments and try to parse
- var frags = id.substring(hidx+1, 1000).split('&');
- for (var i in frags) {
- this.fragments.push(getFragObj(frags[i]));
- }
- }
-
- this.types = [];
- this.title = "";
- this.creator = null;
- this.value = "";
- this.constraint = null;
- this.partOf = null;
-
-}
-
-// Gets a frag object from a frag string
-function getFragObj(frag) {
- var fragObj = new jFragment();
- if (frag.substring(0,2) == 'xy') {
- // xywh= (x,y,w,h)
- var info = mfRectRe.exec(frag)
- fragObj.fragmentInfo = [parseInt(info[1]), parseInt(info[2]), parseInt(info[3]), parseInt(info[4])];
- fragObj.fragmentType = 'rect';
- } else if (frag.substring(0,2) == 'xp') {
- // xpointer => (jquerySelect, textInfo)
- var info = xptrToJQuery(frag);
- fragObj.fragmentType = 'xml';
- fragObj.fragmentInfo = info;
- } else if (frag.substring(0,2) == 't=') {
- // t= (start, end)
- var info = mfNptRe.exec(frag);
- fragObj.fragmentInfo = [parseNptItem(info[2]), parseNptItem(info[3])] ;
- fragObj.fragmentType = 'time';
- }
-
- return fragObj;
-}
-
-function jFragment() {
- this.fragmentType = null;
- this.fragmentInfo = null;
-}
-
-jBodyTarget.prototype.extractSimple = extractSimple;
-
-jBodyTarget.prototype.extractInfo = function(info) {
- var nss = opts.namespaces;
- var me = info[this.id];
- if (me == undefined) {
- // No info about resource at all :(
- return;
- }
-
- this.extractSimple(info);
-
- if (me[nss['dcterms']+'isPartOf'] != undefined) {
- var pid = me[nss['dcterms']+'isPartOf'][0]['value'];
- var partOf = new jResource(pid);
- this.partOf = partOf;
- partOf.extractInfo(info);
-
- }
-
- // Check for constraint
- if (this.partOf == null) {
- if (me[nss['oac']+'constrains'] != undefined) {
- var pid = me[nss['oac']+'constrains'][0]['value'];
- var partOf = new jResource(pid);
- partOf.extractInfo(info);
- this.partOf = partOf;
-
- var cid = me[nss['oac']+'constrainedBy'][0]['value'];
- var constraint = new jConstraint(cid);
- constraint.extractInfo(info);
- this.constraint = constraint;
- }
- }
-
-}
-
-function jConstraint(id) {
- this.id = id;
- this.format = '';
- this.value = "";
- this.creator = null;
- this.title = "";
- this.types = [];
-}
-
-jConstraint.prototype.extractSimple = extractSimple;
-
-jConstraint.prototype.extractInfo = function(info) {
- var nss = opts.namespaces;
- var me = info[this.id];
- this.extractSimple(info);
-
- if (me[nss['aos']+'offset'] != undefined) {
- this.offset = me[nss['aos']+'offset'][0]['value'];
- }
- if (me[nss['aos']+'range'] != undefined) {
- this.range = me[nss['aos']+'range'][0]['value'];
- }
- if (me[nss['aos']+'prefix'] != undefined) {
- this.prefix = me[nss['aos']+'prefix'][0]['value'];
- }
- if (me[nss['aos']+'postfix'] != undefined) {
- this.postfix = me[nss['aos']+'postfix'][0]['value'];
- }
- if (me[nss['aos']+'exact'] != undefined) {
- this.exact = me[nss['aos']+'exact'][0]['value'];
- }
-}
-
-
-function jResource(id) {
- this.id = id;
- this.types = [];
- this.title = "";
- this.creator = null;
- this.value = "";
-
- this.format = "";
- this.height = 0;
- this.width = 0;
- this.extent = 0;
-
-}
-
-jResource.prototype.extractInfo = extractSimple;
-
-
-function jAgent(id) {
- this.name = "";
- this.email = "";
- this.web = "";
-}
-
View
129 public/javascripts/avalon/oac_utils.js
@@ -1,129 +0,0 @@
-
-
-var SVG_NS = "http://www.w3.org/2000/svg";
-var XLINK_NS = "http://www.w3.org/1999/xlink";
-
-var opts = {base:'http://your-server-here.com/path/to/stuff/',
- namespaces: {
- rdf:'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
- rdfs:'http://www.w3.org/2001/01/rdf-schema#',
- dc:'http://purl.org/dc/elements/1.1/',
- dcterms:'http://purl.org/dc/terms/',
- dctype:'http://purl.org/dc/dcmitype/',
- oac:'http://www.openannotation.org/ns/',
- cnt:'http://www.w3.org/2008/content#',
- aos:'http://purl.org/ao/selectors/',
- foaf:' http://xmlns.com/foaf/0.1/',
-
- ore:'http://www.openarchives.org/ore/terms/',
- dms:'http://dms.stanford.edu/ns/',
- exif:'http://www.w3.org/2003/12/exif/ns#'
-
- }
-};
-
-var topinfo = {'annotations' : {}, 'done':[], 'builtAnnos':[]}
-
-// mfre.exec(frag) --> [full, x, y, w, h]
-var mfRectRe = new RegExp('xywh=([0-9]+),([0-9]+),([0-9]+),([0-9]+)');
-// mfNptRe.exect(frag) --> [full, npt, start, end]
-var mfNptRe = new RegExp('t=(npt:)?([0-9.:]+)?,([0-9.:]+)?');
-
-
-var textre = new RegExp('/text\\(\\)$');
-var slashs = new RegExp('^[/]+');
-var xptr = new RegExp('^#?xpointer\\((.+)\\)$');
-var attrq = new RegExp('\\[([^\\]]+)=([^\\]"]+)\\]', 'g')
-var strrng = new RegExp('^string-range\\((.+),([0-9]+),([0-9]+)\\)')
-
-function xptrToJQuery(xp) {
- // Strip xpointer(...)
- var xp = xp.replace(/^\s+|\s+$/g, '');
- var m = xp.match(xptr);
- if (m) {
- xp = m[1];
- }
- // We want to support string-range(xp, start, end)
- xp = xp.replace(/^\s+|\s+$/g, '');
- m = xp.match(strrng);
- if (m) {
- xp = m[1];
- var start = parseInt(m[2]);
- var end = parseInt(m[3]);
- var wantsText = [start, end]
- } else {
- // /text() --> return that we want .text()
- var wantsText = false;
- m = xp.match(textre)
- if (m) {
- xp = xp.replace(textre, '');
- wantsText = true;
- }
- }
- //strip initial slashes
- xp = xp.replace(slashs, '');
- // Parent and Descendant axes
- xp = xp.replace(new RegExp('//', 'g'), ' ');
- xp = xp.replace(new RegExp('/', 'g'), ' > ');
- // Ensure quotes in attribute values
- xp = xp.replace(attrq, '[$1="$2"]');
- // id(bla) --> #bla
- xp = xp.replace(/id\((.+)\)/g, '#$1')
- // Final trim
- xp = xp.replace(/^\s+|\s+$/g, '');
- return [xp, wantsText];
-}
-
-
-function parseNptItem(npt) {
- if (npt.indexOf(':') > -1) {
- // [hh:]mm:ss[.xx]
- var arr = npt.split(':');
- var secs = parseFloat(arr.pop());
- var mins = parseInt(arr.pop());
- if (arr.length > 0) {
- var hrs = parseInt(arr.pop());
- } else { var hrs = 0 };
- return secs + (mins * 60) + (hrs * 3600);
- } else {
- return parseFloat(npt)
- }
-}
-
-
-function rdf_to_list(qry, uri) {
- var l = [];
- var firsts = {};
- var rests = {};
- qry.where('?what rdf:first ?frst')
- .where('?what rdf:rest ?rst')
- .each(function() {firsts[this.what.value] = this.frst.value; rests[this.what.value] = this.rst.value});
-
- // Start list from first
- l.push(firsts[uri]);
- var nxt = rests[uri];
-
- // And now iterate through linked list
- while (nxt) {
- if (firsts[nxt] != undefined) {
- l.push(firsts[nxt]);
- }
- nxt = rests[nxt];
- }
- return l;
-}
-
-function isodate(d) {
- var dt = '' + d.getUTCFullYear();
- var m = '' + (d.getUTCMonth() + 1);
- m = m.length == 1 ? '0' + m : m;
- var dy = '' + d.getUTCDate();
- dy = dy.length == 1 ? '0' + dy : dy;
- var hr = '' + d.getUTCHours();
- hr = hr.length == 1 ? '0' + hr : hr;
- var mn = '' + d.getUTCMinutes();
- mn = mn.length == 1 ? '0' + mn : mn;
- var sc = '' + d.getUTCSeconds();
- sc = sc.length == 1 ? '0' + sc : sc;
- return dt + '-' + m + '-' + dy + ' ' + hr + ':' + mn + ':' + sc + ' UTC';
-}
View
118 public/javascripts/avalon/uuid.js
@@ -1,118 +0,0 @@
-/*
-
-uuid.js - Version 0.3
-JavaScript Class to create a UUID like identifier
-
-Copyright (C) 2006-2008, Erik Giberti (AF-Design), All rights reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
-
-The latest version of this file can be downloaded from
-http://www.af-design.com/resources/javascript_uuid.php
-
-HISTORY:
-6/5/06 - Initial Release
-5/22/08 - Updated code to run faster, removed randrange(min,max) in favor of
- a simpler rand(max) function. Reduced overhead by using getTime()
- method of date class (suggestion by James Hall).
-9/5/08 - Fixed a bug with rand(max) and additional efficiencies pointed out
- by Robert Kieffer http://broofa.com/
-
-KNOWN ISSUES:
-- Still no way to get MAC address in JavaScript
-- Research into other versions of UUID show promising possibilities
- (more research needed)
-- Documentation needs improvement
-
-*/
-
-// On creation of a UUID object, set it's initial value
-function UUID(){
- this.id = this.createUUID();
-}
-
-// When asked what this Object is, lie and return it's value
-UUID.prototype.valueOf = function(){ return this.id; }
-UUID.prototype.toString = function(){ return this.id; }
-
-//
-// INSTANCE SPECIFIC METHODS
-//
-
-UUID.prototype.createUUID = function(){
- //
- // Loose interpretation of the specification DCE 1.1: Remote Procedure Call
- // described at http://www.opengroup.org/onlinepubs/009629399/apdxa.htm#tagtcjh_37
- // since JavaScript doesn't allow access to internal systems, the last 48 bits
- // of the node section is made up using a series of random numbers (6 octets long).
- //
- var dg = new Date(1582, 10, 15, 0, 0, 0, 0);
- var dc = new Date();
- var t = dc.getTime() - dg.getTime();
- var h = '-';
- var tl = UUID.getIntegerBits(t,0,31);
- var tm = UUID.getIntegerBits(t,32,47);
- var thv = UUID.getIntegerBits(t,48,59) + '1'; // version 1, security version is 2
- var csar = UUID.getIntegerBits(UUID.rand(4095),0,7);
- var csl = UUID.getIntegerBits(UUID.rand(4095),0,7);
-
- // since detection of anything about the machine/browser is far to buggy,
- // include some more random numbers here
- // if NIC or an IP can be obtained reliably, that should be put in
- // here instead.
- var n = UUID.getIntegerBits(UUID.rand(8191),0,7) +
- UUID.getIntegerBits(UUID.rand(8191),8,15) +
- UUID.getIntegerBits(UUID.rand(8191),0,7) +
- UUID.getIntegerBits(UUID.rand(8191),8,15) +
- UUID.getIntegerBits(UUID.rand(8191),0,15); // this last number is two octets long
- return tl + h + tm + h + thv + h + csar + csl + h + n;
-}
-
-
-//
-// GENERAL METHODS (Not instance specific)
-//
-
-
-// Pull out only certain bits from a very large integer, used to get the time
-// code information for the first part of a UUID. Will return zero's if there
-// aren't enough bits to shift where it needs to.
-UUID.getIntegerBits = function(val,start,end){
- var base16 = UUID.returnBase(val,16);
- var quadArray = new Array();
- var quadString = '';
- var i = 0;
- for(i=0;i<base16.length;i++){
- quadArray.push(base16.substring(i,i+1));
- }
- for(i=Math.floor(start/4);i<=Math.floor(end/4);i++){
- if(!quadArray[i] || quadArray[i] == '') quadString += '0';
- else quadString += quadArray[i];
- }
- return quadString;
-}
-
-// Replaced from the original function to leverage the built in methods in
-// JavaScript. Thanks to Robert Kieffer for pointing this one out
-UUID.returnBase = function(number, base){
- return (number).toString(base).toUpperCase();
-}
-
-// pick a random number within a range of numbers
-// int b rand(int a); where 0 <= b <= a
-UUID.rand = function(max){
- return Math.floor(Math.random() * (max + 1));
-}
-
-// end of UUID class file
View
491 public/javascripts/blacklight/blacklight.js
@@ -1,491 +0,0 @@
-/* This file is generated by Blacklight. You probably don't want to edit
- this file directly, or you'll have to manually merge your changes if later
- versions of Blacklight change this file. Instead, use your own JS file
- which over-rides things in this JS file, as described below: */
-
-/* Blacklight has a Javascript setup meant to support local disabling,
- modification, and use of Blacklight behaviors.
-
- There is a global Blacklight object, available to your local JS.
-
- Individual logic to apply JS behaviors to particular elements is
- stored in functions on that Blacklight object.
-
- The actual behaviors themselves are implemented as JQuery plugins,
- JQuery-UI widgets (a special kind of JQuery plugin), or in some cases
- just as logic in the Blacklight global object.
-
- All of these things can be modified by your local JS code -- these functions
- are all set up on js load, and only called on document ready, so do your
- modifications just on js load, and they'll be made by the time document ready
- comes along.
-
- Examples, in your application's own JS:
-
- Change what items zebra_striping gets applied to:
-
- Blacklight.do_zebra_stripe.selector = ".my_class .even";
- //Or even add on to existing:
- Blacklight.do_zebra_stripe.selector = Blacklight.do_zebra_stripe.selector + " .my_class .even";
-
- Turn off adding of behavior to facet 'more' links, using a no-op function:
-
- Blacklight.do_more_facets_behavior = function() {};
-
- Change the implementation of facet 'more' link behavior to use entirely
- different JS.
-
- Blacklight.do_more_facets_behavior = function() {
- $(Blacklight.do_more_facets_behavior.selector).each(function() {
- //my own thing!
- });
- };
-*/
-
-Blacklight = {};
-
-
-$(document).ready(function() {
- Blacklight.do_zebra_stripe();
-
- Blacklight.do_select_submit();
-
- Blacklight.do_more_facets_behavior();
-
- Blacklight.do_lightbox_dialog();
-
- Blacklight.do_bookmark_toggle_behavior();
-
- Blacklight.do_folder_toggle_behavior();
-
- Blacklight.do_facet_expand_contract_behavior();
-});
-
-
-
-//Note all of these definitions are NOT in document ready, they get defined on
-//page load, and later called on document ready.
-(function($) {
-
- // adds classes for zebra striping table rows
- Blacklight.do_zebra_stripe = function() {
- $(Blacklight.do_zebra_stripe.selector).addClass('zebra_stripe');
- };
- Blacklight.do_zebra_stripe.selector = "table.zebra tr:even, ul.zebra li:even";
-
- //add ajaxy dialogs to certain links, using the ajaxyDialog widget.
- Blacklight.do_more_facets_behavior = function () {
- $( Blacklight.do_more_facets_behavior.selector ).ajaxyDialog({
- width: $(window).width() / 2,
- chainAjaxySelector: "a.next_page, a.prev_page, a.sort_change"
- });
- };
- Blacklight.do_more_facets_behavior.selector = "a.more_facets_link";
-
- // Used for sort-by and per-page controls, hide the submit button
- // and make the select auto-submit
- Blacklight.do_select_submit = function() {
- $(Blacklight.do_select_submit.selector).each(function() {
- var select = $(this);
- select.closest("form").find("input[type=submit]").hide();
- select.bind("change", function() {
- this.form.submit();
- });
- });
- };
- Blacklight.do_select_submit.selector = "form.sort select, form.per_page select";
-
-
- Blacklight.do_lightbox_dialog = function() {
- $("a.lightboxLink").ajaxyDialog({
- chainAjaxySelector: false
- });
- //But make the librarian link wider than 300px default.
- $('a.lightboxLink#librarianLink').ajaxyDialog("option", "width", 650);
- //And the email one too needs to be wider to fit the textarea
- $("a.lightboxLink#emailLink").ajaxyDialog("option", "width", 500);
- };
-
- //change form submit toggle to checkbox
- Blacklight.do_bookmark_toggle_behavior = function() {
- $(Blacklight.do_bookmark_toggle_behavior.selector).bl_checkbox_submit({
- checked_label: "In Bookmarks",
- unchecked_label: "Bookmark",
- progress_label: "Saving...",
- //css_class is added to elements added, plus used for id base
- css_class: "toggle_bookmark"
- });
- };
- Blacklight.do_bookmark_toggle_behavior.selector = "form.bookmark_toggle";
-
- Blacklight.do_folder_toggle_behavior = function() {
- $( Blacklight.do_folder_toggle_behavior.selector ).bl_checkbox_submit({
- checked_label: "Selected",
- unchecked_label: "Select",
- css_class: "toggle_folder",
- success: function(new_state) {
-
- if (new_state) {
- $("#folder_number").text(parseInt($("#folder_number").text()) + 1);
- }
- else {
- $("#folder_number").text(parseInt($("#folder_number").text()) - 1);
- }
- }
- });
- };
- Blacklight.do_folder_toggle_behavior.selector = "form.folder_toggle";
-
- Blacklight.do_facet_expand_contract_behavior = function() {
- $( Blacklight.do_facet_expand_contract_behavior.selector ).each (
- Blacklight.facet_expand_contract
- );
- }
- Blacklight.do_facet_expand_contract_behavior.selector = '#facets h3';
-
- /* Behavior that makes facet limit headings in sidebar expand/contract
- their contents. This is kind of fragile code targeted specifically
- at how we currently render facet HTML, which is why I put it in a function
- on Blacklight instead of in a jquery plugin. Perhaps in the future this
- could/should be expanded to a general purpose jquery plugin -- or
- we should just use one of the existing ones for expand/contract? */
- Blacklight.facet_expand_contract = function() {
- $(this).next("ul, div").each(function(){
- var f_content = $(this);
- $(f_content).prev('h3').addClass('twiddle');
- // find all f_content's that don't have any span descendants with a class of "selected"
- if($('span.selected', f_content).length == 0){
- // hide it
- f_content.hide();
- } else {
- $(this).prev('h3').addClass('twiddle-open');
- }
-
- // attach the toggle behavior to the h3 tag
- $('h3', f_content.parent()).click(function(){
- // toggle the content
- $(this).toggleClass('twiddle-open');
- $(f_content).slideToggle();
- });
- });
- };
-
-})(jQuery);
-
-
-
-
-
-
-/* A JQuery plugin (should this be implemented as a widget instead? not sure)
- that will convert a "toggle" form, with single submit button to add/remove
- something, like used for Bookmarks/Folder, into an AJAXy checkbox instead.
-
- Apply to a form. Does require certain assumption about the form:
- 1) The same form 'action' href must be used for both ADD and REMOVE
- actions, with the different being the hidden input name="_method"
- being set to "put" or "delete" -- that's the Rails method to pretend
- to be doing a certain HTTP verb. So same URL, PUT to add, DELETE
- to remove. This plugin assumes that.
-
- Plus, the form this is applied to should provide a data-doc-id
- attribute (HTML5-style doc-*) that contains the id/primary key
- of the object in question -- used by plugin for a unique value for
- DOM id's.
-
- Pass in options for your class name and labels:
- $("form.something").bl_checkbox_submit({
- checked_label: "Selected",
- unchecked_label: "Select",
- progress_label: "Saving...",
- //css_class is added to elements added, plus used for id base
- css_class: "toggle_my_kinda_form",
- success: function(after_success_check_state) {
- #optional callback
- }
- });
-*/
-(function($) {
- $.fn.bl_checkbox_submit = function(arg_opts) {
-
- this.each(function() {
- var options = $.extend({}, $.fn.bl_checkbox_submit.defaults, arg_opts);
-
-
- var form = $(this);
- form.children().hide();
- //We're going to use the existing form to actually send our add/removes
- //This works conveneintly because the exact same action href is used
- //for both bookmarks/$doc_id. But let's take out the irrelevant parts
- //of the form to avoid any future confusion.
- form.find("input[type=submit]").remove();
-
- //View needs to set data-doc-id so we know a unique value
- //for making DOM id
- var unique_id = form.attr("data-doc-id") || Math.random();
- // if form is currently using method delete to change state,
- // then checkbox is currently checked
- var checked = (form.find("input[name=_method][value=delete]").size() != 0);
-
- var checkbox = $('<input type="checkbox">')
- .addClass( options.css_class )
- .attr("id", options.css_class + "_" + unique_id);
- var label = $('<label>')
- .addClass( options.css_class )
- .attr("for", options.css_class + '_' + unique_id)
- .attr("title", form.attr("title"));
-
-
- function update_state_for(state) {
- checkbox.attr("checked", state);
- label.toggleClass("checked", state);
- if (state) {
- //Set the Rails hidden field that fakes an HTTP verb
- //properly for current state action.
- form.find("input[name=_method]").val("delete");
- label.text(options.checked_label);
- } else {
- form.find("input[name=_method]").val("put");
- label.text(options.unchecked_label);
- }
- }
-
- form.append(checkbox).append(" ").append(label);
- update_state_for(checked);
-
- checkbox.click(function() {
- label.text(options.progress_label).attr("disabled", "disabled");
- checkbox.attr("disabled", "disabled");
-
- $.ajax({
- url: form.attr("action"),
- dataType: 'json',
- type: form.attr("method").toUpperCase(),
- data: form.serialize(),
- error: function() {
- alert("Error");
- update_state_for(checked);
- label.removeAttr("disabled");
- checkbox.removeAttr("disabled");
- },
- success: function(data, status, xhr) {
- //if app isn't running at all, xhr annoyingly
- //reports success with status 0.
- if (xhr.status != 0) {
- checked = ! checked;
- update_state_for(checked);
- label.removeAttr("disabled");
- checkbox.removeAttr("disabled");
- options.success.call(form, checked);
- } else {
- alert("Error");
- update_state_for(checked);
- label.removeAttr("disabled");
- checkbox.removeAttr("disabled");
- }
- }
- });
-
- return false;
- }); //checkbox.click
-
-
- }); //this.each
- return this;
- };
-
- $.fn.bl_checkbox_submit.defaults = {
- checked_label: "",
- unchecked_label: "",
- progress_label: "Saving...",
- //css_class is added to elements added, plus used for id base
- css_class: "bl_checkbox_submit",
- success: function() {} //callback
- };
-
-})(jQuery);
-
-
-/* A widget written by jrochkind to make a link or form result in
- an in-window ajaxy dialog, instead of page load, using JQuery UI
- Dialog widget.
-
- This widget is actually hosted at: https://github.com/jrochkind/jquery.uiExt.ajaxyDialog
-
-
- Included in this main file because I just couldn't bare to add yet
- another JS file to our app, until we figure out a good fix those too
- many JS files are serious page load speed problem. */
-
- (function($) {
- var widgetNamespace = "uiExt";
- var widgetName = "ajaxyDialog";
-
- $.widget(widgetNamespace + "." + widgetName, {
- options: {
- extractTitleSelector: "h1, h2, h3, h4, h5",
- chainAjaxySelector: "a:not([target]), form:not([target])",
- closeDialogSelector: "a.dialog-close"
- },
-
- _create: function() {
- var self = this;
- var element = self.element[0];
- if (element.tagName.toUpperCase() == "A") {
- $(element).bind("click."+self.widgetName, function(event, ui) {
- self._handleClick();
- return false;
- });
- }
- else if (element.tagName.toUpperCase() == "FORM") {
- $(element).bind("submit."+self.widgetName, function(event, ui) {
- self._handleSubmit();
- return false;
- });
- }
- },
-
- open: function() {
- var self = this;
- var element = self.element[0];
-
- if ( element.tagName.toUpperCase() == "A") {
- self._handleClick();
- } else if (element.tagName.toUpperCase() == "FORM") {
- self._handleSubmit();
- }
- },
-
- close: function() {
- this.dialogContainer().dialog("close");
- },
-
- _handleClick: function() {
- var self = this;
- var url = this.element.attr("href");
- var requestDialog = self.dialogContainer();
-
- $("body").css("cursor", "progress");
-
- $.ajax({
- url: url,
- dataType: "html",
- success: function(resp, status, xhr) {
- if (xhr.status != 0) {
- self._loadToDialog(resp);
- } else {
- //stupid jquery calling this 'success', it's
- //network unavailable.
- self._displayFailure(url, xhr, status);
- }
- },
- error: function(xhr, msg) {
- self._displayFailure(url, xhr, msg);
- }
- });
- },
-
- _handleSubmit: function() {
- var self = this;
- var form = self.element;
- var actionUri = form.attr("action");
- var serialized = form.serialize();
-
- $("body").css("cursor", "progress");
-
- $.ajax({
- url: actionUri,
- data: serialized,
- type: form.attr("method").toUpperCase(),
- dataType: "html",
- success: function(resp, status, xhr) {
- if (xhr.status != 0) {
- self._loadToDialog(resp);
- } else {
- //stupid jquery calling this 'success', it's
- //network unavailable.
- self._displayFailure(url, xhr, status);
- }
- },
- error: function(xhr, msg) {
- self._displayFailure(actionUri, xhr, msg);
- }
- });
- },
-
- _loadToDialog: function(html_content) {
- var self = this;
- var dialog = self.dialogContainer();
- //Cheesy way to restore it to it's default options, plus
- //our own local options, since its' a reuseable dialog.
- //for now we insist on modal:true.
- dialog.dialog($.extend({},
- $.ui.dialog.prototype.options,
- self.options,
- {autoOpen:false, modal:true}
- ));
-
- if (self._trigger('beforeDisplay', 0, html_content) !== false) {
- dialog.html( html_content );
-
- //extract and set title
- var title;
- self.options.extractTitleSelector &&
- (title = dialog.find(self.options.extractTitleSelector).first().remove().text());
- title = title ||
- self.element.attr("title")
- title && dialog.dialog("option", "title", title);
-
- //Make any hyperlinks or forms ajaxified, by applying
- //this very same plugin to em, and passing on our options.
- if (self.options.chainAjaxySelector) {
- dialog.find(self.options.chainAjaxySelector).ajaxyDialog(self.options);
- }
-
- //Make any links marked dialog-close do so
- if ( self.options.closeDialogSelector ) {
- dialog.find(self.options.closeDialogSelector).unbind("click." + widgetName);
- dialog.find(self.options.closeDialogSelector).bind("click." + widgetName, function() {
- dialog.dialog("close");
- return false;
- });
- }
-
- dialog.dialog("open");
- }
- $("body").css("cursor", "auto");
- },
-
- _displayFailure: function(uri, xhr, serverMsg) {
- if ( this._trigger("error", 0, {uri:uri, xhr: xhr, serverMsg: serverMsg}) !== false) {
- var dialog = this.dialogContainer();
-
- dialog.html("<div class='ui-state-error' style='padding: 1em;'><p><span style='float: left; margin-right: 0.3em;' class='ui-icon ui-icon-alert'></span>Sorry, a software error has occured.</p><p>" + uri + ": " + xhr.status + " " + serverMsg+"</p></div>");
- dialog.dialog("option", "title", "Sorry, an error has occured.");
- dialog.dialog("option", "buttons", {"OK": function() { dialog.dialog("close"); }});
- dialog.dialog("open");
- }
- $("body").css("cursor", "auto");
- },
-
- // The DOM element which has a ui dialog() called on it.
- // Right now we insist upon modal dialogs, and re-use the same
- // <div>.dialog() for all of them. It's lazily created here.
- // If client calls dialog("destroy") on it, no problem, it'll
- // be lazily created if it's needed again.
- dialogContainer: function() {
- var existing = $("#reusableModalDialog");
- if ( existing.size() > 0) {
- return existing.first();
- }
- else {
- //single shared element for modal dialogs
- var requestDialog = $('<div id="reusableModalDialog" style="display:none"></div>').appendTo('body').
- dialog({autoOpen: false});
- return requestDialog;
- }
- }
-
- });
- }(jQuery));
-
View
965 public/javascripts/controls.js
@@ -1,965 +0,0 @@
-// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
-
-// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
-// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
-// Contributors:
-// Richard Livsey
-// Rahul Bhargava
-// Rob Wills
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-// Autocompleter.Base handles all the autocompletion functionality
-// that's independent of the data source for autocompletion. This
-// includes drawing the autocompletion menu, observing keyboard
-// and mouse events, and similar.
-//
-// Specific autocompleters need to provide, at the very least,
-// a getUpdatedChoices function that will be invoked every time
-// the text inside the monitored textbox changes. This method
-// should get the text for which to provide autocompletion by
-// invoking this.getToken(), NOT by directly accessing
-// this.element.value. This is to allow incremental tokenized
-// autocompletion. Specific auto-completion logic (AJAX, etc)
-// belongs in getUpdatedChoices.
-//
-// Tokenized incremental autocompletion is enabled automatically
-// when an autocompleter is instantiated with the 'tokens' option
-// in the options parameter, e.g.:
-// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
-// will incrementally autocomplete with a comma as the token.
-// Additionally, ',' in the above example can be replaced with
-// a token array, e.g. { tokens: [',', '\n'] } which
-// enables autocompletion on multiple tokens. This is most
-// useful when one of the tokens is \n (a newline), as it
-// allows smart autocompletion after linebreaks.
-
-if(typeof Effect == 'undefined')
- throw("controls.js requires including script.aculo.us' effects.js library");
-
-var Autocompleter = { };
-Autocompleter.Base = Class.create({
- baseInitialize: function(element, update, options) {
- element = $(element);
- this.element = element;
- this.update = $(update);
- this.hasFocus = false;
- this.changed = false;
- this.active = false;
- this.index = 0;
- this.entryCount = 0;
- this.oldElementValue = this.element.value;
-
- if(this.setOptions)
- this.setOptions(options);
- else
- this.options = options || { };
-
- this.options.paramName = this.options.paramName || this.element.name;
- this.options.tokens = this.options.tokens || [];
- this.options.frequency = this.options.frequency || 0.4;
- this.options.minChars = this.options.minChars || 1;
- this.options.onShow = this.options.onShow ||
- function(element, update){
- if(!update.style.position || update.style.position=='absolute') {
- update.style.position = 'absolute';
- Position.clone(element, update, {
- setHeight: false,
- offsetTop: element.offsetHeight
- });
- }
- Effect.Appear(update,{duration:0.15});
- };
- this.options.onHide = this.options.onHide ||
- function(element, update){ new Effect.Fade(update,{duration:0.15}) };
-
- if(typeof(this.options.tokens) == 'string')
- this.options.tokens = new Array(this.options.tokens);
- // Force carriage returns as token delimiters anyway
- if (!this.options.tokens.include('\n'))
- this.options.tokens.push('\n');
-
- this.observer = null;
-
- this.element.setAttribute('autocomplete','off');
-
- Element.hide(this.update);
-
- Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
- Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
- },
-
- show: function() {
- if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
- if(!this.iefix &&
- (Prototype.Browser.IE) &&
- (Element.getStyle(this.update, 'position')=='absolute')) {
- new Insertion.After(this.update,
- '<iframe id="' + this.update.id + '_iefix" '+
- 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
- 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
- this.iefix = $(this.update.id+'_iefix');
- }
- if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
- },
-
- fixIEOverlapping: function() {
- Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
- this.iefix.style.zIndex = 1;
- this.update.style.zIndex = 2;
- Element.show(this.iefix);
- },
-
- hide: function() {
- this.stopIndicator();
- if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
- if(this.iefix) Element.hide(this.iefix);
- },
-
- startIndicator: function() {
- if(this.options.indicator) Element.show(this.options.indicator);
- },
-
- stopIndicator: function() {
- if(this.options.indicator) Element.hide(this.options.indicator);
- },
-
- onKeyPress: function(event) {
- if(this.active)
- switch(event.keyCode) {
- case Event.KEY_TAB:
- case Event.KEY_RETURN:
- this.selectEntry();
- Event.stop(event);
- case Event.KEY_ESC:
- this.hide();
- this.active = false;
- Event.stop(event);
- return;
- case Event.KEY_LEFT:
- case Event.KEY_RIGHT:
- return;
- case Event.KEY_UP:
- this.markPrevious();
- this.render();
- Event.stop(event);
- return;
- case Event.KEY_DOWN:
- this.markNext();
- this.render();
- Event.stop(event);
- return;
- }
- else
- if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
- (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
-
- this.changed = true;
- this.hasFocus = true;
-
- if(this.observer) clearTimeout(this.observer);
- this.observer =
- setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
- },
-
- activate: function() {
- this.changed = false;
- this.hasFocus = true;
- this.getUpdatedChoices();
- },
-
- onHover: function(event) {
- var element = Event.findElement(event, 'LI');
- if(this.index != element.autocompleteIndex)
- {
- this.index = element.autocompleteIndex;
- this.render();
- }
- Event.stop(event);
- },
-
- onClick: function(event) {
- var element = Event.findElement(event, 'LI');
- this.index = element.autocompleteIndex;
- this.selectEntry();
- this.hide();
- },
-
- onBlur: function(event) {
- // needed to make click events working
- setTimeout(this.hide.bind(this), 250);
- this.hasFocus = false;
- this.active = false;
- },
-
- render: function() {
- if(this.entryCount > 0) {
- for (var i = 0; i < this.entryCount; i++)
- this.index==i ?
- Element.addClassName(this.getEntry(i),"selected") :
- Element.removeClassName(this.getEntry(i),"selected");
- if(this.hasFocus) {
- this.show();
- this.active = true;
- }
- } else {
- this.active = false;
- this.hide();
- }
- },
-
- markPrevious: function() {
- if(this.index > 0) this.index--;
- else this.index = this.entryCount-1;
- this.getEntry(this.index).scrollIntoView(true);
- },
-
- markNext: function() {
- if(this.index < this.entryCount-1) this.index++;
- else this.index = 0;
- this.getEntry(this.index).scrollIntoView(false);
- },
-
- getEntry: function(index) {
- return this.update.firstChild.childNodes[index];
- },
-
- getCurrentEntry: function() {
- return this.getEntry(this.index);
- },
-
- selectEntry: function() {
- this.active = false;
- this.updateElement(this.getCurrentEntry());
- },
-
- updateElement: function(selectedElement) {
- if (this.options.updateElement) {
- this.options.updateElement(selectedElement);
- return;
- }
- var value = '';
- if (this.options.select) {
- var nodes = $(selectedElement).select('.' + this.options.select) || [];
- if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
- } else
- value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
-
- var bounds = this.getTokenBounds();
- if (bounds[0] != -1) {
- var newValue = this.element.value.substr(0, bounds[0]);
- var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
- if (whitespace)
- newValue += whitespace[0];
- this.element.value = newValue + value + this.element.value.substr(bounds[1]);
- } else {
- this.element.value = value;
- }
- this.oldElementValue = this.element.value;
- this.element.focus();
-
- if (this.options.afterUpdateElement)
- this.options.afterUpdateElement(this.element, selectedElement);
- },
-
- updateChoices: function(choices) {
- if(!this.changed && this.hasFocus) {
- this.update.innerHTML = choices;
- Element.cleanWhitespace(this.update);
- Element.cleanWhitespace(this.update.down());
-
- if(this.update.firstChild && this.update.down().childNodes) {
- this.entryCount =
- this.update.down().childNodes.length;
- for (var i = 0; i < this.entryCount; i++) {
- var entry = this.getEntry(i);
- entry.autocompleteIndex = i;
- this.addObservers(entry);
- }
- } else {
- this.entryCount = 0;
- }
-
- this.stopIndicator();
- this.index = 0;
-
- if(this.entryCount==1 && this.options.autoSelect) {
- this.selectEntry();
- this.hide();
- } else {
- this.render();
- }
- }
- },
-
- addObservers: function(element) {
- Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
- Event.observe(element, "click", this.onClick.bindAsEventListener(this));
- },
-
- onObserverEvent: function() {
- this.changed = false;
- this.tokenBounds = null;
- if(this.getToken().length>=this.options.minChars) {
- this.getUpdatedChoices();
- } else {
- this.active = false;
- this.hide();
- }
- this.oldElementValue = this.element.value;
- },
-
- getToken: function() {
- var bounds = this.getTokenBounds();
- return this.element.value.substring(bounds[0], bounds[1]).strip();
- },
-
- getTokenBounds: function() {
- if (null != this.tokenBounds) return this.tokenBounds;
- var value = this.element.value;
- if (value.strip().empty()) return [-1, 0];
- var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
- var offset = (diff == this.oldElementValue.length ? 1 : 0);
- var prevTokenPos = -1, nextTokenPos = value.length;
- var tp;
- for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
- tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
- if (tp > prevTokenPos) prevTokenPos = tp;
- tp = value.indexOf(this.options.tokens[index], diff + offset);
- if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
- }
- return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
- }
-});
-
-Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
- var boundary = Math.min(newS.length, oldS.length);
- for (var index = 0; index < boundary; ++index)
- if (newS[index] != oldS[index])
- return index;
- return boundary;
-};
-
-Ajax.Autocompleter = Class.create(Autocompleter.Base, {
- initialize: function(element, update, url, options) {
- this.baseInitialize(element, update, options);
- this.options.asynchronous = true;
- this.options.onComplete = this.onComplete.bind(this);
- this.options.defaultParams = this.options.parameters || null;
- this.url = url;
- },
-
- getUpdatedChoices: function() {
- this.startIndicator();
-
- var entry = encodeURIComponent(this.options.paramName) + '=' +
- encodeURIComponent(this.getToken());
-
- this.options.parameters = this.options.callback ?
- this.options.callback(this.element, entry) : entry;
-
- if(this.options.defaultParams)
- this.options.parameters += '&' + this.options.defaultParams;
-
- new Ajax.Request(this.url, this.options);
- },
-
- onComplete: function(request) {
- this.updateChoices(request.responseText);
- }
-});
-