sequenceserver 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
data/views/search.erb CHANGED
@@ -10,10 +10,10 @@
10
10
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
11
11
  <script type="text/javascript" src="<%= uri('/js/store.min.js') %>"></script>
12
12
  <script type="text/javascript" src="<%= uri('/js/jquery.js') %>"></script>
13
- <script type="text/javascript" src="<%= uri('/js/jquery.ui.js') %>"></script>
13
+ <script type="text/javascript" src="<%= uri('/js/jquery-ui.js') %>"></script>
14
14
  <script type="text/javascript" src="<%= uri('/js/jquery.enablePlaceholder.min.js') %>"></script>
15
15
  <script type="text/javascript" src="<%= uri('/js/jquery.activity.js') %>"></script>
16
- <script type="text/javascript" src="<%= uri('/js/jquery.scrollspy.js') %>"></script>
16
+ <script type="text/javascript" src="<%= uri('/js/jquery-scrollspy.js') %>"></script>
17
17
  <script type="text/javascript" src="<%= uri('/js/bootstrap.transition.js') %>"></script>
18
18
  <script type="text/javascript" src="<%= uri('/js/bootstrap.dropdown.js') %>"></script>
19
19
  <script type="text/javascript" src="<%= uri('/js/bootstrap.modal.js') %>"></script>
@@ -151,7 +151,7 @@
151
151
  </div>
152
152
 
153
153
  <div class="results hide">
154
- <div id="result">
154
+ <div id="result">Waiting for BLAST to be run <!-- need bit before for UI testing so it knows when BLAST is finished -->
155
155
  </div>
156
156
  </div>
157
157
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequenceserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-03-29 00:00:00.000000000 Z
14
+ date: 2013-04-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -93,6 +93,54 @@ dependencies:
93
93
  - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: watir-webdriver
98
+ requirement: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: headless
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ - !ruby/object:Gem::Dependency
129
+ name: rspec
130
+ requirement: !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
96
144
  description: ! 'SequenceServer lets you rapidly set up a BLAST+ server with an intuitive
97
145
  user interface for use locally or over the web.
98
146
 
@@ -121,9 +169,8 @@ files:
121
169
  - public/js/bootstrap.modal.js
122
170
  - public/js/bootstrap.dropdown.js
123
171
  - public/js/bootstrap.transition.js
124
- - public/js/jquery.ui.js
125
- - public/js/Scribl.min.js
126
- - public/js/jquery.scrollspy.js
172
+ - public/js/jquery-scrollspy.js
173
+ - public/js/jquery-ui.js
127
174
  - public/js/sequenceserver.blast.js
128
175
  - public/js/store.min.js
129
176
  - public/js/sequenceserver.js~
@@ -170,7 +217,9 @@ files:
170
217
  - tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.phr
171
218
  - tests/run
172
219
  - tests/test_sequenceserver_blast.rb
220
+ - tests/test_ui.rb
173
221
  - tests/ui.specs.todo
222
+ - tests/chromedriver.log
174
223
  - tests/test_sequencehelpers.rb
175
224
  - config.ru
176
225
  - example.config.yml
