function RenderSparklinePrice(){if($("#sparklines-price").length>0){var n=$("#sparklines-price").attr("change");$("#sparklines-price").sparkline("html",{width:$("#sparklines-price").parent().width().toString()+"px",height:"64px",lineWidth:2,fillColor:"#ffffff",lineColor:n=="none"?"#808080":n=="up"?"#3fd03f":"#ff2200",spotColor:"#b2b2b2",minSpotColor:"#b2b2b2",maxSpotColor:"#b2b2b2",highlightSpotColor:n=="none"?"#555":n=="up"?"#3ff04f":"#ff0000",spotRadius:3})}}function ShowCoinMenu(n){$("#cryptocurrency-menu-list").toggle();var t=50;t=$("#cryptocurrency-menu-list").is(":visible")?200:50,n===!0?$("#cryptocurrency-menu-bg").animate({height:t},250,function(){}):$("#cryptocurrency-menu-bg").css("height",t)}function ResizeSparkPriceCharts(){}function launchWindow(n){var r,u,t,i;$(window).width()<768&&($("#adModalImage").attr("src",image300),$(n).css("height",250).css("width",300),$("#popOverSponserDisclaimer").css("top",260),$("#adModalLink").attr("href",linkMobile)),r=$(document).height(),u=$(window).width(),$("#mask").css({width:u,height:r}),$("#mask").fadeTo("fast",.5),$("#mask").fadeIn(100),t=$(window).height(),i=$(window).width(),$(n).css("top",t/2-$(n).height()/2),$(n).css("left",i/2-$(n).width()/2),$(n).fadeIn(500)}function ResizeMask(){var f=$("#mask"),e=f.is(":visible"),n,u,i,t,r;e&&(n=$("#dialog"),$(window).width()<768?($("#adModalImage").attr("src",image300),$("#dialog").css("height",250).css("width",300),$("#popOverSponserDisclaimer").css("top",260),$("#adModalLink").attr("href",linkMobile)):$(window).width()>=768&&($("#adModalImage").attr("src",image420),$("#dialog").css("height",350).css("width",420),$("#popOverSponserDisclaimer").css("top",360),$("#adModalLink").attr("href",linkDesktop)),console.log($("#adModalLink").attr("href")),u=$(document).height(),i=$(window).width(),$("#mask").css({width:i,height:u}),t=$(window).height(),r=$(window).width(),n.css("top",t/2-n.height()/2),n.css("left",r/2-n.width()/2))}function BindScrollTop(){$("body").append("<div class='scrollTop' style='display:none;'></div>"),$(".scrollTop").fadeIn("fast"),$(".scrollTop").unbind("click"),$(".scrollTop").click(function(){$("html, body").animate({scrollTop:0},500),$(".scrollTop").fadeOut("fast"),$(".scrollTop").remove()}),$(".scrollTop:not(:first)").remove()}function tcad(n){$.ajax({method:"POST",url:"/ad/rc",data:{atk:n}}).done(function(){})}function tiad(n){$.ajax({method:"POST",url:"/ad/ri",data:{atk:n}}).done(function(){})}function LoadDiffChartData(n,t,i){$.post("/ajax/diffchartdata",{coinId:t,t:i},function(){}).done(function(t){t!=null&&$(n).highcharts("StockChart",{chart:{backgroundColor:"#ffffff"},rangeSelector:{buttons:[{type:"day",count:1,text:"1d"},{type:"week",count:1,text:"1w"},{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"year",count:1,text:"1y"},{type:"year",count:3,text:"3y"},{type:"all",text:"All"}],selected:2},colors:["#F6B263"],xAxis:{type:"datetime",ordinal:!1},title:{enabled:!1},credits:{enabled:!1},plotOptions:{series:{fillColor:{linearGradient:[0,0,0,300],stops:[[0,"#F9EFE4"],[1,"#FAFAFA"]]},lineWidth:2}},series:[{name:"Difficulty",data:t,type:"area",threshold:null,tooltip:{valueDecimals:8}}],yAxis:{labels:{formatter:function(){var n="";return this.value==0?n="0":this.value>0&&this.value<1e3?n=Number(this.value):this.value>=1e3&&this.value<1e6?n=Number(this.value/1e3)+" K":this.value>=1e6&&this.value<1e9?n=Number(this.value/1e6)+" M":this.value>=1e9&&this.value<1e12?n=Number(this.value/1e9)+" G":this.value>=1e12&&this.value<1e15?n=Number(this.value/1e12)+" T":this.value>=1e15&&this.value<1000000000000000000?n=Number(this.value/1e15)+" P":this.value>=1000000000000000000&&(n=Number(this.value/1000000000000000000)+" E"),n}}},tooltip:{formatter:function(){var n="",i,t;return this.y==0?n="no data for this time period":this.y>0&&this.y<1e3?n=parseFloat(this.y).toFixed(4):this.y>=1e3&&this.y<1e6?n=parseFloat(this.y/1e3).toFixed(4)+" K":this.y>=1e6&&this.y<1e9?n=parseFloat(this.y/1e6).toFixed(4)+" M":this.y>=1e9&&this.y<1e12?n=parseFloat(this.y/1e9).toFixed(4)+" G":this.y>=1e12&&this.y<1e15?n=parseFloat(this.y/1e12).toFixed(4)+" T":this.y>=1e15&&this.y<1000000000000000000?n=parseFloat(this.y/1e15).toFixed(4)+" P":this.y>=1000000000000000000&&(n=parseFloat(this.y/1000000000000000000).toFixed(4)+" E"),i=new Date(this.x),t=i.toUTCString(),n='<small style="font-size:7.5pt;">'+t+"</small><br /><b>Difficulty: </b>"+n}}},function(n){n.renderer.image("https://www.coinwarz.com/content/v3/images/coinwarz-logo-charts.png",wmx,wmy,163,28).attr({zIndex:10}).add()})}).fail(function(){console.log("oops, there was an error"),$(n).html("<h2>&nbsp;Chart data failed to load. Please try again.</h2>")}).always(function(){})}function LoadHashrateChartData(n,t,i,r){$.post("/ajax/networkhashratechartdata",{coinId:t,t:i},function(){}).done(function(t){t!=null&&$(n).highcharts("StockChart",{chart:{backgroundColor:"#ffffff"},rangeSelector:{buttons:[{type:"day",count:1,text:"1d"},{type:"week",count:1,text:"1w"},{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"year",count:1,text:"1y"},{type:"year",count:3,text:"3y"},{type:"all",text:"All"}],selected:r},colors:["#F6B263"],xAxis:{type:"datetime",ordinal:!1},title:{enabled:!1},credits:{enabled:!1},plotOptions:{series:{fillColor:{linearGradient:[0,0,0,300],stops:[[0,"#F9EFE4"],[1,"#FAFAFA"]]},lineWidth:2}},series:[{name:"Network Hashrate",data:t,threshold:null,type:"area",tooltip:{valueDecimals:8}}],yAxis:{labels:{formatter:function(){var n="";return this.value==0?n="0":this.value>0&&this.value<1e3?n=Number(this.value)+" H/s":this.value>=1e3&&this.value<1e6?n=Number(this.value/1e3)+" KH/s":this.value>=1e6&&this.value<1e9?n=Number(this.value/1e6)+" MH/s":this.value>=1e9&&this.value<1e12?n=Number(this.value/1e9)+" GH/s":this.value>=1e12&&this.value<1e15?n=Number(this.value/1e12)+" TH/s":this.value>=1e15&&this.value<1000000000000000000?n=Number(this.value/1e15)+" PH/s":this.value>=1000000000000000000&&(n=Number(this.value/1000000000000000000)+" EH/s"),n}}},tooltip:{formatter:function(){var n="",i,t;return this.y==0?n="no data for this time period":this.y>0&&this.y<1e3?n=parseFloat(this.y).toFixed(4)+" H/s":this.y>=1e3&&this.y<1e6?n=parseFloat(this.y/1e3).toFixed(4)+" KH/s":this.y>=1e6&&this.y<1e9?n=parseFloat(this.y/1e6).toFixed(4)+" MH/s":this.y>=1e9&&this.y<1e12?n=parseFloat(this.y/1e9).toFixed(4)+" GH/s":this.y>=1e12&&this.y<1e15?n=parseFloat(this.y/1e12).toFixed(4)+" TH/s":this.y>=1e15&&this.y<1000000000000000000?n=parseFloat(this.y/1e15).toFixed(4)+" PH/s":this.y>=1000000000000000000&&(n=parseFloat(this.y/1000000000000000000).toFixed(4)+" EH/s"),i=new Date(this.x),t=i.toUTCString(),n='<small style="font-size:7.5pt;">'+t+"</small><br /><b>Hashrate: </b>"+n}}},function(n){n.renderer.image("https://www.coinwarz.com/content/v3/images/coinwarz-logo-charts.png",wmx,wmy,163,28).attr({zIndex:10}).add()})}).fail(function(){console.log("oops, there was an error"),$(n).html("<h2>&nbsp;Chart data failed to load. Please try again.</h2>")}).always(function(){})}function LoadHashrateYearChartData(n,t,i,r){$.post("/ajax/networkhashrateyearchartdata",{coinId:t,t:i,year:r},function(){}).done(function(t){t!=null&&$(n).highcharts("StockChart",{chart:{backgroundColor:"#ffffff"},rangeSelector:{buttons:[{type:"day",count:1,text:"1d"},{type:"week",count:1,text:"1w"},{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"year",count:1,text:"1y"},{type:"year",count:3,text:"3y"},{type:"all",text:"All"}],selected:7},colors:["#F6B263"],xAxis:{type:"datetime",ordinal:!1},title:{enabled:!1},credits:{enabled:!1},plotOptions:{series:{fillColor:{linearGradient:[0,0,0,300],stops:[[0,"#F9EFE4"],[1,"#FAFAFA"]]},lineWidth:2}},series:[{name:"Network Hashrate",data:t,threshold:null,type:"area",tooltip:{valueDecimals:8}}],yAxis:{labels:{formatter:function(){var n="";return this.value==0?n="0":this.value>0&&this.value<1e3?n=Number(this.value)+" H/s":this.value>=1e3&&this.value<1e6?n=Number(this.value/1e3)+" KH/s":this.value>=1e6&&this.value<1e9?n=Number(this.value/1e6)+" MH/s":this.value>=1e9&&this.value<1e12?n=Number(this.value/1e9)+" GH/s":this.value>=1e12&&this.value<1e15?n=Number(this.value/1e12)+" TH/s":this.value>=1e15&&this.value<1000000000000000000?n=Number(this.value/1e15)+" PH/s":this.value>=1000000000000000000&&(n=Number(this.value/1000000000000000000)+" EH/s"),n}}},tooltip:{formatter:function(){var n="",i,t;return this.y==0?n="no data for this time period":this.y>0&&this.y<1e3?n=parseFloat(this.y).toFixed(4)+" H/s":this.y>=1e3&&this.y<1e6?n=parseFloat(this.y/1e3).toFixed(4)+" KH/s":this.y>=1e6&&this.y<1e9?n=parseFloat(this.y/1e6).toFixed(4)+" MH/s":this.y>=1e9&&this.y<1e12?n=parseFloat(this.y/1e9).toFixed(4)+" GH/s":this.y>=1e12&&this.y<1e15?n=parseFloat(this.y/1e12).toFixed(4)+" TH/s":this.y>=1e15&&this.y<1000000000000000000?n=parseFloat(this.y/1e15).toFixed(4)+" PH/s":this.y>=1000000000000000000&&(n=parseFloat(this.y/1000000000000000000).toFixed(4)+" EH/s"),i=new Date(this.x),t=i.toUTCString(),n='<small style="font-size:7.5pt;">'+t+"</small><br /><b>Hashrate: </b>"+n}}},function(n){n.renderer.image("https://www.coinwarz.com/content/v3/images/coinwarz-logo-charts.png",wmx,wmy,163,28).attr({zIndex:10}).add()})}).fail(function(){console.log("oops, there was an error"),$(n).html("<h2>&nbsp;Chart data failed to load. Please try again.</h2>")}).always(function(){})}function LoadExchangeRateChartData(n,t,i){$.post("/ajax/exchangechartdata",{coinId:t,t:i},function(){}).done(function(t){if(t!=null){var i=[],r=[];$.each(t,function(n,t){r[n]=t.Exchange,i[n]={name:t.Exchange,data:t.ExchangeSnapshots,tooltip:{valueDecimals:8}}}),$(n).highcharts("StockChart",{chart:{},rangeSelector:{buttons:[{type:"day",count:1,text:"1d"},{type:"week",count:1,text:"1w"},{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"all",text:"All"}],selected:2},yAxis:{labels:{},plotLines:[{value:0,width:2,color:"silver"}]},plotOptions:{},tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',valueDecimals:8},series:i,credits:{enabled:!1},title:{enabled:!1}},function(n){n.renderer.image("https://www.coinwarz.com/content/v3/images/coinwarz-logo-charts.png",wmx,wmy,163,28).attr({zIndex:10}).add()})}}).fail(function(){console.log("oops, there was an error"),$(n).html("<h2>&nbsp;Chart data failed to load. Please try again.</h2>")}).always(function(){})}(function(n,t){function vi(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||"function"!==r&&(0===t||"number"==typeof t&&t>0&&t-1 in n)}function ne(n){var t=li[n]={};return i.each(n.match(s)||[],function(n,i){t[i]=!0}),t}function uu(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a="string"==typeof r,l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=tt.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),("object"==typeof r||"function"==typeof r)&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],null==h&&(h=s[i.camelCase(r)])):h=s,h}}function ou(n,t,r){if(i.acceptData(n)){var o,h,e,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=t in e?[t]:t.split(" ")),o=0,h=t.length;h>o;o++)delete e[t[o]];if(!(r?ci:i.isEmptyObject)(e))return}(r||(delete u[f].data,ci(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function cu(n,r,u){if(u===t&&1===n.nodeType){var f="data-"+r.replace(fu,"-$1").toLowerCase();if(u=n.getAttribute(f),"string"==typeof u){try{u="true"===u?!0:"false"===u?!1:"null"===u?null:+u+""===u?+u:eu.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function ci(n){var t;for(t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function ot(){return!0}function g(){return!1}function nf(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function rf(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if("string"==typeof t){var u=i.grep(n,function(n){return 1===n.nodeType});if(de.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function uf(n){var i=yu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function po(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function ir(n){var t=n.getAttributeNode("type");return n.type=(t&&t.specified)+"/"+n.type,n}function bi(n){var t=ko.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function ei(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function di(n,t){if(1===t.nodeType&&i.hasData(n)){var e,f,o,s=i._data(n),r=i._data(t,s),u=s.events;if(u){delete r.handle,r.events={};for(e in u)for(f=0,o=u[e].length;o>f;f++)i.event.add(t,e,u[e][f])}r.data&&(r.data=i.extend({},r.data))}}function wo(n,t){var r,f,u;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}"script"===r&&t.text!==n.text?(ir(t).text=n.text,bi(t)):"object"===r?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===r&&ti.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===r?t.defaultSelected=t.selected=n.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=n.defaultValue)}}function u(n,r){var s,e,h=0,f=typeof n.getElementsByTagName!==o?n.getElementsByTagName(r||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],s=n.childNodes||n;null!=(e=s[h]);h++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function ho(n){ti.test(n.type)&&(n.defaultChecked=n.checked)}function or(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=fr.length;i--;)if(t=fr[i]+r,t in n)return t;return u}function ut(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)}function yr(n,t){for(var e,r,o,f=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(f[u]=i._data(r,"olddisplay"),e=r.style.display,t?(f[u]||"none"!==e||(r.style.display=""),""===r.style.display&&ut(r)&&(f[u]=i._data(r,"olddisplay",ki(r.nodeName)))):f[u]||(o=ut(r),(e&&"none"!==e||!o)&&i._data(r,"olddisplay",o?e:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?f[u]||"":"none"));return n}function pr(n,t,i){var r=ge.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function wr(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+w[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+w[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function vr(n,t,r){var o=!0,u="width"===t?n.offsetWidth:n.offsetHeight,f=p(n),e=i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f);if(0>=u||null==u){if(u=y(n,t,f),(0>u||null==u)&&(u=n.style[t]),st.test(u))return u;o=e&&(i.support.boxSizingReliable||u===n.style[t]),u=parseFloat(u)||0}return u+wr(n,t,r||(e?"border":"content"),o,f)+"px"}function ki(n){var u=r,t=lr[n];return t||(t=wi(n,u),"none"!==t&&t||(ft=(ft||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(ft[0].contentWindow||ft[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=wi(n,u),ft.detach()),lr[n]=t),t}function wi(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function pi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||eo.test(n)?u(n,i):pi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)pi(n+"["+f+"]",t[f],r,u)}function br(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,e=0,f=t.toLowerCase().match(s)||[];if(i.isFunction(r))while(u=f[e++])"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function wu(n,r,u,f){function e(h){var c;return o[h]=!0,i.each(n[h]||[],function(n,i){var h=i(r,u,f);return"string"!=typeof h||s||o[h]?s?!(c=h):t:(r.dataTypes.unshift(h),e(h),!1)}),c}var o={},s=n===gt;return e(r.dataTypes[0])||!o["*"]&&e("*")}function ii(n,r){var f,u,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function af(n,i,r){var s,o,e,u,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);while("*"===f[0])f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}return e?(e!==f[0]&&f.unshift(e),r[e]):t}function vf(n,t){var o,r,i,e,u={},h=0,s=n.dataTypes.slice(),f=s[0];if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if("*"!==r){if("*"!==f&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]])){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function gr(){try{return new n.XMLHttpRequest}catch(t){}}function wf(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function ru(){return setTimeout(function(){nt=t}),nt=i.now()}function hf(n,t){i.each(t,function(t,i){for(var u=(it[t]||[]).concat(it["*"]),r=0,f=u.length;f>r;r++)if(u[r].call(n,t,i))return})}function pu(n,t,r){var h,s,o=0,l=vt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(s)return!1;for(var o=nt||ru(),i=Math.max(0,u.startTime+u.duration-o),h=i/u.duration||0,t=1-h,r=0,e=u.tweens.length;e>r;r++)u.tweens[r].run(t);return f.notifyWith(n,[u,t,i]),1>t&&e?i:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:nt||ru(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(s)return this;for(s=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),e=u.props;for(ff(e,u.opts.specialEasing);l>o;o++)if(h=vt[o].call(u,n,e,u.opts))return h;return hf(u,e),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function ff(n,t){var u,f,r,o,e;for(r in n)if(f=i.camelCase(r),o=t[f],u=n[r],i.isArray(u)&&(o=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),e=i.cssHooks[f],e&&"expand"in e){u=e.expand(u),delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=o)}else t[f]=o}function kf(n,t,r){var u,s,b,a,o,v,l,e,w,h=this,f=n.style,p={},y=[],c=n.nodeType&&ut(n);r.queue||(e=i._queueHooks(n,"fx"),null==e.unqueued&&(e.unqueued=0,w=e.empty.fire,e.empty.fire=function(){e.unqueued||w()}),e.unqueued++,h.always(function(){h.always(function(){e.unqueued--,i.queue(n,"fx").length||e.empty.fire()})})),1===n.nodeType&&("height"in t||"width"in t)&&(r.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===i.css(n,"display")&&"none"===i.css(n,"float")&&(i.support.inlineBlockNeedsLayout&&"inline"!==ki(n.nodeName)?f.zoom=1:f.display="inline-block")),r.overflow&&(f.overflow="hidden",i.support.shrinkWrapBlocks||h.always(function(){f.overflow=r.overflow[0],f.overflowX=r.overflow[1],f.overflowY=r.overflow[2]}));for(s in t)if(a=t[s],sf.exec(a)){if(delete t[s],v=v||"toggle"===a,a===(c?"hide":"show"))continue;y.push(s)}if(b=y.length)for(o=i._data(n,"fxshow")||i._data(n,"fxshow",{}),("hidden"in o)&&(c=o.hidden),v&&(o.hidden=!c),c?i(n).show():h.done(function(){i(n).hide()}),h.done(function(){var t;i._removeData(n,"fxshow");for(t in p)i.style(n,t,p[t])}),s=0;b>s;s++)u=y[s],l=h.createTween(u,c?o[u]:0),p[u]=o[u]||i.style(n,u),u in o||(o[u]=l.start,c&&(l.end=l.start,l.start="width"===u||"height"===u?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function ht(n,t){var u,i={height:n},r=0;for(t=t?1:0;4>r;r+=2-t)u=w[r],i["margin"+u]=i["padding"+u]=n;return t&&(i.opacity=i.width=n),i}function cr(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var yt,gi,o=typeof t,r=n.document,ae=n.location,ve=n.jQuery,le=n.$,ct={},tt=[],ui="1.9.1",gu=tt.concat,fi=tt.push,l=tt.slice,lu=tt.indexOf,he=ct.toString,rt=ct.hasOwnProperty,si=ui.trim,i=function(n,t){return new i.fn.init(n,t,gi)},pt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,s=/\S+/g,ce=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,be=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,iu=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ke=/^[\],:{}\s]*$/,we=/(?:^|:|,)(?:\s*\[)+/g,ye=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,pe=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,se=/^-ms-/,te=/-([\da-z])/gi,ie=function(n,t){return t.toUpperCase()},h=function(n){(r.addEventListener||"load"===n.type||"complete"===r.readyState)&&(su(),i.ready())},su=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",h,!1),n.removeEventListener("load",h,!1)):(r.detachEvent("onreadystatechange",h),n.detachEvent("onload",h))},li,eu,fu,oi,lt,d,b,kr,at;i.fn=i.prototype={jquery:ui,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if("string"==typeof n){if(e="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:be.exec(n),!e||!e[1]&&u)return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n);if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),iu.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1,this[0]=o}return this.context=r,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(n){return null==n?this.toArray():0>n?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:fi,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var u,s,r,e,h,c,n=arguments[0]||{},f=1,l=arguments.length,o=!1;for("boolean"==typeof n&&(o=n,n=arguments[1]||{},f=2),"object"==typeof n||i.isFunction(n)||(n={}),l===f&&(n=this,--f);l>f;f++)if(null!=(h=arguments[f]))for(e in h)u=n[e],r=h[e],n!==r&&(o&&r&&(i.isPlainObject(r)||(s=i.isArray(r)))?(s?(s=!1,c=u&&i.isArray(u)?u:[]):c=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(o,c,r)):r!==t&&(n[e]=r));return n},i.extend({noConflict:function(t){return n.$===i&&(n.$=le),t&&n.jQuery===i&&(n.jQuery=ve),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);i.isReady=!0,n!==!0&&--i.readyWait>0||(yt.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[he.call(n)]||"object":typeof n},isPlainObject:function(n){if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!rt.call(n,"constructor")&&!rt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}var r;for(r in n);return r===t||rt.call(n,r)},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},error:function(n){throw Error(n);},parseHTML:function(n,t,u){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(u=t,t=!1),t=t||r;var f=iu.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(r){return n.JSON&&n.JSON.parse?n.JSON.parse(r):null===r?r:"string"==typeof r&&(r=i.trim(r),r&&ke.test(r.replace(ye,"@").replace(pe,"]").replace(we,"")))?Function("return "+r)():(i.error("Invalid JSON: "+r),t)},parseXML:function(r){var u,f;if(!r||"string"!=typeof r)return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(se,"ms-").replace(te,ie)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,e=n.length,f=vi(n);if(i){if(f){for(;e>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(f){for(;e>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:si&&!si.call("﻿ ")?function(n){return null==n?"":si.call(n)}:function(n){return null==n?"":(n+"").replace(ce,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(vi(Object(n))?i.merge(r,"string"==typeof n?[n]:n):fi.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(lu)return lu.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if("number"==typeof f)for(;f>r;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var f,u=[],r=0,e=n.length;for(i=!!i;e>r;r++)f=!!t(n[r],r),i!==f&&u.push(n[r]);return u},map:function(n,t,i){var u,r=0,e=n.length,o=vi(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),null!=u&&(f[f.length]=u);return gu.apply([],f)},guid:1,proxy:function(n,r){var e,u,f;return"string"==typeof r&&(f=n[r],r=n,n=f),i.isFunction(n)?(e=l.call(arguments,2),u=function(){return n.apply(r||this,e.concat(l.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u):t},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=null==u;if("object"===i.type(u)){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;l>h;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return+new Date}}),i.ready.promise=function(t){if(!yt)if(yt=i.Deferred(),"complete"===r.readyState)setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",h,!1),n.addEventListener("load",h,!1);else{r.attachEvent("onreadystatechange",h),n.attachEvent("onload",h);var u=!1;try{u=null==n.frameElement&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}su(),i.ready()}}()}return yt.promise(t)},i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()}),gi=i(r),li={},i.Callbacks=function(n){n="string"==typeof n?li[n]||ne(n):i.extend({},n);var s,f,c,h,e,a,r=[],u=!n.once&&[],l=function(t){for(f=n.memory&&t,c=!0,e=a||0,a=0,h=r.length,s=!0;r&&h>e;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}s=!1,r&&(u?u.length&&l(u.shift()):f?r=[]:o.disable())},o={add:function(){if(r){var u=r.length;(function t(u){i.each(u,function(u,f){var e=i.type(f);"function"===e?n.unique&&o.has(f)||r.push(f):f&&f.length&&"string"!==e&&t(f)})})(arguments),s?h=r.length:f&&(a=u,l(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),s&&(h>=u&&h--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,r)>-1:!(!r||!r.length)},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||o.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],!r||c&&!u||(s?u.push(t):l(t)),this},fire:function(){return o.fireWith(this,arguments),this},fired:function(){return!!c}};return o},i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})}),n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add,o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock),t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this},t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var r=0,u=l.call(arguments),t=u.length,e=1!==t||n&&i.isFunction(n.promise)?t:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this,i[n]=arguments.length>1?l.call(arguments):r,i===s?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},s,c,o;if(t>1)for(s=Array(t),c=Array(t),o=Array(t);t>r;r++)u[r]&&i.isFunction(u[r].promise)?u[r].promise().done(h(r,o,u)).fail(f.reject).progress(h(r,c,s)):--e;return e||f.resolveWith(o,u),f.promise()}}),i.support=function(){var u,c,e,f,l,h,s,v,y,a,t=r.createElement("div");if(t.setAttribute("className","t"),t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=t.getElementsByTagName("*"),e=t.getElementsByTagName("a")[0],!c||!e||!c.length)return{};l=r.createElement("select"),s=l.appendChild(r.createElement("option")),f=t.getElementsByTagName("input")[0],e.style.cssText="top:1px;float:left;opacity:.5",u={getSetAttribute:"t"!==t.className,leadingWhitespace:3===t.firstChild.nodeType,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:"/a"===e.getAttribute("href"),opacity:/^0.5/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:!!f.value,optSelected:s.selected,enctype:!!r.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===r.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},f.checked=!0,u.noCloneChecked=f.cloneNode(!0).checked,l.disabled=!0,u.optDisabled=!s.disabled;try{delete t.test}catch(p){u.deleteExpando=!1}f=r.createElement("input"),f.setAttribute("value",""),u.input=""===f.getAttribute("value"),f.value="t",f.setAttribute("type","radio"),u.radioValue="t"===f.value,f.setAttribute("checked","t"),f.setAttribute("name","t"),h=r.createDocumentFragment(),h.appendChild(f),u.appendChecked=f.checked,u.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,t.attachEvent&&(t.attachEvent("onclick",function(){u.noCloneEvent=!1}),t.cloneNode(!0).click());for(a in{submit:!0,change:!0,focusin:!0})t.setAttribute(v="on"+a,"t"),u[a+"Bubbles"]=v in n||t.attributes[v].expando===!1;return t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",u.clearCloneStyle="content-box"===t.style.backgroundClip,i(function(){var s,f,i,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e=r.getElementsByTagName("body")[0];e&&(s=r.createElement("div"),s.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",e.appendChild(s).appendChild(t),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=t.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",y=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",u.reliableHiddenOffsets=y&&0===i[0].offsetHeight,t.innerHTML="",t.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",u.boxSizing=4===t.offsetWidth,u.doesNotIncludeMarginInBodyOffset=1!==e.offsetTop,n.getComputedStyle&&(u.pixelPosition="1%"!==(n.getComputedStyle(t,null)||{}).top,u.boxSizingReliable="4px"===(n.getComputedStyle(t,null)||{width:"4px"}).width,f=t.appendChild(r.createElement("div")),f.style.cssText=t.style.cssText=h,f.style.marginRight=f.style.width="0",t.style.width="1px",u.reliableMarginRight=!parseFloat((n.getComputedStyle(f,null)||{}).marginRight)),typeof t.style.zoom!==o&&(t.innerHTML="",t.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",u.inlineBlockNeedsLayout=3===t.offsetWidth,t.style.display="block",t.innerHTML="<div></div>",t.firstChild.style.width="5px",u.shrinkWrapBlocks=3!==t.offsetWidth,u.inlineBlockNeedsLayout&&(e.style.zoom=1)),e.removeChild(s),s=t=i=f=null)}),c=l=h=s=e=f=null,u}(),eu=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,fu=/([A-Z])/g,i.extend({cache:{},expando:"jQuery"+(ui+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ci(n)},data:function(n,t,i){return uu(n,t,i)},removeData:function(n,t){return ou(n,t)},_data:function(n,t,i){return uu(n,t,i,!0)},_removeData:function(n,t){return ou(n,t,!0)},acceptData:function(n){if(n.nodeType&&1!==n.nodeType&&9!==n.nodeType)return!1;var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}}),i.fn.extend({data:function(n,r){var s,f,u=this[0],o=0,e=null;if(n===t){if(this.length&&(e=i.data(u),1===u.nodeType&&!i._data(u,"parsedAttrs"))){for(s=u.attributes;s.length>o;o++)f=s[o].name,f.indexOf("data-")||(f=i.camelCase(f.slice(5)),cu(u,f,e[f]));i._data(u,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):i.access(this,function(r){return r===t?u?cu(u,n,i.data(u,n)):null:(this.each(function(){i.data(this,n,r)}),t)},null,r,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){i.removeData(this,n)})}}),i.extend({queue:function(n,r,u){var f;return n?(r=(r||"fx")+"queue",f=i._data(n,r),u&&(!f||i.isArray(u)?f=i._data(n,r,i.makeArray(u)):f.push(u)),f||[]):t},dequeue:function(n,t){t=t||"fx";var f=i.queue(n,t),e=f.length,u=f.shift(),r=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=f.shift(),e--),r.cur=u,u&&("fx"===t&&f.unshift("inprogress"),delete r.stop,u.call(n,o,r)),!e&&r&&r.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue"),i._removeData(n,r)})})}}),i.fn.extend({queue:function(n,r){var u=2;return"string"!=typeof n&&(r=n,n="fx",u--),u>arguments.length?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n),"fx"===n&&"inprogress"!==t[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,s=1,h=i.Deferred(),f=this,o=this.length,e=function(){--s||h.resolveWith(f,[f])};for("string"!=typeof n&&(r=n,n=t),n=n||"fx";o--;)u=i._data(f[o],n+"queueHooks"),u&&u.empty&&(s++,u.empty.add(e));return e(),h.promise(r)}});var k,hu,yi=/[\t\r\n]/g,df=/\r/g,gf=/^(?:input|select|textarea|button|object)$/i,ee=/^(?:a|area)$/i,dr=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,kt=/^(?:checked|selected)$/i,v=i.support.getSetAttribute,wt=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t,delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,f,o,u=0,c=this.length,h="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(h)for(e=(n||"").match(s)||[];c>u;u++)if(t=this[u],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(yi," "):" ")){for(o=0;f=e[o++];)0>r.indexOf(" "+f+" ")&&(r+=f+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,t,r,f,o,u=0,c=this.length,h=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(h)for(e=(n||"").match(s)||[];c>u;u++)if(t=this[u],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(yi," "):"")){for(o=0;f=e[o++];)while(r.indexOf(" "+f+" ")>=0)r=r.replace(" "+f+" "," ");t.className=n?i.trim(r):""}return this},toggleClass:function(n,t){var r=typeof n,u="boolean"==typeof t;return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if("string"===r)for(var e,l=0,h=i(this),f=t,c=n.match(s)||[];e=c[l++];)f=u?f:!h.hasClass(e),h[f?"addClass":"removeClass"](e);else(r===o||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var r=" "+n+" ",t=0,i=this.length;i>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(yi," ").indexOf(r)>=0)return!0;return!1},val:function(n){var u,r,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);1===this.nodeType&&(f=e?n.call(this,u,o.val()):n,null==f?f="":"number"==typeof f?f+="":i.isArray(f)&&(f=i.map(f,function(n){return null==n?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t?u:(u=f.value,"string"==typeof u?u.replace(df,""):null==u?"":u)):void 0}}),i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,f="select-one"===n.type||0>r,h=f?null:[],s=f?r+1:o.length,u=0>r?s:f?r:0;s>u;u++)if(t=o[u],!(!t.selected&&u!==r||(i.support.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),f)return e;h.push(e)}return h},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attr:function(n,r,u){var e,h,f,s=n.nodeType;if(n&&3!==s&&8!==s&&2!==s)return typeof n.getAttribute===o?i.prop(n,r,u):(h=1!==s||!i.isXMLDoc(n),h&&(r=r.toLowerCase(),e=i.attrHooks[r]||(dr.test(r)?hu:k)),u===t?e&&h&&"get"in e&&null!==(f=e.get(n,r))?f:(typeof n.getAttribute!==o&&(f=n.getAttribute(r)),null==f?t:f):null!==u?e&&h&&"set"in e&&(f=e.set(n,u,r))!==t?f:(n.setAttribute(r,u+""),u):(i.removeAttr(n,r),t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(s);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,dr.test(r)?!v&&kt.test(r)?n[i.camelCase("default-"+r)]=n[u]=!1:n[u]=!1:i.attr(n,r,""),n.removeAttribute(v?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&"radio"===t&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var o,f,s,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return s=1!==e||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(o=f.set(n,u,r))!==t?o:n[r]=u:f&&"get"in f&&null!==(o=f.get(n,r))?o:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):gf.test(n.nodeName)||ee.test(n.nodeName)&&n.href?0:t}}}}),hu={get:function(n,r){var e=i.prop(n,r),f="boolean"==typeof e&&n.getAttribute(r),u="boolean"==typeof e?wt&&v?null!=f:kt.test(r)?n[i.camelCase("default-"+r)]:!!f:n.getAttributeNode(r);return u&&u.value!==!1?r.toLowerCase():t},set:function(n,t,r){return t===!1?i.removeAttr(n,r):wt&&v||!kt.test(r)?n.setAttribute(!v&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}},wt&&v||(i.attrHooks.value={get:function(n,r){var u=n.getAttributeNode(r);return i.nodeName(n,"input")?n.defaultValue:u&&u.specified?u.value:t},set:function(n,r,u){return i.nodeName(n,"input")?(n.defaultValue=r,t):k&&k.set(n,r,u)}}),v||(k=i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&("id"===i||"name"===i||"coords"===i?""!==r.value:r.specified)?r.value:t},set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="","value"===r||i===n.getAttribute(r)?i:t}},i.attrHooks.contenteditable={get:k.get,set:function(n,t,i){k.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{set:function(n,i){return""===i?(n.setAttribute(r,"auto"),i):t}})})),i.support.hrefNormalized||(i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return null==i?t:i}})}),i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}})),i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}}),i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),i.support.enctype||(i.propFix.enctype="encoding"),i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return null===n.getAttribute("value")?"on":n.value}}}),i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,r){return i.isArray(r)?n.checked=i.inArray(i(n).val(),r)>=0:t}})});var bt=/^(?:input|select|textarea)$/i,oe=/^key/,fe=/^(?:mouse|contextmenu)|click/,nu=/^(?:focusinfocus|focusoutblur)$/,tu=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var b,w,d,p,c,l,a,v,h,k,g,y=i._data(n);if(y){for(u.handler&&(p=u,u=p.handler,e=p.selector),u.guid||(u.guid=i.guid++),(w=y.events)||(w=y.events={}),(l=y.handle)||(l=y.handle=function(n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)},l.elem=n),r=(r||"").match(s)||[""],d=r.length;d--;)b=tu.exec(r[d])||[],h=g=b[1],k=(b[2]||"").split(".").sort(),c=i.event.special[h]||{},h=(e?c.delegateType:c.bindType)||h,c=i.event.special[h]||{},a=i.extend({type:h,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},p),(v=w[h])||(v=w[h]=[],v.delegateCount=0,c.setup&&c.setup.call(n,f,k,l)!==!1||(n.addEventListener?n.addEventListener(h,l,!1):n.attachEvent&&n.attachEvent("on"+h,l))),c.add&&(c.add.call(n,a),a.handler.guid||(a.handler.guid=u.guid)),e?v.splice(v.delegateCount++,0,a):v.push(a),i.event.global[h]=!0;n=null}},remove:function(n,t,r,u,f){var y,o,c,b,p,a,h,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(s)||[""],p=t.length;p--;)if(c=tu.exec(t[p])||[],e=k=c[1],w=(c[2]||"").split(".").sort(),e){for(h=i.event.special[e]||{},e=(u?h.delegateType:h.bindType)||e,l=a[e]||[],c=c[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||c&&!c.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,h.remove&&h.remove.call(n,o));b&&!l.length&&(h.teardown&&h.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var a,v,h,w,l,c,b,p=[e||r],s=rt.call(u,"type")?u.type:u,y=rt.call(u,"namespace")?u.namespace.split("."):[];if(h=c=e=e||r,3!==e.nodeType&&8!==e.nodeType&&!nu.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(y=s.split("."),s=y.shift(),y.sort()),v=0>s.indexOf(":")&&"on"+s,u=u[i.expando]?u:new i.Event(s,"object"==typeof u&&u),u.isTrigger=!0,u.namespace=y.join("."),u.namespace_re=u.namespace?RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=null==f?[u]:i.makeArray(f,[u]),l=i.event.special[s]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(w=l.delegateType||s,nu.test(w+s)||(h=h.parentNode);h;h=h.parentNode)p.push(h),c=h;c===(e.ownerDocument||r)&&p.push(c.defaultView||c.parentWindow||n)}for(b=0;(h=p[b++])&&!u.isPropagationStopped();)u.type=b>1?w:l.bindType||s,a=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),a&&a.apply(h,f),a=v&&h[v],a&&i.acceptData(h)&&a.apply&&a.apply(h,f)===!1&&u.preventDefault();if(u.type=s,!(o||u.isDefaultPrevented()||l._default&&l._default.apply(e.ownerDocument,f)!==!1||"click"===s&&i.nodeName(e,"a")||!i.acceptData(e)||!v||!e[s]||i.isWindow(e))){c=e[v],c&&(e[v]=null),i.event.triggered=s;try{e[s]()}catch(k){}i.event.triggered=t,c&&(e[v]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var s,e,r,f,h,c=[],o=l.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(o[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(c=i.event.handlers.call(this,n,a),s=0;(f=c[s++])&&!n.isPropagationStopped();)for(n.currentTarget=f.elem,h=0;(r=f.handlers[h++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(f.elem,o),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,r){var e,s,f,h,c=[],o=r.delegateCount,u=n.target;if(o&&u.nodeType&&(!n.button||"click"!==n.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==n.type)){for(f=[],h=0;o>h;h++)s=r[h],e=s.selector+" ",f[e]===t&&(f[e]=s.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(s);f.length&&c.push({elem:u,handlers:f})}return r.length>o&&c.push({elem:this,handlers:r.slice(o)}),c},fix:function(n){if(n[i.expando])return n;var o,s,e,f=n.type,u=n,t=this.fixHooks[f];for(t||(this.fixHooks[f]=t=fe.test(f)?this.mouseHooks:oe.test(f)?this.keyHooks:{}),e=t.props?this.props.concat(t.props):this.props,n=new i.Event(u),o=e.length;o--;)s=e[o],n[s]=u[s];return n.target||(n.target=u.srcElement||r),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,u):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var f,s,u,e=i.button,o=i.fromElement;return null==n.pageX&&null!=i.clientX&&(s=n.target.ownerDocument||r,u=s.documentElement,f=s.body,n.pageX=i.clientX+(u&&u.scrollLeft||f&&f.scrollLeft||0)-(u&&u.clientLeft||f&&f.clientLeft||0),n.pageY=i.clientY+(u&&u.scrollTop||f&&f.scrollTop||0)-(u&&u.clientTop||f&&f.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?i.toElement:o),n.which||e===t||(n.which=1&e?1:2&e?3:4&e?2:0),n}},special:{load:{noBubble:!0},click:{trigger:function(){return i.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){return this===r.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f),f.isDefaultPrevented()&&r.preventDefault()}},i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))},i.Event=function(n,r){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?ot:g):this.type=n,r&&i.extend(this,r),this.timeStamp=n&&n.timeStamp||i.now(),this[i.expando]=!0,t):new i.Event(n,r)},i.Event.prototype={isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=ot,n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=ot,n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ot,this.stopPropagation()}},i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var f,e=this,r=n.relatedTarget,u=n.handleObj;return(!r||r!==e&&!i.contains(e,r))&&(n.type=u.origType,f=u.handler.apply(this,arguments),n.type=t),f}}}),i.support.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:(i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))}),t)},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:(i.event.remove(this,"._submit"),t)}}),i.support.changeBubbles||(i.event.special.change={setup:function(){return bt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1),i.event.simulate("change",this,n,!0)})),!1):(i.event.add(this,"beforeactivate._change",function(n){var t=n.target;bt.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))}),t)},handle:function(n){var i=n.target;return this!==i||n.isSimulated||n.isTrigger||"radio"!==i.type&&"checkbox"!==i.type?n.handleObj.handler.apply(this,arguments):t},teardown:function(){return i.event.remove(this,"._change"),!bt.test(this.nodeName)}}),i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var f=0,u=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){0==f++&&r.addEventListener(n,u,!0)},teardown:function(){0==--f&&r.removeEventListener(n,u,!0)}}}),i.fn.extend({on:function(n,r,u,f,e){var s,o;if("object"==typeof n){"string"!=typeof r&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(null==u&&null==f?(f=r,u=r=t):null==f&&("string"==typeof r?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=g;else if(!f)return this;return 1===e&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"==typeof n){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||"function"==typeof r)&&(u=r,r=t),u===!1&&(u=g),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,r){var u=this[0];return u?i.event.trigger(n,r,u,!0):t}}),function(n,t){function ri(n){return cr.test(n+"")}function ii(){var n,t=[];return n=function(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}}function c(n){return n[f]=!0,n}function b(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}}function u(n,t,i,r){var y,u,e,v,w,c,b,h,d,p;if((t?t.ownerDocument||t:k)!==s&&ft(t),t=t||s,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(!l&&!r){if(y=lr.exec(n))if(e=y[1]){if(9===v){if(u=t.getElementById(e),!u||!u.parentNode)return i;if(u.id===e)return i.push(u),i}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(e))&&et(t,u)&&u.id===e)return i.push(u),i}else{if(y[2])return it.apply(i,rt.call(t.getElementsByTagName(n),0)),i;if((e=y[3])&&o.getByClassName&&t.getElementsByClassName)return it.apply(i,rt.call(t.getElementsByClassName(e),0)),i}if(o.qsa&&!a.test(n)){if(b=!0,h=f,d=t,p=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(c=vt(n),(b=t.getAttribute("id"))?h=b.replace(sr,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",w=c.length;w--;)c[w]=h+lt(c[w]);d=kt.test(n)&&t.parentNode||t,p=c.join(",")}if(p)try{return it.apply(i,rt.call(d.querySelectorAll(p),0)),i}catch(g){}finally{b||t.removeAttribute("id")}}}return wi(n.replace(ct,"$1"),t,i,r)}function si(n,t){var i=t&&n,r=i&&(~t.sourceIndex||ai)-(~n.sourceIndex||ai);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function gi(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ki(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function d(n){return c(function(t){return t=+t,c(function(i,r){for(var u,e=n([],i.length,t),f=e.length;f--;)i[u=e[f]]&&(i[u]=!(r[u]=i[u]))})})}function vt(n,t){var e,f,c,o,i,h,s,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],s=r.preFilter;i;){(!e||(f=nr.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(c=[])),e=!1,(f=tr.exec(i))&&(e=f.shift(),c.push({value:e,type:f[0].replace(ct," ")}),i=i.slice(e.length));for(o in r.filter)!(f=ht[o].exec(i))||s[o]&&!(f=s[o](f))||(e=f.shift(),c.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function lt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ni(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=rr++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var c,s,h,l=y+" "+e;if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u)if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===l){if((c=s[1])===!0||c===pt)return c===!0}else if(s=h[r]=[l],s[1]=n(t,i,o)||pt,s[1]===!0)return!0}}function gt(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function at(n,t,i,r,u){for(var e,o=[],f=0,h=n.length,s=null!=t;h>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),s&&t.push(f));return o}function dt(n,t,i,r,u,e){return r&&!r[f]&&(r=dt(r)),u&&!u[f]&&(u=dt(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||bi(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?b:at(b,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=at(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?ti.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=at(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):it.apply(e,h)})}function bt(n){for(var h,u,i,o=n.length,s=r.relative[n[0].type],c=s||r.relative[" "],t=s?1:0,l=ni(function(n){return n===h},c,!0),a=ni(function(n){return ti.call(h,n)>-1},c,!0),e=[function(n,t,i){return!s&&(i||t!==st)||((h=t).nodeType?l(n,t,i):a(n,t,i))}];o>t;t++)if(u=r.relative[n[t].type])e=[ni(gt(e),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[f]){for(i=++t;o>i;i++)if(r.relative[n[i].type])break;return dt(t>1&&gt(e),t>1&&lt(n.slice(0,t-1)).replace(ct,"$1"),u,i>t&&bt(n.slice(t,i)),o>i&&bt(n=n.slice(i)),o>i&&lt(n))}e.push(u)}return gt(e)}function di(n,t){var o=0,i=t.length>0,e=n.length>0,f=function(f,h,c,l,a){var w,nt,k,p=[],b=0,v="0",g=f&&[],d=null!=a,rt=st,ut=f||e&&r.find.TAG("*",a&&h.parentNode||h),tt=y+=null==rt?1:Math.random()||.1;for(d&&(st=h!==s&&h,pt=o);null!=(w=ut[v]);v++){if(e&&w){for(nt=0;k=n[nt++];)if(k(w,h,c)){l.push(w);break}d&&(y=tt,pt=++o)}i&&((w=!k&&w)&&b--,f&&g.push(w))}if(b+=v,i&&v!==b){for(nt=0;k=t[nt++];)k(g,p,h,c);if(f){if(b>0)while(v--)g[v]||p[v]||(p[v]=ur.call(l));p=at(p)}it.apply(l,p),d&&!f&&p.length>0&&b+t.length>1&&u.uniqueSort(l)}return d&&(y=tt,st=rt),g};return i?c(f):f}function bi(n,t,i){for(var r=0,f=t.length;f>r;r++)u(n,t[r],i);return i}function wi(n,t,i,u){var s,f,e,h,c,o=vt(n);if(!u&&1===o.length){if(f=o[0]=o[0].slice(0),f.length>2&&"ID"===(e=f[0]).type&&9===t.nodeType&&!l&&r.relative[f[1].type]){if(t=r.find.ID(e.matches[0].replace(w,p),t)[0],!t)return i;n=n.slice(f.shift().value.length)}for(s=ht.needsContext.test(n)?0:f.length;s--;){if(e=f[s],r.relative[h=e.type])break;if((c=r.find[h])&&(u=c(e.matches[0].replace(w,p),kt.test(f[0].type)&&t.parentNode||t))){if(f.splice(s,1),n=u.length&&lt(f),!n)return it.apply(i,rt.call(u,0)),i;break}}}return fi(n,o)(u,t,l,i,kt.test(n)),i}function oi(){}var nt,pt,r,yt,yi,fi,tt,st,ft,s,h,l,a,ut,ot,et,ei,f="sizzle"+-new Date,k=n.document,o={},y=0,rr=0,ci=ii(),li=ii(),hi=ii(),v=typeof t,ai=-2147483648,wt=[],ur=wt.pop,it=wt.push,rt=wt.slice,ti=wt.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},e="[\\x20\\t\\r\\n\\f]",g="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",pi=g.replace("w","w#"),fr="([*^$|!~]?=)",vi="\\["+e+"*("+g+")"+e+"*(?:"+fr+e+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+pi+")|)|)"+e+"*\\]",ui=":("+g+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+vi.replace(3,8)+")*)|.*)\\)|)",ct=RegExp("^"+e+"+|((?:^|[^\\\\])(?:\\\\.)*)"+e+"+$","g"),nr=RegExp("^"+e+"*,"+e+"*"),tr=RegExp("^"+e+"*([\\x20\\t\\r\\n\\f>+~])"+e+"*"),ir=RegExp(ui),er=RegExp("^"+pi+"$"),ht={ID:RegExp("^#("+g+")"),CLASS:RegExp("^\\.("+g+")"),NAME:RegExp("^\\[name=['\"]?("+g+")['\"]?\\]"),TAG:RegExp("^("+g.replace("w","w*")+")"),ATTR:RegExp("^"+vi),PSEUDO:RegExp("^"+ui),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+e+"*(even|odd|(([+-]|)(\\d*)n|)"+e+"*(?:([+-]|)"+e+"*(\\d+)|))"+e+"*\\)|)","i"),needsContext:RegExp("^"+e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+e+"*((?:-\\d)?\\d*)"+e+"*\\)|)(?=[^-]|$)","i")},kt=/[\x20\t\r\n\f]*[+~]/,cr=/^[^{]+\{\s*\[native code/,lr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ar=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,sr=/'|\\/g,hr=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,w=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,p=function(n,t){var i="0x"+t-65536;return i!==i?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(55296|i>>10,56320|1023&i)};try{rt.call(k.documentElement.childNodes,0)[0].nodeType}catch(vr){rt=function(n){for(var i,t=[];i=this[n++];)t.push(i);return t}}yi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1},ft=u.setDocument=function(n){var i=n?n.ownerDocument||n:k;return i!==s&&9===i.nodeType&&i.documentElement?(s=i,h=i.documentElement,l=yi(i),o.tagNameNoComments=b(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),o.attributes=b(function(n){n.innerHTML="<select></select>";var t=typeof n.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),o.getByClassName=b(function(n){return n.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",n.getElementsByClassName&&n.getElementsByClassName("e").length?(n.lastChild.className="e",2===n.getElementsByClassName("e").length):!1}),o.getByName=b(function(n){n.id=f+0,n.innerHTML="<a name='"+f+"'></a><div name='"+f+"'></div>",h.insertBefore(n,h.firstChild);var t=i.getElementsByName&&i.getElementsByName(f).length===2+i.getElementsByName(f+0).length;return o.getIdNotName=!i.getElementById(f),h.removeChild(n),t}),r.attrHandle=b(function(n){return n.innerHTML="<a href='#'></a>",n.firstChild&&typeof n.firstChild.getAttribute!==v&&"#"===n.firstChild.getAttribute("href")})?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},o.getIdNotName?(r.find.ID=function(n,t){if(typeof t.getElementById!==v&&!l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(w,p);return function(n){return n.getAttribute("id")===t}}):(r.find.ID=function(n,i){if(typeof i.getElementById!==v&&!l){var r=i.getElementById(n);return r?r.id===n||typeof r.getAttributeNode!==v&&r.getAttributeNode("id").value===n?[r]:t:[]}},r.filter.ID=function(n){var t=n.replace(w,p);return function(n){var i=typeof n.getAttributeNode!==v&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=o.tagNameNoComments?function(n,i){return typeof i.getElementsByTagName!==v?i.getElementsByTagName(n):t}:function(n,t){var i,u=[],f=0,r=t.getElementsByTagName(n);if("*"===n){while(i=r[f++])1===i.nodeType&&u.push(i);return u}return r},r.find.NAME=o.getByName&&function(n,i){return typeof i.getElementsByName!==v?i.getElementsByName(name):t},r.find.CLASS=o.getByClassName&&function(n,i){return typeof i.getElementsByClassName===v||l?t:i.getElementsByClassName(n)},ut=[],a=[":focus"],(o.qsa=ri(i.querySelectorAll))&&(b(function(n){n.innerHTML="<select><option selected=''></option></select>",n.querySelectorAll("[selected]").length||a.push("\\["+e+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),n.querySelectorAll(":checked").length||a.push(":checked")}),b(function(n){n.innerHTML="<input type='hidden' i=''/>",n.querySelectorAll("[i^='']").length&&a.push("[*^$]="+e+"*(?:\"\"|'')"),n.querySelectorAll(":enabled").length||a.push(":enabled",":disabled"),n.querySelectorAll("*,:x"),a.push(",.*:")})),(o.matchesSelector=ri(ot=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&b(function(n){o.disconnectedMatch=ot.call(n,"div"),ot.call(n,"[s!='']:x"),ut.push("!=",ui)}),a=RegExp(a.join("|")),ut=RegExp(ut.join("|")),et=ri(h.contains)||h.compareDocumentPosition?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},ei=h.compareDocumentPosition?function(n,t){var r;return n===t?(tt=!0,0):(r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t))?1&r||n.parentNode&&11===n.parentNode.nodeType?n===i||et(k,n)?-1:t===i||et(k,t)?1:0:4&r?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var u,r=0,s=n.parentNode,o=t.parentNode,f=[n],e=[t];if(n===t)return tt=!0,0;if(!s||!o)return n===i?-1:t===i?1:s?-1:o?1:0;if(s===o)return si(n,t);for(u=n;u=u.parentNode;)f.unshift(u);for(u=t;u=u.parentNode;)e.unshift(u);while(f[r]===e[r])r++;return r?si(f[r],e[r]):f[r]===k?-1:e[r]===k?1:0},tt=!1,[0,0].sort(ei),o.detectDuplicates=tt,s):s},u.matches=function(n,t){return u(n,null,null,t)},u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&ft(n),t=t.replace(hr,"='$1']"),!(!o.matchesSelector||l||ut&&ut.test(t)||a.test(t)))try{var i=ot.call(n,t);if(i||o.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(r){}return u(t,s,null,[n]).length>0},u.contains=function(n,t){return(n.ownerDocument||n)!==s&&ft(n),et(n,t)},u.attr=function(n,t){var i;return(n.ownerDocument||n)!==s&&ft(n),l||(t=t.toLowerCase()),(i=r.attrHandle[t])?i(n):l||o.attributes?n.getAttribute(t):((i=n.getAttributeNode(t))||n.getAttribute(t))&&n[t]===!0?t:i&&i.specified?i.value:null},u.error=function(n){throw Error("Syntax error, unrecognized expression: "+n);},u.uniqueSort=function(n){var u,r=[],t=1,i=0;if(tt=!o.detectDuplicates,n.sort(ei),tt){for(;u=n[t];t++)u===n[t-1]&&(i=r.push(t));while(i--)n.splice(r[i],1)}return n},yt=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=yt(n)}else if(3===t||4===t)return n.nodeValue}else for(;r=n[u];u++)i+=yt(r);return i},r=u.selectors={cacheLength:50,createPseudo:c,match:ht,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(w,p),n[3]=(n[4]||n[5]||"").replace(w,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return ht.CHILD.test(n[0])?null:(n[4]?n[2]=n[4]:t&&ir.test(t)&&(i=vt(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){return"*"===n?function(){return!0}:(n=n.replace(w,p).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=ci[n+" "];return t||(t=RegExp("(^|"+e+")"+n+"("+e+"|$)"))&&ci(n,function(n){return t.test(n.className||typeof n.getAttribute!==v&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,d,c,l,v,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),k=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&k){for(d=p[f]||(p[f]={}),a=d[n]||[],v=a[0]===y&&a[1],l=a[0]===y&&a[2],c=v&&p.childNodes[v];c=++v&&c&&c[b]||(l=v=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){d[n]=[y,v,l];break}}else if(k&&(a=(t[f]||(t[f]={}))[n])&&a[0]===y)l=a[1];else while(c=++v&&c&&c[b]||(l=v=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(k&&((c[f]||(c[f]={}))[n]=[y,l]),c===t))break;return l-=u,l===r||0==l%r&&l/r>=0}}},PSEUDO:function(n,t){var e,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[f]?i(t):i.length>1?(e=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var e,f=i(n,t),u=f.length;u--;)e=ti.call(n,f[u]),n[e]=!(r[e]=f[u])}):function(n){return i(n,0,e)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=fi(n.replace(ct,"$1"));return t[f]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||yt(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(w,p).toLowerCase(),function(t){var i;do if(i=l?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===h},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||3===n.nodeType||4===n.nodeType)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return ar.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||t.toLowerCase()===n.type)},first:d(function(){return[0]}),last:d(function(n,t){return[t-1]}),eq:d(function(n,t,i){return[0>i?i+t:i]}),even:d(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:d(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:d(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:d(function(n,t,i){for(var r=0>i?i+t:i;t>++r;)n.push(r);return n})}};for(nt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[nt]=gi(nt);for(nt in{submit:!0,reset:!0})r.pseudos[nt]=ki(nt);fi=u.compile=function(n,t){var r,u=[],e=[],i=hi[n+" "];if(!i){for(t||(t=vt(n)),r=t.length;r--;)i=bt(t[r]),i[f]?u.push(i):e.push(i);i=hi(n,di(e,u))}return i},r.pseudos.nth=r.pseudos.eq,r.filters=oi.prototype=r.pseudos,r.setFilters=new oi,ft(),u.attr=i.attr,i.find=u,i.expr=u.selectors,i.expr[":"]=i.expr.pseudos,i.unique=u.uniqueSort,i.text=u.getText,i.isXMLDoc=u.isXML,i.contains=u.contains}(n);var re=/Until$/,ue=/^(?:parents|prev(?:Until|All))/,de=/^.[^:#\[\.,]*$/,tf=i.expr.match.needsContext,vo={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r,f,u=this.length;if("string"!=typeof n)return f=this,this.pushStack(i(n).filter(function(){for(t=0;u>t;t++)if(i.contains(f[t],this))return!0}));for(r=[],t=0;u>t;t++)i.find(n,this[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=(this.selector?this.selector+" ":"")+n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(rf(this,n,!1))},filter:function(n){return this.pushStack(rf(this,n,!0))},is:function(n){return!!n&&("string"==typeof n?tf.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=tf.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&11!==r.nodeType;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var u="string"==typeof n?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),r=i.merge(this.get(),u);return this.pushStack(i.unique(r))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}}),i.fn.andSelf=i.fn.addBack,i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return nf(n,"nextSibling")},prev:function(n){return nf(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return re.test(n)||(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),f=this.length>1&&!vo[n]?i.unique(f):f,this.length>1&&ue.test(n)&&(f=f.reverse()),this.pushStack(f)}}),i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),1===t.length?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&9!==f.nodeType&&(u===t||1!==f.nodeType||!i(f).is(u));)1===f.nodeType&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});var yu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",yo=/ jQuery\d+="(?:null|\d+)"/g,au=RegExp("<(?:"+yu+")[\\s/>]","i"),ri=/^\s+/,vu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ku=/<([\w:]+)/,du=/<tbody/i,ao=/<|&#?\w+;/,co=/<(?:script|style|link)/i,ti=/^(?:checkbox|radio)$/i,lo=/checked\s*(?:[^=]|=\s*.checked.)/i,bu=/^$|\/(?:java|ecma)script/i,ko=/^true\/(.*)/,go=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},bo=uf(r),ni=bo.appendChild(r.createElement("div"));e.optgroup=e.option,e.tbody=e.tfoot=e.colgroup=e.caption=e.thead,e.th=e.td,i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var r=i(this),t=r.contents();t.length?t.wrapAll(n):r.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(n,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=0;null!=(r=this[f]);f++)(!n||i.filter(n,[r]).length>0)&&(t||1!==r.nodeType||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&ei(u(r,"script")),r.parentNode.removeChild(r)));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return 1===r.nodeType?r.innerHTML.replace(yo,""):t;if(!("string"!=typeof n||co.test(n)||!i.support.htmlSerialize&&au.test(n)||!i.support.leadingWhitespace&&ri.test(n)||e[(ku.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(vu,"<$1></$2>");try{for(;o>f;f++)r=this[f]||{},1===r.nodeType&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){var t=i.isFunction(n);return t||"string"==typeof n||(n=i(n).not(this).detach()),this.domManip([n],!0,function(n){var r=this.nextSibling,t=this.parentNode;t&&(i(this).remove(),t.insertBefore(n,r))})},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,f){n=gu.apply([],n);var c,e,v,h,p,s,o=0,l=this.length,b=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||!(1>=l||"string"!=typeof a||i.support.checkClone)&&lo.test(a))return this.each(function(i){var u=b.eq(i);y&&(n[0]=a.call(this,i,r?u.html():t)),u.domManip(n,r,f)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),c=s.firstChild,1===s.childNodes.length&&(s=c),c)){for(r=r&&i.nodeName(c,"tr"),h=i.map(u(s,"script"),ir),v=h.length;l>o;o++)e=s,o!==w&&(e=i.clone(e,!0,!0),v&&i.merge(h,u(e,"script"))),f.call(r&&i.nodeName(this[o],"table")?po(this[o],"tbody"):this[o],e,o);if(v)for(p=h[h.length-1].ownerDocument,i.map(h,bi),o=0;v>o;o++)e=h[o],bu.test(e.type||"")&&!i._data(e,"globalEval")&&i.contains(p,e)&&(e.src?i.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.globalEval((e.text||e.textContent||e.innerHTML||"").replace(go,"")));s=c=null}return this}}),i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,o=[],e=i(n),f=e.length-1;f>=r;r++)u=r===f?this:this.clone(!0),i(e[r])[t](u),fi.apply(o,u.get());return this.pushStack(o)}}),i.extend({clone:function(n,t,r){var f,h,o,e,s,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!au.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(ni.innerHTML=n.outerHTML,ni.removeChild(o=ni.firstChild)),!(i.support.noCloneEvent&&i.support.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=u(o),s=u(n),e=0;null!=(h=s[e]);++e)f[e]&&wo(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;null!=(h=s[e]);e++)di(h,f[e]);else di(n,o);return f=u(o,"script"),f.length>0&&ei(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var h,o,w,s,y,p,v,b=n.length,a=uf(t),c=[],l=0;b>l;l++)if(o=n[l],o||0===o)if("object"===i.type(o))i.merge(c,o.nodeType?[o]:o);else if(ao.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(ku.exec(o)||["",""])[1].toLowerCase(),v=e[y]||e._default,s.innerHTML=v[1]+o.replace(vu,"<$1></$2>")+v[2],h=v[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&ri.test(o)&&c.push(t.createTextNode(ri.exec(o)[0])),!i.support.tbody)for(o="table"!==y||du.test(o)?"<table>"!==v[1]||du.test(o)?0:s:s.firstChild,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),ho),l=0;o=c[l++];)if((!f||-1===i.inArray(o,f))&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&ei(s),r))for(h=0;o=s[h++];)bu.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,t){for(var r,s,u,e,c=0,f=i.expando,h=i.cache,a=i.support.deleteExpando,l=i.event.special;null!=(r=n[c]);c++)if((t||i.acceptData(r))&&(u=r[f],e=u&&h[u])){if(e.events)for(s in e.events)l[s]?i.event.remove(r,s):i.removeEvent(r,s,e.handle);h[u]&&(delete h[u],a?delete r[f]:typeof r.removeAttribute!==o?r.removeAttribute(f):r[f]=null,tt.push(u))}}});var ft,p,y,dt=/alpha\([^)]*\)/i,io=/opacity\s*=\s*([^)]*)/,ro=/^(top|right|bottom|left)$/,to=/^(none|table(?!-c[ea]).+)/,er=/^margin/,ge=RegExp("^("+pt+")(.*)$","i"),st=RegExp("^("+pt+")(?!px)[a-z%]+$","i"),no=RegExp("^([+-])=("+pt+")","i"),lr={BODY:"block"},oo={position:"absolute",visibility:"hidden",display:"block"},hr={letterSpacing:0,fontWeight:400},w=["Top","Right","Bottom","Left"],fr=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,s,o={},f=0;if(i.isArray(r)){for(s=p(n),e=r.length;e>f;f++)o[r[f]]=i.css(n,r[f],!1,s);return o}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return yr(this,!0)},hide:function(){return yr(this)},toggle:function(n){var t="boolean"==typeof n;return this.each(function(){(t?n:ut(this))?i(this).show():i(this).hide()})}}),i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=y(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var s,h,e,o=i.camelCase(r),c=n.style;if(r=i.cssProps[o]||(i.cssProps[o]=or(c,o)),e=i.cssHooks[r]||i.cssHooks[o],u===t)return e&&"get"in e&&(s=e.get(n,!1,f))!==t?s:c[r];if(h=typeof u,"string"===h&&(s=no.exec(u))&&(u=(s[1]+1)*s[2]+parseFloat(i.css(n,r)),h="number"),!(null==u||"number"===h&&isNaN(u)||("number"!==h||i.cssNumber[o]||(u+="px"),i.support.clearCloneStyle||""!==u||0!==r.indexOf("background")||(c[r]="inherit"),e&&"set"in e&&(u=e.set(n,u,f))===t)))try{c[r]=u}catch(l){}}},css:function(n,r,u,f){var h,e,o,s=i.camelCase(r);return r=i.cssProps[s]||(i.cssProps[s]=or(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=y(n,r,f)),"normal"===e&&r in hr&&(e=hr[r]),""===u||u?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e},swap:function(n,t,i,r){var e,u,f={};for(u in t)f[u]=n.style[u],n.style[u]=t[u];e=i.apply(n,r||[]);for(u in t)n.style[u]=f[u];return e}}),n.getComputedStyle?(p=function(t){return n.getComputedStyle(t,null)},y=function(n,r,u){var c,s,h,o=u||p(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(""!==e||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),st.test(e)&&er.test(r)&&(c=f.width,s=f.minWidth,h=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=c,f.minWidth=s,f.maxWidth=h)),e}):r.documentElement.currentStyle&&(p=function(n){return n.currentStyle},y=function(n,i,r){var h,e,o,s=r||p(n),u=s?s[i]:t,f=n.style;return null==u&&f&&f[i]&&(u=f[i]),st.test(u)&&!ro.test(i)&&(h=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left="fontSize"===i?"1em":u,u=f.pixelLeft+"px",f.left=h,o&&(e.left=o)),""===u?"auto":u}),i.each(["height","width"],function(n,r){i.cssHooks[r]={get:function(n,u,f){return u?0===n.offsetWidth&&to.test(i.css(n,"display"))?i.swap(n,oo,function(){return vr(n,r,f)}):vr(n,r,f):t},set:function(n,t,u){var f=u&&p(n);return pr(n,t,u?wr(n,r,u,i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f),f):0)}}}),i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return io.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,f=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",u=f&&f.filter||r.filter||"";r.zoom=1,(t>=1||""===t)&&""===i.trim(u.replace(dt,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||f&&!f.filter)||(r.filter=dt.test(u)?u.replace(dt,e):u+" "+e)}}),i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,r){return r?i.swap(n,{display:"inline-block"},y,[n,"marginRight"]):t}}),!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,r){i.cssHooks[r]={get:function(n,u){return u?(u=y(n,r),st.test(u)?i(n).position()[r]+"px":u):t}}})}),i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return 0>=n.offsetWidth&&0>=n.offsetHeight||!i.support.reliableHiddenOffsets&&"none"===(n.style&&n.style.display||i.css(n,"display"))},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)}),i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}},er.test(n)||(i.cssHooks[n+t].set=pr)});var so=/%20/g,eo=/\[\]$/,nr=/\r?\n/g,uo=/^(?:submit|button|image|reset|file)$/i,fo=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&fo.test(this.nodeName)&&!uo.test(n)&&(this.checked||!ti.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(nr,"\r\n")}}):{name:t.name,value:r.replace(nr,"\r\n")}}).get()}}),i.param=function(n,r){var f,u=[],e=function(n,t){t=i.isFunction(t)?t():null==t?"":t,u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(f in n)pi(f,n[f],r,e);return u.join("&").replace(so,"+")},i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}}),i.fn.hover=function(n,t){return this.mouseenter(n).mouseleave(t||n)};var a,c,hi=i.now(),ai=/\?/,pf=/#.*$/,sr=/([?&])_=[^&]*/,bf=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,yf=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,lf=/^(?:GET|HEAD)$/,cf=/^\/\//,ar=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ur=i.fn.load,rr={},gt={},tr="*/".concat("*");try{c=ae.href}catch(ns){c=r.createElement("a"),c.href="",c=c.href}a=ar.exec(c.toLowerCase())||[],i.fn.load=function(n,r,u){if("string"!=typeof n&&ur)return ur.apply(this,arguments);var o,h,s,f=this,e=n.indexOf(" ");return e>=0&&(o=n.slice(e,n.length),n=n.slice(0,e)),i.isFunction(r)?(u=r,r=t):r&&"object"==typeof r&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:r}).done(function(n){h=arguments,f.html(o?i("<div>").append(i.parseHTML(n)).find(o):n)}).complete(u&&function(n,t){f.each(u,h||[n.responseText,t,n])}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}}),i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:c,type:"GET",isLocal:yf.test(a[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":tr,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ii(ii(n,i.ajaxSettings),t):ii(i.ajaxSettings,n)},ajaxPrefilter:br(rr),ajaxTransport:br(gt),ajax:function(n,r){function k(n,r,s,c){var a,k,b,it,v,l=r;2!==o&&(o=2,tt&&clearTimeout(tt),p=t,g=c||"",f.readyState=n>0?4:0,s&&(it=af(u,f,s)),n>=200&&300>n||304===n?(u.ifModified&&(v=f.getResponseHeader("Last-Modified"),v&&(i.lastModified[e]=v),v=f.getResponseHeader("etag"),v&&(i.etag[e]=v)),204===n?(a=!0,l="nocontent"):304===n?(a=!0,l="notmodified"):(a=vf(u,it),l=a.state,k=a.data,b=a.error,a=!b)):(b=l,(n||!l)&&(l="error",0>n&&(n=0))),f.status=n,f.statusText=(r||l)+"",a?nt.resolveWith(h,[k,l,f]):nt.rejectWith(h,[f,l,b]),f.statusCode(w),w=t,y&&d.trigger(a?"ajaxSuccess":"ajaxError",[f,u,a?k:b]),rt.fireWith(h,[f,l]),y&&(d.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(r=n,n=t),r=r||{};var l,v,e,g,tt,y,p,b,u=i.ajaxSetup({},r),h=u.context||u,d=u.context&&(h.nodeType||h.jquery)?i(h):i.event,nt=i.Deferred(),rt=i.Callbacks("once memory"),w=u.statusCode||{},ut={},ft={},o=0,it="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(2===o){if(!b)for(b={};t=bf.exec(g);)b[t[1].toLowerCase()]=t[2];t=b[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===o?g:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return o||(n=ft[i]=ft[i]||n,ut[n]=t),this},overrideMimeType:function(n){return o||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>o)for(t in n)w[t]=[w[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||it;return p&&p.abort(t),k(0,t),this}};if(nt.promise(f).complete=rt.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||c)+"").replace(pf,"").replace(cf,a[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(s)||[""],null==u.crossDomain&&(l=ar.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===a[1]&&l[2]===a[2]&&(l[3]||("http:"===l[1]?80:443))==(a[3]||("http:"===a[1]?80:443)))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),wu(rr,u,r,f),2===o)return f;y=u.global,y&&0==i.active++&&i.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!lf.test(u.type),e=u.url,u.hasContent||(u.data&&(e=u.url+=(ai.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=sr.test(e)?e.replace(sr,"$1_="+hi++):e+(ai.test(e)?"&":"?")+"_="+hi++)),u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e])),(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType),f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+tr+"; q=0.01":""):u.accepts["*"]);for(v in u.headers)f.setRequestHeader(v,u.headers[v]);if(u.beforeSend&&(u.beforeSend.call(h,f,u)===!1||2===o))return f.abort();it="abort";for(v in{success:1,error:1,complete:1})f[v](u[v]);if(p=wu(gt,u,r,f)){f.readyState=1,y&&d.trigger("ajaxSend",[f,u]),u.async&&u.timeout>0&&(tt=setTimeout(function(){f.abort("timeout")},u.timeout));try{o=1,p.send(ut,k)}catch(et){if(!(2>o))throw et;k(-1,et)}}else k(-1,"No Transport");return f},getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1),n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script"),u.async=!0,n.scriptCharset&&(u.charset=n.scriptCharset),u.src=n.url,u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))},f.insertBefore(u,f.firstChild)},abort:function(){u&&u.onload(t,!0)}}}}),oi=[],lt=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=oi.pop()||i.expando+"_"+hi++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(lt.test(r.url)?"url":"string"==typeof r.data&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&lt.test(r.data)&&"data");return h||"jsonp"===r.dataTypes[0]?(e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(lt,"$1"+e):r.jsonp!==!1&&(r.url+=(ai.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s,r[e]&&(r.jsonpCallback=u.jsonpCallback,oi.push(e)),o&&i.isFunction(s)&&s(o[0]),o=s=t}),"script"):t}),kr=0,at=n.ActiveXObject&&function(){var n;for(n in d)d[n](t,!0)},i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&gr()||wf()}:gr,b=i.ajaxSettings.xhr(),i.support.cors=!!b&&"withCredentials"in b,b=i.support.ajax=!!b,b&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType),r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null),u=function(n,f){var s,a,l,c;try{if(u&&(f||4===o.readyState))if(u=t,h&&(o.onreadystatechange=i.noop,at&&delete d[h]),f)4!==o.readyState&&o.abort();else{c={},s=o.status,a=o.getAllResponseHeaders(),"string"==typeof o.responseText&&(c.text=o.responseText);try{l=o.statusText}catch(y){l=""}s||!r.isLocal||r.crossDomain?1223===s&&(s=204):s=c.text?200:404}}catch(v){f||e(-1,v)}c&&e(s,l,c,a)},r.async?4===o.readyState?setTimeout(u):(h=++kr,at&&(d||(d={},i(n).unload(at)),d[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var nt,et,sf=/^(?:toggle|show|hide)$/,ef=RegExp("^(?:([+-])=|)("+pt+")([a-z%]*)$","i"),of=/queueHooks$/,vt=[kf],it={"*":[function(n,t){var s,o,r=this.createTween(n,t),e=ef.exec(t),h=r.cur(),f=+h||0,u=1,c=20;if(e){if(s=+e[2],o=e[3]||(i.cssNumber[n]?"":"px"),"px"!==o&&f){f=i.css(r.elem,n,!0)||s||1;do u=u||".5",f/=u,i.style(r.elem,n,f+o);while(u!==(u=r.cur()/h)&&1!==u&&--c)}r.unit=o,r.start=f,r.end=e[1]?f+(e[1]+1)*s:s}return r}]};i.Animation=i.extend(pu,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],it[r]=it[r]||[],it[r].unshift(t)},prefilter:function(n,t){t?vt.unshift(n):vt.push(n)}}),i.Tween=f,f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n,this.prop=r,this.easing=f||"swing",this.options=t,this.start=this.now=this.cur(),this.end=u,this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var r,t=f.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):f.propHooks._default.set(this),this}},f.prototype.init.prototype=f.prototype,f.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}},f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}},i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ht(t,!0),n,i,u)}}),i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pu(this,i.extend({},n),e);f.finish=function(){t.stop(!0)},(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop,t(u)};return"string"!=typeof n&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&of.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),u=f[n+"queue"],e=f[n+"queueHooks"],r=i.timers,o=u?u.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),t=r.length;t--;)r[t].elem===this&&r[t].queue===n&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;o>t;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete f.finish})}}),i.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}}),i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this),u.queue&&i.dequeue(this,u.queue)},u},i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}},i.timers=[],i.fx=f.prototype.init,i.fx.tick=function(){var u,r=i.timers,n=0;for(nt=i.now();r.length>n;n++)u=r[n],u()||r[n]!==u||r.splice(n--,1);r.length||i.fx.stop(),nt=t},i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()},i.fx.interval=13,i.fx.start=function(){et||(et=setInterval(i.fx.tick,i.fx.interval))},i.fx.stop=function(){clearInterval(et),et=null},i.fx.speeds={slow:600,fast:200,_default:400},i.fx.step={},i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length}),i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,s,f={top:0,left:0},u=this[0],e=u&&u.ownerDocument;if(e)return r=e.documentElement,i.contains(r,u)?(typeof u.getBoundingClientRect!==o&&(f=u.getBoundingClientRect()),s=cr(e),{top:f.top+(s.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(s.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}):f},i.offset={setOffset:function(n,t,r){var s=i.css(n,"position");"static"===s&&(n.style.position="relative");var h=i(n),c=h.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=("absolute"===s||"fixed"===s)&&i.inArray("auto",[l,a])>-1,u={},e={},f,o;v?(e=h.position(),f=e.top,o=e.left):(f=parseFloat(l)||0,o=parseFloat(a)||0),i.isFunction(t)&&(t=t.call(n,r,c)),null!=t.top&&(u.top=t.top-c.top+f),null!=t.left&&(u.left=t.left-c.left+o),"using"in t?t.using.call(n,u):h.css(u)}},i.fn.extend({position:function(){if(this[0]){var t,u,n={top:0,left:0},r=this[0];return"fixed"===i.css(r,"position")?u=r.getBoundingClientRect():(t=this.offsetParent(),u=this.offset(),i.nodeName(t[0],"html")||(n=t.offset()),n.top+=i.css(t[0],"borderTopWidth",!0),n.left+=i.css(t[0],"borderLeftWidth",!0)),{top:u.top-n.top-i.css(r,"marginTop",!0),left:u.left-n.left-i.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.documentElement;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||r.documentElement})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=cr(n);return e===t?o?r in o?o[r]:o.document.documentElement[f]:n[f]:(o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e,t)},n,f,arguments.length,null)}}),i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var s=arguments.length&&(u||"boolean"!=typeof f),o=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:9===r.nodeType?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,o):i.style(r,u,f,o)},r,s?f:t,s,null)}})}),n.jQuery=n.$=i,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})})(window);var wmx=10,wmy=48;$(document).ready(function(){var t=$(window).width()>788?"#ad3Desktop":"#ad3Mobile",n;$(t).length>-1&&$(t).show(),$("#move-top-left").click(function(){var t=254,n;$("#top-cryptocurrency-container").scrollLeft()==0,n=$("#top-cryptocurrency-container").scrollLeft()-t,$("#top-cryptocurrency-container").animate({scrollLeft:n},500),n<=0?($("#move-top-left").hasClass("active")&&$("#move-top-left").removeClass("active"),$("#move-top-right").hasClass("active")||$("#move-top-right").addClass("active")):n>=0}),$("#move-top-right").click(function(){var n=$("#top-cryptocurrency-container").scrollLeft()+254;$("#top-cryptocurrency-container").animate({scrollLeft:n},500),n>0&&($("#move-top-left").hasClass("active")||$("#move-top-left").addClass("active")),n+$("#top-cryptocurrency-container").parent().width()>=$("#top-cryptocurrency-inner").width()&&$("#move-top-right").hasClass("active")&&$("#move-top-right").removeClass("active")}),$(".dropdown-menu").click(function(){var n=$(this).attr("data-menu-id"),t=$(this).attr("data-menu-state");t==1?($(".dropdown ul"+n).slideUp(),$(this).attr("data-menu-state","0")):($(".dropdown ul"+n).slideDown(),$(this).attr("data-menu-state","1"))}),$(".dropdown ul, .dropdown-menu").mouseup(function(){return!1}),$(document).mouseup(function(){return $(".dropdown ul").slideUp(),$(".dropdown .dropdown-menu").attr("data-menu-state","0"),!1}),$(".scrollTo").click(function(){var n=$("#scrollFrom"+$(this).attr("id")).offset().top-16;$("html, body").animate({scrollTop:n},1e3,function(){BindScrollTop()})}),$(window).scroll(function(){$(window).scrollTop()<=200?($(".scrollTop").hide("fast"),$(".scrollTop").remove()):BindScrollTop()}),$(window).resize(function(){ResizeMask(),ResizeSparkPriceCharts()}),$("footer").position().top+$("footer").height()<$(window).height()&&$("footer").css("margin-top",$(window).height()-$("header").height()-$("main").height()-$("footer").height()-50+"px"),typeof tlAdDisplay!="undefined"&&(n='<div style="height:90px;">',n=n+'<a href="'+tlAdDisplay.link+'" target="_blank" onclick="tcad(\''+tlAdDisplay.adId+"');\" >",n=n+'<img src="'+($(window).width()<768?tlAdDisplay.imageMobile:tlAdDisplay.imageDesktop)+'" alt="'+tlAdDisplay.advertiser+'" />',n=n+"</a>",n=n+"</div>",$("#ad-top-leader").html(n),setTimeout(function(){tiad(tlAdDisplay.adId)},100)),$("#boxes").length&&(Cookies.get("noShowModal")?($("#mask").hide(),$(".window").hide()):(launchWindow("#dialog"),setTimeout(function(){tiad($("#dialog").attr("data-ad-id"))},100)),$(".window .closeModal").click(function(n){n.preventDefault(),$("#mask, .window").hide(),Cookies.set("noShowModal",!0,{expires:.007,path:"/"})}),$("#mask").click(function(){$(this).hide(),$(".window").hide(),Cookies.set("noShowModal",!0,{expires:.007,path:"/"})})),typeof mc1AdDisplay!="undefined"&&(n='<div style="height:250px;width:300px;margin:20px auto;">',n=n+'<a href="'+mc1AdDisplay.link+'" target="_blank" onclick="tcad(\''+mc1AdDisplay.adId+"');\" >",n=n+'<img src="'+mc1AdDisplay.image+'" alt="'+mc1AdDisplay.advertiser+'" />',n=n+"</a>",n=n+"</div>",$("#ad-mc1").html(n),setTimeout(function(){tiad(mc1AdDisplay.adId)},100)),$("#lnkMenu").click(function(){return $("#menu-list").toggle(250),!1}),$("#lnkCoinMenu").click(function(){return $("#coin-links").toggle(250),!1}),$("#cryptocurrency-menu-menu").click(function(){return ShowCoinMenu(!0),!1}),$(".show-tooltip").mouseover(function(){var r=$(this).attr("data-tooltip"),n=$(this).position().top+$(this).offset().top-160,t=$(this).offset().left-7,i="#toolTipUp";console.log(r),console.log(n),console.log(t),console.log($(document).width()),n<0&&(n=0),n<$(document).scrollTop()&&(n=n+168,i="#toolTipDown"),t+320>$(document).width()&&(t=$(document).width()-320),$(i).html("<p>"+r+"</p>"),$(i).css({top:n+"px"}).css({left:t+"px"}),$(i).show()}),$(".show-tooltip").mouseout(function(){$("#toolTipUp").hide(),$("#toolTipUp").html(""),$("#toolTipDown").hide(),$("#toolTipDown").html("")})}),function(n){var r,i,t;if(typeof define=="function"&&define.amd)define(["jquery"],n);else if(typeof exports=="object"){try{r=require("jquery")}catch(u){}module.exports=n(r)}else i=window.Cookies,t=window.Cookies=n(window.jQuery),t.noConflict=function(){return window.Cookies=i,t}}(function(n){function f(n){return t.raw?n:encodeURIComponent(n)}function o(n){return t.raw?n:decodeURIComponent(n)}function e(n){return f(t.json?JSON.stringify(n):String(n))}function h(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(s," ")),t.json?JSON.parse(n):n}catch(i){}}function r(n,i){var r=t.raw?n:h(n);return u(i)?i(r):r}function i(){for(var i,t,n=0,r={};n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function u(n){return Object.prototype.toString.call(n)==="[object Function]"}var s=/\+/g,t=function(n,s,h){var w,v;if(arguments.length>1&&!u(s))return h=i(t.defaults,h),typeof h.expires=="number"&&(w=h.expires,v=h.expires=new Date,v.setMilliseconds(v.getMilliseconds()+w*864e5)),document.cookie=[f(n),"=",e(s),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("");for(var a=n?undefined:{},b=document.cookie?document.cookie.split("; "):[],l=0,k=b.length;l<k;l++){var y=b[l].split("="),p=o(y.shift()),c=y.join("=");if(n===p){a=r(c,s);break}n||(c=r(c))===undefined||(a[p]=c)}return a};return t.get=t.set=t,t.defaults={},t.remove=function(n,r){return t(n,"",i(r,{expires:-1})),!t(n)},n&&(n.cookie=t,n.removeCookie=t.remove),t}),function(n,t,i){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):jQuery&&!jQuery.fn.sparkline&&n(jQuery)})(function(r){"use strict";var a={},st,u,e,h,c,o,nt,ht,ot,g,wt,ft,et,vt,s,yt,ct,l,y,lt,at,tt,p,w,v,it,ut,rt,b,d,k,f,pt=0;st=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:i,normalRangeMax:i,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:i,chartRangeMax:i,chartRangeMinX:i,chartRangeMaxX:i,tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:i,nullColor:i,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,colorMap:i,tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss","0":"Draw","1":"Win"}}},discrete:{lineHeight:"auto",thresholdColor:i,thresholdValue:0,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,tooltipFormat:new e("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:i,tooltipFormat:new e("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:i,targetColor:"#4a2",chartRangeMax:i,chartRangeMin:i,tooltipFormat:new e("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},it='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',u=function(){var n,t;return n=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(n.prototype=r.extend(new arguments[0],arguments[arguments.length-1]),n._super=arguments[0].prototype):n.prototype=arguments[arguments.length-1],arguments.length>2&&(t=Array.prototype.slice.call(arguments,1,-1),t.unshift(n.prototype),r.extend.apply(r,t))):n.prototype=arguments[0],n.prototype.cls=n,n},r.SPFormatClass=e=u({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(n,t){this.format=n,this.fclass=t},render:function(n,t,r){var c=this,h=n,o,e,f,u,s;return this.format.replace(this.fre,function(){var n;return(e=arguments[1],f=arguments[3],o=c.precre.exec(e),o?(s=o[2],e=o[1]):s=!1,u=h[e],u===i)?"":f&&t&&t[f]?(n=t[f],n.get?t[f].get(u)||u:t[f][u]||u):(ot(u)&&(u=r.get("numberFormatter")?r.get("numberFormatter")(u):vt(u,s,r.get("numberDigitGroupCount"),r.get("numberDigitGroupSep"),r.get("numberDecimalMark"))),u)})}}),r.spformat=function(n,t){return new e(n,t)},h=function(n,t,i){return n<t?t:n>i?i:n},c=function(n,i){var r;return i===2?(r=t.floor(n.length/2),n.length%2?n[r]:(n[r-1]+n[r])/2):n.length%2?(r=(n.length*i+i)/4,r%1?(n[t.floor(r)]+n[t.floor(r)-1])/2:n[r-1]):(r=(n.length*i+2)/4,r%1?(n[t.floor(r)]+n[t.floor(r)-1])/2:n[r-1])},o=function(n){var t;switch(n){case"undefined":n=i;break;case"null":n=null;break;case"true":n=!0;break;case"false":n=!1;break;default:t=parseFloat(n),n==t&&(n=t)}return n},nt=function(n){for(var i=[],t=n.length;t--;)i[t]=o(n[t]);return i},ht=function(n,t){for(var r=[],i=0,u=n.length;i<u;i++)n[i]!==t&&r.push(n[i]);return r},ot=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},vt=function(n,t,i,u,f){var e,o;for(n=(t===!1?parseFloat(n).toString():n.toFixed(t)).split(""),e=(e=r.inArray(".",n))<0?n.length:e,e<n.length&&(n[e]=f),o=e-i;o>0;o-=i)n.splice(o,0,u);return n.join("")},g=function(n,t,i){for(var r=t.length;r--;)if((!i||t[r]!==null)&&t[r]!==n)return!1;return!0},wt=function(n){for(var i=0,t=n.length;t--;)i+=typeof n[t]=="number"?n[t]:0;return i},et=function(n){return r.isArray(n)?n:[n]},ft=function(t){var i;n.createStyleSheet?n.createStyleSheet().cssText=t:(i=n.createElement("style"),i.type="text/css",n.getElementsByTagName("head")[0].appendChild(i),i[typeof n.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=t)},r.fn.simpledraw=function(t,u,f,e){var o,h,s;if(f&&(o=this.data("_jqs_vcanvas")))return o;if(r.fn.sparkline.canvas===!1)return!1;if(r.fn.sparkline.canvas===i)if(s=n.createElement("canvas"),!(s.getContext&&s.getContext("2d")))if(n.namespaces&&!n.namespaces.v)n.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),r.fn.sparkline.canvas=function(n,t,i){return new k(n,t,i)};else return r.fn.sparkline.canvas=!1,!1;else r.fn.sparkline.canvas=function(n,t,i,r){return new d(n,t,i,r)};return t===i&&(t=r(this).innerWidth()),u===i&&(u=r(this).innerHeight()),o=r.fn.sparkline.canvas(t,u,this,e),h=r(this).data("_jqs_mhandler"),h&&h.registerCanvas(o),o},r.fn.cleardraw=function(){var n=this.data("_jqs_vcanvas");n&&n.reset()},r.RangeMapClass=s=u({init:function(n){var i,t,r=[];for(i in n)n.hasOwnProperty(i)&&typeof i=="string"&&i.indexOf(":")>-1&&(t=i.split(":"),t[0]=t[0].length===0?-Infinity:parseFloat(t[0]),t[1]=t[1].length===0?Infinity:parseFloat(t[1]),t[2]=n[i],r.push(t));this.map=n,this.rangelist=r||!1},get:function(n){var u=this.rangelist,r,t,f;if((f=this.map[n])!==i)return f;if(u)for(r=u.length;r--;)if(t=u[r],t[0]<=n&&t[1]>=n)return t[2];return i}}),r.range_map=function(n){return new s(n)},yt=u({init:function(n,t){var i=r(n);this.$el=i,this.options=t,this.currentPageX=0,this.currentPageY=0,this.el=n,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!t.get("disableTooltips"),this.highlightEnabled=!t.get("disableHighlight")},registerSparkline:function(n){this.splist.push(n),this.over&&this.updateDisplay()},registerCanvas:function(n){var t=r(n.canvas);this.canvas=n,this.$canvas=t,t.mouseenter(r.proxy(this.mouseenter,this)),t.mouseleave(r.proxy(this.mouseleave,this)),t.click(r.proxy(this.mouseclick,this))},reset:function(n){this.splist=[],this.tooltip&&n&&(this.tooltip.remove(),this.tooltip=i)},mouseclick:function(n){var t=r.Event("sparklineClick");t.originalEvent=n,t.sparklines=this.splist,this.$el.trigger(t)},mouseenter:function(t){r(n.body).unbind("mousemove.jqs"),r(n.body).bind("mousemove.jqs",r.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new ct(this.options),this.tooltip.updatePosition(t.pageX,t.pageY)),this.updateDisplay()},mouseleave:function(){r(n.body).unbind("mousemove.jqs");var u=this.splist,e=u.length,f=!1,i,t;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),t=0;t<e;t++)i=u[t],i.clearRegionHighlight()&&(f=!0);f&&this.canvas.render()},mousemove:function(n){this.currentPageX=n.pageX,this.currentPageY=n.pageY,this.currentEl=n.target,this.tooltip&&this.tooltip.updatePosition(n.pageX,n.pageY),this.updateDisplay()},updateDisplay:function(){var e=this.splist,o=e.length,s=!1,h=this.$canvas.offset(),l=this.currentPageX-h.left,c=this.currentPageY-h.top,u,t,n,f,i;if(this.over){for(n=0;n<o;n++)t=e[n],f=t.setRegionHighlight(this.currentEl,l,c),f&&(s=!0);if(s){if(i=r.Event("sparklineRegionChange"),i.sparklines=this.splist,this.$el.trigger(i),this.tooltip){for(u="",n=0;n<o;n++)t=e[n],u+=t.getCurrentRegionTooltip();this.tooltip.setContent(u)}this.disableHighlight||this.canvas.render()}f===null&&this.mouseleave()}}}),ct=u({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(t){var u=t.get("tooltipClassname","jqstooltip"),f=this.sizeStyle,i;this.container=t.get("tooltipContainer")||n.body,this.tooltipOffsetX=t.get("tooltipOffsetX",10),this.tooltipOffsetY=t.get("tooltipOffsetY",12),r("#jqssizetip").remove(),r("#jqstooltip").remove(),this.sizetip=r("<div/>",{id:"jqssizetip",style:f,"class":u}),this.tooltip=r("<div/>",{id:"jqstooltip","class":u}).appendTo(this.container),i=this.tooltip.offset(),this.offsetLeft=i.left,this.offsetTop=i.top,this.hidden=!0,r(window).unbind("resize.jqs scroll.jqs"),r(window).bind("resize.jqs scroll.jqs",r.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=r(window).scrollTop(),this.scrollLeft=r(window).scrollLeft(),this.scrollRight=this.scrollLeft+r(window).width(),this.updatePosition()},getSize:function(n){this.sizetip.html(n).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(n){if(!n){this.tooltip.css("visibility","hidden"),this.hidden=!0;return}this.getSize(n),this.tooltip.html(n).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(n,t){if(n===i){if(this.mousex===i)return;n=this.mousex-this.offsetLeft,t=this.mousey-this.offsetTop}else this.mousex=n=n-this.offsetLeft,this.mousey=t=t-this.offsetTop;this.height&&this.width&&!this.hidden&&(t-=this.height+this.tooltipOffsetY,n+=this.tooltipOffsetX,t<this.scrollTop&&(t=this.scrollTop),n<this.scrollLeft?n=this.scrollLeft:n+this.width>this.scrollRight&&(n=this.scrollRight-this.width),this.tooltip.css({left:n,top:t}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=i,r(window).unbind("resize.jqs scroll.jqs")}}),ut=function(){ft(it)},r(ut),f=[],r.fn.sparkline=function(t,u){return this.each(function(){var e=new r.fn.sparkline.options(this,u),h=r(this),s,o;if(s=function(){var s,a,l,f,u,c,o;if(t==="html"||t===i?(o=this.getAttribute(e.get("tagValuesAttribute")),(o===i||o===null)&&(o=h.html()),s=o.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):s=t,a=e.get("width")==="auto"?s.length*e.get("defaultPixelsPerValue"):e.get("width"),e.get("height")==="auto"?e.get("composite")&&r.data(this,"_jqs_vcanvas")||(f=n.createElement("span"),f.innerHTML="a",h.html(f),l=r(f).innerHeight()||r(f).height(),r(f).remove(),f=null):l=e.get("height"),e.get("disableInteraction")?u=!1:(u=r.data(this,"_jqs_mhandler"),u?e.get("composite")||u.reset():(u=new yt(this,e),r.data(this,"_jqs_mhandler",u))),e.get("composite")&&!r.data(this,"_jqs_vcanvas")){r.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),r.data(this,"_jqs_errnotify",!0));return}c=new r.fn.sparkline[e.get("type")](this,s,e,a,l),c.render(),u&&u.registerSparkline(c)},r(this).html()&&!e.get("disableHiddenCheck")&&r(this).is(":hidden")||!r(this).parents("body").length){if(!e.get("composite")&&r.data(this,"_jqs_pending"))for(o=f.length;o;o--)f[o-1][0]==this&&f.splice(o-1,1);f.push([this,s]),r.data(this,"_jqs_pending",!0)}else s.call(this)})},r.fn.sparkline.defaults=st(),r.sparkline_display_visible=function(){for(var t,i=[],n=0,u=f.length;n<u;n++)t=f[n][0],r(t).is(":visible")&&!r(t).parents().is(":hidden")?(f[n][1].call(t),r.data(f[n][0],"_jqs_pending",!1),i.push(n)):r(t).closest("html").length||r.data(t,"_jqs_pending")||(r.data(f[n][0],"_jqs_pending",!1),i.push(n));for(n=i.length;n;n--)f.splice(i[n-1],1)},r.fn.sparkline.options=u({init:function(n,t){var e,i,u,f;this.userOptions=t=t||{},this.tag=n,this.tagValCache={},i=r.fn.sparkline.defaults,u=i.common,this.tagOptionsPrefix=t.enableTagOptions&&(t.tagOptionsPrefix||u.tagOptionsPrefix),f=this.getTagSetting("type"),e=f===a?i[t.type||u.type]:i[f],this.mergedOptions=r.extend({},u,e,t)},getTagSetting:function(n){var e=this.tagOptionsPrefix,t,r,f,u;if(e===!1||e===i)return a;if(this.tagValCache.hasOwnProperty(n))t=this.tagValCache.key;else{if(t=this.tag.getAttribute(e+n),t===i||t===null)t=a;else if(t.substr(0,1)==="[")for(t=t.substr(1,t.length-2).split(","),r=t.length;r--;)t[r]=o(t[r].replace(/(^\s*)|(\s*$)/g,""));else if(t.substr(0,1)==="{")for(f=t.substr(1,t.length-2).split(","),t={},r=f.length;r--;)u=f[r].split(":",2),t[u[0].replace(/(^\s*)|(\s*$)/g,"")]=o(u[1].replace(/(^\s*)|(\s*$)/g,""));else t=o(t);this.tagValCache.key=t}return t},get:function(n,t){var u=this.getTagSetting(n),r;return u!==a?u:(r=this.mergedOptions[n])===i?t:r}}),r.fn.sparkline._base=u({disabled:!1,init:function(n,t,u,f,e){this.el=n,this.$el=r(n),this.values=t,this.options=u,this.width=f,this.height=e,this.currentRegion=i},initTarget:function(){var n=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),n))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(){},setRegionHighlight:function(n,t,r){var f=this.currentRegion,e=!this.options.get("disableHighlight"),u;return t>this.canvasWidth||r>this.canvasHeight||t<0||r<0?null:(u=this.getRegion(n,t,r),f!==u)?(f!==i&&e&&this.removeHighlight(),this.currentRegion=u,u!==i&&e&&this.renderHighlight(),!0):!1},clearRegionHighlight:function(){return this.currentRegion!==i?(this.removeHighlight(),this.currentRegion=i,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(){},getCurrentRegionTooltip:function(){var t=this.options,w="",v=[],n,o,y,d,b,f,a,h,c,k,l,s,p,u;if(this.currentRegion===i)return"";if(n=this.getCurrentRegionFields(),l=t.get("tooltipFormatter"),l)return l(this,t,n);if(t.get("tooltipChartTitle")&&(w+='<div class="jqs jqstitle">'+t.get("tooltipChartTitle")+"</div>\n"),o=this.options.get("tooltipFormat"),!o)return"";if(r.isArray(o)||(o=[o]),r.isArray(n)||(n=[n]),a=this.options.get("tooltipFormatFieldlist"),h=this.options.get("tooltipFormatFieldlistKey"),a&&h){for(c=[],f=n.length;f--;)k=n[f][h],(u=r.inArray(k,a))!=-1&&(c[u]=n[f]);n=c}for(y=o.length,p=n.length,f=0;f<y;f++)for(s=o[f],typeof s=="string"&&(s=new e(s)),d=s.fclass||"jqsfield",u=0;u<p;u++)n[u].isNull&&t.get("tooltipSkipNull")||(r.extend(n[u],{prefix:t.get("tooltipPrefix"),suffix:t.get("tooltipSuffix")}),b=s.render(n[u],t.get("tooltipValueLookups"),t),v.push('<div class="'+d+'">'+b+"</div>"));return v.length?w+v.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(n,i){var o=i.get("highlightColor"),e=i.get("highlightLighten"),f,s,u,r;if(o)return o;if(e&&(f=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(n)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(n),f)){for(u=[],s=n.length===4?16:1,r=0;r<3;r++)u[r]=h(t.round(parseInt(f[r+1],16)*s*e),0,255);return"rgb("+u.join(",")+")"}return n}}),l={changeHighlight:function(n){var u=this.currentRegion,f=this.target,i=this.regionShapes[u],t;i&&(t=this.renderRegion(u,n),r.isArray(t)||r.isArray(i)?(f.replaceWithShapes(i,t),this.regionShapes[u]=r.map(t,function(n){return n.id})):(f.replaceWithShape(i,t),this.regionShapes[u]=t.id))},render:function(){var e=this.values,o=this.target,f=this.regionShapes,n,u,t,i;if(this.cls._super.render.call(this)){for(t=e.length;t--;)if(n=this.renderRegion(t),n)if(r.isArray(n)){for(u=[],i=n.length;i--;)n[i].append(),u.push(n[i].id);f[t]=u}else n.append(),f[t]=n.id;else f[t]=null;o.render()}}},r.fn.sparkline.line=y=u(r.fn.sparkline._base,{type:"line",init:function(n,t,i,r,u){y._super.init.call(this,n,t,i,r,u),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(n,t){for(var f=this.regionMap,u=f.length;u--;)if(f[u]!==null&&t>=f[u][0]&&t<=f[u][1])return f[u][2];return i},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.yvalues[n]===null,x:this.xvalues[n],y:this.yvalues[n],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:n}},renderHighlight:function(){var h=this.currentRegion,t=this.target,n=this.vertices[h],u=this.options,o=u.get("spotRadius"),s=u.get("highlightSpotColor"),e=u.get("highlightLineColor"),r,f;n&&(o&&s&&(r=t.drawCircle(n[0],n[1],o,i,s),this.highlightSpotId=r.id,t.insertAfterShape(this.lastShapeId,r)),e&&(f=t.drawLine(n[0],this.canvasTop,n[0],this.canvasTop+this.canvasHeight,e),this.highlightLineId=f.id,t.insertAfterShape(this.lastShapeId,f)))},removeHighlight:function(){var n=this.target;this.highlightSpotId&&(n.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(n.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){for(var i=this.values,c=i.length,r=this.xvalues,o=this.yvalues,f=this.yminmax,u,s,h,e,n=0;n<c;n++)u=i[n],s=typeof i[n]=="string",h=typeof i[n]=="object"&&i[n]instanceof Array,e=s&&i[n].split(":"),s&&e.length===2?(r.push(Number(e[0])),o.push(Number(e[1])),f.push(Number(e[1]))):h?(r.push(u[0]),o.push(u[1]),f.push(u[1])):(r.push(n),i[n]===null||i[n]==="null"?o.push(null):(o.push(Number(u)),f.push(Number(u))));this.options.get("xvalues")&&(r=this.options.get("xvalues")),this.maxy=this.maxyorg=t.max.apply(t,f),this.miny=this.minyorg=t.min.apply(t,f),this.maxx=t.max.apply(t,r),this.minx=t.min.apply(t,r),this.xvalues=r,this.yvalues=o,this.yminmax=f},processRangeOptions:function(){var n=this.options,t=n.get("normalRangeMin"),r=n.get("normalRangeMax");t!==i&&(t<this.miny&&(this.miny=t),r>this.maxy&&(this.maxy=r)),n.get("chartRangeMin")!==i&&(n.get("chartRangeClip")||n.get("chartRangeMin")<this.miny)&&(this.miny=n.get("chartRangeMin")),n.get("chartRangeMax")!==i&&(n.get("chartRangeClip")||n.get("chartRangeMax")>this.maxy)&&(this.maxy=n.get("chartRangeMax")),n.get("chartRangeMinX")!==i&&(n.get("chartRangeClipX")||n.get("chartRangeMinX")<this.minx)&&(this.minx=n.get("chartRangeMinX")),n.get("chartRangeMaxX")!==i&&(n.get("chartRangeClipX")||n.get("chartRangeMaxX")>this.maxx)&&(this.maxx=n.get("chartRangeMaxX"))},drawNormalRange:function(n,r,u,f,e){var c=this.options.get("normalRangeMin"),o=this.options.get("normalRangeMax"),h=r+t.round(u-u*((o-this.miny)/e)),s=t.round(u*(o-c)/e);this.target.drawRect(n,h,f,s,i,this.options.get("normalRangeColor")).append()},render:function(){var u=this.options,v=this.target,l=this.canvasWidth,o=this.canvasHeight,at=this.vertices,f=u.get("spotRadius"),pt=this.regionMap,k,w,d,c,a,ct,e,ot,g,b,yt,tt,vt,lt,st,et,ut,ft,nt,rt,it,ht,p,h,n;if(y._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),p=this.xvalues,h=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(c=a=0,k=this.maxx-this.minx==0?1:this.maxx-this.minx,w=this.maxy-this.miny==0?1:this.maxy-this.miny,d=this.yvalues.length-1,f&&(l<f*4||o<f*4)&&(f=0),f&&(it=u.get("highlightSpotColor")&&!u.get("disableInteraction"),(it||u.get("minSpotColor")||u.get("spotColor")&&h[d]===this.miny)&&(o-=t.ceil(f)),(it||u.get("maxSpotColor")||u.get("spotColor")&&h[d]===this.maxy)&&(o-=t.ceil(f),c+=t.ceil(f)),(it||(u.get("minSpotColor")||u.get("maxSpotColor"))&&(h[0]===this.miny||h[0]===this.maxy))&&(a+=t.ceil(f),l-=t.ceil(f)),(it||u.get("spotColor")||u.get("minSpotColor")||u.get("maxSpotColor")&&(h[d]===this.miny||h[d]===this.maxy))&&(l-=t.ceil(f))),o--,u.get("normalRangeMin")===i||u.get("drawNormalOnTop")||this.drawNormalRange(a,c,o,l,w),e=[],ot=[e],lt=st=null,et=h.length,n=0;n<et;n++)g=p[n],yt=p[n+1],b=h[n],tt=a+t.round((g-this.minx)*(l/k)),vt=n<et-1?a+t.round((yt-this.minx)*(l/k)):l,st=tt+(vt-tt)/2,pt[n]=[lt||0,st,n],lt=st,b===null?n&&(h[n-1]!==null&&(e=[],ot.push(e)),at.push(null)):(b<this.miny&&(b=this.miny),b>this.maxy&&(b=this.maxy),e.length||e.push([tt,c+o]),ct=[tt,c+t.round(o-o*((b-this.miny)/w))],e.push(ct),at.push(ct));for(ut=[],ft=[],nt=ot.length,n=0;n<nt;n++)e=ot[n],e.length&&(u.get("fillColor")&&(e.push([e[e.length-1][0],c+o]),ft.push(e.slice(0)),e.pop()),e.length>2&&(e[0]=[e[0][0],e[1][1]]),ut.push(e));for(nt=ft.length,n=0;n<nt;n++)v.drawShape(ft[n],u.get("fillColor"),u.get("fillColor")).append();for(u.get("normalRangeMin")!==i&&u.get("drawNormalOnTop")&&this.drawNormalRange(a,c,o,l,w),nt=ut.length,n=0;n<nt;n++)v.drawShape(ut[n],u.get("lineColor"),i,u.get("lineWidth")).append();if(f&&u.get("valueSpots"))for(rt=u.get("valueSpots"),rt.get===i&&(rt=new s(rt)),n=0;n<et;n++)ht=rt.get(h[n]),ht&&v.drawCircle(a+t.round((p[n]-this.minx)*(l/k)),c+t.round(o-o*((h[n]-this.miny)/w)),f,i,ht).append();f&&u.get("spotColor")&&h[d]!==null&&v.drawCircle(a+t.round((p[p.length-1]-this.minx)*(l/k)),c+t.round(o-o*((h[d]-this.miny)/w)),f,i,u.get("spotColor")).append(),this.maxy!==this.minyorg&&(f&&u.get("minSpotColor")&&(g=p[r.inArray(this.minyorg,h)],v.drawCircle(a+t.round((g-this.minx)*(l/k)),c+t.round(o-o*((this.minyorg-this.miny)/w)),f,i,u.get("minSpotColor")).append()),f&&u.get("maxSpotColor")&&(g=p[r.inArray(this.maxyorg,h)],v.drawCircle(a+t.round((g-this.minx)*(l/k)),c+t.round(o-o*((this.maxyorg-this.miny)/w)),f,i,u.get("maxSpotColor")).append())),this.lastShapeId=v.getLastShapeId(),this.canvasTop=c,v.render()}}}),r.fn.sparkline.bar=lt=u(r.fn.sparkline._base,l,{type:"bar",init:function(n,u,f,e,c){var at=parseInt(f.get("barWidth"),10),vt=parseInt(f.get("barSpacing"),10),ii=f.get("chartRangeMin"),gt=f.get("chartRangeMax"),st=f.get("chartRangeClip"),it=Infinity,g=-Infinity,ct,yt,wt,tt,w,a,ot,pt,et,b,v,y,bt,kt,p,rt,d,ti,ni,l,k,dt,ri,ft,ut;for(lt._super.init.call(this,n,u,f,e,c),a=0,ot=u.length;a<ot;a++)l=u[a],ct=typeof l=="string"&&l.indexOf(":")>-1,(ct||r.isArray(l))&&(p=!0,ct&&(l=u[a]=nt(l.split(":"))),l=ht(l,null),yt=t.min.apply(t,l),wt=t.max.apply(t,l),yt<it&&(it=yt),wt>g&&(g=wt));for(this.stacked=p,this.regionShapes={},this.barWidth=at,this.barSpacing=vt,this.totalBarWidth=at+vt,this.width=e=u.length*at+(u.length-1)*vt,this.initTarget(),st&&(bt=ii===i?-Infinity:ii,kt=gt===i?Infinity:gt),w=[],tt=p?[]:w,ft=[],ut=[],a=0,ot=u.length;a<ot;a++)if(p)for(rt=u[a],u[a]=ni=[],ft[a]=0,tt[a]=ut[a]=0,d=0,ti=rt.length;d<ti;d++)l=ni[d]=st?h(rt[d],bt,kt):rt[d],l!==null&&(l>0&&(ft[a]+=l),it<0&&g>0?l<0?ut[a]+=t.abs(l):tt[a]+=l:tt[a]+=t.abs(l-(l<0?g:it)),w.push(l));else l=st?h(u[a],bt,kt):u[a],l=u[a]=o(l),l!==null&&w.push(l);this.max=y=t.max.apply(t,w),this.min=v=t.min.apply(t,w),this.stackMax=g=p?t.max.apply(t,ft):y,this.stackMin=it=p?t.min.apply(t,w):v,f.get("chartRangeMin")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMin")<v)&&(v=f.get("chartRangeMin")),f.get("chartRangeMax")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMax")>y)&&(y=f.get("chartRangeMax")),this.zeroAxis=et=f.get("zeroAxis",!0),b=v<=0&&y>=0&&et?0:et==!1?v:v>0?v:y,this.xaxisOffset=b,pt=p?t.max.apply(t,tt)+t.max.apply(t,ut):y-v,this.canvasHeightEf=et&&v<0?this.canvasHeight-2:this.canvasHeight-1,v<b?(dt=p&&y>=0?g:y,k=(dt-b)/pt*this.canvasHeight,k!==t.ceil(k)&&(this.canvasHeightEf-=2,k=t.ceil(k))):k=this.canvasHeight,this.yoffset=k,r.isArray(f.get("colorMap"))?(this.colorMapByIndex=f.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=f.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new s(this.colorMapByValue))),this.range=pt},getRegion:function(n,r){var f=t.floor(r/this.totalBarWidth);return f<0||f>=this.values.length?i:f},getCurrentRegionFields:function(){for(var i=this.currentRegion,u=et(this.values[i]),r=[],n,t=u.length;t--;)n=u[t],r.push({isNull:n===null,value:n,color:this.calcColor(t,n,i),offset:i});return r},calcColor:function(n,t,u){var o=this.colorMapByIndex,h=this.colorMapByValue,e=this.options,f,s;return f=this.stacked?e.get("stackedBarColor"):t<0?e.get("negBarColor"):e.get("barColor"),t===0&&e.get("zeroColor")!==i&&(f=e.get("zeroColor")),h&&(s=h.get(t))?f=s:o&&o.length>u&&(f=o[u]),r.isArray(f)?f[n%f.length]:f},renderRegion:function(n,u){var f=this.values[n],v=this.options,c=this.xaxisOffset,y=[],nt=this.range,ut=this.stacked,d=this.target,it=n*this.totalBarWidth,rt=this.canvasHeightEf,o=this.yoffset,l,h,e,k,p,a,w,s,b,tt;if(f=r.isArray(f)?f:[f],w=f.length,s=f[0],k=g(null,f),tt=g(c,f,!0),k)return v.get("nullColor")?(e=u?v.get("nullColor"):this.calcHighlightColor(v.get("nullColor"),v),l=o>0?o-1:o,d.drawRect(it,l,this.barWidth-1,0,e,e)):i;for(p=o,a=0;a<w;a++){if(s=f[a],ut&&s===c){if(!tt||b)continue;b=!0}h=nt>0?t.floor(rt*(t.abs(s-c)/nt))+1:1,s<c||s===c&&o===0?(l=p,p+=h):(l=o-h,o-=h),e=this.calcColor(a,s,n),u&&(e=this.calcHighlightColor(e,v)),y.push(d.drawRect(it,l,this.barWidth-1,h-1,e,e))}return y.length===1?y[0]:y}}),r.fn.sparkline.tristate=at=u(r.fn.sparkline._base,l,{type:"tristate",init:function(n,t,u,f,e){var h=parseInt(u.get("barWidth"),10),o=parseInt(u.get("barSpacing"),10);at._super.init.call(this,n,t,u,f,e),this.regionShapes={},this.barWidth=h,this.barSpacing=o,this.totalBarWidth=h+o,this.values=r.map(t,Number),this.width=f=t.length*h+(t.length-1)*o,r.isArray(u.get("colorMap"))?(this.colorMapByIndex=u.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=u.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new s(this.colorMapByValue))),this.initTarget()},getRegion:function(n,i){return t.floor(i/this.totalBarWidth)},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],color:this.calcColor(this.values[n],n),offset:n}},calcColor:function(n,t){var e=this.values,u=this.options,r=this.colorMapByIndex,o=this.colorMapByValue,i,f;return i=o&&(f=o.get(n))?f:r&&r.length>t?r[t]:e[t]<0?u.get("negBarColor"):e[t]>0?u.get("posBarColor"):u.get("zeroBarColor")},renderRegion:function(n,i){var o=this.values,l=this.options,h=this.target,c,f,u,s,e,r;if(c=h.pixelHeight,u=t.round(c/2),s=n*this.totalBarWidth,o[n]<0?(e=u,f=u-1):o[n]>0?(e=0,f=u-1):(e=u-1,f=2),r=this.calcColor(o[n],n),r!==null)return i&&(r=this.calcHighlightColor(r,l)),h.drawRect(s,e,this.barWidth-1,f-1,r,r)}}),r.fn.sparkline.discrete=tt=u(r.fn.sparkline._base,l,{type:"discrete",init:function(n,u,f,e,o){tt._super.init.call(this,n,u,f,e,o),this.regionShapes={},this.values=u=r.map(u,Number),this.min=t.min.apply(t,u),this.max=t.max.apply(t,u),this.range=this.max-this.min,this.width=e=f.get("width")==="auto"?u.length*2:this.width,this.interval=t.floor(e/u.length),this.itemWidth=e/u.length,f.get("chartRangeMin")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMin")<this.min)&&(this.min=f.get("chartRangeMin")),f.get("chartRangeMax")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMax")>this.max)&&(this.max=f.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight=f.get("lineHeight")==="auto"?t.round(this.canvasHeight*.3):f.get("lineHeight"))},getRegion:function(n,i){return t.floor(i/this.itemWidth)},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],offset:n}},renderRegion:function(n,i){var a=this.values,r=this.options,s=this.min,y=this.max,b=this.range,v=this.interval,p=this.target,w=this.canvasHeight,c=this.lineHeight,l=w-c,e,o,u,f;return o=h(a[n],s,y),f=n*v,e=t.round(l-l*((o-s)/b)),u=r.get("thresholdColor")&&o<r.get("thresholdValue")?r.get("thresholdColor"):r.get("lineColor"),i&&(u=this.calcHighlightColor(u,r)),p.drawLine(f,e,f,e+c,u)}}),r.fn.sparkline.bullet=p=u(r.fn.sparkline._base,{type:"bullet",init:function(n,r,u,f,e){var s,h,o;p._super.init.call(this,n,r,u,f,e),this.values=r=nt(r),o=r.slice(),o[0]=o[0]===null?o[2]:o[0],o[1]=r[1]===null?o[2]:o[1],s=t.min.apply(t,r),h=t.max.apply(t,r),s=u.get("base")===i?s<0?s:0:u.get("base"),this.min=s,this.max=h,this.range=h-s,this.shapes={},this.valueShapes={},this.regiondata={},this.width=f=u.get("width")==="auto"?"4.0em":f,this.target=this.$el.simpledraw(f,e,u.get("composite")),r.length||(this.disabled=!0),this.initTarget()},getRegion:function(n,t,r){var u=this.target.getShapeAt(n,t,r);return u!==i&&this.shapes[u]!==i?this.shapes[u]:i},getCurrentRegionFields:function(){var n=this.currentRegion;return{fieldkey:n.substr(0,1),value:this.values[n.substr(1)],region:n}},changeHighlight:function(n){var i=this.currentRegion,r=this.valueShapes[i],t;delete this.shapes[r];switch(i.substr(0,1)){case"r":t=this.renderRange(i.substr(1),n);break;case"p":t=this.renderPerformance(n);break;case"t":t=this.renderTarget(n)}this.valueShapes[i]=t.id,this.shapes[t.id]=i,this.target.replaceWithShape(r,t)},renderRange:function(n,i){var u=this.values[n],f=t.round(this.canvasWidth*((u-this.min)/this.range)),r=this.options.get("rangeColors")[n-2];return i&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,f-1,this.canvasHeight-1,r,r)},renderPerformance:function(n){var r=this.values[1],u=t.round(this.canvasWidth*((r-this.min)/this.range)),i=this.options.get("performanceColor");return n&&(i=this.calcHighlightColor(i,this.options)),this.target.drawRect(0,t.round(this.canvasHeight*.3),u-1,t.round(this.canvasHeight*.4)-1,i,i)},renderTarget:function(n){var e=this.values[0],u=t.round(this.canvasWidth*((e-this.min)/this.range)-this.options.get("targetWidth")/2),r=t.round(this.canvasHeight*.1),f=this.canvasHeight-r*2,i=this.options.get("targetColor");return n&&(i=this.calcHighlightColor(i,this.options)),this.target.drawRect(u,r,this.options.get("targetWidth")-1,f-1,i,i)},render:function(){var i=this.values.length,r=this.target,t,n;if(p._super.render.call(this)){for(t=2;t<i;t++)n=this.renderRange(t).append(),this.shapes[n.id]="r"+t,this.valueShapes["r"+t]=n.id;this.values[1]!==null&&(n=this.renderPerformance().append(),this.shapes[n.id]="p1",this.valueShapes.p1=n.id),this.values[0]!==null&&(n=this.renderTarget().append(),this.shapes[n.id]="t0",this.valueShapes.t0=n.id),r.render()}}}),r.fn.sparkline.pie=w=u(r.fn.sparkline._base,{type:"pie",init:function(n,i,u,f,e){var s=0,o;if(w._super.init.call(this,n,i,u,f,e),this.shapes={},this.valueShapes={},this.values=i=r.map(i,Number),u.get("width")==="auto"&&(this.width=this.height),i.length>0)for(o=i.length;o--;)s+=i[o];this.total=s,this.initTarget(),this.radius=t.floor(t.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(n,t,r){var u=this.target.getShapeAt(n,t,r);return u!==i&&this.shapes[u]!==i?this.shapes[u]:i},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],percent:this.values[n]/this.total*100,color:this.options.get("sliceColors")[n%this.options.get("sliceColors").length],offset:n}},changeHighlight:function(n){var t=this.currentRegion,i=this.renderSlice(t,n),r=this.valueShapes[t];delete this.shapes[r],this.target.replaceWithShape(r,i),this.valueShapes[t]=i.id,this.shapes[i.id]=t},renderSlice:function(n,r){for(var b=this.target,f=this.options,h=this.radius,w=f.get("borderWidth"),a=f.get("offset"),p=2*t.PI,y=this.values,v=this.total,o=a?2*t.PI*(a/360):0,c,s,e,l=y.length,u=0;u<l;u++){if(c=o,s=o,v>0&&(s=o+p*(y[u]/v)),n===u)return e=f.get("sliceColors")[u%f.get("sliceColors").length],r&&(e=this.calcHighlightColor(e,f)),b.drawPieSlice(h,h,h-w,c,s,i,e);o=s}},render:function(){var e=this.target,o=this.values,s=this.options,f=this.radius,r=s.get("borderWidth"),u,n;if(w._super.render.call(this)){for(r&&e.drawCircle(f,f,t.floor(f-r/2),s.get("borderColor"),i,r).append(),n=o.length;n--;)o[n]&&(u=this.renderSlice(n).append(),this.valueShapes[n]=u.id,this.shapes[u.id]=n);e.render()}}}),r.fn.sparkline.box=v=u(r.fn.sparkline._base,{type:"box",init:function(n,t,i,u,f){v._super.init.call(this,n,t,i,u,f),this.values=r.map(t,Number),this.width=i.get("width")==="auto"?"4.0em":u,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var n=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==i&&n.push({field:"lo",value:this.loutlier}),this.routlier!==i&&n.push({field:"ro",value:this.routlier}),this.lwhisker!==i&&n.push({field:"lw",value:this.lwhisker}),this.rwhisker!==i&&n.push({field:"rw",value:this.rwhisker}),n},render:function(){var h=this.target,r=this.values,tt=r.length,n=this.options,g=this.canvasWidth,u=this.canvasHeight,e=n.get("chartRangeMin")===i?t.min.apply(t,r):n.get("chartRangeMin"),it=n.get("chartRangeMax")===i?t.max.apply(t,r):n.get("chartRangeMax"),o=0,s,b,nt,a,w,y,l,d,p,k,f;if(v._super.render.call(this)){if(n.get("raw"))n.get("showOutliers")&&r.length>5?(b=r[0],s=r[1],a=r[2],w=r[3],y=r[4],l=r[5],d=r[6]):(s=r[0],a=r[1],w=r[2],y=r[3],l=r[4]);else if(r.sort(function(n,t){return n-t}),a=c(r,1),w=c(r,2),y=c(r,3),nt=y-a,n.get("showOutliers")){for(s=l=i,p=0;p<tt;p++)s===i&&r[p]>a-nt*n.get("outlierIQR")&&(s=r[p]),r[p]<y+nt*n.get("outlierIQR")&&(l=r[p]);b=r[0],d=r[tt-1]}else s=r[0],l=r[tt-1];this.quartiles=[a,w,y],this.lwhisker=s,this.rwhisker=l,this.loutlier=b,this.routlier=d,f=g/(it-e+1),n.get("showOutliers")&&(o=t.ceil(n.get("spotRadius")),g-=2*t.ceil(n.get("spotRadius")),f=g/(it-e+1),b<s&&h.drawCircle((b-e)*f+o,u/2,n.get("spotRadius"),n.get("outlierLineColor"),n.get("outlierFillColor")).append(),d>l&&h.drawCircle((d-e)*f+o,u/2,n.get("spotRadius"),n.get("outlierLineColor"),n.get("outlierFillColor")).append()),h.drawRect(t.round((a-e)*f+o),t.round(u*.1),t.round((y-a)*f),t.round(u*.8),n.get("boxLineColor"),n.get("boxFillColor")).append(),h.drawLine(t.round((s-e)*f+o),t.round(u/2),t.round((a-e)*f+o),t.round(u/2),n.get("lineColor")).append(),h.drawLine(t.round((s-e)*f+o),t.round(u/4),t.round((s-e)*f+o),t.round(u-u/4),n.get("whiskerColor")).append(),h.drawLine(t.round((l-e)*f+o),t.round(u/2),t.round((y-e)*f+o),t.round(u/2),n.get("lineColor")).append(),h.drawLine(t.round((l-e)*f+o),t.round(u/4),t.round((l-e)*f+o),t.round(u-u/4),n.get("whiskerColor")).append(),h.drawLine(t.round((w-e)*f+o),t.round(u*.1),t.round((w-e)*f+o),t.round(u*.9),n.get("medianColor")).append(),n.get("target")&&(k=t.ceil(n.get("spotRadius")),h.drawLine(t.round((n.get("target")-e)*f+o),t.round(u/2-k),t.round((n.get("target")-e)*f+o),t.round(u/2+k),n.get("targetColor")).append(),h.drawLine(t.round((n.get("target")-e)*f+o-k),t.round(u/2),t.round((n.get("target")-e)*f+o+k),t.round(u/2),n.get("targetColor")).append()),h.render()}}}),rt=u({init:function(n,t,i,r){this.target=n,this.id=t,this.type=i,this.args=r},append:function(){return this.target.appendShape(this),this}}),b=u({_pxregex:/(\d+)(px)?\s*$/i,init:function(n,t,i){n&&(this.width=n,this.height=t,this.target=i,this.lastShapeId=null,i[0]&&(i=i[0]),r.data(i,"_jqs_vcanvas",this))},drawLine:function(n,t,i,r,u,f){return this.drawShape([[n,t],[i,r]],u,f)},drawShape:function(n,t,i,r){return this._genShape("Shape",[n,t,i,r])},drawCircle:function(n,t,i,r,u,f){return this._genShape("Circle",[n,t,i,r,u,f])},drawPieSlice:function(n,t,i,r,u,f,e){return this._genShape("PieSlice",[n,t,i,r,u,f,e])},drawRect:function(n,t,i,r,u,f){return this._genShape("Rect",[n,t,i,r,u,f])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(n,t){r(t).html(n)},_calculatePixelDims:function(n,t,i){var u;u=this._pxregex.exec(t),this.pixelHeight=u?u[1]:r(i).height(),u=this._pxregex.exec(n),this.pixelWidth=u?u[1]:r(i).width()},_genShape:function(n,t){var i=pt++;return t.unshift(i),new rt(this,i,n,t)},appendShape:function(){alert("appendShape not implemented")},replaceWithShape:function(){alert("replaceWithShape not implemented")},insertAfterShape:function(){alert("insertAfterShape not implemented")},removeShapeId:function(){alert("removeShapeId not implemented")},getShapeAt:function(){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),d=u(b,{init:function(t,u,f,e){d._super.init.call(this,t,u,f),this.canvas=n.createElement("canvas"),f[0]&&(f=f[0]),r.data(f,"_jqs_vcanvas",this),r(this.canvas).css({display:"inline-block",width:t,height:u,verticalAlign:"top"}),this._insert(this.canvas,f),this._calculatePixelDims(t,u,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=e,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i,r(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(n,t,r){var u=this.canvas.getContext("2d");return n!==i&&(u.strokeStyle=n),u.lineWidth=r===i?1:r,t!==i&&(u.fillStyle=t),u},reset:function(){var n=this._getContext();n.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i},_drawShape:function(n,t,r,u,f){var e=this._getContext(r,u,f),o,s;for(e.beginPath(),e.moveTo(t[0][0]+.5,t[0][1]+.5),o=1,s=t.length;o<s;o++)e.lineTo(t[o][0]+.5,t[o][1]+.5);r!==i&&e.stroke(),u!==i&&e.fill(),this.targetX!==i&&this.targetY!==i&&e.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n)},_drawCircle:function(n,r,u,f,e,o,s){var h=this._getContext(e,o,s);h.beginPath(),h.arc(r,u,f,0,2*t.PI,!1),this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n),e!==i&&h.stroke(),o!==i&&h.fill()},_drawPieSlice:function(n,t,r,u,f,e,o,s){var h=this._getContext(o,s);h.beginPath(),h.moveTo(t,r),h.arc(t,r,u,f,e,!1),h.lineTo(t,r),h.closePath(),o!==i&&h.stroke(),s&&h.fill(),this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n)},_drawRect:function(n,t,i,r,u,f,e){return this._drawShape(n,[[t,i],[t+r,i],[t+r,i+u],[t,i+u],[t,i]],f,e)},appendShape:function(n){return this.shapes[n.id]=n,this.shapeseq.push(n.id),this.lastShapeId=n.id,n.id},replaceWithShape:function(n,t){var r=this.shapeseq,i;for(this.shapes[t.id]=t,i=r.length;i--;)r[i]==n&&(r[i]=t.id);delete this.shapes[n]},replaceWithShapes:function(n,t){for(var r=this.shapeseq,e={},u,f,i=n.length;i--;)e[n[i]]=!0;for(i=r.length;i--;)u=r[i],e[u]&&(r.splice(i,1),delete this.shapes[u],f=i);for(i=t.length;i--;)r.splice(f,0,t[i].id),this.shapes[t[i].id]=t[i]},insertAfterShape:function(n,t){for(var r=this.shapeseq,i=r.length;i--;)if(r[i]===n){r.splice(i+1,0,t.id),this.shapes[t.id]=t;return}},removeShapeId:function(n){for(var i=this.shapeseq,t=i.length;t--;)if(i[t]===n){i.splice(t,1);break}delete this.shapes[n]},getShapeAt:function(n,t,i){return this.targetX=t,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var r=this.shapeseq,f=this.shapes,e=r.length,u=this._getContext(),i,t,n;for(u.clearRect(0,0,this.pixelWidth,this.pixelHeight),n=0;n<e;n++)i=r[n],t=f[i],this["_draw"+t.type].apply(this,t.args);this.interact||(this.shapes={},this.shapeseq=[])}}),k=u(b,{init:function(t,i,u){var f;k._super.init.call(this,t,i,u),u[0]&&(u=u[0]),r.data(u,"_jqs_vcanvas",this),this.canvas=n.createElement("span"),r(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:t,height:i,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,u),this._calculatePixelDims(t,i,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,f='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",f),this.group=r(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(n,t,r,u,f){for(var o=[],c,l,a,v,s,e=0,h=t.length;e<h;e++)o[e]=""+t[e][0]+","+t[e][1];return c=o.splice(0,1),f=f===i?1:f,l=r===i?' stroked="false" ':' strokeWeight="'+f+'px" strokeColor="'+r+'" ',a=u===i?' filled="false"':' fillColor="'+u+'" filled="true" ',v=o[0]===o[o.length-1]?"x ":"",s='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+n+'" '+l+a+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+c+" l "+o.join(", ")+" "+v+'e"> </v:shape>'},_drawCircle:function(n,t,r,u,f,e,o){var c,h,s;return t-=u,r-=u,c=f===i?' stroked="false" ':' strokeWeight="'+o+'px" strokeColor="'+f+'" ',h=e===i?' filled="false"':' fillColor="'+e+'" filled="true" ',s='<v:oval  id="jqsshape'+n+'" '+c+h+' style="position:absolute;top:'+r+"px; left:"+t+"px; width:"+u*2+"px; height:"+u*2+'px"></v:oval>'},_drawPieSlice:function(n,r,u,f,e,o,s,h){var w,v,c,a,l,b,y,p;if(e===o)return"";if(o-e==2*t.PI&&(e=0,o=2*t.PI),v=r+t.round(t.cos(e)*f),c=u+t.round(t.sin(e)*f),a=r+t.round(t.cos(o)*f),l=u+t.round(t.sin(o)*f),v===a&&c===l){if(o-e<t.PI)return"";v=a=r+f,c=l=u}return v===a&&c===l&&o-e<t.PI?"":(w=[r-f,u-f,r+f,u+f,v,c,a,l],b=s===i?' stroked="false" ':' strokeWeight="1px" strokeColor="'+s+'" ',y=h===i?' filled="false"':' fillColor="'+h+'" filled="true" ',p='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+n+'" '+b+y+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+r+","+u+" wa "+w.join(", ")+' x e"> </v:shape>')},_drawRect:function(n,t,i,r,u,f,e){return this._drawShape(n,[[t,i],[t,i+u],[t+r,i+u],[t+r,i],[t,i]],f,e)},reset:function(){this.group.innerHTML=""},appendShape:function(n){var t=this["_draw"+n.type].apply(this,n.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",t):this.prerender+=t,this.lastShapeId=n.id,n.id},replaceWithShape:function(n,t){var u=r("#jqsshape"+n),i=this["_draw"+t.type].apply(this,t.args);u[0].outerHTML=i},replaceWithShapes:function(n,t){for(var f=r("#jqsshape"+n[0]),u="",e=t.length,i=0;i<e;i++)u+=this["_draw"+t[i].type].apply(this,t[i].args);for(f[0].outerHTML=u,i=1;i<n.length;i++)r("#jqsshape"+n[i]).remove()},insertAfterShape:function(n,t){var u=r("#jqsshape"+n),i=this["_draw"+t.type].apply(this,t.args);u[0].insertAdjacentHTML("afterEnd",i)},removeShapeId:function(n){var t=r("#jqsshape"+n);this.group.removeChild(t[0])},getShapeAt:function(n){return n.id.substr(8)},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math),function(){function s(n,t){function r(){this.constructor=n}for(var i in t)d.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n}function y(n,t){null==n&&(n=!0),this.clear=null==t||t,n&&AnimationUpdater.add(this)}function i(){return i.__super__.constructor.apply(this,arguments)}function nt(n,t){this.el=n,this.fractionDigits=t}function u(n,t){if(this.elem=n,this.text=null!=t&&t,u.__super__.constructor.call(this),void 0===this.elem)throw new Error("The element isn't defined.");this.value=1*this.elem.innerHTML,this.text&&(this.value=0)}function r(n){if(this.gauge=n,void 0===this.gauge)throw new Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,r.__super__.constructor.call(this,!1,!1),this.setOptions()}function g(n){this.elem=n}function n(t){var r,i;this.canvas=t,n.__super__.constructor.call(this),this.percentColors=null,"undefined"!=typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),r=this.canvas.clientHeight,i=this.canvas.clientWidth,this.canvas.height=r,this.canvas.width=i,this.gp=[new w(this)],this.setOptions()}function t(n){this.canvas=n,t.__super__.constructor.call(this),"undefined"!=typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}function e(){return e.__super__.constructor.apply(this,arguments)}var ut,l,p,c,h,w,o,k,b,a,f,v,tt,rt=[].slice,d={}.hasOwnProperty,it=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};!function(){for(var i,r,f,n,u,t=0,e=(u=["ms","moz","webkit","o"]).length;t<e&&(n=u[t],!window.requestAnimationFrame);t++)window.requestAnimationFrame=window[n+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"];i=null,f=0,r={},requestAnimationFrame?window.cancelAnimationFrame||(i=window.requestAnimationFrame,window.requestAnimationFrame=function(n,t){var u;return u=++f,i(function(){if(!r[u])return n()},t),u},window.cancelAnimationFrame=function(n){return r[n]=!0}):(window.requestAnimationFrame=function(n){var r,u,f,i;return r=+new Date,i=Math.max(0,16-(r-f)),u=window.setTimeout(function(){return n(r+i)},i),f=r+i,u},window.cancelAnimationFrame=function(n){return clearTimeout(n)})}(),tt=function(n){var i,t;for(n-=3600*(i=Math.floor(n/3600))+60*(t=Math.floor((n-3600*i)/60)),n+="",t+="";t.length<2;)t="0"+t;for(;n.length<2;)n="0"+n;return(i=i?i+":":"")+t+":"+n},f=function(){var i,t,n;return n=(t=1<=arguments.length?rt.call(arguments,0):[])[0],i=t[1],b(n.toFixed(i))},v=function(n,t){var i,u,r;for(i in u={},n)d.call(n,i)&&(r=n[i],u[i]=r);for(i in t)d.call(t,i)&&(r=t[i],u[i]=r);return u},b=function(n){var r,u,t,i;for(t=(u=(n+="").split("."))[0],i="",1<u.length&&(i="."+u[1]),r=/(\d+)(\d{3})/;r.test(t);)t=t.replace(r,"$1,$2");return t+i},a=function(n){return"#"===n.charAt(0)?n.substring(1,7):n},y.prototype.animationSpeed=32,y.prototype.update=function(n){var t;return null==n&&(n=!1),!(!n&&this.displayedValue===this.value||(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),t=this.value-this.displayedValue,this.displayedValue=Math.abs(t/this.animationSpeed)<=.001?this.value:this.displayedValue+t/this.animationSpeed,this.render(),0))},s(i,k=y),i.prototype.displayScale=1,i.prototype.forceUpdate=!0,i.prototype.setTextField=function(n,t){return this.textField=n instanceof o?n:new o(n,t)},i.prototype.setMinValue=function(n,t){var u,i,e,f,r;if(this.minValue=n,null==t&&(t=!0),t){for(this.displayedValue=this.minValue,r=[],i=0,e=(f=this.gp||[]).length;i<e;i++)u=f[i],r.push(u.displayedValue=this.minValue);return r}},i.prototype.setOptions=function(n){return null==n&&(n=null),this.options=v(this.options,n),this.textField&&(this.textField.el.style.fontSize=n.fontSize+"px"),.5<this.options.angle&&(this.options.angle=.5),this.configDisplayScale(),this},i.prototype.configDisplayScale=function(){var i,u,t,r,n;return r=this.displayScale,!1===this.options.highDpiSupport?delete this.displayScale:(u=window.devicePixelRatio||1,i=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=u/i),this.displayScale!==r&&(n=this.canvas.G__width||this.canvas.width,t=this.canvas.G__height||this.canvas.height,this.canvas.width=n*this.displayScale,this.canvas.height=t*this.displayScale,this.canvas.style.width=n+"px",this.canvas.style.height=t+"px",this.canvas.G__width=n,this.canvas.G__height=t),this},i.prototype.parseValue=function(n){return n=parseFloat(n)||Number(n),isFinite(n)?n:0},p=i,nt.prototype.render=function(n){return this.el.innerHTML=f(n.displayedValue,this.fractionDigits)},o=nt,s(u,k),u.prototype.displayedValue=0,u.prototype.value=0,u.prototype.setVal=function(n){return this.value=1*n},u.prototype.render=function(){var n;return n=this.text?tt(this.displayedValue.toFixed(0)):b(f(this.displayedValue)),this.elem.innerHTML=n},ut=u,s(r,k),r.prototype.displayedValue=0,r.prototype.value=0,r.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},r.prototype.img=null,r.prototype.setOptions=function(n){if(null==n&&(n=null),this.options=v(this.options,n),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},r.prototype.render=function(){var n,e,f,u,t,o,s,i,r;if(n=this.gauge.getAngle.call(this,this.displayedValue),i=Math.round(this.length*Math.cos(n)),r=Math.round(this.length*Math.sin(n)),o=Math.round(this.strokeWidth*Math.cos(n-Math.PI/2)),s=Math.round(this.strokeWidth*Math.sin(n-Math.PI/2)),e=Math.round(this.strokeWidth*Math.cos(n+Math.PI/2)),f=Math.round(this.strokeWidth*Math.sin(n+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(o,s),this.ctx.lineTo(i,r),this.ctx.lineTo(e,f),this.ctx.fill(),this.img)return u=Math.round(this.img.width*this.options.iconScale),t=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(i,r),this.ctx.rotate(n+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-u/2,-t/2,u,t),this.ctx.restore()},w=r,g.prototype.updateValues=function(n){return this.value=n[0],this.maxValue=n[1],this.avgValue=n[2],this.render()},g.prototype.render=function(){var t,n;return this.textField&&this.textField.text(f(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),n=this.value/this.maxValue*100,t=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:n+"%"}),$(".typical-value",this.elem).css({width:t+"%"})},s(n,p),n.prototype.elem=null,n.prototype.value=[20],n.prototype.maxValue=80,n.prototype.minValue=0,n.prototype.displayedAngle=0,n.prototype.displayedValue=0,n.prototype.lineWidth=40,n.prototype.paddingTop=.1,n.prototype.paddingBottom=.1,n.prototype.percentColors=null,n.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,fontSize:40,limitMax:!1,limitMin:!1},n.prototype.setOptions=function(t){var f,i,e,r,u;for(null==t&&(t=null),n.__super__.setOptions.call(this,t),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(r=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(r)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),i=0,e=(u=this.gp).length;i<e;i++)(f=u[i]).setOptions(this.options.pointer),f.render();return this.render(),this},n.prototype.configPercentColors=function(){var e,f,n,i,t,r,u;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=[],r=[],n=i=0,t=this.options.percentColors.length-1;0<=t?i<=t:t<=i;n=0<=t?++i:--i)u=parseInt(a(this.options.percentColors[n][1]).substring(0,2),16),f=parseInt(a(this.options.percentColors[n][1]).substring(2,4),16),e=parseInt(a(this.options.percentColors[n][1]).substring(4,6),16),r.push(this.percentColors[n]={pct:this.options.percentColors[n][0],color:{r:u,g:f,b:e}});return r}},n.prototype.set=function(n){var h,t,e,r,s,o,u,f,i;for(n instanceof Array||(n=[n]),t=e=0,u=n.length-1;0<=u?e<=u:u<=e;t=0<=u?++e:--e)n[t]=this.parseValue(n[t]);if(n.length>this.gp.length)for(t=r=0,f=n.length-this.gp.length;0<=f?r<f:f<r;t=0<=f?++r:--r)(h=new w(this)).setOptions(this.options.pointer),this.gp.push(h);else n.length<this.gp.length&&(this.gp=this.gp.slice(this.gp.length-n.length));for(o=t=0,s=n.length;o<s;o++)(i=n[o])>this.maxValue?this.options.limitMax?i=this.maxValue:this.maxValue=i+1:i<this.minValue&&(this.options.limitMin?i=this.minValue:this.minValue=i-1),this.gp[t].value=i,this.gp[t++].setOptions({minValue:this.minValue,maxValue:this.maxValue,angle:this.options.angle});return this.value=Math.max(Math.min(n[n.length-1],this.maxValue),this.minValue),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},n.prototype.getAngle=function(n){return(1+this.options.angle)*Math.PI+(n-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},n.prototype.getColorForPercentage=function(n,t){var f,s,u,e,i,o,r;if(0===n)f=this.percentColors[0].color;else for(f=this.percentColors[this.percentColors.length-1].color,u=e=0,o=this.percentColors.length-1;0<=o?e<=o:o<=e;u=0<=o?++e:--e)if(n<=this.percentColors[u].pct){f=!0===t?(r=this.percentColors[u-1]||this.percentColors[0],s=this.percentColors[u],i=(n-r.pct)/(s.pct-r.pct),{r:Math.floor(r.color.r*(1-i)+s.color.r*i),g:Math.floor(r.color.g*(1-i)+s.color.g*i),b:Math.floor(r.color.b*(1-i)+s.color.b*i)}):this.percentColors[u].color;break}return"rgb("+[f.r,f.g,f.b].join(",")+")"},n.prototype.getColorForValue=function(n,t){var i;return i=(n-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(i,t)},n.prototype.renderStaticLabels=function(n,t,i,r){var l,c,h,v,e,a,y,s,o,u;for(this.ctx.save(),this.ctx.translate(t,i),a=/\d+\.?\d?/,e=(l=n.font||"10px Times").match(a)[0],s=l.slice(e.length),c=parseFloat(e)*this.displayScale,this.ctx.font=c+s,this.ctx.fillStyle=n.color||"#000000",this.ctx.textBaseline="bottom",this.ctx.textAlign="center",h=0,v=(y=n.labels).length;h<v;h++)void 0!==(u=y[h]).label?(!this.options.limitMin||u>=this.minValue)&&(!this.options.limitMax||u<=this.maxValue)&&(e=(l=u.font||n.font).match(a)[0],s=l.slice(e.length),c=parseFloat(e)*this.displayScale,this.ctx.font=c+s,o=this.getAngle(u.label)-3*Math.PI/2,this.ctx.rotate(o),this.ctx.fillText(f(u.label,n.fractionDigits),0,-r-this.lineWidth/2),this.ctx.rotate(-o)):(!this.options.limitMin||u>=this.minValue)&&(!this.options.limitMax||u<=this.maxValue)&&(o=this.getAngle(u)-3*Math.PI/2,this.ctx.rotate(o),this.ctx.fillText(f(u,n.fractionDigits),0,-r-this.lineWidth/2),this.ctx.rotate(-o));return this.ctx.restore()},n.prototype.renderTicks=function(n){var f,u,tt,l,p,g,w,d,b,k,it,e,h,nt,s,c,a,y,v,o;if(n!=={}){for(g=n.divisions||0,y=n.subDivisions||0,tt=n.divColor||"#fff",nt=n.subColor||"#fff",l=n.divLength||.7,c=n.subLength||.2,b=parseFloat(this.maxValue)-parseFloat(this.minValue),k=parseFloat(b)/parseFloat(n.divisions),s=parseFloat(k)/parseFloat(n.subDivisions),f=parseFloat(this.minValue),u=0+s,p=(d=b/400)*(n.divWidth||1),a=d*(n.subWidth||1),e=[],v=w=0,it=g+1;w<it;v=w+=1)this.ctx.lineWidth=this.lineWidth*l,h=this.lineWidth/2*(1-l),o=this.radius*this.options.radiusScale+h,this.ctx.strokeStyle=tt,this.ctx.beginPath(),this.ctx.arc(0,0,o,this.getAngle(f-p),this.getAngle(f+p),!1),this.ctx.stroke(),u=f+s,f+=k,v!==n.divisions&&0<y?e.push(function(){for(var n=[],t=0,i=y-1;t<i;t+=1)this.ctx.lineWidth=this.lineWidth*c,h=this.lineWidth/2*(1-c),o=this.radius*this.options.radiusScale+h,this.ctx.strokeStyle=nt,this.ctx.beginPath(),this.ctx.arc(0,0,o,this.getAngle(u-a),this.getAngle(u+a),!1),this.ctx.stroke(),n.push(u+=s);return n}.call(this)):e.push(void 0);return e}},n.prototype.render=function(){var c,r,t,o,s,v,l,f,e,u,y,p,a,h,n,i;if(n=this.canvas.width/2,t=this.canvas.height*this.paddingTop+this.availableHeight-(this.radius+this.lineWidth/2)*this.extraPadding,c=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",u=this.radius*this.options.radiusScale,this.options.staticLabels&&this.renderStaticLabels(this.options.staticLabels,n,t,u),this.options.staticZones)for(this.ctx.save(),this.ctx.translate(n,t),this.ctx.lineWidth=this.lineWidth,o=0,v=(y=this.options.staticZones).length;o<v;o++)e=(i=y[o]).min,this.options.limitMin&&e<this.minValue&&(e=this.minValue),f=i.max,this.options.limitMax&&f>this.maxValue&&(f=this.maxValue),h=this.radius*this.options.radiusScale,i.height&&(this.ctx.lineWidth=this.lineWidth*i.height,a=this.lineWidth/2*(i.offset||1-i.height),h=this.radius*this.options.radiusScale+a),this.ctx.strokeStyle=i.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,h,this.getAngle(e),this.getAngle(f),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?r=this.options.customFillStyle(this):null!==this.percentColors?r=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((r=0===this.options.gradientType?this.ctx.createRadialGradient(n,t,9,n,t,70):this.ctx.createLinearGradient(0,0,n,0)).addColorStop(0,this.options.colorStart),r.addColorStop(1,this.options.colorStop)):r=this.options.colorStart,this.ctx.strokeStyle=r,this.ctx.beginPath(),this.ctx.arc(n,t,u,(1+this.options.angle)*Math.PI,c,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(n,t,u,c,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(n,t);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,n,t,u),this.ctx.restore(),this.ctx.translate(n,t),s=0,l=(p=this.gp).length;s<l;s++)p[s].update(!0);return this.ctx.translate(-n,-t)},h=n,s(t,p),t.prototype.lineWidth=15,t.prototype.displayedValue=0,t.prototype.value=33,t.prototype.maxValue=80,t.prototype.minValue=0,t.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35,radiusScale:1},t.prototype.getAngle=function(n){return(1-this.options.angle)*Math.PI+(n-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},t.prototype.setOptions=function(n){return null==n&&(n=null),t.__super__.setOptions.call(this,n),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.options.radiusScale*(this.canvas.height/2-this.lineWidth/2),this},t.prototype.set=function(n){return this.value=this.parseValue(n),this.value>this.maxValue?this.options.limitMax?this.value=this.maxValue:this.maxValue=this.value:this.value<this.minValue&&(this.options.limitMin?this.value=this.minValue:this.minValue=this.value),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},t.prototype.render=function(){var r,i,n,t;return r=this.getAngle(this.displayedValue),t=this.canvas.width/2,n=this.canvas.height/2,this.textField&&this.textField.render(this),(i=this.ctx.createRadialGradient(t,n,39,t,n,70)).addColorStop(0,this.options.colorStart),i.addColorStop(1,this.options.colorStop),this.radius,this.lineWidth,this.radius,this.lineWidth,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(t,n,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=i,this.ctx.beginPath(),this.ctx.arc(t,n,this.radius,(1-this.options.angle)*Math.PI,r,!1),this.ctx.stroke()},s(e,l=t),e.prototype.strokeGradient=function(n,t,i,r){var u;return(u=this.ctx.createRadialGradient(n,t,i,n,t,r)).addColorStop(0,this.options.shadowColor),u.addColorStop(.12,this.options._orgStrokeColor),u.addColorStop(.88,this.options._orgStrokeColor),u.addColorStop(1,this.options.shadowColor),u},e.prototype.setOptions=function(n){var r,u,t,i;return null==n&&(n=null),e.__super__.setOptions.call(this,n),i=this.canvas.width/2,r=this.canvas.height/2,u=this.radius-this.lineWidth/2,t=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(i,r,u,t),this},c=e,window.AnimationUpdater={elements:[],animId:null,addAll:function(n){for(var r,i=[],t=0,u=n.length;t<u;t++)r=n[t],i.push(AnimationUpdater.elements.push(r));return i},add:function(n){if(it.call(AnimationUpdater.elements,n)<0)return AnimationUpdater.elements.push(n)},run:function(n){var f,u,t,r,e,o,i;if(null==n&&(n=!1),isFinite(parseFloat(n))||!0===n){for(f=!0,i=[],t=u=0,e=(o=AnimationUpdater.elements).length;u<e;t=++u)o[t].update(!0===n)?f=!1:i.push(t);for(r=i.length-1;0<=r;r+=-1)t=i[r],AnimationUpdater.elements.splice(t,1);return AnimationUpdater.animId=f?null:requestAnimationFrame(AnimationUpdater.run)}if(!1===n)return!0===AnimationUpdater.animId&&cancelAnimationFrame(AnimationUpdater.animId),AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:h,Donut:c,BaseDonut:l,TextRenderer:o}}):"undefined"!=typeof module&&null!=module.exports?module.exports={Gauge:h,Donut:c,BaseDonut:l,TextRenderer:o}:(window.Gauge=h,window.Donut=c,window.BaseDonut=l,window.TextRenderer=o)}.call(this),function(n){n.fn.alphanumeric=function(t){return t=n.extend({ichars:"!@#$%^&*()+=[]\\';,/{}|\":<>?~`.- ",nchars:"",allow:""},t),this.each(function(){for(t.nocaps&&(t.nchars+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.allcaps&&(t.nchars+="abcdefghijklmnopqrstuvwxyz"),s=t.allow.split(""),i=0;i<s.length;i++)t.ichars.indexOf(s[i])!=-1&&(s[i]="\\"+s[i]);t.allow=s.join("|");var u=new RegExp(t.allow,"gi"),r=t.ichars+t.nchars;r=r.replace(u,""),n(this).keypress(function(n){n.charCode?k=String.fromCharCode(n.charCode):k=String.fromCharCode(n.which),r.indexOf(k)!=-1&&n.preventDefault(),n.ctrlKey&&k=="v"&&n.preventDefault()}),n(this).bind("contextmenu",function(){return!1})})},n.fn.numeric=function(t){var i="abcdefghijklmnopqrstuvwxyz";return i+=i.toUpperCase(),t=n.extend({nchars:i},t),this.each(function(){n(this).alphanumeric(t)})},n.fn.alpha=function(t){var i="1234567890";return t=n.extend({nchars:i},t),this.each(function(){n(this).alphanumeric(t)})}}(jQuery),function(n){var i={inEffect:{opacity:"show"},inEffectDuration:600,stayTime:3e3,text:"",sticky:!1,type:"notice",position:"top-right",closeText:"",close:null},t={init:function(t){t&&n.extend(i,t)},showToast:function(t){var r={},f,e,u,s,o;return n.extend(r,i,t),f=n(".toast-container").length?n(".toast-container"):n("<div></div>").addClass("toast-container").addClass("toast-position-"+r.position).appendTo("body"),e=n("<div></div>").addClass("toast-item-wrapper"),u=n("<div></div>").hide().addClass("toast-item toast-type-"+r.type).appendTo(f).html(n("<p>").append(r.text)).animate(r.inEffect,r.inEffectDuration).wrap(e),s=n("<div></div>").addClass("toast-item-close").prependTo(u).html(r.closeText).click(function(){n().toastmessage("removeToast",u,r)}),o=n("<div></div>").addClass("toast-item-image").addClass("toast-item-image-"+r.type).prependTo(u),navigator.userAgent.match(/MSIE 6/i)&&f.css({top:document.documentElement.scrollTop}),r.sticky||setTimeout(function(){n().toastmessage("removeToast",u,r)},r.stayTime),u},showNoticeToast:function(t){var i={text:t,type:"notice"};return n().toastmessage("showToast",i)},showSuccessToast:function(t){var i={text:t,type:"success"};return n().toastmessage("showToast",i)},showErrorToast:function(t){var i={text:t,type:"error"};return n().toastmessage("showToast",i)},showWarningToast:function(t){var i={text:t,type:"warning"};return n().toastmessage("showToast",i)},removeToast:function(n,t){n.animate({opacity:"0"},600,function(){n.parent().animate({height:"0px"},300,function(){n.parent().remove()})}),t&&t.close!==null&&t.close()}};n.fn.toastmessage=function(i){if(t[i])return t[i].apply(this,Array.prototype.slice.call(arguments,1));if(typeof i!="object"&&i)n.error("Method "+i+" does not exist on jQuery.toastmessage");else return t.init.apply(this,arguments)}}(jQuery),function(n){n(["jquery"],function(n){return function(){function b(n,t,r){return u({type:f.error,iconClass:i().iconClasses.error,message:n,optionsOverride:r,title:t})}function r(r,u){return(r||(r=i()),t=n("#"+r.containerId),t.length)?t:(u&&(t=v(r)),t)}function w(n,t,r){return u({type:f.info,iconClass:i().iconClasses.info,message:n,optionsOverride:r,title:t})}function p(n){o=n}function k(n,t,r){return u({type:f.success,iconClass:i().iconClasses.success,message:n,optionsOverride:r,title:t})}function a(n,t,r){return u({type:f.warning,iconClass:i().iconClasses.warning,message:n,optionsOverride:r,title:t})}function nt(n){var u=i();t||r(u),s(n,u)||d(u)}function g(u){var f=i();if(t||r(f),u&&n(":focus",u).length===0){e(u);return}t.children().length&&t.remove()}function d(i){for(var u=t.children(),r=u.length-1;r>=0;r--)s(n(u[r]),i)}function s(t,i){return t&&n(":focus",t).length===0?(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){e(t)}}),!0):!1}function v(i){return t=n("<div/>").attr("id",i.containerId).addClass(i.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(n(i.target)),t}function y(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"<button>&times;</button>",newestOnTop:!0}}function c(n){o&&o(n)}function u(u){function h(t){if(!n(":focus",o).length||t)return o[f.hideMethod]({duration:f.hideDuration,easing:f.hideEasing,complete:function(){e(o),f.onHidden&&s.state!=="hidden"&&f.onHidden(),s.state="hidden",s.endTime=new Date,c(s)}})}function k(){(f.timeOut>0||f.extendedTimeOut>0)&&(v=setTimeout(h,f.extendedTimeOut))}function b(){clearTimeout(v),o.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}var f=i(),y=u.iconClass||f.iconClass;typeof u.optionsOverride!="undefined"&&(f=n.extend(f,u.optionsOverride),y=u.optionsOverride.iconClass||y),l++,t=r(f,!0);var v=null,o=n("<div/>"),p=n("<div/>"),w=n("<div/>"),a=n(f.closeHtml),s={toastId:l,state:"visible",startTime:new Date,options:f,map:u};return u.iconClass&&o.addClass(f.toastClass).addClass(y),u.title&&(p.append(u.title).addClass(f.titleClass),o.append(p)),u.message&&(w.append(u.message).addClass(f.messageClass),o.append(w)),f.closeButton&&(a.addClass("toast-close-button").attr("role","button"),o.prepend(a)),o.hide(),f.newestOnTop?t.prepend(o):t.append(o),o[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown}),f.timeOut>0&&(v=setTimeout(h,f.timeOut)),o.hover(b,k),!f.onclick&&f.tapToDismiss&&o.click(h),f.closeButton&&a&&a.click(function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble!==undefined&&n.cancelBubble!==!0&&(n.cancelBubble=!0),h(!0)}),f.onclick&&o.click(function(){f.onclick(),h()}),c(s),f.debug&&console&&console.log(s),o}function i(){return n.extend({},y(),h.options)}function e(n){(t||(t=r()),n.is(":visible"))||(n.remove(),n=null,t.children().length===0&&t.remove())}var t,o,l=0,f={error:"error",info:"info",success:"success",warning:"warning"},h={clear:nt,remove:g,error:b,getContainer:r,info:w,options:{},subscribe:p,success:k,version:"2.0.3",warning:a};return h}()})}(typeof define=="function"&&define.amd?define:function(n,t){typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)})