// Copyright 2011 Software Freedom Conservatory
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

function(){return function(){var d=null,e=this;function f(b,a){function c(){}c.prototype=a.prototype;b.g=a.prototype;b.prototype=new c};function g(b){for(var a=1;a<arguments.length;a++)var c=String(arguments[a]).replace(/\$/g,"$$$$"),b=b.replace(/\%s/,c);return b}function i(b){return b.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function j(b,a){if(b<a)return-1;else if(b>a)return 1;return 0};var k,l,m,p;function q(){return e.navigator?e.navigator.userAgent:d}p=m=l=k=!1;var r;if(r=q()){var s=e.navigator;k=r.indexOf("Opera")==0;l=!k&&r.indexOf("MSIE")!=-1;m=!k&&r.indexOf("WebKit")!=-1;p=!k&&!m&&s.product=="Gecko"}var t=l,u=p,x=m,y;
a:{var z="",A;if(k&&e.opera)var B=e.opera.version,z=typeof B=="function"?B():B;else if(u?A=/rv\:([^\);]+)(\)|;)/:t?A=/MSIE\s+([^\);]+)(\)|;)/:x&&(A=/WebKit\/(\S+)/),A)var C=A.exec(q()),z=C?C[1]:"";if(t){var D,E=e.document;D=E?E.documentMode:void 0;if(D>parseFloat(z)){y=String(D);break a}}y=z}var F={};
function G(b){var a;if(!(a=F[b])){a=0;for(var c=i(String(y)).split("."),h=i(String(b)).split("."),v=Math.max(c.length,h.length),w=0;a==0&&w<v;w++){var U=c[w]||"",V=h[w]||"",W=RegExp("(\\d*)(\\D*)","g"),X=RegExp("(\\d*)(\\D*)","g");do{var n=W.exec(U)||["","",""],o=X.exec(V)||["","",""];if(n[0].length==0&&o[0].length==0)break;a=j(n[1].length==0?0:parseInt(n[1],10),o[1].length==0?0:parseInt(o[1],10))||j(n[2].length==0,o[2].length==0)||j(n[2],o[2])}while(a==0)}a=F[b]=a>=0}return a};function H(b){this.stack=Error().stack||"";if(b)this.message=String(b)}f(H,Error);H.prototype.name="CustomError";function I(b,a){H.call(this,a);this.code=b;this.name=J[b]||J[13]}f(I,H);
var J,K={NoSuchElementError:7,NoSuchFrameError:8,UnknownCommandError:9,StaleElementReferenceError:10,ElementNotVisibleError:11,InvalidElementStateError:12,UnknownError:13,ElementNotSelectableError:15,XPathLookupError:19,NoSuchWindowError:23,InvalidCookieDomainError:24,UnableToSetCookieError:25,ModalDialogOpenedError:26,NoModalDialogOpenError:27,ScriptTimeoutError:28,InvalidSelectorError:32,SqlDatabaseError:33,MoveTargetOutOfBoundsError:34},L={},M;for(M in K)L[K[M]]=M;J=L;
I.prototype.toString=function(){return"["+this.name+"] "+this.message};function N(b,a){a.unshift(b);H.call(this,g.apply(d,a));a.shift();this.f=b}f(N,H);N.prototype.name="AssertionError";function O(b){var a=P;if(typeof a=="string"){if(typeof b!="string"||b.length!=1)return-1;return a.indexOf(b,0)}for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};!t||G("9");!u&&!t||t&&G("9")||u&&G("1.9.1");t&&G("9");function Q(b,a,c,h,v){this.b=!!a;if(b&&(this.a=b))this.c=typeof h=="number"?h:this.a.nodeType!=1?0:this.b?-1:1;this.d=v!=void 0?v:this.c||0;this.b&&(this.d*=-1);this.e=!c}f(Q,function(){});Q.prototype.a=d;Q.prototype.c=0;f(function(b,a,c,h){Q.call(this,b,a,c,d,h)},Q);var P=["async","autofocus","autoplay","checked","compact","complete","controls","declare","defaultchecked","defaultselected","defer","disabled","draggable","ended","formnovalidate","hidden","indeterminate","iscontenteditable","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","paused","pubdate","readonly","required","reversed","scoped","seamless","seeking","selected","spellcheck","truespeed","willvalidate"];function R(b,a){if(8==b.nodeType)return d;a=a.toLowerCase();if(a=="style"){var c=i(b.style.cssText).toLowerCase();return c.charAt(c.length-1)==";"?c:c+";"}c=b.getAttributeNode(a);t&&!c&&G(8)&&O(a)>=0&&(c=b[a]);if(!c)return d;if(O(a)>=0)return t&&c.value=="false"?d:"true";return c.specified?c.value:d}var S="_".split("."),T=e;!(S[0]in T)&&T.execScript&&T.execScript("var "+S[0]);for(var Y;S.length&&(Y=S.shift());)!S.length&&R!==void 0?T[Y]=R:T=T[Y]?T[Y]:T[Y]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