@@ -1,53 +0,0 @@
1
- (function(){var a=!1,b=/xyz/.test(function(){})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=!0;var g=new this;a=!1;for(var i in c)g[i]=typeof c[i]=="function"&&typeof e[i]=="function"&&b.test(c[i])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);this._super=c;return d}}(i,c[i]):c[i];d.prototype=g;d.constructor=d;d.extend=arguments.callee;return d}})();var Scribl=Class.extend({init:function(a,b){this.scrolled=!1;var c=a.getContext("2d");this.width=b;this.laneSizes=50;this.laneBuffer=5;this.trackBuffer=25;this.offset=void 0;this.canvas=a;this.ctx=c;this.scale={};this.scale.pretty=!0;this.scale.max=void 0;this.scale.min=void 0;this.scale.auto=!0;this.scale.off=!1;this.scale.size=15;this.scale.font={};this.scale.font.size=15;this.scale.font.color="black";this.scale.font.buffer=10;this.glyph={};this.glyph.roundness=6;this.glyph.borderWidth=1;this.glyph.color=
2
- ["#99CCFF","rgb(63, 128, 205)"];this.glyph.text={};this.glyph.text.color="black";this.glyph.text.size="13";this.glyph.text.font="arial";this.glyph.text.align="center";this.gene={};this.gene.text={};this.protein={};this.protein.text={};this.events={};this.events.hasClick=!1;this.events.hasMouseover=!1;this.events.clicks=[];this.events.mouseovers=[];this.events.added=!1;this.tick={};this.tick.auto=!0;this.tick.major={};this.tick.major.size=10;this.tick.major.color="black";this.tick.minor={};this.tick.minor.size=
3
- 1;this.tick.minor.color="rgb(55,55,55)";this.tick.halfColor="rgb(10,10,10)";this.tooltips={};this.tooltips.text={};this.tooltips.text.font="arial";this.tooltips.text.size=12;this.tooltips.borderWidth=1;this.tooltips.roundness=5;this.tooltips.fade=!1;this.tooltips.style="light";this.scrollable=!1;this.scrollValues=[0,void 0];this.drawStyle="expand";this.myMouseEventHandler=new MouseEventHandler(this);this.tracks=[]},getScaleHeight:function(){return this.scale.font.size+this.scale.size},getHeight:function(){var a=
4
- 0;this.scale.off||(a+=this.getScaleHeight());for(var b=this.tracks.length,c=0;c<b;c++)a+=this.trackBuffer,a+=this.tracks[c].getHeight();return a},addTrack:function(){var a=new Track(this.ctx);a.chart=this;if(this.tracks.length==1&&this.tracks[0]==void 0)this.tracks=[];this.tracks.push(a);return a},loadGenbank:function(a){genbank(a,this)},loadBed:function(a){bed(a,this)},loadFeatures:function(a){for(var b=0;b<a.length;b++)this.addFeature(a[b])},addGene:function(a,b,c,d){return this.addFeature(new BlockArrow("gene",
5
- a,b,c,d))},addProtein:function(a,b,c,d){return this.addFeature(new BlockArrow("protein",a,b,c,d))},addFeature:function(a){(this.tracks[0]||this.addTrack()).addFeature(a);return a},slice:function(a,b,c){c=c||"inclusive";for(var d=this.tracks.length,e=new Scribl(this.canvas,this.width),g=0;g<d;g++){var i=this.tracks[g],k=e.addTrack();k.drawStyle=i.drawStyle;for(var j=i.lanes.length,m=0;m<j;m++){newLane=k.addLane();for(var l=i.lanes[m].features,n=0;n<l.length;n++){var o=l[n].position+l[n].length,p=l[n].position;
6
- if(c=="inclusive")p>=a&&p<=b?newLane.addFeature(l[n]):o>a&&o<b?newLane.addFeature(l[n]):p<a&&o>b?newLane.addFeature(l[n]):p>a&&o<b&&newLane.addFeature(l[n]);else if(c=="strict")if(p>=a&&p<=b)if(o>a&&o<b)newLane.addFeature(l[n]);else{var q=l[n].clone();q.length=Math.abs(b-p);newLane.addFeature(q)}else if(o>a&&o<b)q=l[n].clone(),q.position=a,q.length=Math.abs(o-a),newLane.addFeature(q);else{if(p<a&&o>b)q=l[n].clone(),q.position=a,q.length=Math.abs(b-a),newLane.addFeature(q)}else c=="exclusive"&&p>=
7
- a&&p<=b&&o>a&&o<b&&newLane.addFeature(l[n])}}}e.laneSizes=this.laneSizes;e.drawStyle=this.drawStyle;e.loadFeatures([]);return e},draw:function(){var a=this.ctx,b=this.tracks;this.scrollable==!0&&this.initScrollable();a.save();if(this.scale.pretty){if(this.tick.auto)this.tick.major.size=this.determineMajorTick(),this.tick.minor.size=Math.round(this.tick.major.size/10);if(this.scale.auto)this.scale.min-=this.scale.min%this.tick.major.size,this.scale.max=Math.round(this.scale.max/this.tick.major.size+
8
- 0.4)*this.tick.major.size}this.offset=this.scale.min.offset?a.measureText(this.getTickText(this.scale.min)).width/2+10:a.measureText("0").width/2+10;a.save();if(!this.scale.off){var c=a.fillStyle;this.drawScale();a.fillStyle=c}a.save();this.scale.off||a.translate(0,this.getScaleHeight()+this.laneBuffer);for(c=0;c<b.length;c++)b[c].draw();a.restore();a.restore();a.restore();this.events.added||this.registerEventListeners()},redraw:function(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);
9
- this.tracks.length>0&&this.draw()},drawScale:function(){var a=this.ctx,b=this.scale.font.size+this.scale.size,c=this.scale.font.size+2,d=this.scale.font.size+this.scale.size*0.66,e=this.scale.font.size+this.scale.size*0.33;a.font=this.scale.font.size+"px arial";a.textBaseline="top";a.fillStyle=this.scale.font.color;for(var g=this.scale.min%this.tick.minor.size==0?this.scale.min:this.scale.min-this.scale.min%this.tick.minor.size+this.tick.minor.size;g<=this.scale.max;g+=this.tick.minor.size){a.beginPath();
10
- var i=this.pixelsToNts(g-this.scale.min)+this.offset;if(g%this.tick.major.size==0){var k=this.getTickText(g);a.textAlign="center";a.fillText(k,i,0);a.moveTo(i,b);a.lineTo(i,c);a.strokeStyle=this.tick.major.color}else a.moveTo(i,b),g%(this.tick.major.size/2)==0?(a.strokeStyle=this.tick.halfColor,a.lineTo(i,e)):(a.strokeStyle=this.tick.minor.color,a.lineTo(i,d));a.stroke()}},pixelsToNts:function(a){return a==void 0?this.width/(this.scale.max-this.scale.min):this.width/(this.scale.max-this.scale.min)*
11
- a},ntsToPixels:function(a){return a==void 0?1/this.pixelsToNts():a/this.width},initScrollable:function(){var a;if(!this.scrolled){a=document.createElement("div");var b=document.createElement("div"),c=document.createElement("div");c.id="scribl-zoom-slider";c.className="slider";c.style.cssFloat="left";c.style.height=new String(this.canvas.height*0.5)+"px";c.style.margin="30px auto auto -20px";a.style.cssText=this.canvas.style.cssText;this.canvas.style.cssText="";parentWidth=parseInt(this.canvas.width)+
12
- 25;a.style.width=parentWidth+"px";b.style.width=this.canvas.width+"px";b.style.overflow="auto";b.id="scroll-wrapper";this.canvas.parentNode.replaceChild(a,this.canvas);a.appendChild(c);b.appendChild(this.canvas);a.appendChild(b);$(b).dragscrollable({dragSelector:"canvas:first",acceptPropagatedEvent:!1})}b=this.scale.max-this.scale.min;var d=this.scrollValues[1]||this.scale.max-b*0.35;a=this.scrollValues[0]!=void 0?this.scrollValues[0]:this.scale.max+b*0.35;var e=(d-a)/document.getElementById("scroll-wrapper").style.width.split("px")[0];
13
- e=b/e;this.canvas.width=e;this.width=e-30;schart=this;d=(d-a)/(this.scale.max-this.scale.min)*100;$(c).slider({orientation:"vertical",range:"min",min:1,max:100,value:d,slide:function(a,b){var c=schart.scale.max-schart.scale.min,d=b.value/100*schart.canvas.width,e=document.getElementById("scroll-wrapper");e=e.scrollLeft+parseInt(e.style.width.split("px")[0])/2;schart.scrollValues=[(e-d/2)/schart.canvas.width*c,(e+d/2)/schart.canvas.width*c];schart.ctx.clearRect(0,0,schart.canvas.width,schart.canvas.height);
14
- schart.draw()}});c=(a-this.scale.min)/b*this.canvas.width;document.getElementById("scroll-wrapper").scrollLeft=c;this.scrolled=!0},determineMajorTick:function(){this.ctx.font=this.scale.font.size+"px arial";var a=(this.scale.max-this.scale.min)/(this.width/(this.ctx.measureText(this.getTickTextDecimalPlaces(this.scale.max)).width+this.scale.font.buffer)),b=Math.pow(10,parseInt(a).toString().length-1);this.tick.major.size=Math.ceil(a/b)*b;a=Math.pow(10,(this.tick.major.size+"").length);b=this.tick.major.size/
15
- a;b>0.1&&b<=0.5?b=0.5:b>0.5&&(b=1);return b*a},getTickText:function(a){if(!this.tick.auto)return a;var b=a;a>=1E6?(a=Math.pow(10,5),b=Math.round(b/1E6*a)/a+"m"):a>=1E3&&(a=Math.pow(10,2),b=Math.round(b/1E3*a)/a+"k");return b},getTickTextDecimalPlaces:function(a){if(!this.tick.auto)return a;var b=a;a>=1E6?b=Math.round(b/(1E6/Math.pow(10,5)))+"m":a>=1E3&&(b=Math.round(b/(1E3/Math.pow(10,2)))+"k");return b},handleMouseEvent:function(a,b){this.myMouseEventHandler.setMousePosition(a);for(var c=this.myMouseEventHandler.mouseY,
16
- d,e=0;e<this.tracks.length;e++)for(var g=0;g<this.tracks[e].lanes.length;g++){var i=this.tracks[e].lanes[g].getPixelPositionY(),k=i+this.tracks[e].lanes[g].getHeight();if(c>=i&&c<=k){d=this.tracks[e].lanes[g];break}}if(d){this.ctx.save();d.erase();this.ctx.translate(0,d.getPixelPositionY());d.draw();(e=this.LastToolTip)&&this.ctx.putImageData(e.pixels,e.x,e.y);this.ctx.restore();c=b=="click"?this.events.clicks:this.events.mouseovers;for(e=0;e<c.length;e++)c[e](this);this.myMouseEventHandler.reset(this)}},
17
- addClickEventListener:function(a){this.events.clicks.push(a)},addMouseoverEventListener:function(a){this.events.mouseovers.push(a)},registerEventListeners:function(){var a=this;this.events.mouseovers.length>0&&this.canvas.addEventListener("mousemove",function(b){a.handleMouseEvent(b,"mouseover")},!1);this.events.clicks.length>0&&this.canvas.addEventListener("click",function(b){a.handleMouseEvent(b,"click")},!1);this.events.added=!0}});var Track=Class.extend({init:function(a){this.lanes=[];this.ctx=a;this.uid=_uniqueId("track");this.drawStyle=void 0;this.coverageData=[];this.maxDepth=0},addLane:function(){var a=new Lane(this.ctx,this);this.lanes.push(a);return a},addGene:function(a,b,c,d){return this.addFeature(new BlockArrow("gene",a,b,c,d))},addProtein:function(a,b,c,d){return this.addFeature(new BlockArrow("protein",a,b,c,d))},addFeature:function(a){for(var b,c=!0,d=0;d<this.lanes.length;d++){var e=this.lanes[d].features[this.lanes[d].features.length-
18
- 1];if(e!=void 0&&a.position-3/this.chart.pixelsToNts()>e.position+e.length){c=!1;b=this.lanes[d];break}}c&&(b=this.addLane());b.addFeature(a);return a},getDrawStyle:function(){return this.drawStyle?this.drawStyle:this.chart.drawStyle},getHeight:function(){var a=0,b=this.lanes.length,c=this.chart.laneBuffer,d=this.getDrawStyle();if(d=="line"||d=="collapse")b=1;for(d=0;d<b;d++)a+=c,a+=this.lanes[d].getHeight();a-=c;return a},getPixelPositionY:function(){for(var a=this.chart.getScaleHeight()+this.chart.laneBuffer,
19
- b=0;b<this.chart.tracks.length;b++){if(this.uid==this.chart.tracks[b].uid)break;a+=this.chart.trackBuffer;a+=this.chart.tracks[b].getHeight()}return a},calcCoverageData:function(){for(var a=this.lanes,b=0;b<a.length;b++)for(var c=0;c<a[b].features.length;c++){var d=a[b].features[c],e=Math.round(d.getPixelPositionX());for(d=Math.round(e+d.getPixelLength());e<=d;e++)this.coverageData[e]=this.coverageData[e]+1||1,this.maxDepth=Math.max(this.coverageData[e],this.maxDepth)}},erase:function(){this.chart.ctx.clearRect(0,
20
- this.getPixelPositionY(),this.chart.width,this.getHeight())},draw:function(){var a=this.getDrawStyle(),b=this.chart.laneSizes,c=this.lanes,d=this.chart.laneBuffer,e=this.chart.trackBuffer,g=b+e,i=this.ctx;if(a==void 0||a=="expand")for(a=0;a<c.length;a++)c[a].y=g,c[a].draw(),b=c[a].getHeight(),i.translate(0,b+d),g=g+b+d;else if(a=="collapse"){b=[];for(a=0;a<c.length;a++)b=b.concat(c[a].features);b.sort(function(a,b){return a.position-b.position});for(g=0;g<b.length;g++){a=b[g].length;var k=b[g].name,
21
- j=void 0;for(j=g+1;j<b.length;j++)if(b[g].getEnd()>=b[j].position)b[g].length=Math.max(b[g].getEnd(),b[j].getEnd())-b[g].position,b[g].name="";else break;b[g].draw();b[g].length=a;b[g].name=k;g=j-1}i.translate(0,c[0].getHeight()+d)}else if(a=="line"){this.coverageData.length==0&&this.calcCoverageData();g=this.maxDepth;i.beginPath();for(a=this.chart.offset;a<=this.chart.width+this.chart.offset;a++)k=this.coverageData[a]/g*b||0,k=b-k,i.lineTo(a,k);i.lineTo(this.chart.width+this.chart.offset,b);i.stroke();
22
- i.translate(0,c[0].getHeight()+d)}i.translate(0,e-d)}});var Lane=Class.extend({init:function(a,b){this.height=void 0;this.features=[];this.ctx=a;this.track=b;this.chart=b.chart;this.uid=_uniqueId("lane")},addGene:function(a,b,c,d){return this.addFeature(new BlockArrow("gene",a,b,c,d))},addProtein:function(a,b,c,d){return this.addFeature(new BlockArrow("protein",a,b,c,d))},addFeature:function(a){a.lane=this;this.features.push(a);this.chart[a.type]||(this.chart[a.type]={text:{}});if(a.length+a.position>this.chart.scale.max||this.chart.scale.max==void 0)this.chart.scale.max=
23
- a.length+a.position;if(a.position<this.chart.scale.min||this.chart.scale.min==void 0)this.chart.scale.min=a.position;return a},loadFeatures:function(a){for(var b=a.length,c=0;c<b;c++)this.addFeature(a[c])},getHeight:function(){return this.height!=void 0?this.height:this.chart.laneSizes},getPixelPositionY:function(){for(var a=this.track.getPixelPositionY(),b=this.getHeight(),c=0;c<this.track.lanes.length;c++){if(this.uid==this.track.lanes[c].uid)break;a+=this.track.chart.laneBuffer;a+=b}return a},
24
- erase:function(){this.chart.ctx.clearRect(0,this.getPixelPositionY(),this.track.chart.width,this.getHeight())},draw:function(){for(var a=0;a<this.features.length;a++)this.features[a].draw()}});var tooltips=Class.extend({init:function(a){this.chart=a;this.ctx=a.ctx},fire:function(a){var b=this.ctx.globalAlpha;this.chart.tooltips.fade?h=1:this.draw(a,1);this.ctx.globalAlpha=b},draw:function(a,b){this.ctx.globalAlpha=b;var c=this.chart.tooltips.roundness,d=this.chart.tooltips.text.font,e=this.chart.tooltips.text.size;this.ctx.save();this.ctx.font=e+"px "+d;d=this.ctx.measureText(a.onMouseover);var g=[a.onMouseover],i=e+10,k=d.width+10,j=i-4,m,l;d=a.getPixelPositionX()+10;j=a.getPixelPositionY()-
25
- j;a.getPixelLength();if(k>200)g=this.ctx.measureText("s").width,g=parseInt(200/g),g=ScriblWrapLines(g,a.onMouseover),k=210,i=g[1]*e+10,g=g[0];k+d>this.chart.width&&(d=this.chart.width-k);if(this.chart.tooltips.style=="light")m=this.chart.ctx.createLinearGradient(d+k/2,j,d+k/2,j+i),m.addColorStop(0,"rgb(253, 248, 196)"),m.addColorStop(0.75,"rgb(253, 248, 196)"),m.addColorStop(1,"white"),l=this.chart.ctx.createLinearGradient(d+k/2,j,d+k/2,j+i),l.addColorStop(0,"black"),l.addColorStop(1,"rgb(64, 64, 64)"),
26
- this.chart.tooltips.text.color="black";else if(this.chart.tooltips.style=="dark")m=this.chart.ctx.createLinearGradient(d+k/2,j,d+k/2,j+i),m.addColorStop(0,"rgb(64, 64, 64)"),m.addColorStop(1,"rgb(121, 121, 121)"),l="white",this.chart.tooltips.text.color="white";this.chart.LastToolTip={pixels:this.ctx.getImageData(d-1,j-1,k+2,i+2),x:d-1,y:j-1};this.ctx.fillStyle=m;this.ctx.beginPath();tlc_ctrl_x=d;tlc_ctrl_y=j;tlc_lgth_x=d+c;tlc_lgth_y=j;tlc_wdth_x=d;tlc_wdth_y=j+c;blc_ctrl_x=d;blc_ctrl_y=j+i;blc_lgth_x=
27
- d+c;blc_lgth_y=j+i;blc_wdth_x=d;blc_wdth_y=j+i-c;brc_ctrl_x=d+k;brc_ctrl_y=j+i;brc_lgth_x=d+k-c;brc_lgth_y=j+i;brc_wdth_x=d+k;brc_wdth_y=j+i-c;trc_ctrl_x=d+k;trc_ctrl_y=j;trc_lgth_x=d+k-c;trc_lgth_y=j;trc_wdth_x=d+k;trc_wdth_y=j+c;this.ctx.moveTo(tlc_lgth_x,tlc_lgth_y);this.ctx.quadraticCurveTo(tlc_ctrl_x,tlc_ctrl_y,tlc_wdth_x,tlc_wdth_y);this.ctx.lineTo(blc_wdth_x,blc_wdth_y);this.ctx.quadraticCurveTo(blc_ctrl_x,blc_ctrl_y,blc_lgth_x,blc_lgth_y);this.ctx.lineTo(brc_lgth_x,brc_lgth_y);this.ctx.quadraticCurveTo(brc_ctrl_x,
28
- brc_ctrl_y,brc_wdth_x,brc_wdth_y);this.ctx.lineTo(trc_wdth_x,trc_wdth_y);this.ctx.quadraticCurveTo(trc_ctrl_x,trc_ctrl_y,trc_lgth_x,trc_lgth_y);this.ctx.lineTo(tlc_lgth_x,tlc_lgth_y);this.ctx.fill();this.ctx.lineWidth=this.chart.tooltips.borderWidth;this.ctx.strokeStyle=l;this.ctx.stroke();this.ctx.textBaseline="middle";this.ctx.fillStyle=this.chart.tooltips.text.color;for(c=0;c<g.length;c++)this.ctx.measureText(g[c]),this.ctx.fillText(g[c],d+5,j+e*(c+1));this.ctx.restore()}});var MouseEventHandler=Class.extend({init:function(a){this.chart=a;this.mouseY=this.mouseX=null;this.eventElement=void 0;this.isEventDetected=!1;this.tooltip=new tooltips(this.chart)},addEvents:function(a){var b=this.chart,c=b.ctx,d=b.myMouseEventHandler;if(a.onMouseover&&!b.events.hasMouseover)b.addMouseoverEventListener(b.myMouseEventHandler.handleMouseover),b.events.hasMouseover=!0;else if(a.parent&&a.parent.onMouseover&&!b.events.hasMouseover)b.addMouseoverEventListener(b.myMouseEventHandler.handleMouseover),
29
- b.events.hasMouseover=!0;if(a.onClick&&!b.events.hasClick)b.addClickEventListener(b.myMouseEventHandler.handleClick),b.addMouseoverEventListener(b.myMouseEventHandler.handleMouseStyle),b.events.hasClick=!0;else if(a.parent&&a.parent.onClick&&!b.events.hasClick)b.addClickEventListener(b.myMouseEventHandler.handleClick),b.addMouseoverEventListener(b.myMouseEventHandler.handleMouseStyle),b.events.hasClick=!0;if(!d.isEventDetected&&c.isPointInPath_mozilla(d.mouseX,d.mouseY))d.eventElement=a,d.isEventDetected=
30
- !0},setMousePosition:function(a){if(a!=null){var b=this.chart.canvas.getBoundingClientRect();this.mouseX=a.clientX-b.left;this.mouseY=a.clientY-b.top}},handleClick:function(a){a=a.myMouseEventHandler.eventElement;var b;if(a!=void 0&&a.onClick!=void 0)b=a.onClick;else if(a&&a.parent&&a.parent.onClick)b=a.parent.onClick;b&&(typeof b=="string"?window.open(b):typeof b=="function"&&b(a))},setMousePosition:function(a){if(a!=null){var b=this.chart.canvas.getBoundingClientRect();this.mouseX=a.clientX-b.left;
31
- this.mouseY=a.clientY-b.top}},handleClick:function(a){a=a.myMouseEventHandler.eventElement;var b;if(a!=void 0&&a.onClick!=void 0)b=a.onClick;else if(a&&a.parent&&a.parent.onClick)b=a.parent.onClick;b&&(typeof b=="string"?window.open(b):typeof b=="function"&&b(a))},handleMouseover:function(a){a=a.myMouseEventHandler;var b=a.eventElement;if(b!=void 0&&b.onMouseover!=void 0)a.tooltip.fire(b);else if(b&&b.parent&&b.parent.onMouseover)b.onMouseover=b.parent.onMouseover,a.tooltip.fire(b)},handleMouseStyle:function(a){var b=
32
- a.myMouseEventHandler.eventElement;a.ctx.canvas.style.cursor=b&&b.onClick!=void 0?"pointer":b&&b.parent&&b.parent.onClick!=void 0?"pointer":"auto"},reset:function(a){a=a.myMouseEventHandler;a.mouseX=null;a.mouseY=null;a.eventElement=void 0;a.isEventDetected=null;a.elementIndexCounter=0}});
33
- CanvasRenderingContext2D.prototype.isPointInPath_mozilla=function(a,b){if(navigator.userAgent.indexOf("Firefox")!=-1){this.save();this.setTransform(1,0,0,1,0,0);var c=this.isPointInPath(a,b);this.restore()}else c=this.isPointInPath(a,b);return c};function ScriblWrapLines(a,b){for(var c=[],d="",e=0,g=(""+b).split(" "),i=0;i<g.length;i++)g[i].length+d.length<=a?d+=" "+g[i]:d==""?(trunc1=g[i].slice(0,a-1),d+=" "+trunc1+"-",trunc2=g[i].slice(a,g[i].length),g.splice(i+1,0,trunc2),c.push(d),d="",e++):(i--,c.push(d),e++,d="");e++;c.push(d);return[c,e]}var idCounter=0;_uniqueId=function(a){var b=idCounter++;return a?a+b:b};var CanvasToSVG={idCounter:0,convert:function(a,b,c,d){var e=a.toDataURL(),g=document.createElementNS("http://www.w3.org/2000/svg","image");g.setAttribute("id","importedCanvas_"+this.idCounter++);g.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e);g.setAttribute("x",c?c:0);g.setAttribute("y",d?d:0);g.setAttribute("width",a.width);g.setAttribute("height",a.height);g.imageData=a.toDataURL();b.appendChild(g)}},toXml=function(a){return $("<p/>").text(a).html()},svgToString=function(a){for(;removeUnusedDefElems()>
34
- 0;);pathActions.clear(!0);$.each(a.childNodes,function(b,c){b&&c.nodeType==8&&c.data.indexOf("Created with")>=0&&a.insertBefore(c,a.firstChild)});current_group&&(leaveContext(),selectOnly([current_group]));var b=[];$(a).find("g:data(gsvg)").each(function(){for(var a=this.attributes,c=a.length,g=0;g<c;g++)(a[g].nodeName=="id"||a[g].nodeName=="style")&&c--;if(c<=0)a=this.firstChild,b.push(a),$(this).replaceWith(a)});var c=svgToString(a,0);b.length&&$(b).each(function(){groupSvgElem(this)});return c};
35
- svgToString=function(a,b){var c=[];if(a){var d=a.attributes,e,g,i=a.childNodes;for(g=0;g<b;g++)c.push(" ");c.push("<");c.push(a.nodeName);if(a.id=="svgcontent"){g=getResolution();c.push(' width="'+g.w+'" height="'+g.h+'" xmlns="'+svgns+'"');var k={};$(a).find("*").andSelf().each(function(){$.each(this.attributes,function(a,b){var d=b.namespaceURI;d&&!k[d]&&nsMap[d]!=="xmlns"&&nsMap[d]!=="xml"&&(k[d]=!0,c.push(" xmlns:"+nsMap[d]+'="'+d+'"'))})});for(g=d.length;g--;){e=d.item(g);var j=toXml(e.nodeValue);
36
- if(e.nodeName.indexOf("xmlns:")!==0&&j!=""&&["width","height","xmlns","x","y","viewBox","id","overflow"].indexOf(e.localName)==-1&&(!e.namespaceURI||nsMap[e.namespaceURI]))c.push(" "),c.push(e.nodeName),c.push('="'),c.push(j),c.push('"')}}else for(g=d.length-1;g>=0;g--)e=d.item(g),j=toXml(e.nodeValue),!(["-moz-math-font-style","_moz-math-font-style"].indexOf(e.localName)>=0)&&j!=""&&j.indexOf("pointer-events")!==0&&!(e.localName==="class"&&j.indexOf("se_")===0)&&(c.push(" "),e.localName==="d"&&(j=
37
- pathActions.convertPath(a,!0)),c.push(e.nodeName),c.push('="'),c.push(j),c.push('"'));if(a.hasChildNodes()){c.push(">");b++;d=!1;for(g=0;g<i.length;g++)switch(e=i.item(g),e.nodeType){case 1:c.push("\n");c.push(svgToString(i.item(g),b));break;case 3:e=e.nodeValue.replace(/^\s+|\s+$/g,"");e!=""&&(d=!0,c.push(toXml(e)+""));break;case 8:c.push("\n"),c.push(Array(b+1).join(" ")),c.push("<\!--"),c.push(e.data),c.push("--\>")}b--;if(!d){c.push("\n");for(g=0;g<b;g++)c.push(" ")}c.push("</");c.push(a.nodeName);
38
- c.push(">")}else c.push("/>")}return c.join("")};var Glyph=Class.extend({init:function(a,b,c,d,e){this.uid=_uniqueId("feature");this.position=b;this.length=c;this.strand=d;this.type=a;this.name="";this.borderColor="none";this.borderWidth=void 0;this.text={};this.text.font=void 0;this.text.size=void 0;this.text.color=void 0;this.onMouseover=this.onClick=this.text.align=void 0;for(var g in e)this[g]=e[g]},setColorGradient:function(){if(arguments.length==1)this.color=arguments[0];else{for(var a=this.lane.ctx.createLinearGradient(this.length/2,0,this.length/
39
- 2,this.getHeight()),b,c=0;b=arguments[c],c<arguments.length;c++)a.addColorStop(c/(arguments.length-1),b);this.color=a}},getPixelLength:function(){return this.lane.chart.pixelsToNts(this.length)||1},getPixelPositionX:function(){var a=parseInt(this.lane.track.chart.offset)||0;return this.lane.chart.pixelsToNts(this.parent?this.position+this.parent.position-this.lane.track.chart.scale.min:this.position-this.lane.track.chart.scale.min)+a},getPixelPositionY:function(){return this.lane.getPixelPositionY()},
40
- getEnd:function(){return this.position+this.length},clone:function(){var a=this;return a=f.orientation?eval("new"+f.glyphType+"("+f.type+","+f.position+","+f.length+","+f.orientation):eval("new"+f.glyphType+"("+f.type+","+f.position+","+f.length)},getAttr:function(a){a=a.split("-");for(var b=this,c=0;c<a.length;c++)b=b[a[c]];if(b)return b;if(this.parent){b=this.parent;for(c=0;c<a.length;c++)b=b[a[c]];if(b)return b}if(b=this.lane.chart[this.type]){for(c=0;c<a.length;c++)b=b[a[c]];if(b)return b}b=this.lane.chart.glyph;
41
- for(c=0;c<a.length;c++)b=b[a[c]];if(b)return b},drawText:function(a){var b=this.lane.chart.ctx,c=this.getPixelLength(),d=this.getHeight(),e=this.getAttr("text-size"),g=this.getAttr("text-style");b.font=e+"px "+g;b.textBaseline="middle";b.fillStyle=this.getAttr("text-color");var i=void 0,k=this.getAttr("text-align");k=="start"?k=this.strand=="+"?"left":"right":k=="end"&&(k=this.strand=="+"?"right":"left");b.textAlign=k;k=="left"?i=5:k=="center"?i=c/2:k=="right"&&(i=c-5);var j=b.measureText(a);if(a&&
42
- a!=""){for(;c-j.width<4;)if(e=/^\d+/.exec(b.font),e--,j=b.measureText(a),b.font=e+"px "+g,e<=8){a="";break}this.glyphType=="Complex"&&(c=0,e=/^\d+/.exec(b.font),k=="center"&&(c=-(b.measureText(a).width/2+2.5)),b.clearRect(i+c,d/2-e/2,b.measureText(a).width+5,e));b.fillText(a,i,d/2)}},calcRoundness:function(){return this.getHeight()*this.getAttr("roundness")/100},isContainedWithinRect:function(a,b,c,d){var e=this.getPixelPositionY(),g=this.getPixelPositionX(),i=this.getPixelPositionX()+this.getPixelLength(),
43
- k=e+this.getHeight();return g>=a&&i<=c&&e>=b&&k<=d},getHeight:function(){return this.lane.getHeight()},getFillStyle:function(){var a=this.getAttr("color");if(a instanceof Array){for(var b=this.lane.ctx.createLinearGradient(this.length/2,0,this.length/2,this.getHeight()),c,d=0;c=a[d],d<a.length;d++)b.addColorStop(d/(a.length-1),c);return b}else return a},getStrokeStyle:function(){var a=this.getAttr("borderColor");if(typeof a=="object"){for(var b=this.lane.ctx.createLinearGradient(this.length/2,0,this.length/
44
- 2,this.getHeight()),c,d=0;c=a[d],d<a.length;d++)b.addColorStop(d/(a.length-1),c);return b}else return a},isSubFeature:function(){return this.parent!=void 0},erase:function(){this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(this.getPixelPositionX(),this.getPixelPositionY(),this.getPixelLength(),this.getHeight());this.ctx.restore()},draw:function(){this.ctx=this.lane.chart.ctx;this.ctx.beginPath();/^\d+/.exec(this.ctx.font);var a=/\S+$/.exec(this.ctx.font);this.onClick=this.getAttr("onClick");
45
- this.onMouseover=this.getAttr("onMouseover");this.ctx.fillStyle=this.getFillStyle();var b=this.ctx.fillStyle,c=this.getPixelPositionX(),d=this.getHeight();d<10?this.ctx.font="10px "+a:this.ctx.font=d*0.9+"px "+a;this.ctx.translate(c,0);this.strand=="-"&&!this.isSubFeature()&&this.ctx.transform(-1,0,0,1,this.getPixelLength(),0);this._draw();if(this.borderColor!="none")this.color=="none"&&this.parent.glyphType=="Complex"&&this.erase(),a=this.ctx.strokeStyle,d=this.ctx.lineWidth,this.ctx.strokeStyle=
46
- this.getStrokeStyle(),this.ctx.lineWidth=this.getAttr("borderWidth"),this.ctx.stroke(),this.ctx.strokeStyle=a,this.ctx.lineWidth=d;this.color!="none"&&this.ctx.fill();this.strand=="-"&&!this.isSubFeature()&&this.ctx.transform(-1,0,0,1,this.getPixelLength(),0);this.drawText(this.getAttr("name"));this.ctx.translate(-c,0);this.ctx.fillStyle=b;this.lane.chart.myMouseEventHandler.addEvents(this)}});var BlockArrow=Glyph.extend({init:function(a,b,c,d,e){this._super(a,b,c,d,e);this.slope=1;this.glyphType="BlockArrow"},_draw:function(a,b,c,d){a=a||this.ctx;b=b||this.getPixelLength();c=c||this.getHeight();d=d+1||this.calcRoundness();d!=void 0&&(d-=1);tc_ctrl_y=tc_ctrl_x=x=y=0;tc_lgth_x=x+d;tc_lgth_y=y;tc_wdth_x=x;tc_wdth_y=y+d;bc_ctrl_x=x;bc_ctrl_y=y+c;bc_lgth_x=x+d;bc_lgth_y=y+c;bc_wdth_x=x;bc_wdth_y=y+c-d;a_b_x=x+b-d;a_t_x=x+b-d;a_max_x=x+b;t=0.5;a_ctrl_x=(a_max_x-(1-t)*(1-t)*a_b_x-t*t*a_t_x)/
47
- (2*(1-t)*t);a_ctrl_y=y+c/2;bs_slope=this.slope;bs_intercept=-a_ctrl_y-bs_slope*a_ctrl_x;ts_slope=-this.slope;ts_intercept=-a_ctrl_y-ts_slope*a_ctrl_x;a_b_y=-(bs_slope*a_b_x+bs_intercept);a_t_y=-(ts_slope*a_t_x+ts_intercept);bs_ctrl_y=y+c;bs_ctrl_x=(-bs_ctrl_y-bs_intercept)/this.slope;bs_ctrl_x<x?(new Rect(this.type,0,b))._draw(a,b,c,d):(bs_lgth_y=y+c,bs_lgth_x=bs_ctrl_x-d,bs_slpe_x=bs_ctrl_x+d,bs_slpe_y=-(bs_slope*bs_slpe_x+bs_intercept),ts_ctrl_y=y,ts_ctrl_x=(ts_ctrl_y+ts_intercept)/this.slope,ts_lgth_y=
48
- y,ts_lgth_x=ts_ctrl_x-d,ts_slpe_x=ts_ctrl_x+d,ts_slpe_y=-(ts_slope*ts_slpe_x+ts_intercept),a.beginPath(),a.moveTo(tc_lgth_x,tc_lgth_y),a.quadraticCurveTo(tc_ctrl_x,tc_ctrl_y,tc_wdth_x,tc_wdth_y),a.lineTo(bc_wdth_x,bc_wdth_y),a.quadraticCurveTo(bc_ctrl_x,bc_ctrl_y,bc_lgth_x,bc_lgth_y),a.lineTo(bs_lgth_x,bs_lgth_y),a.quadraticCurveTo(bs_ctrl_x,bs_ctrl_y,bs_slpe_x,bs_slpe_y),a.lineTo(a_b_x,a_b_y),a.quadraticCurveTo(a_ctrl_x,a_ctrl_y,a_t_x,a_t_y),a.lineTo(ts_slpe_x,ts_slpe_y),a.quadraticCurveTo(ts_ctrl_x,
49
- ts_ctrl_y,ts_lgth_x,ts_lgth_y),a.lineTo(tc_lgth_x,tc_lgth_y))}});var Rect=Glyph.extend({init:function(a,b,c,d){this._super(a,b,c,"+",d);this.glyphType="Rect"},_draw:function(a,b,c,d){a=a||this.ctx;b=b||this.getPixelLength();c=c||this.getHeight();d=d+1||this.calcRoundness();d!=void 0&&(d-=1);x=y=0;a.beginPath();tlc_ctrl_x=x;tlc_ctrl_y=y;tlc_lgth_x=x+d;tlc_lgth_y=y;tlc_wdth_x=x;tlc_wdth_y=y+d;blc_ctrl_x=x;blc_ctrl_y=y+c;blc_lgth_x=x+d;blc_lgth_y=y+c;blc_wdth_x=x;blc_wdth_y=y+c-d;brc_ctrl_x=x+b;brc_ctrl_y=y+c;brc_lgth_x=x+b-d;brc_lgth_y=y+c;brc_wdth_x=x+b;brc_wdth_y=
50
- y+c-d;trc_ctrl_x=x+b;trc_ctrl_y=y;trc_lgth_x=x+b-d;trc_lgth_y=y;trc_wdth_x=x+b;trc_wdth_y=y+d;a.moveTo(tlc_lgth_x,tlc_lgth_y);a.quadraticCurveTo(tlc_ctrl_x,tlc_ctrl_y,tlc_wdth_x,tlc_wdth_y);a.lineTo(blc_wdth_x,blc_wdth_y);a.quadraticCurveTo(blc_ctrl_x,blc_ctrl_y,blc_lgth_x,blc_lgth_y);a.lineTo(brc_lgth_x,brc_lgth_y);a.quadraticCurveTo(brc_ctrl_x,brc_ctrl_y,brc_wdth_x,brc_wdth_y);a.lineTo(trc_wdth_x,trc_wdth_y);a.quadraticCurveTo(trc_ctrl_x,trc_ctrl_y,trc_lgth_x,trc_lgth_y);a.lineTo(tlc_lgth_x,tlc_lgth_y)}});var Line=Glyph.extend({init:function(a,b,c,d){this.thickness=2;this._super(a,b,c,"+",d);this.glyphType="Line"},_draw:function(a,b,c){a=a||this.ctx;b=b||this.getPixelLength();c=c||this.getHeight();x=y=0;a.beginPath();a.moveTo(x,c/2-this.thickness/2);a.lineTo(x,c/2+this.thickness/2);a.lineTo(x+b,c/2+this.thickness/2);a.lineTo(x+b,c/2-this.thickness/2)}});var Complex=Glyph.extend({init:function(a,b,c,d,e,g){this._super(a,b,c,d,g);this.slope=1;this.glyphType="Complex";this.subFeatures=e;this.line=new Line(a,0,c);this.line.parent=this;this.line.color="black";this.line.thickness=2},addSubFeature:function(a){this.subFeatures.push(a)},_draw:function(a,b,c,d){a=a||this.ctx;b||this.getPixelLength();c||this.getHeight();d+1||this.calcRoundness();x=y=0;a.translate(-this.getPixelPositionX(),0);this.line.lane=this.lane;this.line.draw();b=this.subFeatures.length;
51
- for(c=0;c<b;c++)this.subFeatures[c].parent=this,this.subFeatures[c].lane=this.lane,this.subFeatures[c].draw();a.translate(this.getPixelPositionX(),0);a.beginPath()}});var Arrow=Glyph.extend({init:function(a,b,c,d){this._super(a,b,0,c,d);this.slope=1;this.glyphType="Arrow";this.thickness=4.6},getPixelThickness:function(){return this.thickness/10*(this.getHeight()/2/Math.tan(Math.atan(this.slope)))},erase:function(){var a=this.getPixelThickness();this.ctx.clearRect(-a,0,a,this.getHeight())},_draw:function(a,b,c,d){a=a||this.ctx;c=c||this.getHeight();d=d+1||this.calcRoundness();d!=void 0&&(d-=1);b=this.getPixelThickness();x=y=0;a_b_x=x-0-d;a_t_x=x-0-d;a_max_x=x-0;
52
- t=0.5;a_ctrl_x=(a_max_x-(1-t)*(1-t)*a_b_x-t*t*a_t_x)/(2*(1-t)*t);a_ctrl_y=y+c/2;bs_slope=this.slope;bs_intercept=-a_ctrl_y-bs_slope*a_ctrl_x;ts_slope=-this.slope;ts_intercept=-a_ctrl_y-ts_slope*a_ctrl_x;a_b_y=-(bs_slope*a_b_x+bs_intercept);a_t_y=-(ts_slope*a_t_x+ts_intercept);a.beginPath();bs_ctrl_y=y+c;bs_ctrl_x=(-bs_ctrl_y-bs_intercept)/this.slope;bs_slpe_x=bs_ctrl_x+d+d;bs_slpe_y=-(bs_slope*bs_slpe_x+bs_intercept);a.moveTo(bs_slpe_x,bs_slpe_y);a.lineTo(a_b_x,a_b_y);a.quadraticCurveTo(a_ctrl_x,
53
- a_ctrl_y,a_t_x,a_t_y);ts_ctrl_y=y;ts_ctrl_x=(ts_ctrl_y+ts_intercept)/this.slope;ts_slpe_x=ts_ctrl_x+d+d;ts_slpe_y=-(ts_slope*ts_slpe_x+ts_intercept);a.lineTo(ts_slpe_x,ts_slpe_y);var e=Math.PI-Math.abs(Math.atan(this.slope))-Math.PI/2;d=Math.sin(e)*b;e=Math.cos(e)*b;a.bezierCurveTo(ts_ctrl_x,ts_ctrl_y,ts_ctrl_x-d,ts_ctrl_y+e,ts_slpe_x-d,ts_slpe_y+e);a.lineTo(a_max_x-b,y+c/2);a.lineTo(bs_slpe_x-d,bs_slpe_y-e);a.bezierCurveTo(bs_ctrl_x-d,bs_ctrl_y-e,bs_ctrl_x,bs_ctrl_y,bs_slpe_x,bs_slpe_y)}});function genbank(a,b){for(var c=a.split("\n"),d=RegExp(/\s+gene\s+([a-z]*)\(?(\d+)\.\.(\d+)/),e=[],g=void 0,i=void 0,k=0;k<c.length;k++){var j;if(j=c[k].match(d)){j.shift();e.push(j);var m=j[2];if(g==void 0||g>m)g=m;j=j[1];if(i==void 0||i<j)i=j}}b.scale.max=g;b.scale.min=i;for(c=0;c<e.length;c++)d="+",e[c][0]=="complement"&&(d="-"),j=e[c][1],m=e[c][2],j=j-1+1,b.addGene(j,m-j,d)};function bed(a,b){var c=a.split("\n");numFeatures=c.length;for(var d=1;d<numFeatures;d++){if(c[d]=="")break;var e=c[d].split(" "),g=parseInt(e[1]),i=parseInt(e[2]),k=e[0]+": "+e[3],j=e[5],m=e[8],l=e[10].split(",");e=e[11].split(",");g=b.addFeature(new Complex("complex",g,i,j,[],{color:m,name:k}));for(i=0;i<l.length;i++){if(l[i]=="")break;g.addSubFeature(new BlockArrow("complex",parseInt(e[i]),parseInt(l[i]),j))}}};
@@ -1,74 +0,0 @@
1
- ;(function ($) {
2
- var defaults = {
3
- approach: 0,
4
- overtravel: 0
5
- };
6
-
7
- /*
8
- Trigger appropriate events when the selected element is scrolled in or
9
- out of view.
10
-
11
- An element is considered to be in view if the length of document
12
- scrolled is greater than or equal to the offset of the element relative
13
- to the top of the document and within the vertical span of the element.
14
- (its height).
15
-
16
- Vertical span of the element can be modified by adding required
17
- 'approach' and 'overtravel' length.
18
-
19
- Events:
20
-
21
- enter.scrollspy:
22
-
23
- When the selected element scrolls into the view.
24
-
25
- leave.scrollspy:
26
-
27
- When the selected element scrolls out of the view.
28
-
29
- Options:
30
-
31
- approach:
32
-
33
- Extend vertical span of the element from top. It can be
34
- positive or negative.
35
-
36
- overtravel:
37
-
38
- Extend vertical span of the element from bottom. It can be
39
- positive or negative.
40
-
41
- The terminology: approach and overtravel, are borrowed from
42
- Machining :).
43
-
44
- Usage:
45
-
46
- $('.resultn').scrollspy();
47
-
48
- */
49
- $.fn.scrollspy = function (options) {
50
- var elements = this;
51
- var options = $.extend({}, defaults, options);
52
-
53
- $(window).scroll(function() {
54
- var scrolled = $(this).scrollTop();
55
-
56
- elements.each(function() {
57
- var element = $(this);
58
-
59
- //compute threshold
60
- var start = element.offset().top - options.approach;
61
- var end = start + element.height() + options.overtravel;
62
-
63
- if (scrolled >= start && scrolled <= end){
64
- element.trigger('enter.scrollspy');
65
- }
66
- else {
67
- element.trigger('leave.scrollspy');
68
- }
69
- });
70
- });
71
-
72
- return this;
73
- }
74
- })(jQuery);
@@ -1,57 +0,0 @@
1
- /*! jQuery UI - v1.8.19 - 2012-04-16
2
- * https://github.com/jquery/jquery-ui
3
- * Includes: jquery.effects.core.js
4
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
5
- jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.19",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),(c/=f/2)<1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
6
- * https://github.com/jquery/jquery-ui
7
- * Includes: jquery.effects.blind.js
8
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
9
- (function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
10
- * https://github.com/jquery/jquery-ui
11
- * Includes: jquery.effects.bounce.js
12
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
13
- (function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight({margin:!0})/3:c.outerWidth({margin:!0})/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m<h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,function(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
14
- * https://github.com/jquery/jquery-ui
15
- * Includes: jquery.effects.clip.js
16
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
17
- (function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&&(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
18
- * https://github.com/jquery/jquery-ui
19
- * Includes: jquery.effects.drop.js
20
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
21
- (function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0})/2:c.outerWidth({margin:!0})/2);e=="show"&&c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
22
- * https://github.com/jquery/jquery-ui
23
- * Includes: jquery.effects.explode.js
24
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
25
- (function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i<c;i++)for(var j=0;j<d;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
26
- * https://github.com/jquery/jquery-ui
27
- * Includes: jquery.effects.fade.js
28
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
29
- (function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
30
- * https://github.com/jquery/jquery-ui
31
- * Includes: jquery.effects.fold.js
32
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
33
- (function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
34
- * https://github.com/jquery/jquery-ui
35
- * Includes: jquery.effects.highlight.js
36
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
37
- (function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
38
- * https://github.com/jquery/jquery-ui
39
- * Includes: jquery.effects.pulsate.js
40
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
41
- (function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i<e;i++)c.animate({opacity:h},f,b.options.easing),h=(h+1)%2;c.animate({opacity:h},f,b.options.easing,function(){h==0&&c.hide(),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
42
- * https://github.com/jquery/jquery-ui
43
- * Includes: jquery.effects.scale.js
44
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
45
- (function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&&(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&&(e=="show"&&(c.from.opacity=0,c.to.opacity=1),e=="hide"&&(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&&(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&&q.from.y!=q.to.y&&(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){var c=a(this);k&&a.effects.save(c,f);var d={height:c.height(),width:c.width()};c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&&(c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.options.easing,function(){k&&a.effects.restore(c,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity),j=="hide"&&c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
46
- * https://github.com/jquery/jquery-ui
47
- * Includes: jquery.effects.shake.js
48
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
49
- (function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p<h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
50
- * https://github.com/jquery/jquery-ui
51
- * Includes: jquery.effects.slide.js
52
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
53
- (function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0}):c.outerWidth({margin:!0}));e=="show"&&c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/*! jQuery UI - v1.8.19 - 2012-04-16
54
- * https://github.com/jquery/jquery-ui
55
- * Includes: jquery.effects.transfer.js
56
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
57
- (function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);