text: function weatherIcon(e){switch(parseInt(e)){case 0:return"wi-tornado";case 1:case 2:return"wi-hurricane";case 3:case 4:return"wi-thunderstorm";case 5:case 6:case 7:return"wi-rain-mix";case 8:return"wi-rain-wind";case 9:return"wi-sprinkle";case 10:return"wi-hail";case 11:case 12:return"wi-showers";case 13:case 14:case 15:case 16:return"wi-snow";case 17:case 18:return"wi-hail";case 19:return"wi-dust";case 20:case 21:return"wi-fog";case 22:return"wi-smoke";case 23:case 24:return"wi-strong-wind";case 25:return"wi-snowflake-cold";case 26:return"wi-cloudy";case 27:return"wi-night-cloudy";case 28:return"wi-day-cloudy";case 29:return"wi-night-partly-cloudy";case 30:return"wi-day-sunny-overcast";case 31:return"wi-stars";case 32:return"wi-day-sunny";case 33:return"wi-night-clear";case 34:return"wi-day-sunny";case 35:return"wi-rain-mix";case 36:return"wi-hot";case 37:return"wi-thunderstorm";case 38:case 39:return"wi-storm-showers";case 40:return"wi-showers";case 41:case 42:case 43:return"wi-snow";case 44:return"wi-cloudy";case 45:return"wi-storm-showers";case 46:return"wi-snow";case 47:return"wi-thunderstorm";case 3200:return"wi-alien"}}function updateClock(e){var t,n,i,r,o=new Date;n=o.getHours(),i=o.getMinutes(),r=o.getSeconds(),"12"==e?(data.time="12",clearTimeout(timer),n>12&&(n-=12)):"24"==e&&(data.time="24",clearTimeout(timer)),parseInt(n)<10&&(n="0"+n),parseInt(i)<10&&(i="0"+i),parseInt(r)<10&&(r="0"+r),t=n+" "+i+" "+r,document.getElementById("time").innerHTML=t,timer=setTimeout(function(){updateClock(e)},1e3)}function weatherIcon(e){switch(parseInt(e)){case 0:return"wi-tornado";case 1:case 2:return"wi-hurricane";case 3:case 4:return"wi-thunderstorm";case 5:case 6:case 7:return"wi-rain-mix";case 8:return"wi-rain-wind";case 9:return"wi-sprinkle";case 10:return"wi-hail";case 11:case 12:return"wi-showers";case 13:case 14:case 15:case 16:return"wi-snow";case 17:case 18:return"wi-hail";case 19:return"wi-dust";case 20:case 21:return"wi-fog";case 22:return"wi-smoke";case 23:case 24:return"wi-strong-wind";case 25:return"wi-snowflake-cold";case 26:return"wi-cloudy";case 27:return"wi-night-cloudy";case 28:return"wi-day-cloudy";case 29:return"wi-night-partly-cloudy";case 30:return"wi-day-sunny-overcast";case 31:return"wi-stars";case 32:return"wi-day-sunny";case 33:return"wi-night-clear";case 34:return"wi-day-sunny";case 35:return"wi-rain-mix";case 36:return"wi-hot";case 37:return"wi-thunderstorm";case 38:case 39:return"wi-storm-showers";case 40:return"wi-showers";case 41:case 42:case 43:return"wi-snow";case 44:return"wi-cloudy";case 45:return"wi-storm-showers";case 46:return"wi-snow";case 47:return"wi-thunderstorm";case 3200:return"wi-alien"}}function getWeather(e,t,n){if(void 0==t||""==t||"f"==t){data.temp="f";var i="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+e+"') and u='f'&format=json"}else if("c"==t){data.temp="c";var i="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+e+"') and u='c'&format=json"}else console.log("weird units passed into weather"),console.log(typeof t+"...units is "+t);$.getJSON(i,function(t){var i=t.query.results;if(null==i)return $("#g_weather").hide(),void $("#b_weather").show();$("#g_weather").show(),$("#b_weather").hide();var r=i.channel.item.forecast;n||(e=i.channel.location.city,""!=i.channel.location.region&&(e+=", "+i.channel.location.region),e+=", "+i.channel.location.country,data.loc=e);for(var o=0;2>=o;o++)if(0===o){var s=r[0].high,a=r[0].low,l=r[0].code,c=r[0].text;setToday(s,a,c,l)}else if(1===o){var s=r[1].high,a=r[1].low,l=r[1].code,c=r[1].text;setTmw(s,a,c,l)}else if(2===o){var s=r[2].high,a=r[2].low,l=r[2].code,c=r[2].text,u=r[2].day;setDat(s,a,c,l,u)}})}function getWWL(e,t,n,i){if(1==t)if("auto"==n)$.get("http://ipinfo.io",function(t){var n=t.city+", "+t.region;getWeather(n,e,i)},"jsonp").done(function(){sendData(data)});else{var r=function(){var e="/d/create";getModOrder(),$.ajax({type:"POST",url:e,data:data})},o=function(){var t=$.Deferred(),r=n;if(void 0==e||""==e||"f"==e){data.temp="f";var o="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+r+"') and u='f'&format=json"}else if("c"==e){data.temp="c";var o="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+r+"') and u='c'&format=json"}else console.log("weird units passed into weather"),console.log(typeof e+"...units is "+e);return $.getJSON(o,function(e){var t=e.query.results;if(null==t)return $("#g_weather").hide(),void $("#b_weather").show();$("#g_weather").show(),$("#b_weather").hide();var n=t.channel.item.forecast;i||(r=t.channel.location.city,r+=""!=t.channel.location.region?", "+t.channel.location.region:", "+t.channel.location.country,data.loc=r);for(var o=0;2>=o;o++)if(0===o){var s=n[0].high,a=n[0].low,l=n[0].code,c=n[0].text;setToday(s,a,c,l)}else if(1===o){var s=n[1].high,a=n[1].low,l=n[1].code,c=n[1].text;setTmw(s,a,c,l)}else if(2===o){var s=n[2].high,a=n[2].low,l=n[2].code,c=n[2].text,u=n[2].day;setDat(s,a,c,l,u)}}).done(function(){t.resolve()}),t};o().done(r)}else"auto"==n?$.get("http://ipinfo.io",function(t){var n=t.city+", "+t.region;getWeather(n,e,i)},"jsonp"):getWeather(n,e,i)}function setToday(e,t,n,i){var r=document.querySelector("#today .high"),o=document.querySelector("#today .low"),s=document.querySelector("#today .icon"),a=document.querySelector("#today .cond"),l='<i class ="wi '+weatherIcon(i)+'"></i>';r.innerHTML=e,o.innerHTML=t,s.innerHTML=l,a.innerHTML=n}function setTmw(e,t,n,i){var r=document.querySelector("#tmw .high"),o=document.querySelector("#tmw .low"),s=document.querySelector("#tmw .icon"),a=document.querySelector("#tmw .cond"),l='<i class ="wi '+weatherIcon(i)+'"></i>';r.innerHTML=e,o.innerHTML=t,s.innerHTML=l,a.innerHTML=n}function setDat(e,t,n,i,r){var o=document.querySelector("#dat .high"),s=document.querySelector("#dat .low"),a=document.querySelector("#dat .icon"),l=document.querySelector("#dat .cond"),c=document.getElementById("dat_name"),u='<i class ="wi '+weatherIcon(i)+'"></i>';o.innerHTML=e,s.innerHTML=t,a.innerHTML=u,l.innerHTML=n,c.innerHTML=r}function changeWeather(){$("#weather_modal").modal("show")}function editWeather(e){if(e){if($("#error").css("display","none"),"auto"!=data.loc){var t=function(){var e=$.Deferred();return data.loc="auto",e.resolve(),e},n=function(){var e="/d/create";getModOrder(),$.ajax({type:"POST",url:e,data:data})};t().done(n)}$("#weather_modal").modal("hide")}else{var i=$("#w_sb").val();""==i||null==i||void 0==i?$("#error").css("display","block"):($("#error").css("display","none"),getWWL(data.temp,!0,i,!1),$("#weather_modal").modal("hide"))}}function getNews(){$.get("http://content.guardianapis.com/search?api-key=626v3ysvkd46htvw9rj5sm4p&show-fields=shortUrl,headline,standfirst&order-by=newest&section=world",function(e){for(var t=e.response.results,n=document.getElementById("news"),i="",r=0;2>=r;r++)i+='<div class="story"><h4><a href="'+t[r].fields.shortUrl+'" target=blank>'+t[r].fields.headline+"</a></h4>",(null!=t[r].fields.standfirst||void 0!=t[r].fields.standfirst)&&(i+=t[r].fields.standfirst),i+="</div><br>";n.innerHTML=i})}function copy(){$("#copy_link").modal("show")}function changeColor(){$("#color_pick").modal("show")}function saveColor(){data.fg=$(".color #fg").val(),data.bg=$(".color #bg").val(),sendData(data)}function resetColor(){$("body").css("background-color",data.bg),$("body").css("color",data.fg)}function edit(){$("#edit").hide(),$("#save").show();var e=document.querySelectorAll(".column .portlet .row.mod");for(var t in e)$(e[t]).addClass("portlet-content"),$(e[t]).addClass("editable")}function save(){$("#edit").show(),$("#save").hide();var e=document.querySelectorAll(".column .portlet .row.mod");for(var t in e)$(e[t]).removeClass("portlet-content"),$(e[t]).removeClass("editable");sendData(data)}function es_init(){$("#edit").show(),$("#save").hide();var e=document.querySelectorAll(".column .portlet .row");for(var t in e)$(e[t]).removeClass("portlet-content")}function setTime(e){updateClock(e)}function changeStocks(){$("#stocks_modal").modal("show")}function lockStocks(){for(var e=document.getElementsByClassName("s_edit"),t=0;t<e.length;t++)if(!$(e[t]).hasClass("fa-pencil")){$(e[t]).removeClass("fa-save"),$(e[t]).addClass("fa-pencil");var n=$(e[t]).closest(".portlet").children("input")[0],i=$(n).val();(""==i||null==i||void 0==i)&&(i=data.stocks[getRandomInt(0,3)]),$(n).replaceWith('<h3 class="portlet-content stock_name">'+i+"</h3>")}}function getRandomInt(e,t){return Math.floor(Math.random()*(t-e+1))+e}function saveStocks(){lockStocks();for(var e=document.querySelectorAll(".column2 .portlet h3"),t=[],n=0;4>n;n++)t.push(e[n].innerHTML);data.stocks=t,sendData(data)}function resetStocks(){for(var e=(data.stocks,document.querySelectorAll(".column2 .portlet")),t=0;4>t;t++){var n=e[t].children[1],i=data.stocks[t];$(n).replaceWith('<h3 class="portlet-content stock_name">'+i+"</h3>")}}function getModOrder(){for(var e=document.querySelectorAll(".column .portlet .mod"),t=[],n=0;n<e.length;n++)t.push(e[n].id);data.modOrder=t}function sendData(e){var t="/d/create";getModOrder(),$.ajax({type:"POST",url:t,data:e})}function setDate(){var e=new Date,t=e.getDate(),n=e.getMonth();n+=1;var i=e.getFullYear();switch(n){case 1:n="January";break;case 2:n="February";break;case 3:n="March";break;case 4:n="April";break;case 5:n="May";break;case 6:n="June";break;case 7:n="July";break;case 8:n="August";break;case 9:n="September";break;case 10:n="October";break;case 11:n="November";break;case 12:n="December"}document.getElementById("month").innerHTML=n,document.getElementById("day").innerHTML=t,document.getElementById("year").innerHTML=i}function copy(){$("#copy_link").modal("show")}function changeColor(){$("#color_pick").modal("show")}function saveColor(){data.fg=$(".color #fg").val(),data.bg=$(".color #bg").val(),sendData(data)}function resetColor(){$("body").css("background-color",data.bg),$("body").css("color",data.fg)}function edit(){$("#edit").hide(),$("#save").show();var e=document.querySelectorAll(".column .portlet .row.mod");for(var t in e)$(e[t]).addClass("portlet-content"),$(e[t]).addClass("editable")}function save(){$("#edit").show(),$("#save").hide();var e=document.querySelectorAll(".column .portlet .row.mod");for(var t in e)$(e[t]).removeClass("portlet-content"),$(e[t]).removeClass("editable");sendData(data)}function es_init(){$("#edit").show(),$("#save").hide();var e=document.querySelectorAll(".column .portlet .row");for(var t in e)$(e[t]).removeClass("portlet-content")}function setTime(e){updateClock(e)}function changeStocks(){$("#stocks_modal").modal("show")}function lockStocks(){for(var e=document.getElementsByClassName("s_edit"),t=0;t<e.length;t++)if(!$(e[t]).hasClass("fa-pencil")){$(e[t]).removeClass("fa-save"),$(e[t]).addClass("fa-pencil");var n=$(e[t]).closest(".portlet").children("input")[0],i=$(n).val();(""==i||null==i||void 0==i)&&(i=data.stocks[getRandomInt(0,3)]),$(n).replaceWith('<h3 class="portlet-content stock_name">'+i+"</h3>")}}function getRandomInt(e,t){return Math.floor(Math.random()*(t-e+1))+e}function saveStocks(){lockStocks();for(var e=document.querySelectorAll(".column2 .portlet h3"),t=[],n=0;4>n;n++)t.push(e[n].innerHTML);data.stocks=t,sendData(data)}function resetStocks(){for(var e=(data.stocks,document.querySelectorAll(".column2 .portlet")),t=0;4>t;t++){var n=e[t].children[1],i=data.stocks[t];$(n).replaceWith('<h3 class="portlet-content stock_name">'+i+"</h3>")}}function getModOrder(){for(var e=document.querySelectorAll(".column .portlet .mod"),t=[],n=0;n<e.length;n++)t.push(e[n].id);data.modOrder=t}function getNews(){$.get("http://content.guardianapis.com/search?api-key=626v3ysvkd46htvw9rj5sm4p&show-fields=shortUrl,headline,standfirst&order-by=newest&section=world",function(e){for(var t=e.response.results,n=document.getElementById("news"),i="",r=0;2>=r;r++)i+='<div class="story"><h4><a href="'+t[r].fields.shortUrl+'" target=blank>'+t[r].fields.headline+"</a></h4>",(null!=t[r].fields.standfirst||void 0!=t[r].fields.standfirst)&&(i+=t[r].fields.standfirst),i+="</div><br>";n.innerHTML=i})}function toggleOverlay(){if(classie.has(overlay,"open")){classie.remove(overlay,"open"),classie.add(overlay,"close");var e=function(t){if(support.transitions){if("visibility"!==t.propertyName)return;this.removeEventListener(transEndEventName,e)}classie.remove(overlay,"close")};support.transitions?overlay.addEventListener(transEndEventName,e):e()}else classie.has(overlay,"close")||classie.add(overlay,"open")}function sendData(e){var t="/d/create";getModOrder(),$.ajax({type:"POST",url:t,data:e})}function updateClock(e){var t,n,i,r,o=new Date;n=o.getHours(),i=o.getMinutes(),r=o.getSeconds(),"12"==e?(data.time="12",clearTimeout(timer),n>12&&(n-=12)):"24"==e&&(data.time="24",clearTimeout(timer)),parseInt(n)<10&&(n="0"+n),parseInt(i)<10&&(i="0"+i),parseInt(r)<10&&(r="0"+r),t=n+" "+i+" "+r,document.getElementById("time").innerHTML=t,timer=setTimeout(function(){updateClock(e)},1e3)}function getWeather(e,t,n){if(void 0==t||""==t||"f"==t){data.temp="f";var i="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+e+"') and u='f'&format=json"}else if("c"==t){data.temp="c";var i="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+e+"') and u='c'&format=json"}else console.log("weird units passed into weather"),console.log(typeof t+"...units is "+t);$.getJSON(i,function(t){var i=t.query.results;if(null==i)return $("#g_weather").hide(),void $("#b_weather").show();$("#g_weather").show(),$("#b_weather").hide();var r=i.channel.item.forecast;n||(e=i.channel.location.city,""!=i.channel.location.region&&(e+=", "+i.channel.location.region),e+=", "+i.channel.location.country,data.loc=e);for(var o=0;2>=o;o++)if(0===o){var s=r[0].high,a=r[0].low,l=r[0].code,c=r[0].text;setToday(s,a,c,l)}else if(1===o){var s=r[1].high,a=r[1].low,l=r[1].code,c=r[1].text;setTmw(s,a,c,l)}else if(2===o){var s=r[2].high,a=r[2].low,l=r[2].code,c=r[2].text,u=r[2].day;setDat(s,a,c,l,u)}})}function getWWL(e,t,n,i){if(1==t)if("auto"==n)$.get("http://ipinfo.io",function(t){var n=t.city+", "+t.region;getWeather(n,e,i)},"jsonp").done(function(){sendData(data)});else{var r=function(){var e="/d/create";getModOrder(),$.ajax({type:"POST",url:e,data:data})},o=function(){var t=$.Deferred(),r=n;if(void 0==e||""==e||"f"==e){data.temp="f";var o="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+r+"') and u='f'&format=json"}else if("c"==e){data.temp="c";var o="https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid in (select woeid from geo.places(1) where text='"+r+"') and u='c'&format=json"}else console.log("weird units passed into weather"),console.log(typeof e+"...units is "+e);return $.getJSON(o,function(e){var t=e.query.results;if(null==t)return $("#g_weather").hide(),void $("#b_weather").show();$("#g_weather").show(),$("#b_weather").hide();var n=t.channel.item.forecast;i||(r=t.channel.location.city,r+=""!=t.channel.location.region?", "+t.channel.location.region:", "+t.channel.location.country,data.loc=r);for(var o=0;2>=o;o++)if(0===o){var s=n[0].high,a=n[0].low,l=n[0].code,c=n[0].text;setToday(s,a,c,l)}else if(1===o){var s=n[1].high,a=n[1].low,l=n[1].code,c=n[1].text;setTmw(s,a,c,l)}else if(2===o){var s=n[2].high,a=n[2].low,l=n[2].code,c=n[2].text,u=n[2].day;setDat(s,a,c,l,u)}}).done(function(){t.resolve()}),t};o().done(r)}else"auto"==n?$.get("http://ipinfo.io",function(t){var n=t.city+", "+t.region;getWeather(n,e,i)},"jsonp"):getWeather(n,e,i)}function setToday(e,t,n,i){var r=document.querySelector("#today .high"),o=document.querySelector("#today .low"),s=document.querySelector("#today .icon"),a=document.querySelector("#today .cond"),l='<i class ="wi '+weatherIcon(i)+'"></i>';r.innerHTML=e,o.innerHTML=t,s.innerHTML=l,a.innerHTML=n}function setTmw(e,t,n,i){var r=document.querySelector("#tmw .high"),o=document.querySelector("#tmw .low"),s=document.querySelector("#tmw .icon"),a=document.querySelector("#tmw .cond"),l='<i class ="wi '+weatherIcon(i)+'"></i>';r.innerHTML=e,o.innerHTML=t,s.innerHTML=l,a.innerHTML=n}function setDat(e,t,n,i,r){var o=document.querySelector("#dat .high"),s=document.querySelector("#dat .low"),a=document.querySelector("#dat .icon"),l=document.querySelector("#dat .cond"),c=document.getElementById("dat_name"),u='<i class ="wi '+weatherIcon(i)+'"></i>';o.innerHTML=e,s.innerHTML=t,a.innerHTML=u,l.innerHTML=n,c.innerHTML=r}function changeWeather(){$("#weather_modal").modal("show")}function editWeather(e){if(e){if($("#error").css("display","none"),"auto"!=data.loc){var t=function(){var e=$.Deferred();return data.loc="auto",e.resolve(),e},n=function(){var e="/d/create";getModOrder(),$.ajax({type:"POST",url:e,data:data})};t().done(n)}$("#weather_modal").modal("hide")}else{var i=$("#w_sb").val();""==i||null==i||void 0==i?$("#error").css("display","block"):($("#error").css("display","none"),getWWL(data.temp,!0,i,!1),$("#weather_modal").modal("hide"))}}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=rt.type(e);return"function"===n||rt.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(rt.isFunction(t))return rt.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return rt.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(dt.test(t))return rt.filter(t,e,n);t=rt.filter(t,e)}return rt.grep(e,function(e){return rt.inArray(e,t)>=0!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=wt[e]={};return rt.each(e.match(bt)||[],function(e,n){t[n]=!0}),t}function s(){pt.addEventListener?(pt.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1)):(pt.detachEvent("onreadystatechange",a),e.detachEvent("onload",a))}function a(){(pt.addEventListener||"load"===event.type||"complete"===pt.readyState)&&(s(),rt.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Tt,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ct.test(n)?rt.parseJSON(n):n}catch(r){}rt.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!rt.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,i){if(rt.acceptData(e)){var r,o,s=rt.expando,a=e.nodeType,l=a?rt.cache:e,c=a?e[s]:e[s]&&s;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=a?e[s]=Y.pop()||rt.guid++:s),l[c]||(l[c]=a?{}:{toJSON:rt.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=rt.extend(l[c],t):l[c].data=rt.extend(l[c].data,t)),o=l[c],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[rt.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[rt.camelCase(t)])):r=o,r}}function h(e,t,n){if(rt.acceptData(e)){var i,r,o=e.nodeType,s=o?rt.cache:e,a=o?e[rt.expando]:rt.expando;if(s[a]){if(t&&(i=n?s[a]:s[a].data)){rt.isArray(t)?t=t.concat(rt.map(t,rt.camelCase)):t in i?t=[t]:(t=rt.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!c(i):!rt.isEmptyObject(i))return}(n||(delete s[a].data,c(s[a])))&&(o?rt.cleanData([e],!0):nt.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function d(){return!0}function f(){return!1}function p(){try{return pt.activeElement}catch(e){}}function m(e){var t=jt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,r=0,o=typeof e.getElementsByTagName!==_t?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==_t?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||rt.nodeName(i,t)?o.push(i):rt.merge(o,g(i,t));return void 0===t||t&&rt.nodeName(e,t)?rt.merge([e],o):o}function v(e){Ht.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return rt.nodeName(e,"table")&&rt.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==rt.find.attr(e,"type"))+"/"+e.type,e}function w(e){var t=Gt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,i=0;null!=(n=e[i]);i++)rt._data(n,"globalEval",!t||rt._data(t[i],"globalEval"))}function k(e,t){if(1===t.nodeType&&rt.hasData(e)){var n,i,r,o=rt._data(e),s=rt._data(t,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)rt.event.add(t,n,a[n][i])}s.data&&(s.data=rt.extend({},s.data))}}function _(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!nt.noCloneEvent&&t[rt.expando]){r=rt._data(t);for(i in r.events)rt.removeEvent(t,i,r.handle);t.removeAttribute(rt.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,w(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),nt.html5Clone&&e.innerHTML&&!rt.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ht.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function C(t,n){var i,r=rt(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:rt.css(r[0],"display");return r.detach(),o}function T(e){var t=pt,n=Zt[e];return n||(n=C(e,t),"none"!==n&&n||(Kt=(Kt||rt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Kt[0].contentWindow||Kt[0].contentDocument).document,t.write(),t.close(),n=C(e,t),Kt.detach()),Zt[e]=n),n}function S(e,t){return{get:function(){var n=e();if(null!=n)return n?void delete this.get:(this.get=t).apply(this,arguments)}}}function E(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=fn.length;r--;)if(t=fn[r]+n,t in e)return t;return i}function N(e,t){for(var n,i,r,o=[],s=0,a=e.length;a>s;s++)i=e[s],i.style&&(o[s]=rt._data(i,"olddisplay"),n=i.style.display,t?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&Nt(i)&&(o[s]=rt._data(i,"olddisplay",T(i.nodeName)))):(r=Nt(i),(n&&"none"!==n||!r)&&rt._data(i,"olddisplay",r?n:rt.css(i,"display"))));for(s=0;a>s;s++)i=e[s],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[s]||"":"none"));return e}function P(e,t,n){var i=cn.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function H(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=rt.css(e,n+Et[o],!0,r)),i?("content"===n&&(s-=rt.css(e,"padding"+Et[o],!0,r)),"margin"!==n&&(s-=rt.css(e,"border"+Et[o]+"Width",!0,r))):(s+=rt.css(e,"padding"+Et[o],!0,r),"padding"!==n&&(s+=rt.css(e,"border"+Et[o]+"Width",!0,r)));return s}function D(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=en(e),s=nt.boxSizing&&"border-box"===rt.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=tn(e,t,o),(0>r||null==r)&&(r=e.style[t]),rn.test(r))return r;i=s&&(nt.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+H(e,t,n||(s?"border":"content"),i,o)+"px"}function L(e,t,n,i,r){return new L.prototype.init(e,t,n,i,r)}function I(){return setTimeout(function(){pn=void 0}),pn=rt.now()}function A(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Et[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function M(e,t,n){for(var i,r=(wn[t]||[]).concat(wn["*"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,t,e))return i}function j(e,t,n){var i,r,o,s,a,l,c,u,h=this,d={},f=e.style,p=e.nodeType&&Nt(e),m=rt._data(e,"fxshow");n.queue||(a=rt._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,rt.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=rt.css(e,"display"),u="none"===c?rt._data(e,"olddisplay")||T(e.nodeName):c,"inline"===u&&"none"===rt.css(e,"float")&&(nt.inlineBlockNeedsLayout&&"inline"!==T(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",nt.shrinkWrapBlocks()||h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],gn.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;p=!0}d[i]=m&&m[i]||rt.style(e,i)}else c=void 0;if(rt.isEmptyObject(d))"inline"===("none"===c?T(e.nodeName):c)&&(f.display=c);else{m?"hidden"in m&&(p=m.hidden):m=rt._data(e,"fxshow",{}),o&&(m.hidden=!p),p?rt(e).show():h.done(function(){rt(e).hide()}),h.done(function(){var t;rt._removeData(e,"fxshow");for(t in d)rt.style(e,t,d[t])});for(i in d)s=M(p?m[i]:0,i,h),i in m||(m[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function O(e,t){var n,i,r,o,s;for(n in e)if(i=rt.camelCase(n),r=t[i],o=e[n],rt.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),s=rt.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function F(e,t,n){var i,r,o=0,s=bn.length,a=rt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=pn||I(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(o);return a.notifyWith(e,[c,o,n]),1>o&&l?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:rt.extend({},t),opts:rt.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:pn||I(),duration:n.duration,tweens:[],createTween:function(t,n){var i=rt.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),u=c.props;for(O(u,c.opts.specialEasing);s>o;o++)if(i=bn[o].call(c,e,u,c.opts))return i;return rt.map(u,M,c),rt.isFunction(c.opts.start)&&c.opts.start.call(e,c),rt.fx.timer(rt.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function q(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(bt)||[];if(rt.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function $(e,t,n,i){function r(a){var l;return o[a]=!0,rt.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=e===zn;return r(t.dataTypes[0])||!o["*"]&&r("*")}function W(e,t){var n,i,r=rt.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&rt.extend(!0,e,n),e}function B(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}i||(i=s)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function R(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function z(e,t,n,i){var r;if(rt.isArray(t))rt.each(t,function(t,r){n||Yn.test(e)?i(e,r):z(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==rt.type(t))i(e,t);else for(r in t)z(e+"["+r+"]",t[r],n,i)}function X(){try{return new e.XMLHttpRequest}catch(t){}}function U(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function G(e){return rt.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var Y=[],V=Y.slice,J=Y.concat,Q=Y.push,K=Y.indexOf,Z={},et=Z.toString,tt=Z.hasOwnProperty,nt={},it="1.11.1",rt=function(e,t){return new rt.fn.init(e,t)},ot=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,st=/^-ms-/,at=/-([\da-z])/gi,lt=function(e,t){return t.toUpperCase()};rt.fn=rt.prototype={jquery:it,constructor:rt,selector:"",length:0,toArray:function(){return V.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:V.call(this)},pushStack:function(e){var t=rt.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return rt.each(this,e,t)},map:function(e){return this.pushStack(rt.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(V.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Q,sort:Y.sort,splice:Y.splice},rt.extend=rt.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||rt.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(r=arguments[a]))for(i in r)e=s[i],n=r[i],s!==n&&(c&&n&&(rt.isPlainObject(n)||(t=rt.isArray(n)))?(t?(t=!1,o=e&&rt.isArray(e)?e:[]):o=e&&rt.isPlainObject(e)?e:{},s[i]=rt.extend(c,o,n)):void 0!==n&&(s[i]=n));return s},rt.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===rt.type(e)},isArray:Array.isArray||function(e){return"array"===rt.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!rt.isArray(e)&&e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==rt.type(e)||e.nodeType||rt.isWindow(e))return!1;try{if(e.constructor&&!tt.call(e,"constructor")&&!tt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(nt.ownLast)for(t in e)return tt.call(e,t);for(t in e);return void 0===t||tt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[et.call(e)]||"object":typeof e},globalEval:function(t){t&&rt.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(st,"ms-").replace(at,lt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,s=e.length,a=n(e);if(i){if(a)for(;s>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(a)for(;s>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ot,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?rt.merge(i,"string"==typeof e?[e]:e):Q.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(K)return K.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;)e[r++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,s=e.length,a=!n;s>o;o++)i=!t(e[o],o),i!==a&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,s=e.length,a=n(e),l=[];if(a)for(;s>o;o++)r=t(e[o],o,i),null!=r&&l.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&l.push(r);return J.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(r=e[t],t=e,e=r),rt.isFunction(e)?(n=V.call(arguments,2),i=function(){return e.apply(t||this,n.concat(V.call(arguments)))},i.guid=e.guid=e.guid||rt.guid++,i):void 0},now:function(){return+new Date},support:nt}),rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()
  });var ct=function(e){function t(e,t,n,i){var r,o,s,a,l,c,h,f,p,m;if((t?t.ownerDocument||t:$)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(A&&!i){if(r=yt.exec(e))if(s=r[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&F(t,o)&&o.id===s)return n.push(o),n}else{if(r[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((s=r[3])&&x.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(s)),n}if(x.qsa&&(!M||!M.test(e))){if(f=h=q,p=t,m=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=T(e),(h=t.getAttribute("id"))?f=h.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+d(c[l]);p=bt.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{h||t.removeAttribute("id")}}}return E(e.replace(lt,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[q]=!0,e}function r(e){var t=L.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)k.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function u(e){return e&&typeof e.getElementsByTagName!==G&&e}function h(){}function d(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=B++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,s){var a,l,c=[W,o];if(s){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,s))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[q]||(t[q]={}),(a=l[i])&&a[0]===W&&a[1]===o)return c[2]=a[2];if(l[i]=c,c[2]=e(t,n,s))return!0}}}function p(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function g(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;l>a;a++)(o=e[a])&&(!n||n(o,i,r))&&(s.push(o),c&&t.push(a));return s}function v(e,t,n,r,o,s){return r&&!r[q]&&(r=v(r)),o&&!o[q]&&(o=v(o,s)),i(function(i,s,a,l){var c,u,h,d=[],f=[],p=s.length,v=i||m(t||"*",a.nodeType?[a]:a,[]),y=!e||!i&&t?v:g(v,d,e,a,l),b=n?o||(i?e:p||r)?[]:s:y;if(n&&n(y,b,a,l),r)for(c=g(b,f),r(c,[],a,l),u=c.length;u--;)(h=c[u])&&(b[f[u]]=!(y[f[u]]=h));if(i){if(o||e){if(o){for(c=[],u=b.length;u--;)(h=b[u])&&c.push(y[u]=h);o(null,b=[],c,l)}for(u=b.length;u--;)(h=b[u])&&(c=o?tt.call(i,h):d[u])>-1&&(i[c]=!(s[c]=h))}}else b=g(b===s?b.splice(p,b.length):b),o?o(null,s,b,l):Z.apply(s,b)})}function y(e){for(var t,n,i,r=e.length,o=k.relative[e[0].type],s=o||k.relative[" "],a=o?1:0,l=f(function(e){return e===t},s,!0),c=f(function(e){return tt.call(t,e)>-1},s,!0),u=[function(e,n,i){return!o&&(i||n!==N)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];r>a;a++)if(n=k.relative[e[a].type])u=[f(p(u),n)];else{if(n=k.filter[e[a].type].apply(null,e[a].matches),n[q]){for(i=++a;r>i&&!k.relative[e[i].type];i++);return v(a>1&&p(u),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(lt,"$1"),n,i>a&&y(e.slice(a,i)),r>i&&y(e=e.slice(i)),r>i&&d(e))}u.push(n)}return p(u)}function b(e,n){var r=n.length>0,o=e.length>0,s=function(i,s,a,l,c){var u,h,d,f=0,p="0",m=i&&[],v=[],y=N,b=i||o&&k.find.TAG("*",c),w=W+=null==y?1:Math.random()||.1,x=b.length;for(c&&(N=s!==L&&s);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(h=0;d=e[h++];)if(d(u,s,a)){l.push(u);break}c&&(W=w)}r&&((u=!d&&u)&&f--,i&&m.push(u))}if(f+=p,r&&p!==f){for(h=0;d=n[h++];)d(m,v,s,a);if(i){if(f>0)for(;p--;)m[p]||v[p]||(v[p]=Q.call(l));v=g(v)}Z.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(W=w,N=y),m};return r?i(s):s}var w,x,k,_,C,T,S,E,N,P,H,D,L,I,A,M,j,O,F,q="sizzle"+-new Date,$=e.document,W=0,B=0,R=n(),z=n(),X=n(),U=function(e,t){return e===t&&(H=!0),0},G="undefined",Y=1<<31,V={}.hasOwnProperty,J=[],Q=J.pop,K=J.push,Z=J.push,et=J.slice,tt=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=rt.replace("w","w#"),st="\\["+it+"*("+rt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ot+"))|)"+it+"*\\]",at=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",lt=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),ct=new RegExp("^"+it+"*,"+it+"*"),ut=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ht=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),dt=new RegExp(at),ft=new RegExp("^"+ot+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+at),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},mt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,wt=/'|\\/g,xt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),kt=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(J=et.call($.childNodes),$.childNodes),J[$.childNodes.length].nodeType}catch(_t){Z={apply:J.length?function(e,t){K.apply(e,et.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:$,i=n.defaultView;return n!==L&&9===n.nodeType&&n.documentElement?(L=n,I=n.documentElement,A=!C(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){D()},!1):i.attachEvent&&i.attachEvent("onunload",function(){D()})),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=vt.test(n.getElementsByClassName)&&r(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),x.getById=r(function(e){return I.appendChild(e).id=q,!n.getElementsByName||!n.getElementsByName(q).length}),x.getById?(k.find.ID=function(e,t){if(typeof t.getElementById!==G&&A){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(xt,kt);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(xt,kt);return function(e){var n=typeof e.getAttributeNode!==G&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==G?t.getElementsByTagName(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=x.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==G&&A?t.getElementsByClassName(e):void 0},j=[],M=[],(x.qsa=vt.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&M.push("[*^$]="+it+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+it+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+it+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(x.matchesSelector=vt.test(O=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),j.push("!=",at)}),M=M.length&&new RegExp(M.join("|")),j=j.length&&new RegExp(j.join("|")),t=vt.test(I.compareDocumentPosition),F=t||vt.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return H=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!x.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===$&&F($,e)?-1:t===n||t.ownerDocument===$&&F($,t)?1:P?tt.call(P,e)-tt.call(P,t):0:4&i?-1:1)}:function(e,t){if(e===t)return H=!0,0;var i,r=0,o=e.parentNode,a=t.parentNode,l=[e],c=[t];if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:P?tt.call(P,e)-tt.call(P,t):0;if(o===a)return s(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?s(l[r],c[r]):l[r]===$?-1:c[r]===$?1:0},n):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&D(e),n=n.replace(ht,"='$1']"),!(!x.matchesSelector||!A||j&&j.test(n)||M&&M.test(n)))try{var i=O.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&D(e);var n=k.attrHandle[t.toLowerCase()],i=n&&V.call(k.attrHandle,t.toLowerCase())?n(e,t,!A):void 0;return void 0!==i?i:x.attributes||!A?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(H=!x.detectDuplicates,P=!x.sortStable&&e.slice(0),e.sort(U),H){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return P=null,e},_=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=_(t);return n},k=t.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,kt),e[3]=(e[3]||e[4]||e[5]||"").replace(xt,kt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&dt.test(n)&&(t=T(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xt,kt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=R[e+" "];return t||(t=new RegExp("(^|"+it+")"+e+"("+it+"|$)"))&&R(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==G&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,f,p,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&y){for(u=g[q]||(g[q]={}),c=u[e]||[],f=c[0]===W&&c[1],d=c[0]===W&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(d=f=0)||p.pop();)if(1===h.nodeType&&++d&&h===t){u[e]=[W,f,d];break}}else if(y&&(c=(t[q]||(t[q]={}))[e])&&c[0]===W)d=c[1];else for(;(h=++f&&h&&h[m]||(d=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++d||(y&&((h[q]||(h[q]={}))[e]=[W,d]),h!==t)););return d-=r,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(e,n){var r,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[q]?o(n):o.length>1?(r=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),s=r.length;s--;)i=tt.call(e,r[s]),e[i]=!(t[i]=r[s])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(lt,"$1"));return r[q]?i(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xt,kt).toLowerCase(),function(t){var n;do if(n=A?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return gt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);return h.prototype=k.filters=k.pseudos,k.setFilters=new h,T=t.tokenize=function(e,n){var i,r,o,s,a,l,c,u=z[e+" "];if(u)return n?0:u.slice(0);for(a=e,l=[],c=k.preFilter;a;){(!i||(r=ct.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=ut.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(lt," ")}),a=a.slice(i.length));for(s in k.filter)!(r=pt[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):z(e,l).slice(0)},S=t.compile=function(e,t){var n,i=[],r=[],o=X[e+" "];if(!o){for(t||(t=T(e)),n=t.length;n--;)o=y(t[n]),o[q]?i.push(o):r.push(o);o=X(e,b(r,i)),o.selector=e}return o},E=t.select=function(e,t,n,i){var r,o,s,a,l,c="function"==typeof e&&e,h=!i&&T(e=c.selector||e);if(n=n||[],1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===t.nodeType&&A&&k.relative[o[1].type]){if(t=(k.find.ID(s.matches[0].replace(xt,kt),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=pt.needsContext.test(e)?0:o.length;r--&&(s=o[r],!k.relative[a=s.type]);)if((l=k.find[a])&&(i=l(s.matches[0].replace(xt,kt),bt.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&d(o),!e)return Z.apply(n,i),n;break}}return(c||S(e,h))(i,t,!A,n,bt.test(e)&&u(t.parentNode)||t),n},x.sortStable=q.split("").sort(U).join("")===q,x.detectDuplicates=!!H,D(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(L.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(nt,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);rt.find=ct,rt.expr=ct.selectors,rt.expr[":"]=rt.expr.pseudos,rt.unique=ct.uniqueSort,rt.text=ct.getText,rt.isXMLDoc=ct.isXML,rt.contains=ct.contains;var ut=rt.expr.match.needsContext,ht=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^.[^:#\[\.,]*$/;rt.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?rt.find.matchesSelector(i,e)?[i]:[]:rt.find.matches(e,rt.grep(t,function(e){return 1===e.nodeType}))},rt.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(rt(e).filter(function(){for(t=0;r>t;t++)if(rt.contains(i[t],this))return!0}));for(t=0;r>t;t++)rt.find(e,i[t],n);return n=this.pushStack(r>1?rt.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&ut.test(e)?rt(e):e||[],!1).length}});var ft,pt=e.document,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,gt=rt.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:mt.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ft).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof rt?t[0]:t,rt.merge(this,rt.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:pt,!0)),ht.test(n[1])&&rt.isPlainObject(t))for(n in t)rt.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(i=pt.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return ft.find(e);this.length=1,this[0]=i}return this.context=pt,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):rt.isFunction(e)?"undefined"!=typeof ft.ready?ft.ready(e):e(rt):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),rt.makeArray(e,this))};gt.prototype=rt.fn,ft=rt(pt);var vt=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};rt.extend({dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!rt(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),rt.fn.extend({has:function(e){var t,n=rt(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(rt.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],s=ut.test(e)||"string"!=typeof e?rt(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&rt.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?rt.unique(o):o)},index:function(e){return e?"string"==typeof e?rt.inArray(this[0],rt(e)):rt.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(rt.unique(rt.merge(this.get(),rt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),rt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return rt.dir(e,"parentNode")},parentsUntil:function(e,t,n){return rt.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return rt.dir(e,"nextSibling")},prevAll:function(e){return rt.dir(e,"previousSibling")},nextUntil:function(e,t,n){return rt.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return rt.dir(e,"previousSibling",n)},siblings:function(e){return rt.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return rt.sibling(e.firstChild)},contents:function(e){return rt.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:rt.merge([],e.childNodes)}},function(e,t){rt.fn[e]=function(n,i){var r=rt.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=rt.filter(i,r)),this.length>1&&(yt[e]||(r=rt.unique(r)),vt.test(e)&&(r=r.reverse())),this.pushStack(r)}});var bt=/\S+/g,wt={};rt.Callbacks=function(e){e="string"==typeof e?wt[e]||o(e):rt.extend({},e);var t,n,i,r,s,a,l=[],c=!e.once&&[],u=function(o){for(n=e.memory&&o,i=!0,s=a||0,a=0,r=l.length,t=!0;l&&r>s;s++)if(l[s].apply(o[0],o[1])===!1&&e.stopOnFalse){n=!1;break}t=!1,l&&(c?c.length&&u(c.shift()):n?l=[]:h.disable())},h={add:function(){if(l){var i=l.length;!function o(t){rt.each(t,function(t,n){var i=rt.type(n);"function"===i?e.unique&&h.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),t?r=l.length:n&&(a=i,u(n))}return this},remove:function(){return l&&rt.each(arguments,function(e,n){for(var i;(i=rt.inArray(n,l,i))>-1;)l.splice(i,1),t&&(r>=i&&r--,s>=i&&s--)}),this},has:function(e){return e?rt.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=c=n=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,n||h.disable(),this},locked:function(){return!c},fireWith:function(e,n){return!l||i&&!c||(n=n||[],n=[e,n.slice?n.slice():n],t?c.push(n):u(n)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},rt.extend({Deferred:function(e){var t=[["resolve","done",rt.Callbacks("once memory"),"resolved"],["reject","fail",rt.Callbacks("once memory"),"rejected"],["notify","progress",rt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return rt.Deferred(function(n){rt.each(t,function(t,o){var s=rt.isFunction(e[t])&&e[t];r[o[1]](function(){var e=s&&s.apply(this,arguments);e&&rt.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?rt.extend(e,i):i}},r={};return i.pipe=i.then,rt.each(t,function(e,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=s.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=V.call(arguments),s=o.length,a=1!==s||e&&rt.isFunction(e.promise)?s:0,l=1===a?e:rt.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?V.call(arguments):r,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);s>r;r++)o[r]&&rt.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,t)):--a;return a||l.resolveWith(i,o),l.promise()}});var xt;rt.fn.ready=function(e){return rt.ready.promise().done(e),this},rt.extend({isReady:!1,readyWait:1,holdReady:function(e){e?rt.readyWait++:rt.ready(!0)},ready:function(e){if(e===!0?!--rt.readyWait:!rt.isReady){if(!pt.body)return setTimeout(rt.ready);rt.isReady=!0,e!==!0&&--rt.readyWait>0||(xt.resolveWith(pt,[rt]),rt.fn.triggerHandler&&(rt(pt).triggerHandler("ready"),rt(pt).off("ready")))}}}),rt.ready.promise=function(t){if(!xt)if(xt=rt.Deferred(),"complete"===pt.readyState)setTimeout(rt.ready);else if(pt.addEventListener)pt.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1);else{pt.attachEvent("onreadystatechange",a),e.attachEvent("onload",a);var n=!1;try{n=null==e.frameElement&&pt.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!rt.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}s(),rt.ready()}}()}return xt.promise(t)};var kt,_t="undefined";for(kt in rt(nt))break;nt.ownLast="0"!==kt,nt.inlineBlockNeedsLayout=!1,rt(function(){var e,t,n,i;n=pt.getElementsByTagName("body")[0],n&&n.style&&(t=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==_t&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",nt.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=pt.createElement("div");if(null==nt.deleteExpando){nt.deleteExpando=!0;try{delete e.test}catch(t){nt.deleteExpando=!1}}e=null}(),rt.acceptData=function(e){var t=rt.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t};var Ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Tt=/([A-Z])/g;rt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?rt.cache[e[rt.expando]]:e[rt.expando],!!e&&!c(e)},data:function(e,t,n){return u(e,t,n)},removeData:function(e,t){return h(e,t)},_data:function(e,t,n){return u(e,t,n,!0)},_removeData:function(e,t){return h(e,t,!0)}}),rt.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=rt.data(o),1===o.nodeType&&!rt._data(o,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=rt.camelCase(i.slice(5)),l(o,i,r[i])));rt._data(o,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){rt.data(this,e)}):arguments.length>1?this.each(function(){rt.data(this,e,t)}):o?l(o,e,rt.data(o,e)):void 0},removeData:function(e){return this.each(function(){rt.removeData(this,e)})}}),rt.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=rt._data(e,t),n&&(!i||rt.isArray(n)?i=rt._data(e,t,rt.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=rt.queue(e,t),i=n.length,r=n.shift(),o=rt._queueHooks(e,t),s=function(){rt.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return rt._data(e,n)||rt._data(e,n,{empty:rt.Callbacks("once memory").add(function(){rt._removeData(e,t+"queue"),rt._removeData(e,n)})})}}),rt.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?rt.queue(this[0],e):void 0===t?this:this.each(function(){var n=rt.queue(this,e,t);rt._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&rt.dequeue(this,e)})},dequeue:function(e){return this.each(function(){rt.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=rt.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=rt._data(o[s],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var St=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Et=["Top","Right","Bottom","Left"],Nt=function(e,t){return e=t||e,"none"===rt.css(e,"display")||!rt.contains(e.ownerDocument,e)},Pt=rt.access=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===rt.type(n)){r=!0;for(a in n)rt.access(e,t,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,rt.isFunction(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(rt(e),n)})),t))for(;l>a;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Ht=/^(?:checkbox|radio)$/i;!function(){var e=pt.createElement("input"),t=pt.createElement("div"),n=pt.createDocumentFragment();if(t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",nt.leadingWhitespace=3===t.firstChild.nodeType,nt.tbody=!t.getElementsByTagName("tbody").length,nt.htmlSerialize=!!t.getElementsByTagName("link").length,nt.html5Clone="<:nav></:nav>"!==pt.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),nt.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",nt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",nt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,nt.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){nt.noCloneEvent=!1}),t.cloneNode(!0).click()),null==nt.deleteExpando){nt.deleteExpando=!0;try{delete t.test}catch(i){nt.deleteExpando=!1}}}(),function(){var t,n,i=pt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(nt[t+"Bubbles"]=n in e)||(i.setAttribute(n,"t"),nt[t+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var Dt=/^(?:input|select|textarea)$/i,Lt=/^key/,It=/^(?:mouse|pointer|contextmenu)|click/,At=/^(?:focusinfocus|focusoutblur)$/,Mt=/^([^.]*)(?:\.(.+)|)$/;rt.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,f,p,m,g=rt._data(e);if(g){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=rt.guid++),(s=g.events)||(s=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof rt===_t||e&&rt.event.triggered===e.type?void 0:rt.event.dispatch.apply(u.elem,arguments)},u.elem=e),t=(t||"").match(bt)||[""],a=t.length;a--;)o=Mt.exec(t[a])||[],f=m=o[1],p=(o[2]||"").split(".").sort(),f&&(c=rt.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,c=rt.event.special[f]||{},h=rt.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&rt.expr.match.needsContext.test(r),namespace:p.join(".")},l),(d=s[f])||(d=s[f]=[],d.delegateCount=0,c.setup&&c.setup.call(e,i,p,u)!==!1||(e.addEventListener?e.addEventListener(f,u,!1):e.attachEvent&&e.attachEvent("on"+f,u))),c.add&&(c.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,h):d.push(h),rt.event.global[f]=!0);e=null}},remove:function(e,t,n,i,r){var o,s,a,l,c,u,h,d,f,p,m,g=rt.hasData(e)&&rt._data(e);if(g&&(u=g.events)){for(t=(t||"").match(bt)||[""],c=t.length;c--;)if(a=Mt.exec(t[c])||[],f=m=a[1],p=(a[2]||"").split(".").sort(),f){for(h=rt.event.special[f]||{},f=(i?h.delegateType:h.bindType)||f,d=u[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)s=d[o],!r&&m!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(o,1),s.selector&&d.delegateCount--,h.remove&&h.remove.call(e,s));l&&!d.length&&(h.teardown&&h.teardown.call(e,p,g.handle)!==!1||rt.removeEvent(e,f,g.handle),delete u[f])}else for(f in u)rt.event.remove(e,f+t[c],n,i,!0);rt.isEmptyObject(u)&&(delete g.handle,rt._removeData(e,"events"))}},trigger:function(t,n,i,r){var o,s,a,l,c,u,h,d=[i||pt],f=tt.call(t,"type")?t.type:t,p=tt.call(t,"namespace")?t.namespace.split("."):[];if(a=u=i=i||pt,3!==i.nodeType&&8!==i.nodeType&&!At.test(f+rt.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),s=f.indexOf(":")<0&&"on"+f,t=t[rt.expando]?t:new rt.Event(f,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:rt.makeArray(n,[t]),c=rt.event.special[f]||{},r||!c.trigger||c.trigger.apply(i,n)!==!1)){if(!r&&!c.noBubble&&!rt.isWindow(i)){for(l=c.delegateType||f,At.test(l+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),u=a;
  u===(i.ownerDocument||pt)&&d.push(u.defaultView||u.parentWindow||e)}for(h=0;(a=d[h++])&&!t.isPropagationStopped();)t.type=h>1?l:c.bindType||f,o=(rt._data(a,"events")||{})[t.type]&&rt._data(a,"handle"),o&&o.apply(a,n),o=s&&a[s],o&&o.apply&&rt.acceptData(a)&&(t.result=o.apply(a,n),t.result===!1&&t.preventDefault());if(t.type=f,!r&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),n)===!1)&&rt.acceptData(i)&&s&&i[f]&&!rt.isWindow(i)){u=i[s],u&&(i[s]=null),rt.event.triggered=f;try{i[f]()}catch(m){}rt.event.triggered=void 0,u&&(i[s]=u)}return t.result}},dispatch:function(e){e=rt.event.fix(e);var t,n,i,r,o,s=[],a=V.call(arguments),l=(rt._data(this,"events")||{})[e.type]||[],c=rt.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=rt.event.handlers.call(this,e,l),t=0;(r=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,n=((rt.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,a),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],o=0;a>o;o++)i=t[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?rt(n,this).index(l)>=0:rt.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&s.push({elem:l,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},fix:function(e){if(e[rt.expando])return e;var t,n,i,r=e.type,o=e,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=It.test(r)?this.mouseHooks:Lt.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new rt.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||pt),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button,s=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||pt,r=i.documentElement,n=i.body,e.pageX=t.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==p()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===p()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return rt.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return rt.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=rt.extend(new rt.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?rt.event.trigger(r,null,t):rt.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},rt.removeEvent=pt.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===_t&&(e[i]=null),e.detachEvent(i,n))},rt.Event=function(e,t){return this instanceof rt.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?d:f):this.type=e,t&&rt.extend(this,t),this.timeStamp=e&&e.timeStamp||rt.now(),void(this[rt.expando]=!0)):new rt.Event(e,t)},rt.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=d,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=d,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=d,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},rt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){rt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!rt.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),nt.submitBubbles||(rt.event.special.submit={setup:function(){return rt.nodeName(this,"form")?!1:void rt.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=rt.nodeName(t,"input")||rt.nodeName(t,"button")?t.form:void 0;n&&!rt._data(n,"submitBubbles")&&(rt.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),rt._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&rt.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return rt.nodeName(this,"form")?!1:void rt.event.remove(this,"._submit")}}),nt.changeBubbles||(rt.event.special.change={setup:function(){return Dt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(rt.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),rt.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),rt.event.simulate("change",this,e,!0)})),!1):void rt.event.add(this,"beforeactivate._change",function(e){var t=e.target;Dt.test(t.nodeName)&&!rt._data(t,"changeBubbles")&&(rt.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||rt.event.simulate("change",this.parentNode,e,!0)}),rt._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return rt.event.remove(this,"._change"),!Dt.test(this.nodeName)}}),nt.focusinBubbles||rt.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){rt.event.simulate(t,e.target,rt.event.fix(e),!0)};rt.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=rt._data(i,t);r||i.addEventListener(e,n,!0),rt._data(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=rt._data(i,t)-1;r?rt._data(i,t,r):(i.removeEventListener(e,n,!0),rt._removeData(i,t))}}}),rt.fn.extend({on:function(e,t,n,i,r){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(o in e)this.on(o,t,n,e[o],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=f;else if(!i)return this;return 1===r&&(s=i,i=function(e){return rt().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=rt.guid++)),this.each(function(){rt.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,rt(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=f),this.each(function(){rt.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){rt.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?rt.event.trigger(e,t,n,!0):void 0}});var jt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ot=/ jQuery\d+="(?:null|\d+)"/g,Ft=new RegExp("<(?:"+jt+")[\\s/>]","i"),qt=/^\s+/,$t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Wt=/<([\w:]+)/,Bt=/<tbody/i,Rt=/<|&#?\w+;/,zt=/<(?:script|style|link)/i,Xt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ut=/^$|\/(?:java|ecma)script/i,Gt=/^true\/(.*)/,Yt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Vt={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:nt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Jt=m(pt),Qt=Jt.appendChild(pt.createElement("div"));Vt.optgroup=Vt.option,Vt.tbody=Vt.tfoot=Vt.colgroup=Vt.caption=Vt.thead,Vt.th=Vt.td,rt.extend({clone:function(e,t,n){var i,r,o,s,a,l=rt.contains(e.ownerDocument,e);if(nt.html5Clone||rt.isXMLDoc(e)||!Ft.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Qt.innerHTML=e.outerHTML,Qt.removeChild(o=Qt.firstChild)),!(nt.noCloneEvent&&nt.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||rt.isXMLDoc(e)))for(i=g(o),a=g(e),s=0;null!=(r=a[s]);++s)i[s]&&_(r,i[s]);if(t)if(n)for(a=a||g(e),i=i||g(o),s=0;null!=(r=a[s]);s++)k(r,i[s]);else k(e,o);return i=g(o,"script"),i.length>0&&x(i,!l&&g(e,"script")),i=a=r=null,o},buildFragment:function(e,t,n,i){for(var r,o,s,a,l,c,u,h=e.length,d=m(t),f=[],p=0;h>p;p++)if(o=e[p],o||0===o)if("object"===rt.type(o))rt.merge(f,o.nodeType?[o]:o);else if(Rt.test(o)){for(a=a||d.appendChild(t.createElement("div")),l=(Wt.exec(o)||["",""])[1].toLowerCase(),u=Vt[l]||Vt._default,a.innerHTML=u[1]+o.replace($t,"<$1></$2>")+u[2],r=u[0];r--;)a=a.lastChild;if(!nt.leadingWhitespace&&qt.test(o)&&f.push(t.createTextNode(qt.exec(o)[0])),!nt.tbody)for(o="table"!==l||Bt.test(o)?"<table>"!==u[1]||Bt.test(o)?0:a:a.firstChild,r=o&&o.childNodes.length;r--;)rt.nodeName(c=o.childNodes[r],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(rt.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(t.createTextNode(o));for(a&&d.removeChild(a),nt.appendChecked||rt.grep(g(f,"input"),v),p=0;o=f[p++];)if((!i||-1===rt.inArray(o,i))&&(s=rt.contains(o.ownerDocument,o),a=g(d.appendChild(o),"script"),s&&x(a),n))for(r=0;o=a[r++];)Ut.test(o.type||"")&&n.push(o);return a=null,d},cleanData:function(e,t){for(var n,i,r,o,s=0,a=rt.expando,l=rt.cache,c=nt.deleteExpando,u=rt.event.special;null!=(n=e[s]);s++)if((t||rt.acceptData(n))&&(r=n[a],o=r&&l[r])){if(o.events)for(i in o.events)u[i]?rt.event.remove(n,i):rt.removeEvent(n,i,o.handle);l[r]&&(delete l[r],c?delete n[a]:typeof n.removeAttribute!==_t?n.removeAttribute(a):n[a]=null,Y.push(r))}}}),rt.fn.extend({text:function(e){return Pt(this,function(e){return void 0===e?rt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||pt).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?rt.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||rt.cleanData(g(n)),n.parentNode&&(t&&rt.contains(n.ownerDocument,n)&&x(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&rt.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&rt.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return rt.clone(this,e,t)})},html:function(e){return Pt(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ot,""):void 0;if(!("string"!=typeof e||zt.test(e)||!nt.htmlSerialize&&Ft.test(e)||!nt.leadingWhitespace&&qt.test(e)||Vt[(Wt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace($t,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(rt.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,rt.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=J.apply([],e);var n,i,r,o,s,a,l=0,c=this.length,u=this,h=c-1,d=e[0],f=rt.isFunction(d);if(f||c>1&&"string"==typeof d&&!nt.checkClone&&Xt.test(d))return this.each(function(n){var i=u.eq(n);f&&(e[0]=d.call(this,n,i.html())),i.domManip(e,t)});if(c&&(a=rt.buildFragment(e,this[0].ownerDocument,!1,this),n=a.firstChild,1===a.childNodes.length&&(a=n),n)){for(o=rt.map(g(a,"script"),b),r=o.length;c>l;l++)i=a,l!==h&&(i=rt.clone(i,!0,!0),r&&rt.merge(o,g(i,"script"))),t.call(this[l],i,l);if(r)for(s=o[o.length-1].ownerDocument,rt.map(o,w),l=0;r>l;l++)i=o[l],Ut.test(i.type||"")&&!rt._data(i,"globalEval")&&rt.contains(s,i)&&(i.src?rt._evalUrl&&rt._evalUrl(i.src):rt.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Yt,"")));a=n=null}return this}}),rt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){rt.fn[e]=function(e){for(var n,i=0,r=[],o=rt(e),s=o.length-1;s>=i;i++)n=i===s?this:this.clone(!0),rt(o[i])[t](n),Q.apply(r,n.get());return this.pushStack(r)}});var Kt,Zt={};!function(){var e;nt.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return n=pt.getElementsByTagName("body")[0],n&&n.style?(t=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==_t&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(pt.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var en,tn,nn=/^margin/,rn=new RegExp("^("+St+")(?!px)[a-z%]+$","i"),on=/^(top|right|bottom|left)$/;e.getComputedStyle?(en=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},tn=function(e,t,n){var i,r,o,s,a=e.style;return n=n||en(e),s=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==s||rt.contains(e.ownerDocument,e)||(s=rt.style(e,t)),rn.test(s)&&nn.test(t)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0===s?s:s+""}):pt.documentElement.currentStyle&&(en=function(e){return e.currentStyle},tn=function(e,t,n){var i,r,o,s,a=e.style;return n=n||en(e),s=n?n[t]:void 0,null==s&&a&&a[t]&&(s=a[t]),rn.test(s)&&!on.test(t)&&(i=a.left,r=e.runtimeStyle,o=r&&r.left,o&&(r.left=e.currentStyle.left),a.left="fontSize"===t?"1em":s,s=a.pixelLeft+"px",a.left=i,o&&(r.left=o)),void 0===s?s:s+""||"auto"}),function(){function t(){var t,n,i,r;n=pt.getElementsByTagName("body")[0],n&&n.style&&(t=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,l=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,s="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,r=t.appendChild(pt.createElement("div")),r.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=t.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",a=0===r[0].offsetHeight,a&&(r[0].style.display="",r[1].style.display="none",a=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,s,a,l;n=pt.createElement("div"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],i=r&&r.style,i&&(i.cssText="float:left;opacity:.5",nt.opacity="0.5"===i.opacity,nt.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===n.style.backgroundClip,nt.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,rt.extend(nt,{reliableHiddenOffsets:function(){return null==a&&t(),a},boxSizingReliable:function(){return null==s&&t(),s},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==l&&t(),l}}))}(),rt.swap=function(e,t,n,i){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=s[o];return r};var sn=/alpha\([^)]*\)/i,an=/opacity\s*=\s*([^)]*)/,ln=/^(none|table(?!-c[ea]).+)/,cn=new RegExp("^("+St+")(.*)$","i"),un=new RegExp("^([+-])=("+St+")","i"),hn={position:"absolute",visibility:"hidden",display:"block"},dn={letterSpacing:"0",fontWeight:"400"},fn=["Webkit","O","Moz","ms"];rt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=tn(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":nt.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=rt.camelCase(t),l=e.style;if(t=rt.cssProps[a]||(rt.cssProps[a]=E(l,a)),s=rt.cssHooks[t]||rt.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:l[t];if(o=typeof n,"string"===o&&(r=un.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(rt.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||rt.cssNumber[a]||(n+="px"),nt.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(s&&"set"in s&&void 0===(n=s.set(e,n,i)))))try{l[t]=n}catch(c){}}},css:function(e,t,n,i){var r,o,s,a=rt.camelCase(t);return t=rt.cssProps[a]||(rt.cssProps[a]=E(e.style,a)),s=rt.cssHooks[t]||rt.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=tn(e,t,i)),"normal"===o&&t in dn&&(o=dn[t]),""===n||n?(r=parseFloat(o),n===!0||rt.isNumeric(r)?r||0:o):o}}),rt.each(["height","width"],function(e,t){rt.cssHooks[t]={get:function(e,n,i){return n?ln.test(rt.css(e,"display"))&&0===e.offsetWidth?rt.swap(e,hn,function(){return D(e,t,i)}):D(e,t,i):void 0},set:function(e,n,i){var r=i&&en(e);return P(e,n,i?H(e,t,i,nt.boxSizing&&"border-box"===rt.css(e,"boxSizing",!1,r),r):0)}}}),nt.opacity||(rt.cssHooks.opacity={get:function(e,t){return an.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=rt.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===rt.trim(o.replace(sn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=sn.test(o)?o.replace(sn,r):o+" "+r)}}),rt.cssHooks.marginRight=S(nt.reliableMarginRight,function(e,t){return t?rt.swap(e,{display:"inline-block"},tn,[e,"marginRight"]):void 0}),rt.each({margin:"",padding:"",border:"Width"},function(e,t){rt.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Et[i]+t]=o[i]||o[i-2]||o[0];return r}},nn.test(e)||(rt.cssHooks[e+t].set=P)}),rt.fn.extend({css:function(e,t){return Pt(this,function(e,t,n){var i,r,o={},s=0;if(rt.isArray(t)){for(i=en(e),r=t.length;r>s;s++)o[t[s]]=rt.css(e,t[s],!1,i);return o}return void 0!==n?rt.style(e,t,n):rt.css(e,t)},e,t,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Nt(this)?rt(this).show():rt(this).hide()})}}),rt.Tween=L,L.prototype={constructor:L,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(rt.cssNumber[n]?"":"px")},cur:function(){var e=L.propHooks[this.prop];return e&&e.get?e.get(this):L.propHooks._default.get(this)},run:function(e){var t,n=L.propHooks[this.prop];return this.pos=t=this.options.duration?rt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=rt.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){rt.fx.step[e.prop]?rt.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[rt.cssProps[e.prop]]||rt.cssHooks[e.prop])?rt.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},rt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},rt.fx=L.prototype.init,rt.fx.step={};var pn,mn,gn=/^(?:toggle|show|hide)$/,vn=new RegExp("^(?:([+-])=|)("+St+")([a-z%]*)$","i"),yn=/queueHooks$/,bn=[j],wn={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=vn.exec(t),o=r&&r[3]||(rt.cssNumber[e]?"":"px"),s=(rt.cssNumber[e]||"px"!==o&&+i)&&vn.exec(rt.css(n.elem,e)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],r=r||[],s=+i||1;do a=a||".5",s/=a,rt.style(n.elem,e,s+o);while(a!==(a=n.cur()/i)&&1!==a&&--l)}return r&&(s=n.start=+s||+i||0,n.unit=o,n.end=r[1]?s+(r[1]+1)*r[2]:+r[2]),n}]};rt.Animation=rt.extend(F,{tweener:function(e,t){rt.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],wn[n]=wn[n]||[],wn[n].unshift(t)},prefilter:function(e,t){t?bn.unshift(e):bn.push(e)}}),rt.speed=function(e,t,n){var i=e&&"object"==typeof e?rt.extend({},e):{complete:n||!n&&t||rt.isFunction(e)&&e,duration:e,easing:n&&t||t&&!rt.isFunction(t)&&t};return i.duration=rt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in rt.fx.speeds?rt.fx.speeds[i.duration]:rt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){rt.isFunction(i.old)&&i.old.call(this),i.queue&&rt.dequeue(this,i.queue)},i},rt.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Nt).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=rt.isEmptyObject(e),o=rt.speed(t,n,i),s=function(){var t=F(this,rt.extend({},e),o);(r||rt._data(this,"finish"))&&t.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=rt.timers,s=rt._data(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&yn.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&rt.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=rt._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=rt.timers,s=i?i.length:0;for(n.finish=!0,rt.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),rt.each(["toggle","show","hide"],function(e,t){var n=rt.fn[t];rt.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(A(t,!0),e,i,r)}}),rt.each({slideDown:A("show"),slideUp:A("hide"),slideToggle:A("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){rt.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),rt.timers=[],rt.fx.tick=function(){var e,t=rt.timers,n=0;for(pn=rt.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||rt.fx.stop(),pn=void 0},rt.fx.timer=function(e){rt.timers.push(e),e()?rt.fx.start():rt.timers.pop()},rt.fx.interval=13,rt.fx.start=function(){mn||(mn=setInterval(rt.fx.tick,rt.fx.interval))},rt.fx.stop=function(){clearInterval(mn),mn=null},rt.fx.speeds={slow:600,fast:200,_default:400},rt.fn.delay=function(e,t){return e=rt.fx?rt.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,r;t=pt.createElement("div"),t.setAttribute("className","t"),t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],n=pt.createElement("select"),r=n.appendChild(pt.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",nt.getSetAttribute="t"!==t.className,nt.style=/top/.test(i.getAttribute("style")),nt.hrefNormalized="/a"===i.getAttribute("href"),nt.checkOn=!!e.value,nt.optSelected=r.selected,nt.enctype=!!pt.createElement("form").enctype,n.disabled=!0,nt.optDisabled=!r.disabled,e=pt.createElement("input"),e.setAttribute("value",""),nt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),nt.radioValue="t"===e.value}();var xn=/\r/g;rt.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=rt.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,rt(this).val()):e,null==r?r="":"number"==typeof r?r+="":rt.isArray(r)&&(r=rt.map(r,function(e){return null==e?"":e+""})),t=rt.valHooks[this.type]||rt.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=rt.valHooks[r.type]||rt.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(xn,""):null==n?"":n)}}}),rt.extend({valHooks:{option:{get:function(e){var t=rt.find.attr(e,"value");return null!=t?t:rt.trim(rt.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,s=o?null:[],a=o?r+1:i.length,l=0>r?a:o?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(nt.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&rt.nodeName(n.parentNode,"optgroup"))){if(t=rt(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,i,r=e.options,o=rt.makeArray(t),s=r.length;s--;)if(i=r[s],rt.inArray(rt.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(a){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),rt.each(["radio","checkbox"],function(){rt.valHooks[this]={set:function(e,t){return rt.isArray(t)?e.checked=rt.inArray(rt(e).val(),t)>=0:void 0}},nt.checkOn||(rt.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kn,_n,Cn=rt.expr.attrHandle,Tn=/^(?:checked|selected)$/i,Sn=nt.getSetAttribute,En=nt.input;rt.fn.extend({attr:function(e,t){return Pt(this,rt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){rt.removeAttr(this,e)})}}),rt.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===_t?rt.prop(e,t,n):(1===o&&rt.isXMLDoc(e)||(t=t.toLowerCase(),i=rt.attrHooks[t]||(rt.expr.match.bool.test(t)?_n:kn)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=rt.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void rt.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(bt);if(o&&1===e.nodeType)for(;n=o[r++];)i=rt.propFix[n]||n,rt.expr.match.bool.test(n)?En&&Sn||!Tn.test(n)?e[i]=!1:e[rt.camelCase("default-"+n)]=e[i]=!1:rt.attr(e,n,""),e.removeAttribute(Sn?n:i)},attrHooks:{type:{set:function(e,t){if(!nt.radioValue&&"radio"===t&&rt.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),_n={set:function(e,t,n){return t===!1?rt.removeAttr(e,n):En&&Sn||!Tn.test(n)?e.setAttribute(!Sn&&rt.propFix[n]||n,n):e[rt.camelCase("default-"+n)]=e[n]=!0,n}},rt.each(rt.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Cn[t]||rt.find.attr;Cn[t]=En&&Sn||!Tn.test(t)?function(e,t,i){var r,o;return i||(o=Cn[t],Cn[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,Cn[t]=o),r}:function(e,t,n){return n?void 0:e[rt.camelCase("default-"+t)]?t.toLowerCase():null}}),En&&Sn||(rt.attrHooks.value={set:function(e,t,n){return rt.nodeName(e,"input")?void(e.defaultValue=t):kn&&kn.set(e,t,n)}}),Sn||(kn={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Cn.id=Cn.name=Cn.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},rt.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:kn.set},rt.attrHooks.contenteditable={set:function(e,t,n){kn.set(e,""===t?!1:t,n)}},rt.each(["width","height"],function(e,t){rt.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),nt.style||(rt.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Nn=/^(?:input|select|textarea|button|object)$/i,Pn=/^(?:a|area)$/i;rt.fn.extend({prop:function(e,t){return Pt(this,rt.prop,e,t,arguments.length>1)},removeProp:function(e){return e=rt.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),rt.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!rt.isXMLDoc(e),o&&(t=rt.propFix[t]||t,r=rt.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=rt.find.attr(e,"tabindex");return t?parseInt(t,10):Nn.test(e.nodeName)||Pn.test(e.nodeName)&&e.href?0:-1}}}}),nt.hrefNormalized||rt.each(["href","src"],function(e,t){rt.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),nt.optSelected||(rt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),rt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){rt.propFix[this.toLowerCase()]=this}),nt.enctype||(rt.propFix.enctype="encoding");var Hn=/[\t\r\n\f]/g;rt.fn.extend({addClass:function(e){var t,n,i,r,o,s,a=0,l=this.length,c="string"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(bt)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Hn," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=rt.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,i,r,o,s,a=0,l=this.length,c=0===arguments.length||"string"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(bt)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Hn," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");s=e?rt.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(rt.isFunction(e)?function(n){rt(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,r=rt(this),o=e.match(bt)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===_t||"boolean"===n)&&(this.className&&rt._data(this,"__className__",this.className),this.className=this.className||e===!1?"":rt._data(this,"__className__")||"")
  })},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Hn," ").indexOf(t)>=0)return!0;return!1}}),rt.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(e,t){rt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),rt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dn=rt.now(),Ln=/\?/,In=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;rt.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,r=rt.trim(t+"");return r&&!rt.trim(r.replace(In,function(e,t,r,o){return n&&t&&(i=0),0===i?e:(n=r||t,i+=!o-!r,"")}))?Function("return "+r)():rt.error("Invalid JSON: "+t)},rt.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||rt.error("Invalid XML: "+t),n};var An,Mn,jn=/#.*$/,On=/([?&])_=[^&]*/,Fn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,qn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,$n=/^(?:GET|HEAD)$/,Wn=/^\/\//,Bn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Rn={},zn={},Xn="*/".concat("*");try{Mn=location.href}catch(Un){Mn=pt.createElement("a"),Mn.href="",Mn=Mn.href}An=Bn.exec(Mn.toLowerCase())||[],rt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Mn,type:"GET",isLocal:qn.test(An[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xn,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",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":rt.parseJSON,"text xml":rt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?W(W(e,rt.ajaxSettings),t):W(rt.ajaxSettings,e)},ajaxPrefilter:q(Rn),ajaxTransport:q(zn),ajax:function(e,t){function n(e,t,n,i){var r,u,v,y,w,k=t;2!==b&&(b=2,a&&clearTimeout(a),c=void 0,s=i||"",x.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(y=B(h,x,n)),y=R(h,y,x,r),r?(h.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(rt.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(rt.etag[o]=w)),204===e||"HEAD"===h.type?k="nocontent":304===e?k="notmodified":(k=y.state,u=y.data,v=y.error,r=!v)):(v=k,(e||!k)&&(k="error",0>e&&(e=0))),x.status=e,x.statusText=(t||k)+"",r?p.resolveWith(d,[u,k,x]):p.rejectWith(d,[x,k,v]),x.statusCode(g),g=void 0,l&&f.trigger(r?"ajaxSuccess":"ajaxError",[x,h,r?u:v]),m.fireWith(d,[x,k]),l&&(f.trigger("ajaxComplete",[x,h]),--rt.active||rt.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,s,a,l,c,u,h=rt.ajaxSetup({},t),d=h.context||h,f=h.context&&(d.nodeType||d.jquery)?rt(d):rt.event,p=rt.Deferred(),m=rt.Callbacks("once memory"),g=h.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!u)for(u={};t=Fn.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),n(0,t),this}};if(p.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,h.url=((e||h.url||Mn)+"").replace(jn,"").replace(Wn,An[1]+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=rt.trim(h.dataType||"*").toLowerCase().match(bt)||[""],null==h.crossDomain&&(i=Bn.exec(h.url.toLowerCase()),h.crossDomain=!(!i||i[1]===An[1]&&i[2]===An[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(An[3]||("http:"===An[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=rt.param(h.data,h.traditional)),$(Rn,h,t,x),2===b)return x;l=h.global,l&&0===rt.active++&&rt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!$n.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(Ln.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=On.test(o)?o.replace(On,"$1_="+Dn++):o+(Ln.test(o)?"&":"?")+"_="+Dn++)),h.ifModified&&(rt.lastModified[o]&&x.setRequestHeader("If-Modified-Since",rt.lastModified[o]),rt.etag[o]&&x.setRequestHeader("If-None-Match",rt.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Xn+"; q=0.01":""):h.accepts["*"]);for(r in h.headers)x.setRequestHeader(r,h.headers[r]);if(h.beforeSend&&(h.beforeSend.call(d,x,h)===!1||2===b))return x.abort();w="abort";for(r in{success:1,error:1,complete:1})x[r](h[r]);if(c=$(zn,h,t,x)){x.readyState=1,l&&f.trigger("ajaxSend",[x,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){x.abort("timeout")},h.timeout));try{b=1,c.send(v,n)}catch(k){if(!(2>b))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return rt.get(e,t,n,"json")},getScript:function(e,t){return rt.get(e,void 0,t,"script")}}),rt.each(["get","post"],function(e,t){rt[t]=function(e,n,i,r){return rt.isFunction(n)&&(r=r||i,i=n,n=void 0),rt.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),rt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){rt.fn[t]=function(e){return this.on(t,e)}}),rt._evalUrl=function(e){return rt.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},rt.fn.extend({wrapAll:function(e){if(rt.isFunction(e))return this.each(function(t){rt(this).wrapAll(e.call(this,t))});if(this[0]){var t=rt(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(rt.isFunction(e)?function(t){rt(this).wrapInner(e.call(this,t))}:function(){var t=rt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=rt.isFunction(e);return this.each(function(n){rt(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){rt.nodeName(this,"body")||rt(this).replaceWith(this.childNodes)}).end()}}),rt.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!nt.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||rt.css(e,"display"))},rt.expr.filters.visible=function(e){return!rt.expr.filters.hidden(e)};var Gn=/%20/g,Yn=/\[\]$/,Vn=/\r?\n/g,Jn=/^(?:submit|button|image|reset|file)$/i,Qn=/^(?:input|select|textarea|keygen)/i;rt.param=function(e,t){var n,i=[],r=function(e,t){t=rt.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(e)||e.jquery&&!rt.isPlainObject(e))rt.each(e,function(){r(this.name,this.value)});else for(n in e)z(n,e[n],t,r);return i.join("&").replace(Gn,"+")},rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=rt.prop(this,"elements");return e?rt.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!rt(this).is(":disabled")&&Qn.test(this.nodeName)&&!Jn.test(e)&&(this.checked||!Ht.test(e))}).map(function(e,t){var n=rt(this).val();return null==n?null:rt.isArray(n)?rt.map(n,function(e){return{name:t.name,value:e.replace(Vn,"\r\n")}}):{name:t.name,value:n.replace(Vn,"\r\n")}}).get()}}),rt.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&X()||U()}:X;var Kn=0,Zn={},ei=rt.ajaxSettings.xhr();e.ActiveXObject&&rt(e).on("unload",function(){for(var e in Zn)Zn[e](void 0,!0)}),nt.cors=!!ei&&"withCredentials"in ei,ei=nt.ajax=!!ei,ei&&rt.ajaxTransport(function(e){if(!e.crossDomain||nt.cors){var t;return{send:function(n,i){var r,o=e.xhr(),s=++Kn;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(e.hasContent&&e.data||null),t=function(n,r){var a,l,c;if(t&&(r||4===o.readyState))if(delete Zn[s],t=void 0,o.onreadystatechange=rt.noop,r)4!==o.readyState&&o.abort();else{c={},a=o.status,"string"==typeof o.responseText&&(c.text=o.responseText);try{l=o.statusText}catch(u){l=""}a||!e.isLocal||e.crossDomain?1223===a&&(a=204):a=c.text?200:404}c&&i(a,l,c,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Zn[s]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),rt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return rt.globalEval(e),e}}}),rt.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),rt.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=pt.head||rt("head")[0]||pt.documentElement;return{send:function(i,r){t=pt.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||r(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ti=[],ni=/(=)\?(?=&|$)|\?\?/;rt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ti.pop()||rt.expando+"_"+Dn++;return this[e]=!0,e}}),rt.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,s,a=t.jsonp!==!1&&(ni.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ni.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=rt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(ni,"$1"+r):t.jsonp!==!1&&(t.url+=(Ln.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||rt.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,ti.push(r)),s&&rt.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),rt.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||pt;var i=ht.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=rt.buildFragment([e],t,r),r&&r.length&&rt(r).remove(),rt.merge([],i.childNodes))};var ii=rt.fn.load;rt.fn.load=function(e,t,n){if("string"!=typeof e&&ii)return ii.apply(this,arguments);var i,r,o,s=this,a=e.indexOf(" ");return a>=0&&(i=rt.trim(e.slice(a,e.length)),e=e.slice(0,a)),rt.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&rt.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?rt("<div>").append(rt.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){s.each(n,r||[e.responseText,t,e])}),this},rt.expr.filters.animated=function(e){return rt.grep(rt.timers,function(t){return e===t.elem}).length};var ri=e.document.documentElement;rt.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c,u=rt.css(e,"position"),h=rt(e),d={};"static"===u&&(e.style.position="relative"),a=h.offset(),o=rt.css(e,"top"),l=rt.css(e,"left"),c=("absolute"===u||"fixed"===u)&&rt.inArray("auto",[o,l])>-1,c?(i=h.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),rt.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):h.css(d)}},rt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){rt.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return t=o.documentElement,rt.contains(t,r)?(typeof r.getBoundingClientRect!==_t&&(i=r.getBoundingClientRect()),n=G(o),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===rt.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),rt.nodeName(e[0],"html")||(n=e.offset()),n.top+=rt.css(e[0],"borderTopWidth",!0),n.left+=rt.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-rt.css(i,"marginTop",!0),left:t.left-n.left-rt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||ri;e&&!rt.nodeName(e,"html")&&"static"===rt.css(e,"position");)e=e.offsetParent;return e||ri})}}),rt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);rt.fn[e]=function(i){return Pt(this,function(e,i,r){var o=G(e);return void 0===r?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(n?rt(o).scrollLeft():r,n?r:rt(o).scrollTop()):e[i]=r)},e,i,arguments.length,null)}}),rt.each(["top","left"],function(e,t){rt.cssHooks[t]=S(nt.pixelPosition,function(e,n){return n?(n=tn(e,t),rn.test(n)?rt(e).position()[t]+"px":n):void 0})}),rt.each({Height:"height",Width:"width"},function(e,t){rt.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){rt.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||r===!0?"margin":"border");return Pt(this,function(t,n,i){var r;return rt.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?rt.css(t,n,s):rt.style(t,n,i,s)},t,o?i:void 0,o,null)}})}),rt.fn.size=function(){return this.length},rt.fn.andSelf=rt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return rt});var oi=e.jQuery,si=e.$;return rt.noConflict=function(t){return e.$===rt&&(e.$=si),t&&e.jQuery===rt&&(e.jQuery=oi),rt},typeof t===_t&&(e.jQuery=e.$=rt),rt}),function(e,t){e.rails!==t&&e.error("jquery-ujs has already been loaded!");var n,i=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",CSRFProtection:function(t){var n=e('meta[name="csrf-token"]').attr("content");n&&t.setRequestHeader("X-CSRF-Token",n)},refreshCSRFTokens:function(){var t=e("meta[name=csrf-token]").attr("content"),n=e("meta[name=csrf-param]").attr("content");e('form input[name="'+n+'"]').val(t)},fire:function(t,n,i){var r=e.Event(n);return t.trigger(r,i),r.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr("href")},handleRemote:function(i){var r,o,s,a,l,c,u,h;if(n.fire(i,"ajax:before")){if(a=i.data("cross-domain"),l=a===t?null:a,c=i.data("with-credentials")||null,u=i.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),s=i.serializeArray();var d=i.data("ujs:submit-button");d&&(s.push(d),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),s=i.data("params")||null);return h={type:r||"GET",data:s,dataType:u,beforeSend:function(e,r){return r.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[e,r])?void i.trigger("ajax:send",e):!1},success:function(e,t,n){i.trigger("ajax:success",[e,t,n])},complete:function(e,t){i.trigger("ajax:complete",[e,t])},error:function(e,t,n){i.trigger("ajax:error",[e,t,n])},crossDomain:l},c&&(h.xhrFields={withCredentials:c}),o&&(h.url=o),n.ajax(h)}return!1},handleMethod:function(i){var r=n.href(i),o=i.data("method"),s=i.attr("target"),a=e("meta[name=csrf-token]").attr("content"),l=e("meta[name=csrf-param]").attr("content"),c=e('<form method="post" action="'+r+'"></form>'),u='<input name="_method" value="'+o+'" type="hidden" />';l!==t&&a!==t&&(u+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&c.attr("target",s),c.hide().append(u).appendTo("body"),c.submit()},formElements:function(t,n){return t.is("form")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,i;n=e.is("button")?"html":"val",i=e.data("disable-with"),e.data("ujs:enable-with",e[n]()),i!==t&&e[n](i),e.prop("disabled",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";e.data("ujs:enable-with")&&e[t](e.data("ujs:enable-with")),e.prop("disabled",!1)},allowAction:function(e){var t,i=e.data("confirm"),r=!1;return i?(n.fire(e,"confirm")&&(r=n.confirm(i),t=n.fire(e,"confirm:complete",[r])),r&&t):!0},blankInputs:function(t,n,i){var r,o,s=e(),a=n||"input,textarea",l=t.find(a);return l.each(function(){if(r=e(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!o==!i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;s=s.add(r)}}),s.length?s:!1},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){var i=e.data("disable-with");e.data("ujs:enable-with",e.html()),i!==t&&e.html(i),e.bind("click.railsDisable",function(e){return n.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,i){e.crossDomain||n.CSRFProtection(i)}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(e(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(e(this))}),i.delegate(n.linkClickSelector,"click.rails",function(i){var r=e(this),o=r.data("method"),s=r.data("params"),a=i.metaKey||i.ctrlKey;if(!n.allowAction(r))return n.stopEverything(i);if(!a&&r.is(n.linkDisableSelector)&&n.disableElement(r),r.data("remote")!==t){if(a&&(!o||"GET"===o)&&!s)return!0;var l=n.handleRemote(r);return l===!1?n.enableElement(r):l.error(function(){n.enableElement(r)}),!1}return r.data("method")?(n.handleMethod(r),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.error(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(t){var i=e(this);return n.allowAction(i)?(n.handleRemote(i),!1):n.stopEverything(t)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,s=e(this),a=s.data("remote")!==t;if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")==t&&(r=n.blankInputs(s,n.requiredInputSelector),r&&n.fire(s,"ajax:aborted:required",[r])))return n.stopEverything(i);if(a){if(o=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null;i.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(t){this==t.target&&n.disableFormElements(e(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(t){this==t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))}(jQuery),function(){var e,t,n,i,r,o,s,a,l,c,u,h,d,f,p,m,g,v,y,b,w,x,k,_,C,T,S,E,N,P,H,D,L,I,A,M,j,O,F,q,$,W,B,R,z,X,U,G,Y,V,J,Q,K,Z=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},et={}.hasOwnProperty,tt=function(e,t){function n(){this.constructor=e}for(var i in t)et.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},nt=[].slice;D={},d=10,G=!1,v=null,P=null,O=null,g=null,Q=null,i={BEFORE_CHANGE:"page:before-change",FETCH:"page:fetch",RECEIVE:"page:receive",CHANGE:"page:change",UPDATE:"page:update",LOAD:"page:load",RESTORE:"page:restore",BEFORE_UNLOAD:"page:before-unload",EXPIRE:"page:expire"},x=function(e){var t;return e=new n(e),B(),h(),G&&(t=Y(e.absolute))?(k(t),_(e)):_(e,X)},Y=function(e){var t;return t=D[e],t&&!t.transitionCacheDisabled?t:void 0},y=function(e){return null==e&&(e=!0),G=e},_=function(e,t){return null==t&&(t=function(){return function(){}}(this)),V(i.FETCH,{url:e.absolute}),null!=Q&&Q.abort(),Q=new XMLHttpRequest,Q.open("GET",e.withoutHashForIE10compatibility(),!0),Q.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),Q.setRequestHeader("X-XHR-Referer",O),Q.onload=function(){var n;return V(i.RECEIVE,{url:e.absolute}),(n=M())?(F(e),f.apply(null,w(n)),H(),q(),t(),V(i.LOAD)):document.location.href=e.absolute},Q.onloadend=function(){return Q=null},Q.onerror=function(){return document.location.href=e.absolute},Q.send()},k=function(e){return null!=Q&&Q.abort(),f(e.title,e.body),j(e),V(i.RESTORE)},h=function(){var e;return e=new n(v.url),D[e.absolute]={url:e.relative,body:document.body,title:document.title,positionY:window.pageYOffset,positionX:window.pageXOffset,cachedAt:(new Date).getTime(),transitionCacheDisabled:null!=document.querySelector("[data-no-transition-cache]")},m(d)},I=function(e){return null==e&&(e=d),/^[\d]+$/.test(e)?d=parseInt(e):void 0},m=function(e){var t,n,r,o,s,a;for(r=Object.keys(D),t=r.map(function(e){return D[e].cachedAt}).sort(function(e,t){return t-e}),a=[],o=0,s=r.length;s>o;o++)n=r[o],D[n].cachedAt<=t[e]&&(V(i.EXPIRE,D[n]),a.push(delete D[n]));return a},f=function(t,n,r,o){return V(i.BEFORE_UNLOAD),document.title=t,document.documentElement.replaceChild(n,document.body),null!=r&&e.update(r),U(),o&&b(),v=window.history.state,V(i.CHANGE),V(i.UPDATE)},b=function(){var e,t,n,i,r,o,s,a,l,c,u,h;for(o=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),s=0,l=o.length;l>s;s++)if(r=o[s],""===(u=r.type)||"text/javascript"===u){for(t=document.createElement("script"),h=r.attributes,a=0,c=h.length;c>a;a++)e=h[a],t.setAttribute(e.name,e.value);r.hasAttribute("async")||(t.async=!1),t.appendChild(document.createTextNode(r.innerHTML)),i=r.parentNode,n=r.nextSibling,i.removeChild(r),i.insertBefore(t,n)}},R=function(e){return e.innerHTML=e.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi,""),e},U=function(){var e,t;return e=(t=document.querySelectorAll("input[autofocus], textarea[autofocus]"))[t.length-1],e&&document.activeElement!==e?e.focus():void 0},F=function(e){return(e=new n(e)).absolute!==O?window.history.pushState({turbolinks:!0,url:e.absolute},"",e.absolute):void 0},q=function(){var e,t;return(e=Q.getResponseHeader("X-XHR-Redirected-To"))?(e=new n(e),t=e.hasNoHash()?document.location.hash:"",window.history.replaceState(v,"",e.href+t)):void 0},B=function(){return O=document.location.href},W=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},$=function(){return v=window.history.state},H=function(){var e;return navigator.userAgent.match(/Firefox/)&&!(e=new n).hasNoHash()?(window.history.replaceState(v,"",e.withoutHash()),document.location.hash=e.hash):void 0},j=function(e){return window.scrollTo(e.positionX,e.positionY)},X=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},p=function(e){var t,n,i;if(null==e||"object"!=typeof e)return e;t=new e.constructor;for(n in e)i=e[n],t[n]=p(i);return t},A=function(e){var t,n;return t=(null!=(n=document.cookie.match(new RegExp(e+"=(\\w+)")))?n[1].toUpperCase():void 0)||"",document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",t},V=function(e,t){var n;return"undefined"!=typeof Prototype&&Event.fire(document,e,t,!0),n=document.createEvent("Events"),t&&(n.data=t),n.initEvent(e,!0,!0),document.dispatchEvent(n)},L=function(e){return!V(i.BEFORE_CHANGE,{url:e})},M=function(){var e,t,n,i,r,o;return t=function(){var e;return 400<=(e=Q.status)&&600>e},o=function(){var e;return null!=(e=Q.getResponseHeader("Content-Type"))&&e.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},i=function(e){var t,n,i,r,o;for(r=e.querySelector("head").childNodes,o=[],n=0,i=r.length;i>n;n++)t=r[n],null!=("function"==typeof t.getAttribute?t.getAttribute("data-turbolinks-track"):void 0)&&o.push(t.getAttribute("src")||t.getAttribute("href"));return o},e=function(e){var t;return P||(P=i(document)),t=i(e),t.length!==P.length||r(t,P).length!==P.length},r=function(e,t){var n,i,r,o,s;for(e.length>t.length&&(o=[t,e],e=o[0],t=o[1]),s=[],i=0,r=e.length;r>i;i++)n=e[i],Z.call(t,n)>=0&&s.push(n);return s},!t()&&o()&&(n=g(Q.responseText),n&&!e(n))?n:void 0},w=function(t){var n;return n=t.querySelector("title"),[null!=n?n.textContent:void 0,R(t.querySelector("body")),e.get(t).token,"runScripts"]},e={get:function(e){var t;return null==e&&(e=document),{node:t=e.querySelector('meta[name="csrf-token"]'),token:null!=t&&"function"==typeof t.getAttribute?t.getAttribute("content"):void 0}},update:function(e){var t;return t=this.get(),null!=t.token&&null!=e&&t.token!==e?t.node.setAttribute("content",e):void 0}},o=function(){var e,t,n,i,r,o,s,a,l,c;i=function(e){return(new DOMParser).parseFromString(e,"text/html")},t=function(e){var t;return t=document.implementation.createHTMLDocument(""),t.documentElement.innerHTML=e,t},r=function(e){var t;return t=document.implementation.createHTMLDocument(""),t.open("replace"),t.write(e),t.close(),t},n=function(e){var t,n,i,r,o,s;return i=(null!=(o=e.match(/<head[^>]*>([\s\S.]*)<\/head>/i))?o[0]:void 0)||"<head></head>",t=(null!=(s=e.match(/<body[^>]*>([\s\S.]*)<\/body>/i))?s[0]:void 0)||"<body></body>",r=document.createElement("html"),r.innerHTML=i+t,n=document.createDocumentFragment(),n.appendChild(r),n},e=function(e){var t,i,o;return t=function(e,t){return{passes:t(),fallback:e}},o=t(r,function(){return function(){var t,n;return 1===(null!=(t=e("<html><body><p>test"))&&null!=(n=t.body)?n.childNodes.length:void 0)}}(this)),i=t(n,function(){return function(){var t,n;return 2===(null!=(t=e("<html><body><form></form><div></div></body></html>"))&&null!=(n=t.body)?n.childNodes.length:void 0)}}(this)),[o,i]};try{if(window.DOMParser)return s=e(i),i}catch(u){return a=u,s=e(t),t}finally{for(l=0,c=s.length;c>l;l++)if(o=s[l],!o.passes)return o.fallback}},n=function(){function e(t){return this.original=null!=t?t:document.location.href,this.original.constructor===e?this.original:void this._parse()}return e.prototype.withoutHash=function(){return this.href.replace(this.hash,"").replace("#","")},e.prototype.withoutHashForIE10compatibility=function(){return this.withoutHash()},e.prototype.hasNoHash=function(){return 0===this.hash.length},e.prototype._parse=function(){var e;return(null!=this.link?this.link:this.link=document.createElement("a")).href=this.original,e=this.link,this.href=e.href,this.protocol=e.protocol,this.host=e.host,this.hostname=e.hostname,this.port=e.port,this.pathname=e.pathname,this.search=e.search,this.hash=e.hash,this.origin=[this.protocol,"//",this.hostname].join(""),0!==this.port.length&&(this.origin+=":"+this.port),this.relative=[this.pathname,this.search,this.hash].join(""),this.absolute=this.href},e}(),r=function(e){function t(e){return this.link=e,this.link.constructor===t?this.link:(this.original=this.link.href,this.originalElement=this.link,this.link=this.link.cloneNode(!1),void t.__super__.constructor.apply(this,arguments))}return tt(t,e),t.HTML_EXTENSIONS=["html"],t.allowExtensions=function(){var e,n,i,r;for(n=1<=arguments.length?nt.call(arguments,0):[],i=0,r=n.length;r>i;i++)e=n[i],t.HTML_EXTENSIONS.push(e);return t.HTML_EXTENSIONS},t.prototype.shouldIgnore=function(){return this._crossOrigin()||this._anchored()||this._nonHtml()||this._optOut()||this._target()},t.prototype._crossOrigin=function(){return this.origin!==(new n).origin},t.prototype._anchored=function(){return(this.hash.length>0||"#"===this.href.charAt(this.href.length-1))&&this.withoutHash()===(new n).withoutHash()},t.prototype._nonHtml=function(){return this.pathname.match(/\.[a-z]+$/g)&&!this.pathname.match(new RegExp("\\.(?:"+t.HTML_EXTENSIONS.join("|")+")?$","g"))},t.prototype._optOut=function(){var e,t;for(t=this.originalElement;!e&&t!==document;)e=null!=t.getAttribute("data-no-turbolink"),t=t.parentNode;return e},t.prototype._target=function(){return 0!==this.link.target.length},t}(n),t=function(){function e(e){this.event=e,this.event.defaultPrevented||(this._extractLink(),this._validForTurbolinks()&&(L(this.link.absolute)||J(this.link.href),this.event.preventDefault()))}return e.installHandlerLast=function(t){return t.defaultPrevented?void 0:(document.removeEventListener("click",e.handle,!1),document.addEventListener("click",e.handle,!1))},e.handle=function(t){return new e(t)},e.prototype._extractLink=function(){var e;for(e=this.event.target;e.parentNode&&"A"!==e.nodeName;)e=e.parentNode;return"A"===e.nodeName&&0!==e.href.length?this.link=new r(e):void 0},e.prototype._validForTurbolinks=function(){return null!=this.link&&!(this.link.shouldIgnore()||this._nonStandardClick())},e.prototype._nonStandardClick=function(){return this.event.which>1||this.event.metaKey||this.event.ctrlKey||this.event.shiftKey||this.event.altKey},e}(),u=function(e){return setTimeout(e,500)},S=function(){return document.addEventListener("DOMContentLoaded",function(){return V(i.CHANGE),V(i.UPDATE)},!0)},N=function(){return"undefined"!=typeof jQuery?jQuery(document).on("ajaxSuccess",function(e,t){return jQuery.trim(t.responseText)?V(i.UPDATE):void 0}):void 0},E=function(e){var t,i;return(null!=(i=e.state)?i.turbolinks:void 0)?(t=D[new n(e.state.url).absolute])?(h(),k(t)):J(e.target.location.href):void 0},T=function(){return W(),$(),g=o(),document.addEventListener("click",t.installHandlerLast,!0),window.addEventListener("hashchange",function(){return W(),$()},!1),u(function(){return window.addEventListener("popstate",E,!1)
  })},C=void 0!==window.history.state||navigator.userAgent.match(/Firefox\/2[6|7]/),l=window.history&&window.history.pushState&&window.history.replaceState&&C,s=!navigator.userAgent.match(/CriOS\//),z="GET"===(K=A("request_method"))||""===K,c=l&&s&&z,a=document.addEventListener&&document.createEvent,a&&(S(),N()),c?(J=x,T()):J=function(e){return document.location.href=e},this.Turbolinks={visit:J,pagesCached:I,enableTransitionCache:y,allowLinkExtensions:r.allowExtensions,supported:c,EVENTS:p(i)}}.call(this),!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):window.jQuery&&!window.jQuery.fn.colorpicker&&e(window.jQuery)}(function(e){"use strict";var t=function(e){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,e&&(void 0!==e.toLowerCase?this.setColor(e):void 0!==e.h&&(this.value=e))};t.prototype={constructor:t,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_sanitizeNumber:function(e){return"number"==typeof e?e:isNaN(e)||null===e||""===e||void 0===e?1:void 0!==e.toLowerCase?parseFloat(e):1},setColor:function(e){e=e.toLowerCase(),this.value=this.stringToHSB(e)||{h:0,s:0,b:0,a:1}},stringToHSB:function(t){t=t.toLowerCase();var n=this,i=!1;return e.each(this.stringParsers,function(e,r){var o=r.re.exec(t),s=o&&r.parse.apply(n,[o]),a=r.format||"rgba";return s?(i=a.match(/hsla?/)?n.RGBtoHSB.apply(n,n.HSLtoRGB.apply(n,s)):n.RGBtoHSB.apply(n,s),n.origFormat=a,!1):!0}),i},setHue:function(e){this.value.h=1-e},setSaturation:function(e){this.value.s=e},setBrightness:function(e){this.value.b=1-e},setAlpha:function(e){this.value.a=parseInt(100*(1-e),10)/100},toRGB:function(e,t,n,i){e||(e=this.value.h,t=this.value.s,n=this.value.b),e*=360;var r,o,s,a,l;return e=e%360/60,l=n*t,a=l*(1-Math.abs(e%2-1)),r=o=s=n-l,e=~~e,r+=[l,a,0,0,a,l][e],o+=[a,l,l,a,0,0][e],s+=[0,0,a,l,l,a][e],{r:Math.round(255*r),g:Math.round(255*o),b:Math.round(255*s),a:i||this.value.a}},toHex:function(e,t,n,i){var r=this.toRGB(e,t,n,i);return"#"+(1<<24|parseInt(r.r)<<16|parseInt(r.g)<<8|parseInt(r.b)).toString(16).substr(1)},toHSL:function(e,t,n,i){e=e||this.value.h,t=t||this.value.s,n=n||this.value.b,i=i||this.value.a;var r=e,o=(2-t)*n,s=t*n;return s/=o>0&&1>=o?o:2-o,o/=2,s>1&&(s=1),{h:isNaN(r)?0:r,s:isNaN(s)?0:s,l:isNaN(o)?0:o,a:isNaN(i)?0:i}},toAlias:function(e,t,n,i){var r=this.toHex(e,t,n,i);for(var o in this.colors)if(this.colors[o]==r)return o;return!1},RGBtoHSB:function(e,t,n,i){e/=255,t/=255,n/=255;var r,o,s,a;return s=Math.max(e,t,n),a=s-Math.min(e,t,n),r=0===a?null:s===e?(t-n)/a:s===t?(n-e)/a+2:(e-t)/a+4,r=(r+360)%6*60/360,o=0===a?0:a/s,{h:this._sanitizeNumber(r),s:o,b:s,a:this._sanitizeNumber(i)}},HueToRGB:function(e,t,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?e+(t-e)*n*6:1>2*n?t:2>3*n?e+(t-e)*(2/3-n)*6:e},HSLtoRGB:function(e,t,n,i){0>t&&(t=0);var r;r=.5>=n?n*(1+t):n+t-n*t;var o=2*n-r,s=e+1/3,a=e,l=e-1/3,c=Math.round(255*this.HueToRGB(o,r,s)),u=Math.round(255*this.HueToRGB(o,r,a)),h=Math.round(255*this.HueToRGB(o,r,l));return[c,u,h,this._sanitizeNumber(i)]},toString:function(e){switch(e=e||"rgba"){case"rgb":var t=this.toRGB();return"rgb("+t.r+","+t.g+","+t.b+")";case"rgba":var t=this.toRGB();return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")";case"hsl":var n=this.toHSL();return"hsl("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%)";case"hsla":var n=this.toHSL();return"hsla("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%,"+n.a+")";case"hex":return this.toHex();case"alias":return this.toAlias()||this.toHex();default:return!1}},stringParsers:[{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),1]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),1]}},{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(e){return[e[1],e[2],e[3],1]}},{re:/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/^([a-z]{3,})$/,format:"alias",parse:function(e){var t=this.colorNameToHex(e[0])||"#000000",n=this.stringParsers[0].re.exec(t),i=n&&this.stringParsers[0].parse.apply(this,[n]);return i}}],colorNameToHex:function(e){return"undefined"!=typeof this.colors[e.toLowerCase()]?this.colors[e.toLowerCase()]:!1}};var n={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div></div>'},i=function(i,r){this.element=e(i).addClass("colorpicker-element"),this.options=e.extend({},n,this.element.data(),r),this.component=this.options.component,this.component=this.component!==!1?this.element.find(this.component):!1,this.component&&0===this.component.length&&(this.component=!1),this.container=this.options.container===!0?this.element:this.options.container,this.container=this.container!==!1?e(this.container):!1,this.input=this.element.is("input")?this.element:this.options.input?this.element.find(this.options.input):!1,this.input&&0===this.input.length&&(this.input=!1),this.color=new t(this.options.color!==!1?this.options.color:this.getValue()),this.format=this.options.format!==!1?this.options.format:this.color.origFormat,this.picker=e(this.options.template),this.picker.addClass(this.options.inline?"colorpicker-inline colorpicker-visible":"colorpicker-hidden"),this.options.horizontal&&this.picker.addClass("colorpicker-horizontal"),("rgba"===this.format||"hsla"===this.format)&&this.picker.addClass("colorpicker-with-alpha"),this.picker.on("mousedown.colorpicker",e.proxy(this.mousedown,this)),this.picker.appendTo(this.container?this.container:e("body")),this.input!==!1&&(this.input.on({"keyup.colorpicker":e.proxy(this.keyup,this)}),this.component===!1&&this.element.on({"focus.colorpicker":e.proxy(this.show,this)}),this.options.inline===!1&&this.element.on({"focusout.colorpicker":e.proxy(this.hide,this)})),this.component!==!1&&this.component.on({"click.colorpicker":e.proxy(this.show,this)}),this.input===!1&&this.component===!1&&this.element.on({"click.colorpicker":e.proxy(this.show,this)}),this.update(),e(e.proxy(function(){this.element.trigger("create")},this))};i.version="2.0.0-beta",i.Color=t,i.prototype={constructor:i,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker").off(".colorpicker"),this.input!==!1&&this.input.off(".colorpicker"),this.component!==!1&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(this.options.inline!==!1)return!1;var e=this.container&&this.container[0]!==document.body?"position":"offset",t=this.component?this.component[e]():this.element[e]();this.picker.css({top:t.top+(this.component?this.component.outerHeight():this.element.outerHeight()),left:t.left})},show:function(t){return this.isDisabled()?!1:(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),e(window).on("resize.colorpicker",e.proxy(this.reposition,this)),!this.hasInput()&&t&&t.stopPropagation&&t.preventDefault&&(t.stopPropagation(),t.preventDefault()),this.options.inline===!1&&e(window.document).on({"mousedown.colorpicker":e.proxy(this.hide,this)}),void this.element.trigger({type:"showPicker",color:this.color}))},hide:function(){this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),e(window).off("resize.colorpicker",this.reposition),e(document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(e){return e=e||this.color.toString(this.format),this.element.data("color",e),e},updateInput:function(e){return e=e||this.color.toString(this.format),this.input!==!1&&this.input.prop("value",e),e},updatePicker:function(e){void 0!==e&&(this.color=new t(e));var n=this.options.horizontal===!1?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");return 0!==i.length?(this.options.horizontal===!1?(n=this.options.sliders,i.eq(1).css("top",n.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",n.alpha.maxTop*(1-this.color.value.a))):(n=this.options.slidersHorz,i.eq(1).css("left",n.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",n.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:n.saturation.maxTop-this.color.value.b*n.saturation.maxTop,left:this.color.value.s*n.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex()),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(this.format)),e):void 0},updateComponent:function(e){if(e=e||this.color.toString(this.format),this.component!==!1){var t=this.component.find("i").eq(0);t.length>0?t.css({backgroundColor:e}):this.component.css({backgroundColor:e})}return e},update:function(e){var t=this.updateComponent();return(this.getValue(!1)!==!1||e===!0)&&(this.updateInput(t),this.updateData(t)),this.updatePicker(),t},setValue:function(e){this.color=new t(e),this.update(),this.element.trigger({type:"changeColor",color:this.color,value:e})},getValue:function(e){e=void 0===e?"#000000":e;var t;return t=this.hasInput()?this.input.val():this.element.data("color"),(void 0===t||""===t||null===t)&&(t=e),t},hasInput:function(){return this.input!==!1},isDisabled:function(){return this.hasInput()?this.input.prop("disabled")===!0:!1},disable:function(){return this.hasInput()?(this.input.prop("disabled",!0),!0):!1},enable:function(){return this.hasInput()?(this.input.prop("disabled",!1),!0):!1},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target),i=n.closest("div"),r=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!i.is(".colorpicker")){if(i.is(".colorpicker-saturation"))this.currentSlider=e.extend({},r.saturation);else if(i.is(".colorpicker-hue"))this.currentSlider=e.extend({},r.hue);else{if(!i.is(".colorpicker-alpha"))return!1;this.currentSlider=e.extend({},r.alpha)}var o=i.offset();this.currentSlider.guide=i.find("i")[0].style,this.currentSlider.left=t.pageX-o.left,this.currentSlider.top=t.pageY-o.top,this.mousePointer={left:t.pageX,top:t.pageY},e(document).on({"mousemove.colorpicker":e.proxy(this.mousemove,this),"mouseup.colorpicker":e.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(e){e.stopPropagation(),e.preventDefault();var t=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((e.pageX||this.mousePointer.left)-this.mousePointer.left))),n=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((e.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=t+"px",this.currentSlider.guide.top=n+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,t/100),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,n/100),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(t){return t.stopPropagation(),t.preventDefault(),e(document).off({"mousemove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup}),!1},keyup:function(e){if(38===e.keyCode)this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0);else if(40===e.keyCode)this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0);else{var n=this.input.val();this.color=new t(n),this.getValue(!1)!==!1&&(this.updateData(),this.updateComponent(),this.updatePicker())}this.element.trigger({type:"changeColor",color:this.color,value:n})}},e.colorpicker=i,e.fn.colorpicker=function(t){var n=arguments;return this.each(function(){var r=e(this),o=r.data("colorpicker"),s="object"==typeof t?t:{};o||"string"==typeof t?"string"==typeof t&&o[t].apply(o,Array.prototype.slice.call(n,1)):r.data("colorpicker",new i(this,s))})},e.fn.colorpicker.constructor=i}),function(e){"use strict";function t(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function n(e,t){var n=i(e,t)?o:r;n(e,t)}var i,r,o;"classList"in document.documentElement?(i=function(e,t){return e.classList.contains(t)},r=function(e,t){e.classList.add(t)},o=function(e,t){e.classList.remove(t)}):(i=function(e,n){return t(n).test(e.className)},r=function(e,t){i(e,t)||(e.className=e.className+" "+t)},o=function(e,n){e.className=e.className.replace(t(n)," ")});var s={hasClass:i,addClass:r,removeClass:o,toggleClass:n,has:i,add:r,remove:o,toggle:n};"function"==typeof define&&define.amd?define(s):e.classie=s}(window);var today=new Date,day=today.getDate(),month=today.getMonth();month+=1;var year=today.getFullYear();switch(month){case 1:month="January";break;case 2:month="February";break;case 3:month="March";break;case 4:month="April";break;case 5:month="May";break;case 6:month="June";break;case 7:month="July";break;case 8:month="August";break;case 9:month="September";break;case 10:month="October";break;case 11:month="November";break;case 12:month="December"}document.getElementById("month").innerHTML=month,document.getElementById("day").innerHTML=day,document.getElementById("year").innerHTML=year,updateClock(),getNews(),!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):window.jQuery&&!window.jQuery.fn.colorpicker&&e(window.jQuery)}(function(e){"use strict";var t=function(e){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,e&&(void 0!==e.toLowerCase?this.setColor(e):void 0!==e.h&&(this.value=e))};t.prototype={constructor:t,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_sanitizeNumber:function(e){return"number"==typeof e?e:isNaN(e)||null===e||""===e||void 0===e?1:void 0!==e.toLowerCase?parseFloat(e):1},setColor:function(e){e=e.toLowerCase(),this.value=this.stringToHSB(e)||{h:0,s:0,b:0,a:1}},stringToHSB:function(t){t=t.toLowerCase();var n=this,i=!1;return e.each(this.stringParsers,function(e,r){var o=r.re.exec(t),s=o&&r.parse.apply(n,[o]),a=r.format||"rgba";return s?(i=a.match(/hsla?/)?n.RGBtoHSB.apply(n,n.HSLtoRGB.apply(n,s)):n.RGBtoHSB.apply(n,s),n.origFormat=a,!1):!0}),i},setHue:function(e){this.value.h=1-e},setSaturation:function(e){this.value.s=e},setBrightness:function(e){this.value.b=1-e},setAlpha:function(e){this.value.a=parseInt(100*(1-e),10)/100},toRGB:function(e,t,n,i){e||(e=this.value.h,t=this.value.s,n=this.value.b),e*=360;var r,o,s,a,l;return e=e%360/60,l=n*t,a=l*(1-Math.abs(e%2-1)),r=o=s=n-l,e=~~e,r+=[l,a,0,0,a,l][e],o+=[a,l,l,a,0,0][e],s+=[0,0,a,l,l,a][e],{r:Math.round(255*r),g:Math.round(255*o),b:Math.round(255*s),a:i||this.value.a}},toHex:function(e,t,n,i){var r=this.toRGB(e,t,n,i);return"#"+(1<<24|parseInt(r.r)<<16|parseInt(r.g)<<8|parseInt(r.b)).toString(16).substr(1)},toHSL:function(e,t,n,i){e=e||this.value.h,t=t||this.value.s,n=n||this.value.b,i=i||this.value.a;var r=e,o=(2-t)*n,s=t*n;return s/=o>0&&1>=o?o:2-o,o/=2,s>1&&(s=1),{h:isNaN(r)?0:r,s:isNaN(s)?0:s,l:isNaN(o)?0:o,a:isNaN(i)?0:i}},toAlias:function(e,t,n,i){var r=this.toHex(e,t,n,i);for(var o in this.colors)if(this.colors[o]==r)return o;return!1},RGBtoHSB:function(e,t,n,i){e/=255,t/=255,n/=255;var r,o,s,a;return s=Math.max(e,t,n),a=s-Math.min(e,t,n),r=0===a?null:s===e?(t-n)/a:s===t?(n-e)/a+2:(e-t)/a+4,r=(r+360)%6*60/360,o=0===a?0:a/s,{h:this._sanitizeNumber(r),s:o,b:s,a:this._sanitizeNumber(i)}},HueToRGB:function(e,t,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?e+(t-e)*n*6:1>2*n?t:2>3*n?e+(t-e)*(2/3-n)*6:e},HSLtoRGB:function(e,t,n,i){0>t&&(t=0);var r;r=.5>=n?n*(1+t):n+t-n*t;var o=2*n-r,s=e+1/3,a=e,l=e-1/3,c=Math.round(255*this.HueToRGB(o,r,s)),u=Math.round(255*this.HueToRGB(o,r,a)),h=Math.round(255*this.HueToRGB(o,r,l));return[c,u,h,this._sanitizeNumber(i)]},toString:function(e){switch(e=e||"rgba"){case"rgb":var t=this.toRGB();return"rgb("+t.r+","+t.g+","+t.b+")";case"rgba":var t=this.toRGB();return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")";case"hsl":var n=this.toHSL();return"hsl("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%)";case"hsla":var n=this.toHSL();return"hsla("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%,"+n.a+")";case"hex":return this.toHex();case"alias":return this.toAlias()||this.toHex();default:return!1}},stringParsers:[{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),1]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),1]}},{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(e){return[e[1],e[2],e[3],1]}},{re:/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/^([a-z]{3,})$/,format:"alias",parse:function(e){var t=this.colorNameToHex(e[0])||"#000000",n=this.stringParsers[0].re.exec(t),i=n&&this.stringParsers[0].parse.apply(this,[n]);return i}}],colorNameToHex:function(e){return"undefined"!=typeof this.colors[e.toLowerCase()]?this.colors[e.toLowerCase()]:!1}};var n={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div></div>'},i=function(i,r){this.element=e(i).addClass("colorpicker-element"),this.options=e.extend({},n,this.element.data(),r),this.component=this.options.component,this.component=this.component!==!1?this.element.find(this.component):!1,this.component&&0===this.component.length&&(this.component=!1),this.container=this.options.container===!0?this.element:this.options.container,this.container=this.container!==!1?e(this.container):!1,this.input=this.element.is("input")?this.element:this.options.input?this.element.find(this.options.input):!1,this.input&&0===this.input.length&&(this.input=!1),this.color=new t(this.options.color!==!1?this.options.color:this.getValue()),this.format=this.options.format!==!1?this.options.format:this.color.origFormat,this.picker=e(this.options.template),this.picker.addClass(this.options.inline?"colorpicker-inline colorpicker-visible":"colorpicker-hidden"),this.options.horizontal&&this.picker.addClass("colorpicker-horizontal"),("rgba"===this.format||"hsla"===this.format)&&this.picker.addClass("colorpicker-with-alpha"),this.picker.on("mousedown.colorpicker",e.proxy(this.mousedown,this)),this.picker.appendTo(this.container?this.container:e("body")),this.input!==!1&&(this.input.on({"keyup.colorpicker":e.proxy(this.keyup,this)}),this.component===!1&&this.element.on({"focus.colorpicker":e.proxy(this.show,this)}),this.options.inline===!1&&this.element.on({"focusout.colorpicker":e.proxy(this.hide,this)})),this.component!==!1&&this.component.on({"click.colorpicker":e.proxy(this.show,this)}),this.input===!1&&this.component===!1&&this.element.on({"click.colorpicker":e.proxy(this.show,this)}),this.update(),e(e.proxy(function(){this.element.trigger("create")},this))};i.version="2.0.0-beta",i.Color=t,i.prototype={constructor:i,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker").off(".colorpicker"),this.input!==!1&&this.input.off(".colorpicker"),this.component!==!1&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(this.options.inline!==!1)return!1;var e=this.container&&this.container[0]!==document.body?"position":"offset",t=this.component?this.component[e]():this.element[e]();this.picker.css({top:t.top+(this.component?this.component.outerHeight():this.element.outerHeight()),left:t.left})},show:function(t){return this.isDisabled()?!1:(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),e(window).on("resize.colorpicker",e.proxy(this.reposition,this)),!this.hasInput()&&t&&t.stopPropagation&&t.preventDefault&&(t.stopPropagation(),t.preventDefault()),this.options.inline===!1&&e(window.document).on({"mousedown.colorpicker":e.proxy(this.hide,this)}),void this.element.trigger({type:"showPicker",color:this.color}))},hide:function(){this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),e(window).off("resize.colorpicker",this.reposition),e(document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(e){return e=e||this.color.toString(this.format),this.element.data("color",e),e},updateInput:function(e){return e=e||this.color.toString(this.format),this.input!==!1&&this.input.prop("value",e),e},updatePicker:function(e){void 0!==e&&(this.color=new t(e));var n=this.options.horizontal===!1?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");return 0!==i.length?(this.options.horizontal===!1?(n=this.options.sliders,i.eq(1).css("top",n.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",n.alpha.maxTop*(1-this.color.value.a))):(n=this.options.slidersHorz,i.eq(1).css("left",n.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",n.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:n.saturation.maxTop-this.color.value.b*n.saturation.maxTop,left:this.color.value.s*n.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex()),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(this.format)),e):void 0},updateComponent:function(e){if(e=e||this.color.toString(this.format),this.component!==!1){var t=this.component.find("i").eq(0);t.length>0?t.css({backgroundColor:e}):this.component.css({backgroundColor:e})}return e},update:function(e){var t=this.updateComponent();return(this.getValue(!1)!==!1||e===!0)&&(this.updateInput(t),this.updateData(t)),this.updatePicker(),t},setValue:function(e){this.color=new t(e),this.update(),this.element.trigger({type:"changeColor",color:this.color,value:e})},getValue:function(e){e=void 0===e?"#000000":e;var t;return t=this.hasInput()?this.input.val():this.element.data("color"),(void 0===t||""===t||null===t)&&(t=e),t},hasInput:function(){return this.input!==!1},isDisabled:function(){return this.hasInput()?this.input.prop("disabled")===!0:!1},disable:function(){return this.hasInput()?(this.input.prop("disabled",!0),!0):!1},enable:function(){return this.hasInput()?(this.input.prop("disabled",!1),!0):!1},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target),i=n.closest("div"),r=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!i.is(".colorpicker")){if(i.is(".colorpicker-saturation"))this.currentSlider=e.extend({},r.saturation);else if(i.is(".colorpicker-hue"))this.currentSlider=e.extend({},r.hue);else{if(!i.is(".colorpicker-alpha"))return!1;this.currentSlider=e.extend({},r.alpha)}var o=i.offset();this.currentSlider.guide=i.find("i")[0].style,this.currentSlider.left=t.pageX-o.left,this.currentSlider.top=t.pageY-o.top,this.mousePointer={left:t.pageX,top:t.pageY},e(document).on({"mousemove.colorpicker":e.proxy(this.mousemove,this),"mouseup.colorpicker":e.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(e){e.stopPropagation(),e.preventDefault();var t=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((e.pageX||this.mousePointer.left)-this.mousePointer.left))),n=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((e.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=t+"px",this.currentSlider.guide.top=n+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,t/100),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,n/100),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(t){return t.stopPropagation(),t.preventDefault(),e(document).off({"mousemove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup}),!1},keyup:function(e){if(38===e.keyCode)this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0);else if(40===e.keyCode)this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0);
  else{var n=this.input.val();this.color=new t(n),this.getValue(!1)!==!1&&(this.updateData(),this.updateComponent(),this.updatePicker())}this.element.trigger({type:"changeColor",color:this.color,value:n})}},e.colorpicker=i,e.fn.colorpicker=function(t){var n=arguments;return this.each(function(){var r=e(this),o=r.data("colorpicker"),s="object"==typeof t?t:{};o||"string"==typeof t?"string"==typeof t&&o[t].apply(o,Array.prototype.slice.call(n,1)):r.data("colorpicker",new i(this,s))})},e.fn.colorpicker.constructor=i}),$(function(){$("#color_bg").colorpicker({format:"hex",color:"#"+data.bg}),$("#color_fg").colorpicker({format:"hex",color:"#"+data.fg})}),window.Modernizr=function(e,t,n){function i(e){y.cssText=e}function r(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var r=e[i];if(!o(r,"-")&&y[r]!==n)return"pfx"==t?r:!0}return!1}function a(e,t,i){for(var o in e){var s=t[e[o]];if(s!==n)return i===!1?e[o]:r(s,"function")?s.bind(i||t):s}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+w.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?s(o,t):(o=(e+" "+x.join(i+" ")+i).split(" "),a(o,t,n))}var c,u,h,d="2.7.1",f={},p=!0,m=t.documentElement,g="modernizr",v=t.createElement(g),y=v.style,b=({}.toString,"Webkit Moz O ms"),w=b.split(" "),x=b.toLowerCase().split(" "),k={},_=[],C=_.slice,T={}.hasOwnProperty;h=r(T,"undefined")||r(T.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(e,t){return T.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=C.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=t.prototype;var o=new r,s=t.apply(o,n.concat(C.call(arguments)));return Object(s)===s?s:o}return t.apply(e,n.concat(C.call(arguments)))};return i}),k.csstransitions=function(){return l("transition")};for(var S in k)h(k,S)&&(u=S.toLowerCase(),f[u]=k[S](),_.push((f[u]?"":"no-")+u));return f.addTest=function(e,t){if("object"==typeof e)for(var i in e)h(e,i)&&f.addTest(i,e[i]);else{if(e=e.toLowerCase(),f[e]!==n)return f;t="function"==typeof t?t():t,"undefined"!=typeof p&&p&&(m.className+=" "+(t?"":"no-")+e),f[e]=t}return f},i(""),v=c=null,function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=v[e[m]];return t||(t={},g++,e[m]=g,v[g]=t),t}function o(e,n,i){if(n||(n=t),u)return n.createElement(e);i||(i=r(n));var o;return o=i.cache[e]?i.cache[e].cloneNode():p.test(e)?(i.cache[e]=i.createElem(e)).cloneNode():i.createElem(e),!o.canHaveChildren||f.test(e)||o.tagUrn?o:i.frag.appendChild(o)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||r(e);for(var o=n.frag.cloneNode(),s=0,a=i(),l=a.length;l>s;s++)o.createElement(a[s]);return o}function a(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?o(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function l(e){e||(e=t);var i=r(e);return y.shivCSS&&!c&&!i.hasCSS&&(i.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||a(e,i),e}var c,u,h="3.7.0",d=e.html5||{},f=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,m="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",c="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){c=!0,u=!0}}();var y={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:h,shivCSS:d.shivCSS!==!1,supportsUnknownElements:u,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:l,createElement:o,createDocumentFragment:s};e.html5=y,l(t)}(this,t),f._version=d,f._domPrefixes=x,f._cssomPrefixes=w,f.testProp=function(e){return s([e])},f.testAllProps=l,f.prefixed=function(e,t,n){return t?l(e,t,n):l(e,"pfx")},m.className=m.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+_.join(" "):""),f}(this,this.document),function(e,t,n){function i(e){return"[object Function]"==g.call(e)}function r(e){return"string"==typeof e}function o(){}function s(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function a(){var e=v.shift();y=1,e?e.t?p(function(){("c"==e.t?d.injectCss:d.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),a()):y=0}function l(e,n,i,r,o,l,c){function u(t){if(!f&&s(h.readyState)&&(b.r=f=1,!y&&a(),h.onload=h.onreadystatechange=null,t)){"img"!=e&&p(function(){x.removeChild(h)},50);for(var i in S[n])S[n].hasOwnProperty(i)&&S[n][i].onload()}}var c=c||d.errorTimeout,h=t.createElement(e),f=0,g=0,b={t:i,s:n,e:o,a:l,x:c};1===S[n]&&(g=1,S[n]=[]),"object"==e?h.data=n:(h.src=n,h.type=e),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){u.call(this,g)},v.splice(r,0,b),"img"!=e&&(g||2===S[n]?(x.insertBefore(h,w?null:m),p(u,c)):S[n].push(h))}function c(e,t,n,i,o){return y=0,t=t||"j",r(e)?l("c"==t?_:k,e,t,this.i++,n,i,o):(v.splice(this.i++,0,e),1==v.length&&a()),this}function u(){var e=d;return e.loader={load:c,i:0},e}var h,d,f=t.documentElement,p=e.setTimeout,m=t.getElementsByTagName("script")[0],g={}.toString,v=[],y=0,b="MozAppearance"in f.style,w=b&&!!t.createRange().compareNode,x=w?f:m.parentNode,f=e.opera&&"[object Opera]"==g.call(e.opera),f=!!t.attachEvent&&!f,k=b?"object":f?"script":"img",_=f?"script":k,C=Array.isArray||function(e){return"[object Array]"==g.call(e)},T=[],S={},E={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};d=function(e){function t(e){var t,n,i,e=e.split("!"),r=T.length,o=e.pop(),s=e.length,o={url:o,origUrl:o,prefixes:e};for(n=0;s>n;n++)i=e[n].split("="),(t=E[i.shift()])&&(o=t(o,i));for(n=0;r>n;n++)o=T[n](o);return o}function s(e,r,o,s,a){var l=t(e),c=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(r&&(r=i(r)?r:r[e]||r[s]||r[e.split("/").pop().split("?")[0]]),l.instead?l.instead(e,r,o,s,a):(S[l.url]?l.noexec=!0:S[l.url]=1,o.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":n,l.noexec,l.attrs,l.timeout),(i(r)||i(c))&&o.load(function(){u(),r&&r(l.origUrl,a,s),c&&c(l.origUrl,a,s),S[l.url]=2})))}function a(e,t){function n(e,n){if(e){if(r(e))n||(h=function(){var e=[].slice.call(arguments);d.apply(this,e),f()}),s(e,h,t,0,c);else if(Object(e)===e)for(l in a=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!n&&!--a&&(i(h)?h=function(){var e=[].slice.call(arguments);d.apply(this,e),f()}:h[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),f()}}(d[l])),s(e[l],h,t,l,c))}else!n&&f()}var a,l,c=!!e.test,u=e.load||e.both,h=e.callback||o,d=h,f=e.complete||o;n(c?e.yep:e.nope,!!u),u&&n(u)}var l,c,h=this.yepnope.loader;if(r(e))s(e,0,h,0);else if(C(e))for(l=0;l<e.length;l++)c=e[l],r(c)?s(c,0,h,0):C(c)?d(c):Object(c)===c&&a(c,h);else Object(e)===e&&a(e,h)},d.addPrefix=function(e,t){E[e]=t},d.addFilter=function(e){T.push(e)},d.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",h=function(){t.removeEventListener("DOMContentLoaded",h,0),t.readyState="complete"},0)),e.yepnope=u(),e.yepnope.executeStack=a,e.yepnope.injectJs=function(e,n,i,r,l,c){var u,h,f=t.createElement("script"),r=r||d.errorTimeout;f.src=e;for(h in i)f.setAttribute(h,i[h]);n=c?a:n||o,f.onreadystatechange=f.onload=function(){!u&&s(f.readyState)&&(u=1,n(),f.onload=f.onreadystatechange=null)},p(function(){u||(u=1,n(1))},r),l?f.onload():m.parentNode.insertBefore(f,m)},e.yepnope.injectCss=function(e,n,i,r,s,l){var c,r=t.createElement("link"),n=l?a:n||o;r.href=e,r.rel="stylesheet",r.type="text/css";for(c in i)r.setAttribute(c,i[c]);s||(m.parentNode.insertBefore(r,m),p(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},function(e){"use strict";function t(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function n(e,t){var n=i(e,t)?o:r;n(e,t)}var i,r,o;"classList"in document.documentElement?(i=function(e,t){return e.classList.contains(t)},r=function(e,t){e.classList.add(t)},o=function(e,t){e.classList.remove(t)}):(i=function(e,n){return t(n).test(e.className)},r=function(e,t){i(e,t)||(e.className=e.className+" "+t)},o=function(e,n){e.className=e.className.replace(t(n)," ")});var s={hasClass:i,addClass:r,removeClass:o,toggleClass:n,has:i,add:r,remove:o,toggle:n};"function"==typeof define&&define.amd?define(s):e.classie=s}(window),function(){function e(){t()}function t(){o.addEventListener("click",n),s&&s.addEventListener("click",n),r.addEventListener("click",function(e){var t=e.target;a&&t!==o&&n()})}function n(){a?classie.remove(i,"show-menu"):classie.add(i,"show-menu"),a=!a}var i=document.body,r=document.getElementById("content"),o=document.getElementById("open-button"),s=document.getElementById("close-button"),a=!1;e()}(),es_init(),$(function(){$(".s_edit").click(function(){if($(this).hasClass("fa-pencil")){$(this).removeClass("fa-pencil"),$(this).addClass("fa-save");var e=$(this).closest(".portlet").children("h3")[0],t=e.innerHTML;$(e).replaceWith("<input type='edit' value='"+t+"'>")}else{$(this).removeClass("fa-save"),$(this).addClass("fa-pencil");var e=$(this).closest(".portlet").children("input")[0],t=$(e).val();$(e).replaceWith('<h3 class="portlet-content stock_name">'+t+"</h3>")}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,i){var r,o,s,a=t.nodeName.toLowerCase();return"area"===a?(r=t.parentNode,o=r.name,t.href&&o&&"map"===r.nodeName.toLowerCase()?(s=e("img[usemap='#"+o+"']")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return i&&"static"===t.css("position")?!1:r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(n){return t(n,!isNaN(e.attr(n,"tabindex")))},tabbable:function(n){var i=e.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&t(n,!r)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function i(t,n,i,o){return e.each(r,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?s["inner"+n].call(this):this.each(function(){e(this).css(o,i(this,t)+"px")})},e.fn["outer"+n]=function(t,r){return"number"!=typeof t?s["outer"+n].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,r)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,i,r=e(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var r,o=e.ui[t].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;o.length>r;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}};var i=0,r=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=e._data(r,"events"),i&&i.remove&&e(r).triggerHandler("remove")}catch(s){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,s,a,l={},c=t.split(".")[0];return t=t.split(".")[1],r=c+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][r.toLowerCase()]=function(t){return!!e.data(t,r)},e[c]=e[c]||{},o=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(l[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(l[t]=i)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:r}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var n,i,o=r.call(arguments,1),s=0,a=o.length;a>s;s++)for(n in o[s])i=o[s][n],o[s].hasOwnProperty(n)&&void 0!==i&&(t[n]=e.isPlainObject(i)?e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=r.call(arguments,1),l=this;return o=!s&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,this.each(s?function(){var n,r=e.data(this,i);return"instance"===o?(l=r,!1):r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,a),n!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}:function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new n(o,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;i.length-1>o;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,function(i,s){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?r.delegate(u,c,a):n.bind(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(n).undelegate(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,i){var r,o,s=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:t;r=r||{},"number"==typeof r&&(r={duration:r}),s=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&e.effects&&e.effects.effect[a]?i[t](r):a!==t&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}}),e.widget;var o=!1;e(document).mouseup(function(){o=!1}),e.widget("ui.mouse",{version:"1.11.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,r="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return i&&!r&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),o=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&t+n>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,o.widgetName+"-item")===o?(i=e(this),!1):void 0}),e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target)),i&&(!this.options.handle||n||(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(r=!0)}),r))?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(t,n,i){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed)),t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!e.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||i+c>a&&l>i+c,d="y"===this.options.axis||t+u>o&&s>t+u,f=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:t+this.helperProportions.width/2>o&&s>n-this.helperProportions.width/2&&i+this.helperProportions.height/2>a&&l>r-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();
  return i?this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,r,o,s,a=[],l=[],c=this._connectWith();if(c&&t)for(i=c.length-1;i>=0;i--)for(o=e(c[i]),r=o.length-1;r>=0;r--)s=e.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;t.length>n;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,c,u=this.items,h=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=e(d[n]),i=r.length-1;i>=0;i--)o=e.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=h.length-1;n>=0;n--)for(s=h[n][1],a=h[n][0],i=0,c=a.length;c>i;i++)l=e(a[i]),l.data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var n,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),r=e("<"+i+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===i?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(r)}):"img"===i&&r.attr("src",t.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(e,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n,i,r,o,s,a,l,c,u,h,d=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&e.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(r=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),s=u?"left":"top",a=u?"width":"height",h=u?"clientX":"clientY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,t[h]-l>this.items[i][a]/2&&(c=!0),r>Math.abs(t[h]-l)&&(r=Math.abs(t[h]-l),o=this.items[i],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[f].element,!0),this._trigger("change",t,this._uiHash()),this.containers[f]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===r.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===r.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(t=e(r.containment)[0],n=e(r.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(t){var n,i,r=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;r.length>i;i++)r[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}),$(".column").sortable({connectWith:".column",handle:".portlet-content"}),$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"),$(".column2").sortable({connectWith:".column2",handle:".portlet-content",placeholder:"portlet-placeholder ui-corner-all"}),$("#sb").each(function(){var e=$(this),t=document.getElementById("stock_results");e.data("oldVal",e.val()),e.bind("propertychange keyup input paste",function(){e.data("oldVal")!=e.val()&&(e.data("oldVal",e.val()),$.getJSON("/stocks.json",{q:e.val()},function(e){t.innerHTML="";for(var n=e.length-1;n>=0;n--){var i=e[n].Symbol+" ("+e[n].Name+" - "+e[n].Exchange+")",r=document.createElement("P"),o=document.createTextNode(i);r.appendChild(o),t.appendChild(r)}}))})});var today=new Date,day=today.getDate(),month=today.getMonth();month+=1;var year=today.getFullYear();switch(month){case 1:month="January";break;case 2:month="February";break;case 3:month="March";break;case 4:month="April";break;case 5:month="May";break;case 6:month="June";break;case 7:month="July";break;case 8:month="August";break;case 9:month="September";break;case 10:month="October";break;case 11:month="November";break;case 12:month="December"}document.getElementById("month").innerHTML=month,document.getElementById("day").innerHTML=day,document.getElementById("year").innerHTML=year,function(){}.call(this),$(function(){$("#color_bg").colorpicker({format:"hex",color:"#"+data.bg}),$("#color_fg").colorpicker({format:"hex",color:"#"+data.fg})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,i){var r,o,s,a=t.nodeName.toLowerCase();return"area"===a?(r=t.parentNode,o=r.name,t.href&&o&&"map"===r.nodeName.toLowerCase()?(s=e("img[usemap='#"+o+"']")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return i&&"static"===t.css("position")?!1:r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(n){return t(n,!isNaN(e.attr(n,"tabindex")))},tabbable:function(n){var i=e.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&t(n,!r)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function i(t,n,i,o){return e.each(r,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?s["inner"+n].call(this):this.each(function(){e(this).css(o,i(this,t)+"px")})},e.fn["outer"+n]=function(t,r){return"number"!=typeof t?s["outer"+n].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,r)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,i,r=e(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var r,o=e.ui[t].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;o.length>r;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}};var i=0,r=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=e._data(r,"events"),i&&i.remove&&e(r).triggerHandler("remove")}catch(s){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,s,a,l={},c=t.split(".")[0];return t=t.split(".")[1],r=c+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][r.toLowerCase()]=function(t){return!!e.data(t,r)},e[c]=e[c]||{},o=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(l[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(l[t]=i)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:r}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var n,i,o=r.call(arguments,1),s=0,a=o.length;a>s;s++)for(n in o[s])i=o[s][n],o[s].hasOwnProperty(n)&&void 0!==i&&(t[n]=e.isPlainObject(i)?e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=r.call(arguments,1),l=this;return o=!s&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,this.each(s?function(){var n,r=e.data(this,i);return"instance"===o?(l=r,!1):r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,a),n!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}:function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new n(o,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;i.length-1>o;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,function(i,s){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?r.delegate(u,c,a):n.bind(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(n).undelegate(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,i){var r,o,s=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:t;r=r||{},"number"==typeof r&&(r={duration:r}),s=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&e.effects&&e.effects.effect[a]?i[t](r):a!==t&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}}),e.widget;var o=!1;e(document).mouseup(function(){o=!1}),e.widget("ui.mouse",{version:"1.11.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,r="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return i&&!r&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),o=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&t+n>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,o.widgetName+"-item")===o?(i=e(this),!1):void 0}),e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target)),i&&(!this.options.handle||n||(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(r=!0)}),r))?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(t,n,i){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,this._uiHash(this));
  return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed)),t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!e.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||i+c>a&&l>i+c,d="y"===this.options.axis||t+u>o&&s>t+u,f=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:t+this.helperProportions.width/2>o&&s>n-this.helperProportions.width/2&&i+this.helperProportions.height/2>a&&l>r-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,r,o,s,a=[],l=[],c=this._connectWith();if(c&&t)for(i=c.length-1;i>=0;i--)for(o=e(c[i]),r=o.length-1;r>=0;r--)s=e.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;t.length>n;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,c,u=this.items,h=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=e(d[n]),i=r.length-1;i>=0;i--)o=e.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=h.length-1;n>=0;n--)for(s=h[n][1],a=h[n][0],i=0,c=a.length;c>i;i++)l=e(a[i]),l.data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var n,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),r=e("<"+i+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===i?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(r)}):"img"===i&&r.attr("src",t.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(e,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n,i,r,o,s,a,l,c,u,h,d=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&e.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(r=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),s=u?"left":"top",a=u?"width":"height",h=u?"clientX":"clientY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,t[h]-l>this.items[i][a]/2&&(c=!0),r>Math.abs(t[h]-l)&&(r=Math.abs(t[h]-l),o=this.items[i],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[f].element,!0),this._trigger("change",t,this._uiHash()),this.containers[f]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===r.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===r.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(t=e(r.containment)[0],n=e(r.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(t){var n,i,r=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;r.length>i;i++)r[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}),function(){function e(){t()}function t(){o.addEventListener("click",n),s&&s.addEventListener("click",n),r.addEventListener("click",function(e){var t=e.target;a&&t!==o&&n()})}function n(){a?classie.remove(i,"show-menu"):classie.add(i,"show-menu"),a=!a}var i=document.body,r=document.getElementById("content"),o=document.getElementById("open-button"),s=document.getElementById("close-button"),a=!1;e()}(),es_init(),window.Modernizr=function(e,t,n){function i(e){y.cssText=e}function r(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var r=e[i];if(!o(r,"-")&&y[r]!==n)return"pfx"==t?r:!0}return!1}function a(e,t,i){for(var o in e){var s=t[e[o]];if(s!==n)return i===!1?e[o]:r(s,"function")?s.bind(i||t):s}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+w.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?s(o,t):(o=(e+" "+x.join(i+" ")+i).split(" "),a(o,t,n))}var c,u,h,d="2.7.1",f={},p=!0,m=t.documentElement,g="modernizr",v=t.createElement(g),y=v.style,b=({}.toString,"Webkit Moz O ms"),w=b.split(" "),x=b.toLowerCase().split(" "),k={},_=[],C=_.slice,T={}.hasOwnProperty;h=r(T,"undefined")||r(T.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(e,t){return T.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=C.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=t.prototype;var o=new r,s=t.apply(o,n.concat(C.call(arguments)));return Object(s)===s?s:o}return t.apply(e,n.concat(C.call(arguments)))};return i}),k.csstransitions=function(){return l("transition")};for(var S in k)h(k,S)&&(u=S.toLowerCase(),f[u]=k[S](),_.push((f[u]?"":"no-")+u));return f.addTest=function(e,t){if("object"==typeof e)for(var i in e)h(e,i)&&f.addTest(i,e[i]);else{if(e=e.toLowerCase(),f[e]!==n)return f;t="function"==typeof t?t():t,"undefined"!=typeof p&&p&&(m.className+=" "+(t?"":"no-")+e),f[e]=t}return f},i(""),v=c=null,function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=v[e[m]];return t||(t={},g++,e[m]=g,v[g]=t),t}function o(e,n,i){if(n||(n=t),u)return n.createElement(e);i||(i=r(n));var o;return o=i.cache[e]?i.cache[e].cloneNode():p.test(e)?(i.cache[e]=i.createElem(e)).cloneNode():i.createElem(e),!o.canHaveChildren||f.test(e)||o.tagUrn?o:i.frag.appendChild(o)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||r(e);for(var o=n.frag.cloneNode(),s=0,a=i(),l=a.length;l>s;s++)o.createElement(a[s]);return o}function a(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?o(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function l(e){e||(e=t);var i=r(e);return y.shivCSS&&!c&&!i.hasCSS&&(i.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||a(e,i),e}var c,u,h="3.7.0",d=e.html5||{},f=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,m="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",c="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){c=!0,u=!0}}();var y={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:h,shivCSS:d.shivCSS!==!1,supportsUnknownElements:u,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:l,createElement:o,createDocumentFragment:s};e.html5=y,l(t)}(this,t),f._version=d,f._domPrefixes=x,f._cssomPrefixes=w,f.testProp=function(e){return s([e])},f.testAllProps=l,f.prefixed=function(e,t,n){return t?l(e,t,n):l(e,"pfx")},m.className=m.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+_.join(" "):""),f}(this,this.document),function(e,t,n){function i(e){return"[object Function]"==g.call(e)}function r(e){return"string"==typeof e}function o(){}function s(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function a(){var e=v.shift();y=1,e?e.t?p(function(){("c"==e.t?d.injectCss:d.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),a()):y=0}function l(e,n,i,r,o,l,c){function u(t){if(!f&&s(h.readyState)&&(b.r=f=1,!y&&a(),h.onload=h.onreadystatechange=null,t)){"img"!=e&&p(function(){x.removeChild(h)},50);for(var i in S[n])S[n].hasOwnProperty(i)&&S[n][i].onload()}}var c=c||d.errorTimeout,h=t.createElement(e),f=0,g=0,b={t:i,s:n,e:o,a:l,x:c};1===S[n]&&(g=1,S[n]=[]),"object"==e?h.data=n:(h.src=n,h.type=e),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){u.call(this,g)},v.splice(r,0,b),"img"!=e&&(g||2===S[n]?(x.insertBefore(h,w?null:m),p(u,c)):S[n].push(h))}function c(e,t,n,i,o){return y=0,t=t||"j",r(e)?l("c"==t?_:k,e,t,this.i++,n,i,o):(v.splice(this.i++,0,e),1==v.length&&a()),this}function u(){var e=d;return e.loader={load:c,i:0},e}var h,d,f=t.documentElement,p=e.setTimeout,m=t.getElementsByTagName("script")[0],g={}.toString,v=[],y=0,b="MozAppearance"in f.style,w=b&&!!t.createRange().compareNode,x=w?f:m.parentNode,f=e.opera&&"[object Opera]"==g.call(e.opera),f=!!t.attachEvent&&!f,k=b?"object":f?"script":"img",_=f?"script":k,C=Array.isArray||function(e){return"[object Array]"==g.call(e)},T=[],S={},E={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};d=function(e){function t(e){var t,n,i,e=e.split("!"),r=T.length,o=e.pop(),s=e.length,o={url:o,origUrl:o,prefixes:e};for(n=0;s>n;n++)i=e[n].split("="),(t=E[i.shift()])&&(o=t(o,i));for(n=0;r>n;n++)o=T[n](o);return o}function s(e,r,o,s,a){var l=t(e),c=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(r&&(r=i(r)?r:r[e]||r[s]||r[e.split("/").pop().split("?")[0]]),l.instead?l.instead(e,r,o,s,a):(S[l.url]?l.noexec=!0:S[l.url]=1,o.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":n,l.noexec,l.attrs,l.timeout),(i(r)||i(c))&&o.load(function(){u(),r&&r(l.origUrl,a,s),c&&c(l.origUrl,a,s),S[l.url]=2})))}function a(e,t){function n(e,n){if(e){if(r(e))n||(h=function(){var e=[].slice.call(arguments);d.apply(this,e),f()}),s(e,h,t,0,c);else if(Object(e)===e)for(l in a=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!n&&!--a&&(i(h)?h=function(){var e=[].slice.call(arguments);d.apply(this,e),f()}:h[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),f()}}(d[l])),s(e[l],h,t,l,c))}else!n&&f()}var a,l,c=!!e.test,u=e.load||e.both,h=e.callback||o,d=h,f=e.complete||o;n(c?e.yep:e.nope,!!u),u&&n(u)}var l,c,h=this.yepnope.loader;if(r(e))s(e,0,h,0);else if(C(e))for(l=0;l<e.length;l++)c=e[l],r(c)?s(c,0,h,0):C(c)?d(c):Object(c)===c&&a(c,h);else Object(e)===e&&a(e,h)},d.addPrefix=function(e,t){E[e]=t},d.addFilter=function(e){T.push(e)},d.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",h=function(){t.removeEventListener("DOMContentLoaded",h,0),t.readyState="complete"},0)),e.yepnope=u(),e.yepnope.executeStack=a,e.yepnope.injectJs=function(e,n,i,r,l,c){var u,h,f=t.createElement("script"),r=r||d.errorTimeout;f.src=e;for(h in i)f.setAttribute(h,i[h]);n=c?a:n||o,f.onreadystatechange=f.onload=function(){!u&&s(f.readyState)&&(u=1,n(),f.onload=f.onreadystatechange=null)},p(function(){u||(u=1,n(1))},r),l?f.onload():m.parentNode.insertBefore(f,m)},e.yepnope.injectCss=function(e,n,i,r,s,l){var c,r=t.createElement("link"),n=l?a:n||o;r.href=e,r.rel="stylesheet",r.type="text/css";for(c in i)r.setAttribute(c,i[c]);s||(m.parentNode.insertBefore(r,m),p(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},$(function(){$(".s_edit").click(function(){if($(this).hasClass("fa-pencil")){$(this).removeClass("fa-pencil"),$(this).addClass("fa-save");var e=$(this).closest(".portlet").children("h3")[0],t=e.innerHTML;$(e).replaceWith("<input type='edit' value='"+t+"'>")}else{$(this).removeClass("fa-save"),$(this).addClass("fa-pencil");var e=$(this).closest(".portlet").children("input")[0],t=$(e).val();$(e).replaceWith('<h3 class="portlet-content stock_name">'+t+"</h3>")}})}),getNews();var triggerBttn=document.getElementById("trigger-overlay"),overlay=document.querySelector("#a"),closeBttn=overlay.querySelector("button.overlay-close");transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},transEndEventName=transEndEventNames[Modernizr.prefixed("transition")],support={transitions:Modernizr.csstransitions},closeBttn.addEventListener("click",toggleOverlay),$(".column").sortable({connectWith:".column",handle:".portlet-content"}),$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"),$(".column2").sortable({connectWith:".column2",handle:".portlet-content",placeholder:"portlet-placeholder ui-corner-all"}),$("#sb").each(function(){var e=$(this),t=document.getElementById("stock_results");e.data("oldVal",e.val()),e.bind("propertychange keyup input paste",function(){e.data("oldVal")!=e.val()&&(e.data("oldVal",e.val()),$.getJSON("/stocks.json",{q:e.val()},function(e){t.innerHTML="";for(var n=e.length-1;n>=0;n--){var i=e[n].Symbol+" ("+e[n].Name+" - "+e[n].Exchange+")",r=document.createElement("P"),o=document.createTextNode(i);r.appendChild(o),t.appendChild(r)}}))})}),updateClock(),function(e,t,n,i,r,o,s){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src=i,s.parentNode.insertBefore(o,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-41191210-5","auto"),ga("send","pageview"),!function(e,t,n,i,r,o,s){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src=i,s.parentNode.insertBefore(o,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-41191210-5","auto"),ga("send","pageview");