(function(b,f){function l(m,a,b){if(b===f&&1===m.nodeType)if(b="data-"+a.replace(Pb,"-$1").toLowerCase(),b=m.getAttribute(b),"string"===typeof b){try{b="true"===b?!0:"false"===b?!1:"null"===b?null:h.isNumeric(b)?+b:Qb.test(b)?h.parseJSON(b):b}catch(d){}h.data(m,a,b)}else b=f;return b}function j(m){for(var a in m)if(!("data"===a&&h.isEmptyObject(m[a]))&&"toJSON"!==a)return!1;return!0}function r(m,a,b){var d=a+"defer",e=a+"queue",k=a+"mark",g=h._data(m,d);g&&(("queue"===b||!h._data(m,e))&&("mark"=== b||!h._data(m,k)))&&setTimeout(function(){!h._data(m,e)&&!h._data(m,k)&&(h.removeData(m,d,!0),g.fire())},0)}function p(){return!1}function a(){return!0}function g(m,a,b){a=a||0;if(h.isFunction(a))return h.grep(m,function(m,d){return!!a.call(m,d,m)===b});if(a.nodeType)return h.grep(m,function(m){return m===a===b});if("string"===typeof a){var d=h.grep(m,function(m){return 1===m.nodeType});if(Rb.test(a))return h.filter(a,d,!b);a=h.filter(a,d)}return h.grep(m,function(m){return 0<=h.inArray(m,a)===b})} function c(m){var a=Wa.split("|");m=m.createDocumentFragment();if(m.createElement)for(;a.length;)m.createElement(a.pop());return m}function e(m,a){if(1===a.nodeType&&h.hasData(m)){var b,d,e;d=h._data(m);var k=h._data(a,d),g=d.events;if(g)for(b in delete k.handle,k.events={},g){d=0;for(e=g[b].length;de;e+=2)b||(d-=parseFloat(h.css(m,"padding"+M[e]))||0),d="margin"===b? d+(parseFloat(h.css(m,b+M[e]))||0):d-(parseFloat(h.css(m,"border"+M[e]+"Width"))||0);return d+"px"}d=V(m,a);if(0>d||null==d)d=m.style[a];if(Ba.test(d))return d;d=parseFloat(d)||0;if(b)for(;4>e;e+=2)d+=parseFloat(h.css(m,"padding"+M[e]))||0,"padding"!==b&&(d+=parseFloat(h.css(m,"border"+M[e]+"Width"))||0),"margin"===b&&(d+=parseFloat(h.css(m,b+M[e]))||0);return d+"px"}function B(m){return function(a,b){"string"!==typeof a&&(b=a,a="*");if(h.isFunction(b))for(var d=a.toLowerCase().split(Xa),e=0,k=d.length, g,c;e").appendTo(a),d=b.css("display"); b.remove();if("none"===d||""===d){Q||(Q=s.createElement("iframe"),Q.frameBorder=Q.width=Q.height=0);a.appendChild(Q);if(!X||!Q.createElement)X=(Q.contentWindow||Q.contentDocument).document,X.write((h.support.boxModel?"":"")+""),X.close();b=X.createElement(m);X.body.appendChild(b);d=h.css(b,"display");a.removeChild(Q)}Da[m]=d}return Da[m]}function $a(m){return h.isWindow(m)?m:9===m.nodeType?m.defaultView||m.parentWindow:!1}var s=b.document,Ub=b.location,h,ab=function(){if(!t.isReady){try{s.documentElement.doScroll("left")}catch(m){setTimeout(ab, 1);return}t.ready()}},t=function(m,a){return new t.fn.init(m,a,bb)},Vb=b.jQuery,Wb=b.$,bb,Xb=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,cb=/\S/,db=/^\s+/,eb=/\s+$/,Yb=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Zb=/^[\],:{}\s]*$/,$b=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,ac=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bc=/(?:^|:|,)(?:\s*\[)+/g,cc=/(webkit)[ \/]([\w.]+)/,dc=/(opera)(?:.*version)?[ \/]([\w.]+)/,ec=/(msie) ([\w.]+)/,fc=/(mozilla)(?:.*? rv:([\w.]+))?/,gc=/-([a-z]|[0-9])/ig,hc=/^-ms-/, ic=function(m,a){return(a+"").toUpperCase()},jc=b.navigator.userAgent,la,ma,Y,kc=Object.prototype.toString,Ea=Object.prototype.hasOwnProperty,Fa=Array.prototype.push,ea=Array.prototype.slice,fb=String.prototype.trim,gb=Array.prototype.indexOf,hb={};t.fn=t.prototype={constructor:t,init:function(m,a,b){var d;if(!m)return this;if(m.nodeType)return this.context=this[0]=m,this.length=1,this;if("body"===m&&!a&&s.body)return this.context=s,this[0]=s.body,this.selector=m,this.length=1,this;if("string"=== typeof m){if((d="<"===m.charAt(0)&&">"===m.charAt(m.length-1)&&3<=m.length?[null,m,null]:Xb.exec(m))&&(d[1]||!a)){if(d[1])return b=(a=a instanceof t?a[0]:a)?a.ownerDocument||a:s,(m=Yb.exec(m))?t.isPlainObject(a)?(m=[s.createElement(m[1])],t.fn.attr.call(m,a,!0)):m=[b.createElement(m[1])]:(m=t.buildFragment([d[1]],[b]),m=(m.cacheable?t.clone(m.fragment):m.fragment).childNodes),t.merge(this,m);if((a=s.getElementById(d[2]))&&a.parentNode){if(a.id!==d[2])return b.find(m);this.length=1;this[0]=a}this.context= s;this.selector=m;return this}return!a||a.jquery?(a||b).find(m):this.constructor(a).find(m)}if(t.isFunction(m))return b.ready(m);m.selector!==f&&(this.selector=m.selector,this.context=m.context);return t.makeArray(m,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return ea.call(this,0)},get:function(m){return null==m?this.toArray():0>m?this[this.length+m]:this[m]},pushStack:function(m,a,b){var d=this.constructor();t.isArray(m)?Fa.apply(d,m):t.merge(d, m);d.prevObject=this;d.context=this.context;"find"===a?d.selector=this.selector+(this.selector?" ":"")+b:a&&(d.selector=this.selector+"."+a+"("+b+")");return d},each:function(m,a){return t.each(this,m,a)},ready:function(m){t.bindReady();ma.add(m);return this},eq:function(m){m=+m;return-1===m?this.slice(m):this.slice(m,m+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ea.apply(this,arguments),"slice",ea.call(arguments).join(","))}, map:function(m){return this.pushStack(t.map(this,function(a,b){return m.call(a,b,a)}))},end:function(){return this.prevObject||this.constructor(null)},push:Fa,sort:[].sort,splice:[].splice};t.fn.init.prototype=t.fn;t.extend=t.fn.extend=function(){var m,a,b,d,e,h=arguments[0]||{},k=1,g=arguments.length,c=!1;"boolean"===typeof h&&(c=h,h=arguments[1]||{},k=2);"object"!==typeof h&&!t.isFunction(h)&&(h={});g===k&&(h=this,--k);for(;kb?Math.max(0,d+b):b:0;bm.indexOf("compatible")&&fc.exec(m)||[];return{browser:m[1]||"",version:m[2]||"0"}},sub:function(){function m(a,b){return new m.fn.init(a,b)}t.extend(!0,m,this);m.superclass=this;m.fn= m.prototype=this();m.fn.constructor=m;m.sub=this.sub;m.fn.init=function(b,d){d&&(d instanceof t&&!(d instanceof m))&&(d=m(d));return t.fn.init.call(this,b,d,a)};m.fn.init.prototype=m.fn;var a=m(s);return m},browser:{}});t.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(m,a){hb["[object "+a+"]"]=a.toLowerCase()});la=t.uaMatch(jc);la.browser&&(t.browser[la.browser]=!0,t.browser.version=la.version);t.browser.webkit&&(t.browser.safari=!0);cb.test("\u00a0")&&(db=/^[\s\xA0]+/, eb=/[\s\xA0]+$/);bb=t(s);s.addEventListener?Y=function(){s.removeEventListener("DOMContentLoaded",Y,!1);t.ready()}:s.attachEvent&&(Y=function(){"complete"===s.readyState&&(s.detachEvent("onreadystatechange",Y),t.ready())});h=t;var ib={};h.Callbacks=function(m){var a;if(m){if(!(a=ib[m])){a=m;var b=ib[a]={},d,e;a=a.split(/\s+/);d=0;for(e=a.length;d=k&&m&&h.isFunction(m.promise)?m:h.Deferred(),f=q.promise();if(1
a";Ja=v.getElementsByTagName("*");Z=v.getElementsByTagName("a")[0];if(!Ja||!Ja.length||!Z)Ia={};else{na=s.createElement("select");oa=na.appendChild(s.createElement("option"));H=v.getElementsByTagName("input")[0];E={leadingWhitespace:3=== v.firstChild.nodeType,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/top/.test(Z.getAttribute("style")),hrefNormalized:"/a"===Z.getAttribute("href"),opacity:/^0.55/.test(Z.style.opacity),cssFloat:!!Z.style.cssFloat,checkOn:"on"===H.value,optSelected:oa.selected,getSetAttribute:"t"!==v.className,enctype:!!s.createElement("form").enctype,html5Clone:"<:nav>"!==s.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0, focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0};h.boxModel=E.boxModel="CSS1Compat"===s.compatMode;H.checked=!0;E.noCloneChecked=H.cloneNode(!0).checked;na.disabled=!0;E.optDisabled=!oa.disabled;try{delete v.test}catch(cd){E.deleteExpando=!1}!v.addEventListener&&(v.attachEvent&&v.fireEvent)&&(v.attachEvent("onclick",function(){E.noCloneEvent=!1}),v.cloneNode(!0).fireEvent("onclick"));H=s.createElement("input"); H.value="t";H.setAttribute("type","radio");E.radioValue="t"===H.value;H.setAttribute("checked","checked");H.setAttribute("name","t");v.appendChild(H);R=s.createDocumentFragment();R.appendChild(v.lastChild);E.checkClone=R.cloneNode(!0).cloneNode(!0).lastChild.checked;E.appendChecked=H.checked;R.removeChild(H);R.appendChild(v);if(v.attachEvent)for(Ka in{submit:1,change:1,focusin:1})pa="on"+Ka,$=pa in v,$||(v.setAttribute(pa,"return;"),$="function"===typeof v[pa]),E[Ka+"Bubbles"]=$;R.removeChild(v); R=na=oa=v=H=null;h(function(){var m,a,d,e,k=s.getElementsByTagName("body")[0];k&&(m=s.createElement("div"),m.style.cssText="padding:0;margin:0;border:0;visibility:hidden;width:0;height:0;position:static;top:0;margin-top:1px",k.insertBefore(m,k.firstChild),v=s.createElement("div"),m.appendChild(v),v.innerHTML="
t
",fa=v.getElementsByTagName("td"),$=0===fa[0].offsetHeight,fa[0].style.display="",fa[1].style.display= "none",E.reliableHiddenOffsets=$&&0===fa[0].offsetHeight,b.getComputedStyle&&(v.innerHTML="",a=s.createElement("div"),a.style.width="0",a.style.marginRight="0",v.style.width="2px",v.appendChild(a),E.reliableMarginRight=0===(parseInt((b.getComputedStyle(a,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!==typeof v.style.zoom&&(v.innerHTML="",v.style.width=v.style.padding="1px",v.style.border=0,v.style.overflow="hidden",v.style.display="inline",v.style.zoom=1,E.inlineBlockNeedsLayout=3===v.offsetWidth, v.style.display="block",v.style.overflow="visible",v.innerHTML="
",E.shrinkWrapBlocks=3!==v.offsetWidth),v.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:0;visibility:hidden;",v.innerHTML="
", a=v.firstChild,d=a.firstChild,e=a.nextSibling.firstChild.firstChild,e={doesNotAddBorder:5!==d.offsetTop,doesAddBorderForTableAndCells:5===e.offsetTop},d.style.position="fixed",d.style.top="20px",e.fixedPosition=20===d.offsetTop||15===d.offsetTop,d.style.position=d.style.top="",a.style.overflow="hidden",a.style.position="relative",e.subtractsBorderForOverflowNotVisible=-5===d.offsetTop,e.doesNotIncludeMarginInBodyOffset=1!==k.offsetTop,b.getComputedStyle&&(v.style.marginTop="1%",E.pixelMargin="1%"!== (b.getComputedStyle(v,null)||{marginTop:0}).marginTop),"undefined"!==typeof m.style.zoom&&(m.style.zoom=1),k.removeChild(m),v=null,h.extend(E,e))});Ia=E}lc.support=Ia;var Qb=/^(?:\{.*\}|\[.*\])$/,Pb=/([A-Z])/g;h.extend({cache:{},uuid:0,expando:"jQuery"+(h.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(m){m=m.nodeType?h.cache[m[h.expando]]:m[h.expando];return!!m&&!j(m)},data:function(m,a,b,d){if(h.acceptData(m)){var e; e=h.expando;var k="string"===typeof a,g=m.nodeType,c=g?h.cache:m,q=g?m[e]:m[e]&&e,j="events"===a;if(q&&c[q]&&(j||d||c[q].data)||!(k&&b===f)){q||(g?m[e]=q=++h.uuid:q=e);c[q]||(c[q]={},g||(c[q].toJSON=h.noop));if("object"===typeof a||"function"===typeof a)d?c[q]=h.extend(c[q],a):c[q].data=h.extend(c[q].data,a);e=m=c[q];d||(m.data||(m.data={}),m=m.data);b!==f&&(m[h.camelCase(a)]=b);if(j&&!m[a])return e.events;k?(b=m[a],null==b&&(b=m[h.camelCase(a)])):b=m;return b}}},removeData:function(m,a,b){if(h.acceptData(m)){var d, e,k,g=h.expando,c=m.nodeType,q=c?h.cache:m,f=c?m[g]:g;if(q[f]){if(a&&(d=b?q[f]:q[f].data)){h.isArray(a)||(a in d?a=[a]:(a=h.camelCase(a),a=a in d?[a]:a.split(" ")));e=0;for(k=a.length;ee)return null;a=g?e:0;for(d=g?e+1:c.length;ac.indexOf(":")?"on"+c:"",e){if(a.result= f,a.target||(a.target=e),d=null!=d?h.makeArray(d):[],d.unshift(a),u=h.event.special[c]||{},!(u.trigger&&!1===u.trigger.apply(e,d))){r=[[e,u.bindType||c]];if(!k&&!u.noBubble&&!h.isWindow(e)){l=u.delegateType||c;g=pb.test(l+c)?e:e.parentNode;for(j=null;g;g=g.parentNode)r.push([g,l]),j=g;j&&j===e.ownerDocument&&r.push([j.defaultView||j.parentWindow||b,l])}for(j=0;je&&q.push({elem:this,matches:d.slice(e)});for(j=0;j+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,aa="sizcache"+(Math.random()+"").replace(".",""),Na=0,tb=Object.prototype.toString,ra=!1,ub=!0,ba=/\\/g,vc=/\r\n/g,sa=/\W/;[0,0].sort(function(){ub=!1; return 0});var w=function(a,b,d,e){d=d||[];var k=b=b||s;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!==typeof a)return d;var c,h,g,q,j,f=!0,u=w.isXML(b),l=[],r=a;do if(Ma.exec(""),c=Ma.exec(r))if(r=c[3],l.push(c[1]),c[2]){q=c[3];break}while(c);if(1":function(a,b){var d,e="string"===typeof b,k=0,c=a.length;if(e&&!sa.test(b))for(b=b.toLowerCase();kd[3]-0},nth:function(a,b,d){return d[3]-0===b},eq:function(a,b,d){return d[3]-0===b}},filter:{PSEUDO:function(a,b,d,e){var k=b[1],c=y.filters[k];if(c)return c(a,d,b,e);if("contains"===k)return 0<=(a.textContent||a.innerText|| Oa([a])||"").indexOf(b[3]);if("not"===k){b=b[3];d=0;for(e=b.length;d";va.insertBefore(ua,va.firstChild);s.getElementById(xb)&&(y.find.ID=function(a,b,d){if("undefined"!==typeof b.getElementById&&!d)return(b=b.getElementById(a[1]))?b.id===a[1]||"undefined"!==typeof b.getAttributeNode&&b.getAttributeNode("id").nodeValue=== a[1]?[b]:f:[]},y.filter.ID=function(a,b){var d="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&d&&d.nodeValue===b});va.removeChild(ua);var va=ua=null,L=s.createElement("div");L.appendChild(s.createComment(""));0

";if(!(wa.querySelectorAll&&0===wa.querySelectorAll(".TEST").length)){var w=function(a,b,d,e){b=b||s;if(!e&&!w.isXML(b)){var k=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);if(k&&(1===b.nodeType||9===b.nodeType)){if(k[1])return I(b.getElementsByTagName(a),d);if(k[2]&&y.find.CLASS&&b.getElementsByClassName)return I(b.getElementsByClassName(k[2]), d)}if(9===b.nodeType){if("body"===a&&b.body)return I([b.body],d);if(k&&k[3]){var c=b.getElementById(k[3]);if(c&&c.parentNode){if(c.id===k[3])return I([c],d)}else return I([],d)}try{return I(b.querySelectorAll(a),d)}catch(g){}}else if(1===b.nodeType&&"object"!==b.nodeName.toLowerCase()){var k=b,h=(c=b.getAttribute("id"))||"__sizzle__",q=b.parentNode,j=/^\s*[+~]/.test(a);c?h=h.replace(/'/g,"\\$&"):b.setAttribute("id",h);j&&q&&(b=b.parentNode);try{if(!j||q)return I(b.querySelectorAll("[id='"+h+"'] "+ a),d)}catch(f){}finally{c||k.removeAttribute("id")}}}return Pa(a,b,d,e)},Qa;for(Qa in Pa)w[Qa]=Pa[Qa];wa=null}}var xa=s.documentElement,ya=xa.matchesSelector||xa.mozMatchesSelector||xa.webkitMatchesSelector||xa.msMatchesSelector;if(ya){var xc=!ya.call(s.createElement("div"),"div"),yb=!1;try{ya.call(s.documentElement,"[test!='']:sizzle")}catch(ed){yb=!0}w.matchesSelector=function(a,b){b=b.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!w.isXML(a))try{if(yb||!y.match.PSEUDO.test(b)&&!/!=/.test(b)){var d= ya.call(a,b);if(d||!xc||a.document&&11!==a.document.nodeType)return d}}catch(e){}return 0
";ca.getElementsByClassName&&0!==ca.getElementsByClassName("e").length&&(ca.lastChild.className="e",1!==ca.getElementsByClassName("e").length&&(y.order.splice(1,0,"CLASS"),y.find.CLASS=function(a,b,d){if("undefined"!==typeof b.getElementsByClassName&&!d)return b.getElementsByClassName(a[1])}, ca=null));w.contains=s.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:s.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return!1};w.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var wb=function(a,b,d){var e,k=[],c="";for(b=b.nodeType?[b]:b;e=y.match.PSEUDO.exec(a);)c+=e[0],a=a.replace(y.match.PSEUDO,"");a=y.relative[a]?a+"*":a;e=0;for(var g=b.length;e]*)\/>/ig,Bb=/<([\w:]+)/,Ec=/]","i"),Db=/checked\s*(?:[^=]|=\s*.checked.)/i, Eb=/\/(java|ecma)script/i,Ic=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Sa=c(s);G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;h.support.htmlSerialize||(G._default= [1,"div
","
"]);h.fn.extend({text:function(a){return h.access(this,function(a){return a===f?h.text(this):this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(h.isFunction(a))return this.each(function(b){h(this).wrapAll(a.call(this,b))});if(this[0]){var b=h(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild; return a}).append(this)}return this},wrapInner:function(a){return h.isFunction(a)?this.each(function(b){h(this).wrapInner(a.call(this,b))}):this.each(function(){var b=h(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){var b=h.isFunction(a);return this.each(function(d){h(this).wrapAll(b?a.call(this,d):a)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments, !0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=h.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, !1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,h.clean(arguments));return a}},remove:function(a,b){for(var d=0,e;null!=(e=this[d]);d++)if(!a||h.filter(a,[e]).length)!b&&1===e.nodeType&&(h.cleanData(e.getElementsByTagName("*")),h.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1===b.nodeType&&h.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return h.clone(this,a,b)})},html:function(a){return h.access(this,function(a){var b=this[0]||{},d=0,e=this.length;if(a===f)return 1===b.nodeType?b.innerHTML.replace(Dc,""):null;if("string"===typeof a&&!Gc.test(a)&&(h.support.leadingWhitespace||!Ra.test(a))&&!G[(Bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ab,"<$1>");try{for(;dq.length&&g===s&&"<"===q.charAt(0)&&!Hc.test(q)&&(h.support.checkClone||!Db.test(q))&&(h.support.html5Clone||!Cb.test(q)))k=!0,(c=h.fragments[q])&&1!==c&&(e=c);e||(e=g.createDocumentFragment(),h.clean(a,g,e,d));k&&(h.fragments[q]=c?e:1);return{fragment:e,cacheable:k}};h.fragments={};h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before", insertAfter:"after",replaceAll:"replaceWith"},function(a,b){h.fn[a]=function(d){var e=[];d=h(d);var k=1===this.length&&this[0].parentNode;if(k&&11===k.nodeType&&1===k.childNodes.length&&1===d.length)return d[b](this[0]),this;for(var k=0,c=d.length;k")?c=a.cloneNode(!0):(c=s.createElement("div"), Sa.appendChild(c),c.innerHTML=a.outerHTML,c=c.firstChild);var f=c;if((!h.support.noCloneEvent||!h.support.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!h.isXMLDoc(a)){q(a,f);c=d(a);g=d(f);for(j=0;c[j];++j)g[j]&&q(c[j],g[j])}if(b&&(e(a,f),k)){c=d(a);g=d(f);for(j=0;c[j];++j)e(c[j],g[j])}return f},clean:function(a,b,d,e){var k,g=[];b=b||s;"undefined"===typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||s);for(var q=0,j;null!=(j=a[q]);q++)if("number"===typeof j&&(j+=""),j){if("string"=== typeof j)if(Fc.test(j)){j=j.replace(Ab,"<$1>");k=(Bb.exec(j)||["",""])[1].toLowerCase();var f=G[k]||G._default,l=f[0],r=b.createElement("div"),p=Sa.childNodes;b===s?Sa.appendChild(r):c(b).appendChild(r);for(r.innerHTML=f[1]+j+f[2];l--;)r=r.lastChild;if(!h.support.tbody){l=Ec.test(j);f="table"===k&&!l?r.firstChild&&r.firstChild.childNodes:""===f[1]&&!l?r.childNodes:[];for(k=f.length-1;0<=k;--k)h.nodeName(f[k],"tbody")&&!f[k].childNodes.length&&f[k].parentNode.removeChild(f[k])}!h.support.leadingWhitespace&& Ra.test(j)&&r.insertBefore(b.createTextNode(Ra.exec(j)[0]),r.firstChild);j=r.childNodes;r&&(r.parentNode.removeChild(r),0d;d++)k[a+M[d]+b]=e[d]||e[d- 2]||e[0];return k}}});var Pc=/%20/g,Sb=/\[\]$/,Hb=/\r?\n/g,Qc=/#.*$/,Rc=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Sc=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tc=/^(?:GET|HEAD)$/,Uc=/^\/\//,Ib=/\?/,Vc=/)<[^<]*)*<\/script>/gi,Wc=/^(?:select|textarea)/i,Xa=/\s+/,Xc=/([?&])_=[^&]*/,Jb=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Kb=h.fn.load,Ca={},Lb={},O,S,Mb=["*/"]+["*"];try{O=Ub.href}catch(fd){O=s.createElement("a"), O.href="",O=O.href}S=Jb.exec(O.toLowerCase())||[];h.fn.extend({load:function(a,b,d){if("string"!==typeof a&&Kb)return Kb.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=e){var k=a.slice(e,a.length);a=a.slice(0,e)}e="GET";b&&(h.isFunction(b)?(d=b,b=f):"object"===typeof b&&(b=h.param(b,h.ajaxSettings.traditional),e="POST"));var c=this;h.ajax({url:a,type:e,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText;a.isResolved()&&(a.done(function(a){e=a}),c.html(k? h("
").append(e.replace(Vc,"")).find(k):e));d&&c.each(d,[e,b,a])}});return this},serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?h.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Wc.test(this.nodeName)||Sc.test(this.type))}).map(function(a,b){var d=h(this).val();return null==d?null:h.isArray(d)?h.map(d,function(a){return{name:b.name,value:a.replace(Hb,"\r\n")}}): {name:b.name,value:d.replace(Hb,"\r\n")}}).get()}});h.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){h.fn[b]=function(a){return this.on(b,a)}});h.each(["get","post"],function(a,b){h[b]=function(a,d,e,k){h.isFunction(d)&&(k=k||e,e=d,d=f);return h.ajax({type:b,url:a,data:d,success:e,dataType:k})}});h.extend({getScript:function(a,b){return h.get(a,f,b,"script")},getJSON:function(a,b,d){return h.get(a,b,d,"json")},ajaxSetup:function(a,b){b?D(a,h.ajaxSettings): (b=a,a=h.ajaxSettings);D(a,b);return a},ajaxSettings:{url:O,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(S[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",binary:"text/plain; charset=x-user-defined",json:"application/json, text/javascript","*":Mb},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",binary:"response", text:"responseText"},converters:{"* text":b.String,"text html":!0,"text json":h.parseJSON,"text xml":h.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:B(Ca),ajaxTransport:B(Lb),ajax:function(a,b){function d(a,b,m,l){if(2!==D){D=2;t&&clearTimeout(t);B=f;p=l||"";x.readyState=0a||304===a){if(e.ifModified){if(A=x.getResponseHeader("Last-Modified"))h.lastModified[u]=A;if(A=x.getResponseHeader("Etag"))h.etag[u]=A}if(304===a)l="notmodified",r=!0;else try{var H;if("[object ArrayBuffer]"==m.toString())H=m;else{A=e;F=m;A.dataFilter&&(F=A.dataFilter(F,A.dataType));var Ga=A.dataTypes; K={};var G,I,Q=Ga.length,N,T=Ga[0],M,R,U,L,O;for(G=1;Ga&&(a=0);x.status=a;x.statusText=""+(b||l);x.response=m;r?g.resolveWith(k,[z,l,x]):g.rejectWith(k,[x,l,C]);x.statusCode(j);j=f;w&&c.trigger("ajax"+(r?"Success":"Error"),[x,e,r?z:C]);q.fireWith(k,[x,l]);w&&(c.trigger("ajaxComplete",[x,e]),--h.active||h.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=f);b=b||{};var e=h.ajaxSetup({},b),k=e.context||e,c=k!==e&&(k.nodeType||k instanceof h)?h(k):h.event,g=h.Deferred(),q=h.Callbacks("once memory"),j=e.statusCode||{},u,l={},r= {},p,z,B,t,s,D=0,w,v,x={readyState:0,setRequestHeader:function(a,b){if(!D){var d=a.toLowerCase();a=r[d]=r[d]||a;l[a]=b}return this},getAllResponseHeaders:function(){return 2===D?p:null},getResponseHeader:function(a){var b;if(2===D){if(!z)for(z={};b=Rc.exec(p);)z[b[1].toLowerCase()]=b[2];b=z[a.toLowerCase()]}return b===f?null:b},overrideMimeType:function(a){D||(e.mimeType=a);return this},abort:function(a){a=a||"abort";B&&B.abort(a);d(0,a);return this}};g.promise(x);x.success=x.done;x.error=x.fail; x.complete=q.add;x.statusCode=function(a){if(a){var b;if(2>D)for(b in a)j[b]=[j[b],a[b]];else b=a[x.status],x.then(b,b)}return this};e.url=((a||e.url)+"").replace(Qc,"").replace(Uc,S[1]+"//");e.dataTypes=h.trim(e.dataType||"*").toLowerCase().split(Xa);null==e.crossDomain&&(s=Jb.exec(e.url.toLowerCase()),e.crossDomain=!(!s||!(s[1]!=S[1]||s[2]!=S[2]||(s[3]||("http:"===s[1]?80:443))!=(S[3]||("http:"===S[1]?80:443)))));e.data&&(e.processData&&"string"!==typeof e.data)&&(e.data=h.param(e.data,e.traditional)); P(Ca,e,b,x);if(2===D)return!1;w=e.global;e.type=e.type.toUpperCase();e.hasContent=!Tc.test(e.type);w&&0===h.active++&&h.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=(Ib.test(e.url)?"&":"?")+e.data,delete e.data),u=e.url,!1===e.cache)){s=h.now();var y=e.url.replace(Xc,"$1_="+s);e.url=y+(y===e.url?(Ib.test(e.url)?"&":"?")+"_="+s:"")}(e.data&&e.hasContent&&!1!==e.contentType||b.contentType)&&x.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(u=u||e.url,h.lastModified[u]&& x.setRequestHeader("If-Modified-Since",h.lastModified[u]),h.etag[u]&&x.setRequestHeader("If-None-Match",h.etag[u]));x.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+Mb+"; q=0.01":""):e.accepts["*"]);for(v in e.headers)x.setRequestHeader(v,e.headers[v]);if(e.beforeSend&&(!1===e.beforeSend.call(k,x,e)||2===D))return x.abort(),!1;for(v in{success:1,error:1,complete:1})x[v](e[v]);if(B=P(Lb,e,b,x)){x.readyState=1;w&&c.trigger("ajaxSend", [x,e]);e.async&&0D)d(-1,A);else throw A;}}else d(-1,"No Transport");return x},param:function(a,b){var d=[],e=function(a,b){b=h.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};b===f&&(b=h.ajaxSettings.traditional);if(h.isArray(a)||a.jquery&&!h.isPlainObject(a))h.each(a,function(){e(this.name,this.value)});else for(var k in a)x(k,a[k],b,e);return d.join("&").replace(Pc, "+")}});h.extend({active:0,lastModified:{},etag:{}});var Yc=h.now(),za=/(\=)\?(&|$)|\?\?/i;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return h.expando+"_"+Yc++}});h.ajaxPrefilter("json jsonp",function(a,d,e){d="string"===typeof a.data&&/^application\/x\-www\-form\-urlencoded/.test(a.contentType);if("jsonp"===a.dataTypes[0]||!1!==a.jsonp&&(za.test(a.url)||d&&za.test(a.data))){var k,c=a.jsonpCallback=h.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,g=b[c],q=a.url,j=a.data, f="$1"+c+"$2";!1!==a.jsonp&&(q=q.replace(za,f),a.url===q&&(d&&(j=j.replace(za,f)),a.data===j&&(q+=(/\?/.test(q)?"&":"?")+a.jsonp+"="+c)));a.url=q;a.data=j;b[c]=function(a){k=[a]};e.always(function(){b[c]=g;if(k&&h.isFunction(g))b[c](k[0])});a.converters["script json"]=function(){k||h.error(c+" was not called");return k[0]};a.dataTypes[0]="json";return"script"}});h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/}, converters:{"text script":function(a){h.globalEval(a);return a}}});h.ajaxPrefilter("script",function(a){a.cache===f&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});h.ajaxTransport("script",function(a){if(a.crossDomain){var b,d=s.head||s.getElementsByTagName("head")[0]||s.documentElement;return{send:function(e,k){b=s.createElement("script");b.async="async";a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,e){if(e||!b.readyState||/loaded|complete/.test(b.readyState))b.onload= b.onreadystatechange=null,d&&b.parentNode&&d.removeChild(b),b=f,e||k(200,"success")};d.insertBefore(b,d.firstChild)},abort:function(){if(b)b.onload(0,1)}}}});var Ua=b.ActiveXObject?function(){for(var a in da)da[a](0,1)}:!1,Zc=0,da;h.ajaxSettings.xhr=b.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&A()))a:{try{a=new b.ActiveXObject("Microsoft.XMLHTTP");break a}catch(d){}a=void 0}return a}:A;var Va=h.ajaxSettings.xhr();h.extend(h.support,{ajax:!!Va,cors:!!Va&&"withCredentials"in Va});h.support.ajax&& h.ajaxTransport(function(a){if(!a.crossDomain||h.support.cors){var d;return{send:function(e,k){var c=a.xhr(),g,q;a.username?c.open(a.type,a.url,a.async,a.username,a.password):c.open(a.type,a.url,a.async);if(a.xhrFields)for(q in a.xhrFields)c[q]=a.xhrFields[q];a.mimeType&&c.overrideMimeType&&c.overrideMimeType(a.mimeType);!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");"binary"==a.dataType&&(c.hasOwnProperty("responseType")?c.responseType="arraybuffer":c.overrideMimeType&& c.overrideMimeType("text/plain; charset=x-user-defined"));try{for(q in e)c.setRequestHeader(q,e[q])}catch(j){}c.send(a.hasContent&&a.data||null);d=function(b,e){var q,j,l,u,r;try{if(d&&(e||4===c.readyState))if(d=f,g&&(c.onreadystatechange=h.noop,Ua&&delete da[g]),e)4!==c.readyState&&c.abort();else{q=c.status;l=c.getAllResponseHeaders();u={};try{if((r=c.responseXML)&&r.documentElement)u.xml=r}catch(p){}try{u.text=c.responseText}catch(z){}try{u.data=c.response}catch(B){}try{j=c.statusText}catch(P){j= ""}!q&&a.isLocal&&!a.crossDomain?q=u.text?200:404:1223===q&&(q=204)}}catch(ia){e||k(-1,ia)}u&&k(q,j,u,l)};!a.async||4===c.readyState?d():(g=++Zc,Ua&&(da||(da={},h(b).unload(Ua)),da[g]=d),c.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var Da={},Q,X,$c=/^(?:toggle|show|hide)$/,ad=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Aa,ka=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ja;h.fn.extend({show:function(a, b,d){if(a||0===a)return this.animate(W("show",3),a,b,d);d=0;for(var e=this.length;d=c.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();c.animatedProperties[this.prop]=!0;for(b in c.animatedProperties)!0!==c.animatedProperties[b]&&(e=!1);if(e){null!=c.overflow&&!h.support.shrinkWrapBlocks&&h.each(["","X","Y"],function(a, b){k.style["overflow"+b]=c.overflow[a]});c.hide&&h(k).hide();if(c.hide||c.show)for(b in c.animatedProperties)h.style(k,b,c.orig[b]),h.removeData(k,"fxshow"+b,!0),h.removeData(k,"toggle"+b,!0);if(a=c.complete)c.complete=!1,a.call(k)}return!1}Infinity==c.duration?this.now=d:(a=d-this.startTime,this.state=a/c.duration,this.pos=h.easing[c.animatedProperties[this.prop]](this.state,a,0,1,c.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};h.extend(h.fx,{tick:function(){for(var a, b=h.timers,d=0;d=b[e]?b[d]:Math.max(a.body[e],b[e],a.body[k],b[k]);if(c===f)return a=h.css(a,b),b=parseFloat(a),h.isNumeric(b)?b:a;h(a).css(b,c)},b,a,arguments.length,null)}});b.jQuery=b.$=h;"function"===typeof define&&(define.amd&&define.amd.jQuery)&&define("jquery", [],function(){return h})})(window);"undefined"==typeof jQuery&&alert("Note -- JSmoljQuery is required for JSmol, but it's not defined."); Jmol=function(b){return{_jmolInfo:{userAgent:navigator.userAgent,version:version="Jmol-JSO 13.0"},_allowedJmolSize:[25,2048,300],_applets:{},_asynchronous:!0,_ajaxQueue:[],db:{_databasePrefixes:"$=:",_fileLoadScript:";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * };",_nciLoadScript:";n = ({molecule=1}.length < {molecule=2}.length ? 2 : 1); select molecule=n;display selected;center selected;",_pubChemLoadScript:"", _DirectDatabaseCalls:{"cactus.nci.nih.gov":"%URL","www.rcsb.org":"%URL","pubchem.ncbi.nlm.nih.gov":"%URL",$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",$$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf","=":"http://www.rcsb.org/pdb/files/%FILE.pdb","==":"http://www.rcsb.org/pdb/files/ligand/%FILE.cif",":":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d"},_restQueryUrl:"http://www.rcsb.org/pdb/rest/search",_restQueryXml:"org.pdb.query.simple.AdvancedKeywordQueryText SearchQUERY", _restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:b,_execLog:"",_execStack:[],_isMsie:0<=navigator.userAgent.toLowerCase().indexOf("msie"),_isXHTML:!1,_lastAppletID:null,_mousePageX:null,_serverUrl:"http://chemapps.stolaf.edu/jmol/jsmol.jsmol.php",_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1}}(document); (function(b,f){b.$=function(a,b){return f("#"+a._id+(b?"_"+b:""))};b.$ajax=function(a){return f.ajax(a)};b.$attr=function(a,b,d){return f("#"+a).attr(b,d)};b.$bind=function(a,b,d){return d?f(a).bind(b,d):f(a).unbind(b)};b.$html=function(a,b){return f("#"+a).html(b)};b.$offset=function(a){return f("#"+a).offset()};b.$on=function(a,b){return f(window).on(a,b)};b.$resize=function(a){return f(window).resize(a)};b.$submit=function(a){return f("#"+a).submit()};b.$val=function(a,b){return f("#"+a).val(b)}; var l=jQuery,j=document;l.map(["click","mousemove","mouseup","touchmove","touchend"],function(a){var b=function(a){l(k).each(function(){var b=l(this);this!==a.target&&!b.has(a.target).length&&b.triggerHandler(d,[a.target,a])})},d=a+"outjsmol",k=l(),c=a+"."+d+"-special-event";l.event.special[d]={setup:function(){k=k.add(this);1===k.length&&l(j).bind(c,b)},teardown:function(){k=k.not(this);0===k.length&&l(j).unbind(c)},add:function(a){var b=a.handler;a.handler=function(a,d){a.target=d;b.apply(this, arguments)}}}});var r=jQuery;r.ajaxSettings.xdr=function(){return window.XDomainRequest?new window.XDomainRequest:null};var p=r.ajaxSettings.xdr();r.extend(r.support,{iecors:!!p});r.support.iecors&&r.ajaxTransport(function(a){return{send:function(b,d){var k=a.xdr();k.onload=function(){d(200,"OK",{text:k.responseText},{"Content-Type":k.contentType})};a.xhrFields&&(k.onerror=a.xhrFields.error,k.ontimeout=a.xhrFields.timeout);k.open(a.type,a.url);k.send(a.hasContent&&a.data||null)},abort:function(){xdr.abort()}}}); b._clearVars=function(){delete jQuery;delete f;delete b;java&&(delete J,delete JZ,delete java,delete Clazz,delete JavaObject,delete bhtest,delete xxxbhparams,delete xxxShowParams,delete c$,delete d$,delete w$,delete $_A,delete $_AB,delete $_AC,delete $_AD,delete $_AF,delete $_AI,delete $_AL,delete $_AS,delete $_Ab,delete $_B,delete $_C,delete $_D,delete $_E,delete $_F,delete $_G,delete $_H,delete $_I,delete $_J,delete $_K,delete $_L,delete $_M,delete $_N,delete $_O,delete $_P,delete $_Q,delete $_R, delete $_S,delete $_T,delete $_U,delete $_V,delete $_W,delete $_X,delete $_Y,delete $_Z,delete $_k,delete $_s,delete $t$)};var a=document,g=window,c={};c.ua=navigator.userAgent.toLowerCase();c.os=function(){for(var a=["linux","unix","mac","win"],b=a.length;b--;)if(-1!=c.ua.indexOf(a[b]))return a[b];return"unknown"};c.browser=function(){for(var a=c.ua,b="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),d=0;dnavigator.appVersion.indexOf("MSIE 8");c.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};c._webGLtest=0;c.supportsWebGL=function(){if(!b.featureDetection._webGLtest){var e;b.featureDetection._webGLtest=g.WebGLRenderingContext&& ((e=a.createElement("canvas")).getContext("webgl")||e.getContext("experimental-webgl"))?1:-1}return 0=c.browserVersion&&"mac"==g||"webkit"==c.browserName&&125.12>c.browserVersion||"msie"==c.browserName&&"mac"==g||"konqueror"==c.browserName&&3.3>=c.browserVersion)b=!1;return b};c.isFullyCompliant=function(){return c.compliantBrowser()&&c.supportsJava()};c.useIEObject="win"==c.os()&&"msie"==c.browserName&&5.5<=c.browserVersion;c.useHtml4Object="mozilla"==c.browserName&&5<=c.browserVersion||"opera"==c.browserName&&8<=c.browserVersion|| "webkit"==c.browserName&&412.2<=c.browserVersion;b.featureDetection=c;b._ajax=function(a){if(!a.async)return b.$ajax(a).responseText;b._ajaxQueue.push(a);1==b._ajaxQueue.length&&b._ajaxDone()};b._ajaxDone=function(){var a=b._ajaxQueue.shift();a&&b.$ajax(a)};b._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"]];b._getGrabberOptions=function(a,c){if(0==b._grabberOptions.length)return"";var d='', k='';1==b._grabberOptions.length?(d=""+d+'',k=""+k):d+="
";for(var d=d+'"+k).replace(/ID/g,a._id)+(c?c:"");return"
"+d};b._saveFile=function(a,c,d,k){var g=b._serverUrl;g&&(b.$attr("__jsmolform__", "action",g+"?"+(new Date).getMilliseconds()),b.$val("__jsmoldata__",d),b.$val("__jsmolfilename__",a),b.$val("__jsmolmimetype__",c),b.$val("__jsmolencoding__",k),b.$submit("__jsmolform__"),b.$val("__jsmoldata__",""))};b._getScriptForDatabase=function(a){return"$"==a?b.db._nciLoadScript:":"==a?b.db._pubChemLoadScript:b.db._fileLoadScript};b._setInfo=function(a,b,d){var k=[],c="";if(0==d.indexOf("ERROR"))c=d;else switch(b){case "=":b=d.split("");k=["
"];for(d=1;d"),k.push("");k.push("
"+b[d].substring(0,4)+""+b[d].split("Title>")[1].split("
");c=b.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=c;a._info=k.join("");a._showInfo(!0)};b._loadSuccess=function(a,c){c&&(b._ajaxDone(),c(a))};b._loadError=function(a){b._ajaxDone();b.say("Error connecting to server.");null!=a&&a()};b._isDatabaseCall=function(a){return 0<=b.db._databasePrefixes.indexOf(a.substring(0, 1))};b._getDirectDatabaseCall=function(a,c){if(c&&!b.featureDetection.supportsXhr2())return a;var d=2,k,g=b.db._DirectDatabaseCalls[a.substring(0,d)];g||(g=b.db._DirectDatabaseCalls[k=a.substring(0,--d)]);g&&":"==k&&(k=a.toLowerCase(),isNaN(parseInt(a.substring(1)))?0==k.indexOf(":smiles:")?(g+="?POST?smiles="+a.substring(8),a=":smiles"):0==k.indexOf(":cid:")?a=":cid/"+a.substring(5):(0==k.indexOf(":name:")?a=a.substring(5):0==k.indexOf(":cas:")&&(a=a.substring(4)),a=":name/"+encodeURIComponent(a.substring(1))): a=":cid/"+a.substring(1));return a=g?g.replace(/\%FILE/,a.substring(d)):a};b._getRawDataFromServer=function(a,c,d,k,g,j){a="?call=getRawDataFromDatabase&database="+a+"&query="+encodeURIComponent(c)+(g?"&encoding=base64":"")+(j?"":"&script="+encodeURIComponent(b._getScriptForDatabase(a)));return b._contactServer(a,d,k)};b._getInfoFromDatabase=function(a,c,d){if("===="==c){var k=b.db._restQueryXml.replace(/QUERY/,d),k={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:b.db._restQueryUrl, data:encodeURIComponent(k)+"&req=browser",success:function(k){b._ajaxDone();b._extractInfoFromRCSB(a,c,d,k)},error:function(){b._loadError(null)},async:b._asynchronous};return b._ajax(k)}d="?call=getInfoFromDatabase&database="+c+"&query="+encodeURIComponent(d);return b._contactServer(d,function(d){b._setInfo(a,c,d)})};b._extractInfoFromRCSB=function(a,c,d,k){var g=k.length/5;if(0!=g&&4==d.length&&1!=g){d=d.toUpperCase();var j=k.indexOf(d);0g.indexOf("?")&&g==a._thisJmolModel)&&(a._thisJmolModel=g,"$"==k||":"==k?a._jmolFileType="MOL":"="==k&&(a._jmolFileType="PDB"),a._searchDatabase(c,k,d))}};b._searchDatabase=function(a,c,d,k){a._showInfo(!1);return 0<=c.indexOf("?")?(b._getInfoFromDatabase(a,d,c.split("?")[0]),!0):b.db._DirectDatabaseCalls[d]?(a._loadFile(d+c,k),!0):!1};b._syncBinaryOK="?";b._canSyncBinary=function(){if(self.VBArray)return b._syncBinaryOK=!1;if("?"!= b._syncBinaryOK)return b._syncBinaryOK;b._syncBinaryOK=!0;try{var a=new window.XMLHttpRequest;a.open("text","http://google.com",!1);a.hasOwnProperty("responseType")?a.responseType="arraybuffer":a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined")}catch(c){return System.out.println("JmolCore.js: synchronous binary file transfer is not available"),b._syncBinaryOK=!1}return!0};b._binaryTypes=".gz .jpg .png .zip .jmol .bin .smol .spartan .mrc .pse".split(" ");b._isBinaryUrl=function(a){for(var c= b._binaryTypes.length;0<=--c;)if(0<=a.indexOf(b._binaryTypes[c]))return!0;return!1};b._getFileData=function(a){var c=b._isBinaryUrl(a)?"binary":"text",d="binary"==c&&!b._canSyncBinary(),k=0<=a.indexOf("?POST?");0==a.indexOf("file:/")&&0!=a.indexOf("file:///")&&(a="file://"+a.substring(5));var g=0>a.indexOf("://")||0==a.indexOf(document.location.protocol)&&0<=a.indexOf(document.location.host),j=b._isDirectCall(a);if(!g&&f.support.iecors||d||!g&&!j)return b._getRawDataFromServer("_",a,null,null,d,!0); c={dataType:c,async:!1};k?(c.type="POST",c.url=a.split("?POST?")[0],c.data=a.split("?POST?")[1]):c.url=a;a=b.$ajax(c);return self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response:a.responseText};b._isDirectCall=function(a){for(var c in b.db._DirectDatabaseCalls)if(0<=c.indexOf(".")&&0<=a.indexOf(c))return!0;return!1};b._cleanFileData=function(a){return 0<=a.indexOf("\r")&&0<=a.indexOf("\n")?a.replace(/\r\n/g,"\n"):0<=a.indexOf("\r")?a.replace(/\r/g,"\n"):a};b._getFileType=function(a){var b= a.substring(0,1);if("$"==b||":"==b)return"MOL";if("="==b)return"="==a.substring(1,2)?"LCIF":"PDB";a=a.split(".").pop().toUpperCase();return a.substring(0,Math.min(a.length,3))};b._scriptLoad=function(a,b,d,c){var g=a._isJava||!a._noscript||1d.indexOf("%"))d+="px";if("string"!==typeof k||0>k.indexOf("%"))k+="px";var g="";a._coverImage&& (g=' onclick="Jmol.coverApplet(ID, false)" title="'+a._coverTitle+'"',g='
"+('")+"
");var j=!c&& !b._formdiv?'':"";j&&(b._formdiv="__jsmolform__");return(c? '
IMG
':'
\t\t\t\t\t\t
'+ j).replace(/IMG/,g).replace(/Hpx/g,d).replace(/Wpx/g,k).replace(/ID/g,a._id)};b._documentWrite=function(a){if(b._document){if(b._isXHTML&&!b._XhtmlElement){var c=document.getElementsByTagName("script");b._XhtmlElement=c.item(c.length-1);b._XhtmlAppendChild=!1}b._XhtmlElement?b._domWrite(a):b._document.write(a);return null}return a};b._domWrite=function(a){for(var c=[0];c[0]d[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var d=[],c=a.length-1;0<=c;c--)for(var g=0,j=a[c].length;gd?-1:1,0,c]);return!1});b.$bind(a,"contextmenu",function(){return!1});b.$bind(a,"mouseout",function(){a.applet._applet&&a.applet._applet.viewer.startHoverWatcher(!1)});b.$bind(a,"mouseenter",function(c){a.applet._applet&&a.applet._applet.viewer.startHoverWatcher(!0);if(0===c.buttons||0===c.which){a.isDragging=!1;c=b._jsGetXY(a,c);if(!c)return!1;a.applet._processEvent(502, c)}});a.applet._is2D&&b.$resize(function(){a.applet&&a.applet._resize()});b.$bind("body","mouseup touchend",function(){a.applet&&(a.isDragging=!1)})};b._jsUnsetMouse=function(a){a.applet=null;b.$bind(a,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null)};b._setDraggable=function(a){a=a.prototype;a.setContainer=function(a){this.container=a;this.ignoreMouse=this.isDragging=!1;var b=this;a.bind("mousedown touchstart",function(a){if(b.ignoreMouse)return b.ignoreMouse= !1,!0;b.isDragging=!0;b.pageX=a.pageX;b.pageY=a.pageY;return!1});a.bind("mousemove touchmove",function(a){if(b.isDragging)return b.mouseMove(a),!1});a.bind("mouseup touchend",function(a){b.mouseUp(a)})};a.mouseUp=function(a){if(this.isDragging)return this.pageX0+=a.pageX-this.pageX,this.pageY0+=a.pageY-this.pageY,this.isDragging=!1};a.setPosition=function(){if(null===b._mousePageX){var a=b.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));b._mousePageX=a.left;b._mousePageY=a.top}this.pageX0= b._mousePageX;this.pageY0=b._mousePageY;this.container.css({top:b._mousePageY+"px",left:b._mousePageX+"px"})};a.mouseMove=function(a){this.isDragging&&this.container.css({top:this.pageY0+(a.pageY-this.pageY)+"px",left:this.pageX0+(a.pageX-this.pageX)+"px"})};a.dragBind=function(a){this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");if(a){var b=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol", function(a,c,e){b.mouseMove(e)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,c,e){b.mouseUp(e)})}}}})(Jmol,jQuery); (function(b){b._getCanvas=function(f,l,j,r,p){var a=null;r&&b.featureDetection.supportsWebGL()&&(b._Canvas3D.prototype=b._jsSetPrototype(new b._Applet(f,l,"",!0)),GLmol.setRefresh(b._Canvas3D.prototype),a=new b._Canvas3D(f,l,null,j));p&&null==a&&(b._Canvas2D.prototype=b._jsSetPrototype(new b._Applet(f,l,"",!0)),a=new b._Canvas2D(f,l,null,j));return a};b._Canvas2D=function(f,l,j,r){this._syncId=(""+Math.random()).substring(3);this._id=f;this._is2D=!0;this._isJava=!1;this._aaScale=1;this._jmolType= "Jmol._Canvas2D (JSmol)";this._platform="J.awtjs2d.Platform";if(r)return this;window[f]=this;this._createCanvas(f,l,j,null);if(!b._document||this._deferApplet)return this;this._init();return this};b._jsSetPrototype=function(f){f._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};f._cover=function(f){if(f||!this._deferApplet)this._displayCoverImage(f);else{var j=this._coverScript?this._coverScript:"";this._coverScript="";this._deferUncover&&(j+=";refresh;javascript "+ this._id+"._displayCoverImage(false)");this._script(j,!0);this._deferUncover&&"activate 3D model"==this._coverTitle&&(b._getElement(this,"coverimage").title="3D model is loading...");this._start();this._deferUncover||this._displayCoverImage(f);this._init&&this._init()}};f._displayCoverImage=function(f){this._coverImage&&this._isCovered!=f&&(this._isCovered=f,b._getElement(this,"coverdiv").style.display=f?"block":"none")};f._createCanvas=function(f,j,r,p){b._setObject(this,f,j);p&&(this._GLmol=p,this._GLmol.applet= this,this._GLmol.id=this._id);p=b._getWrapper(this,!0);this._deferApplet||(b._document?(b._documentWrite(p),this._getCanvas(!1),p=""):(this._deferApplet=!0,p+='