[-]
[+]
|
Changed |
Snorby.changes
|
|
[-]
[+]
|
Changed |
Snorby.spec
^
|
|
[-]
[+]
|
Deleted |
Snorby-2.2.2.tar.bz2/config/newrelic.yml
^
|
@@ -1,231 +0,0 @@
-#
-# This file configures the New Relic RPM Agent. New Relic RPM monitors
-# Rails and Java applications with deep visibility and low overhead. For more
-# information, visit www.newrelic.com.
-#
-# Generated October 25, 2010
-#
-# This configuration file is custom generated for Lookycode
-
-# Here are the settings that are common to all environments:
-common: &default_settings
- # ============================== LICENSE KEY ===============================
-
- # You must specify the license key associated with your New Relic
- # account. This key binds your Agent's data to your account in the
- # New Relic RPM service.
- license_key: 'e50f306a80aa89afe3af33101b1d6b7b93b061ff'
-
- # Agent Enabled (Rails Only)
- # Use this setting to force the agent to run or not run.
- # Default is 'auto' which means the agent will install and run only
- # if a valid dispatcher such as Mongrel is running. This prevents
- # it from running with Rake or the console. Set to false to
- # completely turn the agent off regardless of the other settings.
- # Valid values are true, false and auto.
- # agent_enabled: auto
-
- # Application Name
- # Set this to be the name of your application as you'd like it show
- # up in RPM. RPM will then auto-map instances of your application
- # into a RPM "application" on your home dashboard page. If you want
- # to map this instance into multiple apps, like "AJAX Requests" and
- # "All UI" then specify a semicolon separated list of up to three
- # distinct names. If you comment this out, it defaults to the
- # capitalized RAILS_ENV (i.e., Production, Staging, etc)
- app_name: Snorby
-
- # When "true", the agent collects performance data about your
- # application and reports this data to the NewRelic RPM service at
- # newrelic.com. This global switch is normally overridden for each
- # environment below. (formerly called 'enabled')
- monitor_mode: true
-
- # Developer mode should be off in every environment but
- # development as it has very high overhead in memory.
- developer_mode: true
-
- # The newrelic agent generates its own log file to keep its logging
- # information separate from that of your application. Specify its
- # log level here.
- log_level: info
-
- # The newrelic agent communicates with the RPM service via http by
- # default. If you want to communicate via https to increase
- # security, then turn on SSL by setting this value to true. Note,
- # this will result in increased CPU overhead to perform the
- # encryption involved in SSL communication, but this work is done
- # asynchronously to the threads that process your application code,
- # so it should not impact response times.
- ssl: false
-
- # EXPERIMENTAL: enable verification of the SSL certificate sent by
- # the server. This setting has no effect unless SSL is enabled
- # above. This may block your application. Only enable it if the data
- # you send us needs end-to-end verified certificates.
- #
- # This means we cannot cache the DNS lookup, so each request to the
- # RPM service will perform a lookup. It also means that we cannot
- # use a non-blocking lookup, so in a worst case, if you have DNS
- # problems, your app may block indefinitely.
- # verify_certificate: true
-
- # Set your application's Apdex threshold value with the 'apdex_t'
- # setting, in seconds. The apdex_t value determines the buckets used
- # to compute your overall Apdex score.
- # Requests that take less than apdex_t seconds to process will be
- # classified as Satisfying transactions; more than apdex_t seconds
- # as Tolerating transactions; and more than four times the apdex_t
- # value as Frustrating transactions.
- # For more about the Apdex standard, see
- # http://support.newrelic.com/faqs/general/apdex
-
- apdex_t: 0.5
-
- # Proxy settings for connecting to the RPM server.
- #
- # If a proxy is used, the host setting is required. Other settings
- # are optional. Default port is 8080.
- #
- # proxy_host: hostname
- # proxy_port: 8080
- # proxy_user:
- # proxy_pass:
-
-
- # Tells transaction tracer and error collector (when enabled)
- # whether or not to capture HTTP params. When true, frameworks can
- # exclude HTTP parameters from being captured.
- # Rails: the RoR filter_parameter_logging excludes parameters
- # Java: create a config setting called "ignored_params" and set it to
- # a comma separated list of HTTP parameter names.
- # ex: ignored_params: credit_card, ssn, password
- capture_params: false
-
-
- # Transaction tracer captures deep information about slow
- # transactions and sends this to the RPM service once a
- # minute. Included in the transaction is the exact call sequence of
- # the transactions including any SQL statements issued.
- transaction_tracer:
-
- # Transaction tracer is enabled by default. Set this to false to
- # turn it off. This feature is only available at the Silver and
- # above product levels.
- enabled: true
-
- # Threshold in seconds for when to collect a transaction
- # trace. When the response time of a controller action exceeds
- # this threshold, a transaction trace will be recorded and sent to
- # RPM. Valid values are any float value, or (default) "apdex_f",
- # which will use the threshold for an dissatisfying Apdex
- # controller action - four times the Apdex T value.
- transaction_threshold: apdex_f
-
- # When transaction tracer is on, SQL statements can optionally be
- # recorded. The recorder has three modes, "off" which sends no
- # SQL, "raw" which sends the SQL statement in its original form,
- # and "obfuscated", which strips out numeric and string literals
- record_sql: obfuscated
-
- # Threshold in seconds for when to collect stack trace for a SQL
- # call. In other words, when SQL statements exceed this threshold,
- # then capture and send to RPM the current stack trace. This is
- # helpful for pinpointing where long SQL calls originate from
- stack_trace_threshold: 0.500
-
- # Determines whether the agent will capture query plans for slow
- # SQL queries. Only supported in mysql and postgres. Should be
- # set to false when using other adapters.
- # explain_enabled: true
-
- # Threshold for query execution time below which query plans will not
- # not be captured. Relevant only when `explain_enabled` is true.
- # explain_threshold: 0.5
-
- # Error collector captures information about uncaught exceptions and
- # sends them to RPM for viewing
- error_collector:
-
- # Error collector is enabled by default. Set this to false to turn
- # it off. This feature is only available at the Silver and above
- # product levels
- enabled: true
-
- # Rails Only - tells error collector whether or not to capture a
- # source snippet around the place of the error when errors are View
- # related.
- capture_source: true
-
- # To stop specific errors from reporting to RPM, set this property
- # to comma separated values. Default is to ignore routing errors
- # which are how 404's get triggered.
- #
- ignore_errors: ActionController::RoutingError
-
- # (Advanced) Uncomment this to ensure the cpu and memory samplers
- # won't run. Useful when you are using the agent to monitor an
- # external resource
- # disable_samplers: true
-
- # If you aren't interested in visibility in these areas, you can
- # disable the instrumentation to reduce overhead.
- #
- # disable_view_instrumentation: true
- # disable_activerecord_instrumentation: true
- # disable_memcache_instrumentation: true
- # disable_dj: true
-
- # Certain types of instrumentation such as GC stats will not work if
- # you are running multi-threaded. Please let us know.
- # multi_threaded = false
-
-# Application Environments
-# ------------------------------------------
-# Environment specific settings are in this section.
-# For Rails applications, RAILS_ENV is used to determine the environment
-# For Java applications, pass -Dnewrelic.environment <environment> to set
-# the environment
-
-# NOTE if your application has other named environments, you should
-# provide newrelic configuration settings for these environments here.
-
-development:
- <<: *default_settings
- # Turn off communication to RPM service in development mode (also
- # 'enabled').
- # NOTE: for initial evaluation purposes, you may want to temporarily
- # turn the agent on in development mode.
- monitor_mode: true
-
- # Rails Only - when running in Developer Mode, the New Relic Agent will
- # present performance information on the last 100 transactions you have
- # executed since starting the mongrel.
- # NOTE: There is substantial overhead when running in developer mode.
- # Do not use for production or load testing.
- developer_mode: true
-
- # Enable textmate links
- # textmate: true
-
-test:
- <<: *default_settings
- # It almost never makes sense to turn on the agent when running
- # unit, functional or integration tests or the like.
- monitor_mode: false
-
-# Turn on the agent in production for 24x7 monitoring. NewRelic
-# testing shows an average performance impact of < 5 ms per
-# transaction, you you can leave this on all the time without
-# incurring any user-visible performance degradation.
-production:
- <<: *default_settings
- monitor_mode: true
-
-# Many applications have a staging environment which behaves
-# identically to production. Support for that environment is provided
-# here. By default, the staging environment has the agent turned on.
-staging:
- <<: *default_settings
- monitor_mode: true
- app_name: My Application (Staging)
|
[-]
[+]
|
Deleted |
Snorby-2.2.2.tar.bz2/public/javascripts/all.js
^
|
@@ -1,750 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
-
-
-/*!
- * jQuery UI 1.8.4
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI
- */
-(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.4",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,
-b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,
-CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable",
-"off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
-"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=
-parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c.style(this,h,d(this,f)+"px")})};c.fn["outer"+
-b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c.style(this,h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==
-b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}})(jQuery);
-(function(b,j){var k=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return k.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);
-b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):
-this.each(function(){var g=b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});
-this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}b.each(d,function(f,
-h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=
-b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
-(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
-this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
-return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
-this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
-(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
-"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
-this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
-d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
-this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,
-b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
-a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
-0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
-this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment==
-"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&
-a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),
-10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
-this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
-f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+
-this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+
-Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-
-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=
-this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.4"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");
-if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;
-c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
-1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;
-this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=
-this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=
-d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;
-if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!=
-"HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-
-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
-width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&
-o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=
-p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&
-(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
-10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
-(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
-a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
-this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
-this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
-d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
-a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.4"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
-switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
-i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
-"none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
-a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
-d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
-(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
-_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
-top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
-this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
-nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
-String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
-this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
-if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
-d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
-this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
-this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
-b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
-f={width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
-b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=
-a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,
-k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),
-c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=
-this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
-a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,
-arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,
-{version:"1.8.4"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
-function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=
-(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=
-false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-
-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",
-b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top",
-"Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,
-f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=
-a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+
-a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&
-e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",
-height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=
-d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
-(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
-selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
-c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
-c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
-this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
-a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
-!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
-e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.4"})})(jQuery);
-(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
-this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,
-arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
-c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,
-{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
-if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
-a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
-if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
-this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
-b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
-"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,
-c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==
-document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",
-null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):
-d(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||
-"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+
-this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?
-2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},
-_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=
-this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=
-this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");
-if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=
-0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=
-this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},
-update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=
-null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));
-this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,
-null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||
-d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[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")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a==
-"string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==
-"absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
-"relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else 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 a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),
-10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
-this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=
-this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+
-this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?
-g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
-e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==
-f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",
-f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",
-g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=
-0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});
-d.extend(d.ui.sortable,{version:"1.8.4"})})(jQuery);
-jQuery.effects||function(f,j){function l(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
-16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
-a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function o(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in s||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function t(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
-a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=r(b.elem,a);b.end=l(b.end);b.colorInit=
-true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var m={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,
-183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,
-165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v,
-i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
-f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.4",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
-null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
-var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});
-c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
-typeof c=="number"||f.fx.speeds[c])return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c])return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||typeof c=="boolean"||f.isFunction(c))return this.__toggle.apply(this,
-arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,
-a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+
-b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,
-10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*
-a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,
-a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,
-a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+
-b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
-(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","left"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,g);b.effects.removeWrapper(a);
-c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
-(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","left"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
-3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
-b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
-(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","left","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,c/2)}var h={};h[g.size]=
-f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
-(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","left","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e=="show"?1:
-0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
-(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
-0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
-e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
-(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
-(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","left"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],10)/100*
-f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
-(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
-this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
-(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
-a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
-(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
-b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
-1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","left","width","height","overflow","opacity"],g=["position","top","left","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=c.effects.setMode(a,
-b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};if(m=="box"||m=="both"){if(d.from.y!=
-d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);a.css("overflow","hidden").css(a.from);
-if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);child.to=c.effects.setTransition(child,
-f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,n?e:g);c.effects.removeWrapper(a);b.callback&&
-b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
-(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","left"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=(h=="pos"?"-=":"+=")+
-e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
-(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","left"],e=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(e=="show")a.css(f,b=="pos"?-g:g);var i={};i[f]=(e=="show"?b=="pos"?
-"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
-(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
-b.dequeue()})})}})(jQuery);
-(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
-a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
-if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var f=d.closest(".ui-accordion-header");a.active=f.length?f:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",function(g){return a._keydown(g)}).next().attr("role",
-"tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(g){a._clickHandler.call(a,g,this);g.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);
-this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
-this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
-b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,f=this.headers.index(a.target),g=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:g=this.headers[(f+1)%d];break;case b.LEFT:case b.UP:g=this.headers[(f-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
-a.preventDefault()}if(g){c(a.target).attr("tabIndex",-1);c(g).attr("tabIndex",0);g.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
-c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
-if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);
-a.next().addClass("ui-accordion-content-active")}h=a.next();f=this.active.next();g={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):h,oldContent:f};d=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(h,f,g,b,d)}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
-this.active.next().addClass("ui-accordion-content-active");var f=this.active.next(),g={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:f},h=this.active=c([]);this._toggle(h,f,g)}},_toggle:function(a,b,d,f,g){var h=this,e=h.options;h.toShow=a;h.toHide=b;h.data=d;var j=function(){if(h)return h._completed.apply(h,arguments)};h._trigger("changestart",null,h.data);h.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&f?{toShow:c([]),toHide:b,complete:j,
-down:g,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:g,autoHeight:e.autoHeight||e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;f=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!f[k]&&!c.easing[k])k="slide";f[k]||(f[k]=function(l){this.slide(l,{easing:k,duration:i||700})});
-f[k](d)}else{if(e.collapsible&&f)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.4",animations:{slide:function(a,
-b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),f=0,g={},h={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){h[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);g[i]={value:j[1],
-unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(h,{step:function(j,i){if(i.prop=="height")f=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=f*g[i.prop].value+g[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide",
-paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
-(function(e){e.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var a=this,b=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!a.options.disabled){var d=e.ui.keyCode;switch(c.keyCode){case d.PAGE_UP:a._move("previousPage",
-c);break;case d.PAGE_DOWN:a._move("nextPage",c);break;case d.UP:a._move("previous",c);c.preventDefault();break;case d.DOWN:a._move("next",c);c.preventDefault();break;case d.ENTER:case d.NUMPAD_ENTER:a.menu.element.is(":visible")&&c.preventDefault();case d.TAB:if(!a.menu.active)return;a.menu.select(c);break;case d.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);
-break}}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",b)[0]).mousedown(function(c){var d=a.menu.element[0];
-c.target===d&&setTimeout(function(){e(document).one("mousedown",function(f){f.target!==a.element[0]&&f.target!==d&&!e.ui.contains(d,f.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,d){d=d.item.data("item.autocomplete");false!==a._trigger("focus",null,{item:d})&&/^key/.test(c.originalEvent.type)&&a.element.val(d.value)},selected:function(c,d){d=d.item.data("item.autocomplete");var f=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();
-a.previous=f}false!==a._trigger("select",c,{item:d})&&a.element.val(d.value);a.close(c);a.selectedItem=d},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();
-e.Widget.prototype.destroy.call(this)},_setOption:function(a,b){e.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(e(b||"body",this.element[0].ownerDocument)[0])},_initSource:function(){var a,b;if(e.isArray(this.options.source)){a=this.options.source;this.source=function(c,d){d(e.ui.autocomplete.filter(a,c.term))}}else if(typeof this.options.source==="string"){b=this.options.source;this.source=function(c,d){e.getJSON(b,
-c,d)}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search")!==false)return this._search(a)},_search:function(a){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:a},this.response)},_response:function(a){if(a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();this.element.removeClass("ui-autocomplete-loading")},
-close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",a);this.menu.element.hide();this.menu.deactivate()}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return e.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return e.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=
-this.menu.element.empty().zIndex(this.element.zIndex()+1),c;this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(e.extend({of:this.element},this.options.position));a=b.width("").outerWidth();c=this.element.outerWidth();b.outerWidth(Math.max(a,c))},_renderMenu:function(a,b){var c=this;e.each(b,function(d,f){c._renderItem(a,f)})},_renderItem:function(a,b){return e("<li></li>").data("item.autocomplete",b).append(e("<a></a>").text(b.label)).appendTo(a)},_move:function(a,
-b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});e.extend(e.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,b){var c=new RegExp(e.ui.autocomplete.escapeRegex(b),"i");return e.grep(a,function(d){return c.test(d.label||d.value||
-d)})}})})(jQuery);
-(function(e){e.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(b){if(e(b.target).closest(".ui-menu-item a").length){b.preventDefault();a.select(b)}});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(b){a.activate(b,
-e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.attr("scrollTop"),f=this.element.height();if(c<0)this.element.attr("scrollTop",d+c);else c>f&&this.element.attr("scrollTop",d+c-f+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
-this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);a.length?this.activate(c,a):this.activate(c,this.element.children(b))}else this.activate(c,
-this.element.children(b))},nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(":first"));else{var b=this.active.offset().top,c=this.element.height(),d=this.element.children("li").filter(function(){var f=e(this).offset().top-b-c+e(this).height();return f<10&&f>-10});d.length||(d=this.element.children(":last"));this.activate(a,d)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||
-this.first())this.activate(a,this.element.children(":last"));else{var b=this.active.offset().top,c=this.element.height();result=this.element.children("li").filter(function(){var d=e(this).offset().top-b+c-e(this).height();return d<10&&d>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",
-a,{item:this.active})}})})(jQuery);
-(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,e=a([]);if(c)e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return e};a.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",i);this._determineButtonType();
-this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",e="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",
-function(){c.disabled||a(this).removeClass(e)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",
-function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var f=b.element[0];h(f).not(f).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",
-function(f){if(c.disabled)return false;if(f.keyCode==a.ui.keyCode.SPACE||f.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(f){f.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?
-"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var b=this.element.is(":checked");b&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
-this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
-true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
-c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary;if(d.primary||d.secondary){b.addClass("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){b.addClass(e?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
-this.hasTitle||b.attr("title",c)}}else b.addClass("ui-button-text-only")}}});a.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
-destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
-(function(d,G){function L(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
-"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
-"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
-minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function E(a,b){d.extend(a,
-b);for(var c in b)if(b[c]==null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=
-f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
-_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&
-b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==
-""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,
-c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),
-true);this._updateDatepicker(b);this._updateAlternate(b)}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});b=b&&b.constructor==
-Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);
-d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},
-_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=
-d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;
-for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&
-this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&
-!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass,b.dpDiv).add(d("td."+d.datepicker._currentClass,b.dpDiv));c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();
-return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||
-a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,
-a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));
-var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||
-a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);
-d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&
-d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-i[0],top:-i[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,
-h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");
-this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");
-this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
-a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),
-k=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[b?"previousSibling":"nextSibling"];
-a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():
-"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&
-!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;
-b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=
-this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=
-d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,
-"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b==
-"object"?b.toString():b+"";if(b=="")return null;for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,k=c=-1,l=-1,u=-1,j=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"?4:p=="o"?
-3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++)if(b.substr(s,p[w].length)==p[w]){s+=p[w].length;return w+1}throw"Unknown name at position "+s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(j)if(a.charAt(z)=="'"&&!o("'"))j=false;else r();else switch(a.charAt(z)){case "d":l=m("d");break;case "D":n("D",f,h);break;
-case "o":u=m("o");break;case "m":k=m("m");break;case "M":k=n("M",i,g);break;case "y":c=m("y");break;case "@":var v=new Date(m("@"));c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case "!":v=new Date((m("!")-this._ticksTo1970)/1E4);c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case "'":if(o("'"))r();else j=true;break;default:r()}if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){k=1;l=u;do{e=this._getDaysInMonth(c,
-k-1);if(l<=e)break;k++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,k-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=k||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";
-var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=j+1<a.length&&a.charAt(j+1)==o)&&j++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},k=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b)for(var j=0;j<a.length;j++)if(u)if(a.charAt(j)=="'"&&!i("'"))u=false;else l+=a.charAt(j);
-else switch(a.charAt(j)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=k("D",b.getDay(),e,f);break;case "o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=k("M",b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(j)}return l},
-_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+="0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=
-a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,
-this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,k=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=u.exec(h);j;){switch(j[2]||"d"){case "d":case "D":g+=parseInt(j[1],
-10);break;case "w":case "W":g+=parseInt(j[1],10)*7;break;case "m":case "M":l+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break;case "y":case "Y":k+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break}j=u.exec(h)}return new Date(k,l,g)};if(b=(b=b==null?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):b)&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;
-a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||
-a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?
-new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),j=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=j&&n<j?j:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-k,1)),this._getFormatConfig(a));
-n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,
-g+k,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";k=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&
-a.currentDay?u:b;k=!h?k:this.formatDate(k,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
-y+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;k=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),w=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var N=
-"",D=0;D<i[1];D++){var J=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?
-f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
-A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,K=B&&!H||!F[0]||j&&q<j||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==J.getTime()&&g==a.selectedMonth&&
-a._keyEvent||M.getTime()==q.getTime()&&M.getTime()==J.getTime()?" "+this._dayOverClass:"")+(K?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(K?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?" ":K?'<span class="ui-state-default">'+q.getDate()+
-"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==J.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=x}I+=N}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
-"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='<div class="ui-datepicker-title">',o="";if(h||!k)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+
-a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l)j+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,
-i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)j+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";j+="</select>"}j+=this._get(a,"yearSuffix");if(u)j+=(h||!(k&&l)?" ":"")+o;j+="</div>";return j},_adjustInstDate:function(a,b,c){var e=
-a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,
-"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
-c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
-"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
-function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));
-return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);
-(function(c,j){c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");
-if(typeof this.originalTitle!=="string")this.originalTitle="";var a=this,b=a.options,d=b.title||a.originalTitle||" ",f=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(i){a.moveToTop(false,
-i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var e=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);
-return false}).appendTo(e);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",f).html(d).prependTo(e);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;e.find("*").add(e).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&
-g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");
-b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,f=d.options;if(f.modal&&!a||!f.stack&&!f.modal)return d._trigger("focus",b);if(f.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=
-f.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;d.next().length&&d.appendTo("body");a._size();a._position(b.position);d.show(b.show);
-a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(f){if(f.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),e=g.filter(":first");g=g.filter(":last");if(f.target===g[0]&&!f.shiftKey){e.focus(1);return false}else if(f.target===e[0]&&f.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._trigger("open");a._isOpen=true;return a}},_createButtons:function(a){var b=this,d=false,
-f=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(f);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(e,h){e=c('<button type="button"></button>').text(e).click(function(){h.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&e.button()});f.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(e){return{position:e.position,
-offset:e.offset}}var b=this,d=b.options,f=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",e,a(h))},drag:function(e,h){b._trigger("drag",e,a(h))},stop:function(e,h){d.position=[h.position.left-f.scrollLeft(),h.position.top-f.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);
-b._trigger("dragStop",e,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}a=a===j?this.options.resizable:a;var d=this,f=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:d._minHeight(),
-handles:a,start:function(e,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",e,b(h))},resize:function(e,h){d._trigger("resize",e,b(h))},stop:function(e,h){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();d._trigger("resizeStop",e,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,
-a.height)},_position:function(a){var b=[],d=[0,0],f;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,e){if(+b[g]===b[g]){d[g]=b[g];b[g]=e}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a);
-f||this.uiDialog.hide()},_setOption:function(a,b){var d=this,f=d.uiDialog,g=f.is(":data(resizable)"),e=false;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);e=true;break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":f.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case "draggable":b?
-d._makeDraggable():f.draggable("destroy");break;case "height":e=true;break;case "maxHeight":g&&f.resizable("option","maxHeight",b);e=true;break;case "maxWidth":g&&f.resizable("option","maxWidth",b);e=true;break;case "minHeight":g&&f.resizable("option","minHeight",b);e=true;break;case "minWidth":g&&f.resizable("option","minWidth",b);e=true;break;case "position":d._position(b);break;case "resizable":g&&!b&&f.resizable("destroy");g&&typeof b==="string"&&f.resizable("option","handles",b);!g&&b!==false&&
-d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break;case "width":e=true;break}c.Widget.prototype._setOption.apply(d,arguments);e&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-
-b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
-create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){return c(d.target).zIndex()>=c.ui.dialog.overlay.maxZ})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
-height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
-b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
-function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
-(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h=
-0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+=
-g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k,
-elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?
--b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position=
-"relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);
-(function(b,c){b.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
-this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=this.value();this.valueDiv.toggleClass("ui-corner-right",
-a===this.max).width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.4"})})(jQuery);
-(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");b.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
-this.range=d([]);if(b.range){if(b.range===true){this.range=d("<div></div>");if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(b.range==="min"||b.range==="max")this.range.addClass("ui-slider-range-"+b.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
-if(b.values&&b.values.length)for(;d(".ui-slider-handle",this.element).length<b.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();
-else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!a.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
-false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");h=a._start(c,f);if(h===false)return}break}i=a.options.step;h=a.options.values&&a.options.values.length?(g=a.values(f)):(g=a.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=a._valueMin();break;case d.ui.keyCode.END:g=a._valueMax();break;case d.ui.keyCode.PAGE_UP:g=a._trimAlignValue(h+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=a._trimAlignValue(h-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
-a._valueMax())return;g=a._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===a._valueMin())return;g=a._trimAlignValue(h-i);break}a._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(c,e);a._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
-this._mouseDestroy();return this},_mouseCapture:function(a){var b=this.options,c,e,f,h,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(b.range===true&&this.values(1)===b.min){g+=1;f=d(this.handles[g])}if(this._start(a,
-g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();b=f.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-f.width()/2,top:a.pageY-b.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b=
-this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b=
-this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);
-c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var e;if(this.options.values&&this.options.values.length){e=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>e||b===1&&c<e))c=e;if(c!==this.values(b)){e=this.values();e[b]=c;a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e});this.values(b?0:1);a!==false&&this.values(b,c,true)}}else if(c!==this.value()){a=this._trigger("slide",a,{handle:this.handles[b],value:c});
-a!==false&&this.value(c)}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=
-this._trimAlignValue(a);this._refreshValue();this._change(null,0)}return this._value()},values:function(a,b){var c,e,f;if(arguments.length>1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();
-else return this._values()},_setOption:function(a,b){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":if(b){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
-this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
-return b=this._trimAlignValue(b)}else{b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}},_trimAlignValue:function(a){if(a<this._valueMin())return this._valueMin();if(a>this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=a%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=
-this.options.range,b=this.options,c=this,e=!this._animateOff?b.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},b.animate);if(k===1)c.range[e?"animate":"css"]({width:f-
-g+"%"},{queue:false,duration:b.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},b.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:b.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},
-b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.4"})})(jQuery);
-(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(a,e){if(a=="selected")this.options.collapsible&&
-e==this.options.selected||this.select(e);else{this.options[a]=e;this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_ui:function(a,e){return{tab:a,panel:e,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var a=
-d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(a){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var b=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
-(q=d("base")[0])&&l===q.href)){j=f.hash;f.href=j}if(h.test(j))b.panels=b.panels.add(b._sanitizeSelector(j));else if(j!=="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=b._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(c.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(b.panels[g-1]||b.list);f.data("destroy.tabs",true)}b.panels=b.panels.add(f)}else c.disabled.push(g)});if(a){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
-this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(b._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
-this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return b.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
-if(c.selected>=0&&this.anchors.length){this.panels.eq(c.selected).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");b.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[c.selected],b.panels[c.selected]))});this.load(c.selected)}d(window).bind("unload",function(){b.lis.add(b.anchors).unbind(".tabs");b.lis=b.anchors=b.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[c.collapsible?"addClass":
-"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);a=0;for(var i;i=this.lis[a];a++)d(i)[d.inArray(a,c.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs",
-function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);b._trigger("show",
-null,b._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");b._trigger("show",null,b._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);b.element.dequeue("tabs")})}:function(g,f){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");b.element.dequeue("tabs")};this.anchors.bind(c.event+".tabs",
-function(){var g=this,f=d(g).closest("li"),j=b.panels.filter(":not(.ui-tabs-hide)"),l=d(b._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||b._trigger("select",null,b._ui(this,l[0]))===false){this.blur();return false}c.selected=b.anchors.index(this);b.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){s(g,
-j)}).dequeue("tabs");this.blur();return false}else if(!j.length){c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this));this.blur();return false}c.cookie&&b._cookie(c.selected,c.cookie);if(l.length){j.length&&b.element.queue("tabs",function(){s(g,j)});b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",
-function(){return false})},_getIndex:function(a){if(typeof a=="string")a=this.anchors.index(this.anchors.filter("[href$="+a+"]"));return a},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=
-e;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){b.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(a,e,b){if(b===p)b=this.anchors.length;
-var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,a).replace(/#\{label\}/g,e));a=!a.indexOf("#")?a.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var i=d("#"+a);i.length||(i=d(h.panelTemplate).attr("id",a).data("destroy.tabs",true));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(b>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[b]);
-i.insertBefore(this.panels[b])}h.disabled=d.map(h.disabled,function(k){return k>=b?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]));return this},remove:function(a){a=this._getIndex(a);var e=this.options,b=this.lis.eq(a).remove(),c=this.panels.eq(a).remove();
-if(b.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(a+(a+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=a}),function(h){return h>=a?--h:h});this._tabify();this._trigger("remove",null,this._ui(b.find("a")[0],c[0]));return this},enable:function(a){a=this._getIndex(a);var e=this.options;if(d.inArray(a,e.disabled)!=-1){this.lis.eq(a).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(b){return b!=a});this._trigger("enable",null,
-this._ui(this.anchors[a],this.panels[a]));return this}},disable:function(a){a=this._getIndex(a);var e=this.options;if(a!=e.selected){this.lis.eq(a).addClass("ui-state-disabled");e.disabled.push(a);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))}return this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+".tabs");return this},
-load:function(a){a=this._getIndex(a);var e=this,b=this.options,c=this.anchors.eq(a)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(a).addClass("ui-state-processing");if(b.spinner){var i=d("span",c);i.data("label.tabs",i.html()).html(b.spinner)}this.xhr=d.ajax(d.extend({},b.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(c.hash)).html(k);e._cleanup();b.cache&&d.data(c,"cache.tabs",
-true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,
-e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.4"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(i){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);i&&i.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(i){i.clientX&&b.rotate(null)}:
-function(){t=c.selected;h()});if(a){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
-
-
-/*
- * jQuery Notify UI Widget 1.4
- * Copyright (c) 2010 Eric Hynds
- *
- * http://www.erichynds.com/jquery/a-jquery-ui-growl-ubuntu-notification-widget/
- *
- * Depends:
- * - jQuery 1.4
- * - jQuery UI 1.8 widget factory
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
-*/
-(function($){
-
-$.widget("ech.notify", {
- options: {
- speed: 500,
- expires: 5000,
- stack: 'below',
- custom: false
- },
- _create: function(){
- var self = this;
- this.templates = {};
- this.keys = [];
-
- // build and save templates
- this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(i){
- var key = this.id || i;
- self.keys.push(key);
- self.templates[key] = $(this).removeAttr("id").wrap("<div></div>").parent().html(); // because $(this).andSelf().html() no workie
- }).end().empty().show();
- },
- create: function(template, msg, opts){
- if(typeof template === "object"){
- opts = msg;
- msg = template;
- template = null;
- }
-
- var tpl = this.templates[ template || this.keys[0]];
-
- // remove default styling class if rolling w/ custom classes
- if(opts && opts.custom){
- tpl = $(tpl).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html();
- }
-
- // return a new notification instance
- return new $.ech.notify.instance(this)._create(msg, $.extend({}, this.options, opts), tpl);
- }
-});
-
-// instance constructor
-$.extend($.ech.notify, {
- instance: function(widget){
- this.parent = widget;
- this.isOpen = false;
- }
-});
-
-// instance methods
-$.extend($.ech.notify.instance.prototype, {
- _create: function(params, options, template){
- this.options = options;
-
- var self = this,
-
- // build html template
- html = template.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g, function($1, $2){
- return ($2 in params) ? params[$2] : '';
- }),
-
- // the actual message
- m = (this.element = $(html)),
-
- // close link
- closelink = m.find(".ui-notify-close");
-
- // clickable?
- if(typeof this.options.click === "function"){
- m.addClass("ui-notify-click").bind("click", function(e){
- self._trigger("click", e, self);
- });
- }
-
- // show close link?
- if(closelink.length){
- closelink.bind("click", function(){
- self.close();
- return false;
- });
- }
-
- this.open();
-
- // auto expire?
- if(typeof options.expires === "number"){
- window.setTimeout(function(){
- self.close();
- }, options.expires);
- }
-
- return this;
- },
- close: function(){
- var self = this, speed = this.options.speed;
-
- this.element.fadeTo(speed, 0).slideUp(speed, function(){
- self._trigger("close");
- self.isOpen = false;
- });
-
- return this;
- },
- open: function(){
- if(this.isOpen || this._trigger("beforeopen") === false){
- return this;
- }
-
- var self = this;
-
- this.element[this.options.stack === 'above' ? 'prependTo' : 'appendTo'](this.parent.element).css({ display:"none", opacity:"" }).fadeIn(this.options.speed, function(){
- self._trigger("open");
- self.isOpen = true;
- });
-
- return this;
- },
- widget: function(){
- return this.element;
- },
- _trigger: function(type, e, instance){
- return this.parent._trigger.call( this, type, e, instance );
- }
-});
-
-})(jQuery);
-
-// Snorby - A Web interface for Snort.
-//
-// Copyright (c) 2010 Dustin Willis Webber (dustin.webber at gmail.com)
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-var Snorby = {
-
- setup: {
-
- defaults: function(){
-
- $("#growl").notify({
- speed: 500,
- expires: 3000
- });
-
- },
-
- },
-
- notification: function(message){
- // title, text
- $('#growl').notify("create", message,{
- expires: 3000,
- speed: 500
- });
- },
-
- helpers: {
-
- }
-
-}
-
-jQuery(document).ready(function($) {
-
- Snorby.setup.defaults();
-
-});
|
|
Deleted |
Snorby-2.2.4.tar.bz2
^
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/.gitignore
^
|
@@ -1,27 +1,32 @@
# Snorby .gitignore
+
+config/snorby-geoip.dat
+*.dat
+
*.rbc
-.DS_Store
*.tmproj
-tmtags
*.swp
-coverage
-rdoc
-doc
-.yardoc
-pkg
log/*
tmp/*
log/*
-!tmp/.gitignore
-!log/.gitignore
-public/system/
-public/javascripts/snorby_packaged.js
-public/javascripts/all.js
-public/stylesheets/snorby_packaged.css
-tmp/pids/
-example.rb
+
+.yardoc
.bundle/
.document
+.DS_Store
+doc
+pkg
+rdoc
+tmtags
+coverage
+tmp/pids/
+example.rb
+public/system/
+public/javascripts/all.js
+public/javascripts/snorby_packaged.js
+public/stylesheets/snorby_packaged.css
+vendor/bundle/
-
+!tmp/.gitignore
+!log/.gitignore
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/ChangeLog.md
^
|
@@ -1,45 +1,144 @@
-# Snorby 2.2.2
+# Snorby 2.3.9
-## Bugfixes since 2.1.1
+ * Fixed minor bugs with new counts using cache counters before count queries.
+ * Updated input for fonts and added chosen.js for select tags.
+ * CAS authentication support. Thanks acmarques.
-* Fixed issue with nil ip addrs from event show views
+# Snorby 2.3.8
-* Added titles for all truncated text on hover
+ * Fixed issues with classified events not showing in search results.
+ * Fixed issue with mass classification user table joins.
-* Fixed blue border on pdf graphs
+# Snorby 2.3.7
-* Updated the delayed_job gems and fixed exception logging
+ * Fix bug with week/month email reports having incorrect ranges.
+ * Add sort support for the queue event listing.
+ * Fixed XSS issue with classification tooltips - escape user name.
+ * Remove verbose paperclip error messages - improve image type validations.
+ * Make hotkey menu standardized across event views.
+ * Remove unneeded /\./ from all form inputs.
+ * Add event rule lookup - rule dirs set in snorby_config.yml
-* Fixed "Export to pdf" to show the proper DateTime for file names and headers
+# Snorby 2.3.6
-* Numerous CSS/JS fixes and optimizations
+ * Fixed issue this inaccurate last_month timestamps.
+ * Graph click events are not scoped by range time.
+ * Added c/p support for src/dst ips addrs.
+ * Both src/dst ip addrs now have there own menu.
+ * Fixed issue with single date in search form.
+ * earliestDate now set to current day.
-# Snorby 2.2.1
+# Snorby 2.3.5
-## New Features since 2.1.0
+ * Snorby::Report bug fixes with sending weekly/monthly reports.
+ * Better error logging in all snorby cache jobs
+ * Pie chart loading indicator should be generated dynamically.
-* Full packet capture integration with Solera Networks’ product API
+# Snorby 2.3.4
-* Ability to specify full-packet capture search criteria per event
+ * You can now view the last 24 hours on the dashboard.
+ * Fixed minor css issue with hidden menus still showing right border
+ * Update batch_size to 10,000 events per cache processing loop
+ * Dashboard sev graphs now respect global severity colors
-* Mass-Classify events by just an IP (not restricted to certain rules)
+# Snorby 2.3.3
-* User who classified an event now listed on classified rule tooltip.
+ * Fixed bug with dst pie graph loading.
+ * Event tables can now be sorted using the table headers.
+ * Changed event open hotkey to shift+return.
+ * Bug fixes with weekly/monthly email reports.
+ * Add CIDR to search for src/dst.
+ * Minor UI changes and enhancements.
+ * Fixed bug with event hotkey navigation.
+ * Added auto prune functionality - remove events based of user specifications
+ * Changed the "no-data" placeholder to fix the global color schema
+ * Minor helper method refactoring
-* Additional event keyboard shortcuts now available
+# Snorby 2.3.2
-## Bugfixes since 2.1.0
+ * updated DM deps
+ * fixed all issues with search params
+ * pie charts can now be clicked to search plot data
-* Fixed “Remember Me” causing the application to crash on login in certain scenarios
+# Snorby 2.3.1
-* Fixed “Ambiguous Search Term” on WHOIS lookups
+ * Numerous UI enhancements.
-* Numerous UI optimizations and bugfixes
+# Snorby 2.3.0 (codename: fixme)
-## Enhancements since 2.1.0
+ * Backend
+ * Cache logic now processes in chunks to prevent blowing the stack
+ * Fixed issues with daily cache not processing when events return nil
+ * Epic amounts of other bug fixes
+
+ * UI/UX
+ * Admin menu move to sub menu bar for UX reasons.
+ * Change hotkeys that conflict with macosx bindings
+ * Box titles now built with css
+ * Content headers now built with css and window menus now
+ align correctly.
+ * Flash message now covers only the top header.
+
+# Snorby 2.2.7
+
+ * fixed issue with dashboard charts taking a lot memory.
+ * updated highcharts current version 2.1.5.
+
+# Snorby 2.2.6
+
+ * updated rails to 2.0.5
+ * fixed all csrf in snorby.js
+ * updated README for highcharts license
+
+# Snorby 2.2.5
+
+ * Bug fixes
+ * revert rails 2.0.4 due to csrf token issues
+
+# Snorby 2.2.4
+
+ * Fixed issue with Snorby worker crashing unexpectedly due to
+ some hostnames exceeding the lock_by column size.
+
+ **NOTE** Due to some issues with the current snorby ORM we
+ cannot update the affected column automatically. For all new
+ installs this issue has been resolved however, for snorby
+ installs > 2.2.4 must update the locked_by column in the
+ dealyed_jobs table manually. We are sorry for any inconvenience.
-* Optimized asset packaging with jammit
+# Snorby 2.2.3
-* Fields in error now show with a “red” outline when submitting forms
+ * Updated delayed_job to 2.1.4
+
+# Snorby 2.2.2
+
+## Bugfixes since 2.1.1
+
+ * Fixed issue with nil ip addrs from event show views
+ * Added titles for all truncated text on hover
+ * Fixed blue border on pdf graphs
+ * Updated the delayed_job gems and fixed exception logging
+ * Fixed "Export to pdf" to show the proper DateTime for file names and headers
+ * Numerous CSS/JS fixes and optimizations
+
+# Snorby 2.2.1
+
+## New Features since 2.1.0
+
+ * Full packet capture integration with Solera Networks’ product API
+ * Ability to specify full-packet capture search criteria per event
+ * Mass-Classify events by just an IP (not restricted to certain rules)
+ * User who classified an event now listed on classified rule tooltip.
+ * Additional event keyboard shortcuts now available
+
+## Bugfixes since 2.1.0
+
+ * Fixed “Remember Me” causing the application to crash on login in certain scenarios
+ * Fixed “Ambiguous Search Term” on WHOIS lookups
+ * Numerous UI optimizations and bugfixes
+
+## Enhancements since 2.1.0
-* Job Queue page now auto refreshes
\ No newline at end of file
+ * Optimized asset packaging with jammit
+ * Fields in error now show with a “red” outline when submitting forms
+ * Job Queue page now auto refreshes
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/Gemfile
^
|
@@ -1,9 +1,11 @@
source 'http://rubygems.org'
-RAILS_VERSION = '~> 3.0.3'
+RAILS_VERSION = '3.0.5'
RSPEC_VERSION = '~> 2.0.0'
DATAMAPPER = 'http://github.com/datamapper'
-DM_VERSION = '~> 1.0.2'
+DM_VERSION = '~> 1.1.0'
+
+gem 'rake', '0.9.2'
gem 'rails', RAILS_VERSION
gem 'jquery-rails'
@@ -15,12 +17,12 @@
gem 'railties', RAILS_VERSION, :require => 'rails'
gem 'dm-core', DM_VERSION
-gem 'dm-rails', '~> 1.0.4'
+gem 'dm-rails', DM_VERSION
gem 'dm-do-adapter', DM_VERSION
gem 'dm-active_model', DM_VERSION
gem 'dm-mysql-adapter', DM_VERSION
-gem 'dm-pager'
+gem 'dm-pager', DM_VERSION
gem 'dm-migrations', DM_VERSION
gem 'dm-types', DM_VERSION
gem 'dm-validations', DM_VERSION
@@ -30,27 +32,31 @@
gem 'dm-timestamps', DM_VERSION
gem 'dm-observer', DM_VERSION
gem 'dm-serializer', DM_VERSION
+gem 'dm-chunked_query', '~> 0.3'
# Deploy with Capistrano
gem 'capistrano'
# Rails Plugins
-gem 'jammit', '~> 0.5.4'
-gem 'devise', '~> 1.1.3'
-gem 'dm-devise', '~> 1.1.6'
-gem "mail", '~> 2.2.10'
-gem "RedCloth", "~> 4.0", :require => 'redcloth'
-gem 'chronic', '~> 0.3.0'
-gem 'pdfkit', '~> 0.4.6'
-gem 'ezprint', :git => 'http://github.com/mephux/ezprint.git', :branch => 'rails3', :require => 'ezprint'
-gem 'daemons', '~> 1.1.0'
-gem 'delayed_job', '~> 2.1.3'
-gem 'delayed_job_data_mapper','~> 1.0.0.rc' #, :git => 'http://github.com/Snorby/delayed_job_data_mapper.git'
-gem 'rmagick', '~> 2.13.1'
-gem 'dm-paperclip', '~> 2.3', :git => 'http://github.com/solnic/dm-paperclip.git', :branch => 'master'
-gem 'net-dns', '~> 0.6.1'
-gem 'whois', '~> 1.6.6'
-gem 'simple_form', '~> 1.2.2'
+gem 'jammit', '~> 0.5.4'
+gem 'devise', '~> 1.4'
+gem 'devise_cas_authenticatable' ,:git => 'git://github.com/acmarques/snorby_cas_authenticatable.git'
+gem 'dm-devise', '~> 1.4'
+gem "mail", '~> 2.2.10'
+gem "RedCloth", "~> 4.0", :require => 'redcloth'
+gem 'chronic', '~> 0.3.0'
+gem 'pdfkit', '~> 0.4.6'
+gem 'ezprint', :git => 'http://github.com/mephux/ezprint.git', :branch => 'rails3', :require => 'ezprint'
+gem 'daemons', '~> 1.1.0'
+gem 'delayed_job', '~> 2.1.4'
+gem 'delayed_job_data_mapper', '~> 1.0.0.rc', :git => 'http://github.com/Snorby/delayed_job_data_mapper.git'
+gem 'rmagick', '~> 2.13.1'
+gem 'dm-paperclip', '~> 2.3', :git => 'http://github.com/solnic/dm-paperclip.git', :branch => 'master'
+gem 'net-dns', '~> 0.6.1'
+gem 'whois', '~> 1.6.6'
+gem 'simple_form', '~> 1.2.2'
+gem 'geoip', '~> 1.1.1'
+gem 'netaddr', '~> 1.5.0'
group(:test) do
gem 'capybara'
@@ -63,4 +69,4 @@
group(:doc) do
gem 'dm-visualizer', '~> 0.1.0'
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/Gemfile.lock
^
|
@@ -1,6 +1,25 @@
GIT
+ remote: git://github.com/acmarques/snorby_cas_authenticatable.git
+ revision: 18cca67306d688f48e3138ce3e6c194fcb7cef18
+ specs:
+ devise_cas_authenticatable (1.0.0.alpha10)
+ devise
+ devise (>= 1.0.6)
+ rubycas-client (>= 2.2.1)
+
+GIT
+ remote: http://github.com/Snorby/delayed_job_data_mapper.git
+ revision: b77c0ae4c777fca19d1bc9c6c501edad7f2ec8b0
+ specs:
+ delayed_job_data_mapper (1.0.0.rc)
+ delayed_job (~> 2.1)
+ dm-aggregates
+ dm-core
+ dm-observer
+
+GIT
remote: http://github.com/mephux/ezprint.git
- revision: c231df7
+ revision: c231df760dae8a2d4bc906888285c6d314de4cf6
branch: rails3
specs:
ezprint (0.2.0)
@@ -8,7 +27,7 @@
GIT
remote: http://github.com/solnic/dm-paperclip.git
- revision: 8b87813
+ revision: 8b8781397d81f43f7e4446966ff44f4b939a5a2b
branch: master
specs:
dm-paperclip (2.4.1)
@@ -16,217 +35,186 @@
GEM
remote: http://rubygems.org/
specs:
- RedCloth (4.2.3)
+ POpen4 (0.1.4)
+ Platform (>= 0.4.0)
+ open4
+ Platform (0.4.0)
+ RedCloth (4.2.7)
abstract (1.0.0)
- actionmailer (3.0.3)
- actionpack (= 3.0.3)
- mail (~> 2.2.9)
- actionpack (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
+ actionmailer (3.0.5)
+ actionpack (= 3.0.5)
+ mail (~> 2.2.15)
+ actionpack (3.0.5)
+ activemodel (= 3.0.5)
+ activesupport (= 3.0.5)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.13)
- rack-test (~> 0.5.6)
+ rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
- activemodel (3.0.3)
- activesupport (= 3.0.3)
+ activemodel (3.0.5)
+ activesupport (= 3.0.5)
builder (~> 2.1.2)
i18n (~> 0.4)
- activerecord (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
+ activerecord (3.0.5)
+ activemodel (= 3.0.5)
+ activesupport (= 3.0.5)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
- activeresource (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- activesupport (3.0.3)
- addressable (2.2.2)
- arel (2.0.7)
+ activeresource (3.0.5)
+ activemodel (= 3.0.5)
+ activesupport (= 3.0.5)
+ activesupport (3.0.5)
+ addressable (2.2.6)
+ arel (2.0.10)
bcrypt-ruby (2.1.4)
builder (2.1.2)
- capistrano (2.5.19)
+ capistrano (2.6.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
- net-ssh-gateway (>= 1.0.0)
- capybara (0.4.0)
- celerity (>= 0.7.9)
- culerity (>= 0.2.4)
+ net-ssh-gateway (>= 1.1.0)
+ capybara (1.0.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.27)
- xpath (~> 0.1.2)
- celerity (0.8.7)
- childprocess (0.1.6)
- ffi (~> 0.6.3)
+ selenium-webdriver (~> 0.2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.2.0)
+ ffi (~> 1.0.6)
chronic (0.3.0)
- closure-compiler (0.3.3)
- culerity (0.2.14)
- daemons (1.1.0)
- data_objects (0.10.2)
+ closure-compiler (1.1.1)
+ daemons (1.1.4)
+ data_objects (0.10.6)
addressable (~> 2.1)
- delayed_job (2.1.3)
+ delayed_job (2.1.4)
activesupport (~> 3.0)
daemons
- delayed_job_data_mapper (1.0.0.rc)
- delayed_job (~> 2.1)
- dm-aggregates
- dm-core
- dm-observer
- devise (1.1.5)
+ devise (1.4.2)
bcrypt-ruby (~> 2.1.2)
- warden (~> 1.0.2)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.0.3)
diff-lcs (1.1.2)
- dm-active_model (1.0.3)
- activemodel (~> 3.0.0)
- dm-core (~> 1.0.2)
- dm-aggregates (1.0.2)
- dm-core (~> 1.0.2)
- dm-constraints (1.0.2)
- dm-core (~> 1.0.2)
- dm-migrations (~> 1.0.2)
- dm-core (1.0.2)
- addressable (~> 2.2)
- extlib (~> 0.9.15)
- dm-devise (1.1.6)
- bcrypt-ruby (~> 2.1.2)
- bcrypt-ruby (~> 2.1.2)
- devise (~> 1.1.0)
- devise (~> 1.1.0)
- dm-core (~> 1.0.0)
- dm-core (~> 1.0.0)
- dm-devise
- dm-migrations (~> 1.0.0)
- dm-migrations (~> 1.0.0)
- dm-rails (>= 1.0.3)
- dm-rails (>= 1.0.3)
- dm-serializer (~> 1.0.0)
- dm-serializer (~> 1.0.0)
- dm-sqlite-adapter (~> 1.0.2)
- dm-timestamps (~> 1.0.0)
- dm-timestamps (~> 1.0.0)
- mocha
- oauth2
- rails (= 3.0.3)
+ dm-active_model (1.1.0)
+ activemodel (~> 3.0.4)
+ dm-core (~> 1.1.0)
+ dm-aggregates (1.1.0)
+ dm-core (~> 1.1.0)
+ dm-chunked_query (0.3.0)
+ dm-aggregates (~> 1.0)
+ dm-core (~> 1.0)
+ dm-constraints (1.1.0)
+ dm-core (~> 1.1.0)
+ dm-core (1.1.0)
+ addressable (~> 2.2.4)
+ dm-devise (1.4.0)
+ devise (~> 1.3)
+ dm-core (< 1.2, >= 1.0.2)
+ dm-migrations (< 1.2, >= 1.0.2)
+ dm-rails (< 1.2, >= 1.0.3)
+ dm-serializer (< 1.2, >= 1.0.2)
+ dm-timestamps (< 1.2, >= 1.0.2)
sugar-high (~> 0.2.10)
- sugar-high (~> 0.2.10)
- sugar-high (~> 0.2.10)
- webrat (= 0.7.2)
- dm-do-adapter (1.0.2)
+ dm-do-adapter (1.1.0)
data_objects (~> 0.10.2)
- dm-core (~> 1.0.2)
- dm-migrations (1.0.2)
- dm-core (~> 1.0.2)
- dm-mysql-adapter (1.0.2)
- dm-do-adapter (~> 1.0.2)
+ dm-core (~> 1.1.0)
+ dm-migrations (1.1.0)
+ dm-core (~> 1.1.0)
+ dm-mysql-adapter (1.1.0)
+ dm-do-adapter (~> 1.1.0)
do_mysql (~> 0.10.2)
- dm-observer (1.0.2)
- dm-core (~> 1.0.2)
+ dm-observer (1.1.0)
+ dm-core (~> 1.1.0)
dm-pager (1.1.0)
dm-aggregates (>= 0.10.1)
dm-core (>= 0.10.1)
- dm-rails (1.0.4)
- actionpack (~> 3.0.0)
- activesupport (~> 3.0.0)
- dm-active_model (~> 1.0.3)
- dm-core (~> 1.0.0)
- railties (~> 3.0.0)
- dm-serializer (1.0.2)
- dm-core (~> 1.0.2)
- fastercsv (~> 1.5.3)
- json_pure (~> 1.4)
- dm-sqlite-adapter (1.0.2)
- dm-do-adapter (~> 1.0.2)
- do_sqlite3 (~> 0.10.2)
- dm-timestamps (1.0.2)
- dm-core (~> 1.0.2)
- dm-transactions (1.0.2)
- dm-core (~> 1.0.2)
- dm-types (1.0.2)
- dm-core (~> 1.0.2)
- fastercsv (~> 1.5.3)
- json_pure (~> 1.4)
- stringex (~> 1.1.0)
- uuidtools (~> 2.1.1)
- dm-validations (1.0.2)
- dm-core (~> 1.0.2)
+ dm-rails (1.1.0)
+ actionpack (~> 3.0.4)
+ dm-active_model (~> 1.1.0)
+ dm-core (~> 1.1.0)
+ railties (~> 3.0.4)
+ dm-serializer (1.1.0)
+ dm-core (~> 1.1.0)
+ fastercsv (~> 1.5.4)
+ json (~> 1.4.6)
+ dm-timestamps (1.1.0)
+ dm-core (~> 1.1.0)
+ dm-transactions (1.1.0)
+ dm-core (~> 1.1.0)
+ dm-types (1.1.0)
+ bcrypt-ruby (~> 2.1.4)
+ dm-core (~> 1.1.0)
+ fastercsv (~> 1.5.4)
+ json (~> 1.4.6)
+ stringex (~> 1.2.0)
+ uuidtools (~> 2.1.2)
+ dm-validations (1.1.0)
+ dm-core (~> 1.1.0)
dm-visualizer (0.1.0)
dm-core (>= 0.10.2)
ruby-graphviz (>= 0.9.10)
thor (>= 0.13.4)
- do_mysql (0.10.2)
- data_objects (= 0.10.2)
- do_sqlite3 (0.10.2)
- data_objects (= 0.10.2)
+ do_mysql (0.10.6)
+ data_objects (= 0.10.6)
erubis (2.6.6)
abstract (>= 1.0.0)
- extlib (0.9.15)
- faraday (0.5.3)
- addressable (~> 2.2.2)
- multipart-post (~> 1.0.1)
- rack (>= 1.1.0, < 2)
fastercsv (1.5.4)
- ffi (0.6.3)
- rake (>= 0.8.7)
- highline (1.6.1)
- i18n (0.5.0)
+ ffi (1.0.9)
+ geoip (1.1.1)
+ highline (1.6.2)
+ i18n (0.6.0)
jammit (0.5.4)
closure-compiler (>= 0.1.0)
yui-compressor (>= 0.9.1)
- jquery-rails (0.2.6)
- rails (~> 3.0)
- thor (~> 0.14.4)
- json_pure (1.4.6)
- mail (2.2.14)
+ jquery-rails (1.0.12)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.4.6)
+ json_pure (1.5.3)
+ mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- mocha (0.9.10)
- rake
- multi_json (0.0.5)
- multipart-post (1.0.1)
+ mocha (0.9.12)
net-dns (0.6.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
- net-ssh (2.0.24)
- net-ssh-gateway (1.0.1)
+ net-ssh (2.1.4)
+ net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
- nokogiri (1.4.4)
- oauth2 (0.1.0)
- faraday (~> 0.5.0)
- multi_json (~> 0.0.4)
+ netaddr (1.5.0)
+ nokogiri (1.5.0)
+ open4 (1.1.0)
+ orm_adapter (0.0.5)
pdfkit (0.4.6)
polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
+ rack (1.2.3)
+ rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
- rails (3.0.3)
- actionmailer (= 3.0.3)
- actionpack (= 3.0.3)
- activerecord (= 3.0.3)
- activeresource (= 3.0.3)
- activesupport (= 3.0.3)
+ rails (3.0.5)
+ actionmailer (= 3.0.5)
+ actionpack (= 3.0.5)
+ activerecord (= 3.0.5)
+ activeresource (= 3.0.5)
+ activesupport (= 3.0.5)
bundler (~> 1.0)
- railties (= 3.0.3)
- railties (3.0.3)
- actionpack (= 3.0.3)
- activesupport (= 3.0.3)
+ railties (= 3.0.5)
+ railties (3.0.5)
+ actionpack (= 3.0.5)
+ activesupport (= 3.0.5)
rake (>= 0.8.7)
thor (~> 0.14.4)
- rake (0.8.7)
+ rake (0.9.2)
require_all (1.2.0)
rmagick (2.13.1)
rspec (2.0.1)
@@ -241,76 +229,80 @@
rspec-expectations (~> 2.0.1)
rspec-rails (2.0.1)
rspec (~> 2.0.0)
- ruby-graphviz (0.9.20)
+ ruby-graphviz (1.0.0)
+ rubycas-client (2.2.1)
+ activesupport
rubyzip (0.9.4)
- selenium-webdriver (0.1.2)
- childprocess (~> 0.1.5)
- ffi (~> 0.6.3)
+ selenium-webdriver (0.2.2)
+ childprocess (>= 0.1.9)
+ ffi (>= 1.0.7)
json_pure
rubyzip
simple_form (1.2.2)
- stringex (1.1.0)
+ stringex (1.2.2)
sugar-high (0.2.12)
mocha (~> 0.9.8)
require_all (~> 1.2.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
- tzinfo (0.3.24)
- uuidtools (2.1.1)
- warden (1.0.3)
- rack (>= 1.0.0)
- webrat (0.7.2)
- nokogiri (>= 1.2.0)
+ tzinfo (0.3.29)
+ uuidtools (2.1.2)
+ warden (1.0.4)
rack (>= 1.0)
- rack-test (>= 0.5.3)
whois (1.6.6)
- xpath (0.1.3)
+ xpath (0.1.4)
nokogiri (~> 1.3)
- yui-compressor (0.9.1)
+ yui-compressor (0.9.6)
+ POpen4 (>= 0.1.4)
PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.0)
- actionmailer (~> 3.0.3)
- actionpack (~> 3.0.3)
- activesupport (~> 3.0.3)
+ actionmailer (= 3.0.5)
+ actionpack (= 3.0.5)
+ activesupport (= 3.0.5)
bundler (~> 1.0.0)
capistrano
capybara
chronic (~> 0.3.0)
daemons (~> 1.1.0)
- delayed_job (~> 2.1.3)
- delayed_job_data_mapper (~> 1.0.0.rc)
- devise (~> 1.1.3)
- dm-active_model (~> 1.0.2)
- dm-aggregates (~> 1.0.2)
- dm-constraints (~> 1.0.2)
- dm-core (~> 1.0.2)
- dm-devise (~> 1.1.6)
- dm-do-adapter (~> 1.0.2)
- dm-migrations (~> 1.0.2)
- dm-mysql-adapter (~> 1.0.2)
- dm-observer (~> 1.0.2)
- dm-pager
+ delayed_job (~> 2.1.4)
+ delayed_job_data_mapper (~> 1.0.0.rc)!
+ devise (~> 1.4)
+ devise_cas_authenticatable!
+ dm-active_model (~> 1.1.0)
+ dm-aggregates (~> 1.1.0)
+ dm-chunked_query (~> 0.3)
+ dm-constraints (~> 1.1.0)
+ dm-core (~> 1.1.0)
+ dm-devise (~> 1.4)
+ dm-do-adapter (~> 1.1.0)
+ dm-migrations (~> 1.1.0)
+ dm-mysql-adapter (~> 1.1.0)
+ dm-observer (~> 1.1.0)
+ dm-pager (~> 1.1.0)
dm-paperclip (~> 2.3)!
- dm-rails (~> 1.0.4)
- dm-serializer (~> 1.0.2)
- dm-timestamps (~> 1.0.2)
- dm-transactions (~> 1.0.2)
- dm-types (~> 1.0.2)
- dm-validations (~> 1.0.2)
+ dm-rails (~> 1.1.0)
+ dm-serializer (~> 1.1.0)
+ dm-timestamps (~> 1.1.0)
+ dm-transactions (~> 1.1.0)
+ dm-types (~> 1.1.0)
+ dm-validations (~> 1.1.0)
dm-visualizer (~> 0.1.0)
ezprint!
+ geoip (~> 1.1.1)
jammit (~> 0.5.4)
jquery-rails
mail (~> 2.2.10)
net-dns (~> 0.6.1)
+ netaddr (~> 1.5.0)
pdfkit (~> 0.4.6)
- rails (~> 3.0.3)
- railties (~> 3.0.3)
+ rails (= 3.0.5)
+ railties (= 3.0.5)
+ rake (= 0.9.2)
rmagick (~> 2.13.1)
rspec (~> 2.0.0)
rspec-core (~> 2.0.0)
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/README.md
^
|
@@ -8,7 +8,7 @@
## Description
-Snorby is a ruby on rails web application for network security monitoring that interfaces with current popular intrusion detection systems (Snort, Suricata and Sagan). The basic fundamental concepts behind Snorby are simplicity, organization and power. The project goal is to create a free, open source and highly competitive application for network monitoring for both private and enterprise use.
+Snorby is a ruby on rails web application for network security monitoring that interfaces with current popular intrusion detection systems (Snort, Suricata and Sagan). The basic fundamental concepts behind Snorby are **simplicity**, organization and power. The project goal is to create a free, open source and highly competitive application for network monitoring for both private and enterprise use.
* [Snorby Screenshot](http://snorby.org/snorby.png)
@@ -131,16 +131,20 @@
* Insta-Snorby
* **Jason Meller** (Insta-Snorby Creator and Maintainer) [https://github.com/Snorby/insta-snorby](https://github.com/Snorby/insta-snorby)
- * Snorby QA/Testing
- * **JJ Cummings** (Snorby QA/Testing)
+ * Team Cool
+ * **JJ Cummings** (Super Badass)
## License
+* Note: The snorby source code is 100% free and open source however we use highcharts for metrics
+and reporting. Please make sure you review the [highcharts]('http://www.highcharts.com) licensing in detail [here]('http://www.highcharts.com/license').
+The below license only applies to snorby source code which can be identified with the below license in each file.
+
Snorby - All About Simplicity.
Copyright (c) 2010 Dustin Willis Webber (dustin.webber at gmail.com)
-This program is free software; you can redistribute it and/or modify
+Snorby is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/controllers/events_controller.rb
^
|
@@ -1,13 +1,23 @@
class EventsController < ApplicationController
respond_to :html, :xml, :json, :js, :csv
+
+ helper_method :sort_column, :sort_direction
def index
- @events = Event.all(:classification_id => nil).page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+ params[:sort] = sort_column
+ params[:direction] = sort_direction
+
+ @events = Event.sorty(params)
@classifications ||= Classification.all
end
def queue
- @events ||= current_user.events.page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+ params[:sort] = sort_column
+ params[:direction] = sort_direction
+ params[:classification_all] = true
+ params[:user_events] = true
+
+ @events ||= current_user.events.sorty(params)
@classifications ||= Classification.all
end
@@ -20,14 +30,27 @@
end
end
+ def rule
+ @event = Event.get(params['sid'], params['cid'])
+ @event.rule ? @rule = @event.rule : @rule = 'No rule found for this event.'
+
+ respond_to do |format|
+ format.html { render :layout => false }
+ end
+ end
+
def show
@event = Event.get(params['sid'], params['cid'])
- @notes = @event.notes.all.page(params[:page].to_i, :per_page => 5, :order => [:id.desc])
+ @lookups ||= Lookup.all
+ @notes = @event.notes.all.page(params[:page].to_i,
+ :per_page => 5, :order => [:id.desc])
respond_to do |format|
format.html {render :layout => false}
format.js
format.pdf do
- render :pdf => "Event:#{@event.id}", :template => "events/show.pdf.erb", :layout => 'pdf.html.erb', :stylesheets => ["pdf"]
+ render :pdf => "Event:#{@event.id}",
+ :template => "events/show.pdf.erb",
+ :layout => 'pdf.html.erb', :stylesheets => ["pdf"]
end
format.xml { render :xml => @event.in_xml }
format.csv { render :text => @event.to_csv }
@@ -36,7 +59,10 @@
end
def view
- @events = Event.all(:sid => params['sid'], :cid => params['cid']).page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+ @events = Event.all(:sid => params['sid'],
+ :cid => params['cid']).page(params[:page].to_i,
+ :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+
@classifications ||= Classification.all
end
@@ -46,7 +72,9 @@
end
def email
- Delayed::Job.enqueue(Snorby::Jobs::EventMailerJob.new(params[:sid], params[:cid], params[:email]))
+ Delayed::Job.enqueue(Snorby::Jobs::EventMailerJob.new(params[:sid],
+ params[:cid], params[:email]))
+
respond_to do |format|
format.html { render :layout => false }
format.js
@@ -64,17 +92,24 @@
params[:reclassify] ? (reclassify = true) : (reclassify = false)
if params.has_key?(:sensor_ids)
- options.merge!({:sid => params[:sensor_ids].map(&:to_i)}) if params[:sensor_ids].is_a?(Array)
+ if params[:sensor_ids].is_a?(Array)
+ options.merge!({:sid => params[:sensor_ids].map(&:to_i)})
+ end
end
options.merge!({:sig_id => params[:sig_id].to_i}) if params[:use_sig_id]
- options.merge!({:"ip.ip_src" => IPAddr.new(params[:ip_src].to_i,Socket::AF_INET)}) if params[:use_ip_src]
+ options.merge!({
+ :"ip.ip_src" => IPAddr.new(params[:ip_src].to_i,Socket::AF_INET)
+ }) if params[:use_ip_src]
- options.merge!({:"ip.ip_dst" => IPAddr.new(params[:ip_dst].to_i,Socket::AF_INET)}) if params[:use_ip_dst]
+ options.merge!({
+ :"ip.ip_dst" => IPAddr.new(params[:ip_dst].to_i,Socket::AF_INET)
+ }) if params[:use_ip_dst]
if options.empty?
- render :js => "flash_message.push({type: 'error', message: 'Sorry, Insufficient classification parameters submitted...'});flash();"
+ render :js => "flash_message.push({type: 'error', message: 'Sorry," +
+ " Insufficient classification parameters submitted...'});flash();"
else
Delayed::Job.enqueue(Snorby::Jobs::MassClassification.new(params[:classification_id], options, User.current_user.id, reclassify))
respond_to do |format|
@@ -95,13 +130,16 @@
end
def history
- @events = Event.all(:user_id => @current_user.id).page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+ @events = Event.all(:user_id => @current_user.id).page(params[:page].to_i,
+ :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
@classifications ||= Classification.all
end
def classify
@events = Event.find_by_ids(params[:events])
- Event.classify_from_collection(@events, params[:classification].to_i, User.current_user.id, true)
+ Event.classify_from_collection(@events,
+ params[:classification].to_i, User.current_user.id, true)
+
render :layout => false, :status => 200
end
@@ -143,7 +181,11 @@
def activity
@user = User.get(params[:user_id])
- @events = @user.events.page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:timestamp.desc])
+ @user = @current_user unless @user
+
+ @events = @user.events.page(params[:page].to_i, :per_page => @current_user.per_page_count,
+ :order => [:timestamp.desc])
+
@classifications ||= Classification.all
end
@@ -160,4 +202,16 @@
render :layout => false
end
+ private
+
+ def sort_column
+ return :timestamp unless params.has_key?(:sort)
+ return params[:sort].to_sym if Event::SORT.has_key?(params[:sort].to_sym)
+ :timestamp
+ end
+
+ def sort_direction
+ %w[asc desc].include?(params[:direction].to_s) ? params[:direction].to_sym : :desc
+ end
+
end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/controllers/lookups_controller.rb
^
|
@@ -0,0 +1,86 @@
+class LookupsController < ApplicationController
+
+ before_filter :require_administrative_privileges
+
+ # GET /lookups
+ # GET /lookups.xml
+ def index
+ @lookups = Lookup.all.page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:id.asc])
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @lookups }
+ end
+ end
+
+ # GET /lookups/1
+ # GET /lookups/1.xml
+ def show
+ @lookup = Lookup.get(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @lookup }
+ end
+ end
+
+ # GET /lookups/new
+ # GET /lookups/new.xml
+ def new
+ @lookup = Lookup.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @lookup }
+ end
+ end
+
+ # GET /lookups/1/edit
+ def edit
+ @lookup = Lookup.get(params[:id])
+ end
+
+ # POST /lookups
+ # POST /lookups.xml
+ def create
+ @lookup = Lookup.new(params[:lookup])
+
+ respond_to do |format|
+ if @lookup.save
+ format.html { redirect_to(lookups_url, :notice => 'Lookup source successfully created.') }
+ format.xml { render :xml => @lookup, :status => :created, :location => @lookup }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @lookup.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /lookups/1
+ # PUT /lookups/1.xml
+ def update
+ @lookup = Lookup.get(params[:id])
+
+ respond_to do |format|
+ if @lookup.update(params[:lookup])
+ format.html { redirect_to(lookups_url, :notice => 'Lookup source successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @lookup.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /lookups/1
+ # DELETE /lookups/1.xml
+ def destroy
+ @lookup = Lookup.get(params[:id])
+ @lookup.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(lookups_url, :notice => 'Lookup source removed successfully.') }
+ format.xml { head :ok }
+ end
+ end
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/controllers/page_controller.rb
^
|
@@ -1,7 +1,11 @@
class PageController < ApplicationController
+ helper_method :sort_column, :sort_direction, :sort_page
+
def dashboard
- @range = params[:range].blank? ? 'today' : params[:range]
+ @now = Time.now
+
+ @range = params[:range].blank? ? 'last_24' : params[:range]
set_defaults
@@ -15,14 +19,17 @@
@high = @cache.severity_count(:high, @range.to_sym)
@medium = @cache.severity_count(:medium, @range.to_sym)
@low = @cache.severity_count(:low, @range.to_sym)
-
+
@sensor_metrics = @cache.sensor_metrics(@range.to_sym)
@signature_metrics = @cache.signature_metrics
@event_count = @cache.all.map(&:event_count).sum
- @axis = @sensor_metrics.last[:range].join(',') if @sensor_metrics.last
+
+ if @sensor_metrics.last
+ @axis = @sensor_metrics.last[:range].join(',')
+ end
@classifications = Classification.all(:order => [:events_count.desc])
@sensors = Sensor.all(:limit => 5, :order => [:events_count.desc])
@@ -40,76 +47,93 @@
render :pdf => "Snorby Report - #{@start_time.strftime('%A-%B-%d-%Y-%I-%M-%p')} - #{@end_time.strftime('%A-%B-%d-%Y-%I-%M-%p')}", :template => "page/dashboard.pdf.erb", :layout => 'pdf.html.erb', :stylesheets => ["pdf"]
end
end
-
+
end
def search
end
- def results
- begin
- limit = params[:limit].to_i.zero? ? @current_user.per_page_count : params[:limit].to_i
- @events = Event.search(params[:search]).page(params[:page].to_i, :per_page => limit, :order => [:timestamp.desc])
- @classifications ||= Classification.all
- rescue ArgumentError
- redirect_to :back, :notice => 'Please double check you search parameters and make sure they are valid.'
- end
+ def results
+ params[:sort] = sort_column
+ params[:direction] = sort_direction
+ params[:classification_all] = true
+
+ @events = Event.sorty(params)
+ @classifications ||= Classification.all
end
private
- def set_defaults
+ def set_defaults
- case @range.to_sym
- when :now
- @cache = Cache.today
- @start_time = Time.now.beginning_of_day
- @end_time = Time.now
- when :today
- @cache = Cache.today
- @start_time = Time.now.beginning_of_day
- @end_time = Time.now.end_of_day
-
- when :yesterday
- @cache = Cache.yesterday
- @start_time = (Time.now - 1.day).beginning_of_day
- @end_time = (Time.now - 1.day).end_of_day
-
- when :week
- @cache = DailyCache.this_week
- @start_time = Time.now.beginning_of_week
- @end_time = Time.now.end_of_week
-
- when :last_week
- @cache = DailyCache.last_week
- @start_time = (Time.now - 1.week).beginning_of_week
- @end_time = (Time.now - 1.week).end_of_week
-
- when :month
- @cache = DailyCache.this_month
- @start_time = Time.now.beginning_of_month
- @end_time = Time.now.end_of_month
-
- when :last_month
- @cache = DailyCache.last_month
- @start_time = (Time.now - 2.months).beginning_of_month
- @end_time = (Time.now - 2.months).end_of_month
-
- when :quarter
- @cache = DailyCache.this_quarter
- @start_time = Time.now.beginning_of_quarter
- @end_time = Time.now.end_of_quarter
-
- when :year
- @cache = DailyCache.this_year
- @start_time = Time.now.beginning_of_year
- @end_time = Time.now.end_of_year
-
- else
- @cache = Cache.today
- @start_time = Time.now.beginning_of_day
- @end_time = Time.now.end_of_day
- end
+ case @range.to_sym
+ when :last_24
+
+ @start_time = @now.yesterday
+ @end_time = @now
+
+ @cache = Cache.last_24(@start_time, @end_time)
+
+ when :today
+ @cache = Cache.today
+ @start_time = @now.beginning_of_day
+ @end_time = @now.end_of_day
+
+ when :yesterday
+ @cache = Cache.yesterday
+ @start_time = (@now - 1.day).beginning_of_day
+ @end_time = (@now - 1.day).end_of_day
+
+ when :week
+ @cache = DailyCache.this_week
+ @start_time = @now.beginning_of_week
+ @end_time = @now.end_of_week
+
+ when :last_week
+ @cache = DailyCache.last_week
+ @start_time = (@now - 1.week).beginning_of_week
+ @end_time = (@now - 1.week).end_of_week
+
+ when :month
+ @cache = DailyCache.this_month
+ @start_time = @now.beginning_of_month
+ @end_time = @now.end_of_month
+
+ when :last_month
+ @cache = DailyCache.last_month
+ @start_time = (@now - 1.months).beginning_of_month
+ @end_time = (@now - 1.months).end_of_month
+
+ when :quarter
+ @cache = DailyCache.this_quarter
+ @start_time = @now.beginning_of_quarter
+ @end_time = @now.end_of_quarter
+
+ when :year
+ @cache = DailyCache.this_year
+ @start_time = @now.beginning_of_year
+ @end_time = @now.end_of_year
+
+ else
+ @cache = Cache.today
+ @start_time = @now.beginning_of_day
+ @end_time = @now.end_of_day
end
+ end
+
+ def sort_column
+ return :timestamp unless params.has_key?(:sort)
+ return params[:sort].to_sym if Event::SORT.has_key?(params[:sort].to_sym)
+ :timestamp
+ end
+
+ def sort_direction
+ %w[asc desc].include?(params[:direction].to_s) ? params[:direction].to_sym : :desc
+ end
+
+ def sort_page
+ params[:page].to_i
+ end
+
end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/controllers/passwords_controller.rb
^
|
@@ -0,0 +1,4 @@
+class PasswordsController < Devise::PasswordsController
+ layout 'login'
+end
+
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/controllers/registrations_controller.rb
^
|
@@ -26,8 +26,8 @@
end
def update
-
- if resource.update_with_password(params[resource_name])
+ method = (Snorby::CONFIG[:authentication_mode] == "database") ? "update_with_password" : "update"
+ if resource.send(method, params[resource_name])
if params[:user][:avatar].blank?
@@ -40,7 +40,7 @@
end
else
clean_up_passwords(resource)
- render_with_scope :edit
+ redirect_to edit_user_registration_path
end
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/controllers/sensors_controller.rb
^
|
@@ -1,7 +1,7 @@
class SensorsController < ApplicationController
- before_filter :require_administrative_privileges, :except => [:index]
-
+ before_filter :require_administrative_privileges, :except => [:index, :update_name]
+
def index
@sensors ||= Sensor.all.page(params[:page].to_i, :per_page => @current_user.per_page_count, :order => [:sid.asc])
end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/controllers/sessions_controller.rb
^
|
@@ -0,0 +1,23 @@
+class SessionsController < Devise::SessionsController
+ layout 'login'
+
+ def create
+ resource = warden.authenticate!(:scope => resource_name,
+ :recall => "sessions#failure")
+
+ return sign_in_and_redirect(resource_name, resource)
+ end
+
+ def sign_in_and_redirect(resource_or_scope, resource=nil)
+ scope = Devise::Mapping.find_scope!(resource_or_scope)
+ resource ||= resource_or_scope
+ sign_in(scope, resource) unless warden.user(scope) == resource
+ return render :json => {:success => true, :redirect => stored_location_for(scope) || after_sign_in_path_for(resource)}
+ end
+
+ def failure
+ return render:json => {:success => false, :errors => ["Login failed."]}
+ end
+
+end
+
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/controllers/settings_controller.rb
^
|
@@ -11,6 +11,7 @@
@settings.each do |setting|
name = setting.name
+
if @params.keys.include?(name)
if @params[name].kind_of?(ActionDispatch::Http::UploadedFile)
Setting.file(name, @params[name])
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/helpers/application_helper.rb
^
|
@@ -37,21 +37,40 @@
def title(header, title=nil, &block)
show_title(title ? title : header)
title_header = content_tag(:div, header, :id => 'title-header', :class => 'grid_6')
+
if block_given?
- menu = content_tag(:ul, "<li> </li>#{capture(&block)}<li> </li>".html_safe, :id => 'title-menu')
- menu_holder = content_tag(:ul, menu, :id => 'title-menu-holder', :class => 'grid_6')
+ data = capture(&block).gsub("\n|\t", '')
+ menu = content_tag(:ul, "<li> </li>#{capture(&block)}<li> </li>".html_safe, :id => 'title-menu') unless data.blank?
+ menu_holder = content_tag(:ul, menu, :id => 'title-menu-holder', :class => '')
html = title_header + menu_holder
else
html = title_header
end
+
return content_tag(:div, html, :id => 'title')
end
def sortable(column, title = nil)
title ||= column.titleize
- css_class = column == sort_column ? "current #{sort_direction}" : nil
- direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
- link_to title, {:sort => column, :direction => direction}, {:class => css_class}
+ css_class = column == sort_column ? "current #{sort_direction} add_tipsy" : 'add_tipsy'
+ direction = column == sort_column && sort_direction == :asc ? :desc : :asc
+
+ link = {
+ :sort => column,
+ :direction => direction
+ }
+
+ if params.has_key?(:search)
+ link[:search] = params[:search]
+ end
+
+ if params.has_key?(:page)
+ link[:page] = params[:page].to_i
+ end
+
+ link_to title, link, {
+ :class => css_class,
+ :title => "Sort `#{title}` #{direction}"}
end
#
@@ -74,9 +93,11 @@
def drop_down_for(name, icon_path, id, &block)
html = link_to "#{image_tag(icon_path, :size => '16x16')} #{name}".html_safe, '#', :class => 'has_dropdown right-more', :id => "#{id}"
+
if block_given?
html += content_tag(:dl, "#{capture(&block)}".html_safe, :id => "#{id}", :class => 'drop-down-menu', :style => 'display:none;')
end
+
"<li>#{html}</li>".html_safe
end
@@ -97,7 +118,9 @@
#
def menu_item(name, path='#', image_path=nil, options={})
image = image_path ? "#{image_tag(image_path)} " : ""
- content_tag(:li, "#{link_to "#{image}#{name}".html_safe, path, options}".html_safe)
+ unless (name || path).blank?
+ content_tag(:li, "#{link_to "#{image}#{name}".html_safe, path, options}".html_safe)
+ end
end
def snorby_box(title, normal_size=true, &block)
@@ -108,10 +131,15 @@
else
html += content_tag(:div, capture(&block), :id => 'box-content-small')
end
-
- html += content_tag(:div, nil, :id => 'box-footer')
+
content_tag(:div, html, :id => 'snorby-box', :class => 'snorby-box')
end
+
+ def snorby_box_footer(&block)
+ html = ''
+ html = capture(&block) if block
+ content_tag(:div, html, :id => 'box-footer')
+ end
def form_actions(&block)
content_tag(:div, capture(&block), :id => 'form-actions')
@@ -170,4 +198,40 @@
end
end
+
+ def clippy(text, bgcolor='#FFFFFF', id=0)
+ html = <<-EOF
+ <span style="display:none" id="clippy_#{id}" class="ip-copy">#{text}</span>
+ <span id="main_clippy_#{id}" class="add_tipsy clippy"
+ original-title="copied!" title="copy to clipboard">
+ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
+ width="14"
+ height="14"
+ class="clippy"
+ id="clippy">
+ <param name="movie" value="/flash/clippy.swf">
+ <param name="allowScriptAccess" value="always">
+ <param name="quality" value="high">
+ <param name="scale" value="noscale">
+ <param name="FlashVars" value="id=clippy_#{id}&copied=&copyto=">
+ <param name="bgcolor" value="#{bgcolor}">
+ <param name="wmode" value="opaque">
+ <embed src="/flash/clippy.swf"
+ width="14"
+ height="14"
+ name="clippy"
+ quality="high"
+ allowscriptaccess="always"
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.macromedia.com/go/getflashplayer"
+ flashvars="id=clippy_#{id}&copied=&copyto="
+ bgcolor="#{bgcolor}"
+ wmode="opaque">
+ </object>
+ </span>
+ EOF
+
+ html.html_safe
+ end
+
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/helpers/events_helper.rb
^
|
@@ -1,5 +1,5 @@
module EventsHelper
-
+
def event_port_number(event, type)
if event.tcp?
return event.tcp.send(:"tcp_#{type.to_s}")
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/helpers/lookups_helper.rb
^
|
@@ -0,0 +1,2 @@
+module LookupsHelper
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/helpers/page_helper.rb
^
|
@@ -1,2 +1,51 @@
module PageHelper
+
+ def time_range_title(type)
+
+ title = case type.to_sym
+ when :last_24
+ %{
+ #{@now.strftime('%D %H:%M')}
+ -
+ #{@now.strftime('%D %H:%M')}
+ }
+ when :today
+ "#{@now.strftime('%A, %B %d, %Y')}"
+ when :yesterday
+ "#{@now.yesterday.strftime('%A, %B %d, %Y')}"
+ when :week
+ %{
+ #{@now.beginning_of_week.strftime('%D')}
+ -
+ #{@now.end_of_week.strftime('%D')}
+ }
+ when :last_week
+ %{
+ #{(@now - 1.week).beginning_of_week.strftime('%D')}
+ -
+ #{(@now - 1.week).end_of_week.strftime('%D')}
+ }
+ when :month
+ "#{@now.beginning_of_month.strftime('%B')}"
+ when :last_month
+ "#{(@now - 1.month).beginning_of_month.strftime('%B')}"
+ when :quarter
+ %{
+ #{@now.beginning_of_quarter.strftime('%B %Y')}
+ -
+ #{@now.end_of_quarter.strftime('%B %Y')}
+ }
+ when :last_quarter
+ # ...
+ when :year
+ "#{@now.strftime('%Y')}"
+ when :last_year
+ "#{(@now - 1.year).strftime('%Y')}"
+ else
+ ""
+ end
+
+ title
+ end
+
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/mailers/report_mailer.rb
^
|
@@ -11,15 +11,15 @@
def weekly_report
@emails = []
User.all.each { |user| @emails << "#{user.name} <#{user.email}>" }
- report = Snorby::Report.build_report('week')
+ report = Snorby::Report.build_report('last_week')
attachments["snorby-weekly-report.pdf"] = report[:pdf]
- mail(:to => @emails, :from => (Setting.email? ? Setting.find(:email) : "snorby@snorby.org"), :subject => "Snorby Weeklt Report: #{report[:start_time].strftime('%A, %B %d, %Y %I:%M %p')} - #{report[:end_time].strftime('%A, %B %d, %Y %I:%M %p')}")
+ mail(:to => @emails, :from => (Setting.email? ? Setting.find(:email) : "snorby@snorby.org"), :subject => "Snorby Weekly Report: #{report[:start_time].strftime('%A, %B %d, %Y %I:%M %p')} - #{report[:end_time].strftime('%A, %B %d, %Y %I:%M %p')}")
end
def monthly_report
@emails = []
User.all.each { |user| @emails << "#{user.name} <#{user.email}>" }
- report = Snorby::Report.build_report('month')
+ report = Snorby::Report.build_report('last_month')
attachments["snorby-monthly-report.pdf"] = report[:pdf]
mail(:to => @emails, :from => (Setting.email? ? Setting.find(:email) : "snorby@snorby.org"), :subject => "Snorby Monthly Report: #{report[:start_time].strftime('%A, %B %d, %Y %I:%M %p')} - #{report[:end_time].strftime('%A, %B %d, %Y %I:%M %p')}")
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/cache.rb
^
|
@@ -60,17 +60,26 @@
def self.today
all(:ran_at.gte => Time.now.beginning_of_day, :ran_at.lte => Time.now.end_of_day)
end
+
+ def self.last_24(first=nil,last=nil)
+ current = Time.now
+ end_time = last ? last : current
+ start_time = first ? first : current.yesterday
+
+ all(:ran_at.gte => start_time, :ran_at.lte => end_time)
+ end
def self.cache_time
if (time = get_last)
- return time.ran_at + 30.minute
+ return time.ran_at + 30.minutes
else
- Time.now - 30.minute
+ Time.now
end
end
def self.protocol_count(protocol, type=nil)
- count = []
+ count = count_hash(type)
+
@cache = cache_for_type(self, :hour)
case protocol.to_sym
@@ -88,16 +97,12 @@
end
end
- range_for_type(:hour) do |i|
- next if count[i]
- count[i] = 0
- end
-
- count
+ count.values
end
def self.severity_count(severity, type=nil)
- count = []
+ count = count_hash(type)
+
@cache = cache_for_type(self, :hour)
case severity.to_sym
@@ -121,12 +126,7 @@
end
end
- range_for_type(:hour) do |i|
- next if count[i]
- count[i] = 0
- end
-
- count
+ count.values
end
def self.get_last
@@ -137,14 +137,19 @@
@metrics = []
Sensor.all(:limit => 5, :order => [:events_count.desc]).each do |sensor|
- count = Array.new(24) { 0 }
- blah = self.all(:sid => sensor.sid).group_by { |x| x.ran_at.hour }
+ count = count_hash(type)
+ blah = self.all(:sid => sensor.sid).group_by { |x| "#{x.ran_at.day}-#{x.ran_at.hour}" }
+
blah.each do |hour, data|
count[hour] = data.map(&:event_count).sum
end
-
- @metrics << { :name => sensor.name, :data => count, :range => 24.times.to_a }
+
+ @metrics << {
+ :name => sensor.name,
+ :data => count.values,
+ :range => count.keys.collect {|x| "'#{x.split('-').last}'" }
+ }
end
@metrics
@@ -231,53 +236,54 @@
@top
end
- def self.cache_for_type(collection, type=:week, sensor=false)
- case type.to_sym
- when :week
- return collection.group_by { |x| x.ran_at.day } unless sensor
- return collection.all(:sid => sensor.sid).group_by { |x| x.ran_at.day }
- when :month
- return collection.group_by { |x| x.ran_at.day } unless sensor
- return collection.all(:sid => sensor.sid).group_by { |x| x.ran_at.day }
- when :year
- return collection.group_by { |x| x.ran_at.month } unless sensor
- return collection.all(:sid => sensor.sid).group_by { |x| x.ran_at.month }
- when :hour
- return collection.group_by { |x| x.ran_at.hour } unless sensor
- return collection.all(:sid => sensor.sid).group_by { |x| x.ran_at.hour }
- else
- return collection.group_by { |x| x.ran_at.day } unless sensor
- return collection.all(:sid => sensor.sid).group_by { |x| x.ran_at.day }
- end
- end
-
- def self.range_for_type(type=:week, &block)
+ def self.count_hash(type=nil)
+ count = {}
- case type.to_sym
- when :hour
- Time.now.beginning_of_day.hour.upto(Time.now.end_of_day.hour) do |i|
- block.call(i) if block
- end
- when :week
- Time.now.beginning_of_week.day.upto(Time.now.end_of_week.day) do |i|
- block.call(i) if block
- end
- when :month
- Time.now.beginning_of_month.day.upto(Time.now.end_of_month.day) do |i|
- block.call(i) if block
- end
- when :year
- start_time_method = :beginning_of_year
- end_time_method = :end_of_year
- Time.now.beginning_of_year.month.upto(Time.now.end_of_year.month) do |i|
- block.call(i) if block
+ if type == :last_24
+ now = Time.now
+ # TODO
+ # this will need to store the key as day/hour
+
+ Range.new(now.yesterday.to_i, now.to_i).step(1.hour) do |seconds_since_epoch|
+ time = Time.at(seconds_since_epoch)
+ key = "#{time.day}-#{time.hour}"
+ count[key] = 0
end
+
else
- Time.now.beginning_of_week.day.upto(Time.now.end_of_week.day) do |i|
- block.call(i) if block
+
+ if type == :today
+ time_start = Time.now.beginning_of_day.to_i
+ time_end = Time.now.end_of_day.to_i
+ else
+ time_start = Time.now.yesterday.beginning_of_day.to_i
+ time_end = Time.now.yesterday.end_of_day.to_i
+ end
+
+ Range.new(time_start, time_end).step(1.hour) do |seconds_since_epoch|
+ time = Time.at(seconds_since_epoch)
+ key = "#{time.day}-#{time.hour}"
+ count[key] = 0
end
+
end
+ count
+ end
+
+ def self.cache_for_type(collection, type=:hour, sensor=false)
+ return collection.group_by { |x| "#{x.ran_at.day}-#{x.ran_at.hour}" } unless sensor
+ return collection.all(:sid => sensor.sid).group_by do |x|
+ "#{x.ran_at.day}-#{x.ran_at.hour}"
+ end
+ end
+
+ def self.range_for_type(type=:hour, &block)
+ Range.new(Time.now.beginning_of_day.to_i, Time.now.end_of_day.to_i).step(1.hour) do |seconds_since_epoch|
+ time = Time.at(seconds_since_epoch)
+ key = "#{time.day}-#{time.hour}"
+ block.call(key) if block
+ end
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/daily_cache.rb
^
|
@@ -121,8 +121,6 @@
range_for_type(type) do |i|
- puts i
-
if @cache.has_key?(i)
sev_count = 0
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/event.rb
^
|
@@ -1,3 +1,4 @@
+require 'netaddr'
require 'snorby/model/counter'
class Event
@@ -8,6 +9,8 @@
# Included for the truncate helper method.
extend ActionView::Helpers::TextHelper
+ SIGNATURE_URL = "http://rootedyour.com/snortsid?sid=$$gid$$-$$sid$$"
+
storage_names[:default] = "event"
property :sid, Integer, :key => true, :index => true
@@ -28,27 +31,35 @@
property :timestamp, DateTime
- has n, :favorites, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has n, :favorites, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
has n, :users, :through => :favorites
has 1, :severity, :through => :signature, :via => :sig_priority
- has 1, :payload, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has 1, :payload, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
- has 1, :icmp, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has 1, :icmp, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
- has 1, :tcp, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has 1, :tcp, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
- has 1, :udp, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has 1, :udp, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
- has 1, :opt, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has 1, :opt, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
- has n, :notes, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has n, :notes, :parent_key => [ :sid, :cid ],
+ :child_key => [ :sid, :cid ], :constraint => :destroy
belongs_to :user
- belongs_to :sensor, :parent_key => :sid, :child_key => :sid, :required => true
+ belongs_to :sensor, :parent_key => :sid,
+ :child_key => :sid, :required => true
belongs_to :signature, :child_key => :sig_id, :parent_key => :sig_id
@@ -60,6 +71,55 @@
# Note: Need to decrement Severity, Sensor and User Counts
end
+ SORT = {
+ :sig_priority => 'signature',
+ :sid => 'event',
+ :ip_src => 'ip',
+ :ip_dst => 'ip',
+ :sig_name => 'signature',
+ :timestamp => 'event',
+ :user_count => 'event'
+ }
+
+ def self.sorty(params={})
+ sort = params[:sort]
+ direction = params[:direction]
+
+ page = {
+ :per_page => User.current_user.per_page_count
+ }
+
+ if SORT[sort].downcase == 'event'
+ page.merge!(:order => sort.send(direction))
+ else
+ page.merge!(
+ :order => [Event.send(SORT[sort].to_sym).send(sort).send(direction),
+ :timestamp.send(direction)],
+ :links => [Event.relationships[SORT[sort].to_s].inverse]
+ )
+ end
+
+ if params.has_key?(:search)
+ page.merge!(search(params[:search]))
+ end
+
+ unless params.has_key?(:classification_all)
+ page.merge!(:classification_id => nil)
+ end
+
+ if params.has_key?(:user_events)
+ relationship = Event.relationships['user'].inverse
+
+ if page.has_key?(:links)
+ page[:links].push(relationship)
+ else
+ page[:links] = [relationship]
+ end
+ end
+
+ page(params[:page].to_i, page)
+ end
+
def packet_capture(params={})
case Setting.find(:packet_capture_type).to_sym
when :openfpc
@@ -72,13 +132,15 @@
end
def signature_url
- if Setting.signature_lookup?
- url = Setting.find(:signature_lookup)
- return url.sub(/\$\$sid\$\$/, signature.sig_sid.to_s).sub(/\$\$gid\$\$/, signature.sig_gid.to_s)
+ sid, gid = [/\$\$sid\$\$/, /\$\$gid\$\$/]
+
+ @signature_url = if Setting.signature_lookup?
+ Setting.find(:signature_lookup)
else
- url = "http://rootedyour.com/snortsid?sid=$$gid$$-$$sid$$"
- return url.sub(/\$\$sid\$\$/, signature.sig_sid.to_s).sub(/\$\$gid\$\$/, signature.sig_gid.to_s)
+ SIGNATURE_URL
end
+
+ @signature_url.sub(sid, signature.sig_sid.to_s).sub(gid, signature.sig_gid.to_s)
end
def matches_notification?
@@ -106,19 +168,23 @@
end
def self.last_month
- all(:timestamp.gte => 2.month.ago.beginning_of_month, :timestamp.lte => 1.month.ago.end_of_month)
+ all(:timestamp.gte => 2.month.ago.beginning_of_month,
+ :timestamp.lte => 1.month.ago.end_of_month)
end
def self.last_week
- all(:timestamp.gte => 2.week.ago.beginning_of_week, :timestamp.lte => 1.week.ago.end_of_week)
+ all(:timestamp.gte => 2.week.ago.beginning_of_week,
+ :timestamp.lte => 1.week.ago.end_of_week)
end
def self.yesterday
- all(:timestamp.gte => 1.day.ago.beginning_of_day, :timestamp.lte => 1.day.ago.end_of_day)
+ all(:timestamp.gte => 1.day.ago.beginning_of_day,
+ :timestamp.lte => 1.day.ago.end_of_day)
end
def self.today
- all(:timestamp.gte => Time.now.beginning_of_day, :timestamp.lte => Time.now.end_of_day)
+ all(:timestamp.gte => Time.now.beginning_of_day,
+ :timestamp.lte => Time.now.end_of_day)
end
def self.find_classification(classification_id)
@@ -134,11 +200,13 @@
end
def self.between(start_time, end_time)
- all(:timestamp.gte => start_time, :timestamp.lte => end_time, :order => [:timestamp.desc])
+ all(:timestamp.gte => start_time, :timestamp.lte => end_time,
+ :order => [:timestamp.desc])
end
def self.between_time(start_time, end_time)
- all(:timestamp.gte => start_time, :timestamp.lt => end_time, :order => [:timestamp.desc])
+ all(:timestamp.gte => start_time, :timestamp.lt => end_time,
+ :order => [:timestamp.desc])
end
def self.find_by_ids(ids)
@@ -201,7 +269,7 @@
return true if User.current_user.events.include?(self)
false
end
-
+
def toggle_favorite
if self.favorite?
destroy_favorite
@@ -211,13 +279,12 @@
end
def create_favorite
- users << User.current_user
- users.save
+ favorite = Favorite.create(:sid => self.sid, :cid => self.cid, :user => User.current_user)
end
def destroy_favorite
- favorite = Favorite.first(:sid => self.sid, :cid => self.cid, :user => User.current_user)
- favorite.destroy if favorite
+ favorite = User.current_user.favorites.first(:sid => self.sid, :cid => self.cid)
+ favorite.destroy! if favorite
end
def protocol
@@ -245,14 +312,28 @@
end
def source_port
+ return nil unless protocol_data
+
if protocol_data.first == :icmp
nil
else
protocol_data.last.send(:"#{protocol_data.first}_sport")
end
end
-
+
+ def rule
+ @rule = Snorby::Rule.get({
+ :rule_id => signature.sig_sid,
+ :generator_id => signature.sig_gid,
+ :revision_id => signature.sig_rev
+ })
+
+ @rule if @rule.found?
+ end
+
def destination_port
+ return nil unless protocol_data
+
if protocol_data.first == :icmp
nil
else
@@ -261,7 +342,7 @@
end
def in_xml
- %{<snorby>#{to_xml}#{user.to_xml if user}#{ip.to_xml}#{protocol_data.last.to_xml if protocol_data}#{classification.to_xml if classification}#{payload.to_xml if payload}#{notes.to_xml}</snorby>}
+ %{<snorby>#{to_xml}#{user.to_xml if user}#{ip.to_xml}#{protocol_data.last.to_xml if protocol_data}#{classification.to_xml if classification}#{payload.to_xml if payload}</snorby>}.chomp
end
def in_json
@@ -276,8 +357,8 @@
:dst_port => dst_port,
:type => type,
:proto => proto,
- :payload => payload.to_ascii,
- :payload_html => payload.to_html
+ :payload => payload,
+ :payload_html => payload ? payload.to_html : ''
}
return json
end
@@ -326,8 +407,10 @@
return 0
elsif tcp?
return tcp.tcp_sport
- else
+ elsif udp?
return udp.udp_sport
+ else
+ return nil
end
end
@@ -342,97 +425,131 @@
return 0
elsif tcp?
return tcp.tcp_dport
- else
+ elsif udp?
return udp.udp_dport
+ else
+ return nil
end
end
- def self.reset_classifications
- all.update(:classification_id => 0)
- Classification.all.each do |classification|
- classification.update(:events_count => 0)
- end
- end
-
- def self.classify_from_collection(collection, classification, user, reclassify=false)
+ def self.classify_from_collection(events, classification, user, reclassify=false)
@classification = Classification.get(classification)
- @user ||= User.get(user)
+ @user = User.get(user)
- collection.each do |event|
- next unless event
- old_classification = event.classification || false
-
- next if old_classification == @classification
-
- next if (old_classification && reclassify == false)
-
- event.user = @user
+ events.each do |event|
- if @classification.blank?
- event.classification = nil
+ old_classification = if event.classification.present?
+ event.classification
else
- event.classification = @classification
+ nil
end
+ next if old_classification == @classification
+ next if old_classification && reclassify == false
+
+ event.classification = @classification
+ event.user_id = @user.id
+
if event.save
@classification.up(:events_count) if @classification
old_classification.down(:events_count) if old_classification
else
Rails.logger.info "ERROR: #{event.errors.inspect}"
end
-
+
end
+ rescue => e
+ Rails.logger.info(e.backtrace)
end
def self.search(params)
@search = {}
- begin
- unless params[:timestamp].to_i.zero?
- if params[:timestamp] =~ /\s\-\s/
- start_time, end_time = params[:timestamp].split(' - ')
- @search.merge!({:conditions => ['timestamp >= ? AND timestamp <= ?', Chronic.parse(start_time).beginning_of_day, Chronic.parse(end_time).end_of_day]})
- else
- @search.merge!({:timestamp.gte => Chronic.parse(params[:timestamp]).beginning_of_day})
- end
- end
-
- @search.merge!({ Event.sid => params[:sid] }) if params[:sid] unless params[:sid].to_i.zero?
- if params[:severity].to_i.zero?
- @search.merge!({ :"sig_id" => Signature.all(:sig_name.like => "%#{params[:signature_name]}%").map(&:sig_id) }) unless params[:signature_name] == ""
- else
- if params[:signature_name] == ""
- @search.merge!({ :"sig_id" => Signature.all(:sig_priority => params[:severity].to_i).map(&:sig_id) })
- else
- @search.merge!({ :"sig_id" => Signature.all(:sig_name.like => "%#{params[:signature_name]}%", :sig_priority => params[:severity].to_i).map(&:sig_id) })
- end
- end
+ @search.merge!({:sid => params[:sid].to_i}) unless params[:sid].blank?
- @search.merge!({ :classification_id => params[:classification_id] }) unless params[:classification_id].to_i.zero?
+ unless params[:classification_id].blank?
+ @search.merge!({:classification_id => params[:classification_id].to_i})
+ end
- @search.merge!({ :"ip.ip_src" => IPAddr.new("#{params[:ip_src]}") }) unless (params[:ip_src] == "") || !params.has_key?(:ip_src)
+ unless params[:signature_name].blank?
+ @search.merge!({
+ :"signature.sig_name".like => "%#{params[:signature_name]}%"
+ })
+ end
+
+ unless params[:src_port].blank?
+ @search.merge!({:"tcp.tcp_sport" => params[:src_port].to_i})
+ end
+
+ unless params[:dst_port].blank?
+ @search.merge!({:"tcp.tcp_dport" => params[:dst_port].to_i})
+ end
+
+ ### IPAddr
+ unless params[:ip_src].blank?
+ if params[:ip_src].match(/\d+\/\d+/)
+ range = NetAddr::CIDR.create("#{params[:ip_src]}")
+ @search.merge!({
+ :"ip.ip_src".gte => IPAddr.new(range.first),
+ :"ip.ip_src".lte => IPAddr.new(range.last),
+ })
+ else
+ @search.merge!({:"ip.ip_src".like => IPAddr.new("#{params[:ip_src]}")})
+ end
+ end
- @search.merge!({ :"ip.ip_dst" => IPAddr.new("#{params[:ip_dst]}") }) unless (params[:ip_dst] == "") || !params.has_key?(:ip_dst)
+ unless params[:ip_dst].blank?
+ if params[:ip_dst].match(/\d+\/\d+/)
+ range = NetAddr::CIDR.create("#{params[:ip_dst]}")
+ @search.merge!({
+ :"ip.ip_dst".gte => IPAddr.new(range.first),
+ :"ip.ip_dst".lte => IPAddr.new(range.last),
+ })
+ else
+ @search.merge!({:"ip.ip_dst".like => IPAddr.new("#{params[:ip_dst]}")})
+ end
+ end
- @search.merge!({ :notes_count.gt => params[:notes_count] }) if params.has_key?(:notes_count)
+ unless params[:severity].blank?
+ @search.merge!({:"signature.sig_priority" => params[:severity].to_i})
+ end
- @search.merge!({ :users_count.gt => params[:users_count] }) if params.has_key?(:users_count)
+ # Timestamp
+ if params[:timestamp].blank?
- # Debug
- # puts @search.to_yaml
+ unless params[:time_start].blank? || params[:time_end].blank?
+ @search.merge!({
+ :conditions => ['timestamp >= ? AND timestamp <= ?',
+ Time.at(params[:time_start].to_i),
+ Time.at(params[:time_end].to_i)
+ ]})
+ end
- return all(@search) if params[:src_port].to_i.zero? && params[:dst_port].to_i.zero?
+ else
- if params[:dst_port].to_i.zero?
- return all(@search) && all(:"tcp.tcp_sport" => params[:src_port].to_i) | all(:"udp.udp_sport" => params[:src_port].to_i)
- elsif params[:src_port].to_i.zero?
- return all(@search) && all(:"tcp.tcp_dport" => params[:dst_port].to_i) | all(:"udp.udp_dport" => params[:dst_port].to_i)
+ if params[:timestamp] =~ /\s\-\s/
+ start_time, end_time = params[:timestamp].split(' - ')
+ @search.merge!({:conditions => ['timestamp >= ? AND timestamp <= ?',
+ Chronic.parse(start_time).beginning_of_day,
+ Chronic.parse(end_time).end_of_day]})
else
- return all(@search) && (all(:"tcp.tcp_sport" => params[:src_port].to_i) | all(:"udp.udp_sport" => params[:src_port].to_i) & all(:"tcp.tcp_dport" => params[:dst_port].to_i) | all(:"udp.udp_dport" => params[:dst_port].to_i))
+ @search.merge!({:conditions => ['timestamp >= ? AND timestamp <= ?',
+ Chronic.parse(params[:timestamp]).beginning_of_day,
+ Chronic.parse(params[:timestamp]).end_of_day]})
end
- rescue
- all(@search)
+
end
+
+ unless params[:severity].blank?
+ @search.merge!({:"signature.sig_priority" => params[:severity].to_i})
+ end
+
+ @search
+
+ rescue NetAddr::ValidationError => e
+ {}
+ rescue ArgumentError => e
+ {}
end
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/favorite.rb
^
|
@@ -22,7 +22,8 @@
self.user.up(:favorites_count) if self.user
end
- before :destroy do
+ before :destroy! do
+ puts 'in favorite down'
self.event.down(:users_count) if self.event
self.user.down(:favorites_count) if self.user
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/ip.rb
^
|
@@ -10,32 +10,59 @@
property :cid, Integer, :key => true, :index => true
- property :ip_src, NumericIPAddr, :index => true, :min => 0, :required => true, :default => 0
+ property :ip_src, NumericIPAddr, :index => true, :min => 0,
+ :required => true, :default => 0
- property :ip_dst, NumericIPAddr, :index => true, :min => 0, :required => true, :default => 0
+ property :ip_dst, NumericIPAddr, :index => true, :min => 0,
+ :required => true, :default => 0
- property :ip_ver, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_ver, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_hlen, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_hlen, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_tos, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_tos, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_len, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_len, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_id, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_id, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_flags, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_flags, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_off, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_off, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_ttl, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_ttl, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_proto, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_proto, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- property :ip_csum, Integer, :lazy => true, :min => 0, :required => true, :default => 0
+ property :ip_csum, Integer, :lazy => true, :min => 0, :required => true,
+ :default => 0
- belongs_to :sensor, :parent_key => [ :sid ], :child_key => [ :sid ], :required => true
+ belongs_to :sensor, :parent_key => [ :sid ], :child_key => [ :sid ],
+ :required => true
- has n, :events, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ], :constraint => :destroy
+ has n, :events, :parent_key => [ :sid, :cid ], :child_key => [ :sid, :cid ],
+ :constraint => :destroy
+
+ def geoip
+ @geoip_hash ||= {}
+
+ if @geoip_hash.empty?
+ @geoip_hash = {
+ :source => Snorby::Geoip.lookup(self.ip_src.to_s),
+ :destination => Snorby::Geoip.lookup(self.ip_dst.to_s)
+ }
+ end
+
+ @geoip_hash
+ end
end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/models/lookup.rb
^
|
@@ -0,0 +1,17 @@
+class Lookup
+ include DataMapper::Resource
+
+ property :id, Serial
+
+ property :title, String
+
+ property :value, Text
+
+
+ def build(args={})
+ args.fetch(:ip, '')
+ args.fetch(:port, '')
+ value.sub(/\$\{ip\}/, "#{args[:ip]}").sub(/\$\{port\}/, "#{args[:port]}")
+ end
+
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/setting.rb
^
|
@@ -7,7 +7,8 @@
:lookups,
:notes,
:packet_capture,
- :packet_capture_auto_auth
+ :packet_capture_auto_auth,
+ :autodrop
]
include DataMapper::Resource
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/models/user.rb
^
|
@@ -11,8 +11,13 @@
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
- devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
-
+ if Snorby::CONFIG[:authentication_mode] == "cas"
+ devise :cas_authenticatable, :registerable, :trackable
+ property :email, String, :required => true, :unique => true
+ else
+ devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
+ end
+
attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
property :favorites_count, Integer, :index => true, :default => 0
@@ -58,9 +63,16 @@
:large => "500x500>",
:medium => "300x300>",
:small => "100x100#"
- }, :default_url => '/images/default_avatar.png', :processors => [:cropper]
+ }, :default_url => '/images/default_avatar.png', :processors => [:cropper],
+ :whiny => false
+
+ #validates_attachment_content_type :avatar, :content_type => ["image/png", "image/gif", "image/jpeg"]
+
+ validates_attachment_content_type :avatar, :content_type => ['image/jpeg', 'image/gif', 'image/png', 'image/pjpeg', 'image/x-png'],
+ :message => 'Uploaded file is not an image',
+ :if => Proc.new { |profile| profile.avatar.file? }
+
- validates_attachment_content_type :avatar, :content_type => ["image/png", "image/gif", "image/jpeg"]
has n, :notifications, :constraint => :destroy
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/admin/settings.html.erb
^
|
@@ -2,4 +2,4 @@
<li>Hello</li>
-<%- end -%>
\ No newline at end of file
+<%- end -%>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/classifications/_form.html.erb
^
|
@@ -5,12 +5,12 @@
<p>
<%= f.label 'Classification Name' %><br />
- <%= f.text_field :name, :class => 'required', :placeholder => 'Name...', :autocomplete => :off %>
+ <%= f.text_field :name, :class => 'required', :placeholder => 'Example: Web Attacks', :autocomplete => :off %>
</p>
<p>
<%= f.label 'Classification Description' %><br />
- <%= f.text_area :description, :class => 'required', :placeholder => 'Description...', :autocomplete => :off %>
+ <%= f.text_area :description, :class => 'required', :placeholder => 'Description', :autocomplete => :off %>
</p>
<%= form_actions do %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/classifications/edit.html.erb
^
|
@@ -1,4 +1,4 @@
-<%= title "Edit Classification", do -%>
+<%= title "Edit Classification" do -%>
<%= render :partial => 'settings/menu' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/classifications/new.html.erb
^
|
@@ -1,4 +1,4 @@
-<%= title "New Classification", do -%>
+<%= title "New Classification" do -%>
<%= render :partial => 'settings/menu' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_event.html.erb
^
|
@@ -15,12 +15,12 @@
</div>
<div class='severity small'><span class='severity sev<%= event.signature.severity_id %>'><%= event.signature.severity_id %></span></div>
- <div class='click sensor address' title='<%= event.sensor.sensor_name %>'><%= truncate(event.sensor.sensor_name, :length => 17, :omission => '...') %></div>
+ <div class='click sensor address' title='<%=h event.sensor.sensor_name %>'><%= truncate(event.sensor.sensor_name, :length => 17, :omission => '...') %></div>
<div class='click src_ip address'><%= event.ip.present? ? event.ip.ip_src : 'N/A' %></div>
<div class='click dst_ip address'><%= event.ip.present? ? event.ip.ip_dst : 'N/A' %></div>
<% if classification_css %>
- <div class='click signature'><span class='add_tipsy' title='<%= event.user.nil? ? '???' : event.user.name %> classified event as <%= event.classification.name %>'><%= truncate(event.signature.name, :length => 65, :omission => '...') %></span></div>
+ <div class='click signature'><span class='add_tipsy' title="<%= event.user.nil? ? '???' : event.user.name %> classified event as <%= event.classification.name %>"><%= truncate(event.signature.name, :length => 65, :omission => '...') %></span></div>
<% else %>
<div class='click signature'><span title='<%= event.signature.name %>'><%= truncate(event.signature.name, :length => 65, :omission => '...') %></span></div>
<% end %>
@@ -30,7 +30,7 @@
<span title="This event has <%= pluralize(event.notes_count, 'note') %>" class='add_tipsy round notes-count'><%= image_tag("icons/notes.png", :size => '16x16') %></span>
<% end %>
- <b title='Event ID: <%= event.sid %>.<%= event.cid %><br /><%= event.timestamp.strftime('%A, %b %d, %Y at %I:%M:%S %p') %>' class='add_tipsy'><%= event.pretty_time %></b>
+ <b title='Event ID: <%= event.sid %>.<%= event.cid %> <%= event.timestamp.strftime('%A, %b %d, %Y at %I:%M:%S %p') %>' class='add_tipsy'><%= event.pretty_time %></b>
</div>
@@ -38,4 +38,4 @@
<div style='display:none;' class='event-data' data='false'></div>
-</li>
\ No newline at end of file
+</li>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_events.html.erb
^
|
@@ -8,14 +8,36 @@
<li class='header'>
<div class='row'>
- <div class='small'><%= check_box_tag 'event-select-all', nil, false, :class => 'event-select-all' %></div>
- <div class='small'> </div>
- <div class='small'>Sev.</div>
- <div class='address'>Sensor</div>
- <div class='address'>Source IP</div>
- <div class='address'>Destination IP</div>
- <div class='signature'>Event Signature</div>
- <div class='timestamp'> </div>
+ <div class='small'>
+ <%= check_box_tag 'event-select-all', nil, false, :class => 'event-select-all' %>
+ </div>
+
+ <div class='small'> </div>
+
+ <div class='small'>
+ <%= sortable(:sig_priority, 'Sev.')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:sid, 'Sensor')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:ip_src, 'Source IP')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:ip_dst, 'Destination IP')%>
+ </div>
+
+ <div class='signature'>
+ <%= sortable(:sig_name, 'Event Signature')%>
+ </div>
+
+ <div class='timestamp'>
+ <%= sortable(:timestamp, 'Timestamp')%>
+ </div>
+
</div>
</li>
@@ -29,4 +51,4 @@
<%= pager(@events, request.fullpath) %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/events/_geoip.html.erb
^
|
@@ -0,0 +1,7 @@
+<div class='section-title plus'>GeoIP Information</div>
+
+<div id="geoip" class='plus'>
+
+</div>
+
+
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_hotkeys.html.erb
^
|
@@ -13,4 +13,4 @@
</script>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_ip.html.erb
^
|
@@ -19,9 +19,55 @@
</tr>
<tbody>
<tr>
- <td style='width:150px;' class='first'><a href='/events/lookup?address=<%= @event.ip.ip_src %>' data-address='<%= @event.ip.ip_src %>' class='ip-button snorbybox'><%= @event.ip.ip_src %></a></td>
- <td style='width:150px;'><a href='/events/lookup?address=<%= @event.ip.ip_dst %>' data-address='<%= @event.ip.ip_dst %>' class='ip-button snorbybox'><%= @event.ip.ip_dst %></a></td>
- <td><%= @event.ip.ip_ver %></td>
+
+ <td style='width:150px;' class='first'>
+ <a href='/events/lookup?address=<%= @event.ip.ip_src %>'
+ data-address='<%= @event.ip.ip_src %>' class='ip-button has-event-menu' onclick="return false;">
+
+ <%= @event.ip.ip_src %>
+ <%= clippy(@event.ip.ip_src, '#FFFFFF', "src-#{@event.id}") %>
+ </a>
+
+ <dl class='event-sub-menu round shadow push-down' style='display:none;'>
+ <dd><%= link_to 'Basic Source Lookup', "/events/lookup?address=#{@event.ip.ip_src}", :class => 'snorbybox' %></dd>
+
+ <% @lookups.each do |lookup| %>
+ <dd>
+ <%= link_to lookup.title,
+ lookup.build(:ip => @event.ip.ip_src, :port => @event.source_port),
+ :target => '_blank' %>
+ </dd>
+ <% end %>
+
+ <dd><%= link_to "Snorby Search By Source", results_path(:search => {:ip_src => @event.ip.ip_src}) %></dd>
+ </dl>
+
+ </td>
+
+ <td style='width:150px;'>
+ <a href='/events/lookup?address=<%= @event.ip.ip_dst %>'
+ data-address='<%= @event.ip.ip_dst %>' class='ip-button has-event-menu'>
+
+ <%= @event.ip.ip_dst %>
+ <%= clippy(@event.ip.ip_dst, '#FFFFFF', "dst-#{@event.id}") %>
+ </a>
+
+ <dl class='event-sub-menu round shadow push-down' style='display:none;'>
+ <dd><%= link_to 'Basic Destination Lookup', "/events/lookup?address=#{@event.ip.ip_dst}", :class => 'snorbybox' %></dd>
+
+ <% @lookups.each do |lookup| %>
+ <dd>
+ <%= link_to lookup.title,
+ lookup.build(:ip => @event.ip.ip_dst, :port => @event.destination_port),
+ :target => '_blank' %>
+ </dd>
+ <% end %>
+
+ <dd><%= link_to "Snorby Search By Destination", results_path(:search => {:ip_dst => @event.ip.ip_dst}) %></dd>
+ </dl
+ </td>
+
+ <td><%= @event.ip.ip_ver %></td>
<td><%= @event.ip.ip_hlen %></td>
<td><%= @event.ip.ip_tos %></td>
<td><%= @event.ip.ip_len %></td>
@@ -35,4 +81,4 @@
</tbody>
</table>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_show.html.erb
^
|
@@ -11,7 +11,7 @@
<li>
<%= link_to "Packet Capture Options", '#', :class => 'dark-button has-event-menu' %>
- <dl id='event-sub-menu' class='round shadow' style='display:none;'>
+ <dl class='event-sub-menu round shadow' style='display:none;'>
<% if @event.ip.present? %>
@@ -42,7 +42,7 @@
<li>
<%= link_to "Event Export Options", '#', :class => 'dark-button has-event-menu' %>
- <dl id='event-sub-menu' class='round shadow' style='display:none;'>
+ <dl class='event-sub-menu round shadow' style='display:none;'>
<dd><%= link_to "XML", "/events/show/#{@event.sid}/#{@event.cid}.xml", :class => '' %></dd>
<dd><%= link_to "E-mail Event", create_email_events_path(:sid => @event.sid, :cid => @event.cid), :class => 'snorbybox' %></dd>
</dl>
@@ -57,7 +57,7 @@
<%= render :partial => 'events/ip' if @event.ip.present? %>
<%= render :partial => 'events/signature' %>
-
+
<% if @event.tcp? %>
<%= render :partial => 'events/tcp' %>
<% elsif @event.udp? %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/_signature.html.erb
^
|
@@ -7,18 +7,33 @@
<th class='first'>Generator ID</th>
<th>Signature ID</th>
<th>Signature Revision</th>
- <th>Activity (<%= @event.signature.event_percentage(true) %>)</th>
+ <th>Activity (<%= @event.signature.event_percentage(true) %>)</th>
+ <th> </th>
<th class='last'></th>
</tr>
<tbody>
<tr>
- <td class='first'><%= @event.signature.sig_gid %></td>
- <td><%= @event.signature.sig_sid %></td>
- <td><%= @event.signature.sig_rev %></td>
- <td><%= css_chart(@event.signature.event_percentage) %></td>
- <td style='width:200px;' class='last'><%= link_to "Query Signature Database", @event.signature_url, :target => '_blank' %></td>
+ <td class='first'><%= @event.signature.sig_gid || 'N/A' %></td>
+ <td><%= @event.signature.sig_sid || 'N/A' %></td>
+ <td><%= @event.signature.sig_rev || 'N/A' %></td>
+
+ <td class='search-by-signature add_tipsy'
+ title="View all '<%= @event.signature.name%>' events."
+ data-url="/results?search[signature_name]=<%= @event.signature.name %>">
+ <%= css_chart(@event.signature.event_percentage) %>
+ </td>
+
+ <td style='width:190px;' class=''>
+ <%= link_to "Query Signature Database",
+ @event.signature_url, :target => '_blank' %>
+ </td>
+
+ <td style='width:90px;' class='last'>
+ <%= link_to "View Rule", rule_events_path(:sid => @event.sid, :cid => @event.cid), :class => 'snorbybox', :target => '_blank' %>
+ </td>
+
</tr>
</tbody>
</table>
-
-</div>
\ No newline at end of file
+
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/activity.html.erb
^
|
@@ -1,7 +1,7 @@
-<%= title "#{@user.name}'s Event Queue" do %>
+<%= title "#{@user.name}'s Event Queue <i>(#{pluralize(@events.count, 'event')} in queue)</i>".html_safe, "#{@user.name}'s Event Queue" do %>
+ <%= menu_item "Hotkeys", hotkey_events_path, 'events/keyboard.png', :class => 'snorbybox' %>
<%= render :partial => 'events/menu' %>
<% end %>
<%= render :partial => 'events/events' %>
-
-<%= render :partial => 'events/hotkeys' %>
\ No newline at end of file
+<%= render :partial => 'events/hotkeys' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/create_email.html.erb
^
|
@@ -2,7 +2,7 @@
<%= snorby_box("Email Event Information", false) do %>
- <div id='snorbybox-content' class='grid_10'>
+ <div id='snorbybox-content' class=''>
<%= form_tag '/email', :class => 'email-event-information validate' do %>
@@ -56,12 +56,13 @@
<% end %>
- <%= form_actions do %>
- <%= button "Email Event Information", :class => 'success email-event-information' %>
- <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
- <% end %>
- <br />
+ <%= snorby_box_footer do %>
+ <%= form_actions do %>
+ <%= button "Email Event Information", :class => 'success email-event-information' %>
+ <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
+ <% end %>
+ <% end %>
</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/create_mass_action.html.erb
^
|
@@ -32,14 +32,18 @@
<br />
- <div id='snorbybox-form-full'>
+ <div id='snorbybox-form-full' class='clearfix'>
<%= label_tag 'Select Sensors <i>(optional - Blank = All)</i>'.html_safe %><br />
- <%= select_tag :sensor_ids, options_from_collection_for_select(Sensor.all, :sid, :name), { :multiple => true, :size => 10, :id => "sensor_select" } %>
+ <%= select_tag :sensor_ids, options_from_collection_for_select(Sensor.all, :sid, :name),
+ { :multiple => true,
+ :size => 10,
+ :id => "sensor_select"
+ } %>
</div>
<br />
- <div id='snorbybox-form-full'>
+ <div id='snorbybox-form-full' class='clearfix'>
<%= check_box_tag("reclassify", 1) %>
<%= label_tag "I would like to apply this classification to already classified events matching this criteria.".html_safe %><br />
</div>
@@ -55,18 +59,21 @@
</div>
<br />
+
+ </div>
+
+ <% end %>
- <%= form_actions do %>
- <%= button "Perform Mass Action", :class => 'success mass-action' %>
+ <%= snorby_box_footer do %>
- <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
+ <%= form_actions do %>
+ <%= button "Perform Mass Action", :class => 'success mass-action' %>
+ <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
+ <% end %>
- <% end %>
+ <% end %>
- </div>
-
- <% end %>
<% end %>
@@ -82,4 +89,4 @@
<% end %>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/hotkey.html.erb
^
|
@@ -9,7 +9,7 @@
<dd><span class='hotkey'>← <strong>or</strong> →</span> Paginate Left & Right</dd>
- <dd><span class='hotkey'>ctrl <em>+</em> ← <strong>or</strong> ctrl <em>+</em> →</span> Move To First & Last Page</dd>
+ <dd><span class='hotkey'>Shift <em>+</em> ← <strong>or</strong> Shift <em>+</em> →</span> Move To First & Last Page</dd>
<dd><span class='hotkey'>ctrl <em>+</em> shift <em>+</em> a</span> Select All Events on Page</dd>
@@ -19,11 +19,11 @@
<dd><span class='hotkey'>ctrl <em>+</em> shift <em>+</em> 3</span> Select All Low Severity Events</dd>
- <dd><span class='hotkey'>shift <em>+</em> ← <strong>or</strong> shift <em>+</em> →</span> Paginate Notes Left & Right</dd>
+ <dd><span class='hotkey'>Alt <em>+</em> ← <strong>or</strong> Alt <em>+</em> →</span> Paginate Notes Left & Right</dd>
- <dd><span class='hotkey'>ctrl <em>+</em> ↑ <strong>or</strong> ctrl <em>+</em> ↓</span> Move up/down the event listing</dd>
+ <dd><span class='hotkey'>Shift <em>+</em> ↑ <strong>or</strong> Shift <em>+</em> ↓</span> Move up/down the event listing</dd>
- <dd><span class='hotkey'>ctrl <em>+</em> o</span> Open the selected event</dd>
+ <dd><span class='hotkey'>shift <em>+</em> return</span> Open the selected event</dd>
</dl>
@@ -63,4 +63,4 @@
</div>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/index.html.erb
^
|
@@ -5,13 +5,13 @@
var last_event = <%= Event.last.json_time %>;
$('div#wrapper').attr({last_event: last_event.time});
- setInterval (function () {
- $.get('/events/last', function(data) {
+ setInterval (function () {
+ $.get('/events/last', function(data) {
var old_id = $('div#wrapper').attr('last_event');
var page = parseInt($('.pager li.active a').html());
if (old_id != data.time) {
$.get('events/since', {timestamp: old_id}, function (data) {
- if (data.events.length != 0) {
+ if (data.events && data.events.length != 0) {
if (page <= '1') {
if ($('div.new_events').length == 0) {
@@ -50,4 +50,4 @@
<%= render :partial => 'events/events' %>
-<%= render :partial => 'events/hotkeys' %>
\ No newline at end of file
+<%= render :partial => 'events/hotkeys' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/mass_action.js.erb
^
|
@@ -1 +1,2 @@
-flash_message.push({type: 'success', message: "Mass Classification In Progress..."});flash();
\ No newline at end of file
+flash_message.push({type: 'success', message: "Mass Classification In Progress..."});flash();
+$.scrollTo('#header', 500);
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/packet_capture.html.erb
^
|
@@ -59,15 +59,15 @@
</div>
<% end %>
-
- <div class='grid_5'>
- <%= form_actions do %>
- <%= button "Fetch Packet", :class => 'success request_packet_capture' %>
- <%= button "Goto DeepSee", :class => 'success request_packet_capture', :"data-deepsee" => true if Setting.find(:packet_capture_type) == 'solera' %>
- <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
- <% end %>
- </div>
+
+ <%= snorby_box_footer do %>
+ <%= form_actions do %>
+ <%= button "Fetch Packet", :class => 'success request_packet_capture' %>
+ <%= button "Goto DeepSee", :class => 'success request_packet_capture', :"data-deepsee" => true if Setting.find(:packet_capture_type) == 'solera' %>
+ <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
+ <% end %>
+ <% end %>
</div>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/queue.html.erb
^
|
@@ -1,7 +1,8 @@
-<%= title "My Queue" do %>
+<%= title "My Event Queue <i>(#{pluralize(@events.count, 'event')} in queue)</i>".html_safe, 'My Event Queue' do %>
+ <%= menu_item "Hotkeys", hotkey_events_path, 'events/keyboard.png', :class => 'snorbybox' %>
<%= render :partial => 'events/menu' %>
<% end %>
<%= render :partial => 'events/events' %>
-<%= render :partial => 'events/hotkeys' %>
\ No newline at end of file
+<%= render :partial => 'events/hotkeys' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/request_packet_capture.js.erb
^
|
@@ -1,8 +1,5 @@
-//console.log('<%= @packet.html_safe %>');
-//window.open("<%= @packet.html_safe %>");
-
window.location = "<%= @packet.html_safe %>";
flash_message.push({type: 'success', message: "Sending packet capture request, please wait..."});
flash();
$.scrollTo('#header', 500);
-$('a#fancybox-close').click();
\ No newline at end of file
+$('a#fancybox-close').click();
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/events/rule.html.erb
^
|
@@ -0,0 +1,19 @@
+<%= snorby_box("Rule Information", false) do %>
+
+ <strong>Signature:</strong> <%= @event.signature.name %>
+ <br />
+
+ <div class="rule-data" style=''>
+ <pre><%= @rule.to_s %></pre>
+ </div>
+
+ <br />
+
+ <%= snorby_box_footer do %>
+ <%= form_actions do %>
+ <%= button "Cancel", :class => 'warning cancel-snorbybox' %>
+ <% end %>
+ <% end %>
+
+<% end %>
+
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/events/view.html.erb
^
|
@@ -2,4 +2,4 @@
<%= render :partial => 'events/events' %>
-<%= render :partial => 'events/hotkeys' %>
\ No newline at end of file
+<%= render :partial => 'events/hotkeys' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/jobs/_jobs.html.erb
^
|
@@ -20,4 +20,4 @@
<br />
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/layouts/_content.html.erb
^
|
@@ -1,9 +1,5 @@
-<div id="wrapper">
-
- <div id="content" class='shadow container_12'>
+<div id="content" class='container_12'>
- <%= yield %>
-
- </div>
-
-</div>
\ No newline at end of file
+ <%= yield %>
+
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/layouts/application.html.erb
^
|
@@ -19,9 +19,10 @@
<% end %>
</script>
+ <%= csrf_meta_tag %>
+
<%= include_stylesheets :snorby, :media => 'all' %>
<%= include_javascripts :snorby %>
- <%= csrf_meta_tag %>
<%= yield(:header) %>
@@ -40,7 +41,9 @@
<%= render :partial => 'layouts/header.html.erb' %>
- <%= render :partial => 'layouts/content.html.erb' %>
+ <div id="wrapper">
+ <%= render :partial => 'layouts/content.html.erb' %>
+ </div>
<%= render :partial => 'layouts/footer.html.erb' %>
@@ -55,4 +58,4 @@
<%= yield(:footer) %>
</body>
-</html>
\ No newline at end of file
+</html>
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/layouts/login.html.erb
^
|
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+
+<%= render :partial => 'layouts/version.html.erb' %>
+
+<html class='login'>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <title><%= content_for?(:title) ? yield(:title) : "Snorby #{Snorby::VERSION}" %></title>
+
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="description" content="Snorby - All About Simplicity" />
+ <link rel="icon" href="/favicon.png" type="image/png" />
+
+ <%= csrf_meta_tag %>
+
+ <%= include_stylesheets :snorby, :media => 'all' %>
+ <%= include_javascripts :snorby %>
+
+ </head>
+
+ <body class='login'>
+
+ <div id="login">
+ <div id="wrapper">
+ <div id="login-logo"></div>
+ <%= render :partial => 'layouts/content.html.erb' %>
+ </div>
+ </div>
+
+ <%- flash.each do |type, message| -%>
+
+ <script type="text/javascript" charset="utf-8">
+ flash_message.push({type: "<%= type %>", message: "<%= message %>"}); flash();
+ </script>
+
+ <%- end -%>
+
+ </body>
+</html>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/layouts/pdf.html.erb
^
|
@@ -3,6 +3,7 @@
<html>
<head>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<% @severities ||= Severity.all %>
<script type="text/javascript">
@@ -11,599 +12,675 @@
<% end %>
</script>
- <script type="text/javascript">
- (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b==="find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
- a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" "," ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
- 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case"only":case"first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case"last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case"nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m==="="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j={},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
- e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);(function($){$.fn.simpledraw=function(width,height,use_existing){if(use_existing&&this[0].vcanvas)return this[0].vcanvas;if(width==undefined)width=$(this).innerWidth();if(height==undefined)height=$(this).innerHeight();if($.browser.hasCanvas){return new vcanvas_canvas(width,height,this);}else if($.browser.msie){return new vcanvas_vml(width,height,this);}else{return false;}};var pending=[];$.fn.sparkline=function(uservalues,options){var options=$.extend({type:'line',lineColor:'#00f',fillColor:'#cdf',defaultPixelsPerValue:3,width:'auto',height:'auto',composite:false},options?options:{});return this.each(function(){var render=function(){var values=(uservalues=='html'||uservalues==undefined)?$(this).text().split(','):uservalues;var width=options.width=='auto'?values.length*options.defaultPixelsPerValue:options.width;if(options.height=='auto'){if(!options.composite||!this.vcanvas){var tmp=document.createElement('span');tmp.innerHTML='a';$(this).html(tmp);height=$(tmp).innerHeight();$(tmp).remove();}}else{height=options.height;}
- $.fn.sparkline[options.type].call(this,values,options,width,height);}
- if(($(this).html()&&$(this).is(':hidden'))||($.fn.jquery<"1.3.0"&&$(this).parents().is(':hidden'))){pending.push([this,render]);}else{render.call(this);}});};$.sparkline_display_visible=function(){for(var i=pending.length-1;i>=0;i--){var el=pending[i][0];if($(el).is(':visible')&&!$(el).parents().is(':hidden')){pending[i][1].call(el);pending.splice(i,1);}}};$.fn.sparkline.line=function(values,options,width,height){var options=$.extend({spotColor:'#f80',spotRadius:1.5,minSpotColor:'#f80',maxSpotColor:'#f80',lineWidth:1,normalRangeMin:undefined,normalRangeMax:undefined,normalRangeColor:'#ccc',chartRangeMin:undefined,chartRangeMax:undefined,chartRangeMinX:undefined,chartRangeMaxX:undefined},options?options:{});var xvalues=[],yvalues=[],yminmax=[];for(i=0;i<values.length;i++){var v=values[i];var isstr=typeof(values[i])=='string';var isarray=typeof(values[i])=='object'&&values[i]instanceof Array;var sp=isstr&&values[i].split(':');if(isstr&&sp.length==2){xvalues.push(Number(sp[0]));yvalues.push(Number(sp[1]));yminmax.push(Number(sp[1]));}else if(isarray){xvalues.push(values[i][0]);yvalues.push(values[i][1]);yminmax.push(values[i][1]);}else{xvalues.push(i);if(values[i]===null||values[i]=='null'){yvalues.push(null);}else{yvalues.push(Number(values[i]));yminmax.push(Number(values[i]));}}}
- if(options.xvalues){xvalues=options.xvalues;}
- var maxy=Math.max.apply(Math,yminmax);var maxyval=maxy;var miny=Math.min.apply(Math,yminmax);var minyval=miny;var maxx=Math.max.apply(Math,xvalues);var maxxval=maxx;var minx=Math.min.apply(Math,xvalues);var minxval=minx;if(options.normalRangeMin!=undefined){if(options.normalRangeMin<miny)
- miny=options.normalRangeMin;if(options.normalRangeMax>maxy)
- maxy=options.normalRangeMax;}
- if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<miny)){miny=options.chartRangeMin;}
- if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>maxy)){maxy=options.chartRangeMax;}
- if(options.chartRangeMinX!=undefined&&(options.chartRangeClipX||options.chartRangeMinX<minx)){minx=options.chartRangeMinX;}
- if(options.chartRangeMaxX!=undefined&&(options.chartRangeClipX||options.chartRangeMaxX>maxx)){maxx=options.chartRangeMaxX;}
- var rangex=maxx-minx==0?1:maxx-minx;var rangey=maxy-miny==0?1:maxy-miny;var vl=yvalues.length-1;if(vl<1){this.innerHTML='';return;}
- var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var canvas_top=0;var canvas_left=0;if(options.spotRadius&&(canvas_width<(options.spotRadius*4)||canvas_height<(options.spotRadius*4))){options.spotRadius=0;}
- if(options.spotRadius){if(options.minSpotColor||(options.spotColor&&yvalues[vl]==miny))
- canvas_height-=Math.ceil(options.spotRadius);if(options.maxSpotColor||(options.spotColor&&yvalues[vl]==maxy)){canvas_height-=Math.ceil(options.spotRadius);canvas_top+=Math.ceil(options.spotRadius);}
- if(options.minSpotColor||options.maxSpotColor&&(yvalues[0]==miny||yvalues[0]==maxy)){canvas_left+=Math.ceil(options.spotRadius);canvas_width-=Math.ceil(options.spotRadius);}
- if(options.spotColor||(options.minSpotColor||options.maxSpotColor&&(yvalues[vl]==miny||yvalues[vl]==maxy)))
- canvas_width-=Math.ceil(options.spotRadius);}
- canvas_height--;if(options.normalRangeMin!=undefined){var ytop=canvas_top+Math.round(canvas_height-(canvas_height*((options.normalRangeMax-miny)/rangey)));var height=Math.round((canvas_height*(options.normalRangeMax-options.normalRangeMin))/rangey);target.drawRect(canvas_left,ytop,canvas_width,height,undefined,options.normalRangeColor);}
- var path=[];var paths=[path];for(var i=0,vlen=yvalues.length;i<vlen;i++){var x=xvalues[i],y=yvalues[i];if(y===null){if(i){if(yvalues[i-1]!==null){path=[];paths.push(path);}}}else{if(y<miny)y=miny;if(y>maxy)y=maxy;if(!path.length){path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+canvas_height]);}
- path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((y-miny)/rangey)))]);}}
- for(var i=0,plen=paths.length;i<plen;i++){path=paths[i];if(!path.length)
- continue;if(options.fillColor){path.push([path[path.length-1][0],canvas_top+canvas_height-1]);target.drawShape(path,undefined,options.fillColor);path.pop();}
- if(path.length>2){path[0]=[path[0][0],path[1][1]];}
- target.drawShape(path,options.lineColor,undefined,options.lineWidth);}
- if(options.spotRadius&&options.spotColor){target.drawCircle(canvas_left+Math.round(xvalues[xvalues.length-1]*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((yvalues[vl]-miny)/rangey))),options.spotRadius,undefined,options.spotColor);}
- if(maxy!=minyval){if(options.spotRadius&&options.minSpotColor){var x=xvalues[yvalues.indexOf(minyval)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((minyval-miny)/rangey))),options.spotRadius,undefined,options.minSpotColor);}
- if(options.spotRadius&&options.maxSpotColor){var x=xvalues[yvalues.indexOf(maxyval)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((maxyval-miny)/rangey))),options.spotRadius,undefined,options.maxSpotColor);}}}else{this.innerHTML='';}};$.fn.sparkline.bar=function(values,options,width,height){var options=$.extend({type:'bar',barColor:'#00f',negBarColor:'#f44',zeroColor:undefined,nullColor:undefined,zeroAxis:undefined,barWidth:4,barSpacing:1,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false,colorMap:undefined},options?options:{});var width=(values.length*options.barWidth)+((values.length-1)*options.barSpacing);var num_values=[];for(var i=0,vlen=values.length;i<vlen;i++){if(values[i]=='null'||values[i]===null){values[i]=null;}else{values[i]=Number(values[i]);num_values.push(Number(values[i]));}}
- var max=Math.max.apply(Math,num_values);var min=Math.min.apply(Math,num_values);if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<min)){min=options.chartRangeMin;}
- if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>max)){max=options.chartRangeMax;}
- if(options.zeroAxis==undefined)options.zeroAxis=min<0;var range=max-min==0?1:max-min;if($.isArray(options.colorMap)){var colorMapByIndex=options.colorMap;var colorMapByValue=null;}else{var colorMapByIndex=null;var colorMapByValue=options.colorMap;}
- var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var yzero=min<0&&options.zeroAxis?canvas_height-Math.round(canvas_height*(Math.abs(min)/range))-1:canvas_height-1;for(var i=0,vlen=values.length;i<vlen;i++){var x=i*(options.barWidth+options.barSpacing);var val=values[i];if(val===null){if(options.nullColor){color=options.nullColor;val=(options.zeroAxis&&min<0)?0:min;var height=1;var y=(options.zeroAxis&&min<0)?yzero:canvas_height-height;}else{continue;}}else{if(val<min)val=min;if(val>max)val=max;var color=(val<0)?options.negBarColor:options.barColor;if(options.zeroAxis&&min<0){var height=Math.round(canvas_height*((Math.abs(val)/range)))+1;var y=(val<0)?yzero:yzero-height;}else{var height=Math.round(canvas_height*((val-min)/range))+1;var y=canvas_height-height;}
- if(val==0&&options.zeroColor!=undefined){color=options.zeroColor;}
- if(colorMapByValue&&colorMapByValue[val]){color=colorMapByValue[val];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
- if(color===null){continue;}}
- target.drawRect(x,y,options.barWidth-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.tristate=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({barWidth:4,barSpacing:1,posBarColor:'#6f6',negBarColor:'#f44',zeroBarColor:'#999',colorMap:{}},options);var width=(values.length*options.barWidth)+((values.length-1)*options.barSpacing);if($.isArray(options.colorMap)){var colorMapByIndex=options.colorMap;var colorMapByValue=null;}else{var colorMapByIndex=null;var colorMapByValue=options.colorMap;}
- var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var half_height=Math.round(canvas_height/2);for(var i=0,vlen=values.length;i<vlen;i++){var x=i*(options.barWidth+options.barSpacing);if(values[i]<0){var y=half_height;var height=half_height-1;var color=options.negBarColor;}else if(values[i]>0){var y=0;var height=half_height-1;var color=options.posBarColor;}else{var y=half_height-1;var height=2;var color=options.zeroBarColor;}
- if(colorMapByValue&&colorMapByValue[values[i]]){color=colorMapByValue[values[i]];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
- if(color===null){continue;}
- target.drawRect(x,y,options.barWidth-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.discrete=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({lineHeight:'auto',thresholdColor:undefined,thresholdValue:0,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false},options);width=options.width=='auto'?values.length*2:width;var interval=Math.floor(width/values.length);var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var line_height=options.lineHeight=='auto'?Math.round(canvas_height*0.3):options.lineHeight;var pheight=canvas_height-line_height;var min=Math.min.apply(Math,values);var max=Math.max.apply(Math,values);if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<min)){min=options.chartRangeMin;}
- if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>max)){max=options.chartRangeMax;}
- var range=max-min;for(var i=0,vlen=values.length;i<vlen;i++){var val=values[i];if(val<min)val=min;if(val>max)val=max;var x=(i*interval);var ytop=Math.round(pheight-pheight*((val-min)/range));target.drawLine(x,ytop,x,ytop+line_height,(options.thresholdColor&&val<options.thresholdValue)?options.thresholdColor:options.lineColor);}}else{this.innerHTML='';}};$.fn.sparkline.bullet=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({targetColor:'red',targetWidth:3,performanceColor:'blue',rangeColors:['#D3DAFE','#A8B6FF','#7F94FF'],base:undefined},options);width=options.width=='auto'?'4.0em':width;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width-Math.ceil(options.targetWidth/2);var canvas_height=target.pixel_height;var min=Math.min.apply(Math,values);var max=Math.max.apply(Math,values);if(options.base==undefined){var min=min<0?min:0;}else{min=options.base;}
- var range=max-min;for(i=2,vlen=values.length;i<vlen;i++){var rangeval=parseInt(values[i]);var rangewidth=Math.round(canvas_width*((rangeval-min)/range));target.drawRect(0,0,rangewidth-1,canvas_height-1,options.rangeColors[i-2],options.rangeColors[i-2]);}
- var perfval=parseInt(values[1]);var perfwidth=Math.round(canvas_width*((perfval-min)/range));target.drawRect(0,Math.round(canvas_height*0.3),perfwidth-1,Math.round(canvas_height*0.4)-1,options.performanceColor,options.performanceColor);var targetval=parseInt(values[0]);var x=Math.round(canvas_width*((targetval-min)/range)-(options.targetWidth/2));var targettop=Math.round(canvas_height*0.10);var targetheight=canvas_height-(targettop*2);target.drawRect(x,targettop,options.targetWidth-1,targetheight-1,options.targetColor,options.targetColor);}else{this.innerHTML='';}};$.fn.sparkline.pie=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({sliceColors:['#f00','#0f0','#00f']},options);width=options.width=='auto'?height:width;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var radius=Math.floor(Math.min(canvas_width,canvas_height)/2);var total=0;for(var i=0,vlen=values.length;i<vlen;i++)
- total+=values[i];var next=0;if(options.offset){next+=(2*Math.PI)*(options.offset/360);}
- var circle=2*Math.PI;for(var i=0,vlen=values.length;i<vlen;i++){var start=next;var end=next;if(total>0){end=next+(circle*(values[i]/total));}
- target.drawPieSlice(radius,radius,radius,start,end,undefined,options.sliceColors[i%options.sliceColors.length]);next=end;}}};function quartile(values,q){if(q==2){var vl2=Math.floor(values.length/2);return values.length%2?values[vl2]:(values[vl2]+values[vl2+1])/2;}else{var vl4=Math.floor(values.length/4);return values.length%2?(values[vl4*q]+values[vl4*q+1])/2:values[vl4*q];}};$.fn.sparkline.box=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({raw:false,boxLineColor:'black',boxFillColor:'#cdf',whiskerColor:'black',outlierLineColor:'#333',outlierFillColor:'white',medianColor:'red',showOutliers:true,outlierIQR:1.5,spotRadius:1.5,target:undefined,targetColor:'#4a2',chartRangeMax:undefined,chartRangeMin:undefined},options);width=options.width=='auto'?'4.0em':width;minvalue=options.chartRangeMin==undefined?Math.min.apply(Math,values):options.chartRangeMin;maxvalue=options.chartRangeMax==undefined?Math.max.apply(Math,values):options.chartRangeMax;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;if(options.raw){if(options.showOutliers&&values.length>5){var loutlier=values[0],lwhisker=values[1],q1=values[2],q2=values[3],q3=values[4],rwhisker=values[5],routlier=values[6];}else{var lwhisker=values[0],q1=values[1],q2=values[2],q3=values[3],rwhisker=values[4];}}else{values.sort(function(a,b){return a-b;});var q1=quartile(values,1);var q2=quartile(values,2);var q3=quartile(values,3);var iqr=q3-q1;if(options.showOutliers){var lwhisker=undefined,rwhisker=undefined;for(var i=0,vlen=values.length;i<vlen;i++){if(lwhisker==undefined&&values[i]>q1-(iqr*options.outlierIQR))
- lwhisker=values[i];if(values[i]<q3+(iqr*options.outlierIQR))
- rwhisker=values[i];}
- var loutlier=values[0];var routlier=values[values.length-1];}else{var lwhisker=values[0];var rwhisker=values[values.length-1];}}
- var unitsize=canvas_width/(maxvalue-minvalue+1);var canvas_left=0;if(options.showOutliers){canvas_left=Math.ceil(options.spotRadius);canvas_width-=2*Math.ceil(options.spotRadius);var unitsize=canvas_width/(maxvalue-minvalue+1);if(loutlier<lwhisker)
- target.drawCircle((loutlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.spotRadius,options.outlierLineColor,options.outlierFillColor);if(routlier>rwhisker)
- target.drawCircle((routlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.spotRadius,options.outlierLineColor,options.outlierFillColor);}
- target.drawRect(Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q3-q1)*unitsize),Math.round(canvas_height*0.8),options.boxLineColor,options.boxFillColor);target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.lineColor);target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.whiskerColor);target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q3-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.lineColor);target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.whiskerColor);target.drawLine(Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.9),options.medianColor);if(options.target){var size=Math.ceil(options.spotRadius);target.drawLine(Math.round((options.target-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)-size),Math.round((options.target-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)+size),options.targetColor);target.drawLine(Math.round((options.target-minvalue)*unitsize+canvas_left-size),Math.round(canvas_height/2),Math.round((options.target-minvalue)*unitsize+canvas_left+size),Math.round(canvas_height/2),options.targetColor);}}else{this.innerHTML='';}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(entry){for(var i=0,vlen=this.length;i<vlen;i++){if(this[i]==entry)
- return i;}
- return-1;}}
- if($.browser.msie&&!document.namespaces['v']){document.namespaces.add('v','urn:schemas-microsoft-com:vml','#default#VML');}
- if($.browser.hasCanvas==undefined){var t=document.createElement('canvas');$.browser.hasCanvas=t.getContext!=undefined;}
- var vcanvas_base=function(width,height,target){};vcanvas_base.prototype={init:function(width,height,target){this.width=width;this.height=height;this.target=target;if(target[0])target=target[0];target.vcanvas=this;},drawShape:function(path,lineColor,fillColor,lineWidth){alert('drawShape not implemented');},drawLine:function(x1,y1,x2,y2,lineColor,lineWidth){return this.drawShape([[x1,y1],[x2,y2]],lineColor,lineWidth);},drawCircle:function(x,y,radius,lineColor,fillColor){alert('drawCircle not implemented');},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){alert('drawPieSlice not implemented');},drawRect:function(x,y,width,height,lineColor,fillColor){alert('drawRect not implemented');},getElement:function(){return this.canvas;},_insert:function(el,target){$(target).html(el);}};var vcanvas_canvas=function(width,height,target){return this.init(width,height,target);};vcanvas_canvas.prototype=$.extend(new vcanvas_base,{_super:vcanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);this.canvas=document.createElement('canvas');if(target[0])target=target[0];target.vcanvas=this;$(this.canvas).css({display:'inline-block',width:width,height:height,verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;$(this.canvas).css({width:this.pixel_width,height:this.pixel_height});},_getContext:function(lineColor,fillColor,lineWidth){var context=this.canvas.getContext('2d');if(lineColor!=undefined)
- context.strokeStyle=lineColor;context.lineWidth=lineWidth==undefined?1:lineWidth;if(fillColor!=undefined)
- context.fillStyle=fillColor;return context;},drawShape:function(path,lineColor,fillColor,lineWidth){var context=this._getContext(lineColor,fillColor,lineWidth);context.beginPath();context.moveTo(path[0][0]+0.5,path[0][1]+0.5);for(var i=1,plen=path.length;i<plen;i++){context.lineTo(path[i][0]+0.5,path[i][1]+0.5);}
- if(lineColor!=undefined){context.stroke();}
- if(fillColor!=undefined){context.fill();}},drawCircle:function(x,y,radius,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.arc(x,y,radius,0,2*Math.PI,false);if(lineColor!=undefined){context.stroke();}
- if(fillColor!=undefined){context.fill();}},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.moveTo(x,y);context.arc(x,y,radius,startAngle,endAngle,false);context.lineTo(x,y);context.closePath();if(lineColor!=undefined){context.stroke();}
- if(fillColor){context.fill();}},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x+width,y],[x+width,y+height],[x,y+height],[x,y]],lineColor,fillColor);}});var vcanvas_vml=function(width,height,target){return this.init(width,height,target);};vcanvas_vml.prototype=$.extend(new vcanvas_base,{_super:vcanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);if(target[0])target=target[0];target.vcanvas=this;this.canvas=document.createElement('span');$(this.canvas).css({display:'inline-block',position:'relative',overflow:'hidden',width:width,height:height,margin:'0px',padding:'0px',verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;;var groupel='<v:group coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'"'
- +' style="position:absolute;top:0;left:0;width:'+this.pixel_width+'px;height='+this.pixel_height+'px;"></v:group>';this.canvas.insertAdjacentHTML('beforeEnd',groupel);this.group=$(this.canvas).children()[0];},drawShape:function(path,lineColor,fillColor,lineWidth){var vpath=[];for(var i=0,plen=path.length;i<plen;i++){vpath[i]=''+(path[i][0])+','+(path[i][1]);}
- var initial=vpath.splice(0,1);lineWidth=lineWidth==undefined?1:lineWidth;var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="'+lineWidth+'" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var closed=vpath[0]==vpath[vpath.length-1]?'x ':'';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '
- +stroke
- +fill
- +' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '
- +' path="m '+initial+' l '+vpath.join(', ')+' '+closed+'e">'
- +' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawCircle:function(x,y,radius,lineColor,fillColor){x-=radius+1;y-=radius+1;var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:oval '
- +stroke
- +fill
- +' style="position:absolute;top:'+y+'px; left:'+x+'px; width:'+(radius*2)+'px; height:'+(radius*2)+'px"></v:oval>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){if(startAngle==endAngle){return;}
- if((endAngle-startAngle)==(2*Math.PI)){startAngle=0.0;endAngle=(2*Math.PI);}
- var startx=x+Math.round(Math.cos(startAngle)*radius);var starty=y+Math.round(Math.sin(startAngle)*radius);var endx=x+Math.round(Math.cos(endAngle)*radius);var endy=y+Math.round(Math.sin(endAngle)*radius);if(startx==endx&&starty==endy&&(endAngle-startAngle)<Math.PI)
- return;var vpath=[x-radius,y-radius,x+radius,y+radius,startx,starty,endx,endy];var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '
- +stroke
- +fill
- +' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '
- +' path="m '+x+','+y+' wa '+vpath.join(', ')+' x e">'
- +' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x,y+height],[x+width,y+height],[x+width,y],[x,y]],lineColor,fillColor);}});})(jQuery);(function(){var doc=document,win=window,math=Math,mathRound=math.round,mathFloor=math.floor,mathCeil=math.ceil,mathMax=math.max,mathMin=math.min,mathAbs=math.abs,mathCos=math.cos,mathSin=math.sin,mathPI=math.PI,deg2rad=mathPI*2/360,userAgent=navigator.userAgent,isIE=/msie/i.test(userAgent)&&!win.opera,docMode8=doc.documentMode==8,isWebKit=/AppleWebKit/.test(userAgent),hasSVG=win.SVGAngle||doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),hasTouch='ontouchstart'in doc.documentElement,colorCounter,symbolCounter,symbolSizes={},idCounter=0,timeFactor=1,garbageBin,defaultOptions,dateFormat,globalAnimation,pathAnim,UNDEFINED,DIV='div',ABSOLUTE='absolute',RELATIVE='relative',HIDDEN='hidden',PREFIX='highcharts-',VISIBLE='visible',PX='px',NONE='none',M='M',L='L',TRACKER_FILL='rgba(192,192,192,'+(hasSVG?0.000001:0.002)+')',NORMAL_STATE='',HOVER_STATE='hover',SELECT_STATE='select',makeTime,getMinutes,getHours,getDay,getDate,getMonth,getFullYear,setMinutes,setHours,setDate,setMonth,setFullYear,globalAdapter=win.HighchartsAdapter,adapter=globalAdapter||{},each=adapter.each,grep=adapter.grep,map=adapter.map,merge=adapter.merge,hyphenate=adapter.hyphenate,addEvent=adapter.addEvent,removeEvent=adapter.removeEvent,fireEvent=adapter.fireEvent,animate=adapter.animate,stop=adapter.stop,seriesTypes={};function extend(a,b){if(!a){a={};}
- for(var n in b){a[n]=b[n];}
- return a;}
- function pInt(s,mag){return parseInt(s,mag||10);}
- function isString(s){return typeof s=='string';}
- function isObject(obj){return typeof obj=='object';}
- function isNumber(n){return typeof n=='number';}
- function erase(arr,item){var i=arr.length;while(i--){if(arr[i]==item){arr.splice(i,1);break;}}}
- function defined(obj){return obj!==UNDEFINED&&obj!==null;}
- function attr(elem,prop,value){var key,setAttribute='setAttribute',ret;if(isString(prop)){if(defined(value)){elem[setAttribute](prop,value);}else if(elem&&elem.getAttribute){ret=elem.getAttribute(prop);}}else if(defined(prop)&&isObject(prop)){for(key in prop){elem[setAttribute](key,prop[key]);}}
- return ret;}
- function splat(obj){if(!obj||obj.constructor!=Array){obj=[obj];}
- return obj;}
- function pick(){var args=arguments,i,arg;for(i=0;i<args.length;i++){arg=args[i];if(defined(arg)){return arg;}}}
- function serializeCSS(style){var s='',key;for(key in style){s+=hyphenate(key)+':'+style[key]+';';}
- return s;}
- function css(el,styles){if(isIE){if(styles&&styles.opacity!==UNDEFINED){styles.filter='alpha(opacity='+(styles.opacity*100)+')';}}
- extend(el.style,styles);}
- function createElement(tag,attribs,styles,parent,nopad){var el=doc.createElement(tag);if(attribs){extend(el,attribs);}
- if(nopad){css(el,{padding:0,border:NONE,margin:0});}
- if(styles){css(el,styles);}
- if(parent){parent.appendChild(el);}
- return el;}
- function setAnimation(animation,chart){globalAnimation=pick(animation,chart.animation);}
- if(globalAdapter&&globalAdapter.init){globalAdapter.init();}
- if(!globalAdapter&&win.jQuery){var jQ=jQuery;each=function(arr,fn){for(var i=0,len=arr.length;i<len;i++){if(fn.call(arr[i],arr[i],i,arr)===false){return i;}}};grep=jQ.grep;map=function(arr,fn){var results=[];for(var i=0,len=arr.length;i<len;i++){results[i]=fn.call(arr[i],arr[i],i,arr);}
- return results;};merge=function(){var args=arguments;return jQ.extend(true,null,args[0],args[1],args[2],args[3]);};hyphenate=function(str){return str.replace(/([A-Z])/g,function(a,b){return'-'+b.toLowerCase();});};addEvent=function(el,event,fn){jQ(el).bind(event,fn);};removeEvent=function(el,eventType,handler){var func=doc.removeEventListener?'removeEventListener':'detachEvent';if(doc[func]&&!el[func]){el[func]=function(){};}
- jQ(el).unbind(eventType,handler);};fireEvent=function(el,type,eventArguments,defaultFunction){var event=jQ.Event(type),detachedType='detached'+type;extend(event,eventArguments);if(el[type]){el[detachedType]=el[type];el[type]=null;}
- jQ(el).trigger(event);if(el[detachedType]){el[type]=el[detachedType];el[detachedType]=null;}
- if(defaultFunction&&!event.isDefaultPrevented()){defaultFunction(event);}};animate=function(el,params,options){var $el=jQ(el);if(params.d){el.toD=params.d;params.d=1;}
- $el.stop();$el.animate(params,options);};stop=function(el){jQ(el).stop();};jQ.extend(jQ.easing,{easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;}});var oldStepDefault=jQuery.fx.step._default,oldCur=jQuery.fx.prototype.cur;jQ.fx.step._default=function(fx){var elem=fx.elem;if(elem.attr){elem.attr(fx.prop,fx.now);}else{oldStepDefault.apply(this,arguments);}};jQ.fx.step.d=function(fx){var elem=fx.elem;if(!fx.started){var ends=pathAnim.init(elem,elem.d,elem.toD);fx.start=ends[0];fx.end=ends[1];fx.started=true;}
- elem.attr('d',pathAnim.step(fx.start,fx.end,fx.pos,elem.toD));};jQ.fx.prototype.cur=function(){var elem=this.elem,r;if(elem.attr){r=elem.attr(this.prop);}else{r=oldCur.apply(this,arguments);}
- return r;};}
- pathAnim={init:function(elem,fromD,toD){fromD=fromD||'';var shift=elem.shift,bezier=fromD.indexOf('C')>-1,numParams=bezier?7:3,endLength,slice,i,start=fromD.split(' '),end=[].concat(toD),startBaseLine,endBaseLine,sixify=function(arr){i=arr.length;while(i--){if(arr[i]==M){arr.splice(i+1,0,arr[i+1],arr[i+2],arr[i+1],arr[i+2]);}}};if(bezier){sixify(start);sixify(end);}
- if(elem.isArea){startBaseLine=start.splice(start.length-6,6);endBaseLine=end.splice(end.length-6,6);}
- if(shift){end=[].concat(end).splice(0,numParams).concat(end);elem.shift=false;}
- endLength=end.length;while(start.length<endLength){slice=[].concat(start).splice(start.length-numParams,numParams);if(bezier){slice[numParams-6]=slice[numParams-2];slice[numParams-5]=slice[numParams-1];}
- start=start.concat(slice);}
- if(startBaseLine){start=start.concat(startBaseLine);end=end.concat(endBaseLine);}
- return[start,end];},step:function(start,end,pos,complete){var ret=[],i=start.length,startVal;if(pos==1){ret=complete;}else if(i==end.length&&pos<1){while(i--){startVal=parseFloat(start[i]);ret[i]=isNaN(startVal)?start[i]:pos*(parseFloat(end[i]-startVal))+startVal;}}else{ret=end;}
- return ret;}};function setTimeMethods(){var useUTC=defaultOptions.global.useUTC;makeTime=useUTC?Date.UTC:function(year,month,date,hours,minutes,seconds){return new Date(year,month,pick(date,1),pick(hours,0),pick(minutes,0),pick(seconds,0)).getTime();};getMinutes=useUTC?'getUTCMinutes':'getMinutes';getHours=useUTC?'getUTCHours':'getHours';getDay=useUTC?'getUTCDay':'getDay';getDate=useUTC?'getUTCDate':'getDate';getMonth=useUTC?'getUTCMonth':'getMonth';getFullYear=useUTC?'getUTCFullYear':'getFullYear';setMinutes=useUTC?'setUTCMinutes':'setMinutes';setHours=useUTC?'setUTCHours':'setHours';setDate=useUTC?'setUTCDate':'setDate';setMonth=useUTC?'setUTCMonth':'setMonth';setFullYear=useUTC?'setUTCFullYear':'setFullYear';}
- function setOptions(options){defaultOptions=merge(defaultOptions,options);setTimeMethods();return defaultOptions;}
- function getOptions(){return defaultOptions;}
- function discardElement(element){if(!garbageBin){garbageBin=createElement(DIV);}
- if(element){garbageBin.appendChild(element);}
- garbageBin.innerHTML='';}
- var
- defaultLabelOptions={enabled:true,align:'center',x:0,y:15,style:{color:'#666',fontSize:'11px'}};defaultOptions={colors:['#4572A7','#AA4643','#89A54E','#80699B','#3D96AE','#DB843D','#92A8CD','#A47D7C','#B5CA92'],symbols:['circle','diamond','square','triangle','triangle-down'],lang:{loading:'Loading...',months:['January','February','March','April','May','June','July','August','September','October','November','December'],weekdays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],decimalPoint:'.',resetZoom:'Reset zoom',resetZoomTitle:'Reset zoom level 1:1',thousandsSep:','},global:{useUTC:true},chart:{borderColor:'#4572A7',borderRadius:5,defaultSeriesType:'line',ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:'12px'},backgroundColor:'#FFFFFF',plotBorderColor:'#C0C0C0'},title:{text:'Chart title',align:'center',y:15,style:{color:'#3E576F',fontSize:'16px'}},subtitle:{text:'',align:'center',y:30,style:{color:'#6D869F'}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1000},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:'#FFFFFF',states:{hover:{},select:{fillColor:'#FFFFFF',lineColor:'#000000',lineWidth:2}}},point:{events:{}},dataLabels:merge(defaultLabelOptions,{enabled:false,y:-6,formatter:function(){return this.y;}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:ABSOLUTE,color:'#3E576F'}},legend:{enabled:true,align:'center',layout:'horizontal',labelFormatter:function(){return this.name;},borderWidth:1,borderColor:'#909090',borderRadius:5,shadow:false,style:{padding:'5px'},itemStyle:{cursor:'pointer',color:'#3E576F'},itemHoverStyle:{cursor:'pointer',color:'#000000'},itemHiddenStyle:{color:'#C0C0C0'},itemCheckboxStyle:{position:ABSOLUTE,width:'13px',height:'13px'},symbolWidth:16,symbolPadding:5,verticalAlign:'bottom',x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:'bold',position:RELATIVE,top:'1em'},showDuration:100,style:{position:ABSOLUTE,backgroundColor:'white',opacity:0.5,textAlign:'center'}},tooltip:{enabled:true,backgroundColor:'rgba(255, 255, 255, .85)',borderWidth:2,borderRadius:5,shadow:true,snap:10,style:{color:'#333333',fontSize:'12px',padding:'5px',whiteSpace:'nowrap'}},toolbar:{itemStyle:{color:'#4572A7',cursor:'pointer'}},credits:{enabled:true,text:'Highcharts.com',href:'http://www.highcharts.com',position:{align:'right',x:-10,verticalAlign:'bottom',y:-5},style:{cursor:'pointer',color:'#909090',fontSize:'10px'}}};var defaultXAxisOptions={dateTimeLabelFormats:{second:'%H:%M:%S',minute:'%H:%M',hour:'%H:%M',day:'%e. %b',week:'%e. %b',month:'%b \'%y',year:'%Y'},endOnTick:false,gridLineColor:'#C0C0C0',labels:defaultLabelOptions,lineColor:'#C0D0E0',lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:'#E0E0E0',minorGridLineWidth:1,minorTickColor:'#A0A0A0',minorTickLength:2,minorTickPosition:'outside',startOfWeek:1,startOnTick:false,tickColor:'#C0D0E0',tickLength:5,tickmarkPlacement:'between',tickPixelInterval:100,tickPosition:'outside',tickWidth:1,title:{align:'middle',style:{color:'#6D869F',fontWeight:'bold'}},type:'linear'},defaultYAxisOptions=merge(defaultXAxisOptions,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:'right',x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:'Y-values'}}),defaultLeftAxisOptions={labels:{align:'right',x:-8,y:3},title:{rotation:270}},defaultRightAxisOptions={labels:{align:'left',x:8,y:3},title:{rotation:90}},defaultBottomAxisOptions={labels:{align:'center',x:0,y:14},title:{rotation:0}},defaultTopAxisOptions=merge(defaultBottomAxisOptions,{labels:{y:-5}});var defaultPlotOptions=defaultOptions.plotOptions,defaultSeriesOptions=defaultPlotOptions.line;defaultPlotOptions.spline=merge(defaultSeriesOptions);defaultPlotOptions.scatter=merge(defaultSeriesOptions,{lineWidth:0,states:{hover:{lineWidth:0}}});defaultPlotOptions.area=merge(defaultSeriesOptions,{});defaultPlotOptions.areaspline=merge(defaultPlotOptions.area);defaultPlotOptions.column=merge(defaultSeriesOptions,{borderColor:'#FFFFFF',borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:'#C0C0C0',borderColor:'#000000',shadow:false}}});defaultPlotOptions.bar=merge(defaultPlotOptions.column,{dataLabels:{align:'left',x:5,y:0}});defaultPlotOptions.pie=merge(defaultSeriesOptions,{borderColor:'#FFFFFF',borderWidth:1,center:['50%','50%'],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name;},y:5},legendType:'point',marker:null,size:'75%',showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});setTimeMethods();function extendClass(parent,members){var object=function(){};object.prototype=new parent();extend(object.prototype,members);return object;}
- var Color=function(input){var rgba=[],result;function init(input){if((result=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input))){rgba=[pInt(result[1]),pInt(result[2]),pInt(result[3]),parseFloat(result[4],10)];}
- else if((result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input))){rgba=[pInt(result[1],16),pInt(result[2],16),pInt(result[3],16),1];}}
- function get(format){var ret;if(rgba&&!isNaN(rgba[0])){if(format=='rgb'){ret='rgb('+rgba[0]+','+rgba[1]+','+rgba[2]+')';}else if(format=='a'){ret=rgba[3];}else{ret='rgba('+rgba.join(',')+')';}}else{ret=input;}
- return ret;}
- function brighten(alpha){if(isNumber(alpha)&&alpha!==0){var i;for(i=0;i<3;i++){rgba[i]+=pInt(alpha*255);if(rgba[i]<0){rgba[i]=0;}
- if(rgba[i]>255){rgba[i]=255;}}}
- return this;}
- function setOpacity(alpha){rgba[3]=alpha;return this;}
- init(input);return{get:get,brighten:brighten,setOpacity:setOpacity};};function numberFormat(number,decimals,decPoint,thousandsSep){var lang=defaultOptions.lang,n=number,c=isNaN(decimals=mathAbs(decimals))?2:decimals,d=decPoint===undefined?lang.decimalPoint:decPoint,t=thousandsSep===undefined?lang.thousandsSep:thousandsSep,s=n<0?"-":"",i=pInt(n=mathAbs(+n||0).toFixed(c))+"",j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+
- (c?d+mathAbs(n-i).toFixed(c).slice(2):"");}
- dateFormat=function(format,timestamp,capitalize){function pad(number){return number.toString().replace(/^([0-9])$/,'0$1');}
- if(!defined(timestamp)||isNaN(timestamp)){return'Invalid date';}
- format=pick(format,'%Y-%m-%d %H:%M:%S');var date=new Date(timestamp*timeFactor),hours=date[getHours](),day=date[getDay](),dayOfMonth=date[getDate](),month=date[getMonth](),fullYear=date[getFullYear](),lang=defaultOptions.lang,langWeekdays=lang.weekdays,langMonths=lang.months,replacements={'a':langWeekdays[day].substr(0,3),'A':langWeekdays[day],'d':pad(dayOfMonth),'e':dayOfMonth,'b':langMonths[month].substr(0,3),'B':langMonths[month],'m':pad(month+1),'y':fullYear.toString().substr(2,2),'Y':fullYear,'H':pad(hours),'I':pad((hours%12)||12),'l':(hours%12)||12,'M':pad(date[getMinutes]()),'p':hours<12?'AM':'PM','P':hours<12?'am':'pm','S':pad(date.getSeconds())};for(var key in replacements){format=format.replace('%'+key,replacements[key]);}
- return capitalize?format.substr(0,1).toUpperCase()+format.substr(1):format;};function getPosition(el){var p={left:el.offsetLeft,top:el.offsetTop};while((el=el.offsetParent)){p.left+=el.offsetLeft;p.top+=el.offsetTop;if(el!=doc.body&&el!=doc.documentElement){p.left-=el.scrollLeft;p.top-=el.scrollTop;}}
- return p;}
- function SVGElement(){}
- SVGElement.prototype={init:function(renderer,nodeName){this.element=doc.createElementNS('http://www.w3.org/2000/svg',nodeName);this.renderer=renderer;},animate:function(params,options,complete){var animOptions=pick(options,globalAnimation,true);if(animOptions){animOptions=merge(animOptions);if(complete){animOptions.complete=complete;}
- animate(this,params,animOptions);}else{this.attr(params);if(complete){complete();}}},attr:function(hash,val){var key,value,i,child,element=this.element,nodeName=element.nodeName,renderer=this.renderer,skipAttr,shadows=this.shadows,hasSetSymbolSize,ret=this;if(isString(hash)&&defined(val)){key=hash;hash={};hash[key]=val;}
- if(isString(hash)){key=hash;if(nodeName=='circle'){key={x:'cx',y:'cy'}[key]||key;}else if(key=='strokeWidth'){key='stroke-width';}
- ret=attr(element,key)||this[key]||0;if(key!='d'&&key!='visibility'){ret=parseFloat(ret);}}else{for(key in hash){skipAttr=false;value=hash[key];if(key=='d'){if(value&&value.join){value=value.join(' ');}
- if(/(NaN| {2}|^$)/.test(value)){value='M 0 0';}
- this.d=value;}else if(key=='x'&&nodeName=='text'){for(i=0;i<element.childNodes.length;i++){child=element.childNodes[i];if(attr(child,'x')==attr(element,'x')){attr(child,'x',value);}}
- if(this.rotation){attr(element,'transform','rotate('+this.rotation+' '+value+' '+
- pInt(hash.y||attr(element,'y'))+')');}}else if(key=='fill'){value=renderer.color(value,element,key);}else if(nodeName=='circle'&&(key=='x'||key=='y')){key={x:'cx',y:'cy'}[key]||key;}else if(key=='translateX'||key=='translateY'||key=='rotation'){this[key]=value;this.updateTransform();skipAttr=true;}else if(key=='stroke'){value=renderer.color(value,element,key);}else if(key=='dashstyle'){key='stroke-dasharray';if(value){value=value.toLowerCase().replace('shortdashdotdot','3,1,1,1,1,1,').replace('shortdashdot','3,1,1,1').replace('shortdot','1,1,').replace('shortdash','3,1,').replace('longdash','8,3,').replace(/dot/g,'1,3,').replace('dash','4,3,').replace(/,$/,'').split(',');i=value.length;while(i--){value[i]=pInt(value[i])*hash['stroke-width'];}
- value=value.join(',');}}else if(key=='isTracker'){this[key]=value;}else if(key=='width'){value=pInt(value);}else if(key=='align'){key='text-anchor';value={left:'start',center:'middle',right:'end'}[value];}
- if(key=='strokeWidth'){key='stroke-width';}
- if(isWebKit&&key=='stroke-width'&&value===0){value=0.000001;}
- if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(key)){if(!hasSetSymbolSize){this.symbolAttr(hash);hasSetSymbolSize=true;}
- skipAttr=true;}
- if(shadows&&/^(width|height|visibility|x|y|d)$/.test(key)){i=shadows.length;while(i--){attr(shadows[i],key,value);}}
- if(key=='text'){renderer.buildText(element,value);}else if(!skipAttr){attr(element,key,value);}}}
- return ret;},symbolAttr:function(hash){var wrapper=this;wrapper.x=pick(hash.x,wrapper.x);wrapper.y=parseFloat(pick(hash.y,wrapper.y));wrapper.r=pick(hash.r,wrapper.r);wrapper.start=pick(hash.start,wrapper.start);wrapper.end=pick(hash.end,wrapper.end);wrapper.width=pick(hash.width,wrapper.width);wrapper.height=parseFloat(pick(hash.height,wrapper.height));wrapper.innerR=pick(hash.innerR,wrapper.innerR);wrapper.attr({d:wrapper.renderer.symbols[wrapper.symbolName](wrapper.x,wrapper.y,wrapper.r,{start:wrapper.start,end:wrapper.end,width:wrapper.width,height:wrapper.height,innerR:wrapper.innerR})});},clip:function(clipRect){return this.attr('clip-path','url('+this.renderer.url+'#'+clipRect.id+')');},css:function(styles){var elemWrapper=this;if(styles&&styles.color){styles.fill=styles.color;}
- styles=extend(elemWrapper.styles,styles);elemWrapper.attr({style:serializeCSS(styles)});elemWrapper.styles=styles;return elemWrapper;},on:function(eventType,handler){this.element['on'+eventType]=handler;return this;},translate:function(x,y){return this.attr({translateX:x,translateY:y});},invert:function(){var wrapper=this;wrapper.inverted=true;wrapper.updateTransform();return wrapper;},updateTransform:function(){var wrapper=this,translateX=wrapper.translateX||0,translateY=wrapper.translateY||0,inverted=wrapper.inverted,rotation=wrapper.rotation,transform=[];if(inverted){translateX+=wrapper.attr('width');translateY+=wrapper.attr('height');}
- if(translateX||translateY){transform.push('translate('+translateX+','+translateY+')');}
- if(inverted){transform.push('rotate(90) scale(-1,1)');}else if(rotation){transform.push('rotate('+rotation+' '+wrapper.x+' '+wrapper.y+')');}
- if(transform.length){attr(wrapper.element,'transform',transform.join(' '));}},toFront:function(){var element=this.element;element.parentNode.appendChild(element);return this;},align:function(alignOptions,alignByTranslate,box){if(!alignOptions){alignOptions=this.alignOptions;alignByTranslate=this.alignByTranslate;}else{this.alignOptions=alignOptions;this.alignByTranslate=alignByTranslate;if(!box){this.renderer.alignedObjects.push(this);}}
- box=pick(box,this.renderer);var align=alignOptions.align,vAlign=alignOptions.verticalAlign,x=(box.x||0)+(alignOptions.x||0),y=(box.y||0)+(alignOptions.y||0),attribs={};if(/^(right|center)$/.test(align)){x+=(box.width-(alignOptions.width||0))/{right:1,center:2}[align];}
- attribs[alignByTranslate?'translateX':'x']=x;if(/^(bottom|middle)$/.test(vAlign)){y+=(box.height-(alignOptions.height||0))/({bottom:1,middle:2}[vAlign]||1);}
- attribs[alignByTranslate?'translateY':'y']=y;this[this.placed?'animate':'attr'](attribs);this.placed=true;return this;},getBBox:function(){var bBox,width,height,rotation=this.rotation,rad=rotation*deg2rad;try{bBox=extend({},this.element.getBBox());}catch(e){bBox={width:0,height:0};}
- width=bBox.width;height=bBox.height;if(rotation){bBox.width=mathAbs(height*mathSin(rad))+mathAbs(width*mathCos(rad));bBox.height=mathAbs(height*mathCos(rad))+mathAbs(width*mathSin(rad));}
- return bBox;},show:function(){return this.attr({visibility:VISIBLE});},hide:function(){return this.attr({visibility:HIDDEN});},add:function(parent){var renderer=this.renderer,parentWrapper=parent||renderer,parentNode=parentWrapper.element||renderer.box,childNodes=parentNode.childNodes,element=this.element,zIndex=attr(element,'zIndex'),otherElement,otherZIndex,i;this.parentInverted=parent&&parent.inverted;if(zIndex){parentWrapper.handleZ=true;zIndex=pInt(zIndex);}
- if(parentWrapper.handleZ){for(i=0;i<childNodes.length;i++){otherElement=childNodes[i];otherZIndex=attr(otherElement,'zIndex');if(otherElement!=element&&(pInt(otherZIndex)>zIndex||(!defined(zIndex)&&defined(otherZIndex)))){parentNode.insertBefore(element,otherElement);return this;}}}
- parentNode.appendChild(element);return this;},destroy:function(){var wrapper=this,element=wrapper.element||{},shadows=wrapper.shadows,parentNode=element.parentNode,key;element.onclick=element.onmouseout=element.onmouseover=element.onmousemove=null;stop(wrapper);if(parentNode){parentNode.removeChild(element);}
- if(shadows){each(shadows,function(shadow){parentNode=shadow.parentNode;if(parentNode){parentNode.removeChild(shadow);}});}
- erase(wrapper.renderer.alignedObjects,wrapper);for(key in wrapper){delete wrapper[key];}
- return null;},empty:function(){var element=this.element,childNodes=element.childNodes,i=childNodes.length;while(i--){element.removeChild(childNodes[i]);}},shadow:function(apply){var shadows=[],i,shadow,element=this.element,transform=this.parentInverted?'(-1,-1)':'(1,1)';if(apply){for(i=1;i<=3;i++){shadow=element.cloneNode(0);attr(shadow,{'isShadow':'true','stroke':'rgb(0, 0, 0)','stroke-opacity':0.05*i,'stroke-width':7-2*i,'transform':'translate'+transform,'fill':NONE});element.parentNode.insertBefore(shadow,element);shadows.push(shadow);}
- this.shadows=shadows;}
- return this;}};var SVGRenderer=function(){this.init.apply(this,arguments);};SVGRenderer.prototype={init:function(container,width,height){var renderer=this,loc=location,boxWrapper;renderer.Element=SVGElement;boxWrapper=renderer.createElement('svg').attr({xmlns:'http://www.w3.org/2000/svg',version:'1.1'});container.appendChild(boxWrapper.element);renderer.box=boxWrapper.element;renderer.boxWrapper=boxWrapper;renderer.alignedObjects=[];renderer.url=isIE?'':loc.href.replace(/#.*?$/,'');renderer.defs=this.createElement('defs').add();renderer.setSize(width,height,false);},createElement:function(nodeName){var wrapper=new this.Element();wrapper.init(this,nodeName);return wrapper;},buildText:function(textNode,str){var lines=str.toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,'<span').replace(/<\/(b|strong|i|em|a)>/g,'</span>').split(/<br[^>]?>/g),childNodes=textNode.childNodes,styleRegex=/style="([^"]+)"/,hrefRegex=/href="([^"]+)"/,parentX=attr(textNode,'x'),lastLine,i=childNodes.length;while(i--){textNode.removeChild(childNodes[i]);}
- each(lines,function(line,lineNo){var spans,spanNo=0;line=line.replace(/<span/g,'|||<span').replace(/<\/span>/g,'</span>|||');spans=line.split('|||');each(spans,function(span){if(span!==''||spans.length==1){var attributes={},tspan=doc.createElementNS('http://www.w3.org/2000/svg','tspan');if(styleRegex.test(span)){attr(tspan,'style',span.match(styleRegex)[1].replace(/(;| |^)color([ :])/,'$1fill$2'));}
- if(hrefRegex.test(span)){attr(tspan,'onclick','location.href=\"'+span.match(hrefRegex)[1]+'\"');css(tspan,{cursor:'pointer'});}
- span=span.replace(/<(.|\n)*?>/g,'');tspan.appendChild(doc.createTextNode(span||' '));if(!spanNo){attributes.x=parentX;}else{attributes.dx=3;}
- if(!spanNo){if(lineNo){attr(tspan,'dy',pInt(lastLine.offsetHeight||window.getComputedStyle(lastLine,null).getPropertyValue('line-height')||18));}
- lastLine=tspan;}
- attr(tspan,attributes);textNode.appendChild(tspan);spanNo++;}});});},crispLine:function(points,width){if(points[1]==points[4]){points[1]=points[4]=mathRound(points[1])+(width%2/2);}
- if(points[2]==points[5]){points[2]=points[5]=mathRound(points[2])+(width%2/2);}
- return points;},path:function(path){return this.createElement('path').attr({d:path,fill:NONE});},circle:function(x,y,r){var attr=isObject(x)?x:{x:x,y:y,r:r};return this.createElement('circle').attr(attr);},arc:function(x,y,r,innerR,start,end){if(isObject(x)){y=x.y;r=x.r;innerR=x.innerR;start=x.start;end=x.end;x=x.x;}
- return this.symbol('arc',x||0,y||0,r||0,{innerR:innerR||0,start:start||0,end:end||0});},rect:function(x,y,width,height,r,strokeWidth){if(arguments.length>1){var normalizer=(strokeWidth||0)%2/2;x=mathRound(x||0)+normalizer;y=mathRound(y||0)+normalizer;width=mathRound((width||0)-2*normalizer);height=mathRound((height||0)-2*normalizer);}
- var attr=isObject(x)?x:{x:x,y:y,width:mathMax(width,0),height:mathMax(height,0)};return this.createElement('rect').attr(extend(attr,{rx:r||attr.r,ry:r||attr.r,fill:NONE}));},setSize:function(width,height,animate){var renderer=this,alignedObjects=renderer.alignedObjects,i=alignedObjects.length;renderer.width=width;renderer.height=height;renderer.boxWrapper[pick(animate,true)?'animate':'attr']({width:width,height:height});while(i--){alignedObjects[i].align();}},g:function(name){return this.createElement('g').attr(defined(name)&&{'class':PREFIX+name});},image:function(src,x,y,width,height){var attribs={preserveAspectRatio:NONE},elemWrapper;if(arguments.length>1){extend(attribs,{x:x,y:y,width:width,height:height});}
- elemWrapper=this.createElement('image').attr(attribs);elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink','href',src);return elemWrapper;},symbol:function(symbol,x,y,radius,options){var obj,symbolFn=this.symbols[symbol],path=symbolFn&&symbolFn(x,y,radius,options),imageRegex=/^url\((.*?)\)$/,imageSrc;if(path){obj=this.path(path);extend(obj,{symbolName:symbol,x:x,y:y,r:radius});if(options){extend(obj,options);}}else if(imageRegex.test(symbol)){imageSrc=symbol.match(imageRegex)[1];obj=this.image(imageSrc).attr({x:x,y:y});createElement('img',{onload:function(){var img=this,size=symbolSizes[img.src]||[img.width,img.height];obj.attr({width:size[0],height:size[1]}).translate(-mathRound(size[0]/2),-mathRound(size[1]/2));},src:imageSrc});}else{obj=this.circle(x,y,radius);}
- return obj;},symbols:{'square':function(x,y,radius){var len=0.707*radius;return[M,x-len,y-len,L,x+len,y-len,x+len,y+len,x-len,y+len,'Z'];},'triangle':function(x,y,radius){return[M,x,y-1.33*radius,L,x+radius,y+0.67*radius,x-radius,y+0.67*radius,'Z'];},'triangle-down':function(x,y,radius){return[M,x,y+1.33*radius,L,x-radius,y-0.67*radius,x+radius,y-0.67*radius,'Z'];},'diamond':function(x,y,radius){return[M,x,y-radius,L,x+radius,y,x,y+radius,x-radius,y,'Z'];},'arc':function(x,y,radius,options){var start=options.start,end=options.end-0.000001,innerRadius=options.innerR,cosStart=mathCos(start),sinStart=mathSin(start),cosEnd=mathCos(end),sinEnd=mathSin(end),longArc=options.end-start<mathPI?0:1;return[M,x+radius*cosStart,y+radius*sinStart,'A',radius,radius,0,longArc,1,x+radius*cosEnd,y+radius*sinEnd,L,x+innerRadius*cosEnd,y+innerRadius*sinEnd,'A',innerRadius,innerRadius,0,longArc,0,x+innerRadius*cosStart,y+innerRadius*sinStart,'Z'];}},clipRect:function(x,y,width,height){var wrapper,id=PREFIX+idCounter++,clipPath=this.createElement('clipPath').attr({id:id}).add(this.defs);wrapper=this.rect(x,y,width,height,0).add(clipPath);wrapper.id=id;return wrapper;},color:function(color,elem,prop){var colorObject,regexRgba=/^rgba/;if(color&&color.linearGradient){var renderer=this,strLinearGradient='linearGradient',linearGradient=color[strLinearGradient],id=PREFIX+idCounter++,gradientObject,stopColor,stopOpacity;gradientObject=renderer.createElement(strLinearGradient).attr({id:id,gradientUnits:'userSpaceOnUse',x1:linearGradient[0],y1:linearGradient[1],x2:linearGradient[2],y2:linearGradient[3]}).add(renderer.defs);each(color.stops,function(stop){if(regexRgba.test(stop[1])){colorObject=Color(stop[1]);stopColor=colorObject.get('rgb');stopOpacity=colorObject.get('a');}else{stopColor=stop[1];stopOpacity=1;}
- renderer.createElement('stop').attr({offset:stop[0],'stop-color':stopColor,'stop-opacity':stopOpacity}).add(gradientObject);});return'url('+this.url+'#'+id+')';}else if(regexRgba.test(color)){colorObject=Color(color);attr(elem,prop+'-opacity',colorObject.get('a'));return colorObject.get('rgb');}else{return color;}},text:function(str,x,y){var defaultChartStyle=defaultOptions.chart.style,wrapper;x=mathRound(pick(x,0));y=mathRound(pick(y,0));wrapper=this.createElement('text').attr({x:x,y:y,text:str}).css({'font-family':defaultChartStyle.fontFamily,'font-size':defaultChartStyle.fontSize});wrapper.x=x;wrapper.y=y;return wrapper;}};var VMLRenderer;if(!hasSVG){var VMLElement=extendClass(SVGElement,{init:function(renderer,nodeName){var markup=['<',nodeName,' filled="f" stroked="f"'],style=['position: ',ABSOLUTE,';'];if(nodeName=='shape'||nodeName==DIV){style.push('left:0;top:0;width:10px;height:10px;');}
- if(docMode8){style.push('visibility: ',nodeName==DIV?HIDDEN:VISIBLE);}
- markup.push(' style="',style.join(''),'"/>');if(nodeName){markup=nodeName==DIV||nodeName=='span'||nodeName=='img'?markup.join(''):renderer.prepVML(markup);this.element=createElement(markup);}
- this.renderer=renderer;},add:function(parent){var wrapper=this,renderer=wrapper.renderer,element=wrapper.element,box=renderer.box,inverted=parent&&parent.inverted,parentNode=parent?parent.element||parent:box;if(inverted){renderer.invertChild(element,parentNode);}
- parentNode.appendChild(element);wrapper.added=true;if(wrapper.alignOnAdd){wrapper.updateTransform();}
- return wrapper;},attr:function(hash,val){var key,value,i,element=this.element||{},elemStyle=element.style,nodeName=element.nodeName,renderer=this.renderer,symbolName=this.symbolName,childNodes,hasSetSymbolSize,shadows=this.shadows,skipAttr,ret=this;if(isString(hash)&&defined(val)){key=hash;hash={};hash[key]=val;}
- if(isString(hash)){key=hash;if(key=='strokeWidth'||key=='stroke-width'){ret=this.strokeweight;}else{ret=this[key];}}else{for(key in hash){value=hash[key];skipAttr=false;if(symbolName&&/^(x|y|r|start|end|width|height|innerR)/.test(key)){if(!hasSetSymbolSize){this.symbolAttr(hash);hasSetSymbolSize=true;}
- skipAttr=true;}else if(key=='d'){value=value||[];this.d=value.join(' ');i=value.length;var convertedPath=[];while(i--){if(isNumber(value[i])){convertedPath[i]=mathRound(value[i]*10)-5;}
- else if(value[i]=='Z'){convertedPath[i]='x';}
- else{convertedPath[i]=value[i];}}
- value=convertedPath.join(' ')||'x';element.path=value;if(shadows){i=shadows.length;while(i--){shadows[i].path=value;}}
- skipAttr=true;}else if(key=='zIndex'||key=='visibility'){if(docMode8&&key=='visibility'&&nodeName=='DIV'){childNodes=element.childNodes;i=childNodes.length;while(i--){css(childNodes[i],{visibility:value});}
- if(value==VISIBLE){value=null;}}
- if(value){elemStyle[key]=value;}
- skipAttr=true;}else if(/^(width|height)$/.test(key)){if(this.updateClipping){this[key]=value;this.updateClipping();}else{elemStyle[key]=value;}
- skipAttr=true;}else if(/^(x|y)$/.test(key)){this[key]=value;if(element.tagName=='SPAN'){this.updateTransform();}else{elemStyle[{x:'left',y:'top'}[key]]=value;}}else if(key=='class'){element.className=value;}else if(key=='stroke'){value=renderer.color(value,element,key);key='strokecolor';}else if(key=='stroke-width'||key=='strokeWidth'){element.stroked=value?true:false;key='strokeweight';this[key]=value;if(isNumber(value)){value+=PX;}}else if(key=='dashstyle'){var strokeElem=element.getElementsByTagName('stroke')[0]||createElement(renderer.prepVML(['<stroke/>']),null,null,element);strokeElem[key]=value||'solid';this.dashstyle=value;skipAttr=true;}else if(key=='fill'){if(nodeName=='SPAN'){elemStyle.color=value;}else{element.filled=value!=NONE?true:false;value=renderer.color(value,element,key);key='fillcolor';}}else if(key=='translateX'||key=='translateY'||key=='rotation'||key=='align'){if(key=='align'){key='textAlign';}
- this[key]=value;this.updateTransform();skipAttr=true;}
- else if(key=='text'){element.innerHTML=value;skipAttr=true;}
- if(shadows&&key=='visibility'){i=shadows.length;while(i--){shadows[i].style[key]=value;}}
- if(!skipAttr){if(docMode8){element[key]=value;}else{attr(element,key,value);}}}}
- return ret;},clip:function(clipRect){var wrapper=this,clipMembers=clipRect.members,index=clipMembers.length;clipMembers.push(wrapper);wrapper.destroyClip=function(){clipMembers.splice(index,1);};return wrapper.css(clipRect.getCSS(wrapper.inverted));},css:function(styles){var wrapper=this;css(wrapper.element,styles);return wrapper;},destroy:function(){var wrapper=this;if(wrapper.destroyClip){wrapper.destroyClip();}
- SVGElement.prototype.destroy.apply(this);},empty:function(){var element=this.element,childNodes=element.childNodes,i=childNodes.length,node;while(i--){node=childNodes[i];node.parentNode.removeChild(node);}},getBBox:function(){var element=this.element;return{x:element.offsetLeft,y:element.offsetTop,width:element.offsetWidth,height:element.offsetHeight};},on:function(eventType,handler){this.element['on'+eventType]=function(){var evt=win.event;evt.target=evt.srcElement;handler(evt);};return this;},updateTransform:function(hash){if(!this.added){this.alignOnAdd=true;return;}
- var wrapper=this,elem=wrapper.element,translateX=wrapper.translateX||0,translateY=wrapper.translateY||0,x=wrapper.x||0,y=wrapper.y||0,rotation=wrapper.rotation||0,radians=rotation*deg2rad,costheta=mathCos(radians),sintheta=mathSin(radians),align=wrapper.textAlign||'left',alignCorrection={right:1,center:2}[align],nonLeft=align&&align!='left';if(translateX||translateY){wrapper.css({marginLeft:translateX,marginTop:translateY});}
- if(wrapper.inverted){each(elem.childNodes,function(child){wrapper.renderer.invertChild(child,elem);});}
- if(elem.tagName=='SPAN'){css(elem,{filter:rotation?['progid:DXImageTransform.Microsoft.Matrix(M11=',costheta,', M12=',-sintheta,', M21=',sintheta,', M22=',costheta,', sizingMethod=\'auto expand\')'].join(''):NONE});var width=elem.offsetWidth,height=elem.offsetHeight,lineHeight=mathRound(pInt(elem.style.fontSize||12)*1.2);x+=width*mathMin(costheta,0)+mathMin(sintheta,0)*lineHeight;y+=height*mathMin(sintheta,0)-mathMax(costheta,0)*lineHeight;if(nonLeft){x-=width/alignCorrection*costheta;y-=height/alignCorrection*sintheta;}
- css(elem,{textAlign:align,left:x,top:y});}},shadow:function(apply){var shadows=[],i,element=this.element,renderer=this.renderer,shadow,elemStyle=element.style,markup,path=element.path;if(''+element.path===''){path='x';}
- if(apply){for(i=1;i<=3;i++){markup=['<shape isShadow="true" strokeweight="',(7-2*i),'" filled="false" path="',path,'" coordsize="100,100" style="',element.style.cssText,'" />'];shadow=createElement(renderer.prepVML(markup),null,{left:pInt(elemStyle.left)+1,top:pInt(elemStyle.top)+1});markup=['<stroke color="black" opacity="',(0.05*i),'"/>'];createElement(renderer.prepVML(markup),null,null,shadow);element.parentNode.insertBefore(shadow,element);shadows.push(shadow);}
- this.shadows=shadows;}
- return this;}});VMLRenderer=function(){this.init.apply(this,arguments);};VMLRenderer.prototype=merge(SVGRenderer.prototype,{isIE8:userAgent.indexOf('MSIE 8.0')>-1,init:function(container,width,height){var renderer=this,boxWrapper;renderer.Element=VMLElement;renderer.alignedObjects=[];boxWrapper=renderer.createElement(DIV);container.appendChild(boxWrapper.element);renderer.box=boxWrapper.element;renderer.boxWrapper=boxWrapper;renderer.setSize(width,height,false);if(!doc.namespaces.hcv){doc.namespaces.add('hcv','urn:schemas-microsoft-com:vml');doc.createStyleSheet().cssText='hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke'+'{ behavior:url(#default#VML); display: inline-block; } ';}},clipRect:function(x,y,width,height){var clipRect=this.createElement();return extend(clipRect,{members:[],left:x,top:y,width:width,height:height,getCSS:function(inverted){var rect=this,top=rect.top,left=rect.left,right=left+rect.width,bottom=top+rect.height,ret={clip:'rect('+
- mathRound(inverted?left:top)+'px,'+
- mathRound(inverted?bottom:right)+'px,'+
- mathRound(inverted?right:bottom)+'px,'+
- mathRound(inverted?top:left)+'px)'};if(!inverted&&docMode8){extend(ret,{width:right+PX,height:bottom+PX});}
- return ret;},updateClipping:function(){each(clipRect.members,function(member){member.css(clipRect.getCSS(member.inverted));});}});},color:function(color,elem,prop){var colorObject,regexRgba=/^rgba/,markup;if(color&&color.linearGradient){var stopColor,stopOpacity,linearGradient=color.linearGradient,angle,color1,opacity1,color2,opacity2;each(color.stops,function(stop,i){if(regexRgba.test(stop[1])){colorObject=Color(stop[1]);stopColor=colorObject.get('rgb');stopOpacity=colorObject.get('a');}else{stopColor=stop[1];stopOpacity=1;}
- if(!i){color1=stopColor;opacity1=stopOpacity;}else{color2=stopColor;opacity2=stopOpacity;}});angle=90-math.atan((linearGradient[3]-linearGradient[1])/(linearGradient[2]-linearGradient[0]))*180/mathPI;markup=['<',prop,' colors="0% ',color1,',100% ',color2,'" angle="',angle,'" opacity="',opacity2,'" o:opacity2="',opacity1,'" type="gradient" focus="100%" />'];createElement(this.prepVML(markup),null,null,elem);}else if(regexRgba.test(color)&&elem.tagName!='IMG'){colorObject=Color(color);markup=['<',prop,' opacity="',colorObject.get('a'),'"/>'];createElement(this.prepVML(markup),null,null,elem);return colorObject.get('rgb');}else{return color;}},prepVML:function(markup){var vmlStyle='display:inline-block;behavior:url(#default#VML);',isIE8=this.isIE8;markup=markup.join('');if(isIE8){markup=markup.replace('/>',' xmlns="urn:schemas-microsoft-com:vml" />');if(markup.indexOf('style="')==-1){markup=markup.replace('/>',' style="'+vmlStyle+'" />');}else{markup=markup.replace('style="','style="'+vmlStyle);}}else{markup=markup.replace('<','<hcv:');}
- return markup;},text:function(str,x,y){var defaultChartStyle=defaultOptions.chart.style;return this.createElement('span').attr({text:str,x:mathRound(x),y:mathRound(y)}).css({whiteSpace:'nowrap',fontFamily:defaultChartStyle.fontFamily,fontSize:defaultChartStyle.fontSize});},path:function(path){return this.createElement('shape').attr({coordsize:'100 100',d:path});},circle:function(x,y,r){return this.path(this.symbols.circle(x,y,r));},g:function(name){var wrapper,attribs;if(name){attribs={'className':PREFIX+name,'class':PREFIX+name};}
- wrapper=this.createElement(DIV).attr(attribs);return wrapper;},image:function(src,x,y,width,height){var obj=this.createElement('img').attr({src:src});if(arguments.length>1){obj.css({left:x,top:y,width:width,height:height});}
- return obj;},rect:function(x,y,width,height,r,strokeWidth){if(arguments.length>1){var normalizer=(strokeWidth||0)%2/2;x=mathRound(x||0)+normalizer;y=mathRound(y||0)+normalizer;width=mathRound((width||0)-2*normalizer);height=mathRound((height||0)-2*normalizer);}
- if(isObject(x)){y=x.y;width=x.width;height=x.height;r=x.r;x=x.x;}
- return this.symbol('rect',x||0,y||0,r||0,{width:width||0,height:height||0});},invertChild:function(element,parentNode){var parentStyle=parentNode.style;css(element,{flip:'x',left:pInt(parentStyle.width)-10,top:pInt(parentStyle.height)-10,rotation:-90});},symbols:{arc:function(x,y,radius,options){var start=options.start,end=options.end,cosStart=mathCos(start),sinStart=mathSin(start),cosEnd=mathCos(end),sinEnd=mathSin(end),innerRadius=options.innerR;if(end-start===0){return['x'];}else if(end-start==2*mathPI){cosEnd=-0.07/radius;}
- return['wa',x-radius,y-radius,x+radius,y+radius,x+radius*cosStart,y+radius*sinStart,x+radius*cosEnd,y+radius*sinEnd,'at',x-innerRadius,y-innerRadius,x+innerRadius,y+innerRadius,x+innerRadius*cosEnd,y+innerRadius*sinEnd,x+innerRadius*cosStart,y+innerRadius*sinStart,'x','e'];},circle:function(x,y,r){return['wa',x-r,y-r,x+r,y+r,x+r,y,x+r,y,'e'];},rect:function(left,top,r,options){var width=options.width,height=options.height,right=left+width,bottom=top+height;r=mathMin(r,width,height);return[M,left+r,top,L,right-r,top,'wa',right-2*r,top,right,top+2*r,right-r,top,right,top+r,L,right,bottom-r,'wa',right-2*r,bottom-2*r,right,bottom,right,bottom-r,right-r,bottom,L,left+r,bottom,'wa',left,bottom-2*r,left+2*r,bottom,left+r,bottom,left,bottom-r,L,left,top+r,'wa',left,top,left+2*r,top+2*r,left,top+r,left+r,top,'x','e'];}}});}
- var Renderer=hasSVG?SVGRenderer:VMLRenderer;function Chart(options,callback){defaultXAxisOptions=merge(defaultXAxisOptions,defaultOptions.xAxis);defaultYAxisOptions=merge(defaultYAxisOptions,defaultOptions.yAxis);defaultOptions.xAxis=defaultOptions.yAxis=null;options=merge(defaultOptions,options);var optionsChart=options.chart,optionsMargin=optionsChart.margin,margin=isObject(optionsMargin)?optionsMargin:[optionsMargin,optionsMargin,optionsMargin,optionsMargin],optionsMarginTop=pick(optionsChart.marginTop,margin[0]),optionsMarginRight=pick(optionsChart.marginRight,margin[1]),optionsMarginBottom=pick(optionsChart.marginBottom,margin[2]),optionsMarginLeft=pick(optionsChart.marginLeft,margin[3]),spacingTop=optionsChart.spacingTop,spacingRight=optionsChart.spacingRight,spacingBottom=optionsChart.spacingBottom,spacingLeft=optionsChart.spacingLeft,spacingBox,chartTitleOptions,chartSubtitleOptions,plotTop,marginRight,marginBottom,plotLeft,axisOffset,renderTo,renderToClone,container,containerId,containerWidth,containerHeight,chartWidth,chartHeight,oldChartWidth,oldChartHeight,chartBackground,plotBackground,plotBGImage,plotBorder,chart=this,chartEvents=optionsChart.events,eventType,isInsidePlot,tooltip,mouseIsDown,loadingDiv,loadingSpan,loadingShown,plotHeight,plotWidth,tracker,trackerGroup,placeTrackerGroup,legend,legendWidth,legendHeight,chartPosition,hasCartesianSeries=optionsChart.showAxes,isResizing=0,axes=[],maxTicks,series=[],inverted,renderer,tooltipTick,tooltipInterval,hoverX,drawChartBox,getMargins,resetMargins,setChartSize,resize,zoom,zoomOut;function Axis(chart,options){var isXAxis=options.isX,opposite=options.opposite,horiz=inverted?!isXAxis:isXAxis,side=horiz?(opposite?0:2):(opposite?1:3),stacks={};options=merge(isXAxis?defaultXAxisOptions:defaultYAxisOptions,[defaultTopAxisOptions,defaultRightAxisOptions,defaultBottomAxisOptions,defaultLeftAxisOptions][side],options);var axis=this,isDatetimeAxis=options.type=='datetime',offset=options.offset||0,xOrY=isXAxis?'x':'y',axisLength,transA,oldTransA,transB=horiz?plotLeft:marginBottom,translate,getPlotLinePath,axisGroup,gridGroup,axisLine,dataMin,dataMax,associatedSeries,userSetMin,userSetMax,max=null,min=null,oldMin,oldMax,minPadding=options.minPadding,maxPadding=options.maxPadding,isLinked=defined(options.linkedTo),ignoreMinPadding,ignoreMaxPadding,usePercentage,events=options.events,eventType,plotLinesAndBands=[],tickInterval,minorTickInterval,magnitude,tickPositions,ticks={},minorTicks={},alternateBands={},tickAmount,labelOffset,axisTitleMargin,dateTimeLabelFormat,categories=options.categories,labelFormatter=options.labels.formatter||function(){var value=this.value,ret;if(dateTimeLabelFormat){ret=dateFormat(dateTimeLabelFormat,value);}else if(tickInterval%1000000===0){ret=(value/1000000)+'M';}else if(tickInterval%1000===0){ret=(value/1000)+'k';}else if(!categories&&value>=1000){ret=numberFormat(value,0);}else{ret=value;}
- return ret;},staggerLines=horiz&&options.labels.staggerLines,reversed=options.reversed,tickmarkOffset=(categories&&options.tickmarkPlacement=='between')?0.5:0;function Tick(pos,minor){var tick=this;tick.pos=pos;tick.minor=minor;tick.isNew=true;if(!minor){tick.addLabel();}}
- Tick.prototype={addLabel:function(){var pos=this.pos,labelOptions=options.labels,str,withLabel=!((pos==min&&!pick(options.showFirstLabel,1))||(pos==max&&!pick(options.showLastLabel,0))),label=this.label;str=labelFormatter.call({isFirst:pos==tickPositions[0],isLast:pos==tickPositions[tickPositions.length-1],dateTimeLabelFormat:dateTimeLabelFormat,value:(categories&&categories[pos]?categories[pos]:pos)});if(label===UNDEFINED){this.label=defined(str)&&withLabel&&labelOptions.enabled?renderer.text(str,0,0).attr({align:labelOptions.align,rotation:labelOptions.rotation}).css(labelOptions.style).add(axisGroup):null;}else if(label){label.attr({text:str});}},getLabelSize:function(){var label=this.label;return label?((this.labelBBox=label.getBBox()))[horiz?'height':'width']:0;},render:function(index,old){var tick=this,major=!tick.minor,label=tick.label,pos=tick.pos,labelOptions=options.labels,gridLine=tick.gridLine,gridLineWidth=major?options.gridLineWidth:options.minorGridLineWidth,gridLineColor=major?options.gridLineColor:options.minorGridLineColor,dashStyle=major?options.gridLineDashStyle:options.minorGridLineDashStyle,gridLinePath,mark=tick.mark,markPath,tickLength=major?options.tickLength:options.minorTickLength,tickWidth=major?options.tickWidth:(options.minorTickWidth||0),tickColor=major?options.tickColor:options.minorTickColor,tickPosition=major?options.tickPosition:options.minorTickPosition,step=labelOptions.step,cHeight=old&&oldChartHeight||chartHeight,attribs,x,y;x=horiz?translate(pos+tickmarkOffset,null,null,old)+transB:plotLeft+offset+(opposite?(old&&oldChartWidth||chartWidth)-marginRight-plotLeft:0);y=horiz?cHeight-marginBottom+offset-(opposite?plotHeight:0):cHeight-translate(pos+tickmarkOffset,null,null,old)-transB;if(gridLineWidth){gridLinePath=getPlotLinePath(pos+tickmarkOffset,gridLineWidth,old);if(gridLine===UNDEFINED){attribs={stroke:gridLineColor,'stroke-width':gridLineWidth};if(dashStyle){attribs.dashstyle=dashStyle;}
- tick.gridLine=gridLine=gridLineWidth?renderer.path(gridLinePath).attr(attribs).add(gridGroup):null;}
- if(gridLine){gridLine.animate({d:gridLinePath});}}
- if(tickWidth){if(tickPosition=='inside'){tickLength=-tickLength;}
- if(opposite){tickLength=-tickLength;}
- markPath=renderer.crispLine([M,x,y,L,x+(horiz?0:-tickLength),y+(horiz?tickLength:0)],tickWidth);if(mark){mark.animate({d:markPath});}else{tick.mark=renderer.path(markPath).attr({stroke:tickColor,'stroke-width':tickWidth}).add(axisGroup);}}
- if(label){x=x+labelOptions.x-(tickmarkOffset&&horiz?tickmarkOffset*transA*(reversed?-1:1):0);y=y+labelOptions.y-(tickmarkOffset&&!horiz?tickmarkOffset*transA*(reversed?1:-1):0);if(staggerLines){y+=(index%staggerLines)*16;}
- if(step){label[index%step?'hide':'show']();}
- label[tick.isNew?'attr':'animate']({x:x,y:y});}
- tick.isNew=false;},destroy:function(){var tick=this,n;for(n in tick){if(tick[n]&&tick[n].destroy){tick[n].destroy();}}}};function PlotLineOrBand(options){var plotLine=this;if(options){plotLine.options=options;plotLine.id=options.id;}
- return plotLine;}
- PlotLineOrBand.prototype={render:function(){var plotLine=this,options=plotLine.options,optionsLabel=options.label,label=plotLine.label,width=options.width,to=options.to,toPath,from=options.from,dashStyle=options.dashStyle,svgElem=plotLine.svgElem,path=[],addEvent,eventType,xs,ys,x,y,color=options.color,zIndex=options.zIndex,events=options.events,attribs;if(width){path=getPlotLinePath(options.value,width);attribs={stroke:color,'stroke-width':width};if(dashStyle){attribs.dashstyle=dashStyle;}}
- else if(defined(from)&&defined(to)){from=mathMax(from,min);to=mathMin(to,max);toPath=getPlotLinePath(to);path=getPlotLinePath(from);if(path&&toPath){path.push(toPath[4],toPath[5],toPath[1],toPath[2]);}else{path=null;}
- attribs={fill:color};}else{return;}
- if(defined(zIndex)){attribs.zIndex=zIndex;}
- if(svgElem){if(path){svgElem.animate({d:path},null,svgElem.onGetPath);}else{svgElem.hide();svgElem.onGetPath=function(){svgElem.show();}}}else if(path&&path.length){plotLine.svgElem=svgElem=renderer.path(path).attr(attribs).add();if(events){addEvent=function(eventType){svgElem.on(eventType,function(e){events[eventType].apply(plotLine,[e]);});};for(eventType in events){addEvent(eventType);}}}
- if(optionsLabel&&defined(optionsLabel.text)&&path&&path.length&&plotWidth>0&&plotHeight>0){optionsLabel=merge({align:horiz&&toPath&&'center',x:horiz?!toPath&&4:10,verticalAlign:!horiz&&toPath&&'middle',y:horiz?toPath?16:10:toPath?6:-4,rotation:horiz&&!toPath&&90},optionsLabel);if(!label){plotLine.label=label=renderer.text(optionsLabel.text,0,0).attr({align:optionsLabel.textAlign||optionsLabel.align,rotation:optionsLabel.rotation,zIndex:zIndex}).css(optionsLabel.style).add();}
- xs=[path[1],path[4],path[6]||path[1]];ys=[path[2],path[5],path[7]||path[2]];x=mathMin.apply(math,xs);y=mathMin.apply(math,ys);label.align(optionsLabel,false,{x:x,y:y,width:mathMax.apply(math,xs)-x,height:mathMax.apply(math,ys)-y});label.show();}else if(label){label.hide();}
- return plotLine;},destroy:function(){var obj=this,n;for(n in obj){if(obj[n]&&obj[n].destroy){obj[n].destroy();}
- delete obj[n];}
- erase(plotLinesAndBands,obj);}};function getSeriesExtremes(){var posStack=[],negStack=[],run;dataMin=dataMax=null;associatedSeries=[];each(series,function(serie){run=false;each(['xAxis','yAxis'],function(strAxis){if(serie.isCartesian&&(strAxis=='xAxis'&&isXAxis||strAxis=='yAxis'&&!isXAxis)&&((serie.options[strAxis]==options.index)||(serie.options[strAxis]===UNDEFINED&&options.index===0))){serie[strAxis]=axis;associatedSeries.push(serie);run=true;}});if(!serie.visible&&optionsChart.ignoreHiddenSeries){run=false;}
- if(run){var stacking,posPointStack,negPointStack,stackKey,negKey;if(!isXAxis){stacking=serie.options.stacking;usePercentage=stacking=='percent';if(stacking){stackKey=serie.type+pick(serie.options.stack,'');negKey='-'+stackKey;serie.stackKey=stackKey;posPointStack=posStack[stackKey]||[];posStack[stackKey]=posPointStack;negPointStack=negStack[negKey]||[];negStack[negKey]=negPointStack;}
- if(usePercentage){dataMin=0;dataMax=99;}}
- if(serie.isCartesian){each(serie.data,function(point,i){var pointX=point.x,pointY=point.y,isNegative=pointY<0,pointStack=isNegative?negPointStack:posPointStack,key=isNegative?negKey:stackKey,totalPos;if(dataMin===null){dataMin=dataMax=point[xOrY];}
- if(isXAxis){if(pointX>dataMax){dataMax=pointX;}else if(pointX<dataMin){dataMin=pointX;}}
- else if(defined(pointY)){if(stacking){pointStack[pointX]=defined(pointStack[pointX])?pointStack[pointX]+pointY:pointY;}
- totalPos=pointStack?pointStack[pointX]:pointY;if(!usePercentage){if(totalPos>dataMax){dataMax=totalPos;}else if(totalPos<dataMin){dataMin=totalPos;}}
- if(stacking){if(!stacks[key]){stacks[key]={};}
- stacks[key][pointX]={total:totalPos,cum:totalPos};}}});if(/(area|column|bar)/.test(serie.type)&&!isXAxis){if(dataMin>=0){dataMin=0;ignoreMinPadding=true;}else if(dataMax<0){dataMax=0;ignoreMaxPadding=true;}}}}});}
- translate=function(val,backwards,cvsCoord,old){var sign=1,cvsOffset=0,localA=old?oldTransA:transA,localMin=old?oldMin:min,returnValue;if(!localA){localA=transA;}
- if(cvsCoord){sign*=-1;cvsOffset=axisLength;}
- if(reversed){sign*=-1;cvsOffset-=sign*axisLength;}
- if(backwards){if(reversed){val=axisLength-val;}
- returnValue=val/localA+localMin;}else{returnValue=sign*(val-localMin)*localA+cvsOffset;}
- return returnValue;};getPlotLinePath=function(value,lineWidth,old){var x1,y1,x2,y2,translatedValue=translate(value,null,null,old),cHeight=old&&oldChartHeight||chartHeight,cWidth=old&&oldChartWidth||chartWidth,skip;x1=x2=mathRound(translatedValue+transB);y1=y2=mathRound(cHeight-translatedValue-transB);if(isNaN(translatedValue)){skip=true;}else if(horiz){y1=plotTop;y2=cHeight-marginBottom;if(x1<plotLeft||x1>plotLeft+plotWidth){skip=true;}}else{x1=plotLeft;x2=cWidth-marginRight;if(y1<plotTop||y1>plotTop+plotHeight){skip=true;}}
- return skip?null:renderer.crispLine([M,x1,y1,L,x2,y2],lineWidth||0);};function normalizeTickInterval(interval,multiples){var normalized;magnitude=multiples?1:math.pow(10,mathFloor(math.log(interval)/math.LN10));normalized=interval/magnitude;if(!multiples){multiples=[1,2,2.5,5,10];if(options.allowDecimals===false){if(magnitude==1){multiples=[1,2,5,10];}else if(magnitude<=0.1){multiples=[1/magnitude];}}}
- for(var i=0;i<multiples.length;i++){interval=multiples[i];if(normalized<=(multiples[i]+(multiples[i+1]||multiples[i]))/2){break;}}
- interval*=magnitude;return interval;}
- function setDateTimeTickPositions(){tickPositions=[];var i,useUTC=defaultOptions.global.useUTC,oneSecond=1000/timeFactor,oneMinute=60000/timeFactor,oneHour=3600000/timeFactor,oneDay=24*3600000/timeFactor,oneWeek=7*24*3600000/timeFactor,oneMonth=30*24*3600000/timeFactor,oneYear=31556952000/timeFactor,units=[['second',oneSecond,[1,2,5,10,15,30]],['minute',oneMinute,[1,2,5,10,15,30]],['hour',oneHour,[1,2,3,4,6,8,12]],['day',oneDay,[1,2]],['week',oneWeek,[1,2]],['month',oneMonth,[1,2,3,4,6]],['year',oneYear,null]],unit=units[6],interval=unit[1],multiples=unit[2];for(i=0;i<units.length;i++){unit=units[i];interval=unit[1];multiples=unit[2];if(units[i+1]){var lessThan=(interval*multiples[multiples.length-1]+
- units[i+1][1])/2;if(tickInterval<=lessThan){break;}}}
- if(interval==oneYear&&tickInterval<5*interval){multiples=[1,2,5];}
- var multitude=normalizeTickInterval(tickInterval/interval,multiples),minYear,minDate=new Date(min*timeFactor);minDate.setMilliseconds(0);if(interval>=oneSecond){minDate.setSeconds(interval>=oneMinute?0:multitude*mathFloor(minDate.getSeconds()/multitude));}
- if(interval>=oneMinute){minDate[setMinutes](interval>=oneHour?0:multitude*mathFloor(minDate[getMinutes]()/multitude));}
- if(interval>=oneHour){minDate[setHours](interval>=oneDay?0:multitude*mathFloor(minDate[getHours]()/multitude));}
- if(interval>=oneDay){minDate[setDate](interval>=oneMonth?1:multitude*mathFloor(minDate[getDate]()/multitude));}
- if(interval>=oneMonth){minDate[setMonth](interval>=oneYear?0:multitude*mathFloor(minDate[getMonth]()/multitude));minYear=minDate[getFullYear]();}
- if(interval>=oneYear){minYear-=minYear%multitude;minDate[setFullYear](minYear);}
- if(interval==oneWeek){minDate[setDate](minDate[getDate]()-minDate[getDay]()+
- options.startOfWeek);}
- i=1;minYear=minDate[getFullYear]();var time=minDate.getTime()/timeFactor,minMonth=minDate[getMonth](),minDateDate=minDate[getDate]();while(time<max&&i<plotWidth){tickPositions.push(time);if(interval==oneYear){time=makeTime(minYear+i*multitude,0)/timeFactor;}else if(interval==oneMonth){time=makeTime(minYear,minMonth+i*multitude)/timeFactor;}else if(!useUTC&&(interval==oneDay||interval==oneWeek)){time=makeTime(minYear,minMonth,minDateDate+
- i*multitude*(interval==oneDay?1:7));}else{time+=interval*multitude;}
- i++;}
- tickPositions.push(time);dateTimeLabelFormat=options.dateTimeLabelFormats[unit[0]];}
- function correctFloat(num){var invMag=(magnitude<1?mathRound(1/magnitude):1)*10;return mathRound(num*invMag)/invMag;}
- function setLinearTickPositions(){var i,roundedMin=mathFloor(min/tickInterval)*tickInterval,roundedMax=mathCeil(max/tickInterval)*tickInterval;tickPositions=[];i=correctFloat(roundedMin);while(i<=roundedMax){tickPositions.push(i);i=correctFloat(i+tickInterval);}}
- function setTickPositions(secondPass){var length,catPad,linkedParent,linkedParentExtremes,tickIntervalOption=options.tickInterval,tickPixelIntervalOption=options.tickPixelInterval,maxZoom=options.maxZoom||(isXAxis?mathMin(chart.smallestInterval*5,dataMax-dataMin):null),zoomOffset;axisLength=horiz?plotWidth:plotHeight;if(isLinked){linkedParent=chart[isXAxis?'xAxis':'yAxis'][options.linkedTo];linkedParentExtremes=linkedParent.getExtremes();min=pick(linkedParentExtremes.min,linkedParentExtremes.dataMin);max=pick(linkedParentExtremes.max,linkedParentExtremes.dataMax);}
- else{min=pick(userSetMin,options.min,dataMin);max=pick(userSetMax,options.max,dataMax);}
- if(max-min<maxZoom){zoomOffset=(maxZoom-max+min)/2;min=mathMax(min-zoomOffset,pick(options.min,min-zoomOffset),dataMin);max=mathMin(min+maxZoom,pick(options.max,min+maxZoom),dataMax);}
- if(!categories&&!usePercentage&&!isLinked&&defined(min)&&defined(max)){length=(max-min)||1;if(!defined(options.min)&&!defined(userSetMin)&&minPadding&&(dataMin<0||!ignoreMinPadding)){min-=length*minPadding;}
- if(!defined(options.max)&&!defined(userSetMax)&&maxPadding&&(dataMax>0||!ignoreMaxPadding)){max+=length*maxPadding;}}
- if(min==max){tickInterval=1;}else if(isLinked&&!tickIntervalOption&&tickPixelIntervalOption==linkedParent.options.tickPixelInterval){tickInterval=linkedParent.tickInterval;}else{tickInterval=pick(tickIntervalOption,categories?1:(max-min)*tickPixelIntervalOption/axisLength);}
- if(!isDatetimeAxis&&!defined(options.tickInterval)){axis.tickInterval=tickInterval=normalizeTickInterval(tickInterval);}
- minorTickInterval=options.minorTickInterval==='auto'&&tickInterval?tickInterval/5:options.minorTickInterval;if(isDatetimeAxis){setDateTimeTickPositions();}else{setLinearTickPositions();}
- if(!isLinked){if(categories||(isXAxis&&chart.hasColumn)){catPad=(categories?1:tickInterval)*0.5;min-=catPad;max+=catPad;}
- var roundedMin=tickPositions[0],roundedMax=tickPositions[tickPositions.length-1];if(options.startOnTick){min=roundedMin;}else if(min>roundedMin){tickPositions.shift();}
- if(options.endOnTick){max=roundedMax;}else if(max<roundedMax){tickPositions.pop();}
- if(!maxTicks){maxTicks={x:0,y:0};}
- if(!isDatetimeAxis&&tickPositions.length>maxTicks[xOrY]){maxTicks[xOrY]=tickPositions.length;}}}
- function adjustTickAmount(){if(!isDatetimeAxis&&!categories&&!isLinked){var oldTickAmount=tickAmount,calculatedTickAmount=tickPositions.length;tickAmount=maxTicks[xOrY];if(calculatedTickAmount<tickAmount){while(tickPositions.length<tickAmount){tickPositions.push(correctFloat(tickPositions[tickPositions.length-1]+tickInterval));}
- transA*=(calculatedTickAmount-1)/(tickAmount-1);max=tickPositions[tickPositions.length-1];}
- if(defined(oldTickAmount)&&tickAmount!=oldTickAmount){axis.isDirty=true;}}}
- function setScale(){var type,i;oldMin=min;oldMax=max;getSeriesExtremes();setTickPositions();oldTransA=transA;transA=axisLength/((max-min)||1);if(!isXAxis){for(type in stacks){for(i in stacks[type]){stacks[type][i].cum=stacks[type][i].total;}}}
- if(!axis.isDirty){axis.isDirty=(min!=oldMin||max!=oldMax);}}
- function setExtremes(newMin,newMax,redraw,animation){setAnimation(animation,chart);redraw=pick(redraw,true);fireEvent(axis,'setExtremes',{min:newMin,max:newMax},function(){userSetMin=newMin;userSetMax=newMax;if(redraw){chart.redraw();}});}
- function getExtremes(){return{min:min,max:max,dataMin:dataMin,dataMax:dataMax};}
- function getThreshold(threshold){if(min>threshold){threshold=min;}else if(max<threshold){threshold=max;}
- return translate(threshold,0,1);}
- function addPlotBandOrLine(options){var obj=new PlotLineOrBand(options).render();plotLinesAndBands.push(obj);return obj;}
- function getOffset(){var hasData=associatedSeries.length&&defined(min)&&defined(max),titleOffset=0,titleMargin=0,axisTitleOptions=options.title,labelOptions=options.labels,directionFactor=[-1,1,1,-1][side];if(!axisGroup){axisGroup=renderer.g('axis').attr({zIndex:7}).add();gridGroup=renderer.g('grid').attr({zIndex:1}).add();}
- labelOffset=0;if(hasData||isLinked){each(tickPositions,function(pos){if(!ticks[pos]){ticks[pos]=new Tick(pos);}else{ticks[pos].addLabel();}
- if(side===0||side==2||{1:'left',3:'right'}[side]==labelOptions.align){labelOffset=mathMax(ticks[pos].getLabelSize(),labelOffset);}});if(staggerLines){labelOffset+=(staggerLines-1)*16;}}else{for(var n in ticks){ticks[n].destroy();delete ticks[n];}}
- if(axisTitleOptions&&axisTitleOptions.text){if(!axis.axisTitle){axis.axisTitle=renderer.text(axisTitleOptions.text,0,0).attr({zIndex:7,rotation:axisTitleOptions.rotation||0,align:axisTitleOptions.textAlign||{low:'left',middle:'center',high:'right'}[axisTitleOptions.align]}).css(axisTitleOptions.style).add();}
- titleOffset=axis.axisTitle.getBBox()[horiz?'height':'width'];titleMargin=pick(axisTitleOptions.margin,horiz?5:10);}
- offset=directionFactor*(options.offset||axisOffset[side]);axisTitleMargin=labelOffset+
- (side!=2&&labelOffset&&directionFactor*options.labels[horiz?'y':'x'])+
- titleMargin;axisOffset[side]=mathMax(axisOffset[side],axisTitleMargin+titleOffset+directionFactor*offset);}
- function render(){var axisTitleOptions=options.title,alternateGridColor=options.alternateGridColor,lineWidth=options.lineWidth,lineLeft,lineTop,linePath,hasRendered=chart.hasRendered,slideInTicks=hasRendered&&defined(oldMin)&&!isNaN(oldMin),hasData=associatedSeries.length&&defined(min)&&defined(max);axisLength=horiz?plotWidth:plotHeight;transA=axisLength/((max-min)||1);transB=horiz?plotLeft:marginBottom;if(hasData||isLinked){if(minorTickInterval&&!categories){var pos=min+(tickPositions[0]-min)%minorTickInterval;for(pos;pos<=max;pos+=minorTickInterval){if(!minorTicks[pos]){minorTicks[pos]=new Tick(pos,true);}
- if(slideInTicks&&minorTicks[pos].isNew){minorTicks[pos].render(null,true);}
- minorTicks[pos].isActive=true;minorTicks[pos].render();}}
- each(tickPositions,function(pos,i){if(!isLinked||(pos>=min&&pos<=max)){if(slideInTicks&&ticks[pos].isNew){ticks[pos].render(i,true);}
- ticks[pos].isActive=true;ticks[pos].render(i);}});if(alternateGridColor){each(tickPositions,function(pos,i){if(i%2===0&&pos<max){if(!alternateBands[pos]){alternateBands[pos]=new PlotLineOrBand();}
- alternateBands[pos].options={from:pos,to:tickPositions[i+1]!==UNDEFINED?tickPositions[i+1]:max,color:alternateGridColor};alternateBands[pos].render();alternateBands[pos].isActive=true;}});}
- if(!hasRendered){each((options.plotLines||[]).concat(options.plotBands||[]),function(plotLineOptions){plotLinesAndBands.push(new PlotLineOrBand(plotLineOptions).render());});}}
- each([ticks,minorTicks,alternateBands],function(coll){for(var pos in coll){if(!coll[pos].isActive){coll[pos].destroy();delete coll[pos];}else{coll[pos].isActive=false;}}});if(lineWidth){lineLeft=plotLeft+(opposite?plotWidth:0)+offset;lineTop=chartHeight-marginBottom-(opposite?plotHeight:0)+offset;linePath=renderer.crispLine([M,horiz?plotLeft:lineLeft,horiz?lineTop:plotTop,L,horiz?chartWidth-marginRight:lineLeft,horiz?lineTop:chartHeight-marginBottom],lineWidth);if(!axisLine){axisLine=renderer.path(linePath).attr({stroke:options.lineColor,'stroke-width':lineWidth,zIndex:7}).add();}else{axisLine.animate({d:linePath});}}
- if(axis.axisTitle){var margin=horiz?plotLeft:plotTop,fontSize=pInt(axisTitleOptions.style.fontSize||12),alongAxis={low:margin+(horiz?0:axisLength),middle:margin+axisLength/2,high:margin+(horiz?axisLength:0)}[axisTitleOptions.align],offAxis=(horiz?plotTop+plotHeight:plotLeft)+
- (horiz?1:-1)*(opposite?-1:1)*axisTitleMargin+
- (side==2?fontSize:0);axis.axisTitle[hasRendered?'animate':'attr']({x:horiz?alongAxis:offAxis+(opposite?plotWidth:0)+offset+
- (axisTitleOptions.x||0),y:horiz?offAxis-(opposite?plotHeight:0)+offset:alongAxis+(axisTitleOptions.y||0)});}
- axis.isDirty=false;}
- function removePlotBandOrLine(id){for(var i=0;i<plotLinesAndBands.length;i++){if(plotLinesAndBands[i].id==id){plotLinesAndBands[i].destroy();}}}
- function redraw(){if(tracker.resetTracker){tracker.resetTracker();}
- render();each(plotLinesAndBands,function(plotLine){plotLine.render();});each(associatedSeries,function(series){series.isDirty=true;});}
- function setCategories(newCategories,doRedraw){axis.categories=categories=newCategories;each(associatedSeries,function(series){series.translate();series.setTooltipPoints(true);});axis.isDirty=true;if(pick(doRedraw,true)){chart.redraw();}}
- if(inverted&&isXAxis&&reversed===UNDEFINED){reversed=true;}
- extend(axis,{addPlotBand:addPlotBandOrLine,addPlotLine:addPlotBandOrLine,adjustTickAmount:adjustTickAmount,categories:categories,getExtremes:getExtremes,getPlotLinePath:getPlotLinePath,getThreshold:getThreshold,isXAxis:isXAxis,options:options,plotLinesAndBands:plotLinesAndBands,getOffset:getOffset,render:render,setCategories:setCategories,setExtremes:setExtremes,setScale:setScale,setTickPositions:setTickPositions,translate:translate,redraw:redraw,removePlotBand:removePlotBandOrLine,removePlotLine:removePlotBandOrLine,reversed:reversed,stacks:stacks});for(eventType in events){addEvent(axis,eventType,events[eventType]);}
- setScale();}
- function Toolbar(chart){var buttons={};function add(id,text,title,fn){if(!buttons[id]){var button=renderer.text(text,0,0).css(options.toolbar.itemStyle).align({align:'right',x:-marginRight-20,y:plotTop+30}).on('click',fn).attr({align:'right',zIndex:20}).add();buttons[id]=button;}}
- function remove(id){discardElement(buttons[id].element);buttons[id]=null;}
- return{add:add,remove:remove};}
- function Tooltip(options){var currentSeries,borderWidth=options.borderWidth,crosshairsOptions=options.crosshairs,crosshairs=[],style=options.style,shared=options.shared,padding=pInt(style.padding),boxOffLeft=borderWidth+padding,tooltipIsHidden=true,boxWidth,boxHeight,currentX=0,currentY=0;style.padding=0;var group=renderer.g('tooltip').attr({zIndex:8}).add(),box=renderer.rect(boxOffLeft,boxOffLeft,0,0,options.borderRadius,borderWidth).attr({fill:options.backgroundColor,'stroke-width':borderWidth}).add(group).shadow(options.shadow),label=renderer.text('',padding+boxOffLeft,pInt(style.fontSize)+padding+boxOffLeft).attr({zIndex:1}).css(style).add(group);group.hide();function defaultFormatter(){var pThis=this,points=pThis.points||splat(pThis.point),xAxis=points[0].series.xAxis,x=pThis.x,isDateTime=xAxis&&xAxis.options.type=='datetime',useHeader=isString(x)||isDateTime,series,s;s=useHeader?['<span style="font-size: 10px">',(isDateTime?dateFormat('%A, %b %e, %Y',x):x),'</span><br/>']:[];each(points,function(point){series=point.series;s.push('<span style="color:'+series.color+'">',(point.name||series.name),'</span>: ',(!useHeader?('<b>x = '+(point.name||point.x)+',</b> '):''),'<b>',(!useHeader?'y = ':''),point.y,'</b><br/>');});return s.join('');}
- function move(finalX,finalY){currentX=tooltipIsHidden?finalX:(2*currentX+finalX)/3;currentY=tooltipIsHidden?finalY:(currentY+finalY)/2;group.translate(currentX,currentY);if(mathAbs(finalX-currentX)>1||mathAbs(finalY-currentY)>1){tooltipTick=function(){move(finalX,finalY);};}else{tooltipTick=null;}}
- function hide(){if(!tooltipIsHidden){group.hide();each(crosshairs,function(crosshair){crosshair.hide();});each(series,function(item){if(item.hoverPoint){item.hoverPoint.setState();}});tooltipIsHidden=true;}}
- function refresh(point){var x,y,boxX,boxY,show,bBox,plotX,plotY=0,textConfig={},text,pointConfig=[],tooltipPos=point.tooltipPos,formatter=options.formatter||defaultFormatter,getConfig=function(point){return{series:point.series,point:point,x:point.category,y:point.y,percentage:point.percentage,total:point.total||point.stackTotal};};if(shared){each(point,function(item,i){var series=item.series,hoverPoint=series.hoverPoint;if(hoverPoint){hoverPoint.setState();}
- series.hoverPoint=item;item.setState(HOVER_STATE);plotY+=item.plotY;pointConfig.push(getConfig(item));});plotX=point[0].plotX;plotY/=point.length;textConfig={x:point[0].category};textConfig.points=pointConfig;point=point[0];}else{textConfig=getConfig(point);}
- text=formatter.call(textConfig);currentSeries=point.series;plotX=shared?plotX:point.plotX;plotY=shared?plotY:point.plotY;x=mathRound(tooltipPos?tooltipPos[0]:(inverted?plotWidth-plotY:plotX));y=mathRound(tooltipPos?tooltipPos[1]:(inverted?plotHeight-plotX:plotY));show=!point.series.isCartesian||isInsidePlot(x,y);if(text===false||!show){hide();}else{if(tooltipIsHidden){group.show();tooltipIsHidden=false;}
- label.attr({text:text});bBox=label.getBBox();boxWidth=bBox.width;boxHeight=bBox.height;box.attr({width:boxWidth+2*padding,height:boxHeight+2*padding,stroke:options.borderColor||point.color||currentSeries.color||'#606060'});boxX=x-boxWidth+plotLeft-25;boxY=y-boxHeight+plotTop+10;if(boxX<7){boxX=7;boxY-=30;}
- if(boxY<5){boxY=5;}else if(boxY+boxHeight>chartHeight){boxY=chartHeight-boxHeight-5;}
- move(mathRound(boxX-boxOffLeft),mathRound(boxY-boxOffLeft));}
- if(crosshairsOptions){crosshairsOptions=splat(crosshairsOptions);var path,i=crosshairsOptions.length,attribs,axis;while(i--){if(crosshairsOptions[i]&&(axis=point.series[i?'yAxis':'xAxis'])){path=axis.getPlotLinePath(point[i?'y':'x'],1);if(crosshairs[i]){crosshairs[i].attr({d:path,visibility:VISIBLE});}else{attribs={'stroke-width':crosshairsOptions[i].width||1,stroke:crosshairsOptions[i].color||'#C0C0C0',zIndex:2};if(crosshairsOptions[i].dashStyle){attribs.dashstyle=crosshairsOptions[i].dashStyle;}
- crosshairs[i]=renderer.path(path).attr(attribs).add();}}}}}
- return{shared:shared,refresh:refresh,hide:hide};}
- function MouseTracker(chart,options){var mouseDownX,mouseDownY,hasDragged,selectionMarker,zoomType=optionsChart.zoomType,zoomX=/x/.test(zoomType),zoomY=/y/.test(zoomType),zoomHor=zoomX&&!inverted||zoomY&&inverted,zoomVert=zoomY&&!inverted||zoomX&&inverted;function normalizeMouseEvent(e){var ePos;e=e||win.event;if(!e.target){e.target=e.srcElement;}
- ePos=e.touches?e.touches.item(0):e;if(e.type!='mousemove'||win.opera){chartPosition=getPosition(container);}
- if(isIE){e.chartX=e.x;e.chartY=e.y;}else{if(ePos.layerX===UNDEFINED){e.chartX=ePos.pageX-chartPosition.left;e.chartY=ePos.pageY-chartPosition.top;}else{e.chartX=e.layerX;e.chartY=e.layerY;}}
- return e;}
- function getMouseCoordinates(e){var coordinates={xAxis:[],yAxis:[]};each(axes,function(axis,i){var translate=axis.translate,isXAxis=axis.isXAxis,isHorizontal=inverted?!isXAxis:isXAxis;coordinates[isXAxis?'xAxis':'yAxis'].push({axis:axis,value:translate(isHorizontal?e.chartX-plotLeft:plotHeight-e.chartY+plotTop,true)});});return coordinates;}
- function onmousemove(e){var point,points,hoverPoint=chart.hoverPoint,hoverSeries=chart.hoverSeries,i,j,distance=chartWidth,index=inverted?e.chartY:e.chartX-plotLeft;if(tooltip&&options.shared){points=[];i=series.length;for(j=0;j<i;j++){if(series[j].visible&&series[j].tooltipPoints.length){point=series[j].tooltipPoints[index];point._dist=mathAbs(index-point.plotX);distance=mathMin(distance,point._dist);points.push(point);}}
- i=points.length;while(i--){if(points[i]._dist>distance){points.splice(i,1);}}
- if(points.length&&(points[0].plotX!=hoverX)){tooltip.refresh(points);hoverX=points[0].plotX;}}
- if(hoverSeries&&hoverSeries.tracker){point=hoverSeries.tooltipPoints[index];if(point&&point!=hoverPoint){point.onMouseOver();}}}
- function resetTracker(){var hoverSeries=chart.hoverSeries,hoverPoint=chart.hoverPoint;if(hoverPoint){hoverPoint.onMouseOut();}
- if(hoverSeries){hoverSeries.onMouseOut();}
- if(tooltip){tooltip.hide();}
- hoverX=null;}
- function drop(){if(selectionMarker){var selectionData={xAxis:[],yAxis:[]},selectionBox=selectionMarker.getBBox(),selectionLeft=selectionBox.x-plotLeft,selectionTop=selectionBox.y-plotTop;if(hasDragged){each(axes,function(axis,i){var translate=axis.translate,isXAxis=axis.isXAxis,isHorizontal=inverted?!isXAxis:isXAxis,selectionMin=translate(isHorizontal?selectionLeft:plotHeight-selectionTop-selectionBox.height,true),selectionMax=translate(isHorizontal?selectionLeft+selectionBox.width:plotHeight-selectionTop,true);selectionData[isXAxis?'xAxis':'yAxis'].push({axis:axis,min:mathMin(selectionMin,selectionMax),max:mathMax(selectionMin,selectionMax)});});fireEvent(chart,'selection',selectionData,zoom);}
- selectionMarker=selectionMarker.destroy();}
- chart.mouseIsDown=mouseIsDown=hasDragged=false;removeEvent(doc,hasTouch?'touchend':'mouseup',drop);}
- function setDOMEvents(){var lastWasOutsidePlot=true;container.onmousedown=function(e){e=normalizeMouseEvent(e);chart.mouseIsDown=mouseIsDown=true;mouseDownX=e.chartX;mouseDownY=e.chartY;addEvent(doc,hasTouch?'touchend':'mouseup',drop);};var mouseMove=function(e){if(e&&e.touches&&e.touches.length>1){return;}
- e=normalizeMouseEvent(e);if(e.type=='mousemove'){e.returnValue=false;}
- var chartX=e.chartX,chartY=e.chartY,isOutsidePlot=!isInsidePlot(chartX-plotLeft,chartY-plotTop);if(isOutsidePlot){if(!lastWasOutsidePlot){resetTracker();}
- if(chartX<plotLeft){chartX=plotLeft;}else if(chartX>plotLeft+plotWidth){chartX=plotLeft+plotWidth;}
- if(chartY<plotTop){chartY=plotTop;}else if(chartY>plotTop+plotHeight){chartY=plotTop+plotHeight;}}
- if(mouseIsDown&&e.type!='touchstart'){if((hasDragged=Math.sqrt(Math.pow(mouseDownX-chartX,2)+
- Math.pow(mouseDownY-chartY,2))>10)){if(hasCartesianSeries&&(zoomX||zoomY)&&isInsidePlot(mouseDownX-plotLeft,mouseDownY-plotTop)){if(!selectionMarker){selectionMarker=renderer.rect(plotLeft,plotTop,zoomHor?1:plotWidth,zoomVert?1:plotHeight,0).attr({fill:'rgba(69,114,167,0.25)',zIndex:7}).add();}}
- if(selectionMarker&&zoomHor){var xSize=chartX-mouseDownX;selectionMarker.attr({width:mathAbs(xSize),x:(xSize>0?0:xSize)+mouseDownX});}
- if(selectionMarker&&zoomVert){var ySize=chartY-mouseDownY;selectionMarker.attr({height:mathAbs(ySize),y:(ySize>0?0:ySize)+mouseDownY});}}}else if(!isOutsidePlot){onmousemove(e);}
- lastWasOutsidePlot=isOutsidePlot;return false;};container.onmousemove=mouseMove;addEvent(container,'mouseleave',resetTracker);container.ontouchstart=function(e){if(zoomX||zoomY){container.onmousedown(e);}
- mouseMove(e);};container.ontouchmove=mouseMove;container.ontouchend=function(){if(hasDragged){resetTracker();}};container.onclick=function(e){var hoverPoint=chart.hoverPoint;e=normalizeMouseEvent(e);e.cancelBubble=true;if(!hasDragged){if(hoverPoint&&attr(e.target,'isTracker')){var plotX=hoverPoint.plotX,plotY=hoverPoint.plotY;extend(hoverPoint,{pageX:chartPosition.left+plotLeft+
- (inverted?plotWidth-plotY:plotX),pageY:chartPosition.top+plotTop+
- (inverted?plotHeight-plotX:plotY)});fireEvent(hoverPoint.series,'click',extend(e,{point:hoverPoint}));hoverPoint.firePointEvent('click',e);}else{extend(e,getMouseCoordinates(e));if(isInsidePlot(e.chartX-plotLeft,e.chartY-plotTop)){fireEvent(chart,'click',e);}}}
- hasDragged=false;};}
- placeTrackerGroup=function(){if(!trackerGroup){chart.trackerGroup=trackerGroup=renderer.g('tracker').attr({zIndex:9}).add();}else{trackerGroup.translate(plotLeft,plotTop);if(inverted){trackerGroup.attr({width:chart.plotWidth,height:chart.plotHeight}).invert();}}};placeTrackerGroup();if(options.enabled){chart.tooltip=tooltip=Tooltip(options);}
- setDOMEvents();tooltipInterval=setInterval(function(){if(tooltipTick){tooltipTick();}},32);extend(this,{zoomX:zoomX,zoomY:zoomY,resetTracker:resetTracker});}
- var Legend=function(chart){var options=chart.options.legend;if(!options.enabled){return;}
- var horizontal=options.layout=='horizontal',symbolWidth=options.symbolWidth,symbolPadding=options.symbolPadding,allItems=[],style=options.style,itemStyle=options.itemStyle,itemHoverStyle=options.itemHoverStyle,itemHiddenStyle=options.itemHiddenStyle,padding=pInt(style.padding),rightPadding=20,y=18,initialItemX=4+padding+symbolWidth+symbolPadding,itemX,itemY,lastItemY,lastItemHeight=0,box,legendBorderWidth=options.borderWidth,legendBackgroundColor=options.backgroundColor,legendGroup,offsetWidth,widthOption=options.width,series=chart.series,reversedLegend=options.reversed;function colorizeItem(item,visible){var legendItem=item.legendItem,legendLine=item.legendLine,legendSymbol=item.legendSymbol,hiddenColor=itemHiddenStyle.color,textColor=visible?options.itemStyle.color:hiddenColor,symbolColor=visible?item.color:hiddenColor;if(legendItem){legendItem.css({fill:textColor});}
- if(legendLine){legendLine.attr({stroke:symbolColor});}
- if(legendSymbol){legendSymbol.attr({stroke:symbolColor,fill:symbolColor});}}
- function positionItem(item,itemX,itemY){var legendItem=item.legendItem,legendLine=item.legendLine,legendSymbol=item.legendSymbol,checkbox=item.checkbox;if(legendItem){legendItem.attr({x:itemX,y:itemY});}
- if(legendLine){legendLine.translate(itemX,itemY-4);}
- if(legendSymbol){legendSymbol.attr({x:itemX+legendSymbol.xOff,y:itemY+legendSymbol.yOff});}
- if(checkbox){checkbox.x=itemX;checkbox.y=itemY;}}
- function destroyItem(item){var checkbox=item.checkbox;erase(allItems,item);each(['legendItem','legendLine','legendSymbol'],function(key){if(item[key]){item[key].destroy();}});if(checkbox){discardElement(item.checkbox);}}
- function positionCheckboxes(){each(allItems,function(item){var checkbox=item.checkbox;if(checkbox){css(checkbox,{left:(legendGroup.attr('translateX')+item.legendItemWidth+checkbox.x-40)+PX,top:(legendGroup.attr('translateY')+checkbox.y-11)+PX});}});}
- function renderItem(item){var bBox,itemWidth,legendSymbol,symbolX,symbolY,attribs,simpleSymbol,li=item.legendItem,series=item.series||item;if(!li){simpleSymbol=/^(bar|pie|area|column)$/.test(series.type);item.legendItem=li=renderer.text(options.labelFormatter.call(item),0,0).css(item.visible?itemStyle:itemHiddenStyle).on('mouseover',function(){item.setState(HOVER_STATE);li.css(itemHoverStyle);}).on('mouseout',function(){li.css(item.visible?itemStyle:itemHiddenStyle);item.setState();}).on('click',function(event){var strLegendItemClick='legendItemClick',fnLegendItemClick=function(){item.setVisible();};if(item.firePointEvent){item.firePointEvent(strLegendItemClick,null,fnLegendItemClick);}else{fireEvent(item,strLegendItemClick,null,fnLegendItemClick);}}).attr({zIndex:2}).add(legendGroup);if(!simpleSymbol&&item.options&&item.options.lineWidth){var itemOptions=item.options;attribs={'stroke-width':itemOptions.lineWidth,zIndex:2};if(itemOptions.dashStyle){attribs.dashstyle=itemOptions.dashStyle;}
- item.legendLine=renderer.path([M,-symbolWidth-symbolPadding,0,L,-symbolPadding,0]).attr(attribs).add(legendGroup);}
- if(simpleSymbol){legendSymbol=renderer.rect((symbolX=-symbolWidth-symbolPadding),(symbolY=-11),symbolWidth,12,2).attr({'stroke-width':0,zIndex:3}).add(legendGroup);}
- else if(item.options&&item.options.marker&&item.options.marker.enabled){legendSymbol=renderer.symbol(item.symbol,(symbolX=-symbolWidth/2-symbolPadding),(symbolY=-4),item.options.marker.radius).attr(item.pointAttr[NORMAL_STATE]).attr({zIndex:3}).add(legendGroup);}
- if(legendSymbol){legendSymbol.xOff=symbolX;legendSymbol.yOff=symbolY;}
- item.legendSymbol=legendSymbol;colorizeItem(item,item.visible);if(item.options&&item.options.showCheckbox){item.checkbox=createElement('input',{type:'checkbox',checked:item.selected,defaultChecked:item.selected},options.itemCheckboxStyle,container);addEvent(item.checkbox,'click',function(event){var target=event.target;fireEvent(item,'checkboxClick',{checked:target.checked},function(){item.select();});});}}
- positionItem(item,itemX,itemY);bBox=li.getBBox();lastItemY=itemY;lastItemHeight=bBox.height;item.legendItemWidth=itemWidth=options.itemWidth||symbolWidth+symbolPadding+bBox.width+rightPadding;if(horizontal){itemX+=itemWidth;offsetWidth=widthOption||mathMax(itemX-initialItemX,offsetWidth);if(itemX-initialItemX+itemWidth>(widthOption||(chartWidth-2*padding-initialItemX))){itemX=initialItemX;itemY+=lastItemHeight;}}else{itemY+=lastItemHeight;offsetWidth=widthOption||mathMax(itemWidth,offsetWidth);}
- allItems.push(item);}
- function renderLegend(){itemX=initialItemX;itemY=y;offsetWidth=0;lastItemY=0;if(!legendGroup){legendGroup=renderer.g('legend').attr({zIndex:7}).add();}
- if(reversedLegend){series.reverse();}
- each(series,function(serie){if(!serie.options.showInLegend){return;}
- var items=(serie.options.legendType=='point')?serie.data:[serie];each(items,renderItem);});if(reversedLegend){series.reverse();}
- legendWidth=widthOption||offsetWidth;legendHeight=lastItemY-y+lastItemHeight;if(legendBorderWidth||legendBackgroundColor){legendWidth+=2*padding;legendHeight+=2*padding;if(!box){box=renderer.rect(0,0,legendWidth,legendHeight,options.borderRadius,legendBorderWidth||0).attr({stroke:options.borderColor,'stroke-width':legendBorderWidth||0,fill:legendBackgroundColor||NONE}).add(legendGroup).shadow(options.shadow);}else{box.animate({width:legendWidth,height:legendHeight});}}
- var props=['left','right','top','bottom'],prop,i=4;while(i--){prop=props[i];if(style[prop]&&style[prop]!='auto'){options[i<2?'align':'verticalAlign']=prop;options[i<2?'x':'y']=pInt(style[prop])*(i%2?-1:1);}}
- legendGroup.align(extend(options,{width:legendWidth,height:legendHeight}),true,spacingBox);if(!isResizing){positionCheckboxes();}}
- renderLegend();addEvent(chart,'endResize',positionCheckboxes);return{colorizeItem:colorizeItem,destroyItem:destroyItem,renderLegend:renderLegend};};function initSeries(options){var type=options.type||optionsChart.type||optionsChart.defaultSeriesType,typeClass=seriesTypes[type],serie,hasRendered=chart.hasRendered;if(hasRendered){if(inverted&&type=='column'){typeClass=seriesTypes.bar;}else if(!inverted&&type=='bar'){typeClass=seriesTypes.column;}}
- serie=new typeClass();serie.init(chart,options);if(!hasRendered&&serie.inverted){inverted=true;}
- if(serie.isCartesian){hasCartesianSeries=serie.isCartesian;}
- series.push(serie);return serie;}
- function addSeries(options,redraw,animation){var series;setAnimation(animation,chart);redraw=pick(redraw,true);fireEvent(chart,'addSeries',{options:options},function(){series=initSeries(options);series.isDirty=true;chart.isDirtyLegend=true;if(redraw){chart.redraw();}});return series;}
- isInsidePlot=function(x,y){return x>=0&&x<=plotWidth&&y>=0&&y<=plotHeight;};function adjustTickAmounts(){if(optionsChart.alignTicks!==false){each(axes,function(axis){axis.adjustTickAmount();});}
- maxTicks=null;}
- function redraw(animation){var redrawLegend=chart.isDirtyLegend,hasStackedSeries,isDirtyBox=chart.isDirtyBox,seriesLength=series.length,i=seriesLength,serie;setAnimation(animation,chart);while(i--){serie=series[i];if(serie.isDirty&&serie.options.stacking){hasStackedSeries=true;break;}}
- if(hasStackedSeries){i=seriesLength;while(i--){serie=series[i];if(serie.options.stacking){serie.isDirty=true;}}}
- each(series,function(serie){if(serie.isDirty){serie.cleanData();serie.getSegments();if(serie.options.legendType=='point'){redrawLegend=true;}}});if(redrawLegend&&legend.renderLegend){legend.renderLegend();chart.isDirtyLegend=false;}
- if(hasCartesianSeries){if(!isResizing){maxTicks=null;each(axes,function(axis){axis.setScale();});}
- adjustTickAmounts();getMargins();each(axes,function(axis){if(axis.isDirty||isDirtyBox){axis.redraw();isDirtyBox=true;}});}
- if(isDirtyBox){drawChartBox();placeTrackerGroup();}
- each(series,function(serie){if(serie.isDirty&&serie.visible){serie.redraw();}});if(tracker&&tracker.resetTracker){tracker.resetTracker();}
- fireEvent(chart,'redraw');}
- function showLoading(str){var loadingOptions=options.loading;if(!loadingDiv){loadingDiv=createElement(DIV,{className:'highcharts-loading'},extend(loadingOptions.style,{left:plotLeft+PX,top:plotTop+PX,width:plotWidth+PX,height:plotHeight+PX,zIndex:10,display:NONE}),container);loadingSpan=createElement('span',null,loadingOptions.labelStyle,loadingDiv);}
- loadingSpan.innerHTML=str||options.lang.loading;if(!loadingShown){css(loadingDiv,{opacity:0,display:''});animate(loadingDiv,{opacity:loadingOptions.style.opacity},{duration:loadingOptions.showDuration});loadingShown=true;}}
- function hideLoading(){animate(loadingDiv,{opacity:0},{duration:options.loading.hideDuration,complete:function(){css(loadingDiv,{display:NONE});}});loadingShown=false;}
- function get(id){var i,j,data;for(i=0;i<axes.length;i++){if(axes[i].options.id==id){return axes[i];}}
- for(i=0;i<series.length;i++){if(series[i].options.id==id){return series[i];}}
- for(i=0;i<series.length;i++){data=series[i].data;for(j=0;j<data.length;j++){if(data[j].id==id){return data[j];}}}
- return null;}
- function getAxes(){var xAxisOptions=options.xAxis||{},yAxisOptions=options.yAxis||{},axis;xAxisOptions=splat(xAxisOptions);each(xAxisOptions,function(axis,i){axis.index=i;axis.isX=true;});yAxisOptions=splat(yAxisOptions);each(yAxisOptions,function(axis,i){axis.index=i;});axes=xAxisOptions.concat(yAxisOptions);chart.xAxis=[];chart.yAxis=[];axes=map(axes,function(axisOptions){axis=new Axis(chart,axisOptions);chart[axis.isXAxis?'xAxis':'yAxis'].push(axis);return axis;});adjustTickAmounts();}
- function getSelectedPoints(){var points=[];each(series,function(serie){points=points.concat(grep(serie.data,function(point){return point.selected;}));});return points;}
- function getSelectedSeries(){return grep(series,function(serie){return serie.selected;});}
- zoomOut=function(){fireEvent(chart,'selection',{resetSelection:true},zoom);chart.toolbar.remove('zoom');};zoom=function(event){var lang=defaultOptions.lang,animate=chart.pointCount<100;chart.toolbar.add('zoom',lang.resetZoom,lang.resetZoomTitle,zoomOut);if(!event||event.resetSelection){each(axes,function(axis){axis.setExtremes(null,null,false,animate);});}
- else{each(event.xAxis.concat(event.yAxis),function(axisData){var axis=axisData.axis;if(chart.tracker[axis.isXAxis?'zoomX':'zoomY']){axis.setExtremes(axisData.min,axisData.max,false,animate);}});}
- redraw();};function setTitle(titleOptions,subtitleOptions){chartTitleOptions=merge(options.title,titleOptions);chartSubtitleOptions=merge(options.subtitle,subtitleOptions);each([['title',titleOptions,chartTitleOptions],['subtitle',subtitleOptions,chartSubtitleOptions]],function(arr){var name=arr[0],title=chart[name],titleOptions=arr[1],chartTitleOptions=arr[2];if(title&&titleOptions){title.destroy();title=null;}
- if(chartTitleOptions&&chartTitleOptions.text&&!title){chart[name]=renderer.text(chartTitleOptions.text,0,0).attr({align:chartTitleOptions.align,'class':'highcharts-'+name,zIndex:1}).css(chartTitleOptions.style).add().align(chartTitleOptions,false,spacingBox);}});}
- function getChartSize(){containerWidth=(renderToClone||renderTo).offsetWidth;containerHeight=(renderToClone||renderTo).offsetHeight;chart.chartWidth=chartWidth=optionsChart.width||containerWidth||600;chart.chartHeight=chartHeight=optionsChart.height||(containerHeight>19?containerHeight:400);}
- function getContainer(){renderTo=optionsChart.renderTo;containerId=PREFIX+idCounter++;if(isString(renderTo)){renderTo=doc.getElementById(renderTo);}
- renderTo.innerHTML='';if(!renderTo.offsetWidth){renderToClone=renderTo.cloneNode(0);css(renderToClone,{position:ABSOLUTE,top:'-9999px',display:''});doc.body.appendChild(renderToClone);}
- getChartSize();chart.container=container=createElement(DIV,{className:'highcharts-container'+
- (optionsChart.className?' '+optionsChart.className:''),id:containerId},extend({position:RELATIVE,width:chartWidth+PX,height:chartHeight+PX,textAlign:'left'},optionsChart.style),renderToClone||renderTo);chart.renderer=renderer=optionsChart.renderer=='SVG'?new SVGRenderer(container,chartWidth,chartHeight):new Renderer(container,chartWidth,chartHeight);var subPixelFix;if(/Gecko/.test(userAgent)){subPixelFix=function(){css(container,{left:0,top:0});var rect=container.getBoundingClientRect();css(container,{left:(-rect.left%1)+PX,top:(-rect.top%1)+PX});};subPixelFix();addEvent(win,'resize',subPixelFix);addEvent(chart,'destroy',function(){removeEvent(win,'resize',subPixelFix);});}}
- getMargins=function(){var legendOptions=options.legend,legendMargin=pick(legendOptions.margin,10),legendX=legendOptions.x,legendY=legendOptions.y,align=legendOptions.align,verticalAlign=legendOptions.verticalAlign,titleOffset;resetMargins();if((chart.title||chart.subtitle)&&!defined(optionsMarginTop)){titleOffset=mathMax(chart.title&&!chartTitleOptions.floating&&!chartTitleOptions.verticalAlign&&chartTitleOptions.y||0,chart.subtitle&&!chartSubtitleOptions.floating&&!chartSubtitleOptions.verticalAlign&&chartSubtitleOptions.y||0);if(titleOffset){plotTop=mathMax(plotTop,titleOffset+pick(chartTitleOptions.margin,15)+spacingTop);}}
- if(legendOptions.enabled&&!legendOptions.floating){if(align=='right'){if(!defined(optionsMarginRight)){marginRight=mathMax(marginRight,legendWidth-legendX+legendMargin+spacingRight);}}else if(align=='left'){if(!defined(optionsMarginLeft)){plotLeft=mathMax(plotLeft,legendWidth+legendX+legendMargin+spacingLeft);}}else if(verticalAlign=='top'){if(!defined(optionsMarginTop)){plotTop=mathMax(plotTop,legendHeight+legendY+legendMargin+spacingTop);}}else if(verticalAlign=='bottom'){if(!defined(optionsMarginBottom)){marginBottom=mathMax(marginBottom,legendHeight-legendY+legendMargin+spacingBottom);}}}
- if(hasCartesianSeries){each(axes,function(axis){axis.getOffset();});}
- if(!defined(optionsMarginLeft)){plotLeft+=axisOffset[3];}
- if(!defined(optionsMarginTop)){plotTop+=axisOffset[0];}
- if(!defined(optionsMarginBottom)){marginBottom+=axisOffset[2];}
- if(!defined(optionsMarginRight)){marginRight+=axisOffset[1];}
- setChartSize();};function initReflow(){var reflowTimeout;function reflow(){var width=optionsChart.width||renderTo.offsetWidth,height=optionsChart.height||renderTo.offsetHeight;if(width!=containerWidth||height!=containerHeight){clearTimeout(reflowTimeout);reflowTimeout=setTimeout(function(){resize(width,height,false);},100);}
- containerWidth=width;containerHeight=height;}
- addEvent(window,'resize',reflow);addEvent(chart,'destroy',function(){removeEvent(window,'resize',reflow);});}
- resize=function(width,height,animation){var chartTitle=chart.title,chartSubtitle=chart.subtitle;isResizing+=1;setAnimation(animation,chart);oldChartHeight=chartHeight;oldChartWidth=chartWidth;chartWidth=mathRound(width);chartHeight=mathRound(height);css(container,{width:chartWidth+PX,height:chartHeight+PX});renderer.setSize(chartWidth,chartHeight);plotWidth=chartWidth-plotLeft-marginRight;plotHeight=chartHeight-plotTop-marginBottom;maxTicks=null;each(axes,function(axis){axis.isDirty=true;axis.setScale();});each(series,function(serie){serie.isDirty=true;});chart.isDirtyLegend=true;chart.isDirtyBox=true;getMargins();if(chartTitle){chartTitle.align(null,null,spacingBox);}
- if(chartSubtitle){chartSubtitle.align(null,null,spacingBox);}
- redraw();oldChartHeight=null;fireEvent(chart,'resize');setTimeout(function(){fireEvent(chart,'endResize',null,function(){isResizing-=1;});},globalAnimation&&globalAnimation.duration||500);};setChartSize=function(){chart.plotLeft=plotLeft=mathRound(plotLeft);chart.plotTop=plotTop=mathRound(plotTop);chart.plotWidth=plotWidth=mathRound(chartWidth-plotLeft-marginRight);chart.plotHeight=plotHeight=mathRound(chartHeight-plotTop-marginBottom);chart.plotSizeX=inverted?plotHeight:plotWidth;chart.plotSizeY=inverted?plotWidth:plotHeight;spacingBox={x:spacingLeft,y:spacingTop,width:chartWidth-spacingLeft-spacingRight,height:chartHeight-spacingTop-spacingBottom};};resetMargins=function(){plotTop=pick(optionsMarginTop,spacingTop);marginRight=pick(optionsMarginRight,spacingRight);marginBottom=pick(optionsMarginBottom,spacingBottom);plotLeft=pick(optionsMarginLeft,spacingLeft);axisOffset=[0,0,0,0];};drawChartBox=function(){var chartBorderWidth=optionsChart.borderWidth||0,chartBackgroundColor=optionsChart.backgroundColor,plotBackgroundColor=optionsChart.plotBackgroundColor,plotBackgroundImage=optionsChart.plotBackgroundImage,mgn,plotSize={x:plotLeft,y:plotTop,width:plotWidth,height:plotHeight};mgn=2*chartBorderWidth+(optionsChart.shadow?8:0);if(chartBorderWidth||chartBackgroundColor){if(!chartBackground){chartBackground=renderer.rect(mgn/2,mgn/2,chartWidth-mgn,chartHeight-mgn,optionsChart.borderRadius,chartBorderWidth).attr({stroke:optionsChart.borderColor,'stroke-width':chartBorderWidth,fill:chartBackgroundColor||NONE}).add().shadow(optionsChart.shadow);}else{chartBackground.animate({width:chartWidth-mgn,height:chartHeight-mgn});}}
- if(plotBackgroundColor){if(!plotBackground){plotBackground=renderer.rect(plotLeft,plotTop,plotWidth,plotHeight,0).attr({fill:plotBackgroundColor}).add().shadow(optionsChart.plotShadow);}else{plotBackground.animate(plotSize);}}
- if(plotBackgroundImage){if(!plotBGImage){plotBGImage=renderer.image(plotBackgroundImage,plotLeft,plotTop,plotWidth,plotHeight).add();}else{plotBGImage.animate(plotSize);}}
- if(optionsChart.plotBorderWidth){if(!plotBorder){plotBorder=renderer.rect(plotLeft,plotTop,plotWidth,plotHeight,0,optionsChart.plotBorderWidth).attr({stroke:optionsChart.plotBorderColor,'stroke-width':optionsChart.plotBorderWidth,zIndex:4}).add();}else{plotBorder.animate(plotSize);}}
- chart.isDirtyBox=false;};function render(){var labels=options.labels,credits=options.credits,creditsHref;setTitle();legend=chart.legend=new Legend(chart);getMargins();each(axes,function(axis){axis.setTickPositions(true);});adjustTickAmounts();getMargins();drawChartBox();if(hasCartesianSeries){each(axes,function(axis){axis.render();});}
- if(!chart.seriesGroup){chart.seriesGroup=renderer.g('series-group').attr({zIndex:3}).add();}
- each(series,function(serie){serie.translate();serie.setTooltipPoints();serie.render();});if(labels.items){each(labels.items,function(){var style=extend(labels.style,this.style),x=pInt(style.left)+plotLeft,y=pInt(style.top)+plotTop+12;delete style.left;delete style.top;renderer.text(this.html,x,y).attr({zIndex:2}).css(style).add();});}
- if(!chart.toolbar){chart.toolbar=Toolbar(chart);}
- credits.enabled=true;credits.text='Highcharts v2.1 Beta';if(credits.enabled&&!chart.credits){creditsHref=credits.href;renderer.text(credits.text,0,0).on('click',function(){if(creditsHref){location.href=creditsHref;}}).attr({align:credits.position.align,zIndex:8}).css(credits.style).add().align(credits.position);}
- placeTrackerGroup();chart.hasRendered=true;if(renderToClone){renderTo.appendChild(container);discardElement(renderToClone);}}
- function destroy(){var i=series.length,parentNode=container.parentNode;fireEvent(chart,'destroy');removeEvent(win,'unload',destroy);removeEvent(chart);each(axes,function(axis){removeEvent(axis);});while(i--){series[i].destroy();}
- container.innerHTML='';removeEvent(container);if(parentNode){parentNode.removeChild(container);}
- container=null;renderer.alignedObjects=null;clearInterval(tooltipInterval);for(i in chart){delete chart[i];}}
- function firstRender(){var onreadystatechange='onreadystatechange';if(!hasSVG&&doc.readyState!='complete'){doc.attachEvent(onreadystatechange,function(){doc.detachEvent(onreadystatechange,firstRender);firstRender();});return;}
- getContainer();resetMargins();setChartSize();each(options.series||[],function(serieOptions){initSeries(serieOptions);});chart.inverted=inverted=pick(inverted,options.chart.inverted);getAxes();chart.render=render;chart.tracker=tracker=new MouseTracker(chart,options.tooltip);render();fireEvent(chart,'load');if(callback){callback.apply(chart,[chart]);}
- each(chart.callbacks,function(fn){fn.apply(chart,[chart]);});}
- colorCounter=0;symbolCounter=0;addEvent(win,'unload',destroy);if(optionsChart.reflow!==false){addEvent(chart,'load',initReflow);}
- if(chartEvents){for(eventType in chartEvents){addEvent(chart,eventType,chartEvents[eventType]);}}
- chart.options=options;chart.series=series;chart.addSeries=addSeries;chart.animation=pick(optionsChart.animation,true);chart.destroy=destroy;chart.get=get;chart.getSelectedPoints=getSelectedPoints;chart.getSelectedSeries=getSelectedSeries;chart.hideLoading=hideLoading;chart.isInsidePlot=isInsidePlot;chart.redraw=redraw;chart.setSize=resize;chart.setTitle=setTitle;chart.showLoading=showLoading;chart.pointCount=0;firstRender();}
- Chart.prototype.callbacks=[];var Point=function(){};Point.prototype={init:function(series,options){var point=this,defaultColors;point.series=series;point.applyOptions(options);point.pointAttr={};if(series.options.colorByPoint){defaultColors=series.chart.options.colors;if(!point.options){point.options={};}
- point.color=point.options.color=point.color||defaultColors[colorCounter++];if(colorCounter>=defaultColors.length){colorCounter=0;}}
- series.chart.pointCount++;return point;},applyOptions:function(options){var point=this,series=point.series;point.config=options;if(isNumber(options)||options===null){point.y=options;}
- else if(isObject(options)&&!isNumber(options.length)){extend(point,options);point.options=options;}
- else if(isString(options[0])){point.name=options[0];point.y=options[1];}
- else if(isNumber(options[0])){point.x=options[0];point.y=options[1];}
- if(point.x===UNDEFINED){point.x=series.autoIncrement();}},destroy:function(){var point=this,series=point.series,prop;series.chart.pointCount--;if(point==series.chart.hoverPoint){point.onMouseOut();}
- if(point==series.hoverPoint){series.hoverPoint=null;}
- removeEvent(point);each(['graphic','tracker','group','dataLabel','connector'],function(prop){if(point[prop]){point[prop].destroy();}});if(point.legendItem){point.series.chart.legend.destroyItem(point);}
- for(prop in point){point[prop]=null;}},select:function(selected,accumulate){var point=this,series=point.series,chart=series.chart;point.selected=selected=pick(selected,!point.selected);point.firePointEvent(selected?'select':'unselect');point.setState(selected&&SELECT_STATE);if(!accumulate){each(chart.getSelectedPoints(),function(loopPoint){if(loopPoint.selected&&loopPoint!=point){loopPoint.selected=false;loopPoint.setState(NORMAL_STATE);loopPoint.firePointEvent('unselect');}});}},onMouseOver:function(){var point=this,chart=point.series.chart,tooltip=chart.tooltip,hoverPoint=chart.hoverPoint;if(hoverPoint&&hoverPoint!=point){hoverPoint.onMouseOut();}
- point.firePointEvent('mouseOver');if(tooltip&&!tooltip.shared){tooltip.refresh(point);}
- point.setState(HOVER_STATE);chart.hoverPoint=point;},onMouseOut:function(){var point=this;point.firePointEvent('mouseOut');point.setState();point.series.chart.hoverPoint=null;},update:function(options,redraw,animation){var point=this,series=point.series,chart=series.chart;setAnimation(animation,chart);redraw=pick(redraw,true);point.firePointEvent('update',{options:options},function(){point.applyOptions(options);series.isDirty=true;if(redraw){chart.redraw();}});},remove:function(redraw,animation){var point=this,series=point.series,chart=series.chart,data=series.data;setAnimation(animation,chart);redraw=pick(redraw,true);point.firePointEvent('remove',null,function(){erase(data,point);point.destroy();series.isDirty=true;if(redraw){chart.redraw();}});},firePointEvent:function(eventType,eventArgs,defaultFunction){var point=this,series=this.series,seriesOptions=series.options;if(seriesOptions.point.events[eventType]||(point.options&&point.options.events&&point.options.events[eventType])){this.importEvents();}
- if(eventType=='click'&&seriesOptions.allowPointSelect){defaultFunction=function(event){point.select(null,event.ctrlKey||event.metaKey||event.shiftKey);};}
- fireEvent(this,eventType,eventArgs,defaultFunction);},importEvents:function(){if(!this.hasImportedEvents){var point=this,options=merge(point.series.options.point,point.options),events=options.events,eventType;point.events=events;for(eventType in events){addEvent(point,eventType,events[eventType]);}
- this.hasImportedEvents=true;}},setState:function(state){var point=this,series=point.series,stateOptions=series.options.states,markerOptions=defaultPlotOptions[series.type].marker&&series.options.marker,normalDisabled=markerOptions&&!markerOptions.enabled,markerStateOptions=markerOptions&&markerOptions.states[state],stateDisabled=markerStateOptions&&markerStateOptions.enabled===false,stateMarkerGraphic=series.stateMarkerGraphic,chart=series.chart,pointAttr=point.pointAttr;if(!state){state=NORMAL_STATE;}
- if(state==point.state||(point.selected&&state!=SELECT_STATE)||(stateOptions[state]&&stateOptions[state].enabled===false)||(state&&(stateDisabled||normalDisabled&&!markerStateOptions.enabled))){return;}
- if(point.graphic){point.graphic.attr(pointAttr[state]);}
- else{if(state){if(!stateMarkerGraphic){series.stateMarkerGraphic=stateMarkerGraphic=chart.renderer.circle(0,0,pointAttr[state].r).attr(pointAttr[state]).add(series.group);}
- stateMarkerGraphic.translate(point.plotX,point.plotY);}
- if(stateMarkerGraphic){stateMarkerGraphic[state?'show':'hide']();}}
- point.state=state;}};var Series=function(){};Series.prototype={isCartesian:true,type:'line',pointClass:Point,pointAttrToOptions:{stroke:'lineColor','stroke-width':'lineWidth',fill:'fillColor',r:'radius'},init:function(chart,options){var series=this,eventType,events,index=chart.series.length;series.chart=chart;options=series.setOptions(options);extend(series,{index:index,options:options,name:options.name||'Series '+(index+1),state:NORMAL_STATE,pointAttr:{},visible:options.visible!==false,selected:options.selected===true});events=options.events;for(eventType in events){addEvent(series,eventType,events[eventType]);}
- series.getColor();series.getSymbol();series.setData(options.data,false);},autoIncrement:function(){var series=this,options=series.options,xIncrement=series.xIncrement;xIncrement=pick(xIncrement,options.pointStart,0);series.pointInterval=pick(series.pointInterval,options.pointInterval,1);series.xIncrement=xIncrement+series.pointInterval;return xIncrement;},cleanData:function(){var series=this,chart=series.chart,data=series.data,closestPoints,smallestInterval,chartSmallestInterval=chart.smallestInterval,interval,i;data.sort(function(a,b){return(a.x-b.x);});for(i=data.length-1;i>=0;i--){if(data[i-1]){if(data[i-1].x==data[i].x){data.splice(i-1,1);}}}
- for(i=data.length-1;i>=0;i--){if(data[i-1]){interval=data[i].x-data[i-1].x;if(smallestInterval===UNDEFINED||interval<smallestInterval){smallestInterval=interval;closestPoints=i;}}}
- if(chartSmallestInterval===UNDEFINED||smallestInterval<chartSmallestInterval){chart.smallestInterval=smallestInterval;}
- series.closestPoints=closestPoints;},getSegments:function(){var lastNull=-1,segments=[],data=this.data;each(data,function(point,i){if(point.y===null){if(i>lastNull+1){segments.push(data.slice(lastNull+1,i));}
- lastNull=i;}else if(i==data.length-1){segments.push(data.slice(lastNull+1,i+1));}});this.segments=segments;},setOptions:function(itemOptions){var plotOptions=this.chart.options.plotOptions,options=merge(plotOptions[this.type],plotOptions.series,itemOptions);return options;},getColor:function(){var defaultColors=this.chart.options.colors;this.color=this.options.color||defaultColors[colorCounter++]||'#0000ff';if(colorCounter>=defaultColors.length){colorCounter=0;}},getSymbol:function(){var defaultSymbols=this.chart.options.symbols,symbol=this.options.marker.symbol||defaultSymbols[symbolCounter++];this.symbol=symbol;if(symbolCounter>=defaultSymbols.length){symbolCounter=0;}},addPoint:function(options,redraw,shift,animation){var series=this,data=series.data,graph=series.graph,area=series.area,chart=series.chart,point=(new series.pointClass()).init(series,options);setAnimation(animation,chart);if(graph&&shift){graph.shift=shift;}
- if(area){area.shift=shift;area.isArea=true;}
- redraw=pick(redraw,true);data.push(point);if(shift){data[0].remove(false);}
- series.isDirty=true;if(redraw){chart.redraw();}},setData:function(data,redraw){var series=this,oldData=series.data,initialColor=series.initialColor,chart=series.chart,i=oldData&&oldData.length||0;series.xIncrement=null;if(defined(initialColor)){colorCounter=initialColor;}
- data=map(splat(data||[]),function(pointOptions){return(new series.pointClass()).init(series,pointOptions);});while(i--){oldData[i].destroy();}
- series.data=data;series.cleanData();series.getSegments();series.isDirty=true;chart.isDirtyBox=true;if(pick(redraw,true)){chart.redraw(false);}},remove:function(redraw,animation){var series=this,chart=series.chart;setAnimation(animation,chart);redraw=pick(redraw,true);if(!series.isRemoving){series.isRemoving=true;fireEvent(series,'remove',null,function(){series.destroy();chart.isDirtyLegend=chart.isDirtyBox=true;if(redraw){chart.redraw();}});}
- series.isRemoving=false;},translate:function(){var series=this,chart=series.chart,stacking=series.options.stacking,categories=series.xAxis.categories,yAxis=series.yAxis,data=series.data,i=data.length;while(i--){var point=data[i],xValue=point.x,yValue=point.y,yBottom,stack=yAxis.stacks[(yValue<0?'-':'')+series.stackKey],pointStack,pointStackTotal;point.plotX=series.xAxis.translate(xValue);if(stacking&&series.visible&&stack[xValue]){pointStack=stack[xValue];pointStackTotal=pointStack.total;pointStack.cum=yBottom=pointStack.cum-yValue;yValue=yBottom+yValue;if(stacking=='percent'){yBottom=pointStackTotal?yBottom*100/pointStackTotal:0;yValue=pointStackTotal?yValue*100/pointStackTotal:0;}
- point.percentage=pointStackTotal?point.y*100/pointStackTotal:0;point.stackTotal=pointStackTotal;point.yBottom=yAxis.translate(yBottom,0,1);}
- if(yValue!==null){point.plotY=yAxis.translate(yValue,0,1);}
- point.clientX=chart.inverted?chart.plotHeight-point.plotX:point.plotX;point.category=categories&&categories[point.x]!==UNDEFINED?categories[point.x]:point.x;}},setTooltipPoints:function(renew){var series=this,chart=series.chart,inverted=chart.inverted,data=[],plotSize=mathRound((inverted?chart.plotTop:chart.plotLeft)+chart.plotSizeX),low,high,tooltipPoints=[];if(renew){series.tooltipPoints=null;}
- each(series.segments,function(segment){data=data.concat(segment);});if(series.xAxis&&series.xAxis.reversed){data=data.reverse();}
- each(data,function(point,i){low=data[i-1]?data[i-1].high+1:0;high=point.high=data[i+1]?(mathFloor((point.plotX+(data[i+1]?data[i+1].plotX:plotSize))/2)):plotSize;while(low<=high){tooltipPoints[inverted?plotSize-low++:low++]=point;}});series.tooltipPoints=tooltipPoints;},onMouseOver:function(){var series=this,chart=series.chart,hoverSeries=chart.hoverSeries;if(chart.mouseIsDown){return;}
- if(hoverSeries&&hoverSeries!=series){hoverSeries.onMouseOut();}
- if(series.options.events.mouseOver){fireEvent(series,'mouseOver');}
- if(series.tracker){series.tracker.toFront();}
- series.setState(HOVER_STATE);chart.hoverSeries=series;},onMouseOut:function(){var series=this,options=series.options,chart=series.chart,tooltip=chart.tooltip,hoverPoint=chart.hoverPoint;if(hoverPoint){hoverPoint.onMouseOut();}
- if(series&&options.events.mouseOut){fireEvent(series,'mouseOut');}
- if(tooltip&&!options.stickyTracking){tooltip.hide();}
- series.setState();chart.hoverSeries=null;},animate:function(init){var series=this,chart=series.chart,clipRect=series.clipRect,animation=series.options.animation;if(animation&&!isObject(animation)){animation={};}
- if(init){if(!clipRect.isAnimating){clipRect.attr('width',0);clipRect.isAnimating=true;}}else{clipRect.animate({width:chart.plotSizeX},animation&&extend(animation,{complete:function(){clipRect.isAnimating=false;}}));this.animate=null;}},drawPoints:function(){var series=this,pointAttr,data=series.data,chart=series.chart,plotX,plotY,i,point,radius,graphic;if(series.options.marker.enabled){i=data.length;while(i--){point=data[i];plotX=point.plotX;plotY=point.plotY;graphic=point.graphic;if(plotY!==UNDEFINED&&!isNaN(plotY)){pointAttr=point.pointAttr[point.selected?SELECT_STATE:NORMAL_STATE];radius=pointAttr.r;if(graphic){graphic.animate({x:plotX,y:plotY,r:radius});}else{point.graphic=chart.renderer.symbol(pick(point.marker&&point.marker.symbol,series.symbol),plotX,plotY,radius).attr(pointAttr).add(series.group);}}}}},convertAttribs:function(options,base1,base2,base3){var conversion=this.pointAttrToOptions,attr,option,obj={};options=options||{};base1=base1||{};base2=base2||{};base3=base3||{};for(attr in conversion){option=conversion[attr];obj[attr]=pick(options[option],base1[attr],base2[attr],base3[attr]);}
- return obj;},getAttribs:function(){var series=this,normalOptions=defaultPlotOptions[series.type].marker?series.options.marker:series.options,stateOptions=normalOptions.states,stateOptionsHover=stateOptions[HOVER_STATE],pointStateOptionsHover,normalDefaults={},seriesColor=series.color,data=series.data,i,point,seriesPointAttr=[],pointAttr,pointAttrToOptions=series.pointAttrToOptions,hasPointSpecificOptions;if(series.options.marker){normalDefaults={stroke:seriesColor,fill:seriesColor};stateOptionsHover.radius=stateOptionsHover.radius||normalOptions.radius+2;stateOptionsHover.lineWidth=stateOptionsHover.lineWidth||normalOptions.lineWidth+1;}else{normalDefaults={fill:seriesColor};stateOptionsHover.color=stateOptionsHover.color||Color(stateOptionsHover.color||seriesColor).brighten(stateOptionsHover.brightness).get();}
- seriesPointAttr[NORMAL_STATE]=series.convertAttribs(normalOptions,normalDefaults);each([HOVER_STATE,SELECT_STATE],function(state){seriesPointAttr[state]=series.convertAttribs(stateOptions[state],seriesPointAttr[NORMAL_STATE]);});series.pointAttr=seriesPointAttr;i=data.length;while(i--){point=data[i];normalOptions=(point.options&&point.options.marker)||point.options;if(normalOptions&&normalOptions.enabled===false){normalOptions.radius=0;}
- hasPointSpecificOptions=false;if(point.options){for(var key in pointAttrToOptions){if(defined(normalOptions[pointAttrToOptions[key]])){hasPointSpecificOptions=true;}}}
- if(hasPointSpecificOptions){pointAttr=[];stateOptions=normalOptions.states||{};pointStateOptionsHover=stateOptions[HOVER_STATE]=stateOptions[HOVER_STATE]||{};if(!series.options.marker){pointStateOptionsHover.color=Color(pointStateOptionsHover.color||point.options.color).brighten(pointStateOptionsHover.brightness||stateOptionsHover.brightness).get();}
- pointAttr[NORMAL_STATE]=series.convertAttribs(normalOptions,seriesPointAttr[NORMAL_STATE]);pointAttr[HOVER_STATE]=series.convertAttribs(stateOptions[HOVER_STATE],seriesPointAttr[HOVER_STATE],pointAttr[NORMAL_STATE]);pointAttr[SELECT_STATE]=series.convertAttribs(stateOptions[SELECT_STATE],seriesPointAttr[SELECT_STATE],pointAttr[NORMAL_STATE]);}else{pointAttr=seriesPointAttr;}
- point.pointAttr=pointAttr;}},destroy:function(){var series=this,chart=series.chart,clipRect=series.clipRect,prop;removeEvent(series);if(series.legendItem){series.chart.legend.destroyItem(series);}
- each(series.data,function(point){point.destroy();});each(['area','graph','dataLabelsGroup','group','tracker'],function(prop){if(series[prop]){series[prop].destroy();}});if(clipRect&&clipRect!=series.chart.clipRect){clipRect.destroy();}
- if(chart.hoverSeries==series){chart.hoverSeries=null;}
- erase(chart.series,series);for(prop in series){delete series[prop];}},drawDataLabels:function(){if(this.options.dataLabels.enabled){var series=this,x,y,data=series.data,options=series.options.dataLabels,str,dataLabelsGroup=series.dataLabelsGroup,chart=series.chart,inverted=chart.inverted,seriesType=series.type,color;if(!dataLabelsGroup){dataLabelsGroup=series.dataLabelsGroup=chart.renderer.g(PREFIX+'data-labels').attr({visibility:series.visible?VISIBLE:HIDDEN,zIndex:5}).translate(chart.plotLeft,chart.plotTop).add();}
- color=options.color;if(color=='auto'){color=null;}
- options.style.color=pick(color,series.color);each(data,function(point,i){var plotX=pick(point.barX,point.plotX,-999),plotY=pick(point.plotY,-999),dataLabel=point.dataLabel,align=options.align;str=options.formatter.call({x:point.x,y:point.y,series:series,point:point,percentage:point.percentage,total:point.total||point.stackTotal});x=(inverted?chart.plotWidth-plotY:plotX)+options.x;y=(inverted?chart.plotHeight-plotX:plotY)+options.y;if(seriesType=='column'){x+={center:point.barW/2,right:point.barW}[align]||0;}
- if(dataLabel){dataLabel.animate({x:x,y:y});}else if(str){point.dataLabel=chart.renderer.text(str,x,y).attr({align:align,rotation:options.rotation,zIndex:1}).css(options.style).add(dataLabelsGroup);}});}},drawGraph:function(state){var series=this,options=series.options,chart=series.chart,graph=series.graph,graphPath=[],fillColor,area=series.area,group=series.group,color=options.lineColor||series.color,lineWidth=options.lineWidth,dashStyle=options.dashStyle,segmentPath,renderer=chart.renderer,translatedThreshold=series.yAxis.getThreshold(options.threshold||0),useArea=/^area/.test(series.type),singlePoints=[],areaPath=[],attribs;each(series.segments,function(segment){if(segment.length>1){segmentPath=[];each(segment,function(point,i){if(series.getPointSpline){segmentPath.push.apply(segmentPath,series.getPointSpline(segment,point,i));}else{segmentPath.push(i?L:M);if(i&&options.step){var lastPoint=segment[i-1];segmentPath.push(point.plotX,lastPoint.plotY);}
- segmentPath.push(point.plotX,point.plotY);}});graphPath=graphPath.concat(segmentPath);if(useArea){var areaSegmentPath=[],i,segLength=segmentPath.length;for(i=0;i<segLength;i++){areaSegmentPath.push(segmentPath[i]);}
- if(options.stacking&&series.type!='areaspline'){for(i=segment.length-1;i>=0;i--){areaSegmentPath.push(segment[i].plotX,segment[i].yBottom);}}else{areaSegmentPath.push(L,segment[segment.length-1].plotX,translatedThreshold,L,segment[0].plotX,translatedThreshold);}
- areaPath=areaPath.concat(areaSegmentPath);}}else{singlePoints.push(segment[0]);}});series.graphPath=graphPath;series.singlePoints=singlePoints;if(useArea){fillColor=pick(options.fillColor,Color(series.color).setOpacity(options.fillOpacity||0.75).get());if(area){area.animate({d:areaPath});}else{series.area=series.chart.renderer.path(areaPath).attr({fill:fillColor}).add(group);}}
- if(graph){graph.animate({d:graphPath});}else{if(lineWidth){attribs={'stroke':color,'stroke-width':lineWidth};if(dashStyle){attribs.dashstyle=dashStyle;}
- series.graph=renderer.path(graphPath).attr(attribs).add(group).shadow(options.shadow);}}},render:function(){var series=this,chart=series.chart,group,setInvert,options=series.options,doAnimation=options.animation&&series.animate,renderer=chart.renderer;if(!series.clipRect){series.clipRect=!chart.hasRendered&&chart.clipRect?chart.clipRect:renderer.clipRect(0,0,chart.plotSizeX,chart.plotSizeY);if(!chart.clipRect){chart.clipRect=series.clipRect;}}
- if(!series.group){group=series.group=renderer.g('series');if(chart.inverted){setInvert=function(){group.attr({width:chart.plotWidth,height:chart.plotHeight}).invert();};setInvert();addEvent(chart,'resize',setInvert);}
- group.clip(series.clipRect).attr({visibility:series.visible?VISIBLE:HIDDEN,zIndex:options.zIndex}).translate(chart.plotLeft,chart.plotTop).add(chart.seriesGroup);}
- series.drawDataLabels();if(doAnimation){series.animate(true);}
- series.getAttribs();if(series.drawGraph){series.drawGraph();}
- series.drawPoints();if(series.options.enableMouseTracking!==false){series.drawTracker();}
- if(doAnimation){series.animate();}
- series.isDirty=false;},redraw:function(){var series=this,chart=series.chart,clipRect=series.clipRect,group=series.group;if(clipRect){stop(clipRect);clipRect.animate({width:chart.plotSizeX,height:chart.plotSizeY});}
- if(group){group.animate({translateX:chart.plotLeft,translateY:chart.plotTop});}
- series.translate();series.setTooltipPoints(true);series.render();},setState:function(state){var series=this,options=series.options,graph=series.graph,stateOptions=options.states,lineWidth=options.lineWidth;state=state||NORMAL_STATE;if(series.state!=state){series.state=state;if(stateOptions[state]&&stateOptions[state].enabled===false){return;}
- if(state){lineWidth=stateOptions[state].lineWidth||lineWidth+1;}
- if(graph&&!graph.dashstyle){graph.attr({'stroke-width':lineWidth},state?0:500);}}},setVisible:function(vis,redraw){var series=this,chart=series.chart,legendItem=series.legendItem,seriesGroup=series.group,seriesTracker=series.tracker,dataLabelsGroup=series.dataLabelsGroup,showOrHide,i,data=series.data,point,ignoreHiddenSeries=chart.options.chart.ignoreHiddenSeries,oldVisibility=series.visible;series.visible=vis=vis===UNDEFINED?!oldVisibility:vis;showOrHide=vis?'show':'hide';if(seriesGroup){seriesGroup[showOrHide]();}
- if(seriesTracker){seriesTracker[showOrHide]();}else{i=data.length;while(i--){point=data[i];if(point.tracker){point.tracker[showOrHide]();}}}
- if(dataLabelsGroup){dataLabelsGroup[showOrHide]();}
- if(legendItem){chart.legend.colorizeItem(series,vis);}
- series.isDirty=true;if(series.options.stacking){each(chart.series,function(otherSeries){if(otherSeries.options.stacking&&otherSeries.visible){otherSeries.isDirty=true;}});}
- if(ignoreHiddenSeries){chart.isDirtyBox=true;}
- if(redraw!==false){chart.redraw();}
- fireEvent(series,showOrHide);},show:function(){this.setVisible(true);},hide:function(){this.setVisible(false);},select:function(selected){var series=this;series.selected=selected=(selected===UNDEFINED)?!series.selected:selected;if(series.checkbox){series.checkbox.checked=selected;}
- fireEvent(series,selected?'select':'unselect');},drawTracker:function(){var series=this,options=series.options,trackerPath=[].concat(series.graphPath),trackerPathLength=trackerPath.length,chart=series.chart,snap=chart.options.tooltip.snap,tracker=series.tracker,cursor=options.cursor,css=cursor&&{cursor:cursor},singlePoints=series.singlePoints,singlePoint,i;if(trackerPathLength){i=trackerPathLength+1;while(i--){if(trackerPath[i]==M){trackerPath.splice(i+1,0,trackerPath[i+1]-snap,trackerPath[i+2],L);}
- if((i&&trackerPath[i]==M)||i==trackerPathLength){trackerPath.splice(i,0,L,trackerPath[i-2]+snap,trackerPath[i-1]);}}}
- for(i=0;i<singlePoints.length;i++){singlePoint=singlePoints[i];trackerPath.push(M,singlePoint.plotX-snap,singlePoint.plotY,L,singlePoint.plotX+snap,singlePoint.plotY);}
- if(tracker){tracker.attr({d:trackerPath});}else{series.tracker=chart.renderer.path(trackerPath).attr({isTracker:true,stroke:TRACKER_FILL,fill:NONE,'stroke-width':options.lineWidth+2*snap,visibility:series.visible?VISIBLE:HIDDEN,zIndex:1}).on(hasTouch?'touchstart':'mouseover',function(){if(chart.hoverSeries!=series){series.onMouseOver();}}).on('mouseout',function(){if(!options.stickyTracking){series.onMouseOut();}}).css(css).add(chart.trackerGroup);}}};var LineSeries=extendClass(Series);seriesTypes.line=LineSeries;var AreaSeries=extendClass(Series,{type:'area'});seriesTypes.area=AreaSeries;var SplineSeries=extendClass(Series,{type:'spline',getPointSpline:function(segment,point,i){var smoothing=1.5,denom=smoothing+1,plotX=point.plotX,plotY=point.plotY,lastPoint=segment[i-1],nextPoint=segment[i+1],leftContX,leftContY,rightContX,rightContY,ret;if(i&&i<segment.length-1){var lastX=lastPoint.plotX,lastY=lastPoint.plotY,nextX=nextPoint.plotX,nextY=nextPoint.plotY,correction;leftContX=(smoothing*plotX+lastX)/denom;leftContY=(smoothing*plotY+lastY)/denom;rightContX=(smoothing*plotX+nextX)/denom;rightContY=(smoothing*plotY+nextY)/denom;correction=((rightContY-leftContY)*(rightContX-plotX))/(rightContX-leftContX)+plotY-rightContY;leftContY+=correction;rightContY+=correction;if(leftContY>lastY&&leftContY>plotY){leftContY=mathMax(lastY,plotY);rightContY=2*plotY-leftContY;}else if(leftContY<lastY&&leftContY<plotY){leftContY=mathMin(lastY,plotY);rightContY=2*plotY-leftContY;}
- if(rightContY>nextY&&rightContY>plotY){rightContY=mathMax(nextY,plotY);leftContY=2*plotY-rightContY;}else if(rightContY<nextY&&rightContY<plotY){rightContY=mathMin(nextY,plotY);leftContY=2*plotY-rightContY;}
- point.rightContX=rightContX;point.rightContY=rightContY;}
- if(!i){ret=[M,plotX,plotY];}
- else{ret=['C',lastPoint.rightContX||lastPoint.plotX,lastPoint.rightContY||lastPoint.plotY,leftContX||plotX,leftContY||plotY,plotX,plotY];lastPoint.rightContX=lastPoint.rightContY=null;}
- return ret;}});seriesTypes.spline=SplineSeries;var AreaSplineSeries=extendClass(SplineSeries,{type:'areaspline'});seriesTypes.areaspline=AreaSplineSeries;var ColumnSeries=extendClass(Series,{type:'column',pointAttrToOptions:{stroke:'borderColor','stroke-width':'borderWidth',fill:'color',r:'borderRadius'},init:function(){Series.prototype.init.apply(this,arguments);var series=this,chart=series.chart;chart.hasColumn=true;if(chart.hasRendered){each(chart.series,function(otherSeries){if(otherSeries.type==series.type){otherSeries.isDirty=true;}});}},translate:function(){var series=this,chart=series.chart,columnCount=0,reversedXAxis=series.xAxis.reversed,categories=series.xAxis.categories,stackGroups={},stackKey,columnIndex;Series.prototype.translate.apply(series);each(chart.series,function(otherSeries){if(otherSeries.type==series.type){if(otherSeries.options.stacking){stackKey=otherSeries.stackKey;if(stackGroups[stackKey]===UNDEFINED){stackGroups[stackKey]=columnCount++;}
- columnIndex=stackGroups[stackKey];}else{columnIndex=columnCount++;}
- otherSeries.columnIndex=columnIndex;}});var options=series.options,data=series.data,closestPoints=series.closestPoints,categoryWidth=mathAbs(data[1]?data[closestPoints].plotX-data[closestPoints-1].plotX:chart.plotSizeX/(categories?categories.length:1)),groupPadding=categoryWidth*options.groupPadding,groupWidth=categoryWidth-2*groupPadding,pointOffsetWidth=groupWidth/columnCount,optionPointWidth=options.pointWidth,pointPadding=defined(optionPointWidth)?(pointOffsetWidth-optionPointWidth)/2:pointOffsetWidth*options.pointPadding,pointWidth=pick(optionPointWidth,pointOffsetWidth-2*pointPadding),colIndex=(reversedXAxis?columnCount-
- series.columnIndex:series.columnIndex)||0,pointXOffset=pointPadding+(groupPadding+colIndex*pointOffsetWidth-(categoryWidth/2))*(reversedXAxis?-1:1),threshold=options.threshold||0,translatedThreshold=series.yAxis.getThreshold(threshold),minPointLength=pick(options.minPointLength,5);each(data,function(point){var plotY=point.plotY,yBottom=point.yBottom||translatedThreshold,barX=point.plotX+pointXOffset,barY=mathCeil(mathMin(plotY,yBottom)),barW=pointWidth,barH=mathCeil(mathMax(plotY,yBottom)-barY),trackerY;if(mathAbs(barH)<minPointLength){if(minPointLength){barH=minPointLength;barY=mathAbs(barY-translatedThreshold)>minPointLength?yBottom-minPointLength:translatedThreshold-(plotY<=translatedThreshold?minPointLength:0);}
- trackerY=barY-3;}
- extend(point,{barX:barX,barY:barY,barW:barW,barH:barH});point.shapeType='rect';point.shapeArgs={x:barX,y:barY,width:barW,height:barH,r:options.borderRadius};point.trackerArgs=defined(trackerY)&&merge(point.shapeArgs,{height:mathMax(6,barH+3),y:trackerY});});},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var series=this,options=series.options,renderer=series.chart.renderer,graphic,shapeArgs;each(series.data,function(point){var plotY=point.plotY;if(plotY!==UNDEFINED&&!isNaN(plotY)){graphic=point.graphic;shapeArgs=point.shapeArgs;if(graphic){stop(graphic);graphic.animate(shapeArgs);}else{point.graphic=renderer[point.shapeType](shapeArgs).attr(point.pointAttr[point.selected?SELECT_STATE:NORMAL_STATE]).add(series.group).shadow(options.shadow);}}});},drawTracker:function(){var series=this,chart=series.chart,renderer=chart.renderer,shapeArgs,tracker,trackerLabel=+new Date(),cursor=series.options.cursor,css=cursor&&{cursor:cursor},rel;each(series.data,function(point){tracker=point.tracker;shapeArgs=point.trackerArgs||point.shapeArgs;if(point.y!==null){if(tracker){tracker.attr(shapeArgs);}else{point.tracker=renderer[point.shapeType](shapeArgs).attr({isTracker:trackerLabel,fill:TRACKER_FILL,visibility:series.visible?VISIBLE:HIDDEN,zIndex:1}).on('mouseover',function(event){rel=event.relatedTarget||event.fromElement;if(chart.hoverSeries!=series&&attr(rel,'isTracker')!=trackerLabel){series.onMouseOver();}
- point.onMouseOver();}).on('mouseout',function(event){if(!series.options.stickyTracking){rel=event.relatedTarget||event.toElement;if(attr(rel,'isTracker')!=trackerLabel){series.onMouseOut();}}}).css(css).add(chart.trackerGroup);}}});},animate:function(init){var series=this,data=series.data;if(!init){each(data,function(point){var graphic=point.graphic;if(graphic){graphic.attr({height:0,y:series.yAxis.translate(0,0,1)});graphic.animate({height:point.barH,y:point.barY},series.options.animation);}});series.animate=null;}},remove:function(){var series=this,chart=series.chart;if(chart.hasRendered){each(chart.series,function(otherSeries){if(otherSeries.type==series.type){otherSeries.isDirty=true;}});}
- Series.prototype.remove.apply(series,arguments);}});seriesTypes.column=ColumnSeries;var BarSeries=extendClass(ColumnSeries,{type:'bar',init:function(chart){chart.inverted=this.inverted=true;ColumnSeries.prototype.init.apply(this,arguments);}});seriesTypes.bar=BarSeries;var ScatterSeries=extendClass(Series,{type:'scatter',translate:function(){var series=this;Series.prototype.translate.apply(series);each(series.data,function(point){point.shapeType='circle';point.shapeArgs={x:point.plotX,y:point.plotY,r:series.chart.options.tooltip.snap};});},drawTracker:function(){var series=this,cursor=series.options.cursor,css=cursor&&{cursor:cursor},graphic;each(series.data,function(point){graphic=point.graphic;if(graphic){graphic.attr({isTracker:true}).on('mouseover',function(event){series.onMouseOver();point.onMouseOver();}).on('mouseout',function(event){if(!series.options.stickyTracking){series.onMouseOut();}}).css(css);}});},cleanData:function(){}});seriesTypes.scatter=ScatterSeries;var PiePoint=extendClass(Point,{init:function(){Point.prototype.init.apply(this,arguments);var point=this,toggleSlice;extend(point,{visible:point.visible!==false,name:pick(point.name,'Slice')});toggleSlice=function(){point.slice();};addEvent(point,'select',toggleSlice);addEvent(point,'unselect',toggleSlice);return point;},setVisible:function(vis){var point=this,chart=point.series.chart,tracker=point.tracker,dataLabel=point.dataLabel,connector=point.connector,method;point.visible=vis=vis===UNDEFINED?!point.visible:vis;method=vis?'show':'hide';point.group[method]();if(tracker){tracker[method]();}
- if(dataLabel){dataLabel[method]();}
- if(connector){connector[method]();}
- if(point.legendItem){chart.legend.colorizeItem(point,vis);}},slice:function(sliced,redraw,animation){var point=this,series=point.series,chart=series.chart,slicedTranslation=point.slicedTranslation;setAnimation(animation,chart);redraw=pick(redraw,true);sliced=point.sliced=defined(sliced)?sliced:!point.sliced;point.group.animate({translateX:(sliced?slicedTranslation[0]:chart.plotLeft),translateY:(sliced?slicedTranslation[1]:chart.plotTop)});}});var PieSeries=extendClass(Series,{type:'pie',isCartesian:false,pointClass:PiePoint,pointAttrToOptions:{stroke:'borderColor','stroke-width':'borderWidth',fill:'color'},getColor:function(){this.initialColor=colorCounter;},animate:function(init){var series=this,data=series.data;each(data,function(point){var graphic=point.graphic,args=point.shapeArgs,up=-mathPI/2;if(graphic){graphic.attr({r:0,start:up,end:up});graphic.animate({r:args.r,start:args.start,end:args.end},series.options.animation);}});series.animate=null;},translate:function(){var total=0,series=this,cumulative=-0.25,options=series.options,slicedOffset=options.slicedOffset,connectorOffset=slicedOffset+options.borderWidth,positions=options.center,chart=series.chart,plotWidth=chart.plotWidth,plotHeight=chart.plotHeight,start,end,angle,data=series.data,circ=2*mathPI,fraction,smallestSize=mathMin(plotWidth,plotHeight),isPercent,radiusX,radiusY,labelDistance=options.dataLabels.distance;positions.push(options.size,options.innerSize||0);positions=map(positions,function(length,i){isPercent=/%$/.test(length);return isPercent?[plotWidth,plotHeight,smallestSize,smallestSize][i]*pInt(length)/100:length;});series.getX=function(y,left){angle=math.asin((y-positions[1])/(positions[2]/2+labelDistance));return positions[0]+
- (left?-1:1)*(mathCos(angle)*(positions[2]/2+labelDistance));};series.center=positions;each(data,function(point){total+=point.y;});each(data,function(point){fraction=total?point.y/total:0;start=cumulative*circ;cumulative+=fraction;end=cumulative*circ;point.shapeType='arc';point.shapeArgs={x:positions[0],y:positions[1],r:positions[2]/2,innerR:positions[3]/2,start:start,end:end};angle=(end+start)/2;point.slicedTranslation=map([mathCos(angle)*slicedOffset+chart.plotLeft,mathSin(angle)*slicedOffset+chart.plotTop],mathRound);radiusX=mathCos(angle)*positions[2]/2;radiusY=mathSin(angle)*positions[2]/2;point.tooltipPos=[positions[0]+radiusX*0.7,positions[1]+radiusY*0.7];point.labelPos=[positions[0]+radiusX+mathCos(angle)*labelDistance,positions[1]+radiusY+mathSin(angle)*labelDistance,positions[0]+radiusX+mathCos(angle)*connectorOffset,positions[1]+radiusY+mathSin(angle)*connectorOffset,positions[0]+radiusX,positions[1]+radiusY,labelDistance<0?'center':angle<circ/4?'left':'right',angle];point.percentage=fraction*100;point.total=total;});this.setTooltipPoints();},render:function(){var series=this;series.getAttribs();this.drawPoints();if(series.options.enableMouseTracking!==false){series.drawTracker();}
- this.drawDataLabels();if(series.options.animation&&series.animate){series.animate();}
- series.isDirty=false;},drawPoints:function(){var series=this,chart=series.chart,renderer=chart.renderer,groupTranslation,graphic,shapeArgs;each(series.data,function(point){graphic=point.graphic;shapeArgs=point.shapeArgs;if(!point.group){groupTranslation=point.sliced?point.slicedTranslation:[chart.plotLeft,chart.plotTop];point.group=renderer.g('point').attr({zIndex:5}).add().translate(groupTranslation[0],groupTranslation[1]);}
- if(graphic){graphic.animate(shapeArgs);}else{point.graphic=renderer.arc(shapeArgs).attr(point.pointAttr[NORMAL_STATE]).add(point.group);}
- if(point.visible===false){point.setVisible(false);}});},drawDataLabels:function(){var series=this,data=series.data,point,chart=series.chart,options=series.options.dataLabels,connectorPadding=pick(options.connectorPadding,10),connectorWidth=pick(options.connectorWidth,1),connector,connectorPath,outside=options.distance>0,dataLabel,labelPos,labelHeight,lastY,centerY=series.center[1],quarters=[[],[],[],[]],x,y,visibility,overlapping,rankArr,secondPass,sign,lowerHalf,sort,i=4,j;Series.prototype.drawDataLabels.apply(series);each(data,function(point){var angle=point.labelPos[7],quarter;if(angle<0){quarter=0;}else if(angle<mathPI/2){quarter=1;}else if(angle<mathPI){quarter=2;}else{quarter=3;}
- quarters[quarter].push(point);});quarters[1].reverse();quarters[3].reverse();sort=function(a,b){return a.y>b.y;};while(i--){overlapping=0;rankArr=[].concat(quarters[i]);rankArr.sort(sort);j=rankArr.length;while(j--){rankArr[j].rank=j;}
- for(secondPass=0;secondPass<2;secondPass++){lowerHalf=i%3;lastY=lowerHalf?9999:-9999;sign=lowerHalf?-1:1;for(j=0;j<quarters[i].length;j++){point=quarters[i][j];if((dataLabel=point.dataLabel)){labelPos=point.labelPos;visibility=VISIBLE;x=labelPos[0];y=labelPos[1];if(!labelHeight){labelHeight=dataLabel&&dataLabel.getBBox().height;}
- if(outside){if(secondPass&&point.rank<overlapping){visibility=HIDDEN;}else if((!lowerHalf&&y<lastY+labelHeight)||(lowerHalf&&y>lastY-labelHeight)){y=lastY+sign*labelHeight;x=series.getX(y,i>1);if((!lowerHalf&&y+labelHeight>centerY)||(lowerHalf&&y-labelHeight<centerY)){if(secondPass){visibility=HIDDEN;}else{overlapping++;}}}}
- if(point.visible===false){visibility=HIDDEN;}
- if(visibility==VISIBLE){lastY=y;}
- if(secondPass){dataLabel.attr({visibility:visibility,align:labelPos[6]}).animate({x:x+options.x+
- ({left:connectorPadding,right:-connectorPadding}[labelPos[6]]||0),y:y+options.y});if(outside&&connectorWidth){connector=point.connector;connectorPath=[M,x+(labelPos[6]=='left'?5:-5),y,L,x,y,L,labelPos[2],labelPos[3],L,labelPos[4],labelPos[5]];if(connector){connector.animate({d:connectorPath});connector.attr('visibility',visibility);}else{point.connector=connector=series.chart.renderer.path(connectorPath).attr({'stroke-width':connectorWidth,stroke:options.connectorColor||'#606060',visibility:visibility,zIndex:3}).translate(chart.plotLeft,chart.plotTop).add();}}}}}}}},drawTracker:ColumnSeries.prototype.drawTracker,getSymbol:function(){}});seriesTypes.pie=PieSeries;win.Highcharts={Chart:Chart,dateFormat:dateFormat,pathAnim:pathAnim,getOptions:getOptions,numberFormat:numberFormat,Point:Point,Renderer:Renderer,seriesTypes:seriesTypes,setOptions:setOptions,Series:Series,addEvent:addEvent,createElement:createElement,discardElement:discardElement,css:css,each:each,extend:extend,map:map,merge:merge,pick:pick,extendClass:extendClass};})();
- </script>
+
+ <script type="text/javascript">
+/*!
+ * jQuery JavaScript Library v1.6.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Jun 30 14:16:56 2011 -0400
+ */
+(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
+shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.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".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
+)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
+(function(){var doc=document,win=window,math=Math,mathRound=math.round,mathFloor=math.floor,mathCeil=math.ceil,mathMax=math.max,mathMin=math.min,mathAbs=math.abs,mathCos=math.cos,mathSin=math.sin,mathPI=math.PI,deg2rad=mathPI*2/360,userAgent=navigator.userAgent,isIE=/msie/i.test(userAgent)&&!win.opera,docMode8=doc.documentMode===8,isWebKit=/AppleWebKit/.test(userAgent),isFirefox=/Firefox/.test(userAgent),hasSVG=!!doc.createElementNS&&!!doc.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,SVG_NS='http://www.w3.org/2000/svg',Renderer,hasTouch=doc.documentElement.ontouchstart!==undefined,colorCounter,symbolCounter,symbolSizes={},idCounter=0,timeFactor=1,garbageBin,defaultOptions,dateFormat,globalAnimation,pathAnim,UNDEFINED,DIV='div',ABSOLUTE='absolute',RELATIVE='relative',HIDDEN='hidden',PREFIX='highcharts-',VISIBLE='visible',PX='px',NONE='none',M='M',L='L',TRACKER_FILL='rgba(192,192,192,'+(hasSVG?0.000001:0.002)+')',NORMAL_STATE='',HOVER_STATE='hover',SELECT_STATE='select',makeTime,getMinutes,getHours,getDay,getDate,getMonth,getFullYear,setMinutes,setHours,setDate,setMonth,setFullYear,globalAdapter=win.HighchartsAdapter,adapter=globalAdapter||{},each=adapter.each,grep=adapter.grep,map=adapter.map,merge=adapter.merge,hyphenate=adapter.hyphenate,addEvent=adapter.addEvent,removeEvent=adapter.removeEvent,fireEvent=adapter.fireEvent,animate=adapter.animate,stop=adapter.stop,seriesTypes={},hoverChart;function extend(a,b){var n;if(!a){a={};}
+for(n in b){a[n]=b[n];}
+return a;}
+function pInt(s,mag){return parseInt(s,mag||10);}
+function isString(s){return typeof s==='string';}
+function isObject(obj){return typeof obj==='object';}
+function isNumber(n){return typeof n==='number';}
+function log2lin(num){return math.log(num)/math.LN10;}
+function lin2log(num){return math.pow(10,num);}
+function erase(arr,item){var i=arr.length;while(i--){if(arr[i]===item){arr.splice(i,1);break;}}}
+function defined(obj){return obj!==UNDEFINED&&obj!==null;}
+function attr(elem,prop,value){var key,setAttribute='setAttribute',ret;if(isString(prop)){if(defined(value)){elem[setAttribute](prop,value);}else if(elem&&elem.getAttribute){ret=elem.getAttribute(prop);}}else if(defined(prop)&&isObject(prop)){for(key in prop){elem[setAttribute](key,prop[key]);}}
+return ret;}
+function splat(obj){if(!obj||obj.constructor!==Array){obj=[obj];}
+return obj;}
+function pick(){var args=arguments,i,arg,length=args.length;for(i=0;i<length;i++){arg=args[i];if(typeof arg!=='undefined'&&arg!==null){return arg;}}}
+function serializeCSS(style){var s='',key;for(key in style){s+=key+':'+style[key]+';';}
+return s;}
+function css(el,styles){if(isIE){if(styles&&styles.opacity!==UNDEFINED){styles.filter='alpha(opacity='+(styles.opacity*100)+')';}}
+extend(el.style,styles);}
+function createElement(tag,attribs,styles,parent,nopad){var el=doc.createElement(tag);if(attribs){extend(el,attribs);}
+if(nopad){css(el,{padding:0,border:NONE,margin:0});}
+if(styles){css(el,styles);}
+if(parent){parent.appendChild(el);}
+return el;}
+function extendClass(parent,members){var object=function(){};object.prototype=new parent();extend(object.prototype,members);return object;}
+function numberFormat(number,decimals,decPoint,thousandsSep){var lang=defaultOptions.lang,n=number,c=isNaN(decimals=mathAbs(decimals))?2:decimals,d=decPoint===undefined?lang.decimalPoint:decPoint,t=thousandsSep===undefined?lang.thousandsSep:thousandsSep,s=n<0?"-":"",i=String(pInt(n=mathAbs(+n||0).toFixed(c))),j=i.length>3?i.length%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+
+(c?d+mathAbs(n-i).toFixed(c).slice(2):"");}
+dateFormat=function(format,timestamp,capitalize){function pad(number){return number.toString().replace(/^([0-9])$/,'0$1');}
+if(!defined(timestamp)||isNaN(timestamp)){return'Invalid date';}
+format=pick(format,'%Y-%m-%d %H:%M:%S');var date=new Date(timestamp*timeFactor),key,hours=date[getHours](),day=date[getDay](),dayOfMonth=date[getDate](),month=date[getMonth](),fullYear=date[getFullYear](),lang=defaultOptions.lang,langWeekdays=lang.weekdays,langMonths=lang.months,replacements={'a':langWeekdays[day].substr(0,3),'A':langWeekdays[day],'d':pad(dayOfMonth),'e':dayOfMonth,'b':langMonths[month].substr(0,3),'B':langMonths[month],'m':pad(month+1),'y':fullYear.toString().substr(2,2),'Y':fullYear,'H':pad(hours),'I':pad((hours%12)||12),'l':(hours%12)||12,'M':pad(date[getMinutes]()),'p':hours<12?'AM':'PM','P':hours<12?'am':'pm','S':pad(date.getSeconds())};for(key in replacements){format=format.replace('%'+key,replacements[key]);}
+return capitalize?format.substr(0,1).toUpperCase()+format.substr(1):format;};function getPosition(el){var p={left:el.offsetLeft,top:el.offsetTop};el=el.offsetParent;while(el){p.left+=el.offsetLeft;p.top+=el.offsetTop;if(el!==doc.body&&el!==doc.documentElement){p.left-=el.scrollLeft;p.top-=el.scrollTop;}
+el=el.offsetParent;}
+return p;}
+function setAnimation(animation,chart){globalAnimation=pick(animation,chart.animation);}
+if(globalAdapter&&globalAdapter.init){globalAdapter.init();}
+if(!globalAdapter&&win.jQuery){var jQ=jQuery;each=function(arr,fn){var i=0,len=arr.length;for(;i<len;i++){if(fn.call(arr[i],arr[i],i,arr)===false){return i;}}};grep=jQ.grep;map=function(arr,fn){var results=[],i=0,len=arr.length;for(;i<len;i++){results[i]=fn.call(arr[i],arr[i],i,arr);}
+return results;};merge=function(){var args=arguments;return jQ.extend(true,null,args[0],args[1],args[2],args[3]);};hyphenate=function(str){return str.replace(/([A-Z])/g,function(a,b){return'-'+b.toLowerCase();});};addEvent=function(el,event,fn){jQ(el).bind(event,fn);};removeEvent=function(el,eventType,handler){var func=doc.removeEventListener?'removeEventListener':'detachEvent';if(doc[func]&&!el[func]){el[func]=function(){};}
+jQ(el).unbind(eventType,handler);};fireEvent=function(el,type,eventArguments,defaultFunction){var event=jQ.Event(type),detachedType='detached'+type;extend(event,eventArguments);if(el[type]){el[detachedType]=el[type];el[type]=null;}
+jQ(el).trigger(event);if(el[detachedType]){el[type]=el[detachedType];el[detachedType]=null;}
+if(defaultFunction&&!event.isDefaultPrevented()){defaultFunction(event);}};animate=function(el,params,options){var $el=jQ(el);if(params.d){el.toD=params.d;params.d=1;}
+$el.stop();$el.animate(params,options);};stop=function(el){jQ(el).stop();};jQ.extend(jQ.easing,{easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;}});var oldStepDefault=jQuery.fx.step._default,oldCur=jQuery.fx.prototype.cur;jQ.fx.step._default=function(fx){var elem=fx.elem;if(elem.attr){elem.attr(fx.prop,fx.now);}else{oldStepDefault.apply(this,arguments);}};jQ.fx.step.d=function(fx){var elem=fx.elem;if(!fx.started){var ends=pathAnim.init(elem,elem.d,elem.toD);fx.start=ends[0];fx.end=ends[1];fx.started=true;}
+elem.attr('d',pathAnim.step(fx.start,fx.end,fx.pos,elem.toD));};jQ.fx.prototype.cur=function(){var elem=this.elem,r;if(elem.attr){r=elem.attr(this.prop);}else{r=oldCur.apply(this,arguments);}
+return r;};}
+pathAnim={init:function(elem,fromD,toD){fromD=fromD||'';var shift=elem.shift,bezier=fromD.indexOf('C')>-1,numParams=bezier?7:3,endLength,slice,i,start=fromD.split(' '),end=[].concat(toD),startBaseLine,endBaseLine,sixify=function(arr){i=arr.length;while(i--){if(arr[i]===M){arr.splice(i+1,0,arr[i+1],arr[i+2],arr[i+1],arr[i+2]);}}};if(bezier){sixify(start);sixify(end);}
+if(elem.isArea){startBaseLine=start.splice(start.length-6,6);endBaseLine=end.splice(end.length-6,6);}
+if(shift){end=[].concat(end).splice(0,numParams).concat(end);elem.shift=false;}
+if(start.length){endLength=end.length;while(start.length<endLength){slice=[].concat(start).splice(start.length-numParams,numParams);if(bezier){slice[numParams-6]=slice[numParams-2];slice[numParams-5]=slice[numParams-1];}
+start=start.concat(slice);}}
+if(startBaseLine){start=start.concat(startBaseLine);end=end.concat(endBaseLine);}
+return[start,end];},step:function(start,end,pos,complete){var ret=[],i=start.length,startVal;if(pos===1){ret=complete;}else if(i===end.length&&pos<1){while(i--){startVal=parseFloat(start[i]);ret[i]=isNaN(startVal)?start[i]:pos*(parseFloat(end[i]-startVal))+startVal;}}else{ret=end;}
+return ret;}};function setTimeMethods(){var useUTC=defaultOptions.global.useUTC;makeTime=useUTC?Date.UTC:function(year,month,date,hours,minutes,seconds){return new Date(year,month,pick(date,1),pick(hours,0),pick(minutes,0),pick(seconds,0)).getTime();};getMinutes=useUTC?'getUTCMinutes':'getMinutes';getHours=useUTC?'getUTCHours':'getHours';getDay=useUTC?'getUTCDay':'getDay';getDate=useUTC?'getUTCDate':'getDate';getMonth=useUTC?'getUTCMonth':'getMonth';getFullYear=useUTC?'getUTCFullYear':'getFullYear';setMinutes=useUTC?'setUTCMinutes':'setMinutes';setHours=useUTC?'setUTCHours':'setHours';setDate=useUTC?'setUTCDate':'setDate';setMonth=useUTC?'setUTCMonth':'setMonth';setFullYear=useUTC?'setUTCFullYear':'setFullYear';}
+function setOptions(options){defaultOptions=merge(defaultOptions,options);setTimeMethods();return defaultOptions;}
+function getOptions(){return defaultOptions;}
+function discardElement(element){if(!garbageBin){garbageBin=createElement(DIV);}
+if(element){garbageBin.appendChild(element);}
+garbageBin.innerHTML='';}
+var
+defaultLabelOptions={enabled:true,align:'center',x:0,y:15,style:{color:'#666',fontSize:'11px',lineHeight:'14px'}};defaultOptions={colors:['#4572A7','#AA4643','#89A54E','#80699B','#3D96AE','#DB843D','#92A8CD','#A47D7C','#B5CA92'],symbols:['circle','diamond','square','triangle','triangle-down'],lang:{loading:'Loading...',months:['January','February','March','April','May','June','July','August','September','October','November','December'],weekdays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],decimalPoint:'.',resetZoom:'Reset zoom',resetZoomTitle:'Reset zoom level 1:1',thousandsSep:','},global:{useUTC:true},chart:{borderColor:'#4572A7',borderRadius:5,defaultSeriesType:'line',ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:'12px'},backgroundColor:'#FFFFFF',plotBorderColor:'#C0C0C0'},title:{text:'Chart title',align:'center',y:15,style:{color:'#3E576F',fontSize:'16px'}},subtitle:{text:'',align:'center',y:30,style:{color:'#6D869F'}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1000},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:'#FFFFFF',states:{hover:{},select:{fillColor:'#FFFFFF',lineColor:'#000000',lineWidth:2}}},point:{events:{}},dataLabels:merge(defaultLabelOptions,{enabled:false,y:-6,formatter:function(){return this.y;}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:ABSOLUTE,color:'#3E576F'}},legend:{enabled:true,align:'center',layout:'horizontal',labelFormatter:function(){return this.name;},borderWidth:1,borderColor:'#909090',borderRadius:5,shadow:false,style:{padding:'5px'},itemStyle:{cursor:'pointer',color:'#3E576F'},itemHoverStyle:{cursor:'pointer',color:'#000000'},itemHiddenStyle:{color:'#C0C0C0'},itemCheckboxStyle:{position:ABSOLUTE,width:'13px',height:'13px'},symbolWidth:16,symbolPadding:5,verticalAlign:'bottom',x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:'bold',position:RELATIVE,top:'1em'},showDuration:100,style:{position:ABSOLUTE,backgroundColor:'white',opacity:0.5,textAlign:'center'}},tooltip:{enabled:true,backgroundColor:'rgba(255, 255, 255, .85)',borderWidth:2,borderRadius:5,shadow:true,snap:hasTouch?25:10,style:{color:'#333333',fontSize:'12px',padding:'5px',whiteSpace:'nowrap'}},toolbar:{itemStyle:{color:'#4572A7',cursor:'pointer'}},credits:{enabled:true,text:'Highcharts.com',href:'http://www.highcharts.com',position:{align:'right',x:-10,verticalAlign:'bottom',y:-5},style:{cursor:'pointer',color:'#909090',fontSize:'10px'}}};var defaultXAxisOptions={dateTimeLabelFormats:{second:'%H:%M:%S',minute:'%H:%M',hour:'%H:%M',day:'%e. %b',week:'%e. %b',month:'%b \'%y',year:'%Y'},endOnTick:false,gridLineColor:'#C0C0C0',labels:defaultLabelOptions,lineColor:'#C0D0E0',lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:'#E0E0E0',minorGridLineWidth:1,minorTickColor:'#A0A0A0',minorTickLength:2,minorTickPosition:'outside',startOfWeek:1,startOnTick:false,tickColor:'#C0D0E0',tickLength:5,tickmarkPlacement:'between',tickPixelInterval:100,tickPosition:'outside',tickWidth:1,title:{align:'middle',style:{color:'#6D869F',fontWeight:'bold'}},type:'linear'},defaultYAxisOptions=merge(defaultXAxisOptions,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:'right',x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:'Y-values'},stackLabels:{enabled:false,formatter:function(){return this.total;},style:defaultLabelOptions.style}}),defaultLeftAxisOptions={labels:{align:'right',x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions={labels:{align:'left',x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions={labels:{align:'center',x:0,y:14},title:{rotation:0}},defaultTopAxisOptions=merge(defaultBottomAxisOptions,{labels:{y:-5}});var defaultPlotOptions=defaultOptions.plotOptions,defaultSeriesOptions=defaultPlotOptions.line;defaultPlotOptions.spline=merge(defaultSeriesOptions);defaultPlotOptions.scatter=merge(defaultSeriesOptions,{lineWidth:0,states:{hover:{lineWidth:0}}});defaultPlotOptions.area=merge(defaultSeriesOptions,{});defaultPlotOptions.areaspline=merge(defaultPlotOptions.area);defaultPlotOptions.column=merge(defaultSeriesOptions,{borderColor:'#FFFFFF',borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:'#C0C0C0',borderColor:'#000000',shadow:false}},dataLabels:{y:null,verticalAlign:null}});defaultPlotOptions.bar=merge(defaultPlotOptions.column,{dataLabels:{align:'left',x:5,y:0}});defaultPlotOptions.pie=merge(defaultSeriesOptions,{borderColor:'#FFFFFF',borderWidth:1,center:['50%','50%'],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name;},y:5},legendType:'point',marker:null,size:'75%',showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});setTimeMethods();var Color=function(input){var rgba=[],result;function init(input){result=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);if(result){rgba=[pInt(result[1]),pInt(result[2]),pInt(result[3]),parseFloat(result[4],10)];}
+else{result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);if(result){rgba=[pInt(result[1],16),pInt(result[2],16),pInt(result[3],16),1];}}}
+function get(format){var ret;if(rgba&&!isNaN(rgba[0])){if(format==='rgb'){ret='rgb('+rgba[0]+','+rgba[1]+','+rgba[2]+')';}else if(format==='a'){ret=rgba[3];}else{ret='rgba('+rgba.join(',')+')';}}else{ret=input;}
+return ret;}
+function brighten(alpha){if(isNumber(alpha)&&alpha!==0){var i;for(i=0;i<3;i++){rgba[i]+=pInt(alpha*255);if(rgba[i]<0){rgba[i]=0;}
+if(rgba[i]>255){rgba[i]=255;}}}
+return this;}
+function setOpacity(alpha){rgba[3]=alpha;return this;}
+init(input);return{get:get,brighten:brighten,setOpacity:setOpacity};};function SVGElement(){}
+SVGElement.prototype={init:function(renderer,nodeName){this.element=doc.createElementNS(SVG_NS,nodeName);this.renderer=renderer;},animate:function(params,options,complete){var animOptions=pick(options,globalAnimation,true);if(animOptions){animOptions=merge(animOptions);if(complete){animOptions.complete=complete;}
+animate(this,params,animOptions);}else{this.attr(params);if(complete){complete();}}},attr:function(hash,val){var key,value,i,child,element=this.element,nodeName=element.nodeName,renderer=this.renderer,skipAttr,shadows=this.shadows,hasSetSymbolSize,ret=this;if(isString(hash)&&defined(val)){key=hash;hash={};hash[key]=val;}
+if(isString(hash)){key=hash;if(nodeName==='circle'){key={x:'cx',y:'cy'}[key]||key;}else if(key==='strokeWidth'){key='stroke-width';}
+ret=attr(element,key)||this[key]||0;if(key!=='d'&&key!=='visibility'){ret=parseFloat(ret);}}else{for(key in hash){skipAttr=false;value=hash[key];if(key==='d'){if(value&&value.join){value=value.join(' ');}
+if(/(NaN| {2}|^$)/.test(value)){value='M 0 0';}
+this.d=value;}else if(key==='x'&&nodeName==='text'){for(i=0;i<element.childNodes.length;i++){child=element.childNodes[i];if(attr(child,'x')===attr(element,'x')){attr(child,'x',value);}}
+if(this.rotation){attr(element,'transform','rotate('+this.rotation+' '+value+' '+
+pInt(hash.y||attr(element,'y'))+')');}}else if(key==='fill'){value=renderer.color(value,element,key);}else if(nodeName==='circle'&&(key==='x'||key==='y')){key={x:'cx',y:'cy'}[key]||key;}else if(key==='translateX'||key==='translateY'||key==='rotation'||key==='verticalAlign'){this[key]=value;this.updateTransform();skipAttr=true;}else if(key==='stroke'){value=renderer.color(value,element,key);}else if(key==='dashstyle'){key='stroke-dasharray';value=value&&value.toLowerCase();if(value==='solid'){value=NONE;}else if(value){value=value.replace('shortdashdotdot','3,1,1,1,1,1,').replace('shortdashdot','3,1,1,1').replace('shortdot','1,1,').replace('shortdash','3,1,').replace('longdash','8,3,').replace(/dot/g,'1,3,').replace('dash','4,3,').replace(/,$/,'').split(',');i=value.length;while(i--){value[i]=pInt(value[i])*hash['stroke-width'];}
+value=value.join(',');}}else if(key==='isTracker'){this[key]=value;}else if(key==='width'){value=pInt(value);}else if(key==='align'){key='text-anchor';value={left:'start',center:'middle',right:'end'}[value];}
+if(key==='strokeWidth'){key='stroke-width';}
+if(isWebKit&&key==='stroke-width'&&value===0){value=0.000001;}
+if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(key)){if(!hasSetSymbolSize){this.symbolAttr(hash);hasSetSymbolSize=true;}
+skipAttr=true;}
+if(shadows&&/^(width|height|visibility|x|y|d)$/.test(key)){i=shadows.length;while(i--){attr(shadows[i],key,value);}}
+if((key==='width'||key==='height')&&nodeName==='rect'&&value<0){value=0;}
+if(key==='text'){this.textStr=value;if(this.added){renderer.buildText(this);}}else if(!skipAttr){attr(element,key,value);}}}
+return ret;},symbolAttr:function(hash){var wrapper=this;each(['x','y','r','start','end','width','height','innerR'],function(key){wrapper[key]=pick(hash[key],wrapper[key]);});wrapper.attr({d:wrapper.renderer.symbols[wrapper.symbolName](mathRound(wrapper.x*2)/2,mathRound(wrapper.y*2)/2,wrapper.r,{start:wrapper.start,end:wrapper.end,width:wrapper.width,height:wrapper.height,innerR:wrapper.innerR})});},clip:function(clipRect){return this.attr('clip-path','url('+this.renderer.url+'#'+clipRect.id+')');},crisp:function(strokeWidth,x,y,width,height){var wrapper=this,key,attr={},values={},normalizer;strokeWidth=strokeWidth||wrapper.strokeWidth||0;normalizer=strokeWidth%2/2;values.x=mathFloor(x||wrapper.x||0)+normalizer;values.y=mathFloor(y||wrapper.y||0)+normalizer;values.width=mathFloor((width||wrapper.width||0)-2*normalizer);values.height=mathFloor((height||wrapper.height||0)-2*normalizer);values.strokeWidth=strokeWidth;for(key in values){if(wrapper[key]!==values[key]){wrapper[key]=attr[key]=values[key];}}
+return attr;},css:function(styles){var elemWrapper=this,elem=elemWrapper.element,textWidth=styles&&styles.width&&elem.nodeName==='text',camelStyles=styles,n;if(styles&&styles.color){styles.fill=styles.color;}
+styles=extend(elemWrapper.styles,styles);elemWrapper.styles=styles;if(defined(styles)){styles={};for(n in camelStyles){styles[hyphenate(n)]=camelStyles[n];}}
+if(isIE&&!hasSVG){if(textWidth){delete styles.width;}
+css(elemWrapper.element,styles);}else{elemWrapper.attr({style:serializeCSS(styles)});}
+if(textWidth&&elemWrapper.added){elemWrapper.renderer.buildText(elemWrapper);}
+return elemWrapper;},on:function(eventType,handler){var fn=handler;if(hasTouch&&eventType==='click'){eventType='touchstart';fn=function(e){e.preventDefault();handler();};}
+this.element['on'+eventType]=fn;return this;},translate:function(x,y){return this.attr({translateX:x,translateY:y});},invert:function(){var wrapper=this;wrapper.inverted=true;wrapper.updateTransform();return wrapper;},updateTransform:function(){var wrapper=this,translateX=wrapper.translateX||0,translateY=wrapper.translateY||0,inverted=wrapper.inverted,rotation=wrapper.rotation,transform=[];if(inverted){translateX+=wrapper.attr('width');translateY+=wrapper.attr('height');}
+if(translateX||translateY){transform.push('translate('+translateX+','+translateY+')');}
+if(inverted){transform.push('rotate(90) scale(-1,1)');}else if(rotation){transform.push('rotate('+rotation+' '+wrapper.x+' '+wrapper.y+')');}
+if(transform.length){attr(wrapper.element,'transform',transform.join(' '));}},toFront:function(){var element=this.element;element.parentNode.appendChild(element);return this;},align:function(alignOptions,alignByTranslate,box){var elemWrapper=this;if(!alignOptions){alignOptions=elemWrapper.alignOptions;alignByTranslate=elemWrapper.alignByTranslate;}else{elemWrapper.alignOptions=alignOptions;elemWrapper.alignByTranslate=alignByTranslate;if(!box){elemWrapper.renderer.alignedObjects.push(elemWrapper);}}
+box=pick(box,elemWrapper.renderer);var align=alignOptions.align,vAlign=alignOptions.verticalAlign,x=(box.x||0)+(alignOptions.x||0),y=(box.y||0)+(alignOptions.y||0),attribs={};if(/^(right|center)$/.test(align)){x+=(box.width-(alignOptions.width||0))/{right:1,center:2}[align];}
+attribs[alignByTranslate?'translateX':'x']=mathRound(x);if(/^(bottom|middle)$/.test(vAlign)){y+=(box.height-(alignOptions.height||0))/({bottom:1,middle:2}[vAlign]||1);}
+attribs[alignByTranslate?'translateY':'y']=mathRound(y);elemWrapper[elemWrapper.placed?'animate':'attr'](attribs);elemWrapper.placed=true;elemWrapper.alignAttr=attribs;return elemWrapper;},getBBox:function(){var bBox,width,height,rotation=this.rotation,rad=rotation*deg2rad;try{bBox=extend({},this.element.getBBox());}catch(e){bBox={width:0,height:0};}
+width=bBox.width;height=bBox.height;if(rotation){bBox.width=mathAbs(height*mathSin(rad))+mathAbs(width*mathCos(rad));bBox.height=mathAbs(height*mathCos(rad))+mathAbs(width*mathSin(rad));}
+return bBox;},show:function(){return this.attr({visibility:VISIBLE});},hide:function(){return this.attr({visibility:HIDDEN});},add:function(parent){var renderer=this.renderer,parentWrapper=parent||renderer,parentNode=parentWrapper.element||renderer.box,childNodes=parentNode.childNodes,element=this.element,zIndex=attr(element,'zIndex'),otherElement,otherZIndex,i;this.parentInverted=parent&&parent.inverted;if(this.textStr!==undefined){renderer.buildText(this);}
+if(zIndex){parentWrapper.handleZ=true;zIndex=pInt(zIndex);}
+if(parentWrapper.handleZ){for(i=0;i<childNodes.length;i++){otherElement=childNodes[i];otherZIndex=attr(otherElement,'zIndex');if(otherElement!==element&&(pInt(otherZIndex)>zIndex||(!defined(zIndex)&&defined(otherZIndex)))){parentNode.insertBefore(element,otherElement);return this;}}}
+parentNode.appendChild(element);this.added=true;return this;},destroy:function(){var wrapper=this,element=wrapper.element||{},shadows=wrapper.shadows,parentNode=element.parentNode,key;element.onclick=element.onmouseout=element.onmouseover=element.onmousemove=null;stop(wrapper);if(parentNode){parentNode.removeChild(element);}
+if(shadows){each(shadows,function(shadow){parentNode=shadow.parentNode;if(parentNode){parentNode.removeChild(shadow);}});}
+erase(wrapper.renderer.alignedObjects,wrapper);for(key in wrapper){delete wrapper[key];}
+return null;},empty:function(){var element=this.element,childNodes=element.childNodes,i=childNodes.length;while(i--){element.removeChild(childNodes[i]);}},shadow:function(apply,group){var shadows=[],i,shadow,element=this.element,transform=this.parentInverted?'(-1,-1)':'(1,1)';if(apply){for(i=1;i<=3;i++){shadow=element.cloneNode(0);attr(shadow,{'isShadow':'true','stroke':'rgb(0, 0, 0)','stroke-opacity':0.05*i,'stroke-width':7-2*i,'transform':'translate'+transform,'fill':NONE});if(group){group.element.appendChild(shadow);}else{element.parentNode.insertBefore(shadow,element);}
+shadows.push(shadow);}
+this.shadows=shadows;}
+return this;}};var SVGRenderer=function(){this.init.apply(this,arguments);};SVGRenderer.prototype={Element:SVGElement,init:function(container,width,height,forExport){var renderer=this,loc=location,boxWrapper;boxWrapper=renderer.createElement('svg').attr({xmlns:SVG_NS,version:'1.1'});container.appendChild(boxWrapper.element);renderer.box=boxWrapper.element;renderer.boxWrapper=boxWrapper;renderer.alignedObjects=[];renderer.url=isIE?'':loc.href.replace(/#.*?$/,'');renderer.defs=this.createElement('defs').add();renderer.forExport=forExport;renderer.setSize(width,height,false);},createElement:function(nodeName){var wrapper=new this.Element();wrapper.init(this,nodeName);return wrapper;},buildText:function(wrapper){var textNode=wrapper.element,lines=pick(wrapper.textStr,'').toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,'<span').replace(/<\/(b|strong|i|em|a)>/g,'</span>').split(/<br.*?>/g),childNodes=textNode.childNodes,styleRegex=/style="([^"]+)"/,hrefRegex=/href="([^"]+)"/,parentX=attr(textNode,'x'),textStyles=wrapper.styles,reverse=isFirefox&&textStyles&&textStyles['-hc-direction']==='rtl'&&!this.forExport&&pInt(userAgent.split('Firefox/')[1])<4,arr,width=textStyles&&pInt(textStyles.width),textLineHeight=textStyles&&textStyles['line-height'],lastLine,GET_COMPUTED_STYLE='getComputedStyle',i=childNodes.length;while(i--){textNode.removeChild(childNodes[i]);}
+if(width&&!wrapper.added){this.box.appendChild(textNode);}
+each(lines,function(line,lineNo){var spans,spanNo=0,lineHeight;line=line.replace(/<span/g,'|||<span').replace(/<\/span>/g,'</span>|||');spans=line.split('|||');each(spans,function(span){if(span!==''||spans.length===1){var attributes={},tspan=doc.createElementNS(SVG_NS,'tspan');if(styleRegex.test(span)){attr(tspan,'style',span.match(styleRegex)[1].replace(/(;| |^)color([ :])/,'$1fill$2'));}
+if(hrefRegex.test(span)){attr(tspan,'onclick','location.href=\"'+span.match(hrefRegex)[1]+'\"');css(tspan,{cursor:'pointer'});}
+span=(span.replace(/<(.|\n)*?>/g,'')||' ').replace(/</g,'<').replace(/>/g,'>');if(reverse){arr=[];i=span.length;while(i--){arr.push(span.charAt(i));}
+span=arr.join('');}
+tspan.appendChild(doc.createTextNode(span));if(!spanNo){attributes.x=parentX;}else{attributes.dx=3;}
+if(!spanNo){if(lineNo){if(!hasSVG&&wrapper.renderer.forExport){css(tspan,{display:'block'});}
+lineHeight=win[GET_COMPUTED_STYLE]&&win[GET_COMPUTED_STYLE](lastLine,null).getPropertyValue('line-height');if(!lineHeight||isNaN(lineHeight)){lineHeight=textLineHeight||lastLine.offsetHeight||18;}
+attr(tspan,'dy',lineHeight);}
+lastLine=tspan;}
+attr(tspan,attributes);textNode.appendChild(tspan);spanNo++;if(width){var words=span.replace(/-/g,'- ').split(' '),tooLong,actualWidth,rest=[];while(words.length||rest.length){actualWidth=textNode.getBBox().width;tooLong=actualWidth>width;if(!tooLong||words.length===1){words=rest;rest=[];if(words.length){tspan=doc.createElementNS(SVG_NS,'tspan');attr(tspan,{dy:textLineHeight||16,x:parentX});textNode.appendChild(tspan);if(actualWidth>width){width=actualWidth;}}}else{tspan.removeChild(tspan.firstChild);rest.unshift(words.pop());}
+if(words.length){tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g,'-')));}}}}});});},crispLine:function(points,width){if(points[1]===points[4]){points[1]=points[4]=mathRound(points[1])+(width%2/2);}
+if(points[2]===points[5]){points[2]=points[5]=mathRound(points[2])+(width%2/2);}
+return points;},path:function(path){return this.createElement('path').attr({d:path,fill:NONE});},circle:function(x,y,r){var attr=isObject(x)?x:{x:x,y:y,r:r};return this.createElement('circle').attr(attr);},arc:function(x,y,r,innerR,start,end){if(isObject(x)){y=x.y;r=x.r;innerR=x.innerR;start=x.start;end=x.end;x=x.x;}
+return this.symbol('arc',x||0,y||0,r||0,{innerR:innerR||0,start:start||0,end:end||0});},rect:function(x,y,width,height,r,strokeWidth){if(isObject(x)){y=x.y;width=x.width;height=x.height;r=x.r;strokeWidth=x.strokeWidth;x=x.x;}
+var wrapper=this.createElement('rect').attr({rx:r,ry:r,fill:NONE});return wrapper.attr(wrapper.crisp(strokeWidth,x,y,mathMax(width,0),mathMax(height,0)));},setSize:function(width,height,animate){var renderer=this,alignedObjects=renderer.alignedObjects,i=alignedObjects.length;renderer.width=width;renderer.height=height;renderer.boxWrapper[pick(animate,true)?'animate':'attr']({width:width,height:height});while(i--){alignedObjects[i].align();}},g:function(name){return this.createElement('g').attr(defined(name)&&{'class':PREFIX+name});},image:function(src,x,y,width,height){var attribs={preserveAspectRatio:NONE},elemWrapper;if(arguments.length>1){extend(attribs,{x:x,y:y,width:width,height:height});}
+elemWrapper=this.createElement('image').attr(attribs);if(elemWrapper.element.setAttributeNS){elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink','href',src);}else{elemWrapper.element.setAttribute('hc-svg-href',src);}
+return elemWrapper;},symbol:function(symbol,x,y,radius,options){var obj,symbolFn=this.symbols[symbol],path=symbolFn&&symbolFn(mathRound(x),mathRound(y),radius,options),imageRegex=/^url\((.*?)\)$/,imageSrc,imageSize;if(path){obj=this.path(path);extend(obj,{symbolName:symbol,x:x,y:y,r:radius});if(options){extend(obj,options);}}else if(imageRegex.test(symbol)){var centerImage=function(img,size){img.attr({width:size[0],height:size[1]}).translate(-mathRound(size[0]/2),-mathRound(size[1]/2));};imageSrc=symbol.match(imageRegex)[1];imageSize=symbolSizes[imageSrc];obj=this.image(imageSrc).attr({x:x,y:y});if(imageSize){centerImage(obj,imageSize);}else{obj.attr({width:0,height:0});createElement('img',{onload:function(){var img=this;centerImage(obj,symbolSizes[imageSrc]=[img.width,img.height]);},src:imageSrc});}}else{obj=this.circle(x,y,radius);}
+return obj;},symbols:{'square':function(x,y,radius){var len=0.707*radius;return[M,x-len,y-len,L,x+len,y-len,x+len,y+len,x-len,y+len,'Z'];},'triangle':function(x,y,radius){return[M,x,y-1.33*radius,L,x+radius,y+0.67*radius,x-radius,y+0.67*radius,'Z'];},'triangle-down':function(x,y,radius){return[M,x,y+1.33*radius,L,x-radius,y-0.67*radius,x+radius,y-0.67*radius,'Z'];},'diamond':function(x,y,radius){return[M,x,y-radius,L,x+radius,y,x,y+radius,x-radius,y,'Z'];},'arc':function(x,y,radius,options){var start=options.start,end=options.end-0.000001,innerRadius=options.innerR,cosStart=mathCos(start),sinStart=mathSin(start),cosEnd=mathCos(end),sinEnd=mathSin(end),longArc=options.end-start<mathPI?0:1;return[M,x+radius*cosStart,y+radius*sinStart,'A',radius,radius,0,longArc,1,x+radius*cosEnd,y+radius*sinEnd,L,x+innerRadius*cosEnd,y+innerRadius*sinEnd,'A',innerRadius,innerRadius,0,longArc,0,x+innerRadius*cosStart,y+innerRadius*sinStart,'Z'];}},clipRect:function(x,y,width,height){var wrapper,id=PREFIX+idCounter++,clipPath=this.createElement('clipPath').attr({id:id}).add(this.defs);wrapper=this.rect(x,y,width,height,0).add(clipPath);wrapper.id=id;return wrapper;},color:function(color,elem,prop){var colorObject,regexRgba=/^rgba/;if(color&&color.linearGradient){var renderer=this,strLinearGradient='linearGradient',linearGradient=color[strLinearGradient],id=PREFIX+idCounter++,gradientObject,stopColor,stopOpacity;gradientObject=renderer.createElement(strLinearGradient).attr({id:id,gradientUnits:'userSpaceOnUse',x1:linearGradient[0],y1:linearGradient[1],x2:linearGradient[2],y2:linearGradient[3]}).add(renderer.defs);each(color.stops,function(stop){if(regexRgba.test(stop[1])){colorObject=Color(stop[1]);stopColor=colorObject.get('rgb');stopOpacity=colorObject.get('a');}else{stopColor=stop[1];stopOpacity=1;}
+renderer.createElement('stop').attr({offset:stop[0],'stop-color':stopColor,'stop-opacity':stopOpacity}).add(gradientObject);});return'url('+this.url+'#'+id+')';}else if(regexRgba.test(color)){colorObject=Color(color);attr(elem,prop+'-opacity',colorObject.get('a'));return colorObject.get('rgb');}else{return color;}},text:function(str,x,y){var defaultChartStyle=defaultOptions.chart.style,wrapper;x=mathRound(pick(x,0));y=mathRound(pick(y,0));wrapper=this.createElement('text').attr({x:x,y:y,text:str}).css({'font-family':defaultChartStyle.fontFamily,'font-size':defaultChartStyle.fontSize});wrapper.x=x;wrapper.y=y;return wrapper;}};Renderer=SVGRenderer;var VMLRenderer;if(!hasSVG){var VMLElement=extendClass(SVGElement,{init:function(renderer,nodeName){var markup=['<',nodeName,' filled="f" stroked="f"'],style=['position: ',ABSOLUTE,';'];if(nodeName==='shape'||nodeName===DIV){style.push('left:0;top:0;width:10px;height:10px;');}
+if(docMode8){style.push('visibility: ',nodeName===DIV?HIDDEN:VISIBLE);}
+markup.push(' style="',style.join(''),'"/>');if(nodeName){markup=nodeName===DIV||nodeName==='span'||nodeName==='img'?markup.join(''):renderer.prepVML(markup);this.element=createElement(markup);}
+this.renderer=renderer;},add:function(parent){var wrapper=this,renderer=wrapper.renderer,element=wrapper.element,box=renderer.box,inverted=parent&&parent.inverted,parentNode=parent?parent.element||parent:box;if(inverted){renderer.invertChild(element,parentNode);}
+if(docMode8&&parentNode.gVis===HIDDEN){css(element,{visibility:HIDDEN});}
+parentNode.appendChild(element);wrapper.added=true;if(wrapper.alignOnAdd){wrapper.updateTransform();}
+return wrapper;},attr:function(hash,val){var key,value,i,element=this.element||{},elemStyle=element.style,nodeName=element.nodeName,renderer=this.renderer,symbolName=this.symbolName,childNodes,hasSetSymbolSize,shadows=this.shadows,skipAttr,ret=this;if(isString(hash)&&defined(val)){key=hash;hash={};hash[key]=val;}
+if(isString(hash)){key=hash;if(key==='strokeWidth'||key==='stroke-width'){ret=this.strokeweight;}else{ret=this[key];}}else{for(key in hash){value=hash[key];skipAttr=false;if(symbolName&&/^(x|y|r|start|end|width|height|innerR)/.test(key)){if(!hasSetSymbolSize){this.symbolAttr(hash);hasSetSymbolSize=true;}
+skipAttr=true;}else if(key==='d'){value=value||[];this.d=value.join(' ');i=value.length;var convertedPath=[];while(i--){if(isNumber(value[i])){convertedPath[i]=mathRound(value[i]*10)-5;}
+else if(value[i]==='Z'){convertedPath[i]='x';}
+else{convertedPath[i]=value[i];}}
+value=convertedPath.join(' ')||'x';element.path=value;if(shadows){i=shadows.length;while(i--){shadows[i].path=value;}}
+skipAttr=true;}else if(key==='zIndex'||key==='visibility'){if(docMode8&&key==='visibility'&&nodeName==='DIV'){element.gVis=value;childNodes=element.childNodes;i=childNodes.length;while(i--){css(childNodes[i],{visibility:value});}
+if(value===VISIBLE){value=null;}}
+if(value){elemStyle[key]=value;}
+skipAttr=true;}else if(/^(width|height)$/.test(key)){if(this.updateClipping){this[key]=value;this.updateClipping();}else{elemStyle[key]=value;}
+skipAttr=true;}else if(/^(x|y)$/.test(key)){this[key]=value;if(element.tagName==='SPAN'){this.updateTransform();}else{elemStyle[{x:'left',y:'top'}[key]]=value;}}else if(key==='class'){element.className=value;}else if(key==='stroke'){value=renderer.color(value,element,key);key='strokecolor';}else if(key==='stroke-width'||key==='strokeWidth'){element.stroked=value?true:false;key='strokeweight';this[key]=value;if(isNumber(value)){value+=PX;}}else if(key==='dashstyle'){var strokeElem=element.getElementsByTagName('stroke')[0]||createElement(renderer.prepVML(['<stroke/>']),null,null,element);strokeElem[key]=value||'solid';this.dashstyle=value;skipAttr=true;}else if(key==='fill'){if(nodeName==='SPAN'){elemStyle.color=value;}else{element.filled=value!==NONE?true:false;value=renderer.color(value,element,key);key='fillcolor';}}else if(key==='translateX'||key==='translateY'||key==='rotation'||key==='align'){if(key==='align'){key='textAlign';}
+this[key]=value;this.updateTransform();skipAttr=true;}
+else if(key==='text'){this.bBox=null;element.innerHTML=value;skipAttr=true;}
+if(shadows&&key==='visibility'){i=shadows.length;while(i--){shadows[i].style[key]=value;}}
+if(!skipAttr){if(docMode8){element[key]=value;}else{attr(element,key,value);}}}}
+return ret;},clip:function(clipRect){var wrapper=this,clipMembers=clipRect.members;clipMembers.push(wrapper);wrapper.destroyClip=function(){erase(clipMembers,wrapper);};return wrapper.css(clipRect.getCSS(wrapper.inverted));},css:function(styles){var wrapper=this,element=wrapper.element,textWidth=styles&&element.tagName==='SPAN'&&styles.width;if(textWidth){delete styles.width;wrapper.textWidth=textWidth;wrapper.updateTransform();}
+wrapper.styles=extend(wrapper.styles,styles);css(wrapper.element,styles);return wrapper;},destroy:function(){var wrapper=this;if(wrapper.destroyClip){wrapper.destroyClip();}
+SVGElement.prototype.destroy.apply(wrapper);},empty:function(){var element=this.element,childNodes=element.childNodes,i=childNodes.length,node;while(i--){node=childNodes[i];node.parentNode.removeChild(node);}},getBBox:function(){var wrapper=this,element=wrapper.element,bBox=wrapper.bBox;if(!bBox){if(element.nodeName==='text'){element.style.position=ABSOLUTE;}
+bBox=wrapper.bBox={x:element.offsetLeft,y:element.offsetTop,width:element.offsetWidth,height:element.offsetHeight};}
+return bBox;},on:function(eventType,handler){this.element['on'+eventType]=function(){var evt=win.event;evt.target=evt.srcElement;handler(evt);};return this;},updateTransform:function(hash){if(!this.added){this.alignOnAdd=true;return;}
+var wrapper=this,elem=wrapper.element,translateX=wrapper.translateX||0,translateY=wrapper.translateY||0,x=wrapper.x||0,y=wrapper.y||0,align=wrapper.textAlign||'left',alignCorrection={left:0,center:0.5,right:1}[align],nonLeft=align&&align!=='left';if(translateX||translateY){wrapper.css({marginLeft:translateX,marginTop:translateY});}
+if(wrapper.inverted){each(elem.childNodes,function(child){wrapper.renderer.invertChild(child,elem);});}
+if(elem.tagName==='SPAN'){var width,height,rotation=wrapper.rotation,lineHeight,radians=0,costheta=1,sintheta=0,quad,textWidth=pInt(wrapper.textWidth),xCorr=wrapper.xCorr||0,yCorr=wrapper.yCorr||0,currentTextTransform=[rotation,align,elem.innerHTML,wrapper.textWidth].join(',');if(currentTextTransform!==wrapper.cTT){if(defined(rotation)){radians=rotation*deg2rad;costheta=mathCos(radians);sintheta=mathSin(radians);css(elem,{filter:rotation?['progid:DXImageTransform.Microsoft.Matrix(M11=',costheta,', M12=',-sintheta,', M21=',sintheta,', M22=',costheta,', sizingMethod=\'auto expand\')'].join(''):NONE});}
+width=elem.offsetWidth;height=elem.offsetHeight;if(width>textWidth){css(elem,{width:textWidth+PX,display:'block',whiteSpace:'normal'});width=textWidth;}
+lineHeight=mathRound((pInt(elem.style.fontSize)||12)*1.2);xCorr=costheta<0&&-width;yCorr=sintheta<0&&-height;quad=costheta*sintheta<0;xCorr+=sintheta*lineHeight*(quad?1-alignCorrection:alignCorrection);yCorr-=costheta*lineHeight*(rotation?(quad?alignCorrection:1-alignCorrection):1);if(nonLeft){xCorr-=width*alignCorrection*(costheta<0?-1:1);if(rotation){yCorr-=height*alignCorrection*(sintheta<0?-1:1);}
+css(elem,{textAlign:align});}
+wrapper.xCorr=xCorr;wrapper.yCorr=yCorr;}
+css(elem,{left:x+xCorr,top:y+yCorr});wrapper.cTT=currentTextTransform;}},shadow:function(apply,group){var shadows=[],i,element=this.element,renderer=this.renderer,shadow,elemStyle=element.style,markup,path=element.path;if(path&&typeof path.value!=='string'){path='x';}
+if(apply){for(i=1;i<=3;i++){markup=['<shape isShadow="true" strokeweight="',(7-2*i),'" filled="false" path="',path,'" coordsize="100,100" style="',element.style.cssText,'" />'];shadow=createElement(renderer.prepVML(markup),null,{left:pInt(elemStyle.left)+1,top:pInt(elemStyle.top)+1});markup=['<stroke color="black" opacity="',(0.05*i),'"/>'];createElement(renderer.prepVML(markup),null,null,shadow);if(group){group.element.appendChild(shadow);}else{element.parentNode.insertBefore(shadow,element);}
+shadows.push(shadow);}
+this.shadows=shadows;}
+return this;}});VMLRenderer=function(){this.init.apply(this,arguments);};VMLRenderer.prototype=merge(SVGRenderer.prototype,{Element:VMLElement,isIE8:userAgent.indexOf('MSIE 8.0')>-1,init:function(container,width,height){var renderer=this,boxWrapper;renderer.alignedObjects=[];boxWrapper=renderer.createElement(DIV);container.appendChild(boxWrapper.element);renderer.box=boxWrapper.element;renderer.boxWrapper=boxWrapper;renderer.setSize(width,height,false);if(!doc.namespaces.hcv){doc.namespaces.add('hcv','urn:schemas-microsoft-com:vml');doc.createStyleSheet().cssText='hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke'+'{ behavior:url(#default#VML); display: inline-block; } ';}},clipRect:function(x,y,width,height){var clipRect=this.createElement();return extend(clipRect,{members:[],left:x,top:y,width:width,height:height,getCSS:function(inverted){var rect=this,top=rect.top,left=rect.left,right=left+rect.width,bottom=top+rect.height,ret={clip:'rect('+
+mathRound(inverted?left:top)+'px,'+
+mathRound(inverted?bottom:right)+'px,'+
+mathRound(inverted?right:bottom)+'px,'+
+mathRound(inverted?top:left)+'px)'};if(!inverted&&docMode8){extend(ret,{width:right+PX,height:bottom+PX});}
+return ret;},updateClipping:function(){each(clipRect.members,function(member){member.css(clipRect.getCSS(member.inverted));});}});},color:function(color,elem,prop){var colorObject,regexRgba=/^rgba/,markup;if(color&&color.linearGradient){var stopColor,stopOpacity,linearGradient=color.linearGradient,angle,color1,opacity1,color2,opacity2;each(color.stops,function(stop,i){if(regexRgba.test(stop[1])){colorObject=Color(stop[1]);stopColor=colorObject.get('rgb');stopOpacity=colorObject.get('a');}else{stopColor=stop[1];stopOpacity=1;}
+if(!i){color1=stopColor;opacity1=stopOpacity;}else{color2=stopColor;opacity2=stopOpacity;}});angle=90-math.atan((linearGradient[3]-linearGradient[1])/(linearGradient[2]-linearGradient[0]))*180/mathPI;markup=['<',prop,' colors="0% ',color1,',100% ',color2,'" angle="',angle,'" opacity="',opacity2,'" o:opacity2="',opacity1,'" type="gradient" focus="100%" />'];createElement(this.prepVML(markup),null,null,elem);}else if(regexRgba.test(color)&&elem.tagName!=='IMG'){colorObject=Color(color);markup=['<',prop,' opacity="',colorObject.get('a'),'"/>'];createElement(this.prepVML(markup),null,null,elem);return colorObject.get('rgb');}else{return color;}},prepVML:function(markup){var vmlStyle='display:inline-block;behavior:url(#default#VML);',isIE8=this.isIE8;markup=markup.join('');if(isIE8){markup=markup.replace('/>',' xmlns="urn:schemas-microsoft-com:vml" />');if(markup.indexOf('style="')===-1){markup=markup.replace('/>',' style="'+vmlStyle+'" />');}else{markup=markup.replace('style="','style="'+vmlStyle);}}else{markup=markup.replace('<','<hcv:');}
+return markup;},text:function(str,x,y){var defaultChartStyle=defaultOptions.chart.style;return this.createElement('span').attr({text:str,x:mathRound(x),y:mathRound(y)}).css({whiteSpace:'nowrap',fontFamily:defaultChartStyle.fontFamily,fontSize:defaultChartStyle.fontSize});},path:function(path){return this.createElement('shape').attr({coordsize:'100 100',d:path});},circle:function(x,y,r){return this.symbol('circle').attr({x:x,y:y,r:r});},g:function(name){var wrapper,attribs;if(name){attribs={'className':PREFIX+name,'class':PREFIX+name};}
+wrapper=this.createElement(DIV).attr(attribs);return wrapper;},image:function(src,x,y,width,height){var obj=this.createElement('img').attr({src:src});if(arguments.length>1){obj.css({left:x,top:y,width:width,height:height});}
+return obj;},rect:function(x,y,width,height,r,strokeWidth){if(isObject(x)){y=x.y;width=x.width;height=x.height;r=x.r;strokeWidth=x.strokeWidth;x=x.x;}
+var wrapper=this.symbol('rect');wrapper.r=r;return wrapper.attr(wrapper.crisp(strokeWidth,x,y,mathMax(width,0),mathMax(height,0)));},invertChild:function(element,parentNode){var parentStyle=parentNode.style;css(element,{flip:'x',left:pInt(parentStyle.width)-10,top:pInt(parentStyle.height)-10,rotation:-90});},symbols:{arc:function(x,y,radius,options){var start=options.start,end=options.end,cosStart=mathCos(start),sinStart=mathSin(start),cosEnd=mathCos(end),sinEnd=mathSin(end),innerRadius=options.innerR,circleCorrection=0.07/radius,innerCorrection=(innerRadius&&0.1/innerRadius)||0;if(end-start===0){return['x'];}else if(2*mathPI-end+start<circleCorrection){cosEnd=-circleCorrection;}else if(end-start<innerCorrection){cosEnd=mathCos(start+innerCorrection);}
+return['wa',x-radius,y-radius,x+radius,y+radius,x+radius*cosStart,y+radius*sinStart,x+radius*cosEnd,y+radius*sinEnd,'at',x-innerRadius,y-innerRadius,x+innerRadius,y+innerRadius,x+innerRadius*cosEnd,y+innerRadius*sinEnd,x+innerRadius*cosStart,y+innerRadius*sinStart,'x','e'];},circle:function(x,y,r){return['wa',x-r,y-r,x+r,y+r,x+r,y,x+r,y,'e'];},rect:function(left,top,r,options){if(!defined(options)){return[];}
+var width=options.width,height=options.height,right=left+width,bottom=top+height;r=mathMin(r,width,height);return[M,left+r,top,L,right-r,top,'wa',right-2*r,top,right,top+2*r,right-r,top,right,top+r,L,right,bottom-r,'wa',right-2*r,bottom-2*r,right,bottom,right,bottom-r,right-r,bottom,L,left+r,bottom,'wa',left,bottom-2*r,left+2*r,bottom,left+r,bottom,left,bottom-r,L,left,top+r,'wa',left,top,left+2*r,top+2*r,left,top+r,left+r,top,'x','e'];}}});Renderer=VMLRenderer;}
+function Chart(options,callback){defaultXAxisOptions=merge(defaultXAxisOptions,defaultOptions.xAxis);defaultYAxisOptions=merge(defaultYAxisOptions,defaultOptions.yAxis);defaultOptions.xAxis=defaultOptions.yAxis=null;options=merge(defaultOptions,options);var optionsChart=options.chart,optionsMargin=optionsChart.margin,margin=isObject(optionsMargin)?optionsMargin:[optionsMargin,optionsMargin,optionsMargin,optionsMargin],optionsMarginTop=pick(optionsChart.marginTop,margin[0]),optionsMarginRight=pick(optionsChart.marginRight,margin[1]),optionsMarginBottom=pick(optionsChart.marginBottom,margin[2]),optionsMarginLeft=pick(optionsChart.marginLeft,margin[3]),spacingTop=optionsChart.spacingTop,spacingRight=optionsChart.spacingRight,spacingBottom=optionsChart.spacingBottom,spacingLeft=optionsChart.spacingLeft,spacingBox,chartTitleOptions,chartSubtitleOptions,plotTop,marginRight,marginBottom,plotLeft,axisOffset,renderTo,renderToClone,container,containerId,containerWidth,containerHeight,chartWidth,chartHeight,oldChartWidth,oldChartHeight,chartBackground,plotBackground,plotBGImage,plotBorder,chart=this,chartEvents=optionsChart.events,runChartClick=chartEvents&&!!chartEvents.click,eventType,isInsidePlot,tooltip,mouseIsDown,loadingDiv,loadingSpan,loadingShown,plotHeight,plotWidth,tracker,trackerGroup,placeTrackerGroup,legend,legendWidth,legendHeight,chartPosition,hasCartesianSeries=optionsChart.showAxes,isResizing=0,axes=[],maxTicks,series=[],inverted,renderer,tooltipTick,tooltipInterval,hoverX,drawChartBox,getMargins,resetMargins,setChartSize,resize,zoom,zoomOut;function Axis(chart,options){var isXAxis=options.isX,opposite=options.opposite,horiz=inverted?!isXAxis:isXAxis,side=horiz?(opposite?0:2):(opposite?1:3),stacks={};options=merge(isXAxis?defaultXAxisOptions:defaultYAxisOptions,[defaultTopAxisOptions,defaultRightAxisOptions,defaultBottomAxisOptions,defaultLeftAxisOptions][side],options);var axis=this,type=options.type,isDatetimeAxis=type==='datetime',isLog=type==='logarithmic',offset=options.offset||0,xOrY=isXAxis?'x':'y',axisLength,transA,oldTransA,transB=horiz?plotLeft:marginBottom,translate,getPlotLinePath,axisGroup,gridGroup,axisLine,dataMin,dataMax,associatedSeries,userMin,userMax,max=null,min=null,oldMin,oldMax,minPadding=options.minPadding,maxPadding=options.maxPadding,isLinked=defined(options.linkedTo),ignoreMinPadding,ignoreMaxPadding,usePercentage,events=options.events,eventType,plotLinesAndBands=[],tickInterval,minorTickInterval,magnitude,tickPositions,ticks={},minorTicks={},alternateBands={},tickAmount,labelOffset,axisTitleMargin,dateTimeLabelFormat,categories=options.categories,labelFormatter=options.labels.formatter||function(){var value=this.value,ret;if(dateTimeLabelFormat){ret=dateFormat(dateTimeLabelFormat,value);}else if(tickInterval%1000000===0){ret=(value/1000000)+'M';}else if(tickInterval%1000===0){ret=(value/1000)+'k';}else if(!categories&&value>=1000){ret=numberFormat(value,0);}else{ret=value;}
+return ret;},staggerLines=horiz&&options.labels.staggerLines,reversed=options.reversed,tickmarkOffset=(categories&&options.tickmarkPlacement==='between')?0.5:0;function Tick(pos,minor){var tick=this;tick.pos=pos;tick.minor=minor;tick.isNew=true;if(!minor){tick.addLabel();}}
+Tick.prototype={addLabel:function(){var pos=this.pos,labelOptions=options.labels,str,withLabel=!((pos===min&&!pick(options.showFirstLabel,1))||(pos===max&&!pick(options.showLastLabel,0))),width=(categories&&horiz&&categories.length&&!labelOptions.step&&!labelOptions.staggerLines&&!labelOptions.rotation&&plotWidth/categories.length)||(!horiz&&plotWidth/2),css,label=this.label;str=labelFormatter.call({isFirst:pos===tickPositions[0],isLast:pos===tickPositions[tickPositions.length-1],dateTimeLabelFormat:dateTimeLabelFormat,value:(categories&&categories[pos]?categories[pos]:pos)});css=width&&{width:mathMax(1,mathRound(width-2*(labelOptions.padding||10)))+PX};css=extend(css,labelOptions.style);if(label===UNDEFINED){this.label=defined(str)&&withLabel&&labelOptions.enabled?renderer.text(str,0,0).attr({align:labelOptions.align,rotation:labelOptions.rotation}).css(css).add(axisGroup):null;}else if(label){label.attr({text:str}).css(css);}},getLabelSize:function(){var label=this.label;return label?((this.labelBBox=label.getBBox()))[horiz?'height':'width']:0;},render:function(index,old){var tick=this,major=!tick.minor,label=tick.label,pos=tick.pos,labelOptions=options.labels,gridLine=tick.gridLine,gridLineWidth=major?options.gridLineWidth:options.minorGridLineWidth,gridLineColor=major?options.gridLineColor:options.minorGridLineColor,dashStyle=major?options.gridLineDashStyle:options.minorGridLineDashStyle,gridLinePath,mark=tick.mark,markPath,tickLength=major?options.tickLength:options.minorTickLength,tickWidth=major?options.tickWidth:(options.minorTickWidth||0),tickColor=major?options.tickColor:options.minorTickColor,tickPosition=major?options.tickPosition:options.minorTickPosition,step=labelOptions.step,cHeight=(old&&oldChartHeight)||chartHeight,attribs,x,y;x=horiz?translate(pos+tickmarkOffset,null,null,old)+transB:plotLeft+offset+(opposite?((old&&oldChartWidth)||chartWidth)-marginRight-plotLeft:0);y=horiz?cHeight-marginBottom+offset-(opposite?plotHeight:0):cHeight-translate(pos+tickmarkOffset,null,null,old)-transB;if(gridLineWidth){gridLinePath=getPlotLinePath(pos+tickmarkOffset,gridLineWidth,old);if(gridLine===UNDEFINED){attribs={stroke:gridLineColor,'stroke-width':gridLineWidth};if(dashStyle){attribs.dashstyle=dashStyle;}
+tick.gridLine=gridLine=gridLineWidth?renderer.path(gridLinePath).attr(attribs).add(gridGroup):null;}
+if(gridLine&&gridLinePath){gridLine.animate({d:gridLinePath});}}
+if(tickWidth){if(tickPosition==='inside'){tickLength=-tickLength;}
+if(opposite){tickLength=-tickLength;}
+markPath=renderer.crispLine([M,x,y,L,x+(horiz?0:-tickLength),y+(horiz?tickLength:0)],tickWidth);if(mark){mark.animate({d:markPath});}else{tick.mark=renderer.path(markPath).attr({stroke:tickColor,'stroke-width':tickWidth}).add(axisGroup);}}
+if(label&&!isNaN(x)){x=x+labelOptions.x-(tickmarkOffset&&horiz?tickmarkOffset*transA*(reversed?-1:1):0);y=y+labelOptions.y-(tickmarkOffset&&!horiz?tickmarkOffset*transA*(reversed?1:-1):0);if(!defined(labelOptions.y)){y+=pInt(label.styles.lineHeight)*0.9-label.getBBox().height/2;}
+if(staggerLines){y+=(index/(step||1)%staggerLines)*16;}
+if(step){label[index%step?'hide':'show']();}
+label[tick.isNew?'attr':'animate']({x:x,y:y});}
+tick.isNew=false;},destroy:function(){var tick=this,n;for(n in tick){if(tick[n]&&tick[n].destroy){tick[n].destroy();}}}};function PlotLineOrBand(options){var plotLine=this;if(options){plotLine.options=options;plotLine.id=options.id;}
+return plotLine;}
+PlotLineOrBand.prototype={render:function(){var plotLine=this,options=plotLine.options,optionsLabel=options.label,label=plotLine.label,width=options.width,to=options.to,toPath,from=options.from,dashStyle=options.dashStyle,svgElem=plotLine.svgElem,path=[],addEvent,eventType,xs,ys,x,y,color=options.color,zIndex=options.zIndex,events=options.events,attribs;if(width){path=getPlotLinePath(options.value,width);attribs={stroke:color,'stroke-width':width};if(dashStyle){attribs.dashstyle=dashStyle;}}
+else if(defined(from)&&defined(to)){from=mathMax(from,min);to=mathMin(to,max);toPath=getPlotLinePath(to);path=getPlotLinePath(from);if(path&&toPath){path.push(toPath[4],toPath[5],toPath[1],toPath[2]);}else{path=null;}
+attribs={fill:color};}else{return;}
+if(defined(zIndex)){attribs.zIndex=zIndex;}
+if(svgElem){if(path){svgElem.animate({d:path},null,svgElem.onGetPath);}else{svgElem.hide();svgElem.onGetPath=function(){svgElem.show();};}}else if(path&&path.length){plotLine.svgElem=svgElem=renderer.path(path).attr(attribs).add();if(events){addEvent=function(eventType){svgElem.on(eventType,function(e){events[eventType].apply(plotLine,[e]);});};for(eventType in events){addEvent(eventType);}}}
+if(optionsLabel&&defined(optionsLabel.text)&&path&&path.length&&plotWidth>0&&plotHeight>0){optionsLabel=merge({align:horiz&&toPath&&'center',x:horiz?!toPath&&4:10,verticalAlign:!horiz&&toPath&&'middle',y:horiz?toPath?16:10:toPath?6:-4,rotation:horiz&&!toPath&&90},optionsLabel);if(!label){plotLine.label=label=renderer.text(optionsLabel.text,0,0).attr({align:optionsLabel.textAlign||optionsLabel.align,rotation:optionsLabel.rotation,zIndex:zIndex}).css(optionsLabel.style).add();}
+xs=[path[1],path[4],pick(path[6],path[1])];ys=[path[2],path[5],pick(path[7],path[2])];x=mathMin.apply(math,xs);y=mathMin.apply(math,ys);label.align(optionsLabel,false,{x:x,y:y,width:mathMax.apply(math,xs)-x,height:mathMax.apply(math,ys)-y});label.show();}else if(label){label.hide();}
+return plotLine;},destroy:function(){var obj=this,n;for(n in obj){if(obj[n]&&obj[n].destroy){obj[n].destroy();}
+delete obj[n];}
+erase(plotLinesAndBands,obj);}};function StackItem(options,isNegative,x){var stackItem=this;stackItem.isNegative=isNegative;stackItem.options=options;stackItem.x=x;stackItem.alignOptions={align:options.align||(inverted?(isNegative?'left':'right'):'center'),verticalAlign:options.verticalAlign||(inverted?'middle':(isNegative?'bottom':'top')),y:pick(options.y,inverted?4:(isNegative?14:-6)),x:pick(options.x,inverted?(isNegative?-6:6):0)};stackItem.textAlign=options.textAlign||(inverted?(isNegative?'right':'left'):'center');}
+StackItem.prototype={setTotal:function(total){this.total=total;this.cum=total;},render:function(group){var stackItem=this,str=stackItem.options.formatter.call(stackItem);if(stackItem.label){stackItem.label.attr({text:str,visibility:HIDDEN});}else{stackItem.label=chart.renderer.text(str,0,0).css(stackItem.options.style).attr({align:stackItem.textAlign,rotation:stackItem.options.rotation,visibility:HIDDEN}).add(group);}},setOffset:function(xOffset,xWidth){var stackItem=this,neg=stackItem.isNegative,y=axis.translate(stackItem.total),yZero=axis.translate(0),h=mathAbs(y-yZero),x=chart.xAxis[0].translate(stackItem.x)+xOffset,plotHeight=chart.plotHeight,stackBox={x:inverted?(neg?y:y-h):x,y:inverted?plotHeight-x-xWidth:(neg?(plotHeight-y-h):plotHeight-y),width:inverted?h:xWidth,height:inverted?xWidth:h};if(stackItem.label){stackItem.label.align(stackItem.alignOptions,null,stackBox).attr({visibility:VISIBLE});}}};function getSeriesExtremes(){var posStack=[],negStack=[],run;dataMin=dataMax=null;associatedSeries=[];each(series,function(serie){run=false;each(['xAxis','yAxis'],function(strAxis){if(serie.isCartesian&&((strAxis==='xAxis'&&isXAxis)||(strAxis==='yAxis'&&!isXAxis))&&((serie.options[strAxis]===options.index)||(serie.options[strAxis]===UNDEFINED&&options.index===0))){serie[strAxis]=axis;associatedSeries.push(serie);run=true;}});if(!serie.visible&&optionsChart.ignoreHiddenSeries){run=false;}
+if(run){var stacking,posPointStack,negPointStack,stackKey,negKey;if(!isXAxis){stacking=serie.options.stacking;usePercentage=stacking==='percent';if(stacking){stackKey=serie.type+pick(serie.options.stack,'');negKey='-'+stackKey;serie.stackKey=stackKey;posPointStack=posStack[stackKey]||[];posStack[stackKey]=posPointStack;negPointStack=negStack[negKey]||[];negStack[negKey]=negPointStack;}
+if(usePercentage){dataMin=0;dataMax=99;}}
+if(serie.isCartesian){each(serie.data,function(point,i){var pointX=point.x,pointY=point.y,isNegative=pointY<0,pointStack=isNegative?negPointStack:posPointStack,key=isNegative?negKey:stackKey,totalPos,pointLow;if(dataMin===null){dataMin=dataMax=point[xOrY];}
+if(isXAxis){if(pointX>dataMax){dataMax=pointX;}else if(pointX<dataMin){dataMin=pointX;}}
+else if(defined(pointY)){if(stacking){pointStack[pointX]=defined(pointStack[pointX])?pointStack[pointX]+pointY:pointY;}
+totalPos=pointStack?pointStack[pointX]:pointY;pointLow=pick(point.low,totalPos);if(!usePercentage){if(totalPos>dataMax){dataMax=totalPos;}else if(pointLow<dataMin){dataMin=pointLow;}}
+if(stacking){if(!stacks[key]){stacks[key]={};}
+if(!stacks[key][pointX]){stacks[key][pointX]=new StackItem(options.stackLabels,isNegative,pointX);}
+stacks[key][pointX].setTotal(totalPos);}}});if(/(area|column|bar)/.test(serie.type)&&!isXAxis){var threshold=0;if(dataMin>=threshold){dataMin=threshold;ignoreMinPadding=true;}else if(dataMax<threshold){dataMax=threshold;ignoreMaxPadding=true;}}}}});}
+translate=function(val,backwards,cvsCoord,old,handleLog){var sign=1,cvsOffset=0,localA=old?oldTransA:transA,localMin=old?oldMin:min,returnValue;if(!localA){localA=transA;}
+if(cvsCoord){sign*=-1;cvsOffset=axisLength;}
+if(reversed){sign*=-1;cvsOffset-=sign*axisLength;}
+if(backwards){if(reversed){val=axisLength-val;}
+returnValue=val/localA+localMin;if(isLog&&handleLog){returnValue=lin2log(returnValue);}}else{if(isLog&&handleLog){val=log2lin(val);}
+returnValue=sign*(val-localMin)*localA+cvsOffset;}
+return returnValue;};getPlotLinePath=function(value,lineWidth,old){var x1,y1,x2,y2,translatedValue=translate(value,null,null,old),cHeight=(old&&oldChartHeight)||chartHeight,cWidth=(old&&oldChartWidth)||chartWidth,skip;x1=x2=mathRound(translatedValue+transB);y1=y2=mathRound(cHeight-translatedValue-transB);if(isNaN(translatedValue)){skip=true;}else if(horiz){y1=plotTop;y2=cHeight-marginBottom;if(x1<plotLeft||x1>plotLeft+plotWidth){skip=true;}}else{x1=plotLeft;x2=cWidth-marginRight;if(y1<plotTop||y1>plotTop+plotHeight){skip=true;}}
+return skip?null:renderer.crispLine([M,x1,y1,L,x2,y2],lineWidth||0);};function normalizeTickInterval(interval,multiples){var normalized,i;magnitude=multiples?1:math.pow(10,mathFloor(math.log(interval)/math.LN10));normalized=interval/magnitude;if(!multiples){multiples=[1,2,2.5,5,10];if(options.allowDecimals===false||isLog){if(magnitude===1){multiples=[1,2,5,10];}else if(magnitude<=0.1){multiples=[1/magnitude];}}}
+for(i=0;i<multiples.length;i++){interval=multiples[i];if(normalized<=(multiples[i]+(multiples[i+1]||multiples[i]))/2){break;}}
+interval*=magnitude;return interval;}
+function setDateTimeTickPositions(){tickPositions=[];var i,useUTC=defaultOptions.global.useUTC,oneSecond=1000/timeFactor,oneMinute=60000/timeFactor,oneHour=3600000/timeFactor,oneDay=24*3600000/timeFactor,oneWeek=7*24*3600000/timeFactor,oneMonth=30*24*3600000/timeFactor,oneYear=31556952000/timeFactor,units=[['second',oneSecond,[1,2,5,10,15,30]],['minute',oneMinute,[1,2,5,10,15,30]],['hour',oneHour,[1,2,3,4,6,8,12]],['day',oneDay,[1,2]],['week',oneWeek,[1,2]],['month',oneMonth,[1,2,3,4,6]],['year',oneYear,null]],unit=units[6],interval=unit[1],multiples=unit[2];for(i=0;i<units.length;i++){unit=units[i];interval=unit[1];multiples=unit[2];if(units[i+1]){var lessThan=(interval*multiples[multiples.length-1]+
+units[i+1][1])/2;if(tickInterval<=lessThan){break;}}}
+if(interval===oneYear&&tickInterval<5*interval){multiples=[1,2,5];}
+var multitude=normalizeTickInterval(tickInterval/interval,multiples),minYear,minDate=new Date(min*timeFactor);minDate.setMilliseconds(0);if(interval>=oneSecond){minDate.setSeconds(interval>=oneMinute?0:multitude*mathFloor(minDate.getSeconds()/multitude));}
+if(interval>=oneMinute){minDate[setMinutes](interval>=oneHour?0:multitude*mathFloor(minDate[getMinutes]()/multitude));}
+if(interval>=oneHour){minDate[setHours](interval>=oneDay?0:multitude*mathFloor(minDate[getHours]()/multitude));}
+if(interval>=oneDay){minDate[setDate](interval>=oneMonth?1:multitude*mathFloor(minDate[getDate]()/multitude));}
+if(interval>=oneMonth){minDate[setMonth](interval>=oneYear?0:multitude*mathFloor(minDate[getMonth]()/multitude));minYear=minDate[getFullYear]();}
+if(interval>=oneYear){minYear-=minYear%multitude;minDate[setFullYear](minYear);}
+if(interval===oneWeek){minDate[setDate](minDate[getDate]()-minDate[getDay]()+
+options.startOfWeek);}
+i=1;minYear=minDate[getFullYear]();var time=minDate.getTime()/timeFactor,minMonth=minDate[getMonth](),minDateDate=minDate[getDate]();while(time<max&&i<plotWidth){tickPositions.push(time);if(interval===oneYear){time=makeTime(minYear+i*multitude,0)/timeFactor;}else if(interval===oneMonth){time=makeTime(minYear,minMonth+i*multitude)/timeFactor;}else if(!useUTC&&(interval===oneDay||interval===oneWeek)){time=makeTime(minYear,minMonth,minDateDate+
+i*multitude*(interval===oneDay?1:7));}else{time+=interval*multitude;}
+i++;}
+tickPositions.push(time);dateTimeLabelFormat=options.dateTimeLabelFormats[unit[0]];}
+function correctFloat(num){var invMag,ret=num;magnitude=pick(magnitude,math.pow(10,mathFloor(math.log(tickInterval)/math.LN10)));if(magnitude<1){invMag=mathRound(1/magnitude)*10;ret=mathRound(num*invMag)/invMag;}
+return ret;}
+function setLinearTickPositions(){var i,roundedMin=correctFloat(mathFloor(min/tickInterval)*tickInterval),roundedMax=correctFloat(mathCeil(max/tickInterval)*tickInterval);tickPositions=[];i=correctFloat(roundedMin);while(i<=roundedMax){tickPositions.push(i);i=correctFloat(i+tickInterval);}}
+function setTickPositions(secondPass){var length,catPad,linkedParent,linkedParentExtremes,tickIntervalOption=options.tickInterval,tickPixelIntervalOption=options.tickPixelInterval,maxZoom=options.maxZoom||(isXAxis&&!defined(options.min)&&!defined(options.max)?mathMin(chart.smallestInterval*5,dataMax-dataMin):null),zoomOffset;axisLength=horiz?plotWidth:plotHeight;if(isLinked){linkedParent=chart[isXAxis?'xAxis':'yAxis'][options.linkedTo];linkedParentExtremes=linkedParent.getExtremes();min=pick(linkedParentExtremes.min,linkedParentExtremes.dataMin);max=pick(linkedParentExtremes.max,linkedParentExtremes.dataMax);}
+else{min=pick(userMin,options.min,dataMin);max=pick(userMax,options.max,dataMax);}
+if(isLog){min=log2lin(min);max=log2lin(max);}
+if(max-min<maxZoom){zoomOffset=(maxZoom-max+min)/2;min=mathMax(min-zoomOffset,pick(options.min,min-zoomOffset),dataMin);max=mathMin(min+maxZoom,pick(options.max,min+maxZoom),dataMax);}
+if(!categories&&!usePercentage&&!isLinked&&defined(min)&&defined(max)){length=(max-min)||1;if(!defined(options.min)&&!defined(userMin)&&minPadding&&(dataMin<0||!ignoreMinPadding)){min-=length*minPadding;}
+if(!defined(options.max)&&!defined(userMax)&&maxPadding&&(dataMax>0||!ignoreMaxPadding)){max+=length*maxPadding;}}
+if(min===max){tickInterval=1;}else if(isLinked&&!tickIntervalOption&&tickPixelIntervalOption===linkedParent.options.tickPixelInterval){tickInterval=linkedParent.tickInterval;}else{tickInterval=pick(tickIntervalOption,categories?1:(max-min)*tickPixelIntervalOption/axisLength);}
+if(!isDatetimeAxis&&!defined(options.tickInterval)){tickInterval=normalizeTickInterval(tickInterval);}
+axis.tickInterval=tickInterval;minorTickInterval=options.minorTickInterval==='auto'&&tickInterval?tickInterval/5:options.minorTickInterval;if(isDatetimeAxis){setDateTimeTickPositions();}else{setLinearTickPositions();}
+if(!isLinked){if(categories||(isXAxis&&chart.hasColumn)){catPad=(categories?1:tickInterval)*0.5;if(categories||!defined(pick(options.min,userMin))){min-=catPad;}
+if(categories||!defined(pick(options.max,userMax))){max+=catPad;}}
+var roundedMin=tickPositions[0],roundedMax=tickPositions[tickPositions.length-1];if(options.startOnTick){min=roundedMin;}else if(min>roundedMin){tickPositions.shift();}
+if(options.endOnTick){max=roundedMax;}else if(max<roundedMax){tickPositions.pop();}
+if(!maxTicks){maxTicks={x:0,y:0};}
+if(!isDatetimeAxis&&tickPositions.length>maxTicks[xOrY]){maxTicks[xOrY]=tickPositions.length;}}}
+function adjustTickAmount(){if(maxTicks&&!isDatetimeAxis&&!categories&&!isLinked){var oldTickAmount=tickAmount,calculatedTickAmount=tickPositions.length;tickAmount=maxTicks[xOrY];if(calculatedTickAmount<tickAmount){while(tickPositions.length<tickAmount){tickPositions.push(correctFloat(tickPositions[tickPositions.length-1]+tickInterval));}
+transA*=(calculatedTickAmount-1)/(tickAmount-1);max=tickPositions[tickPositions.length-1];}
+if(defined(oldTickAmount)&&tickAmount!==oldTickAmount){axis.isDirty=true;}}}
+function setScale(){var type,i;oldMin=min;oldMax=max;getSeriesExtremes();setTickPositions();oldTransA=transA;transA=axisLength/((max-min)||1);if(!isXAxis){for(type in stacks){for(i in stacks[type]){stacks[type][i].cum=stacks[type][i].total;}}}
+if(!axis.isDirty){axis.isDirty=(min!==oldMin||max!==oldMax);}}
+function setExtremes(newMin,newMax,redraw,animation){redraw=pick(redraw,true);fireEvent(axis,'setExtremes',{min:newMin,max:newMax},function(){userMin=newMin;userMax=newMax;if(redraw){chart.redraw(animation);}});}
+function getExtremes(){return{min:min,max:max,dataMin:dataMin,dataMax:dataMax,userMin:userMin,userMax:userMax};}
+function getThreshold(threshold){if(min>threshold){threshold=min;}else if(max<threshold){threshold=max;}
+return translate(threshold,0,1);}
+function addPlotBandOrLine(options){var obj=new PlotLineOrBand(options).render();plotLinesAndBands.push(obj);return obj;}
+function getOffset(){var hasData=associatedSeries.length&&defined(min)&&defined(max),titleOffset=0,titleMargin=0,axisTitleOptions=options.title,labelOptions=options.labels,directionFactor=[-1,1,1,-1][side],n;if(!axisGroup){axisGroup=renderer.g('axis').attr({zIndex:7}).add();gridGroup=renderer.g('grid').attr({zIndex:1}).add();}
+labelOffset=0;if(hasData||isLinked){each(tickPositions,function(pos){if(!ticks[pos]){ticks[pos]=new Tick(pos);}else{ticks[pos].addLabel();}
+if(side===0||side===2||{1:'left',3:'right'}[side]===labelOptions.align){labelOffset=mathMax(ticks[pos].getLabelSize(),labelOffset);}});if(staggerLines){labelOffset+=(staggerLines-1)*16;}}else{for(n in ticks){ticks[n].destroy();delete ticks[n];}}
+if(axisTitleOptions&&axisTitleOptions.text){if(!axis.axisTitle){axis.axisTitle=renderer.text(axisTitleOptions.text,0,0).attr({zIndex:7,rotation:axisTitleOptions.rotation||0,align:axisTitleOptions.textAlign||{low:'left',middle:'center',high:'right'}[axisTitleOptions.align]}).css(axisTitleOptions.style).add();}
+titleOffset=axis.axisTitle.getBBox()[horiz?'height':'width'];titleMargin=pick(axisTitleOptions.margin,horiz?5:10);}
+offset=directionFactor*(options.offset||axisOffset[side]);axisTitleMargin=labelOffset+
+(side!==2&&labelOffset&&directionFactor*options.labels[horiz?'y':'x'])+
+titleMargin;axisOffset[side]=mathMax(axisOffset[side],axisTitleMargin+titleOffset+directionFactor*offset);}
+function render(){var axisTitleOptions=options.title,stackLabelOptions=options.stackLabels,alternateGridColor=options.alternateGridColor,lineWidth=options.lineWidth,lineLeft,lineTop,linePath,hasRendered=chart.hasRendered,slideInTicks=hasRendered&&defined(oldMin)&&!isNaN(oldMin),hasData=associatedSeries.length&&defined(min)&&defined(max);axisLength=horiz?plotWidth:plotHeight;transA=axisLength/((max-min)||1);transB=horiz?plotLeft:marginBottom;if(hasData||isLinked){if(minorTickInterval&&!categories){var pos=min+(tickPositions[0]-min)%minorTickInterval;for(pos;pos<=max;pos+=minorTickInterval){if(!minorTicks[pos]){minorTicks[pos]=new Tick(pos,true);}
+if(slideInTicks&&minorTicks[pos].isNew){minorTicks[pos].render(null,true);}
+minorTicks[pos].isActive=true;minorTicks[pos].render();}}
+each(tickPositions,function(pos,i){if(!isLinked||(pos>=min&&pos<=max)){if(slideInTicks&&ticks[pos].isNew){ticks[pos].render(i,true);}
+ticks[pos].isActive=true;ticks[pos].render(i);}});if(alternateGridColor){each(tickPositions,function(pos,i){if(i%2===0&&pos<max){if(!alternateBands[pos]){alternateBands[pos]=new PlotLineOrBand();}
+alternateBands[pos].options={from:pos,to:tickPositions[i+1]!==UNDEFINED?tickPositions[i+1]:max,color:alternateGridColor};alternateBands[pos].render();alternateBands[pos].isActive=true;}});}
+if(!hasRendered){each((options.plotLines||[]).concat(options.plotBands||[]),function(plotLineOptions){plotLinesAndBands.push(new PlotLineOrBand(plotLineOptions).render());});}}
+each([ticks,minorTicks,alternateBands],function(coll){var pos;for(pos in coll){if(!coll[pos].isActive){coll[pos].destroy();delete coll[pos];}else{coll[pos].isActive=false;}}});if(lineWidth){lineLeft=plotLeft+(opposite?plotWidth:0)+offset;lineTop=chartHeight-marginBottom-(opposite?plotHeight:0)+offset;linePath=renderer.crispLine([M,horiz?plotLeft:lineLeft,horiz?lineTop:plotTop,L,horiz?chartWidth-marginRight:lineLeft,horiz?lineTop:chartHeight-marginBottom],lineWidth);if(!axisLine){axisLine=renderer.path(linePath).attr({stroke:options.lineColor,'stroke-width':lineWidth,zIndex:7}).add();}else{axisLine.animate({d:linePath});}}
+if(axis.axisTitle){var margin=horiz?plotLeft:plotTop,fontSize=pInt(axisTitleOptions.style.fontSize||12),alongAxis={low:margin+(horiz?0:axisLength),middle:margin+axisLength/2,high:margin+(horiz?axisLength:0)}[axisTitleOptions.align],offAxis=(horiz?plotTop+plotHeight:plotLeft)+
+(horiz?1:-1)*(opposite?-1:1)*axisTitleMargin+
+(side===2?fontSize:0);axis.axisTitle[hasRendered?'animate':'attr']({x:horiz?alongAxis:offAxis+(opposite?plotWidth:0)+offset+
+(axisTitleOptions.x||0),y:horiz?offAxis-(opposite?plotHeight:0)+offset:alongAxis+(axisTitleOptions.y||0)});}
+if(stackLabelOptions&&stackLabelOptions.enabled){var stackKey,oneStack,stackCategory,stackTotalGroup=axis.stackTotalGroup;if(!stackTotalGroup){axis.stackTotalGroup=stackTotalGroup=renderer.g('stack-labels').attr({visibility:VISIBLE,zIndex:6}).translate(plotLeft,plotTop).add();}
+for(stackKey in stacks){oneStack=stacks[stackKey];for(stackCategory in oneStack){oneStack[stackCategory].render(stackTotalGroup);}}}
+axis.isDirty=false;}
+function removePlotBandOrLine(id){var i=plotLinesAndBands.length;while(i--){if(plotLinesAndBands[i].id===id){plotLinesAndBands[i].destroy();}}}
+function redraw(){if(tracker.resetTracker){tracker.resetTracker();}
+render();each(plotLinesAndBands,function(plotLine){plotLine.render();});each(associatedSeries,function(series){series.isDirty=true;});}
+function setCategories(newCategories,doRedraw){axis.categories=categories=newCategories;each(associatedSeries,function(series){series.translate();series.setTooltipPoints(true);});axis.isDirty=true;if(pick(doRedraw,true)){chart.redraw();}}
+if(inverted&&isXAxis&&reversed===UNDEFINED){reversed=true;}
+extend(axis,{addPlotBand:addPlotBandOrLine,addPlotLine:addPlotBandOrLine,adjustTickAmount:adjustTickAmount,categories:categories,getExtremes:getExtremes,getPlotLinePath:getPlotLinePath,getThreshold:getThreshold,isXAxis:isXAxis,options:options,plotLinesAndBands:plotLinesAndBands,getOffset:getOffset,render:render,setCategories:setCategories,setExtremes:setExtremes,setScale:setScale,setTickPositions:setTickPositions,translate:translate,redraw:redraw,removePlotBand:removePlotBandOrLine,removePlotLine:removePlotBandOrLine,reversed:reversed,stacks:stacks});for(eventType in events){addEvent(axis,eventType,events[eventType]);}
+setScale();}
+function Toolbar(chart){var buttons={};function add(id,text,title,fn){if(!buttons[id]){var button=renderer.text(text,0,0).css(options.toolbar.itemStyle).align({align:'right',x:-marginRight-20,y:plotTop+30}).on('click',fn).attr({align:'right',zIndex:20}).add();buttons[id]=button;}}
+function remove(id){discardElement(buttons[id].element);buttons[id]=null;}
+return{add:add,remove:remove};}
+function Tooltip(options){var currentSeries,borderWidth=options.borderWidth,crosshairsOptions=options.crosshairs,crosshairs=[],style=options.style,shared=options.shared,padding=pInt(style.padding),boxOffLeft=borderWidth+padding,tooltipIsHidden=true,boxWidth,boxHeight,currentX=0,currentY=0;style.padding=0;var group=renderer.g('tooltip').attr({zIndex:8}).add(),box=renderer.rect(boxOffLeft,boxOffLeft,0,0,options.borderRadius,borderWidth).attr({fill:options.backgroundColor,'stroke-width':borderWidth}).add(group).shadow(options.shadow),label=renderer.text('',padding+boxOffLeft,pInt(style.fontSize)+padding+boxOffLeft).attr({zIndex:1}).css(style).add(group);group.hide();function defaultFormatter(){var pThis=this,items=pThis.points||splat(pThis),xAxis=items[0].series.xAxis,x=pThis.x,isDateTime=xAxis&&xAxis.options.type==='datetime',useHeader=isString(x)||isDateTime,series,s;s=useHeader?['<span style="font-size: 10px">'+
+(isDateTime?dateFormat('%A, %b %e, %Y',x):x)+'</span>']:[];each(items,function(item){s.push(item.point.tooltipFormatter(useHeader));});return s.join('<br/>');}
+function move(finalX,finalY){currentX=tooltipIsHidden?finalX:(2*currentX+finalX)/3;currentY=tooltipIsHidden?finalY:(currentY+finalY)/2;group.translate(currentX,currentY);if(mathAbs(finalX-currentX)>1||mathAbs(finalY-currentY)>1){tooltipTick=function(){move(finalX,finalY);};}else{tooltipTick=null;}}
+function hide(){if(!tooltipIsHidden){var hoverPoints=chart.hoverPoints;group.hide();each(crosshairs,function(crosshair){if(crosshair){crosshair.hide();}});if(hoverPoints){each(hoverPoints,function(point){point.setState();});}
+chart.hoverPoints=null;tooltipIsHidden=true;}}
+function refresh(point){var x,y,boxX,boxY,show,bBox,plotX,plotY=0,textConfig={},text,pointConfig=[],tooltipPos=point.tooltipPos,formatter=options.formatter||defaultFormatter,hoverPoints=chart.hoverPoints;if(shared){if(hoverPoints){each(hoverPoints,function(point){point.setState();});}
+chart.hoverPoints=point;each(point,function(item,i){item.setState(HOVER_STATE);plotY+=item.plotY;pointConfig.push(item.getLabelConfig());});plotX=point[0].plotX;plotY=mathRound(plotY)/point.length;textConfig={x:point[0].category};textConfig.points=pointConfig;point=point[0];}else{textConfig=point.getLabelConfig();}
+text=formatter.call(textConfig);currentSeries=point.series;plotX=shared?plotX:point.plotX;plotY=shared?plotY:point.plotY;x=mathRound(tooltipPos?tooltipPos[0]:(inverted?plotWidth-plotY:plotX));y=mathRound(tooltipPos?tooltipPos[1]:(inverted?plotHeight-plotX:plotY));show=shared||!point.series.isCartesian||isInsidePlot(x,y);if(text===false||!show){hide();}else{if(tooltipIsHidden){group.show();tooltipIsHidden=false;}
+label.attr({text:text});bBox=label.getBBox();boxWidth=bBox.width+2*padding;boxHeight=bBox.height+2*padding;box.attr({width:boxWidth,height:boxHeight,stroke:options.borderColor||point.color||currentSeries.color||'#606060'});boxX=x-boxWidth+plotLeft-25;boxY=y-boxHeight+plotTop+10;if(boxX<7){boxX=7;boxY-=30;}
+if(boxY<5){boxY=5;}else if(boxY+boxHeight>chartHeight){boxY=chartHeight-boxHeight-5;}
+move(mathRound(boxX-boxOffLeft),mathRound(boxY-boxOffLeft));}
+if(crosshairsOptions){crosshairsOptions=splat(crosshairsOptions);var path,i=crosshairsOptions.length,attribs,axis;while(i--){axis=point.series[i?'yAxis':'xAxis'];if(crosshairsOptions[i]&&axis){path=axis.getPlotLinePath(point[i?'y':'x'],1);if(crosshairs[i]){crosshairs[i].attr({d:path,visibility:VISIBLE});}else{attribs={'stroke-width':crosshairsOptions[i].width||1,stroke:crosshairsOptions[i].color||'#C0C0C0',zIndex:2};if(crosshairsOptions[i].dashStyle){attribs.dashstyle=crosshairsOptions[i].dashStyle;}
+crosshairs[i]=renderer.path(path).attr(attribs).add();}}}}}
+return{shared:shared,refresh:refresh,hide:hide};}
+function MouseTracker(chart,options){var mouseDownX,mouseDownY,hasDragged,selectionMarker,zoomType=optionsChart.zoomType,zoomX=/x/.test(zoomType),zoomY=/y/.test(zoomType),zoomHor=(zoomX&&!inverted)||(zoomY&&inverted),zoomVert=(zoomY&&!inverted)||(zoomX&&inverted);function normalizeMouseEvent(e){var ePos,pageZoomFix=isWebKit&&doc.width/doc.documentElement.clientWidth-1,chartPosLeft,chartPosTop,chartX,chartY;e=e||win.event;if(!e.target){e.target=e.srcElement;}
+ePos=e.touches?e.touches.item(0):e;if(e.type!=='mousemove'||win.opera||pageZoomFix){chartPosition=getPosition(container);chartPosLeft=chartPosition.left;chartPosTop=chartPosition.top;}
+if(isIE){chartX=e.x;chartY=e.y;}else{if(ePos.layerX===UNDEFINED){chartX=ePos.pageX-chartPosLeft;chartY=ePos.pageY-chartPosTop;}else{chartX=e.layerX;chartY=e.layerY;}}
+if(pageZoomFix){chartX+=mathRound((pageZoomFix+1)*chartPosLeft-chartPosLeft);chartY+=mathRound((pageZoomFix+1)*chartPosTop-chartPosTop);}
+return extend(e,{chartX:chartX,chartY:chartY});}
+function getMouseCoordinates(e){var coordinates={xAxis:[],yAxis:[]};each(axes,function(axis,i){var translate=axis.translate,isXAxis=axis.isXAxis,isHorizontal=inverted?!isXAxis:isXAxis;coordinates[isXAxis?'xAxis':'yAxis'].push({axis:axis,value:translate(isHorizontal?e.chartX-plotLeft:plotHeight-e.chartY+plotTop,true)});});return coordinates;}
+function onmousemove(e){var point,points,hoverPoint=chart.hoverPoint,hoverSeries=chart.hoverSeries,i,j,distance=chartWidth,index=inverted?e.chartY:e.chartX-plotLeft;if(tooltip&&options.shared){points=[];i=series.length;for(j=0;j<i;j++){if(series[j].visible&&series[j].tooltipPoints.length){point=series[j].tooltipPoints[index];point._dist=mathAbs(index-point.plotX);distance=mathMin(distance,point._dist);points.push(point);}}
+i=points.length;while(i--){if(points[i]._dist>distance){points.splice(i,1);}}
+if(points.length&&(points[0].plotX!==hoverX)){tooltip.refresh(points);hoverX=points[0].plotX;}}
+if(hoverSeries&&hoverSeries.tracker){point=hoverSeries.tooltipPoints[index];if(point&&point!==hoverPoint){point.onMouseOver();}}}
+function resetTracker(){var hoverSeries=chart.hoverSeries,hoverPoint=chart.hoverPoint;if(hoverPoint){hoverPoint.onMouseOut();}
+if(hoverSeries){hoverSeries.onMouseOut();}
+if(tooltip){tooltip.hide();}
+hoverX=null;}
+function drop(){if(selectionMarker){var selectionData={xAxis:[],yAxis:[]},selectionBox=selectionMarker.getBBox(),selectionLeft=selectionBox.x-plotLeft,selectionTop=selectionBox.y-plotTop;if(hasDragged){each(axes,function(axis,i){var translate=axis.translate,isXAxis=axis.isXAxis,isHorizontal=inverted?!isXAxis:isXAxis,selectionMin=translate(isHorizontal?selectionLeft:plotHeight-selectionTop-selectionBox.height,true,0,0,1),selectionMax=translate(isHorizontal?selectionLeft+selectionBox.width:plotHeight-selectionTop,true,0,0,1);selectionData[isXAxis?'xAxis':'yAxis'].push({axis:axis,min:mathMin(selectionMin,selectionMax),max:mathMax(selectionMin,selectionMax)});});fireEvent(chart,'selection',selectionData,zoom);}
+selectionMarker=selectionMarker.destroy();}
+chart.mouseIsDown=mouseIsDown=hasDragged=false;removeEvent(doc,hasTouch?'touchend':'mouseup',drop);}
+function setDOMEvents(){var lastWasOutsidePlot=true;container.onmousedown=function(e){e=normalizeMouseEvent(e);chart.mouseIsDown=mouseIsDown=true;mouseDownX=e.chartX;mouseDownY=e.chartY;addEvent(doc,hasTouch?'touchend':'mouseup',drop);};var mouseMove=function(e){if(e&&e.touches&&e.touches.length>1){return;}
+e=normalizeMouseEvent(e);if(!hasTouch){e.returnValue=false;}
+var chartX=e.chartX,chartY=e.chartY,isOutsidePlot=!isInsidePlot(chartX-plotLeft,chartY-plotTop);if(hasTouch&&e.type==='touchstart'){if(attr(e.target,'isTracker')){if(!chart.runTrackerClick){e.preventDefault();}}else if(!runChartClick&&!isOutsidePlot){e.preventDefault();}}
+if(isOutsidePlot){if(!lastWasOutsidePlot){resetTracker();}
+if(chartX<plotLeft){chartX=plotLeft;}else if(chartX>plotLeft+plotWidth){chartX=plotLeft+plotWidth;}
+if(chartY<plotTop){chartY=plotTop;}else if(chartY>plotTop+plotHeight){chartY=plotTop+plotHeight;}}
+if(mouseIsDown&&e.type!=='touchstart'){hasDragged=Math.sqrt(Math.pow(mouseDownX-chartX,2)+
+Math.pow(mouseDownY-chartY,2));if(hasDragged>10){if(hasCartesianSeries&&(zoomX||zoomY)&&isInsidePlot(mouseDownX-plotLeft,mouseDownY-plotTop)){if(!selectionMarker){selectionMarker=renderer.rect(plotLeft,plotTop,zoomHor?1:plotWidth,zoomVert?1:plotHeight,0).attr({fill:'rgba(69,114,167,0.25)',zIndex:7}).add();}}
+if(selectionMarker&&zoomHor){var xSize=chartX-mouseDownX;selectionMarker.attr({width:mathAbs(xSize),x:(xSize>0?0:xSize)+mouseDownX});}
+if(selectionMarker&&zoomVert){var ySize=chartY-mouseDownY;selectionMarker.attr({height:mathAbs(ySize),y:(ySize>0?0:ySize)+mouseDownY});}}}else if(!isOutsidePlot){onmousemove(e);}
+lastWasOutsidePlot=isOutsidePlot;return isOutsidePlot||!hasCartesianSeries;};container.onmousemove=mouseMove;addEvent(container,'mouseleave',resetTracker);container.ontouchstart=function(e){if(zoomX||zoomY){container.onmousedown(e);}
+mouseMove(e);};container.ontouchmove=mouseMove;container.ontouchend=function(){if(hasDragged){resetTracker();}};container.onclick=function(e){var hoverPoint=chart.hoverPoint;e=normalizeMouseEvent(e);e.cancelBubble=true;if(!hasDragged){if(hoverPoint&&attr(e.target,'isTracker')){var plotX=hoverPoint.plotX,plotY=hoverPoint.plotY;extend(hoverPoint,{pageX:chartPosition.left+plotLeft+
+(inverted?plotWidth-plotY:plotX),pageY:chartPosition.top+plotTop+
+(inverted?plotHeight-plotX:plotY)});fireEvent(hoverPoint.series,'click',extend(e,{point:hoverPoint}));hoverPoint.firePointEvent('click',e);}else{extend(e,getMouseCoordinates(e));if(isInsidePlot(e.chartX-plotLeft,e.chartY-plotTop)){fireEvent(chart,'click',e);}}}
+hasDragged=false;};}
+placeTrackerGroup=function(){if(!trackerGroup){chart.trackerGroup=trackerGroup=renderer.g('tracker').attr({zIndex:9}).add();}else{trackerGroup.translate(plotLeft,plotTop);if(inverted){trackerGroup.attr({width:chart.plotWidth,height:chart.plotHeight}).invert();}}};placeTrackerGroup();if(options.enabled){chart.tooltip=tooltip=Tooltip(options);}
+setDOMEvents();tooltipInterval=setInterval(function(){if(tooltipTick){tooltipTick();}},32);extend(this,{zoomX:zoomX,zoomY:zoomY,resetTracker:resetTracker});}
+var Legend=function(chart){var options=chart.options.legend;if(!options.enabled){return;}
+var horizontal=options.layout==='horizontal',symbolWidth=options.symbolWidth,symbolPadding=options.symbolPadding,allItems,style=options.style,itemStyle=options.itemStyle,itemHoverStyle=options.itemHoverStyle,itemHiddenStyle=options.itemHiddenStyle,padding=pInt(style.padding),rightPadding=20,y=18,initialItemX=4+padding+symbolWidth+symbolPadding,itemX,itemY,lastItemY,itemHeight=0,box,legendBorderWidth=options.borderWidth,legendBackgroundColor=options.backgroundColor,legendGroup,offsetWidth,widthOption=options.width,series=chart.series,reversedLegend=options.reversed;function colorizeItem(item,visible){var legendItem=item.legendItem,legendLine=item.legendLine,legendSymbol=item.legendSymbol,hiddenColor=itemHiddenStyle.color,textColor=visible?options.itemStyle.color:hiddenColor,lineColor=visible?item.color:hiddenColor,symbolAttr=visible?item.pointAttr[NORMAL_STATE]:{stroke:hiddenColor,fill:hiddenColor};if(legendItem){legendItem.css({fill:textColor});}
+if(legendLine){legendLine.attr({stroke:lineColor});}
+if(legendSymbol){legendSymbol.attr(symbolAttr);}}
+function positionItem(item,itemX,itemY){var legendItem=item.legendItem,legendLine=item.legendLine,legendSymbol=item.legendSymbol,checkbox=item.checkbox;if(legendItem){legendItem.attr({x:itemX,y:itemY});}
+if(legendLine){legendLine.translate(itemX,itemY-4);}
+if(legendSymbol){legendSymbol.attr({x:itemX+legendSymbol.xOff,y:itemY+legendSymbol.yOff});}
+if(checkbox){checkbox.x=itemX;checkbox.y=itemY;}}
+function destroyItem(item){var checkbox=item.checkbox;each(['legendItem','legendLine','legendSymbol'],function(key){if(item[key]){item[key].destroy();}});if(checkbox){discardElement(item.checkbox);}}
+function positionCheckboxes(){each(allItems,function(item){var checkbox=item.checkbox,alignAttr=legendGroup.alignAttr;if(checkbox){css(checkbox,{left:(alignAttr.translateX+item.legendItemWidth+checkbox.x-40)+PX,top:(alignAttr.translateY+checkbox.y-11)+PX});}});}
+function renderItem(item){var bBox,itemWidth,legendSymbol,symbolX,symbolY,attribs,simpleSymbol,li=item.legendItem,series=item.series||item,i=allItems.length,itemOptions=series.options,strokeWidth=(itemOptions&&itemOptions.borderWidth)||0;if(!li){simpleSymbol=/^(bar|pie|area|column)$/.test(series.type);item.legendItem=li=renderer.text(options.labelFormatter.call(item),0,0).css(item.visible?itemStyle:itemHiddenStyle).on('mouseover',function(){item.setState(HOVER_STATE);li.css(itemHoverStyle);}).on('mouseout',function(){li.css(item.visible?itemStyle:itemHiddenStyle);item.setState();}).on('click',function(event){var strLegendItemClick='legendItemClick',fnLegendItemClick=function(){item.setVisible();};if(item.firePointEvent){item.firePointEvent(strLegendItemClick,null,fnLegendItemClick);}else{fireEvent(item,strLegendItemClick,null,fnLegendItemClick);}}).attr({zIndex:2}).add(legendGroup);if(!simpleSymbol&&itemOptions&&itemOptions.lineWidth){var attrs={'stroke-width':itemOptions.lineWidth,zIndex:2};if(itemOptions.dashStyle){attrs.dashstyle=itemOptions.dashStyle;}
+item.legendLine=renderer.path([M,-symbolWidth-symbolPadding,0,L,-symbolPadding,0]).attr(attrs).add(legendGroup);}
+if(simpleSymbol){legendSymbol=renderer.rect((symbolX=-symbolWidth-symbolPadding),(symbolY=-11),symbolWidth,12,2).attr({zIndex:3}).add(legendGroup);}
+else if(itemOptions&&itemOptions.marker&&itemOptions.marker.enabled){legendSymbol=renderer.symbol(item.symbol,(symbolX=-symbolWidth/2-symbolPadding),(symbolY=-4),itemOptions.marker.radius).attr({zIndex:3}).add(legendGroup);}
+if(legendSymbol){legendSymbol.xOff=symbolX+(strokeWidth%2/2);legendSymbol.yOff=symbolY+(strokeWidth%2/2);}
+item.legendSymbol=legendSymbol;colorizeItem(item,item.visible);if(itemOptions&&itemOptions.showCheckbox){item.checkbox=createElement('input',{type:'checkbox',checked:item.selected,defaultChecked:item.selected},options.itemCheckboxStyle,container);addEvent(item.checkbox,'click',function(event){var target=event.target;fireEvent(item,'checkboxClick',{checked:target.checked},function(){item.select();});});}}
+bBox=li.getBBox();itemWidth=item.legendItemWidth=options.itemWidth||symbolWidth+symbolPadding+bBox.width+rightPadding;itemHeight=bBox.height;if(horizontal&&itemX-initialItemX+itemWidth>(widthOption||(chartWidth-2*padding-initialItemX))){itemX=initialItemX;itemY+=itemHeight;}
+lastItemY=itemY;positionItem(item,itemX,itemY);if(horizontal){itemX+=itemWidth;}else{itemY+=itemHeight;}
+offsetWidth=widthOption||mathMax(horizontal?itemX-initialItemX:itemWidth,offsetWidth);}
+function renderLegend(){itemX=initialItemX;itemY=y;offsetWidth=0;lastItemY=0;if(!legendGroup){legendGroup=renderer.g('legend').attr({zIndex:7}).add();}
+allItems=[];each(series,function(serie){var seriesOptions=serie.options;if(!seriesOptions.showInLegend){return;}
+allItems=allItems.concat(seriesOptions.legendType==='point'?serie.data:serie);});allItems.sort(function(a,b){return(a.options.legendIndex||0)-(b.options.legendIndex||0);});if(reversedLegend){allItems.reverse();}
+each(allItems,renderItem);legendWidth=widthOption||offsetWidth;legendHeight=lastItemY-y+itemHeight;if(legendBorderWidth||legendBackgroundColor){legendWidth+=2*padding;legendHeight+=2*padding;if(!box){box=renderer.rect(0,0,legendWidth,legendHeight,options.borderRadius,legendBorderWidth||0).attr({stroke:options.borderColor,'stroke-width':legendBorderWidth||0,fill:legendBackgroundColor||NONE}).add(legendGroup).shadow(options.shadow);}else if(legendWidth>0&&legendHeight>0){box.animate(box.crisp(null,null,null,legendWidth,legendHeight));}
+box[allItems.length?'show':'hide']();}
+var props=['left','right','top','bottom'],prop,i=4;while(i--){prop=props[i];if(style[prop]&&style[prop]!=='auto'){options[i<2?'align':'verticalAlign']=prop;options[i<2?'x':'y']=pInt(style[prop])*(i%2?-1:1);}}
+legendGroup.align(extend(options,{width:legendWidth,height:legendHeight}),true,spacingBox);if(!isResizing){positionCheckboxes();}}
+renderLegend();addEvent(chart,'endResize',positionCheckboxes);return{colorizeItem:colorizeItem,destroyItem:destroyItem,renderLegend:renderLegend};};function initSeries(options){var type=options.type||optionsChart.type||optionsChart.defaultSeriesType,typeClass=seriesTypes[type],serie,hasRendered=chart.hasRendered;if(hasRendered){if(inverted&&type==='column'){typeClass=seriesTypes.bar;}else if(!inverted&&type==='bar'){typeClass=seriesTypes.column;}}
+serie=new typeClass();serie.init(chart,options);if(!hasRendered&&serie.inverted){inverted=true;}
+if(serie.isCartesian){hasCartesianSeries=serie.isCartesian;}
+series.push(serie);return serie;}
+function addSeries(options,redraw,animation){var series;if(options){setAnimation(animation,chart);redraw=pick(redraw,true);fireEvent(chart,'addSeries',{options:options},function(){series=initSeries(options);series.isDirty=true;chart.isDirtyLegend=true;if(redraw){chart.redraw();}});}
+return series;}
+isInsidePlot=function(x,y){return x>=0&&x<=plotWidth&&y>=0&&y<=plotHeight;};function adjustTickAmounts(){if(optionsChart.alignTicks!==false){each(axes,function(axis){axis.adjustTickAmount();});}
+maxTicks=null;}
+function redraw(animation){var redrawLegend=chart.isDirtyLegend,hasStackedSeries,isDirtyBox=chart.isDirtyBox,seriesLength=series.length,i=seriesLength,clipRect=chart.clipRect,serie;setAnimation(animation,chart);while(i--){serie=series[i];if(serie.isDirty&&serie.options.stacking){hasStackedSeries=true;break;}}
+if(hasStackedSeries){i=seriesLength;while(i--){serie=series[i];if(serie.options.stacking){serie.isDirty=true;}}}
+each(series,function(serie){if(serie.isDirty){serie.cleanData();serie.getSegments();if(serie.options.legendType==='point'){redrawLegend=true;}}});if(redrawLegend&&legend.renderLegend){legend.renderLegend();chart.isDirtyLegend=false;}
+if(hasCartesianSeries){if(!isResizing){maxTicks=null;each(axes,function(axis){axis.setScale();});}
+adjustTickAmounts();getMargins();each(axes,function(axis){if(axis.isDirty||isDirtyBox){axis.redraw();isDirtyBox=true;}});}
+if(isDirtyBox){drawChartBox();placeTrackerGroup();if(clipRect){stop(clipRect);clipRect.animate({width:chart.plotSizeX,height:chart.plotSizeY});}}
+each(series,function(serie){if(serie.isDirty&&serie.visible&&(!serie.isCartesian||serie.xAxis)){serie.redraw();}});if(tracker&&tracker.resetTracker){tracker.resetTracker();}
+fireEvent(chart,'redraw');}
+function showLoading(str){var loadingOptions=options.loading;if(!loadingDiv){loadingDiv=createElement(DIV,{className:'highcharts-loading'},extend(loadingOptions.style,{left:plotLeft+PX,top:plotTop+PX,width:plotWidth+PX,height:plotHeight+PX,zIndex:10,display:NONE}),container);loadingSpan=createElement('span',null,loadingOptions.labelStyle,loadingDiv);}
+loadingSpan.innerHTML=str||options.lang.loading;if(!loadingShown){css(loadingDiv,{opacity:0,display:''});animate(loadingDiv,{opacity:loadingOptions.style.opacity},{duration:loadingOptions.showDuration});loadingShown=true;}}
+function hideLoading(){animate(loadingDiv,{opacity:0},{duration:options.loading.hideDuration,complete:function(){css(loadingDiv,{display:NONE});}});loadingShown=false;}
+function get(id){var i,j,data;for(i=0;i<axes.length;i++){if(axes[i].options.id===id){return axes[i];}}
+for(i=0;i<series.length;i++){if(series[i].options.id===id){return series[i];}}
+for(i=0;i<series.length;i++){data=series[i].data;for(j=0;j<data.length;j++){if(data[j].id===id){return data[j];}}}
+return null;}
+function getAxes(){var xAxisOptions=options.xAxis||{},yAxisOptions=options.yAxis||{},axis;xAxisOptions=splat(xAxisOptions);each(xAxisOptions,function(axis,i){axis.index=i;axis.isX=true;});yAxisOptions=splat(yAxisOptions);each(yAxisOptions,function(axis,i){axis.index=i;});axes=xAxisOptions.concat(yAxisOptions);chart.xAxis=[];chart.yAxis=[];axes=map(axes,function(axisOptions){axis=new Axis(chart,axisOptions);chart[axis.isXAxis?'xAxis':'yAxis'].push(axis);return axis;});adjustTickAmounts();}
+function getSelectedPoints(){var points=[];each(series,function(serie){points=points.concat(grep(serie.data,function(point){return point.selected;}));});return points;}
+function getSelectedSeries(){return grep(series,function(serie){return serie.selected;});}
+zoomOut=function(){fireEvent(chart,'selection',{resetSelection:true},zoom);chart.toolbar.remove('zoom');};zoom=function(event){var lang=defaultOptions.lang,animate=chart.pointCount<100;chart.toolbar.add('zoom',lang.resetZoom,lang.resetZoomTitle,zoomOut);if(!event||event.resetSelection){each(axes,function(axis){axis.setExtremes(null,null,false,animate);});}
+else{each(event.xAxis.concat(event.yAxis),function(axisData){var axis=axisData.axis;if(chart.tracker[axis.isXAxis?'zoomX':'zoomY']){axis.setExtremes(axisData.min,axisData.max,false,animate);}});}
+redraw();};function setTitle(titleOptions,subtitleOptions){chartTitleOptions=merge(options.title,titleOptions);chartSubtitleOptions=merge(options.subtitle,subtitleOptions);each([['title',titleOptions,chartTitleOptions],['subtitle',subtitleOptions,chartSubtitleOptions]],function(arr){var name=arr[0],title=chart[name],titleOptions=arr[1],chartTitleOptions=arr[2];if(title&&titleOptions){title.destroy();title=null;}
+if(chartTitleOptions&&chartTitleOptions.text&&!title){chart[name]=renderer.text(chartTitleOptions.text,0,0).attr({align:chartTitleOptions.align,'class':'highcharts-'+name,zIndex:1}).css(chartTitleOptions.style).add().align(chartTitleOptions,false,spacingBox);}});}
+function getChartSize(){containerWidth=(renderToClone||renderTo).offsetWidth;containerHeight=(renderToClone||renderTo).offsetHeight;chart.chartWidth=chartWidth=optionsChart.width||containerWidth||600;chart.chartHeight=chartHeight=optionsChart.height||(containerHeight>19?containerHeight:400);}
+function getContainer(){renderTo=optionsChart.renderTo;containerId=PREFIX+idCounter++;if(isString(renderTo)){renderTo=doc.getElementById(renderTo);}
+renderTo.innerHTML='';if(!renderTo.offsetWidth){renderToClone=renderTo.cloneNode(0);css(renderToClone,{position:ABSOLUTE,top:'-9999px',display:''});doc.body.appendChild(renderToClone);}
+getChartSize();chart.container=container=createElement(DIV,{className:'highcharts-container'+
+(optionsChart.className?' '+optionsChart.className:''),id:containerId},extend({position:RELATIVE,overflow:HIDDEN,width:chartWidth+PX,height:chartHeight+PX,textAlign:'left'},optionsChart.style),renderToClone||renderTo);chart.renderer=renderer=optionsChart.forExport?new SVGRenderer(container,chartWidth,chartHeight,true):new Renderer(container,chartWidth,chartHeight);var subPixelFix,rect;if(isFirefox&&container.getBoundingClientRect){subPixelFix=function(){css(container,{left:0,top:0});rect=container.getBoundingClientRect();css(container,{left:(-(rect.left-pInt(rect.left)))+PX,top:(-(rect.top-pInt(rect.top)))+PX});};subPixelFix();addEvent(win,'resize',subPixelFix);addEvent(chart,'destroy',function(){removeEvent(win,'resize',subPixelFix);});}}
+getMargins=function(){var legendOptions=options.legend,legendMargin=pick(legendOptions.margin,10),legendX=legendOptions.x,legendY=legendOptions.y,align=legendOptions.align,verticalAlign=legendOptions.verticalAlign,titleOffset;resetMargins();if((chart.title||chart.subtitle)&&!defined(optionsMarginTop)){titleOffset=mathMax((chart.title&&!chartTitleOptions.floating&&!chartTitleOptions.verticalAlign&&chartTitleOptions.y)||0,(chart.subtitle&&!chartSubtitleOptions.floating&&!chartSubtitleOptions.verticalAlign&&chartSubtitleOptions.y)||0);if(titleOffset){plotTop=mathMax(plotTop,titleOffset+pick(chartTitleOptions.margin,15)+spacingTop);}}
+if(legendOptions.enabled&&!legendOptions.floating){if(align==='right'){if(!defined(optionsMarginRight)){marginRight=mathMax(marginRight,legendWidth-legendX+legendMargin+spacingRight);}}else if(align==='left'){if(!defined(optionsMarginLeft)){plotLeft=mathMax(plotLeft,legendWidth+legendX+legendMargin+spacingLeft);}}else if(verticalAlign==='top'){if(!defined(optionsMarginTop)){plotTop=mathMax(plotTop,legendHeight+legendY+legendMargin+spacingTop);}}else if(verticalAlign==='bottom'){if(!defined(optionsMarginBottom)){marginBottom=mathMax(marginBottom,legendHeight-legendY+legendMargin+spacingBottom);}}}
+if(hasCartesianSeries){each(axes,function(axis){axis.getOffset();});}
+if(!defined(optionsMarginLeft)){plotLeft+=axisOffset[3];}
+if(!defined(optionsMarginTop)){plotTop+=axisOffset[0];}
+if(!defined(optionsMarginBottom)){marginBottom+=axisOffset[2];}
+if(!defined(optionsMarginRight)){marginRight+=axisOffset[1];}
+setChartSize();};function initReflow(){var reflowTimeout;function reflow(){var width=optionsChart.width||renderTo.offsetWidth,height=optionsChart.height||renderTo.offsetHeight;if(width&&height){if(width!==containerWidth||height!==containerHeight){clearTimeout(reflowTimeout);reflowTimeout=setTimeout(function(){resize(width,height,false);},100);}
+containerWidth=width;containerHeight=height;}}
+addEvent(win,'resize',reflow);addEvent(chart,'destroy',function(){removeEvent(win,'resize',reflow);});}
+resize=function(width,height,animation){var chartTitle=chart.title,chartSubtitle=chart.subtitle;isResizing+=1;setAnimation(animation,chart);oldChartHeight=chartHeight;oldChartWidth=chartWidth;chart.chartWidth=chartWidth=mathRound(width);chart.chartHeight=chartHeight=mathRound(height);css(container,{width:chartWidth+PX,height:chartHeight+PX});renderer.setSize(chartWidth,chartHeight,animation);plotWidth=chartWidth-plotLeft-marginRight;plotHeight=chartHeight-plotTop-marginBottom;maxTicks=null;each(axes,function(axis){axis.isDirty=true;axis.setScale();});each(series,function(serie){serie.isDirty=true;});chart.isDirtyLegend=true;chart.isDirtyBox=true;getMargins();if(chartTitle){chartTitle.align(null,null,spacingBox);}
+if(chartSubtitle){chartSubtitle.align(null,null,spacingBox);}
+redraw(animation);oldChartHeight=null;fireEvent(chart,'resize');setTimeout(function(){fireEvent(chart,'endResize',null,function(){isResizing-=1;});},(globalAnimation&&globalAnimation.duration)||500);};setChartSize=function(){chart.plotLeft=plotLeft=mathRound(plotLeft);chart.plotTop=plotTop=mathRound(plotTop);chart.plotWidth=plotWidth=mathRound(chartWidth-plotLeft-marginRight);chart.plotHeight=plotHeight=mathRound(chartHeight-plotTop-marginBottom);chart.plotSizeX=inverted?plotHeight:plotWidth;chart.plotSizeY=inverted?plotWidth:plotHeight;spacingBox={x:spacingLeft,y:spacingTop,width:chartWidth-spacingLeft-spacingRight,height:chartHeight-spacingTop-spacingBottom};};resetMargins=function(){plotTop=pick(optionsMarginTop,spacingTop);marginRight=pick(optionsMarginRight,spacingRight);marginBottom=pick(optionsMarginBottom,spacingBottom);plotLeft=pick(optionsMarginLeft,spacingLeft);axisOffset=[0,0,0,0];};drawChartBox=function(){var chartBorderWidth=optionsChart.borderWidth||0,chartBackgroundColor=optionsChart.backgroundColor,plotBackgroundColor=optionsChart.plotBackgroundColor,plotBackgroundImage=optionsChart.plotBackgroundImage,mgn,plotSize={x:plotLeft,y:plotTop,width:plotWidth,height:plotHeight};mgn=chartBorderWidth+(optionsChart.shadow?8:0);if(chartBorderWidth||chartBackgroundColor){if(!chartBackground){chartBackground=renderer.rect(mgn/2,mgn/2,chartWidth-mgn,chartHeight-mgn,optionsChart.borderRadius,chartBorderWidth).attr({stroke:optionsChart.borderColor,'stroke-width':chartBorderWidth,fill:chartBackgroundColor||NONE}).add().shadow(optionsChart.shadow);}else{chartBackground.animate(chartBackground.crisp(null,null,null,chartWidth-mgn,chartHeight-mgn));}}
+if(plotBackgroundColor){if(!plotBackground){plotBackground=renderer.rect(plotLeft,plotTop,plotWidth,plotHeight,0).attr({fill:plotBackgroundColor}).add().shadow(optionsChart.plotShadow);}else{plotBackground.animate(plotSize);}}
+if(plotBackgroundImage){if(!plotBGImage){plotBGImage=renderer.image(plotBackgroundImage,plotLeft,plotTop,plotWidth,plotHeight).add();}else{plotBGImage.animate(plotSize);}}
+if(optionsChart.plotBorderWidth){if(!plotBorder){plotBorder=renderer.rect(plotLeft,plotTop,plotWidth,plotHeight,0,optionsChart.plotBorderWidth).attr({stroke:optionsChart.plotBorderColor,'stroke-width':optionsChart.plotBorderWidth,zIndex:4}).add();}else{plotBorder.animate(plotBorder.crisp(null,plotLeft,plotTop,plotWidth,plotHeight));}}
+chart.isDirtyBox=false;};function render(){var labels=options.labels,credits=options.credits,creditsHref;setTitle();legend=chart.legend=new Legend(chart);getMargins();each(axes,function(axis){axis.setTickPositions(true);});adjustTickAmounts();getMargins();drawChartBox();if(hasCartesianSeries){each(axes,function(axis){axis.render();});}
+if(!chart.seriesGroup){chart.seriesGroup=renderer.g('series-group').attr({zIndex:3}).add();}
+each(series,function(serie){serie.translate();serie.setTooltipPoints();serie.render();});if(labels.items){each(labels.items,function(){var style=extend(labels.style,this.style),x=pInt(style.left)+plotLeft,y=pInt(style.top)+plotTop+12;delete style.left;delete style.top;renderer.text(this.html,x,y).attr({zIndex:2}).css(style).add();});}
+if(!chart.toolbar){chart.toolbar=Toolbar(chart);}
+if(credits.enabled&&!chart.credits){creditsHref=credits.href;renderer.text(credits.text,0,0).on('click',function(){if(creditsHref){location.href=creditsHref;}}).attr({align:credits.position.align,zIndex:8}).css(credits.style).add().align(credits.position);}
+placeTrackerGroup();chart.hasRendered=true;if(renderToClone){renderTo.appendChild(container);discardElement(renderToClone);}}
+function destroy(){var i=series.length,parentNode=container&&container.parentNode;fireEvent(chart,'destroy');removeEvent(win,'unload',destroy);removeEvent(chart);each(axes,function(axis){removeEvent(axis);});while(i--){series[i].destroy();}
+if(container){container.innerHTML='';removeEvent(container);if(parentNode){parentNode.removeChild(container);}
+container=null;}
+if(renderer){renderer.alignedObjects=null;}
+clearInterval(tooltipInterval);for(i in chart){delete chart[i];}}
+function firstRender(){var ONREADYSTATECHANGE='onreadystatechange',COMPLETE='complete';if(!hasSVG&&win==win.top&&doc.readyState!==COMPLETE){doc.attachEvent(ONREADYSTATECHANGE,function(){doc.detachEvent(ONREADYSTATECHANGE,firstRender);if(doc.readyState===COMPLETE){firstRender();}});return;}
+colorCounter=0;symbolCounter=0;getContainer();resetMargins();setChartSize();each(options.series||[],function(serieOptions){initSeries(serieOptions);});chart.inverted=inverted=pick(inverted,options.chart.inverted);getAxes();chart.render=render;chart.tracker=tracker=new MouseTracker(chart,options.tooltip);render();fireEvent(chart,'load');if(callback){callback.apply(chart,[chart]);}
+each(chart.callbacks,function(fn){fn.apply(chart,[chart]);});}
+addEvent(win,'unload',destroy);if(optionsChart.reflow!==false){addEvent(chart,'load',initReflow);}
+if(chartEvents){for(eventType in chartEvents){addEvent(chart,eventType,chartEvents[eventType]);}}
+chart.options=options;chart.series=series;chart.addSeries=addSeries;chart.animation=pick(optionsChart.animation,true);chart.destroy=destroy;chart.get=get;chart.getSelectedPoints=getSelectedPoints;chart.getSelectedSeries=getSelectedSeries;chart.hideLoading=hideLoading;chart.isInsidePlot=isInsidePlot;chart.redraw=redraw;chart.setSize=resize;chart.setTitle=setTitle;chart.showLoading=showLoading;chart.pointCount=0;firstRender();}
+Chart.prototype.callbacks=[];var Point=function(){};Point.prototype={init:function(series,options){var point=this,defaultColors;point.series=series;point.applyOptions(options);point.pointAttr={};if(series.options.colorByPoint){defaultColors=series.chart.options.colors;if(!point.options){point.options={};}
+point.color=point.options.color=point.color||defaultColors[colorCounter++];if(colorCounter>=defaultColors.length){colorCounter=0;}}
+series.chart.pointCount++;return point;},applyOptions:function(options){var point=this,series=point.series;point.config=options;if(isNumber(options)||options===null){point.y=options;}
+else if(isObject(options)&&!isNumber(options.length)){extend(point,options);point.options=options;}
+else if(isString(options[0])){point.name=options[0];point.y=options[1];}
+else if(isNumber(options[0])){point.x=options[0];point.y=options[1];}
+if(point.x===UNDEFINED){point.x=series.autoIncrement();}},destroy:function(){var point=this,series=point.series,prop;series.chart.pointCount--;if(point===series.chart.hoverPoint){point.onMouseOut();}
+series.chart.hoverPoints=null;removeEvent(point);each(['graphic','tracker','group','dataLabel','connector'],function(prop){if(point[prop]){point[prop].destroy();}});if(point.legendItem){point.series.chart.legend.destroyItem(point);}
+for(prop in point){point[prop]=null;}},getLabelConfig:function(){var point=this;return{x:point.category,y:point.y,series:point.series,point:point,percentage:point.percentage,total:point.total||point.stackTotal};},select:function(selected,accumulate){var point=this,series=point.series,chart=series.chart;point.selected=selected=pick(selected,!point.selected);point.firePointEvent(selected?'select':'unselect');point.setState(selected&&SELECT_STATE);if(!accumulate){each(chart.getSelectedPoints(),function(loopPoint){if(loopPoint.selected&&loopPoint!==point){loopPoint.selected=false;loopPoint.setState(NORMAL_STATE);loopPoint.firePointEvent('unselect');}});}},onMouseOver:function(){var point=this,chart=point.series.chart,tooltip=chart.tooltip,hoverPoint=chart.hoverPoint;if(hoverPoint&&hoverPoint!==point){hoverPoint.onMouseOut();}
+point.firePointEvent('mouseOver');if(tooltip&&!tooltip.shared){tooltip.refresh(point);}
+point.setState(HOVER_STATE);chart.hoverPoint=point;},onMouseOut:function(){var point=this;point.firePointEvent('mouseOut');point.setState();point.series.chart.hoverPoint=null;},tooltipFormatter:function(useHeader){var point=this,series=point.series;return['<span style="color:'+series.color+'">',(point.name||series.name),'</span>: ',(!useHeader?('<b>x = '+(point.name||point.x)+',</b> '):''),'<b>',(!useHeader?'y = ':''),point.y,'</b>'].join('');},update:function(options,redraw,animation){var point=this,series=point.series,dataLabel=point.dataLabel,graphic=point.graphic,chart=series.chart;redraw=pick(redraw,true);point.firePointEvent('update',{options:options},function(){point.applyOptions(options);if(isObject(options)){series.getAttribs();if(graphic){graphic.attr(point.pointAttr[series.state]);}}
+series.isDirty=true;if(redraw){chart.redraw(animation);}});},remove:function(redraw,animation){var point=this,series=point.series,chart=series.chart,data=series.data;setAnimation(animation,chart);redraw=pick(redraw,true);point.firePointEvent('remove',null,function(){erase(data,point);point.destroy();series.isDirty=true;if(redraw){chart.redraw();}});},firePointEvent:function(eventType,eventArgs,defaultFunction){var point=this,series=this.series,seriesOptions=series.options;if(seriesOptions.point.events[eventType]||(point.options&&point.options.events&&point.options.events[eventType])){this.importEvents();}
+if(eventType==='click'&&seriesOptions.allowPointSelect){defaultFunction=function(event){point.select(null,event.ctrlKey||event.metaKey||event.shiftKey);};}
+fireEvent(this,eventType,eventArgs,defaultFunction);},importEvents:function(){if(!this.hasImportedEvents){var point=this,options=merge(point.series.options.point,point.options),events=options.events,eventType;point.events=events;for(eventType in events){addEvent(point,eventType,events[eventType]);}
+this.hasImportedEvents=true;}},setState:function(state){var point=this,series=point.series,stateOptions=series.options.states,markerOptions=defaultPlotOptions[series.type].marker&&series.options.marker,normalDisabled=markerOptions&&!markerOptions.enabled,markerStateOptions=markerOptions&&markerOptions.states[state],stateDisabled=markerStateOptions&&markerStateOptions.enabled===false,stateMarkerGraphic=series.stateMarkerGraphic,chart=series.chart,pointAttr=point.pointAttr;state=state||NORMAL_STATE;if(state===point.state||(point.selected&&state!==SELECT_STATE)||(stateOptions[state]&&stateOptions[state].enabled===false)||(state&&(stateDisabled||(normalDisabled&&!markerStateOptions.enabled)))){return;}
+if(point.graphic){point.graphic.attr(pointAttr[state]);}
+else{if(state){if(!stateMarkerGraphic){series.stateMarkerGraphic=stateMarkerGraphic=chart.renderer.circle(0,0,pointAttr[state].r).attr(pointAttr[state]).add(series.group);}
+stateMarkerGraphic.translate(point.plotX,point.plotY);}
+if(stateMarkerGraphic){stateMarkerGraphic[state?'show':'hide']();}}
+point.state=state;}};var Series=function(){};Series.prototype={isCartesian:true,type:'line',pointClass:Point,pointAttrToOptions:{stroke:'lineColor','stroke-width':'lineWidth',fill:'fillColor',r:'radius'},init:function(chart,options){var series=this,eventType,events,index=chart.series.length;series.chart=chart;options=series.setOptions(options);extend(series,{index:index,options:options,name:options.name||'Series '+(index+1),state:NORMAL_STATE,pointAttr:{},visible:options.visible!==false,selected:options.selected===true});events=options.events;for(eventType in events){addEvent(series,eventType,events[eventType]);}
+if((events&&events.click)||(options.point&&options.point.events&&options.point.events.click)||options.allowPointSelect){chart.runTrackerClick=true;}
+series.getColor();series.getSymbol();series.setData(options.data,false);},autoIncrement:function(){var series=this,options=series.options,xIncrement=series.xIncrement;xIncrement=pick(xIncrement,options.pointStart,0);series.pointInterval=pick(series.pointInterval,options.pointInterval,1);series.xIncrement=xIncrement+series.pointInterval;return xIncrement;},cleanData:function(){var series=this,chart=series.chart,data=series.data,closestPoints,smallestInterval,chartSmallestInterval=chart.smallestInterval,interval,i;data.sort(function(a,b){return(a.x-b.x);});if(series.options.connectNulls){for(i=data.length-1;i>=0;i--){if(data[i].y===null&&data[i-1]&&data[i+1]){data.splice(i,1);}}}
+for(i=data.length-1;i>=0;i--){if(data[i-1]){interval=data[i].x-data[i-1].x;if(interval>0&&(smallestInterval===UNDEFINED||interval<smallestInterval)){smallestInterval=interval;closestPoints=i;}}}
+if(chartSmallestInterval===UNDEFINED||smallestInterval<chartSmallestInterval){chart.smallestInterval=smallestInterval;}
+series.closestPoints=closestPoints;},getSegments:function(){var lastNull=-1,segments=[],data=this.data;each(data,function(point,i){if(point.y===null){if(i>lastNull+1){segments.push(data.slice(lastNull+1,i));}
+lastNull=i;}else if(i===data.length-1){segments.push(data.slice(lastNull+1,i+1));}});this.segments=segments;},setOptions:function(itemOptions){var plotOptions=this.chart.options.plotOptions,options=merge(plotOptions[this.type],plotOptions.series,itemOptions);return options;},getColor:function(){var defaultColors=this.chart.options.colors;this.color=this.options.color||defaultColors[colorCounter++]||'#0000ff';if(colorCounter>=defaultColors.length){colorCounter=0;}},getSymbol:function(){var defaultSymbols=this.chart.options.symbols,symbol=this.options.marker.symbol||defaultSymbols[symbolCounter++];this.symbol=symbol;if(symbolCounter>=defaultSymbols.length){symbolCounter=0;}},addPoint:function(options,redraw,shift,animation){var series=this,data=series.data,graph=series.graph,area=series.area,chart=series.chart,point=(new series.pointClass()).init(series,options);setAnimation(animation,chart);if(graph&&shift){graph.shift=shift;}
+if(area){area.shift=shift;area.isArea=true;}
+redraw=pick(redraw,true);data.push(point);if(shift){data[0].remove(false);}
+series.getAttribs();series.isDirty=true;if(redraw){chart.redraw();}},setData:function(data,redraw){var series=this,oldData=series.data,initialColor=series.initialColor,chart=series.chart,i=(oldData&&oldData.length)||0;series.xIncrement=null;if(defined(initialColor)){colorCounter=initialColor;}
+data=map(splat(data||[]),function(pointOptions){return(new series.pointClass()).init(series,pointOptions);});while(i--){oldData[i].destroy();}
+series.data=data;series.cleanData();series.getSegments();series.getAttribs();series.isDirty=true;chart.isDirtyBox=true;if(pick(redraw,true)){chart.redraw(false);}},remove:function(redraw,animation){var series=this,chart=series.chart;redraw=pick(redraw,true);if(!series.isRemoving){series.isRemoving=true;fireEvent(series,'remove',null,function(){series.destroy();chart.isDirtyLegend=chart.isDirtyBox=true;if(redraw){chart.redraw(animation);}});}
+series.isRemoving=false;},translate:function(){var series=this,chart=series.chart,stacking=series.options.stacking,categories=series.xAxis.categories,yAxis=series.yAxis,data=series.data,i=data.length;while(i--){var point=data[i],xValue=point.x,yValue=point.y,yBottom=point.low,stack=yAxis.stacks[(yValue<0?'-':'')+series.stackKey],pointStack,pointStackTotal;point.plotX=series.xAxis.translate(xValue);if(stacking&&series.visible&&stack&&stack[xValue]){pointStack=stack[xValue];pointStackTotal=pointStack.total;pointStack.cum=yBottom=pointStack.cum-yValue;yValue=yBottom+yValue;if(stacking==='percent'){yBottom=pointStackTotal?yBottom*100/pointStackTotal:0;yValue=pointStackTotal?yValue*100/pointStackTotal:0;}
+point.percentage=pointStackTotal?point.y*100/pointStackTotal:0;point.stackTotal=pointStackTotal;}
+if(defined(yBottom)){point.yBottom=yAxis.translate(yBottom,0,1,0,1);}
+if(yValue!==null){point.plotY=yAxis.translate(yValue,0,1,0,1);}
+point.clientX=chart.inverted?chart.plotHeight-point.plotX:point.plotX;point.category=categories&&categories[point.x]!==UNDEFINED?categories[point.x]:point.x;}},setTooltipPoints:function(renew){var series=this,chart=series.chart,inverted=chart.inverted,data=[],plotSize=mathRound((inverted?chart.plotTop:chart.plotLeft)+chart.plotSizeX),low,high,tooltipPoints=[];if(renew){series.tooltipPoints=null;}
+each(series.segments,function(segment){data=data.concat(segment);});if(series.xAxis&&series.xAxis.reversed){data=data.reverse();}
+each(data,function(point,i){low=data[i-1]?data[i-1]._high+1:0;high=point._high=data[i+1]?(mathFloor((point.plotX+(data[i+1]?data[i+1].plotX:plotSize))/2)):plotSize;while(low<=high){tooltipPoints[inverted?plotSize-low++:low++]=point;}});series.tooltipPoints=tooltipPoints;},onMouseOver:function(){var series=this,chart=series.chart,hoverSeries=chart.hoverSeries;if(!hasTouch&&chart.mouseIsDown){return;}
+if(hoverSeries&&hoverSeries!==series){hoverSeries.onMouseOut();}
+if(series.options.events.mouseOver){fireEvent(series,'mouseOver');}
+if(series.tracker){series.tracker.toFront();}
+series.setState(HOVER_STATE);chart.hoverSeries=series;},onMouseOut:function(){var series=this,options=series.options,chart=series.chart,tooltip=chart.tooltip,hoverPoint=chart.hoverPoint;if(hoverPoint){hoverPoint.onMouseOut();}
+if(series&&options.events.mouseOut){fireEvent(series,'mouseOut');}
+if(tooltip&&!options.stickyTracking){tooltip.hide();}
+series.setState();chart.hoverSeries=null;},animate:function(init){var series=this,chart=series.chart,clipRect=series.clipRect,animation=series.options.animation;if(animation&&!isObject(animation)){animation={};}
+if(init){if(!clipRect.isAnimating){clipRect.attr('width',0);clipRect.isAnimating=true;}}else{clipRect.animate({width:chart.plotSizeX},animation);this.animate=null;}},drawPoints:function(){var series=this,pointAttr,data=series.data,chart=series.chart,plotX,plotY,i,point,radius,graphic;if(series.options.marker.enabled){i=data.length;while(i--){point=data[i];plotX=point.plotX;plotY=point.plotY;graphic=point.graphic;if(plotY!==UNDEFINED&&!isNaN(plotY)){pointAttr=point.pointAttr[point.selected?SELECT_STATE:NORMAL_STATE];radius=pointAttr.r;if(graphic){graphic.animate({x:plotX,y:plotY,r:radius});}else{point.graphic=chart.renderer.symbol(pick(point.marker&&point.marker.symbol,series.symbol),plotX,plotY,radius).attr(pointAttr).add(series.group);}}}}},convertAttribs:function(options,base1,base2,base3){var conversion=this.pointAttrToOptions,attr,option,obj={};options=options||{};base1=base1||{};base2=base2||{};base3=base3||{};for(attr in conversion){option=conversion[attr];obj[attr]=pick(options[option],base1[attr],base2[attr],base3[attr]);}
+return obj;},getAttribs:function(){var series=this,normalOptions=defaultPlotOptions[series.type].marker?series.options.marker:series.options,stateOptions=normalOptions.states,stateOptionsHover=stateOptions[HOVER_STATE],pointStateOptionsHover,seriesColor=series.color,normalDefaults={stroke:seriesColor,fill:seriesColor},data=series.data,i,point,seriesPointAttr=[],pointAttr,pointAttrToOptions=series.pointAttrToOptions,hasPointSpecificOptions,key;if(series.options.marker){stateOptionsHover.radius=stateOptionsHover.radius||normalOptions.radius+2;stateOptionsHover.lineWidth=stateOptionsHover.lineWidth||normalOptions.lineWidth+1;}else{stateOptionsHover.color=stateOptionsHover.color||Color(stateOptionsHover.color||seriesColor).brighten(stateOptionsHover.brightness).get();}
+seriesPointAttr[NORMAL_STATE]=series.convertAttribs(normalOptions,normalDefaults);each([HOVER_STATE,SELECT_STATE],function(state){seriesPointAttr[state]=series.convertAttribs(stateOptions[state],seriesPointAttr[NORMAL_STATE]);});series.pointAttr=seriesPointAttr;i=data.length;while(i--){point=data[i];normalOptions=(point.options&&point.options.marker)||point.options;if(normalOptions&&normalOptions.enabled===false){normalOptions.radius=0;}
+hasPointSpecificOptions=false;if(point.options){for(key in pointAttrToOptions){if(defined(normalOptions[pointAttrToOptions[key]])){hasPointSpecificOptions=true;}}}
+if(hasPointSpecificOptions){pointAttr=[];stateOptions=normalOptions.states||{};pointStateOptionsHover=stateOptions[HOVER_STATE]=stateOptions[HOVER_STATE]||{};if(!series.options.marker){pointStateOptionsHover.color=Color(pointStateOptionsHover.color||point.options.color).brighten(pointStateOptionsHover.brightness||stateOptionsHover.brightness).get();}
+pointAttr[NORMAL_STATE]=series.convertAttribs(normalOptions,seriesPointAttr[NORMAL_STATE]);pointAttr[HOVER_STATE]=series.convertAttribs(stateOptions[HOVER_STATE],seriesPointAttr[HOVER_STATE],pointAttr[NORMAL_STATE]);pointAttr[SELECT_STATE]=series.convertAttribs(stateOptions[SELECT_STATE],seriesPointAttr[SELECT_STATE],pointAttr[NORMAL_STATE]);}else{pointAttr=seriesPointAttr;}
+point.pointAttr=pointAttr;}},destroy:function(){var series=this,chart=series.chart,clipRect=series.clipRect,issue134=/\/5[0-9\.]+ (Safari|Mobile)\//.test(userAgent),destroy,prop;removeEvent(series);if(series.legendItem){series.chart.legend.destroyItem(series);}
+each(series.data,function(point){point.destroy();});each(['area','graph','dataLabelsGroup','group','tracker'],function(prop){if(series[prop]){destroy=issue134&&prop==='group'?'hide':'destroy';series[prop][destroy]();}});if(chart.hoverSeries===series){chart.hoverSeries=null;}
+erase(chart.series,series);for(prop in series){delete series[prop];}},drawDataLabels:function(){if(this.options.dataLabels.enabled){var series=this,x,y,data=series.data,options=series.options.dataLabels,str,dataLabelsGroup=series.dataLabelsGroup,chart=series.chart,inverted=chart.inverted,seriesType=series.type,color,stacking=series.options.stacking,isBarLike=seriesType==='column'||seriesType==='bar',vAlignIsNull=options.verticalAlign===null,yIsNull=options.y===null;if(isBarLike){if(stacking){if(vAlignIsNull){options=merge(options,{verticalAlign:'middle'});}
+if(yIsNull){options=merge(options,{y:{top:14,middle:4,bottom:-6}[options.verticalAlign]});}}else{if(vAlignIsNull){options=merge(options,{verticalAlign:'top'});}
+if(yIsNull){options=merge(options,{y:-6});}}}
+if(!dataLabelsGroup){dataLabelsGroup=series.dataLabelsGroup=chart.renderer.g('data-labels').attr({visibility:series.visible?VISIBLE:HIDDEN,zIndex:6}).translate(chart.plotLeft,chart.plotTop).add();}
+color=options.color;if(color==='auto'){color=null;}
+options.style.color=pick(color,series.color);each(data,function(point,i){var barX=point.barX,plotX=(barX&&barX+point.barW/2)||point.plotX||-999,plotY=pick(point.plotY,-999),dataLabel=point.dataLabel,align=options.align;str=options.formatter.call(point.getLabelConfig());x=(inverted?chart.plotWidth-plotY:plotX)+options.x;y=(inverted?chart.plotHeight-plotX:plotY)+options.y;if(seriesType==='column'){x+={left:-1,right:1}[align]*point.barW/2||0;}
+if(dataLabel){if(inverted&&!options.y){y=y+pInt(dataLabel.styles.lineHeight)*0.9-dataLabel.getBBox().height/2;}
+dataLabel.attr({text:str}).animate({x:x,y:y});}else if(defined(str)){dataLabel=point.dataLabel=chart.renderer.text(str,x,y).attr({align:align,rotation:options.rotation,zIndex:1}).css(options.style).add(dataLabelsGroup);if(inverted&&!options.y){dataLabel.attr({y:y+pInt(dataLabel.styles.lineHeight)*0.9-dataLabel.getBBox().height/2});}}
+if(isBarLike&&series.options.stacking){var barY=point.barY,barW=point.barW,barH=point.barH;dataLabel.align(options,null,{x:inverted?chart.plotWidth-barY-barH:barX,y:inverted?chart.plotHeight-barX-barW:barY,width:inverted?barH:barW,height:inverted?barW:barH});}});}},drawGraph:function(state){var series=this,options=series.options,chart=series.chart,graph=series.graph,graphPath=[],fillColor,area=series.area,group=series.group,color=options.lineColor||series.color,lineWidth=options.lineWidth,dashStyle=options.dashStyle,segmentPath,renderer=chart.renderer,translatedThreshold=series.yAxis.getThreshold(options.threshold||0),useArea=/^area/.test(series.type),singlePoints=[],areaPath=[],attribs;each(series.segments,function(segment){segmentPath=[];each(segment,function(point,i){if(series.getPointSpline){segmentPath.push.apply(segmentPath,series.getPointSpline(segment,point,i));}else{segmentPath.push(i?L:M);if(i&&options.step){var lastPoint=segment[i-1];segmentPath.push(point.plotX,lastPoint.plotY);}
+segmentPath.push(point.plotX,point.plotY);}});if(segment.length>1){graphPath=graphPath.concat(segmentPath);}else{singlePoints.push(segment[0]);}
+if(useArea){var areaSegmentPath=[],i,segLength=segmentPath.length;for(i=0;i<segLength;i++){areaSegmentPath.push(segmentPath[i]);}
+if(segLength===3){areaSegmentPath.push(L,segmentPath[1],segmentPath[2]);}
+if(options.stacking&&series.type!=='areaspline'){for(i=segment.length-1;i>=0;i--){areaSegmentPath.push(segment[i].plotX,segment[i].yBottom);}}else{areaSegmentPath.push(L,segment[segment.length-1].plotX,translatedThreshold,L,segment[0].plotX,translatedThreshold);}
+areaPath=areaPath.concat(areaSegmentPath);}});series.graphPath=graphPath;series.singlePoints=singlePoints;if(useArea){fillColor=pick(options.fillColor,Color(series.color).setOpacity(options.fillOpacity||0.75).get());if(area){area.animate({d:areaPath});}else{series.area=series.chart.renderer.path(areaPath).attr({fill:fillColor}).add(group);}}
+if(graph){graph.animate({d:graphPath});}else{if(lineWidth){attribs={'stroke':color,'stroke-width':lineWidth};if(dashStyle){attribs.dashstyle=dashStyle;}
+series.graph=renderer.path(graphPath).attr(attribs).add(group).shadow(options.shadow);}}},render:function(){var series=this,chart=series.chart,group,setInvert,options=series.options,animation=options.animation,doAnimation=animation&&series.animate,duration=doAnimation?(animation&&animation.duration)||500:0,clipRect=series.clipRect,renderer=chart.renderer;if(!clipRect){clipRect=series.clipRect=!chart.hasRendered&&chart.clipRect?chart.clipRect:renderer.clipRect(0,0,chart.plotSizeX,chart.plotSizeY);if(!chart.clipRect){chart.clipRect=clipRect;}}
+if(!series.group){group=series.group=renderer.g('series');if(chart.inverted){setInvert=function(){group.attr({width:chart.plotWidth,height:chart.plotHeight}).invert();};setInvert();addEvent(chart,'resize',setInvert);}
+group.clip(series.clipRect).attr({visibility:series.visible?VISIBLE:HIDDEN,zIndex:options.zIndex}).translate(chart.plotLeft,chart.plotTop).add(chart.seriesGroup);}
+series.drawDataLabels();if(doAnimation){series.animate(true);}
+if(series.drawGraph){series.drawGraph();}
+series.drawPoints();if(series.options.enableMouseTracking!==false){series.drawTracker();}
+if(doAnimation){series.animate();}
+setTimeout(function(){clipRect.isAnimating=false;group=series.group;if(group&&clipRect!==chart.clipRect&&clipRect.renderer){group.clip((series.clipRect=chart.clipRect));clipRect.destroy();}},duration);series.isDirty=false;},redraw:function(){var series=this,chart=series.chart,clipRect=series.clipRect,group=series.group;if(group){if(chart.inverted){group.attr({width:chart.plotWidth,height:chart.plotHeight});}
+group.animate({translateX:chart.plotLeft,translateY:chart.plotTop});}
+series.translate();series.setTooltipPoints(true);series.render();},setState:function(state){var series=this,options=series.options,graph=series.graph,stateOptions=options.states,lineWidth=options.lineWidth;state=state||NORMAL_STATE;if(series.state!==state){series.state=state;if(stateOptions[state]&&stateOptions[state].enabled===false){return;}
+if(state){lineWidth=stateOptions[state].lineWidth||lineWidth+1;}
+if(graph&&!graph.dashstyle){graph.attr({'stroke-width':lineWidth},state?0:500);}}},setVisible:function(vis,redraw){var series=this,chart=series.chart,legendItem=series.legendItem,seriesGroup=series.group,seriesTracker=series.tracker,dataLabelsGroup=series.dataLabelsGroup,showOrHide,i,data=series.data,point,ignoreHiddenSeries=chart.options.chart.ignoreHiddenSeries,oldVisibility=series.visible;series.visible=vis=vis===UNDEFINED?!oldVisibility:vis;showOrHide=vis?'show':'hide';if(seriesGroup){seriesGroup[showOrHide]();}
+if(seriesTracker){seriesTracker[showOrHide]();}else{i=data.length;while(i--){point=data[i];if(point.tracker){point.tracker[showOrHide]();}}}
+if(dataLabelsGroup){dataLabelsGroup[showOrHide]();}
+if(legendItem){chart.legend.colorizeItem(series,vis);}
+series.isDirty=true;if(series.options.stacking){each(chart.series,function(otherSeries){if(otherSeries.options.stacking&&otherSeries.visible){otherSeries.isDirty=true;}});}
+if(ignoreHiddenSeries){chart.isDirtyBox=true;}
+if(redraw!==false){chart.redraw();}
+fireEvent(series,showOrHide);},show:function(){this.setVisible(true);},hide:function(){this.setVisible(false);},select:function(selected){var series=this;series.selected=selected=(selected===UNDEFINED)?!series.selected:selected;if(series.checkbox){series.checkbox.checked=selected;}
+fireEvent(series,selected?'select':'unselect');},drawTracker:function(){var series=this,options=series.options,trackerPath=[].concat(series.graphPath),trackerPathLength=trackerPath.length,chart=series.chart,snap=chart.options.tooltip.snap,tracker=series.tracker,cursor=options.cursor,css=cursor&&{cursor:cursor},singlePoints=series.singlePoints,singlePoint,i;if(trackerPathLength){i=trackerPathLength+1;while(i--){if(trackerPath[i]===M){trackerPath.splice(i+1,0,trackerPath[i+1]-snap,trackerPath[i+2],L);}
+if((i&&trackerPath[i]===M)||i===trackerPathLength){trackerPath.splice(i,0,L,trackerPath[i-2]+snap,trackerPath[i-1]);}}}
+for(i=0;i<singlePoints.length;i++){singlePoint=singlePoints[i];trackerPath.push(M,singlePoint.plotX-snap,singlePoint.plotY,L,singlePoint.plotX+snap,singlePoint.plotY);}
+if(tracker){tracker.attr({d:trackerPath});}else{series.tracker=chart.renderer.path(trackerPath).attr({isTracker:true,stroke:TRACKER_FILL,fill:NONE,'stroke-width':options.lineWidth+2*snap,visibility:series.visible?VISIBLE:HIDDEN,zIndex:1}).on(hasTouch?'touchstart':'mouseover',function(){if(chart.hoverSeries!==series){series.onMouseOver();}}).on('mouseout',function(){if(!options.stickyTracking){series.onMouseOut();}}).css(css).add(chart.trackerGroup);}}};var LineSeries=extendClass(Series);seriesTypes.line=LineSeries;var AreaSeries=extendClass(Series,{type:'area'});seriesTypes.area=AreaSeries;var SplineSeries=extendClass(Series,{type:'spline',getPointSpline:function(segment,point,i){var smoothing=1.5,denom=smoothing+1,plotX=point.plotX,plotY=point.plotY,lastPoint=segment[i-1],nextPoint=segment[i+1],leftContX,leftContY,rightContX,rightContY,ret;if(i&&i<segment.length-1){var lastX=lastPoint.plotX,lastY=lastPoint.plotY,nextX=nextPoint.plotX,nextY=nextPoint.plotY,correction;leftContX=(smoothing*plotX+lastX)/denom;leftContY=(smoothing*plotY+lastY)/denom;rightContX=(smoothing*plotX+nextX)/denom;rightContY=(smoothing*plotY+nextY)/denom;correction=((rightContY-leftContY)*(rightContX-plotX))/(rightContX-leftContX)+plotY-rightContY;leftContY+=correction;rightContY+=correction;if(leftContY>lastY&&leftContY>plotY){leftContY=mathMax(lastY,plotY);rightContY=2*plotY-leftContY;}else if(leftContY<lastY&&leftContY<plotY){leftContY=mathMin(lastY,plotY);rightContY=2*plotY-leftContY;}
+if(rightContY>nextY&&rightContY>plotY){rightContY=mathMax(nextY,plotY);leftContY=2*plotY-rightContY;}else if(rightContY<nextY&&rightContY<plotY){rightContY=mathMin(nextY,plotY);leftContY=2*plotY-rightContY;}
+point.rightContX=rightContX;point.rightContY=rightContY;}
+if(!i){ret=[M,plotX,plotY];}
+else{ret=['C',lastPoint.rightContX||lastPoint.plotX,lastPoint.rightContY||lastPoint.plotY,leftContX||plotX,leftContY||plotY,plotX,plotY];lastPoint.rightContX=lastPoint.rightContY=null;}
+return ret;}});seriesTypes.spline=SplineSeries;var AreaSplineSeries=extendClass(SplineSeries,{type:'areaspline'});seriesTypes.areaspline=AreaSplineSeries;var ColumnSeries=extendClass(Series,{type:'column',pointAttrToOptions:{stroke:'borderColor','stroke-width':'borderWidth',fill:'color',r:'borderRadius'},init:function(){Series.prototype.init.apply(this,arguments);var series=this,chart=series.chart;chart.hasColumn=true;if(chart.hasRendered){each(chart.series,function(otherSeries){if(otherSeries.type===series.type){otherSeries.isDirty=true;}});}},translate:function(){var series=this,chart=series.chart,options=series.options,stacking=options.stacking,borderWidth=options.borderWidth,columnCount=0,reversedXAxis=series.xAxis.reversed,categories=series.xAxis.categories,stackGroups={},stackKey,columnIndex;Series.prototype.translate.apply(series);each(chart.series,function(otherSeries){if(otherSeries.type===series.type&&otherSeries.visible){if(otherSeries.options.stacking){stackKey=otherSeries.stackKey;if(stackGroups[stackKey]===UNDEFINED){stackGroups[stackKey]=columnCount++;}
+columnIndex=stackGroups[stackKey];}else{columnIndex=columnCount++;}
+otherSeries.columnIndex=columnIndex;}});var data=series.data,closestPoints=series.closestPoints,categoryWidth=mathAbs(data[1]?data[closestPoints].plotX-data[closestPoints-1].plotX:chart.plotSizeX/((categories&&categories.length)||1)),groupPadding=categoryWidth*options.groupPadding,groupWidth=categoryWidth-2*groupPadding,pointOffsetWidth=groupWidth/columnCount,optionPointWidth=options.pointWidth,pointPadding=defined(optionPointWidth)?(pointOffsetWidth-optionPointWidth)/2:pointOffsetWidth*options.pointPadding,pointWidth=mathMax(pick(optionPointWidth,pointOffsetWidth-2*pointPadding),1),colIndex=(reversedXAxis?columnCount-
+series.columnIndex:series.columnIndex)||0,pointXOffset=pointPadding+(groupPadding+colIndex*pointOffsetWidth-(categoryWidth/2))*(reversedXAxis?-1:1),threshold=options.threshold||0,translatedThreshold=series.yAxis.getThreshold(threshold),minPointLength=pick(options.minPointLength,5);each(data,function(point){var plotY=point.plotY,yBottom=point.yBottom||translatedThreshold,barX=point.plotX+pointXOffset,barY=mathCeil(mathMin(plotY,yBottom)),barH=mathCeil(mathMax(plotY,yBottom)-barY),stack=series.yAxis.stacks[(point.y<0?'-':'')+series.stackKey],trackerY,shapeArgs;if(stacking&&series.visible&&stack&&stack[point.x]){stack[point.x].setOffset(pointXOffset,pointWidth);}
+if(mathAbs(barH)<minPointLength){if(minPointLength){barH=minPointLength;barY=mathAbs(barY-translatedThreshold)>minPointLength?yBottom-minPointLength:translatedThreshold-(plotY<=translatedThreshold?minPointLength:0);}
+trackerY=barY-3;}
+extend(point,{barX:barX,barY:barY,barW:pointWidth,barH:barH});point.shapeType='rect';shapeArgs=extend(chart.renderer.Element.prototype.crisp.apply({},[borderWidth,barX,barY,pointWidth,barH]),{r:options.borderRadius});if(borderWidth%2){shapeArgs.y-=1;shapeArgs.height+=1;}
+point.shapeArgs=shapeArgs;point.trackerArgs=defined(trackerY)&&merge(point.shapeArgs,{height:mathMax(6,barH+3),y:trackerY});});},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var series=this,options=series.options,renderer=series.chart.renderer,graphic,shapeArgs;each(series.data,function(point){var plotY=point.plotY;if(plotY!==UNDEFINED&&!isNaN(plotY)&&point.y!==null){graphic=point.graphic;shapeArgs=point.shapeArgs;if(graphic){stop(graphic);graphic.animate(shapeArgs);}else{point.graphic=renderer[point.shapeType](shapeArgs).attr(point.pointAttr[point.selected?SELECT_STATE:NORMAL_STATE]).add(series.group).shadow(options.shadow);}}});},drawTracker:function(){var series=this,chart=series.chart,renderer=chart.renderer,shapeArgs,tracker,trackerLabel=+new Date(),cursor=series.options.cursor,css=cursor&&{cursor:cursor},rel;each(series.data,function(point){tracker=point.tracker;shapeArgs=point.trackerArgs||point.shapeArgs;delete shapeArgs.strokeWidth;if(point.y!==null){if(tracker){tracker.attr(shapeArgs);}else{point.tracker=renderer[point.shapeType](shapeArgs).attr({isTracker:trackerLabel,fill:TRACKER_FILL,visibility:series.visible?VISIBLE:HIDDEN,zIndex:1}).on(hasTouch?'touchstart':'mouseover',function(event){rel=event.relatedTarget||event.fromElement;if(chart.hoverSeries!==series&&attr(rel,'isTracker')!==trackerLabel){series.onMouseOver();}
+point.onMouseOver();}).on('mouseout',function(event){if(!series.options.stickyTracking){rel=event.relatedTarget||event.toElement;if(attr(rel,'isTracker')!==trackerLabel){series.onMouseOut();}}}).css(css).add(point.group||chart.trackerGroup);}}});},animate:function(init){var series=this,data=series.data;if(!init){each(data,function(point){var graphic=point.graphic,shapeArgs=point.shapeArgs;if(graphic){graphic.attr({height:0,y:series.yAxis.translate(0,0,1)});graphic.animate({height:shapeArgs.height,y:shapeArgs.y},series.options.animation);}});series.animate=null;}},remove:function(){var series=this,chart=series.chart;if(chart.hasRendered){each(chart.series,function(otherSeries){if(otherSeries.type===series.type){otherSeries.isDirty=true;}});}
+Series.prototype.remove.apply(series,arguments);}});seriesTypes.column=ColumnSeries;var BarSeries=extendClass(ColumnSeries,{type:'bar',init:function(chart){chart.inverted=this.inverted=true;ColumnSeries.prototype.init.apply(this,arguments);}});seriesTypes.bar=BarSeries;var ScatterSeries=extendClass(Series,{type:'scatter',translate:function(){var series=this;Series.prototype.translate.apply(series);each(series.data,function(point){point.shapeType='circle';point.shapeArgs={x:point.plotX,y:point.plotY,r:series.chart.options.tooltip.snap};});},drawTracker:function(){var series=this,cursor=series.options.cursor,css=cursor&&{cursor:cursor},graphic;each(series.data,function(point){graphic=point.graphic;if(graphic){graphic.attr({isTracker:true}).on('mouseover',function(event){series.onMouseOver();point.onMouseOver();}).on('mouseout',function(event){if(!series.options.stickyTracking){series.onMouseOut();}}).css(css);}});},cleanData:function(){}});seriesTypes.scatter=ScatterSeries;var PiePoint=extendClass(Point,{init:function(){Point.prototype.init.apply(this,arguments);var point=this,toggleSlice;extend(point,{visible:point.visible!==false,name:pick(point.name,'Slice')});toggleSlice=function(){point.slice();};addEvent(point,'select',toggleSlice);addEvent(point,'unselect',toggleSlice);return point;},setVisible:function(vis){var point=this,chart=point.series.chart,tracker=point.tracker,dataLabel=point.dataLabel,connector=point.connector,method;point.visible=vis=vis===UNDEFINED?!point.visible:vis;method=vis?'show':'hide';point.group[method]();if(tracker){tracker[method]();}
+if(dataLabel){dataLabel[method]();}
+if(connector){connector[method]();}
+if(point.legendItem){chart.legend.colorizeItem(point,vis);}},slice:function(sliced,redraw,animation){var point=this,series=point.series,chart=series.chart,slicedTranslation=point.slicedTranslation,translation;setAnimation(animation,chart);redraw=pick(redraw,true);sliced=point.sliced=defined(sliced)?sliced:!point.sliced;translation={translateX:(sliced?slicedTranslation[0]:chart.plotLeft),translateY:(sliced?slicedTranslation[1]:chart.plotTop)};point.group.animate(translation);if(point.shadowGroup){point.shadowGroup.animate(translation);}}});var PieSeries=extendClass(Series,{type:'pie',isCartesian:false,pointClass:PiePoint,pointAttrToOptions:{stroke:'borderColor','stroke-width':'borderWidth',fill:'color'},getColor:function(){this.initialColor=colorCounter;},animate:function(init){var series=this,data=series.data;each(data,function(point){var graphic=point.graphic,args=point.shapeArgs,up=-mathPI/2;if(graphic){graphic.attr({r:0,start:up,end:up});graphic.animate({r:args.r,start:args.start,end:args.end},series.options.animation);}});series.animate=null;},translate:function(){var total=0,series=this,cumulative=-0.25,precision=1000,options=series.options,slicedOffset=options.slicedOffset,connectorOffset=slicedOffset+options.borderWidth,positions=options.center.concat([options.size,options.innerSize||0]),chart=series.chart,plotWidth=chart.plotWidth,plotHeight=chart.plotHeight,start,end,angle,data=series.data,circ=2*mathPI,fraction,smallestSize=mathMin(plotWidth,plotHeight),isPercent,radiusX,radiusY,labelDistance=options.dataLabels.distance;positions=map(positions,function(length,i){isPercent=/%$/.test(length);return isPercent?[plotWidth,plotHeight,smallestSize,smallestSize][i]*pInt(length)/100:length;});series.getX=function(y,left){angle=math.asin((y-positions[1])/(positions[2]/2+labelDistance));return positions[0]+
+(left?-1:1)*(mathCos(angle)*(positions[2]/2+labelDistance));};series.center=positions;each(data,function(point){total+=point.y;});each(data,function(point){fraction=total?point.y/total:0;start=mathRound(cumulative*circ*precision)/precision;cumulative+=fraction;end=mathRound(cumulative*circ*precision)/precision;point.shapeType='arc';point.shapeArgs={x:positions[0],y:positions[1],r:positions[2]/2,innerR:positions[3]/2,start:start,end:end};angle=(end+start)/2;point.slicedTranslation=map([mathCos(angle)*slicedOffset+chart.plotLeft,mathSin(angle)*slicedOffset+chart.plotTop],mathRound);radiusX=mathCos(angle)*positions[2]/2;radiusY=mathSin(angle)*positions[2]/2;point.tooltipPos=[positions[0]+radiusX*0.7,positions[1]+radiusY*0.7];point.labelPos=[positions[0]+radiusX+mathCos(angle)*labelDistance,positions[1]+radiusY+mathSin(angle)*labelDistance,positions[0]+radiusX+mathCos(angle)*connectorOffset,positions[1]+radiusY+mathSin(angle)*connectorOffset,positions[0]+radiusX,positions[1]+radiusY,labelDistance<0?'center':angle<circ/4?'left':'right',angle];point.percentage=fraction*100;point.total=total;});this.setTooltipPoints();},render:function(){var series=this;this.drawPoints();if(series.options.enableMouseTracking!==false){series.drawTracker();}
+this.drawDataLabels();if(series.options.animation&&series.animate){series.animate();}
+series.isDirty=false;},drawPoints:function(){var series=this,chart=series.chart,renderer=chart.renderer,groupTranslation,graphic,group,shadow=series.options.shadow,shadowGroup,shapeArgs;each(series.data,function(point){graphic=point.graphic;shapeArgs=point.shapeArgs;group=point.group;shadowGroup=point.shadowGroup;if(shadow&&!shadowGroup){shadowGroup=point.shadowGroup=renderer.g('shadow').attr({zIndex:4}).add();}
+if(!group){group=point.group=renderer.g('point').attr({zIndex:5}).add();}
+groupTranslation=point.sliced?point.slicedTranslation:[chart.plotLeft,chart.plotTop];group.translate(groupTranslation[0],groupTranslation[1]);if(shadowGroup){shadowGroup.translate(groupTranslation[0],groupTranslation[1]);}
+if(graphic){graphic.animate(shapeArgs);}else{point.graphic=renderer.arc(shapeArgs).attr(extend(point.pointAttr[NORMAL_STATE],{'stroke-linejoin':'round'})).add(point.group).shadow(shadow,shadowGroup);}
+if(point.visible===false){point.setVisible(false);}});},drawDataLabels:function(){var series=this,data=series.data,point,chart=series.chart,options=series.options.dataLabels,connectorPadding=pick(options.connectorPadding,10),connectorWidth=pick(options.connectorWidth,1),connector,connectorPath,outside=options.distance>0,dataLabel,labelPos,labelHeight,lastY,centerY=series.center[1],quarters=[[],[],[],[]],x,y,visibility,overlapping,rankArr,secondPass,sign,lowerHalf,sort,i=4,j;Series.prototype.drawDataLabels.apply(series);each(data,function(point){var angle=point.labelPos[7],quarter;if(angle<0){quarter=0;}else if(angle<mathPI/2){quarter=1;}else if(angle<mathPI){quarter=2;}else{quarter=3;}
+quarters[quarter].push(point);});quarters[1].reverse();quarters[3].reverse();sort=function(a,b){return a.y>b.y;};while(i--){overlapping=0;rankArr=[].concat(quarters[i]);rankArr.sort(sort);j=rankArr.length;while(j--){rankArr[j].rank=j;}
+for(secondPass=0;secondPass<2;secondPass++){lowerHalf=i%3;lastY=lowerHalf?9999:-9999;sign=lowerHalf?-1:1;for(j=0;j<quarters[i].length;j++){point=quarters[i][j];dataLabel=point.dataLabel;if(dataLabel){labelPos=point.labelPos;visibility=VISIBLE;x=labelPos[0];y=labelPos[1];if(!labelHeight){labelHeight=dataLabel&&dataLabel.getBBox().height;}
+if(outside){if(secondPass&&point.rank<overlapping){visibility=HIDDEN;}else if((!lowerHalf&&y<lastY+labelHeight)||(lowerHalf&&y>lastY-labelHeight)){y=lastY+sign*labelHeight;x=series.getX(y,i>1);if((!lowerHalf&&y+labelHeight>centerY)||(lowerHalf&&y-labelHeight<centerY)){if(secondPass){visibility=HIDDEN;}else{overlapping++;}}}}
+if(point.visible===false){visibility=HIDDEN;}
+if(visibility===VISIBLE){lastY=y;}
+if(secondPass){dataLabel.attr({visibility:visibility,align:labelPos[6]})[dataLabel.moved?'animate':'attr']({x:x+options.x+
+({left:connectorPadding,right:-connectorPadding}[labelPos[6]]||0),y:y+options.y});dataLabel.moved=true;if(outside&&connectorWidth){connector=point.connector;connectorPath=[M,x+(labelPos[6]==='left'?5:-5),y,L,x,y,L,labelPos[2],labelPos[3],L,labelPos[4],labelPos[5]];if(connector){connector.animate({d:connectorPath});connector.attr('visibility',visibility);}else{point.connector=connector=series.chart.renderer.path(connectorPath).attr({'stroke-width':connectorWidth,stroke:options.connectorColor||'#606060',visibility:visibility,zIndex:3}).translate(chart.plotLeft,chart.plotTop).add();}}}}}}}},drawTracker:ColumnSeries.prototype.drawTracker,getSymbol:function(){}});seriesTypes.pie=PieSeries;win.Highcharts={Chart:Chart,dateFormat:dateFormat,pathAnim:pathAnim,getOptions:getOptions,numberFormat:numberFormat,Point:Point,Color:Color,Renderer:Renderer,seriesTypes:seriesTypes,setOptions:setOptions,Series:Series,addEvent:addEvent,createElement:createElement,discardElement:discardElement,css:css,each:each,extend:extend,map:map,merge:merge,pick:pick,extendClass:extendClass,version:'2.1.5'};}());
+
+/* jquery.sparkline 1.5.1 - http://omnipotent.net/jquery.sparkline/ */
+
+(function($){$.fn.simpledraw=function(width,height,use_existing){if(use_existing&&this[0].vcanvas)return this[0].vcanvas;if(width==undefined)width=$(this).innerWidth();if(height==undefined)height=$(this).innerHeight();if($.browser.hasCanvas){return new vcanvas_canvas(width,height,this);}else if($.browser.msie){return new vcanvas_vml(width,height,this);}else{return false;}};var pending=[];$.fn.sparkline=function(uservalues,options){var options=$.extend({type:'line',lineColor:'#00f',fillColor:'#cdf',defaultPixelsPerValue:3,width:'auto',height:'auto',composite:false},options?options:{});return this.each(function(){var render=function(){var values=(uservalues=='html'||uservalues==undefined)?$(this).text().split(','):uservalues;var width=options.width=='auto'?values.length*options.defaultPixelsPerValue:options.width;if(options.height=='auto'){if(!options.composite||!this.vcanvas){var tmp=document.createElement('span');tmp.innerHTML='a';$(this).html(tmp);height=$(tmp).innerHeight();$(tmp).remove();}}else{height=options.height;}
+$.fn.sparkline[options.type].call(this,values,options,width,height);}
+if(($(this).html()&&$(this).is(':hidden'))||($.fn.jquery<"1.3.0"&&$(this).parents().is(':hidden'))){pending.push([this,render]);}else{render.call(this);}});};$.sparkline_display_visible=function(){for(var i=pending.length-1;i>=0;i--){var el=pending[i][0];if($(el).is(':visible')&&!$(el).parents().is(':hidden')){pending[i][1].call(el);pending.splice(i,1);}}};$.fn.sparkline.line=function(values,options,width,height){var options=$.extend({spotColor:'#f80',spotRadius:1.5,minSpotColor:'#f80',maxSpotColor:'#f80',lineWidth:1,normalRangeMin:undefined,normalRangeMax:undefined,normalRangeColor:'#ccc',chartRangeMin:undefined,chartRangeMax:undefined,chartRangeMinX:undefined,chartRangeMaxX:undefined},options?options:{});var xvalues=[],yvalues=[],yminmax=[];for(i=0;i<values.length;i++){var v=values[i];var isstr=typeof(values[i])=='string';var isarray=typeof(values[i])=='object'&&values[i]instanceof Array;var sp=isstr&&values[i].split(':');if(isstr&&sp.length==2){xvalues.push(Number(sp[0]));yvalues.push(Number(sp[1]));yminmax.push(Number(sp[1]));}else if(isarray){xvalues.push(values[i][0]);yvalues.push(values[i][1]);yminmax.push(values[i][1]);}else{xvalues.push(i);if(values[i]===null||values[i]=='null'){yvalues.push(null);}else{yvalues.push(Number(values[i]));yminmax.push(Number(values[i]));}}}
+if(options.xvalues){xvalues=options.xvalues;}
+var maxy=Math.max.apply(Math,yminmax);var maxyval=maxy;var miny=Math.min.apply(Math,yminmax);var minyval=miny;var maxx=Math.max.apply(Math,xvalues);var maxxval=maxx;var minx=Math.min.apply(Math,xvalues);var minxval=minx;if(options.normalRangeMin!=undefined){if(options.normalRangeMin<miny)
+miny=options.normalRangeMin;if(options.normalRangeMax>maxy)
+maxy=options.normalRangeMax;}
+if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<miny)){miny=options.chartRangeMin;}
+if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>maxy)){maxy=options.chartRangeMax;}
+if(options.chartRangeMinX!=undefined&&(options.chartRangeClipX||options.chartRangeMinX<minx)){minx=options.chartRangeMinX;}
+if(options.chartRangeMaxX!=undefined&&(options.chartRangeClipX||options.chartRangeMaxX>maxx)){maxx=options.chartRangeMaxX;}
+var rangex=maxx-minx==0?1:maxx-minx;var rangey=maxy-miny==0?1:maxy-miny;var vl=yvalues.length-1;if(vl<1){this.innerHTML='';return;}
+var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var canvas_top=0;var canvas_left=0;if(options.spotRadius&&(canvas_width<(options.spotRadius*4)||canvas_height<(options.spotRadius*4))){options.spotRadius=0;}
+if(options.spotRadius){if(options.minSpotColor||(options.spotColor&&yvalues[vl]==miny))
+canvas_height-=Math.ceil(options.spotRadius);if(options.maxSpotColor||(options.spotColor&&yvalues[vl]==maxy)){canvas_height-=Math.ceil(options.spotRadius);canvas_top+=Math.ceil(options.spotRadius);}
+if(options.minSpotColor||options.maxSpotColor&&(yvalues[0]==miny||yvalues[0]==maxy)){canvas_left+=Math.ceil(options.spotRadius);canvas_width-=Math.ceil(options.spotRadius);}
+if(options.spotColor||(options.minSpotColor||options.maxSpotColor&&(yvalues[vl]==miny||yvalues[vl]==maxy)))
+canvas_width-=Math.ceil(options.spotRadius);}
+canvas_height--;if(options.normalRangeMin!=undefined){var ytop=canvas_top+Math.round(canvas_height-(canvas_height*((options.normalRangeMax-miny)/rangey)));var height=Math.round((canvas_height*(options.normalRangeMax-options.normalRangeMin))/rangey);target.drawRect(canvas_left,ytop,canvas_width,height,undefined,options.normalRangeColor);}
+var path=[];var paths=[path];for(var i=0,vlen=yvalues.length;i<vlen;i++){var x=xvalues[i],y=yvalues[i];if(y===null){if(i){if(yvalues[i-1]!==null){path=[];paths.push(path);}}}else{if(y<miny)y=miny;if(y>maxy)y=maxy;if(!path.length){path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+canvas_height]);}
+path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((y-miny)/rangey)))]);}}
+for(var i=0,plen=paths.length;i<plen;i++){path=paths[i];if(!path.length)
+continue;if(options.fillColor){path.push([path[path.length-1][0],canvas_top+canvas_height-1]);target.drawShape(path,undefined,options.fillColor);path.pop();}
+if(path.length>2){path[0]=[path[0][0],path[1][1]];}
+target.drawShape(path,options.lineColor,undefined,options.lineWidth);}
+if(options.spotRadius&&options.spotColor){target.drawCircle(canvas_left+Math.round(xvalues[xvalues.length-1]*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((yvalues[vl]-miny)/rangey))),options.spotRadius,undefined,options.spotColor);}
+if(maxy!=minyval){if(options.spotRadius&&options.minSpotColor){var x=xvalues[yvalues.indexOf(minyval)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((minyval-miny)/rangey))),options.spotRadius,undefined,options.minSpotColor);}
+if(options.spotRadius&&options.maxSpotColor){var x=xvalues[yvalues.indexOf(maxyval)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((maxyval-miny)/rangey))),options.spotRadius,undefined,options.maxSpotColor);}}}else{this.innerHTML='';}};$.fn.sparkline.bar=function(values,options,width,height){var options=$.extend({type:'bar',barColor:'#00f',negBarColor:'#f44',zeroColor:undefined,nullColor:undefined,zeroAxis:undefined,barWidth:4,barSpacing:1,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false,colorMap:undefined},options?options:{});var width=(values.length*options.barWidth)+((values.length-1)*options.barSpacing);var num_values=[];for(var i=0,vlen=values.length;i<vlen;i++){if(values[i]=='null'||values[i]===null){values[i]=null;}else{values[i]=Number(values[i]);num_values.push(Number(values[i]));}}
+var max=Math.max.apply(Math,num_values);var min=Math.min.apply(Math,num_values);if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<min)){min=options.chartRangeMin;}
+if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>max)){max=options.chartRangeMax;}
+if(options.zeroAxis==undefined)options.zeroAxis=min<0;var range=max-min==0?1:max-min;if($.isArray(options.colorMap)){var colorMapByIndex=options.colorMap;var colorMapByValue=null;}else{var colorMapByIndex=null;var colorMapByValue=options.colorMap;}
+var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var yzero=min<0&&options.zeroAxis?canvas_height-Math.round(canvas_height*(Math.abs(min)/range))-1:canvas_height-1;for(var i=0,vlen=values.length;i<vlen;i++){var x=i*(options.barWidth+options.barSpacing);var val=values[i];if(val===null){if(options.nullColor){color=options.nullColor;val=(options.zeroAxis&&min<0)?0:min;var height=1;var y=(options.zeroAxis&&min<0)?yzero:canvas_height-height;}else{continue;}}else{if(val<min)val=min;if(val>max)val=max;var color=(val<0)?options.negBarColor:options.barColor;if(options.zeroAxis&&min<0){var height=Math.round(canvas_height*((Math.abs(val)/range)))+1;var y=(val<0)?yzero:yzero-height;}else{var height=Math.round(canvas_height*((val-min)/range))+1;var y=canvas_height-height;}
+if(val==0&&options.zeroColor!=undefined){color=options.zeroColor;}
+if(colorMapByValue&&colorMapByValue[val]){color=colorMapByValue[val];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
+if(color===null){continue;}}
+target.drawRect(x,y,options.barWidth-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.tristate=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({barWidth:4,barSpacing:1,posBarColor:'#6f6',negBarColor:'#f44',zeroBarColor:'#999',colorMap:{}},options);var width=(values.length*options.barWidth)+((values.length-1)*options.barSpacing);if($.isArray(options.colorMap)){var colorMapByIndex=options.colorMap;var colorMapByValue=null;}else{var colorMapByIndex=null;var colorMapByValue=options.colorMap;}
+var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var half_height=Math.round(canvas_height/2);for(var i=0,vlen=values.length;i<vlen;i++){var x=i*(options.barWidth+options.barSpacing);if(values[i]<0){var y=half_height;var height=half_height-1;var color=options.negBarColor;}else if(values[i]>0){var y=0;var height=half_height-1;var color=options.posBarColor;}else{var y=half_height-1;var height=2;var color=options.zeroBarColor;}
+if(colorMapByValue&&colorMapByValue[values[i]]){color=colorMapByValue[values[i]];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
+if(color===null){continue;}
+target.drawRect(x,y,options.barWidth-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.discrete=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({lineHeight:'auto',thresholdColor:undefined,thresholdValue:0,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false},options);width=options.width=='auto'?values.length*2:width;var interval=Math.floor(width/values.length);var target=$(this).simpledraw(width,height,options.composite);if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var line_height=options.lineHeight=='auto'?Math.round(canvas_height*0.3):options.lineHeight;var pheight=canvas_height-line_height;var min=Math.min.apply(Math,values);var max=Math.max.apply(Math,values);if(options.chartRangeMin!=undefined&&(options.chartRangeClip||options.chartRangeMin<min)){min=options.chartRangeMin;}
+if(options.chartRangeMax!=undefined&&(options.chartRangeClip||options.chartRangeMax>max)){max=options.chartRangeMax;}
+var range=max-min;for(var i=0,vlen=values.length;i<vlen;i++){var val=values[i];if(val<min)val=min;if(val>max)val=max;var x=(i*interval);var ytop=Math.round(pheight-pheight*((val-min)/range));target.drawLine(x,ytop,x,ytop+line_height,(options.thresholdColor&&val<options.thresholdValue)?options.thresholdColor:options.lineColor);}}else{this.innerHTML='';}};$.fn.sparkline.bullet=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({targetColor:'red',targetWidth:3,performanceColor:'blue',rangeColors:['#D3DAFE','#A8B6FF','#7F94FF'],base:undefined},options);width=options.width=='auto'?'4.0em':width;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width-Math.ceil(options.targetWidth/2);var canvas_height=target.pixel_height;var min=Math.min.apply(Math,values);var max=Math.max.apply(Math,values);if(options.base==undefined){var min=min<0?min:0;}else{min=options.base;}
+var range=max-min;for(i=2,vlen=values.length;i<vlen;i++){var rangeval=parseInt(values[i]);var rangewidth=Math.round(canvas_width*((rangeval-min)/range));target.drawRect(0,0,rangewidth-1,canvas_height-1,options.rangeColors[i-2],options.rangeColors[i-2]);}
+var perfval=parseInt(values[1]);var perfwidth=Math.round(canvas_width*((perfval-min)/range));target.drawRect(0,Math.round(canvas_height*0.3),perfwidth-1,Math.round(canvas_height*0.4)-1,options.performanceColor,options.performanceColor);var targetval=parseInt(values[0]);var x=Math.round(canvas_width*((targetval-min)/range)-(options.targetWidth/2));var targettop=Math.round(canvas_height*0.10);var targetheight=canvas_height-(targettop*2);target.drawRect(x,targettop,options.targetWidth-1,targetheight-1,options.targetColor,options.targetColor);}else{this.innerHTML='';}};$.fn.sparkline.pie=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({sliceColors:['#f00','#0f0','#00f']},options);width=options.width=='auto'?height:width;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var radius=Math.floor(Math.min(canvas_width,canvas_height)/2);var total=0;for(var i=0,vlen=values.length;i<vlen;i++)
+total+=values[i];var next=0;if(options.offset){next+=(2*Math.PI)*(options.offset/360);}
+var circle=2*Math.PI;for(var i=0,vlen=values.length;i<vlen;i++){var start=next;var end=next;if(total>0){end=next+(circle*(values[i]/total));}
+target.drawPieSlice(radius,radius,radius,start,end,undefined,options.sliceColors[i%options.sliceColors.length]);next=end;}}};function quartile(values,q){if(q==2){var vl2=Math.floor(values.length/2);return values.length%2?values[vl2]:(values[vl2]+values[vl2+1])/2;}else{var vl4=Math.floor(values.length/4);return values.length%2?(values[vl4*q]+values[vl4*q+1])/2:values[vl4*q];}};$.fn.sparkline.box=function(values,options,width,height){values=$.map(values,Number);var options=$.extend({raw:false,boxLineColor:'black',boxFillColor:'#cdf',whiskerColor:'black',outlierLineColor:'#333',outlierFillColor:'white',medianColor:'red',showOutliers:true,outlierIQR:1.5,spotRadius:1.5,target:undefined,targetColor:'#4a2',chartRangeMax:undefined,chartRangeMin:undefined},options);width=options.width=='auto'?'4.0em':width;minvalue=options.chartRangeMin==undefined?Math.min.apply(Math,values):options.chartRangeMin;maxvalue=options.chartRangeMax==undefined?Math.max.apply(Math,values):options.chartRangeMax;var target=$(this).simpledraw(width,height,options.composite);if(target&&values.length>1){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;if(options.raw){if(options.showOutliers&&values.length>5){var loutlier=values[0],lwhisker=values[1],q1=values[2],q2=values[3],q3=values[4],rwhisker=values[5],routlier=values[6];}else{var lwhisker=values[0],q1=values[1],q2=values[2],q3=values[3],rwhisker=values[4];}}else{values.sort(function(a,b){return a-b;});var q1=quartile(values,1);var q2=quartile(values,2);var q3=quartile(values,3);var iqr=q3-q1;if(options.showOutliers){var lwhisker=undefined,rwhisker=undefined;for(var i=0,vlen=values.length;i<vlen;i++){if(lwhisker==undefined&&values[i]>q1-(iqr*options.outlierIQR))
+lwhisker=values[i];if(values[i]<q3+(iqr*options.outlierIQR))
+rwhisker=values[i];}
+var loutlier=values[0];var routlier=values[values.length-1];}else{var lwhisker=values[0];var rwhisker=values[values.length-1];}}
+var unitsize=canvas_width/(maxvalue-minvalue+1);var canvas_left=0;if(options.showOutliers){canvas_left=Math.ceil(options.spotRadius);canvas_width-=2*Math.ceil(options.spotRadius);var unitsize=canvas_width/(maxvalue-minvalue+1);if(loutlier<lwhisker)
+target.drawCircle((loutlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.spotRadius,options.outlierLineColor,options.outlierFillColor);if(routlier>rwhisker)
+target.drawCircle((routlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.spotRadius,options.outlierLineColor,options.outlierFillColor);}
+target.drawRect(Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q3-q1)*unitsize),Math.round(canvas_height*0.8),options.boxLineColor,options.boxFillColor);target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.lineColor);target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.whiskerColor);target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q3-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.lineColor);target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.whiskerColor);target.drawLine(Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.9),options.medianColor);if(options.target){var size=Math.ceil(options.spotRadius);target.drawLine(Math.round((options.target-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)-size),Math.round((options.target-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)+size),options.targetColor);target.drawLine(Math.round((options.target-minvalue)*unitsize+canvas_left-size),Math.round(canvas_height/2),Math.round((options.target-minvalue)*unitsize+canvas_left+size),Math.round(canvas_height/2),options.targetColor);}}else{this.innerHTML='';}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(entry){for(var i=0,vlen=this.length;i<vlen;i++){if(this[i]==entry)
+return i;}
+return-1;}}
+if($.browser.msie&&!document.namespaces['v']){document.namespaces.add('v','urn:schemas-microsoft-com:vml','#default#VML');}
+if($.browser.hasCanvas==undefined){var t=document.createElement('canvas');$.browser.hasCanvas=t.getContext!=undefined;}
+var vcanvas_base=function(width,height,target){};vcanvas_base.prototype={init:function(width,height,target){this.width=width;this.height=height;this.target=target;if(target[0])target=target[0];target.vcanvas=this;},drawShape:function(path,lineColor,fillColor,lineWidth){alert('drawShape not implemented');},drawLine:function(x1,y1,x2,y2,lineColor,lineWidth){return this.drawShape([[x1,y1],[x2,y2]],lineColor,lineWidth);},drawCircle:function(x,y,radius,lineColor,fillColor){alert('drawCircle not implemented');},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){alert('drawPieSlice not implemented');},drawRect:function(x,y,width,height,lineColor,fillColor){alert('drawRect not implemented');},getElement:function(){return this.canvas;},_insert:function(el,target){$(target).html(el);}};var vcanvas_canvas=function(width,height,target){return this.init(width,height,target);};vcanvas_canvas.prototype=$.extend(new vcanvas_base,{_super:vcanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);this.canvas=document.createElement('canvas');if(target[0])target=target[0];target.vcanvas=this;$(this.canvas).css({display:'inline-block',width:width,height:height,verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;$(this.canvas).css({width:this.pixel_width,height:this.pixel_height});},_getContext:function(lineColor,fillColor,lineWidth){var context=this.canvas.getContext('2d');if(lineColor!=undefined)
+context.strokeStyle=lineColor;context.lineWidth=lineWidth==undefined?1:lineWidth;if(fillColor!=undefined)
+context.fillStyle=fillColor;return context;},drawShape:function(path,lineColor,fillColor,lineWidth){var context=this._getContext(lineColor,fillColor,lineWidth);context.beginPath();context.moveTo(path[0][0]+0.5,path[0][1]+0.5);for(var i=1,plen=path.length;i<plen;i++){context.lineTo(path[i][0]+0.5,path[i][1]+0.5);}
+if(lineColor!=undefined){context.stroke();}
+if(fillColor!=undefined){context.fill();}},drawCircle:function(x,y,radius,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.arc(x,y,radius,0,2*Math.PI,false);if(lineColor!=undefined){context.stroke();}
+if(fillColor!=undefined){context.fill();}},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.moveTo(x,y);context.arc(x,y,radius,startAngle,endAngle,false);context.lineTo(x,y);context.closePath();if(lineColor!=undefined){context.stroke();}
+if(fillColor){context.fill();}},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x+width,y],[x+width,y+height],[x,y+height],[x,y]],lineColor,fillColor);}});var vcanvas_vml=function(width,height,target){return this.init(width,height,target);};vcanvas_vml.prototype=$.extend(new vcanvas_base,{_super:vcanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);if(target[0])target=target[0];target.vcanvas=this;this.canvas=document.createElement('span');$(this.canvas).css({display:'inline-block',position:'relative',overflow:'hidden',width:width,height:height,margin:'0px',padding:'0px',verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;;var groupel='<v:group coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'"'
++' style="position:absolute;top:0;left:0;width:'+this.pixel_width+'px;height='+this.pixel_height+'px;"></v:group>';this.canvas.insertAdjacentHTML('beforeEnd',groupel);this.group=$(this.canvas).children()[0];},drawShape:function(path,lineColor,fillColor,lineWidth){var vpath=[];for(var i=0,plen=path.length;i<plen;i++){vpath[i]=''+(path[i][0])+','+(path[i][1]);}
+var initial=vpath.splice(0,1);lineWidth=lineWidth==undefined?1:lineWidth;var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="'+lineWidth+'" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var closed=vpath[0]==vpath[vpath.length-1]?'x ':'';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '
++stroke
++fill
++' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '
++' path="m '+initial+' l '+vpath.join(', ')+' '+closed+'e">'
++' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawCircle:function(x,y,radius,lineColor,fillColor){x-=radius+1;y-=radius+1;var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:oval '
++stroke
++fill
++' style="position:absolute;top:'+y+'px; left:'+x+'px; width:'+(radius*2)+'px; height:'+(radius*2)+'px"></v:oval>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){if(startAngle==endAngle){return;}
+if((endAngle-startAngle)==(2*Math.PI)){startAngle=0.0;endAngle=(2*Math.PI);}
+var startx=x+Math.round(Math.cos(startAngle)*radius);var starty=y+Math.round(Math.sin(startAngle)*radius);var endx=x+Math.round(Math.cos(endAngle)*radius);var endy=y+Math.round(Math.sin(endAngle)*radius);if(startx==endx&&starty==endy&&(endAngle-startAngle)<Math.PI)
+return;var vpath=[x-radius,y-radius,x+radius,y+radius,startx,starty,endx,endy];var stroke=lineColor==undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor==undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '
++stroke
++fill
++' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '
++' path="m '+x+','+y+' wa '+vpath.join(', ')+' x e">'
++' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x,y+height],[x+width,y+height],[x+width,y],[x,y]],lineColor,fillColor);}});})(jQuery);
+
+ </script>
<%= yield(:header) %>
@@ -647,4 +724,4 @@
<%= yield(:footer) %>
</body>
-</html>
\ No newline at end of file
+</html>
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups
^
|
+(directory)
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/_form.html.erb
^
|
@@ -0,0 +1,39 @@
+<div class="note lookups" style='margin:10px;'>
+ Lookup sources are available within the event show view via the source &
+ destination address menus. A following are allowed URL variables: ${ip} and ${port}.
+
+ <strong>Example: http://www.example.com/lookup?address=${ip}</strong>
+</div>
+
+<div id='lookup-form' class='grid_12 boxit page'>
+ <%= form_for @lookup, :html => { :class => 'validate' } do |f| %>
+
+ <%= error_messages_for(@lookup) %>
+
+ <p class='form-order'>
+ <%= f.label 'Lookup Title' %><br />
+ <%= f.text_field :title, :class => 'required large', :placeholder => 'Example.com Address Lookup', :autocomplete => :off %>
+ </p>
+
+ <p class='form-order'>
+ <%= f.label 'Lookup Source URL' %><br />
+ <%= f.text_field :value, :class => 'required large', :placeholder => 'Source URL', :autocomplete => :off %>
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <%= form_actions do %>
+
+ <%= button "Save lookup Source", :class => 'success' %>
+
+ <%= button "Cancel", :class => 'warning cancel' %>
+
+ <% end %>
+
+ <% end %>
+
+</div>
+
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/_lookup.html.erb
^
|
@@ -0,0 +1,7 @@
+<tr>
+ <td class='first'><%= lookup.title %></td>
+ <td><%= lookup.value %></td>
+ <td><%= link_to "Edit", edit_lookup_path(lookup) %></td>
+ <td class='last'><%= link_to image_tag("icons/destroy.png", :size => '16x16', :class => 'trash'), lookup_path(lookup), :method => :delete, :confirm => 'Are you sure you want to remove this lookup?' %></td>
+</tr>
+
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/edit.html.erb
^
|
@@ -0,0 +1,8 @@
+<%= title "Edit Lookup Source" do -%>
+
+ <%= render :partial => 'settings/menu' %>
+
+<%- end -%>
+
+<%= render 'form' %>
+
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/index.html.erb
^
|
@@ -0,0 +1,25 @@
+<%= title "Lookup Sources" do -%>
+
+ <%= menu_item "Add Lookup Source", new_lookup_path, 'icons/add.png' %>
+ <%= render :partial => 'settings/menu' %>
+
+<%- end -%>
+
+<div id="lookups" class='grid_12 page boxit'>
+
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <th>Menu Title</th>
+ <th>URL</th>
+ <th>Edit</th>
+ <th>Destroy</th>
+ </tr>
+ <tbody class='lookups'>
+ <%= render @lookups %>
+ </tbody>
+ </table>
+
+ <%= pager(@lookups, '/lookups') %>
+
+</div>
+
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/new.html.erb
^
|
@@ -0,0 +1,8 @@
+<%= title "New Lookup Source" do -%>
+
+ <%= render :partial => 'settings/menu' %>
+
+<%- end -%>
+
+<%= render 'form' %>
+
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/app/views/lookups/show.html.erb
^
|
@@ -0,0 +1,5 @@
+<p id="notice"><%= notice %></p>
+
+
+<%= link_to 'Edit', edit_lookup_path(@lookup) %> |
+<%= link_to 'Back', lookups_path %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_events.html.erb
^
|
@@ -10,16 +10,39 @@
<li class='header'>
<div class='row'>
- <div class='small'><%= check_box_tag 'event-select-all', nil, false, :class => 'event-select-all' %></div>
- <div class='small'> </div>
- <div class='small'>Sev.</div>
- <div class='address'>Sensor</div>
- <div class='address'>Source IP</div>
- <div class='address'>Destination IP</div>
- <div class='signature'>Event Signature</div>
- <div class='timestamp'> </div>
+ <div class='small'>
+ <%= check_box_tag 'event-select-all', nil, false, :class => 'event-select-all' %>
+ </div>
+
+ <div class='small'> </div>
+
+ <div class='small'>
+ <%= sortable(:sig_priority, 'Sev.')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:sid, 'Sensor')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:ip_src, 'Source IP')%>
+ </div>
+
+ <div class='address'>
+ <%= sortable(:ip_dst, 'Destination IP')%>
+ </div>
+
+ <div class='signature'>
+ <%= sortable(:sig_name, 'Event Signature')%>
+ </div>
+
+ <div class='timestamp'>
+ <%= sortable(:timestamp, 'Timestamp')%>
+ </div>
+
</div>
</li>
+
<div class='content'>
<%= render @events %>
@@ -31,4 +54,4 @@
<%= pager(@events, request.fullpath) %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_dashboard.html.erb
^
|
@@ -13,7 +13,7 @@
<%= render :partial => 'graph_source_ips.html.erb' %>
<%= render :partial => 'graph_destination_ips.html.erb' %>
-
+
</div>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_destination_ips.html.erb
^
|
@@ -13,6 +13,9 @@
renderTo: 'destination-ips-graph',
margin: [50, 165, 50, 160]
},
+ credits: {
+ enabled: false
+ },
title: {
text: ''
},
@@ -23,6 +26,14 @@
},
plotOptions: {
pie: {
+ events: {
+ click: function(event) {
+ HCloader(event.toElement.offsetParent.id);
+ document.location = '/results?search[ip_dst]=' +
+ event.point.name + '&search[time_start]=<%= @start_time.to_i %>' +
+ '&search[time_end]=<%= @end_time.to_i %>';
+ },
+ },
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
@@ -57,4 +68,4 @@
<div id='destination-ips-graph' style='display:none;' class='dashboard-graph'></div>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_event.html.erb
^
|
@@ -11,6 +11,9 @@
marginTop: 50,
marginBottom: 50
},
+ credits: {
+ enabled: false
+ },
title: {
text: 'Event Count vs Time By Sensor',
x: -20 //center
@@ -25,6 +28,8 @@
text: 'Date of Month'
<% elsif (@range == 'week' || @range == 'last_week') %>
text: 'Date Of Week'
+ <% elsif @range == 'last_24' %>
+ text: 'Last 24 Hours'
<% else %>
text: 'Hour of Day'
<% end %>
@@ -64,4 +69,4 @@
<% end %>
-<div id='events-graph' class='dashboard-graph'></div>
\ No newline at end of file
+<div id='events-graph' class='dashboard-graph'></div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_protocol.html.erb
^
|
@@ -11,6 +11,9 @@
marginTop: 50,
marginBottom: 50
},
+ credits: {
+ enabled: false
+ },
title: {
text: 'Protocol Count vs Time',
x: -20 //center
@@ -25,6 +28,8 @@
text: 'Date of Month'
<% elsif (@range == 'week' || @range == 'last_week') %>
text: 'Date Of Week'
+ <% elsif @range == 'last_24' %>
+ text: 'Last 24 Hours'
<% else %>
text: 'Hour of Day'
<% end %>
@@ -58,13 +63,13 @@
},
series: [{
name: 'TCP',
- data: <%= @tcp %>
+ data: [<%= @tcp.join(', ') %>]
},{
name: 'UDP',
- data: <%= @udp %>
+ data: [<%= @udp.join(', ') %>]
},{
name: 'ICMP',
- data: <%= @icmp %>
+ data: [<%= @icmp.join(', ') %>]
}]
});
@@ -73,4 +78,4 @@
<% end %>
-<div id='protocol-graph' style='display:none;' class='dashboard-graph'></div>
\ No newline at end of file
+<div id='protocol-graph' style='display:none;' class='dashboard-graph'></div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_severity.html.erb
^
|
@@ -11,6 +11,9 @@
marginTop: 50,
marginBottom: 50
},
+ credits: {
+ enabled: false
+ },
title: {
text: 'Severity Count vs Time',
x: -20 //center
@@ -25,6 +28,8 @@
text: 'Date of Month'
<% elsif (@range == 'week' || @range == 'last_week') %>
text: 'Date Of Week'
+ <% elsif @range == 'last_24' %>
+ text: 'Last 24 Hours'
<% else %>
text: 'Hour of Day'
<% end %>
@@ -57,14 +62,17 @@
backgroundColor: '#fff'
},
series: [{
- name: 'High Severity',
- data: <%= @high %>
+ name: 'High Severity',
+ color: sev1_bg_color,
+ data: [<%= @high.join(', ') %>]
},{
name: 'Medium Severity',
- data: <%= @medium %>
+ color: sev2_bg_color,
+ data: [<%= @medium.join(', ') %>]
},{
- name: 'Low Severity',
- data: <%= @low %>
+ name: 'Low Severity',
+ color: sev3_bg_color,
+ data: [<%= @low.join(', ') %>]
}]
});
@@ -73,4 +81,4 @@
<% end %>
-<div id='severity-graph' style='display:none;' class='dashboard-graph'></div>
\ No newline at end of file
+<div id='severity-graph' style='display:none;' class='dashboard-graph'></div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_signature.html.erb
^
|
@@ -13,6 +13,9 @@
renderTo: 'signature-graph',
margin: [50, 165, 50, 160]
},
+ credits: {
+ enabled: false
+ },
title: {
text: ''
},
@@ -23,6 +26,14 @@
},
plotOptions: {
pie: {
+ events: {
+ click: function(event) {
+ HCloader(event.toElement.offsetParent.id);
+ document.location = '/results?search[signature_name]=' +
+ event.point.name + '&search[time_start]=<%= @start_time.to_i %>' +
+ '&search[time_end]=<%= @end_time.to_i %>';
+ }
+ },
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
@@ -57,4 +68,4 @@
<div id='signature-graph' style='display:none;' class='dashboard-graph'></div>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_graph_source_ips.html.erb
^
|
@@ -17,6 +17,9 @@
renderTo: 'source-ips-graph',
margin: [50, 165, 50, 160]
},
+ credits: {
+ enabled: false
+ },
title: {
text: ''
},
@@ -27,6 +30,14 @@
},
plotOptions: {
pie: {
+ events: {
+ click: function(event) {
+ HCloader(event.toElement.offsetParent.id);
+ document.location = '/results?search[ip_src]=' +
+ event.point.name + '&search[time_start]=<%= @start_time.to_i %>' +
+ '&search[time_end]=<%= @end_time.to_i %>';
+ },
+ },
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
@@ -59,4 +70,4 @@
<div id='source-ips-graph' style='display:none;' class='dashboard-graph'></div>
-<% end %>
\ No newline at end of file
+<% end %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_proto_dashboard.html.erb
^
|
@@ -78,4 +78,4 @@
<span><%= @icmp.sum %> / <%= @event_count %></span>
</div>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/_severity_dashboard.html.erb
^
|
@@ -1,14 +1,22 @@
<% content_for :footer do %>
<script type="text/javascript">
- $('#sev1-graph').sparkline(<%= @high %>, { barWidth: 6, height: 40, type: 'bar', barColor: sev1_bg_color } );
- $('#sev2-graph').sparkline(<%= @medium %>, { barWidth: 6, height: 40, type: 'bar', barColor: sev2_bg_color } );
- $('#sev3-graph').sparkline(<%= @low %>, { barWidth: 6, height: 40, type: 'bar', barColor: sev3_bg_color } );
+ $('#sev1-graph').sparkline([<%= @high.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev1_bg_color
+ });
+
+ $('#sev2-graph').sparkline([<%= @medium.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev2_bg_color
+ });
+
+ $('#sev3-graph').sparkline([<%= @low.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev3_bg_color
+ });
</script>
<% end %>
-<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "High Severity Events", :search => { :severity => 1, :timestamp => "#{@start_time.to_date} - #{@end_time.to_date}" }) %>'>
+<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "High Severity Events", :search => { :severity => 1, :time_end => "#{@end_time.to_i}", :time_start => "#{@start_time.to_i}" }) %>'>
<div class='content shadow-in'>
<div class='data'>
@@ -32,7 +40,7 @@
</div>
-<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "Medium Severity Events", :search => { :severity => 2, :timestamp => "#{@start_time.to_date} - #{@end_time.to_date}" }) %>'>
+<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "Medium Severity Events", :search => { :severity => 2, :time_end => "#{@end_time.to_i}", :time_start => "#{@start_time.to_i}" }) %>'>
<div class='content shadow-in'>
<div class='data'>
@@ -56,7 +64,7 @@
</div>
-<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "Low Severity Events", :search => { :severity => 3, :timestamp => "#{@start_time.to_date} - #{@end_time.to_date}" }) %>'>
+<div class='box grid_3 alpha shadow round' data-url='<%= results_path(:title => "Low Severity Events", :search => { :severity => 3, :time_end => "#{@end_time.to_i}", :time_start => "#{@start_time.to_i}" }) %>'>
<div class='content shadow-in'>
<div class='data'>
@@ -78,4 +86,4 @@
<span><%= @low.sum %> / <%= @event_count %></span>
</div>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/dashboard.html.erb
^
|
@@ -19,20 +19,30 @@
<div class='main grid_9'>
<div class='dashboard-menu'>
-
+
<ul>
+
+ <li class='<%= "active" if @range == 'last_24' %> add_tipsy' title="<%= time_range_title(:last_24) %>"><%= link_to "Last 24", dashboard_path(:range => :last_24) %></li>
- <li class='<%= "active" if @range == 'today' %>'><%= link_to "Today", dashboard_path(:range => :today) %></li>
-
- <li class='<%= "active" if @range == 'yesterday' %>'><%= link_to "Yesterday", dashboard_path(:range => :yesterday) %></li>
-
- <li class='<%= "active" if @range == 'week' %>'><%= link_to "This Week", dashboard_path(:range => :week) %></li>
+ <li class='<%= "active" if @range == 'today' %> add_tipsy' title="<%= time_range_title(:today) %>"><%= link_to "Today", dashboard_path(:range => :today) %></li>
- <li class='<%= "active" if @range == 'month' %>'><%= link_to "This Month", dashboard_path(:range => :month) %></li>
+ <li class='<%= "active" if @range == 'yesterday' %> add_tipsy' title="<%= time_range_title(:yesterday) %>"><%= link_to "Yesterday", dashboard_path(:range => :yesterday) %></li>
+
+ <% if @now.beginning_of_week.day == @now.day %>
+ <li class='<%= "active" if @range == 'last_week' %> add_tipsy' title="<%= time_range_title(:last_week) %>"><%= link_to "Last Week", dashboard_path(:range => :last_week) %></li>
+ <% else %>
+ <li class='<%= "active" if @range == 'week' %> add_tipsy' title="<%= time_range_title(:week) %>"><%= link_to "This Week", dashboard_path(:range => :week) %></li>
+ <% end %>
+
+ <% if @now.day == 1 %>
+ <li class='<%= "active" if @range == 'last_month' %> add_tipsy' title="<%= time_range_title(:last_month) %>"><%= link_to "Last Month", dashboard_path(:range => :last_month) %></li>
+ <% else %>
+ <li class='<%= "active" if @range == 'month' %> add_tipsy' title="<%= time_range_title(:month) %>"><%= link_to "This Month", dashboard_path(:range => :month) %></li>
+ <% end %>
- <li class='<%= "active" if @range == 'quarter' %>'><%= link_to "This Quarter", dashboard_path(:range => :quarter) %></li>
+ <li class='<%= "active" if @range == 'quarter' %> add_tipsy' title="<%= time_range_title(:quarter) %>"><%= link_to "This Quarter", dashboard_path(:range => :quarter) %></li>
- <li class='<%= "active" if @range == 'year' %>'><%= link_to "This Year", dashboard_path(:range => :year) %></li>
+ <li class='<%= "active" if @range == 'year' %> add_tipsy' title="<%= time_range_title(:year) %>"><%= link_to "This Year", dashboard_path(:range => :year) %></li>
<% if Snorby::Jobs.caching? %>
<% content_for :footer do %>
@@ -46,7 +56,7 @@
<% else %>
<% unless %w(yesterday week last_week month last_month year quarter).include?(params[:range]) %>
- <li class='right'><i>Last Updated: <%= @last_cache.strftime('%D %l:%M:%S %p') %></i></li>
+ <li class='right'><i>Updated: <%= @last_cache.strftime('%D %l:%M:%S %p') %></i></li>
<% end %>
<% end %>
@@ -68,7 +78,7 @@
<li><%= link_to "Signatures", '#', :class => 'show_signature_graph' %></li>
<li><%= link_to "Sources", '#', :class => 'show_source_ips_graph' %></li>
- <li><%= link_to "Destinations", '#', :class => 'show_destination_ips_graph' %></li>
+ <li><%= link_to "Destinations", '#', :class => 'show_destination_ips_graph' %></li>
</ul>
@@ -87,7 +97,12 @@
<ul class='box-list'>
<% @sensors.each do |sensor| %>
<li><%= link_to truncate(sensor.sensor_name, :length => 30), results_path(:title => "#{sensor.sensor_name}",
- :search => { :sid => sensor.sid }), :title => sensor.sensor_name %> <span><%= sensor.events_count %></span></li>
+ :search => { :sid => sensor.sid }), :title => sensor.sensor_name %>
+
+ <span>
+ <%= sensor.events_count.zero? ? sensor.events.count : sensor.events_count %>
+ </span>
+ </li>
<% end %>
</ul>
@@ -97,7 +112,7 @@
<ul class='box-list'>
<% @favers.each do |user| %>
- <li>
+ <li class='has-image'>
<%= image_tag(user.avatar.url(:small), :size => '16x16', :class => 'avatar-small') %>
<%= link_to truncate(user.name, :length => 30), activity_events_path(:user_id => user.id), :title => user.name %>
<span><%= user.favorites_count %></span>
@@ -111,8 +126,13 @@
<ul class='box-list'>
<% @recent_events.each do |event| %>
- <li><%= link_to truncate(event.signature.name, :length => 25), results_path(:title => "#{truncate(event.signature.name, :length => 40)}",
- :search => {:signature_name => "#{event.signature.name}"}), :title => event.signature.name %> <span><%= event.signature.events_count %></span></li>
+ <li>
+ <%= link_to truncate(event.signature.name, :length => 25), results_path(:title => "#{truncate(event.signature.name, :length => 40)}",
+ :search => {:signature_name => "#{event.signature.name}"}), :title => event.signature.name %>
+ <span>
+ <%= event.signature.events_count.zero? ? event.signature.events.count : event.signature.events_count %>
+ </span>
+ </li>
<% end %>
</ul>
@@ -130,4 +150,4 @@
</div>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/dashboard.pdf.erb
^
|
@@ -18,8 +18,12 @@
marginTop: 50,
marginBottom: 50,
borderColor: 'transparent',
- borderWidth: 0
+ borderWidth: 0,
+ backgroundColor: '#fff'
},
+ credits: {
+ enabled: false
+ },
title: {
text: 'Event Count vs Time By Sensor',
x: -20 //center
@@ -78,8 +82,12 @@
marginTop: 50,
marginBottom: 50,
borderColor: 'transparent',
- borderWidth: 0
- },
+ borderWidth: 0,
+ backgroundColor: '#fff'
+ },
+ credits: {
+ enabled: false
+ },
title: {
text: 'Protocol Count vs Time',
x: -20 //center
@@ -128,13 +136,13 @@
},
series: [{
name: 'TCP',
- data: <%= @tcp %>
+ data: [<%= @tcp.join(', ') %>]
},{
name: 'UDP',
- data: <%= @udp %>
+ data: [<%= @udp.join(', ') %>]
},{
name: 'ICMP',
- data: <%= @icmp %>
+ data: [<%= @icmp.join(', ') %>]
}]
});
@@ -147,8 +155,12 @@
marginTop: 50,
marginBottom: 50,
borderColor: 'transparent',
- borderWidth: 0
- },
+ borderWidth: 0,
+ backgroundColor: '#fff'
+ },
+ credits: {
+ enabled: false
+ },
title: {
text: 'Severity Count vs Time',
x: -20 //center
@@ -195,21 +207,32 @@
borderColor: '#ddd',
backgroundColor: '#fff'
},
- series: [{
- name: 'High Severity',
- data: <%= @high %>
- },{
- name: 'Medium Severity',
- data: <%= @medium %>
- },{
- name: 'Low Severity',
- data: <%= @low %>
- }]
+ series: [{
+ name: 'High Severity',
+ color: sev1_bg_color,
+ data: [<%= @high.join(', ') %>]
+ },{
+ name: 'Medium Severity',
+ color: sev2_bg_color,
+ data: [<%= @medium.join(', ') %>]
+ },{
+ name: 'Low Severity',
+ color: sev3_bg_color,
+ data: [<%= @low.join(', ') %>]
+ }]
});
- $('#sev1-graph').sparkline(<%= @high %>, { barWidth: 3, height: 25, type: 'bar', barColor: sev1_bg_color } );
- $('#sev2-graph').sparkline(<%= @medium %>, { barWidth: 3, height: 25, type: 'bar', barColor: sev2_bg_color } );
- $('#sev3-graph').sparkline(<%= @low %>, { barWidth: 3, height: 25, type: 'bar', barColor: sev3_bg_color } );
+ $('#sev1-graph').sparkline([<%= @high.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev1_bg_color
+ });
+
+ $('#sev2-graph').sparkline([<%= @medium.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev2_bg_color
+ });
+
+ $('#sev3-graph').sparkline([<%= @low.join(',') %>], {
+ barWidth: 6, height: 40, type: 'bar', barColor: sev3_bg_color
+ });
</script>
@@ -238,15 +261,15 @@
<h2>Severities</h2>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <th>High Severity</th>
- <th>Medium Severity</th>
- <th>Low Severity</th>
+ <th>High Severity (<%= @high.sum %>)</th>
+ <th>Medium Severity (<%= @medium.sum %>)</th>
+ <th>Low Severity (<%= @low.sum %>)</th>
<th>Total</th>
</tr>
<tr>
- <td style='width:200px'><%= @high.sum %> <div id="sev1-graph" style='float:left;'></div></td>
- <td style='width:200px'><%= @medium.sum %> <div id="sev2-graph" style='float:left;'></div></td>
- <td style='width:200px'><%= @low.sum %> <div id="sev3-graph" style='float:left;'></div></td>
+ <td style='width:200px'><div id="sev1-graph" style='float:left;'></div></td>
+ <td style='width:200px'><div id="sev2-graph" style='float:left;'></div></td>
+ <td style='width:200px'><div id="sev3-graph" style='float:left;'></div></td>
<td style='width:100px'><%= @event_count %></td>
</tr>
</table>
@@ -347,4 +370,4 @@
<% end %>
</table>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/results.html.erb
^
|
@@ -1,17 +1,18 @@
<% if params[:title] %>
<%= title "#{truncate(h(params[:title]))} <i>#{pluralize(@events.pager.total, 'event')} found</i>".html_safe, "#{h(params[:title])}" do %>
+ <%= menu_item "Hotkeys", hotkey_events_path, 'events/keyboard.png', :class => 'snorbybox' %>
<%= render :partial => 'events/menu' %>
<% end %>
<% else %>
<%= title "Search Results <i>#{pluralize(@events.pager.total, 'event')} found</i>".html_safe, 'Search Results' do %>
+ <%= menu_item "Hotkeys", hotkey_events_path, 'events/keyboard.png', :class => 'snorbybox' %>
<%= render :partial => 'events/menu' %>
<% end %>
<% end %>
<%= render :partial => 'page/events' %>
-
-<%= render :partial => 'events/hotkeys' %>
\ No newline at end of file
+<%= render :partial => 'events/hotkeys' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/page/search.html.erb
^
|
@@ -1,17 +1,20 @@
-<%= title "Search" %>
+<%= title "Search Events" %>
<%= stylesheet 'jquery' %>
<%= javascript :footer, 'daterangepicker' %>
<% content_for :footer do %>
- <script type="text/javascript">
- $('.datepicker').daterangepicker();
+ <script type="text/javascript">
+ $('.datepicker').daterangepicker({
+ dateStart: 'Today',
+ dateEnd: 'Today',
+ earliestDate: 'Today'
+ });
</script>
<% end %>
-
<div id='search' class='boxit page grid_12'>
<%= form_tag results_path, :method => :get do %>
@@ -25,12 +28,12 @@
<div class='grid_4 alpha'>
<%= label_tag "Source Address" %><br />
- <%= text_field_tag '[search][ip_src]', params[:ip_src], :placeholder => 'Source Address' %>
+ <%= text_field_tag '[search][ip_src]', params[:ip_src], :placeholder => 'Source or CIDR notation' %>
</div>
<div class='grid_4 alpha'>
<%= label_tag "Destination Address" %><br />
- <%= text_field_tag '[search][ip_dst]', params[:ip_dst], :placeholder => 'Destination Address' %>
+ <%= text_field_tag '[search][ip_dst]', params[:ip_dst], :placeholder => 'Destination or CIDR notation' %>
</div>
<div class='grid_4 alpha'>
@@ -50,27 +53,27 @@
<div class='grid_4 alpha'>
<%= label_tag 'Select Sensor' %><br />
- <%= select_tag '[search][sid]', dropdown_select_tag(Sensor.all, :sid, true) %>
+ <%= select_tag '[search][sid]', dropdown_select_tag(Sensor.all, :sid, true), :class => 'add_chosen' %>
</div>
<div class='grid_4 alpha'>
<%= label_tag 'Select Classification' %><br />
- <%= select_tag '[search][classification_id]', dropdown_select_tag(Classification.all, :id, true, ["<option value='null'>Unclassified</option>"]) %>
+ <%= select_tag '[search][classification_id]', dropdown_select_tag(Classification.all, :id, true, ["<option value='null'>Unclassified</option>"]), :class => 'add_chosen' %>
</div>
<div class='grid_4 alpha'>
<%= label_tag 'Select Severity' %><br />
- <%= select_tag '[search][severity]', dropdown_select_tag(Severity.all, :sig_id, true) %>
+ <%= select_tag '[search][severity]', dropdown_select_tag(Severity.all, :sig_id, true), :class => 'add_chosen' %>
</div>
</div>
<%= form_actions do %>
- <%= button "Submit Search...", :class => 'success' %>
+ <%= button "Submit Search", :class => 'success' %>
<% end %>
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/settings/index.html.erb
^
|
@@ -14,22 +14,22 @@
<div class='grid_6'>
<p>
<%= label_tag 'Company Name' %><br />
- <%= text_field_tag '[settings][company]', (Setting.company ? Setting.find(:company) : nil), :placeholder => 'Company Name...', :autocomplete => :off, :class => 'required' %>
+ <%= text_field_tag '[settings][company]', (Setting.company ? Setting.find(:company) : nil), :placeholder => 'Company Name', :autocomplete => :off, :class => 'required' %>
</p>
<p>
<%= label_tag 'Company Email' %> <i>(this email will be used as the report sender)</i><br />
- <%= text_field_tag '[settings][email]', (Setting.email ? Setting.find(:email) : nil), :placeholder => 'Company Email...', :autocomplete => :off, :class => 'required email' %>
+ <%= text_field_tag '[settings][email]', (Setting.email ? Setting.find(:email) : nil), :placeholder => 'Company Email', :autocomplete => :off, :class => 'required email' %>
</p>
<p>
<%= label_tag 'Signature Lookup URL' %> <i>(user $$sid$$ and $$gid$$ for the get request parameters)</i><br />
- <%= text_field_tag '[settings][signature_lookup]', (Setting.signature_lookup ? Setting.find(:signature_lookup) : nil), :placeholder => 'Signature Lookup URL...', :autocomplete => :off, :class => 'required url' %>
+ <%= text_field_tag '[settings][signature_lookup]', (Setting.signature_lookup ? Setting.find(:signature_lookup) : nil), :placeholder => 'Signature Lookup URL', :autocomplete => :off, :class => 'required url' %>
</p>
<p>
<%= check_box_tag '[settings][packet_capture]', 0, (Setting.packet_capture ? Setting.find(:packet_capture) : nil) %> <%= label_tag 'Enable Packet Capture Support' %><br />
- <i>(Enable the Snorby Packet Capture Plugin)</i><br />
+ <i>(Enable the Snorby Packet Capture Plugin)</i>
</p>
@@ -60,6 +60,14 @@
<p>
<%= check_box_tag '[settings][notes]', 1, Setting.find(:notes) %> <%= label_tag 'Event Notes' %><br />
<i>(Allow analysts to apply notes to events)</i><br />
+ </p>
+
+ <p>
+ <%= check_box_tag '[settings][autodrop]', 1, Setting.find(:autodrop) %> <%= label_tag 'Prune database when event count is greater than' %>
+ <%= select_tag '[settings][autodrop_count]', "<option value='500000'>500,000</option><option value='1000000'>1,000,000</option><option value='2000000'>2,000,000</option><option value='3000000'>3,000,000</option><option value='4000000'>4,000,000</option><option value='5000000'>5,000,000</option>".html_safe,
+ { :class => 'require', :autodrop_count => Setting.find(:autodrop_count) } %>
+ <br />
+ <i>(Prune the database automatically when the event count exceeds your specified limit.)</i><br />
<br/>
</p>
@@ -67,7 +75,7 @@
</div>
- <div class='pc-settings shadow'>
+ <div class='pc-settings'>
<div class='grid_6'>
@@ -91,7 +99,7 @@
</div>
- <div class='grid_5 pad-left omega'>
+ <div class='grid_5'>
<p class='pc-settings'>
<%= label_tag 'API User' %> <i>(User name for Packet Capture API)</i><br />
@@ -120,4 +128,4 @@
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/severities/_form.html.erb
^
|
@@ -12,12 +12,12 @@
<p>
<%= f.label 'Severity Name' %><br />
- <%= f.text_field :name, :class => 'required', :placeholder => 'Name...', :autocomplete => :off %>
+ <%= f.text_field :name, :class => 'required', :placeholder => 'Name', :autocomplete => :off %>
</p>
<p>
<%= f.label 'Severity Priority' %> <i>(The priority of the ids event you want to represent)</i><br />
- <%= f.text_field :sig_id, :class => 'required number', :placeholder => 'Priority...', :autocomplete => :off %>
+ <%= f.text_field :sig_id, :class => 'required number', :placeholder => 'Priority', :autocomplete => :off %>
</p>
<p>
@@ -29,12 +29,12 @@
<p>
<%= f.label 'Severity Background' %><br />
- <%= f.text_field :bg_color, :class => 'required hex-color', :id => 'severity-color-bg', :placeholder => 'Background Color...', :autocomplete => :off %>
+ <%= f.text_field :bg_color, :class => 'required hex-color', :id => 'severity-color-bg', :placeholder => 'Background Color', :autocomplete => :off %>
</p>
<p>
<%= f.label 'Severity Text' %><br />
- <%= f.text_field :text_color, :class => 'required hex-color', :id => 'severity-color-text', :placeholder => 'Text Color...', :autocomplete => :off %>
+ <%= f.text_field :text_color, :class => 'required hex-color', :id => 'severity-color-text', :placeholder => 'Text Color', :autocomplete => :off %>
</p>
<%= form_actions do %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/severities/edit.html.erb
^
|
@@ -1,4 +1,4 @@
-<%= title "Edit Severity", do -%>
+<%= title "Edit Severity" do -%>
<%= render :partial => 'settings/menu' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/severities/new.html.erb
^
|
@@ -1,4 +1,4 @@
-<%= title "New Severity", do -%>
+<%= title "New Severity" do -%>
<%= render :partial => 'settings/menu' %>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/_user.html.erb
^
|
@@ -17,5 +17,5 @@
<td class='email'><%= user.sign_in_count %></td>
<td class='last_sign_in_ip'><%= !user.last_sign_in_ip.blank? ? user.last_sign_in_ip : 'N/A' %></td>
<td class='last_sign_in_at'><%= !user.last_sign_in_at.blank? ? user.last_sign_in_at.strftime('%m/%d/%Y %l:%M %p') : Time.now.strftime('%m/%d/%Y %l:%M %p') %></td>
- <td><%= link_to image_tag("icons/destroy.png", :size => '16x16', :class => 'trash'), remove_users_path(:id => user), :method => :delete, :confirm => "Are you sure you want to remove #{user.name}?" %></td>
-</tr>
\ No newline at end of file
+ <td class='last'><%= link_to image_tag("icons/destroy.png", :size => '16x16', :class => 'trash'), remove_users_path(:id => user), :method => :delete, :confirm => "Are you sure you want to remove #{user.name}?" %></td>
+</tr>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/new.html.erb
^
|
@@ -11,19 +11,21 @@
<div class='grid_5'>
<p><%= f.label :name %> <i>(please use first and last name)</i><br />
- <%= f.text_field :name, :placeholder => 'Full Name...', :class => 'required' %></p>
+ <%= f.text_field :name, :placeholder => 'Full Name', :class => 'required' %></p>
<p><%= f.label :email %> <i>(example: snorby@snorby.org)</i><br />
- <%= f.text_field :email, :placeholder => 'E-mail Address...', :class => 'required email' %></p>
+ <%= f.text_field :email, :placeholder => 'E-mail Address', :class => 'required email' %></p>
- <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
- <%= f.password_field :password, :placeholder => 'Password...' %></p>
+ <% if Snorby::CONFIG[:authentication_mode] == "database" %>
+ <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
+ <%= f.password_field :password, :placeholder => 'Password' %></p>
- <p><%= f.label :password_confirmation %><br />
- <%= f.password_field :password_confirmation, :placeholder => 'Password Confirmation...' %></p>
+ <p><%= f.label :password_confirmation %><br />
+ <%= f.password_field :password_confirmation, :placeholder => 'Password Confirmation' %></p>
- <p>
- I would like to list <%= f.select :per_page_count, %w[25 45 65 100], { :include_blank => false } %> <%= f.label "Items Per Page" %><br />
+ <p>
+ <% end %>
+ I would like to list <%= f.select :per_page_count, %w[25 45 65 100], { :include_blank => false } %> <%= f.label "items per page." %><br />
<i>(select the default amount of events to list per page view)</i><br />
<br />
</p>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/passwords/edit.html.erb
^
|
@@ -1,23 +1,23 @@
<%= title "Change your password" -%>
-<div id='password' class='grid_12 page boxit'>
+<div id='signin' class='grid_12 page boxit'>
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
- <%= devise_error_messages! %>
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => 'validate' }) do |f| %>
<%= f.hidden_field :reset_password_token %>
- <p><%= f.label :password %><br />
- <%= f.password_field :password %></p>
+ <p><%= f.label :password %>
+ <%= f.password_field :password, :placeholder => 'P@ssw0rd', :autocomplete => :off, :class => 'required password' %></p>
- <p><%= f.label :password_confirmation %><br />
- <%= f.password_field :password_confirmation %></p>
+ <p><%= f.label :password_confirmation %>
+ <%= f.password_field :password_confirmation, :placeholder => 'P@ssw0rd', :autocomplete => :off, :class => 'required password' %></p>
<%= form_actions do %>
<%= button "Change my password", :class => 'success' %>
+ <%= button "Cancel", :class => 'warning cancel' %>
<% end %>
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/passwords/new.html.erb
^
|
@@ -2,17 +2,24 @@
<div id='password' class='grid_12 page boxit'>
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => 'validate' }) do |f| %>
- <%= devise_error_messages! %>
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => 'validate' }) do |f| %>
- <p><%= f.label :email %><br />
- <%= f.text_field :email, :title => 'E-mail...', :autocomplete => :off, :class => 'required email' %></p>
+ <div class='note'>
+ Please enter your email and snorby will send you a reset url. You will
+ be prompted to submit a new password and confirmation.
+ </div>
+
+ <p class='item'>
+ <%= f.label :email %><br />
+ <%= f.text_field :email, :title => 'E-mail...', :placeholder => 'example@example.com', :autocomplete => :off, :class => 'required email' %>
+ </p>
<%= form_actions do %>
<%= button "Send me reset password instructions", :class => 'success' %>
-
+ <%= button "Cancel", :class => 'warning cancel' %>
+
<% end %>
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/registrations/crop.html.erb
^
|
@@ -61,8 +61,10 @@
<%= f.hidden_field attribute, :id => attribute %>
<% end %>
- <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
- <%= f.password_field :current_password, :class => 'required password' %></p>
+ <% if Snorby::CONFIG[:authentication_mode] == "database" %>
+ <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
+ <%= f.password_field :current_password, :placeholder => 'Current Password', :class => 'required password' %></p>
+ <% end %>
<%= form_actions do %>
@@ -74,4 +76,4 @@
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/registrations/edit.html.erb
^
|
@@ -10,21 +10,23 @@
<div class='grid_5'>
<p><%= f.label :name %> <i>(please use first and last name)</i><br />
- <%= f.text_field :name, :placeholder => 'Full Name...', :class => 'required' %></p>
+ <%= f.text_field :name, :placeholder => 'Full Name', :class => 'required' %></p>
<p><%= f.label :email %> <i>(example: snorby@snorby.org)</i><br />
- <%= f.text_field :email, :placeholder => 'E-mail Address...', :class => 'required email' %></p>
-
- <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
- <%= f.password_field :password, :placeholder => 'Password...' %></p>
-
- <p><%= f.label :password_confirmation %><br />
- <%= f.password_field :password_confirmation, :placeholder => 'Password Confirmation...' %></p>
+ <%= f.text_field :email, :placeholder => 'E-mail Address', :class => 'required email' %></p>
+
+ <% if Snorby::CONFIG[:authentication_mode] == "database" %>
+ <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
+ <%= f.password_field :password, :placeholder => 'Password' %></p>
+
+ <p><%= f.label :password_confirmation %><br />
+ <%= f.password_field :password_confirmation, :placeholder => 'Password Confirmation' %></p>
- <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
- <%= f.password_field :current_password, :placeholder => 'Current Password...', :class => 'required password' %></p>
+ <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
+ <%= f.password_field :current_password, :placeholder => 'Current Password', :class => 'required password' %></p>
- <p>
+ <p>
+ <% end %>
<%= f.label 'Note Notifications:' %>
<%= f.select :accept_notes, [['Yes', 1], ['No', 2], ['Only events I\'ve noted', 3]], { :include_blank => false } %><br />
<i>(Would you like to receive notifications when new notes are added?)</i><br />
@@ -32,7 +34,7 @@
</p>
<p>
- I would like to list <%= f.select :per_page_count, %w[25 45 65 100], { :include_blank => false } %> <%= f.label "Items Per Page" %><br />
+ I would like to list <%= f.select :per_page_count, %w[25 45 65 100], { :include_blank => false } %> <%= f.label "items per page." %><br />
<i>(select the default amount of events to list per page view)</i><br />
<br />
</p>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/app/views/users/sessions/new.html.erb
^
|
@@ -4,21 +4,23 @@
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'validate'}) do |f| %>
<p><%= f.label :email %><br />
- <%= f.text_field :email, :placeholder => 'E-mail...', :autocomplete => :off, :class => 'required email' %></p>
+ <%= f.text_field :email, :placeholder => 'example@example.com', :autocomplete => :off, :class => 'required email' %></p>
<p><%= f.label :password %><br />
- <%= f.password_field :password, :placeholder => 'Password...', :autocomplete => :off, :class => 'required password' %></p>
-
- <% if devise_mapping.rememberable? -%>
- <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
- <% end -%>
+ <%= f.password_field :password, :placeholder => 'P@ssw0rd', :autocomplete => :off, :class => 'required password' %></p>
<%= form_actions do %>
-
- <%= button "Welcome, Login!", :class => 'success' %>
+
+ <% if devise_mapping.rememberable? -%>
+ <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
+ <% end -%>
+
+
+ <%= button "Welcome, Login!", :class => 'success' %>
+ <%= button "Forgot Password?", :class => 'warning forgot-my-password' %>
<% end %>
<% end %>
-</div>
\ No newline at end of file
+</div>
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/application.rb
^
|
@@ -10,11 +10,10 @@
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Snorby
-
# Snorby Environment Specific Configurations
raw_config = File.read("config/snorby_config.yml")
CONFIG = YAML.load(raw_config)[Rails.env].symbolize_keys
-
+
class Application < Rails::Application
PDFKit.configure do |config|
@@ -31,7 +30,7 @@
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib)
-
+
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/assets.yml
^
|
@@ -19,6 +19,7 @@
- public/javascripts/scrollto.js
- public/javascripts/validate.js
- public/javascripts/tipsy.js
+ - public/javascripts/chosen.js
- public/javascripts/snorby.js
stylesheets:
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/database.yml
^
|
@@ -1,11 +1,12 @@
# Snorby Database Configuration
#
# Please set your database password/user below
+# NOTE: Indentation is important.
#
snorby: &snorby
adapter: mysql
username: root
- password: MYSQLPASS
+ password: # Example: password: "s3cr3tsauce"
host: localhost
development:
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/initializers/devise.rb
^
|
@@ -26,10 +26,10 @@
# config.params_authenticatable = true
# Tell if authentication through HTTP Basic Auth is enabled. True by default.
- # config.http_authenticatable = true
+ config.http_authenticatable = false
# Set this to true to use Basic Auth for AJAX requests. True by default.
- # config.http_authenticatable_on_xhr = true
+ config.http_authenticatable_on_xhr = false
# The realm used in Http Basic Authentication
config.http_authentication_realm = "Snorby"
@@ -43,7 +43,7 @@
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
- # config.encryptor = :bcrypt
+ config.encryptor = :bcrypt
# Setup a pepper to generate the encrypted password.
config.pepper = "f5c0f3c477c5d0dfb1bb4b6037ebc3bc216e7d6dfb06079d4bf096869c33c4b0ac7ef688ce69ec81752542947b20f5012634bafbc03a1901c2521c3e9a2fcf18"
@@ -124,13 +124,13 @@
# access, but formats like :xml or :json, should return 401.
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists. Default is [:html]
- # config.navigational_formats = [:html, :iphone]
+ config.navigational_formats = [:html, :json]
# ==> Warden configuration
# If you want to use other strategies, that are not (yet) supported by Devise,
# you can configure them inside the config.warden block. The example below
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
- #
+
# config.warden do |manager|
# manager.oauth(:twitter) do |twitter|
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
@@ -139,4 +139,15 @@
# end
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
# end
+
+
+ if Snorby::CONFIG[:authentication_mode] == "cas"
+ config.cas_base_url = Snorby::CONFIG[:cas_config]["base_url"]
+
+ # you can override these if you need to, but cas_base_url is usually enough
+ config.cas_login_url = Snorby::CONFIG[:cas_config]["login_url"]
+ config.cas_logout_url = Snorby::CONFIG[:cas_config]["logout_url"]
+ # config.cas_validate_url = "https://cas.myorganization.com/serviceValidate"
+ end
+
end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/config/initializers/rules.rb
^
|
@@ -0,0 +1,4 @@
+require "snorby/rule"
+
+Snorby::Rule.paths = Snorby::CONFIG[:rules]
+
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/routes.rb
^
|
@@ -1,5 +1,7 @@
Snorby::Application.routes.draw do
+ resources :lookups
+
# This feature is not ready yet
# resources :notifications
@@ -12,7 +14,13 @@
resources :classifications
- devise_for :users, :path_names => { :sign_in => 'login', :sign_out => 'logout', :sign_up => 'register' }, :controllers => {:registrations => "registrations"} do
+ devise_for :users, :path_names => { :sign_in => 'login',
+ :sign_out => 'logout',
+ :sign_up => 'register' }, :controllers => {
+ :registrations => "registrations",
+ :sessions => "sessions",
+ :passwords => 'passwords'
+ } do
get "/login" => "devise/sessions#new"
get '/logout', :to => "devise/sessions#destroy"
get '/reset/password', :to => "devise/passwords#edit"
@@ -58,6 +66,7 @@
get :hotkey
post :export
get :lookup
+ get :rule
get :packet_capture
get :history
post :classify
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/config/snorby_config.yml
^
|
@@ -1,12 +1,28 @@
development:
domain: localhost:3000
- #wkhtmltopdf: /usr/local/bin/wkhtmltopdf
wkhtmltopdf: /Users/mephux/.rvm/gems/ruby-1.9.2-p0/bin/wkhtmltopdf
+ mailer_sender: 'snorby@snorby.org'
+ rules:
+ - "/Users/mephux/.snort/rules"
+ - "/Users/mephux/.snort/so_rules"
+ authentication_mode: cas
+ cas_config:
+ base_url: https://auth.server.com.br/
+ login_url: https://auth.server.com.br/login?domain=server
+ logout_url: https://auth.server.com.br/logout?domain=server
test:
domain: localhost:3000
wkhtmltopdf: /usr/local/bin/wkhtmltopdf
+ mailer_sender: 'snorby@snorby.org'
+ authentication_mode: database
+# Change the production configuration
+# for your environment.
production:
- domain: localhost:3000
- wkhtmltopdf: /usr/local/bin/wkhtmltopdf
\ No newline at end of file
+ domain: 'demo.snorby.org'
+ wkhtmltopdf: /usr/local/bin/wkhtmltopdf
+ mailer_sender: 'snorby@snorby.org'
+ rules:
+ - ""
+ authentication_mode: database
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/db/seeds.rb
^
|
@@ -26,6 +26,10 @@
Setting.set(:packet_capture_user, nil) unless Setting.packet_capture_user?
Setting.set(:packet_capture_password, nil) unless Setting.packet_capture_password?
+# Setting.set(:geoip, nil) unless Setting.geoip?
+Setting.set(:autodrop, nil) unless Setting.autodrop?
+Setting.set(:autodrop_count, nil) unless Setting.autodrop_count?
+
# Load Default Classifications
Classification.first_or_create({ :name => "Unauthorized Root Access" }, {
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/lib/snorby/geoip.rb
^
|
@@ -0,0 +1,41 @@
+# Snorby - All About Simplicity.
+#
+# Copyright (c) 2010 Dustin Willis Webber (dustin.webber at gmail.com)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+require 'geoip'
+
+module Snorby
+ module Geoip
+
+ PATH = File.join(Rails.root.to_s, 'config', 'snorby-geoip.dat')
+
+ def self.database?
+ return false unless File.exists?(PATH)
+ File.open(PATH)
+ end
+
+ def self.lookup(ip)
+ database = self.database?
+ return {} unless database
+ lookup = GeoIP.new(database).country(ip)
+ lookup.to_hash
+ rescue ArgumentError => e
+ {}
+ end
+
+ end
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/jobs/cache_helper.rb
^
|
@@ -19,7 +19,9 @@
module Snorby
module Jobs
module CacheHelper
-
+
+ BATCH_SIZE = 10000
+
def logit(msg, show_sensor=true)
if show_sensor
STDOUT.puts "Sensor #{@sensor.sid}: #{msg}" if verbose
@@ -27,7 +29,45 @@
STDOUT.puts "#{msg}" if verbose
end
end
-
+
+ def merged_records(records)
+ data = {
+ :event_count => records.collect {|x| x[:event_count] }.inject { |sum,item| sum + item },
+ :tcp_count => records.collect {|x| x[:tcp_count] }.inject { |sum,item| sum + item },
+ :udp_count => records.collect {|x| x[:udp_count] }.inject { |sum,item| sum + item },
+ :icmp_count => records.collect {|x| x[:icmp_count] }.inject { |sum,item| sum + item },
+ :severity_metrics => {},
+ :src_ips => {},
+ :dst_ips => {},
+ :signature_metrics => {}
+ }
+
+ [
+ :severity_metrics,
+ :src_ips,
+ :dst_ips,
+ :signature_metrics
+ ].each do |item|
+
+ records.collect { |x| x[item] }.inject do |x,y|
+ merge = {}
+ keys = x.merge(y).keys
+
+ keys.each do |key|
+ if x.has_key?(key)
+ merge[key] = y.has_key?(key) ? y[key] + x[key] : x[key]
+ else
+ merge[key] = y[key]
+ end
+ end
+
+ data[item] = merge
+ end
+ end
+
+ data
+ end
+
def fetch_event_count(from_database=false)
logit '- fetch_event_count'
@events.size
@@ -53,17 +93,17 @@
def fetch_tcp_count
logit '- fetching tcp count'
- @tcp_events.size
+ @tcp_events.length
end
def fetch_udp_count
logit '- fetching udp count'
- @udp_events.size
+ @udp_events.length
end
def fetch_icmp_count
logit '- fetching icmp count'
- @icmp_events.size
+ @icmp_events.length
end
def build_sensor_event_count(update_counter=true)
@@ -116,4 +156,4 @@
end
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/jobs/daily_cache_job.rb
^
|
@@ -54,12 +54,11 @@
day_start = @sensor.events.first.timestamp.beginning_of_day
day_end = @sensor.events.first.timestamp.end_of_day
-
+
else
-
+
day_start = @sensor.daily_cache.last.ran_at.tomorrow.beginning_of_day
day_end = @sensor.daily_cache.last.ran_at.tomorrow.end_of_day
-
end
build_cache(day_start, day_end)
@@ -69,18 +68,31 @@
begin
- ReportMailer.daily_report.deliver if Setting.daily?
send_weekly_report if Setting.weekly?
send_monthly_report if Setting.monthly?
+ ReportMailer.daily_report.deliver if Setting.daily?
rescue PDFKit::NoExecutableError => e
logit "#{e}"
- rescue
+ rescue => e
+ logit "#{e}", false
+ logit "#{e.backtrace.first}", false
logit "Error: Unable to send report - please make sure your mail configurations are correct."
end
+ # Autodrop Logic
+ if Setting.autodrop?
+ if Event.count > Setting.autodrop_count.value.to_i
+ autodrop = Event.all(:limit => Setting.autodrop_count.value.to_i, :order => :timestamp.asc)
+ autodrop.destroy
+ end
+ end
+
Snorby::Jobs.daily_cache.destroy! if Snorby::Jobs.daily_cache?
- Delayed::Job.enqueue(Snorby::Jobs::DailyCacheJob.new(false), :priority => 1, :run_at => Time.now.tomorrow.beginning_of_day)
+
+ Delayed::Job.enqueue(Snorby::Jobs::DailyCacheJob.new(false),
+ :priority => 1,
+ :run_at => Time.now.tomorrow.beginning_of_day)
rescue Interrupt
@cache.destroy! if defined?(@cache)
@@ -98,56 +110,69 @@
def build_cache(day_start, day_end)
- @events = Event.between(day_start, day_end).all(:sid => @sensor.sid)
-
+ all_events = Event.between(day_start, day_end).all(:sid => @sensor.sid)
+
@tcp_events = []
@udp_events = []
@icmp_events = []
-
if day_end >= @stop_date
- logit "No New Events To Cache..."
+ logit "Current - No New Events To Cache..."
return
end
- if @events.blank?
- logit "No New Events To Cache..."
- return
+ if all_events.blank?
+ logit "Events Blank - No New Events To Cache..."
+
+ new_time = day_end + 1.day
else
logit "\nNew Day: #{day_start} - #{day_end}", false
+ logit "#{all_events.length} events found. Processing."
@cache = DailyCache.create(:ran_at => day_start, :sensor => @sensor)
- create_cache_record
+ records = []
+ batch = 0
- new_time = @events.last.timestamp.end_of_day + 1.day
-
- new_start_day = new_time.beginning_of_day
-
- new_end_day = new_time.end_of_day
+ all_events.each_chunk(BATCH_SIZE.to_i) do |chunk|
+ @events = chunk
+
+ logit "\nProcessing Batch #{batch += 1} of " +
+ "#{(all_events.length / BATCH_SIZE) + 1}...", false
+
+ build_sensor_event_count(false)
+ build_proto_counts
+
+ data = {
+ :event_count => fetch_event_count(true),
+ :tcp_count => fetch_tcp_count,
+ :udp_count => fetch_udp_count,
+ :icmp_count => fetch_icmp_count,
+ :severity_metrics => fetch_severity_metrics(false),
+ :src_ips => fetch_src_ip_metrics,
+ :dst_ips => fetch_dst_ip_metrics,
+ :signature_metrics => fetch_signature_metrics(false)
+ }
- build_cache(new_start_day, new_end_day)
+ records << data
+ end
+ if records.length > 1
+ results = merged_records(records)
+ @cache.update(results)
+ else
+ @cache.update(records.first)
+ end
+
+ new_time = all_events.last.timestamp.end_of_day + 1.day
end
- end
- def create_cache_record
-
- build_sensor_event_count(false)
- build_proto_counts
+ new_start_day = new_time.beginning_of_day
+
+ new_end_day = new_time.end_of_day
- @cache.update({
- :event_count => fetch_event_count(true),
- :tcp_count => fetch_tcp_count,
- :udp_count => fetch_udp_count,
- :icmp_count => fetch_icmp_count,
- :severity_metrics => fetch_severity_metrics(false),
- :src_ips => fetch_src_ip_metrics,
- :dst_ips => fetch_dst_ip_metrics,
- :signature_metrics => fetch_signature_metrics(false)
- })
+ build_cache(new_start_day, new_end_day)
- @cache
end
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/jobs/mass_classification.rb
^
|
@@ -18,11 +18,17 @@
module Snorby
module Jobs
- class MassClassification < Struct.new(:classification_id, :options, :user_id, :reclassify)
+ class MassClassification < Struct.new(:classification_id,
+ :options, :user_id, :reclassify)
+
+ include Snorby::Jobs::CacheHelper
def perform
events = Event.all(options)
- Event.classify_from_collection(events, classification_id, user_id, reclassify)
+ events.each_chunk(BATCH_SIZE.to_i) do |chunk|
+ Event.classify_from_collection(chunk, classification_id, user_id,
+ reclassify)
+ end
end
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/jobs/sensor_cache_job.rb
^
|
@@ -64,7 +64,10 @@
# Prevent Duplicate Cache Records
if @sensor.cache.blank?
- start_time = @since_last_cache.first.timestamp.beginning_of_day + @since_last_cache.first.timestamp.hour.hours
+
+ start_time = @since_last_cache.first.timestamp.beginning_of_day +
+ @since_last_cache.first.timestamp.hour.hours
+
end_time = start_time + 30.minute
next if start_time >= @stop_time
else
@@ -78,7 +81,9 @@
end
Snorby::Jobs.sensor_cache.destroy! if Snorby::Jobs.sensor_cache?
- Delayed::Job.enqueue(Snorby::Jobs::SensorCacheJob.new(false), :priority => 1, :run_at => @stop_time + 31.minute)
+
+ Delayed::Job.enqueue(Snorby::Jobs::SensorCacheJob.new(false),
+ :priority => 1, :run_at => @stop_time + 31.minute)
rescue => e
puts e
@@ -130,37 +135,72 @@
return if start_time >= @stop_time
- @events = @since_last_cache.between_time(start_time, end_time)
+ all_events = @since_last_cache.between_time(start_time, end_time)
@tcp_events = []
@udp_events = []
@icmp_events = []
- @last_event = @events.last
+ @last_event = all_events.last
- if @events.blank?
+ if all_events.blank?
Cache.create(:sid => @sensor.sid, :ran_at => start_time)
else
- logit 'Found events - processing...'
-
if defined?(@last_cache)
logit 'Found last cache...'
@last_cache = @sensor.cache.last
- @cache = Cache.create(:sid => @last_event.sid, :cid => @last_event.cid, :ran_at => start_time)
+
+ @cache = Cache.create(:sid => @last_event.sid,
+ :cid => @last_event.cid, :ran_at => start_time)
+
else
logit 'No cache records found - creating first cache record...'
reset_counter_cache_columns
- @last_cache = Cache.create(:sid => @last_event.sid, :cid => @last_event.cid, :ran_at => start_time)
+
+ @last_cache = Cache.create(:sid => @last_event.sid,
+ :cid => @last_event.cid, :ran_at => start_time)
+
@cache = @last_cache
end
- logit 'Building cache attributes'
+ logit "\nNew Day: #{start_time} - #{end_time}", false
+ logit "#{all_events.length} events found. Processing."
- build_snorby_cache
+ records = []
+ batch = 0
+ all_events.each_chunk(BATCH_SIZE.to_i) do |chunk|
+ @events = chunk
+
+ logit "\nProcessing Batch #{batch += 1} of " +
+ "#{(all_events.length / BATCH_SIZE) + 1}...", false
+
+ build_sensor_event_count
+ build_proto_counts
+
+ data = {
+ :event_count => fetch_event_count,
+ :tcp_count => fetch_tcp_count,
+ :udp_count => fetch_udp_count,
+ :icmp_count => fetch_icmp_count,
+ :severity_metrics => fetch_severity_metrics,
+ :src_ips => fetch_src_ip_metrics,
+ :dst_ips => fetch_dst_ip_metrics,
+ :signature_metrics => fetch_signature_metrics
+ }
+
+ records << data
+ end
+
+ if records.length > 1
+ results = merged_records(records)
+ @cache.update(results)
+ else
+ @cache.update(records.first)
+ end
end
new_start_time = end_time
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/model.rb
^
|
@@ -23,8 +23,9 @@
module Model
def self.included(base)
- base.send :include, DataMapper::Resource, DataMapper::Migrations, Model::Types
+ base.send :include, DataMapper::Resource,
+ DataMapper::Migrations, Model::Types
end
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/model/counter.rb
^
|
@@ -36,7 +36,10 @@
else
self.update(column.to_sym => count)
end
+
+ self.save!
end
+
end
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/model/types/numeric_ip_addr.rb
^
|
@@ -17,7 +17,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
require 'dm-core'
-require 'ipaddr'
module Snorby
module Model
@@ -51,4 +50,4 @@
end
end
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/paperclip_processors/cropper.rb
^
|
@@ -32,5 +32,6 @@
" -crop '#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}' "
end
end
+
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/report.rb
^
|
@@ -50,8 +50,13 @@
@last_cache = @cache.get_last ? @cache.get_last.ran_at : Time.now
- sigs = Event.all(:limit => 5, :order => [:timestamp.desc], :fields => [:sig_id], :unique => true).map(&:signature).map(&:sig_id)
- @recent_events = Event.all(:sig_id => sigs).group_by { |x| x.sig_id }.map(&:last).map(&:first)
+ sigs = Event.all(:limit => 5, :order => [:timestamp.desc],
+ :fields => [:sig_id],
+ :unique => true).map(&:signature).map(&:sig_id)
+
+ @recent_events = Event.all(:sig_id => sigs).group_by do |x|
+ x.sig_id
+ end.map(&:last).map(&:first)
av = ActionView::Base.new(Rails.root.join('app', 'views'))
@@ -74,7 +79,9 @@
:last_cache => @last_cache
})
- pdf = PDFKit.new(av.render(:template => "page/dashboard.pdf.erb", :layout => 'layouts/pdf.html.erb'))
+ pdf = PDFKit.new(av.render(:template => "page/dashboard.pdf.erb",
+ :layout => 'layouts/pdf.html.erb'))
+
pdf.stylesheets << Rails.root.join("public/stylesheets/pdf.css")
data = {
@@ -86,59 +93,62 @@
return data
end
- private
-
- def self.set_defaults
-
- case @range.to_sym
- when :today
- @cache = Cache.today
- @start_time = Time.now.beginning_of_day
- @end_time = Time.now.end_of_day
-
- when :yesterday
- @cache = Cache.yesterday
- @start_time = (Time.now - 1.day).beginning_of_day
- @end_time = (Time.now - 1.day).end_of_day
-
- when :week
- @cache = DailyCache.this_week
- @start_time = Time.yesterday.beginning_of_week
- @end_time = Time.yesterday.end_of_week
-
- when :last_week
- @cache = DailyCache.last_week
- @start_time = (Time.yesterday - 1.week).beginning_of_week
- @end_time = (Time.yesterday - 1.week).end_of_week
-
- when :month
- @cache = DailyCache.this_month
- @start_time = Time.yesterday.beginning_of_month
- @end_time = Time.yesterday.end_of_month
-
- when :last_month
- @cache = DailyCache.last_month
- @start_time = (Time.yesterday - 2.months).beginning_of_month
- @end_time = (Time.yesterday - 2.months).end_of_month
-
- when :quarter
- @cache = DailyCache.this_quarter
- @start_time = Time.yesterday.beginning_of_quarter
- @end_time = Time.yesterday.end_of_quarter
-
- when :year
- @cache = DailyCache.this_year
- @start_time = Time.yesterday.beginning_of_year
- @end_time = Time.yesterday.end_of_year
-
- else
- @cache = Cache.today
- @start_time = Time.now.beginning_of_day
- @end_time = Time.now.end_of_day
- end
+ def self.set_defaults
+ case @range.to_sym
+ when :last_24
+ @cache = Cache.last_24
+
+ @start_time = Time.now.yesterday
+ @end_time = Time.now
+
+ when :today
+ @cache = Cache.today
+ @start_time = Time.now.beginning_of_day
+ @end_time = Time.now.end_of_day
+
+ when :yesterday
+ @cache = Cache.yesterday
+ @start_time = (Time.now - 1.day).beginning_of_day
+ @end_time = (Time.now - 1.day).end_of_day
+
+ when :week
+ @cache = DailyCache.this_week
+ @start_time = Time.now.beginning_of_week
+ @end_time = Time.now.end_of_week
+
+ when :last_week
+ @cache = DailyCache.last_week
+ @start_time = (Time.now - 1.week).beginning_of_week
+ @end_time = (Time.now - 1.week).end_of_week
+
+ when :month
+ @cache = DailyCache.this_month
+ @start_time = Time.now.beginning_of_month
+ @end_time = Time.now.end_of_month
+
+ when :last_month
+ @cache = DailyCache.last_month
+ @start_time = (Time.now - 1.months).beginning_of_month
+ @end_time = (Time.now - 1.months).end_of_month
+
+ when :quarter
+ @cache = DailyCache.this_quarter
+ @start_time = Time.now.beginning_of_quarter
+ @end_time = Time.now.end_of_quarter
+
+ when :year
+ @cache = DailyCache.this_year
+ @start_time = Time.now.beginning_of_year
+ @end_time = Time.now.end_of_year
+
+ else
+ @cache = Cache.today
+ @start_time = Time.now.beginning_of_day
+ @end_time = Time.now.end_of_day
end
+
+ end
end
-
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/lib/snorby/rule.rb
^
|
@@ -0,0 +1,100 @@
+require "pathname"
+
+# Snorby
+module Snorby
+ # Rule
+ module Rule
+
+ def self.paths=(path)
+ @path ||= path
+ end
+
+ def self.paths
+ @path
+ end
+
+ def self.get(options={})
+ return false unless @path
+ @rule = Snorby::Rule::Search.new(options)
+ @rule ? @rule : false
+ end
+
+
+ class Search
+
+ attr_accessor :rule, :revision_id, :generator_id, :rule_id
+
+ def initialize(options)
+ @rule_id = options.fetch(:rule_id, 0).to_i
+ @generator_id = options.fetch(:generator_id, 0).to_i
+ @revision_id = options.fetch(:revision_id, 0).to_i
+ @rule = false
+
+ @generator_id = nil if @generator_id.zero? || @generator_id == 1
+ @revision_id = nil if @revision_id.zero?
+
+ search_for_rule
+ end
+
+ def search_for_rule
+ if Snorby::Rule.paths.is_a?(Array)
+
+ Snorby::Rule.paths.each do |path|
+ return @rule if @rule
+ pathname = Pathname.new(path)
+ search(pathname)
+ end
+ else
+
+ search(Snorby::Rule.paths)
+ end
+
+ @rule
+ end
+
+ def to_s
+ @rule
+ end
+
+ def found?
+ return true if @rule
+ false
+ end
+
+ def search(path)
+ Dir.glob(path + '*').each do |file|
+ return @rule if @rule
+ path = Pathname.new(file)
+
+ if File.extname(path) == ".rules"
+ file = File.open(path)
+
+ file.each_line do |line|
+ return @rule if @rule
+
+ next if line.match(/^\#/)
+ next unless line.match(/sid\:#{@rule_id}\;/)
+
+
+ if @revision_id
+ next unless line.match(/rev\:#{@revision_id}\;/)
+ end
+
+ if @generator_id
+ next unless line.match(/gid\:#{@generator_id}\;/)
+ end
+
+ @rule = line
+ end
+
+ end
+
+ end
+
+ end # Method Search
+
+ end # Search End
+
+ end # Rule End
+
+end # Snorby End
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/snorby.rb
^
|
@@ -16,10 +16,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+require "snorby/rule"
+
module Snorby
def self.logger
DataMapper::Logger.new($stdout)
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/version.rb
^
|
@@ -18,5 +18,5 @@
module Snorby
# Snorby Version
- VERSION = '2.2.2'
+ VERSION = '2.3.9'
end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/snorby/worker.rb
^
|
@@ -45,7 +45,9 @@
end
def self.process
- return Snorby::Process.new(`ps aux #{Worker.pid} |grep delayed_job |grep -v grep`.chomp.strip)
+ if Worker.pid
+ Snorby::Process.new(`ps -o ruser,pid,%cpu,%mem,vsize,rss,tt,stat,start,etime,command -p #{Worker.pid} |grep delayed_job |grep -v grep`.chomp.strip)
+ end
end
def self.pid
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/lib/tasks/snorby.rake
^
|
@@ -21,6 +21,8 @@
desc 'Setup'
task :setup => :environment do
+ Rake::Task['secret'].invoke
+
# Create the snorby database if it does not currently exist
Rake::Task['db:create'].invoke
@@ -72,4 +74,4 @@
end
-end
\ No newline at end of file
+end
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/assets/snorby.css
^
|
@@ -1 +1 @@
-.container_12{margin-left:auto;margin-right:auto;width:1020px;}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12{display:inline;float:left;position:relative;margin-left:10px;margin-right:10px;}.alpha{margin-left:0;}.omega{margin-right:0;}.container_12 .grid_1{width:65px;}.container_12 .grid_2{width:150px;}.container_12 .grid_3{width:235px;}.container_12 .grid_4{width:320px;}.container_12 .grid_5{width:405px;}.container_12 .grid_6{width:490px;}.container_12 .grid_7{width:575px;}.container_12 .grid_8{width:660px;}.container_12 .grid_9{width:745px;}.container_12 .grid_10{width:830px;}.container_12 .grid_11{width:915px;}.container_12 .grid_12{width:1000px;}.container_12 .prefix_1{padding-left:85px;}.container_12 .prefix_2{padding-left:170px;}.container_12 .prefix_3{padding-left:255px;}.container_12 .prefix_4{padding-left:340px;}.container_12 .prefix_5{padding-left:425px;}.container_12 .prefix_6{padding-left:510px;}.container_12 .prefix_7{padding-left:595px;}.container_12 .prefix_8{padding-left:680px;}.container_12 .prefix_9{padding-left:765px;}.container_12 .prefix_10{padding-left:850px;}.container_12 .prefix_11{padding-left:935px;}.container_12 .suffix_1{padding-right:85px;}.container_12 .suffix_2{padding-right:170px;}.container_12 .suffix_3{padding-right:255px;}.container_12 .suffix_4{padding-right:340px;}.container_12 .suffix_5{padding-right:425px;}.container_12 .suffix_6{padding-right:510px;}.container_12 .suffix_7{padding-right:595px;}.container_12 .suffix_8{padding-right:680px;}.container_12 .suffix_9{padding-right:765px;}.container_12 .suffix_10{padding-right:850px;}.container_12 .suffix_11{padding-right:935px;}.container_12 .push_1{left:85px;}.container_12 .push_2{left:170px;}.container_12 .push_3{left:255px;}.container_12 .push_4{left:340px;}.container_12 .push_5{left:425px;}.container_12 .push_6{left:510px;}.container_12 .push_7{left:595px;}.container_12 .push_8{left:680px;}.container_12 .push_9{left:765px;}.container_12 .push_10{left:850px;}.container_12 .push_11{left:935px;}.container_12 .pull_1{left:-85px;}.container_12 .pull_2{left:-170px;}.container_12 .pull_3{left:-255px;}.container_12 .pull_4{left:-340px;}.container_12 .pull_5{left:-425px;}.container_12 .pull_6{left:-510px;}.container_12 .pull_7{left:-595px;}.container_12 .pull_8{left:-680px;}.container_12 .pull_9{left:-765px;}.container_12 .pull_10{left:-850px;}.container_12 .pull_11{left:-935px;}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0;}.clearfix{display:inline-block;}* html .clearfix{height:1%;}.clearfix{display:block;}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}:focus{outline:0;}ins{text-decoration:none;}del{text-decoration:line-through;}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:1104;display:none;}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(../images/fancybox/fancybox.png?1290220918);}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;display:none;}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none;}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:1101;outline:none;display:none;}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff;}#fancybox-content{width:0;height:0;padding:0;outline:none;position:relative;overflow:hidden;z-index:1102;border:0 solid #fff;}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:1101;}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url(../images/fancybox/fancybox.png?1290220918) -40px 0;cursor:pointer;z-index:1103;display:none;}#fancybox-error{color:#444;font:normal 12px/20px Arial;padding:14px;margin:0;}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:none;line-height:0;vertical-align:top;}#fancybox-frame{width:100%;height:100%;border:none;display:block;}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url(../images/fancybox/blank.gif?1265051996);z-index:1102;display:none;}#fancybox-left{left:0;}#fancybox-right{right:0;}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:1102;display:block;}#fancybox-left-ico{background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -30px;}#fancybox-right-ico{background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -60px;}#fancybox-left:hover,#fancybox-right:hover{visibility:visible;}#fancybox-left:hover span{left:20px;}#fancybox-right:hover span{left:auto;right:20px;}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001;}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1290220937);}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -162px;}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1290220937);background-position:-20px 0;}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -182px;}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1290220937);background-position:0 -20px;}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -142px;}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1290220937);}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -122px;}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:1102;}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative;}.fancybox-title-outside{padding-top:10px;color:#fff;}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left;}#fancybox-title-over{padding:10px;background-image:url(../images/fancybox/fancy_title_over.png?1290220910);display:block;}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px;}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto;}#fancybox-title-float-wrap td{white-space:nowrap;}#fancybox-title-float-left{padding-left:15px;background:url(../images/fancybox/fancybox.png?1290220918) -40px -90px no-repeat;}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:bold;padding-bottom:3px;background:url(../images/fancybox/fancybox-x.png?1290220937) 0 -40px;}#fancybox-title-float-right{padding-left:15px;background:url(../images/fancybox/fancybox.png?1290220918) -55px -90px no-repeat;}.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_close.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_left.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_right.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/ancy_title_over.png',sizingMethod='scale');zoom:1;}.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_left.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_main.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_right.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight+"px");}#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight ? document.documentElement.clientHeight/2:document.body.clientHeight/2)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop))+'px');}#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_loading.png',sizingMethod='scale');}.fancybox-ie .fancybox-bg{background:transparent!important;}.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png',sizingMethod='scale');}.boxit{float:none;}html,body{background-color:#ededed;font-family:Helvetica,Arial;font-size:12px;}a img{border:none;}a{color:#00F;}.clear{clear:both;height:0;overflow:hidden;}#snorby-box{border:10px solid #242424;display:block;position:relative;overflow:hidden;}#snorby-box #box-content{overflow:auto;display:block;position:relative;padding:10px;height:500px;width:750px;!important;}#snorby-box #box-content-small{overflow:auto;display:block;position:relative;padding:10px;height:auto;width:750px;!important;}#snorby-box #box-title{padding:20px 10px;background-color:#474747;color:#fff;font-weight:normal;font-variant:normal;text-decoration:none;font-size:2.0em;letter-spacing:-1px;text-shadow:#2a2a2a 0 1px 0;font-style:normal;}#snorby-box #box-footer{display:block;position:relative;overflow:hidden;background-color:#ebebeb;padding:10px;}div#note-box{padding:10px;display:block;position:relative;overflow:hidden;}div#note-box img{vertical-align:top;margin-right:5px;margin-top:-3px;}div#note-box.error{background-color:#820d06;color:#fff;margin-top:5px;margin-bottom:5px;border:2px solid #590602;}#flash_message{cursor:pointer;position:absolute;height:90px;display:block;overflow:hidden;top:0;right:0;left:0;background-color:rgba(24,31,34,0.79);z-index:9999999;}#flash_message div.message{cursor:pointer;text-shadow:#000 0 0 0;line-height:90px;width:960px;margin:auto;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:2.0em;text-align:center;display:block;position:relative;overflow:hidden;}#header{display:block;position:relative;overflow:hidden;background:#202325;border-bottom:1px solid #000;}#header #header-inside{display:block;position:relative;overflow:hidden;height:90px;border-bottom:1px solid #5a5a5a;}#header #header-inside #header-content{height:60px;display:block;position:relative;overflow:hidden;border-bottom:1px solid #000;}#header #header-inside #header-content #header-top{display:block;position:relative;overflow:hidden;}#header #header-inside #header-content #header-top #logo{height:60px;text-align:right;background:url(../images/header/logo.png?1290220914) no-repeat;text-indent:-99999em;}#header #header-inside #header-content #header-top #logo a{width:265px;display:block;position:relative;overflow:hidden;height:60px;text-indent:99999em;}#header #header-inside #header-content #header-top #user-menu{display:block;position:relative;overflow:hidden;}#header #header-inside #header-content #header-top #user-menu ul{float:right;display:block;position:relative;overflow:hidden;margin-top:10px;}#header #header-inside #header-content #header-top #user-menu ul li{color:#d7d7d7;float:left;padding-right:5px;padding-left:5px;border-left:1px solid #4f4f4f;}#header #header-inside #header-content #header-top #user-menu ul li.first{border-left-style:none;}#header #header-inside #header-content #header-top #user-menu ul li.last{border-right-style:none;}#header #header-inside #header-content #header-top #user-menu ul li a{color:#909090;float:left;}#header #header-inside #header-content #header-top #user-menu ul li a:hover{color:#fff;}#header #header-inside #menu{border-top:1px solid #5a5a5a;background:#41464a;display:block;position:relative;overflow:hidden;height:30px;}#header #header-inside #menu ul li{height:30px;line-height:30px;float:left;overflow:hidden;position:relative;display:block;text-align:center;border-right:1px solid #616161;border-left:1px solid #313131;}#header #header-inside #menu ul li.menu-error{border-style:none;color:#e3e7e7;}#header #header-inside #menu ul li.menu-error:hover{background-color:#41464a;}#header #header-inside #menu ul li.menu-error img{vertical-align:middle;margin-right:5px;margin-top:-5px;}#header #header-inside #menu ul li.administration{background:transparent url(../images/header/admin-button.png?1290220937) no-repeat 0 top;color:#e3e3e3;width:124px;border-style:none;margin-left:10px;}#header #header-inside #menu ul li.administration:hover{background:transparent url(../images/header/admin-button.png?1290220937) no-repeat 0 bottom;border-style:none;!important;}#header #header-inside #menu ul li.administration a{color:#e3e3e3;border-style:none;!important;}#header #header-inside #menu ul li:hover{background:#464d4f;}#header #header-inside #menu ul li.blank{width:1px;padding:0;margin:0;border-style:none;}#header #header-inside #menu ul li.blank.first{border-right:1px solid #616161;}#header #header-inside #menu ul li.blank.last{border-left:1px solid #313131;}#header #header-inside #menu ul li a{color:#c8c7c9;font-weight:normal;text-decoration:none;font-variant:normal;font-size:1.1em;font-style:normal;display:block;position:relative;overflow:hidden;padding-right:20px;padding-left:20px;}#header #header-inside #menu ul li a:hover{color:#fffeff;}#wrapper{background-color:#ededed;padding-top:20px;clear:both;display:block;position:relative;overflow:visible;border-top:1px solid #fff;}#wrapper #content{display:block;background-color:#fff;min-height:100px;position:relative;display:block;border:1px solid #cdcdcd;padding-bottom:5px;}#wrapper #content div.note{cursor:pointer;border:1px solid #fdf5a2;padding:10px 10px 10px 35px;color:#313131;margin-bottom:10px;text-align:left;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:#fff 0 1px 0;background:#fefae8 url(../images/icons/note.png?1290220917) no-repeat 10px center;font-style:normal;font-size:1.1em;}.page{margin-top:10px;margin-bottom:10px;display:block;position:relative;}#wrapper #content #title{height:35px;background:#ededed url(../images/page/title-bg.png?1290220919) repeat-x 0 bottom;}#wrapper #content #title #title-header{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.6em;text-shadow:#fff 0 1px 0;color:#313131;}#wrapper #content #title #title-header-dashboard{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;text-shadow:#fff 0 1px 0;color:#313131;padding-left:10px;}#wrapper #content #title #options-header-dashboard{float:right;margin-right:10px;}#wrapper #content #title #title-header img{vertical-align:middle;margin-top:-5px;margin-right:10px;}#wrapper #content #title #title-menu-holder{line-height:35px;height:35px;float:right;}#wrapper #content #title #title-menu-holder ul#title-menu{line-height:34px;height:35px;float:right;}#wrapper #content #title #title-menu-holder ul#title-menu li{float:left;padding-left:10px;padding-right:10px;border-right:1px solid #ddd;border-left:1px solid #fff;display:block;position:relative;overflow:visible;}#wrapper #content #title #title-menu-holder ul#title-menu li:hover{background-color:rgba(255,254,255,0.7);}#wrapper #content #title #title-menu-holder ul#title-menu li:first-child{border-left-style:none;width:1px;display:block;position:relative;overflow:hidden;padding:0;}#wrapper #content #title #title-menu-holder ul#title-menu li:last-child{border-right-style:none;width:1px;!important display:block;position:relative;overflow:hidden;padding:0;}#wrapper #content #title #title-menu-holder ul#title-menu li a{font-weight:bold;text-decoration:none;font-variant:normal;color:#353535;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative;overflow:hidden;}#wrapper #content #title #title-menu-holder ul#title-menu li a img{vertical-align:middle;margin-top:-5px;margin-right:5px;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu{clear:both;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.2);box-shadow:0 1px 10px rgba(0,0,0,0.2);display:inline-block;position:absolute;top:35px;z-index:999999;background-color:#fff;min-width:230px;right:0;padding:5px;visibility:visible;overflow:visible;border-bottom:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:first-child{border-top-style:none;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd{height:35px;line-height:35px;padding-left:5px;padding-right:5px;display:block;position:relative;overflow:hidden;border-top:1px dotted #eee;font-size:.9em;color:#222;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:1.0em;color:#000;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a span.shortcut{-webkit-border-radius:5px;-moz-border-radius:5px;line-height:1.4em;vertical-align:middle;float:right;background-color:#424242;color:#fffeff;text-shadow:#000 0 1px 0;display:block;position:relative;overflow:hidden;margin-top:8px;margin-right:5px;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;text-transform:none;padding:3px 5px;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:hover{background-color:#f6f6f6;}#wrapper #content #sidebar{display:block;position:relative;overflow:hidden;background-color:#ededed;}#wrapper #content #sidebar #sidebar-inside{min-height:500px;display:block;position:relative;overflow:hidden;border:1px solid #fff;}#footer{margin-top:10px;margin-bottom:30px;}#footer #footer-inside{color:#939393;font-size:.9em;text-align:right;height:25px;line-height:25px;padding-left:20px;padding-right:10px;}#footer #footer-inside a{color:#494949;}div.pad-left{margin-left:10px;}#form-holder{display:block;position:relative;overflow:hidden;}form.validate textarea{height:140px;width:600px;padding:5px;}#snorbybox-holder{position:relative;display:block;height:700px;overflow:auto;width:1015px;}h3{font-size:1.3em;color:#5188e7;margin-bottom:5px;display:block;position:relative;overflow:hidden;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:lowercase;text-align:left;}.blur{color:#bdbdbd;}.blank{color:#e5e5e5;}.no-overflow{overflow:hidden;}.right{float:right!important;}.left{float:left;}.round{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}.round-with-tabs{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;}.round_top{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;}.round_bottom{-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;}.shadow{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);}.shadow-in{-webkit-box-shadow:inset 0 1px 10px #b0b0b0;-moz-box-shadow:inset 0 1px 10px #b0b0b0;box-shadow:inset 0 1px 10px #b0b0b0;}.shadow-light{-webkit-box-shadow:inset 0 1px 10px #fbfbfb;-moz-box-shadow:inset 0 1px 10px #fbfbfb;box-shadow:inset 0 1px 10px #fbfbfb;}.no-wrap{white-space:nowrap;}#box-holder div.box{cursor:pointer;}.fieldWithErrors{display:inline;}#error_explanation,.error_messages{width:400px;border:2px solid #CF0000;padding:0;padding-bottom:12px;margin-bottom:20px;background-color:#f0f0f0;font-size:12px;}.error_messages h2{text-align:left;font-weight:bold;padding:5px 10px;font-size:12px;margin:0;background-color:#c00;color:#fff;}.error_messages p{margin:8px 10px;}.error_messages ul{margin:0;}.ui-notify{width:350px;position:fixed;top:10px;right:10px;z-index:999999;}.ui-notify-message{padding:10px;margin-bottom:15px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}.ui-notify-message h1{font-size:14px;margin:0;padding:0;}.ui-notify-message p{margin:3px 0;padding:0;line-height:18px;}.ui-notify-message:last-child{margin-bottom:0;}.ui-notify-message-style{background:#000;background:rgba(0,0,0,0.8);-moz-box-shadow:0 0 6px #000;-webkit-box-shadow:0 0 6px #000;box-shadow:0 0 6px #000;}.ui-notify-message-style h1{color:#fff;font-weight:bold;}.ui-notify-message-style p{color:#fff;}.ui-notify-close{color:#fff;text-decoration:underline;}.ui-notify-click{cursor:pointer;}.ui-notify-cross{margin-top:-4px;float:right;cursor:pointer;text-decoration:none;font-size:12px;font-weight:bold;text-shadow:0 1px 1px #fff;padding:2px;}.ui-notify-cross:hover{color:#ffffab;}.ui-notify-cross:active{position:relative;top:1px;}#sensors{display:block;position:relative;padding:10px 10px 5px;}span.status{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd;}span.status.ok{background:#1ba316;}span.status.warning{background:#fea922;}span.status.fail{background:#fd2516;}table td a{padding:3px 5px;background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(-90deg,#fff,#e0e0e0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#575757;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #9a9a9b;}table td a.ip-button{height:15px;line-height:17px;width:100px;position:relative;overflow:hidden;display:block;text-align:center;top:2px;}table td a:hover{background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(90deg,#fff,#e0e0e0);border:1px solid #9a9a9b;}table{width:100%;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;}.table-tooltip{display:block;position:relative;overflow:hidden;margin-bottom:10px;background:url(../images/table-tooltip.png?1291170801) repeat-x 0 top;height:9px;margin-left:8px;margin-right:6px;}table th{text-align:left;padding-left:10px;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;}table th img{vertical-align:middle;margin-top:-3px;}table th input{vertical-align:middle;margin-left:4px;}table td img{vertical-align:middle;margin-top:-2px;margin-right:5px;}table td img.edit,table td img.trash{margin-right:0;padding-right:3px;padding-left:3px;}table td{padding-left:10px;height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1290220919) repeat-x 0 bottom;}table td.severity{width:45px;}table td.first{border-left:1px solid #cdcdcd;}table tbody.top tr:first-child td{border-top:1px solid #cdcdcd;}table td.last{border-right:1px solid #cdcdcd;}table tr:hover td{background-color:#fefeeb;}table td:last{border-bottom-style:none;}table td.last_error a,table td.handler a{font-family:mono,Courier,"Courier New";}ul.table{width:990px;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;margin:0;padding:0;}ul.table li.header{text-align:left;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;}ul.table li.header div{display:block;position:relative;overflow:hidden;float:left;}ul.table div.content li .row{min-height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1290220919) repeat-x 0 bottom;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}ul.table div.content li .row .signature{white-space:nowrap;display:block;width:430px;position:relative;overflow:hidden;}ul.table div.content li .row.classified .signature{text-decoration:line-through;color:#aaa;}ul.table div.content li.event.highlight .row{background-color:#414346;border-bottom:1px solid #414346;background-image:none;color:#fff;}ul.table div.content li.event.highlight .row div.timestamp{color:#fffeff;text-shadow:#000 0 1px 0;}ul.table div.content li.event .row div .create-favorite{cursor:pointer;background:url(../images/icons/star.png?1290220944) no-repeat 0 bottom;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px;}ul.table div.content li.event .row div .destroy-favorite{cursor:pointer;background:url(../images/icons/star.png?1290220944) no-repeat 0 top;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px;}ul.table div.content li .row div{float:left;}ul.table div.content li .row div.click{cursor:pointer;}ul.table div.content li.currently-over .row{background-color:#fcfed7;}ul.table li .row div img{vertical-align:middle;margin-top:-5px;}ul.table li .row div.address{width:105px;padding-left:12px;}ul.table li .row div.timestamp{width:100px;display:block;position:absolute;overflow:hidden;color:#b1b1b1;font-weight:bold;text-decoration:none;font-variant:normal;font-size:.9em;text-shadow:#fff 0 1px 0;text-align:right;right:0;padding-right:15px;}ul.table li .row div.timestamp span{color:#fff;font-weight:normal;text-decoration:none;font-variant:normal;margin-right:5px;text-shadow:none;font-style:normal;font-size:1em;padding:5px 7px;text-align:left;position:absolute;left:15px;height:12px;line-height:12px;top:4px;}ul.table li .row div.small{display:block;position:relative;overflow:visible;min-width:20px;width:20px;padding-left:10px;}#events{display:block;position:relative;padding-top:10px;padding-bottom:10px;}table.ip-header td a{color:#202222;text-decoration:none;font-variant:normal;font-weight:bold;}ul.table div.content div.event-data{display:block;position:relative;float:none;!important clear:none;width:100%;}ul.table div.content div.event-data table{background:#47494a;border:3px solid #47494a;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}ul.table div.content div.event-data table th{background-color:#5f6264;color:#fffeff;text-shadow:#000 0 0 0;border-bottom:1px solid #e3e3e3;}ul.table div.content div.event-data table th.first{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;}ul.table div.content div.event-data table th.last{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}ul.table div.content div.event-data table td.first{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}ul.table div.content div.event-data table td.last{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}ul.table div.content div.event-data table td{background-color:#fff;}ul.table div.content div.event-data table tr:hover td{background-color:#fff;}ul.table div.content div.event-data div.event-data-holder{float:none;!important display:block;position:relative;border:1px solid #cdcdcd;background-color:#2d2f31;border-top-style:none;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside{position:relative;display:block;border-top-style:none;padding:5px;overflow:visible;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus{margin:10px;display:block;position:relative;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus-side{display:block;position:relative;overflow:hidden;margin:0 10px;}ul.table div.content div.event-data div.event-data-holder .section-title{margin:5px 0;padding:0 0 5px;font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;width:500px;}ul.table div.content div.event-data div.event-data-holder ul div#tab-title{font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;float:left;}a.dark-button{cursor:pointer;padding:3px 5px;background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#787c7e',endColorstr='#5f6264');background:-webkit-gradient(linear,0% 0,0% 100%,from(#787c7e),to(#5f6264));background:-moz-linear-gradient(-90deg,#787c7e,#5f6264);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#fffeff;font-weight:normal;text-decoration:none;font-variant:normal;border:1px solid #090809;font-size:.9em;text-shadow:#787c7e 0 1px 0;}a.dark-button img{vertical-align:middle;margin-top:-2px;padding:0;}a.dark-button:hover{background-color:#6b6f71;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#929597',endColorstr='#6b6f71');background:-webkit-gradient(linear,0% 0,0% 100%,from(#929597),to(#6b6f71));background:-moz-linear-gradient(-90deg,#929597,#6b6f71);}a.dark-button:active{background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5f6264',endColorstr='#46484a');background:-webkit-gradient(linear,0% 100%,0% 0,from(#5f6264),to(#46484a));background:-moz-linear-gradient(90deg,#5f6264,#46484a);}ul.table div.content #event-menu{float:right;display:block;position:relative;}ul.table div.content #event-menu dl#event-sub-menu{display:block;position:absolute;z-index:99999;background-color:#363636;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#000000',endColorstr='#363636');background:-webkit-gradient(linear,0% 100%,0% 0,from(#000),to(#363636));background:-moz-linear-gradient(90deg,#000,#363636);color:#fffeff;width:200px;border:1px solid #222;padding:5px;}ul.table div.content #event-menu dl#event-sub-menu dd{padding:0 5px;}ul.table div.content #event-menu dl#event-sub-menu dd a{color:#fff;text-shadow:#000 0 1px 0;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;position:relative;}ul.table div.content #event-menu dl#event-sub-menu dd:hover{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-color:#790908;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#790908',endColorstr='#a90d0b');background:-webkit-gradient(linear,0% 100%,0% 0,from(#790908),to(#a90d0b));background:-moz-linear-gradient(90deg,#790908,#a90d0b);color:#fff;text-shadow:#000 0 1px 0;}ul.table div.content #event-menu ul{display:block;position:relative;}ul.table div.content #event-menu ul li{float:left;display:block;position:relative;height:30px;line-height:30px;margin-right:10px;}ul.table div.content div.event-data div.event-data-holder .section-title.bottom-none{margin-bottom:0;padding-bottom:0;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs{display:block;position:relative;overflow:hidden;margin-top:10px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li{float:right;height:25px;line-height:25px;margin-right:5px;background-color:#6e7172;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current{background-color:#47494a;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li a{font-weight:normal;text-decoration:none;font-variant:normal;padding:3px 10px;color:#bdc1c3;font-style:normal;font-size:.9em;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current a{color:#fff;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{padding:5px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-holder{margin-bottom:12px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii,ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload{background-color:#ededed;border:5px solid #47494a;color:#242424;font-family:"Courier New",Courier,mono;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;overflow:auto;max-height:500px;overflow:auto;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload pre{border:1px solid #fff;line-height:14px;font-variant:normal;text-decoration:none;font-weight:normal;font-style:normal;padding:10px 10px 0;}.form-actions{text-align:right;padding-bottom:2px;}.form-actions .cancel{margin-top:5px;float:left;}.form-actions .minibutton.cancel{margin-top:0;}.form-actions .optional{display:block;padding-top:8px;float:left;margin-right:15px;}.form-actions .optional span.text{padding:0 3px;}.form-actions .optional input{position:relative;top:-1px;}button.default,a.button.default{height:30px;padding:0;position:relative;top:1px;font-family:helvetica,arial,freesans,clean,sans-serif;font-weight:bold;font-size:12px;color:#333;text-shadow:1px 1px 0 #fff;white-space:nowrap;overflow:visible;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border-bottom:1px solid #ebebeb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.3);box-shadow:0 1px 2px rgba(0,0,0,0.3);cursor:pointer;-webkit-font-smoothing:subpixel-antialiased!important;border:1px solid #cbcbcb;margin-right:5px;}button.default.loading,a.button.default.loading{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1287102143) no-repeat center center;}button.default.loading:hover,a.button.default.loading:hover{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1287102143) no-repeat center center;}button.default.warning,a.button.default.warning{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-color:#716b6f;background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);}div#new_note button.default.warning,div#new_note a.button.default.warning{border:1px solid #fd462d;}button.default.success,a.button.default.success{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1fc021;border-bottom-color:#1aa31b;background:#23c926;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#23c926));background:-moz-linear-gradient(-90deg,#1ef727,#23c926);}button.default.success:hover,a.button.default.success:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1fc021;border-bottom-color:#1aa31b;background:#27de29;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#27de29');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#27de29));background:-moz-linear-gradient(-90deg,#1ef727,#27de29);}button.default.success:active,a.button.default.success:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1ef727;border-bottom-color:#1ef727;background:#23c926;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');background:-webkit-gradient(linear,0% 100%,0% 0,from(#1ef727),to(#23c926));background:-moz-linear-gradient(90deg,#1ef727,#23c926);}button.default.warning:hover,a.button.default.warning:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b);}button.default.warning:active,a.button.default.warning:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(90deg,#fd4f52,#d72219);}a.button.default{display:inline-block;}button.default span,a.button.default span{display:block;height:30px;padding:0 10px;line-height:30px;}button.default:hover,a.button.default:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-bottom-color:#0770a0;background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #515151;}button.default:active,a.button.default:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 100%,0% 0,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(90deg,#8a8a8a,#575757);}button.default:active span,a.button.default:active span{background-position:0 -120px;}button.default::-moz-focus-inner{margin:-1px -3px;}button.default img,a.button.default img{position:relative;top:-1px;margin-right:3px;vertical-align:middle;}button.default:disabled,.button.default.disabled{opacity:.5;}div.paginate-info{display:block;position:relative;overflow:hidden;text-align:center;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;color:#a6a6a6;margin-top:10px;}ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background:#ededed;padding-top:7px;padding-bottom:7px;border-bottom:1px solid #fff;border:1px solid #dedede;text-align:center;}div.pagination span,div.pagination em,ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#ededed;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbfbfb',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fbfbfb),to(#ededed));background:-moz-linear-gradient(-90deg,#fbfbfb,#ededed);border:1px solid #AAA;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px;}.notes ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background-color:#1b1b1b;padding-top:5px;padding-bottom:5px;border-bottom:1px solid #fff;border:1px solid #000;text-align:center;}.notes div.pagination span,.notes div.pagination em,.notes ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#282828 -webkit-gradient(linear,0% 0,0% 100%,from(#282828),to(#000));background-color:#282828;border:1px solid #000;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px;}.notes ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#fff;font-size:1.1em;font-style:normal;text-shadow:#000 0 1px 0;}.notes ul.pager li.active a{color:#fd2516;font-weight:bold;text-decoration:none;font-variant:normal;}.notes div.pagination span:hover,.notes ul.pager li:hover{border:1px solid #424242;}.notes ul.pager li.loading{text-indent:-9999em;background:#000 url(../images/icons/pager.gif?1287102143) no-repeat center center;}div.pagination span:hover,ul.pager li:hover{color:#1b67fb;border:1px solid #7b7b7b;}ul.pager li.loading{text-indent:-9999em;background:#fff url(../images/icons/pager.gif?1287102143) no-repeat center center;}ul.pager li.more:hover,ul.pager li.more{color:#8c8d90;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;}ul.pager li.active a{color:#2578fc;font-weight:bold;text-decoration:none;font-variant:normal;}ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#383838;font-size:1.1em;font-style:normal;}span.severity-example{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;}span.severity,ul.table li div.small span.severity{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd;}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/color-picker/colorpicker_background.png?1290220898);font-family:Arial,Helvetica,sans-serif;display:none;}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair;}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/color-picker/colorpicker_overlay.png?1290220933);}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/color-picker/colorpicker_select.gif?1290220894);margin:-5px 0 0 -5px;}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize;}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/color-picker/colorpicker_indic.gif?1290220894) left top;margin:-4px 0 0 0;left:0;}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00;}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00;}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:11px;}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/color-picker/colorpicker_hex.png?1290220926) top;left:212px;top:142px;}.colorpicker_hex input{right:6px;}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute;}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize;}.colorpicker_rgb_r{background-image:url(../images/color-picker/colorpicker_rgb_r.png?1290220927);top:52px;left:212px;}.colorpicker_rgb_g{background-image:url(../images/color-picker/colorpicker_rgb_g.png?1290220927);top:82px;left:212px;}.colorpicker_rgb_b{background-image:url(../images/color-picker/colorpicker_rgb_b.png?1290220927);top:112px;left:212px;}.colorpicker_hsb_h{background-image:url(../images/color-picker/colorpicker_hsb_h.png?1290220926);top:52px;left:282px;}.colorpicker_hsb_s{background-image:url(../images/color-picker/colorpicker_hsb_s.png?1290220927);top:82px;left:282px;}.colorpicker_hsb_b{background-image:url(../images/color-picker/colorpicker_hsb_b.png?1290220926);top:112px;left:282px;}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/color-picker/colorpicker_submit.png?1290220898) top;left:322px;top:142px;overflow:hidden;}.colorpicker_focus{background-position:center;}.colorpicker_hex.colorpicker_focus{background-position:bottom;}.colorpicker_submit.colorpicker_focus{background-position:bottom;}.colorpicker_slider{background-position:bottom;}.spch-bub-inside{position:relative;}a.spch-bub-inside{color:#00F;text-decoration:none;}.spch-bub-inside em{font-style:normal;font-size:.8em;}.spch-bub-inside em{background:#00F;color:#FFF;padding:0 .4em;-moz-border-radius:.25em;-webkit-border-radius:.25em;border-radius:.25em;position:relative;}.spch-bub-inside .point{width:0;height:0;position:absolute;top:1.1em;left:.4em;display:block;border-left:.45em solid #00F;border-bottom:.45em solid #FFF;border-bottom:.45em solid rgba(0,0,0,0);overflow:hidden;}a.spch-bub-inside:hover{color:#F00;}a.spch-bub-inside:hover em{cursor:pointer;background:#F00;color:#FF0;}a.spch-bub-inside:hover .point{border-left:.5em solid #F00;}span.payload-number{color:#8a8a8d;}span.payload-hex{color:#343e4b;}span.payload-ascii{color:#505254;font-weight:bold;text-decoration:none;font-variant:normal;}label{text-transform:capitalize;}input.error{border:2px solid #fd2e3f;}input[disabled]{opacity:.9;color:#e6e6e6;}form.basic-form label{color:#4a4a4a;}form.basic-form input[type='password'],form.basic-form input[type='text']{width:300px;padding:7px;}form.basic-form p{margin-top:10px;margin-bottom:10px;}label.error{visibility:hidden;display:none;position:absolute;bottom:0;left:0;overflow:hidden;}i{color:#a5a5a5;font-style:italic;text-decoration:none;font-variant:normal;font-size:.8em;}#form-actions{margin-bottom:10px;display:block;margin-top:10px;}input[type='password'],input[type='text']{margin-bottom:10px;font-size:1.3em;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;padding:5px;}td.chart{position:relative;width:200px;padding-left:10px;padding-bottom:0;}div.progress-container{vertical-align:middle;border:1px solid #c0c0c0;width:180px;float:left;background:#fff;display:block;position:relative;top:6px;overflow:hidden;}div.progress-container>div{height:17px;background:transparent url(../images/page/chart-bg-blue.png?1290220945) repeat-x;}div.progress-container>div>span{height:17px;font-size:x-small;color:#545454;line-height:17px;display:block;position:absolute;right:5px;font-weight:bold;text-shadow:#fff 0 1px 0;}div.notes{display:block;position:relative;overflow:hidden;}strong.no-notes{color:#acacac;}div#new_note{display:block;position:relative;overflow:hidden;}div.notes div#new_note textarea#body{outline:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:130px;background-color:#000;width:800px;padding:5px;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;border:4px solid #525252;}.event-note{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);display:block;position:relative;overflow:hidden;background-color:#212121;padding:10px;border:1px solid #3f3f3f;margin-bottom:10px;}.event-note:hover{background-color:#242424;}.event-note .note-avatar-holder{float:left;width:55px;display:block;position:relative;overflow:hidden;}.event-note .note-avatar-holder img{background:#000;border:1px solid #3a3a3a;float:left;margin:1px 10px 0 0;padding:4px;width:32px;height:32px;}.event-note .username{font-weight:normal;text-decoration:none;font-variant:normal;color:#bdced6;text-shadow:#000 0 1px 0;margin-bottom:10px;font-style:normal;font-size:1.2em;}.event-note .note-body{color:#fff;line-height:17px;margin-bottom:20px;}.event-note .note-body strong{color:#fc251f;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:capitalize;display:inline-block;}.event-note .note-body p{padding-bottom:5px;}.event-note .note-body a{color:#fd3640;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}.event-note .note-body sup.footnote{font-size:.9em;padding-left:5px;padding-right:5px;}.event-note .note-body span.caps{font-weight:bold;color:#d9d9d9;text-decoration:underline;}.event-note .note-options{display:none;visibility:hidden;}.event-note:hover .note-options{text-decoration:none;font-variant:normal;font-size:small;text-align:right;display:block;position:absolute;overflow:hidden;top:5px;right:10px;visibility:visible;height:25px;line-height:25px;}.event-note .note-options a{padding:3px 5px;color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #fd462d;font-size:.8em;}.event-note .note-options a:hover{background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b);}div.notes div#new_note textarea#body:focus,div.notes div#new_note textarea#body:active{outline:none;}img.avatar{border:5px solid #ededed;}img.avatar-small{border:3px solid #ededed;}#general-settings div.pc-settings{background:#fbfbfb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#fbfbfb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#fbfbfb));background:-moz-linear-gradient(-90deg,#fff,#fbfbfb);display:block;position:relative;overflow:hidden;border:1px solid #d1d1d1;margin-bottom:15px;}#general-settings div.pc-settings p{padding-top:3px;padding-bottom:3px;}#settings .crop-holder{display:block;position:relative;overflow:hidden;margin-bottom:20px;}#settings .user-show-avatar{position:relative;display:block;overflow:hidden;margin-bottom:10px;color:#686868;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#settings .user-show-avatar strong{color:#141414;font-weight:bold;text-decoration:none;font-variant:normal;}#settings .user-show-avatar p{margin:0 0 7px;padding:0;}#settings ul#user-info{display:block;position:relative;overflow:hidden;background-color:#ededed;border:3px solid #ededed;}#settings ul#user-info .inside{padding:10px;display:block;position:relative;overflow:hidden;background:#fff;border:1px solid #dcdcdc;}#settings ul#user-info li{height:25px;line-height:25px;border-bottom:1px solid #eee;}#settings ul#user-info li strong{color:#a1a1a1;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;width:120px;display:block;position:relative;overflow:hidden;float:left;text-align:left;margin-right:10px;}#settings .user-show-avatar img{float:left;margin-right:10px;}.tipsy{padding:5px;font-size:10px;position:absolute;z-index:100000;}.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:left;line-height:15px;}.tipsy-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;}.tipsy-arrow{position:absolute;background:url(../images/tipsy.gif?1289444651) no-repeat top left;width:9px;height:5px;}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-4px;}.tipsy-nw .tipsy-arrow{top:0;left:10px;}.tipsy-ne .tipsy-arrow{top:0;right:10px;}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-4px;background-position:bottom left;}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;background-position:bottom left;}.tipsy-se .tipsy-arrow{bottom:0;right:10px;background-position:bottom left;}.tipsy-e .tipsy-arrow{top:50%;margin-top:-4px;right:0;width:5px;height:9px;background-position:top right;}.tipsy-w .tipsy-arrow{top:50%;margin-top:-4px;left:0;width:5px;height:9px;}#dashboard{position:relative;overflow:hidden;display:block;margin-bottom:10px;margin-top:10px;}#dashboard #box-tabs{position:relative;display:block;overflow:hidden;}#dashboard #box-tabs ul#box-menu{display:block;position:relative;overflow:hidden;height:25px;line-height:25px;padding-left:10px;}div.dashboard-graph{height:400px;width:722px;}div.dashboard-graph.no-pie-data{background:#fff url(../images/dashboard/pie-no-data.png?1291576897) no-repeat center;display:block;position:relative;overflow:hidden;}#dashboard #box-tabs ul#box-menu li{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;background-color:#c3c5cb;position:relative;overflow:hidden;display:block;float:left;margin-right:3px;top:5px;}#dashboard #box-tabs ul#box-menu li:hover{top:0;background-color:#b3b5bb;}#dashboard #box-tabs ul#box-menu li.active{background-color:#eee;top:0;}#dashboard #box-tabs ul#box-menu li.active a{color:#282828;}#dashboard #box-tabs ul#box-menu li a{padding-right:10px;padding-left:10px;color:#fffeff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;}#dashboard h2{text-transform:capitalize;color:#6a8092;font-weight:normal;text-decoration:none;font-variant:normal;padding-left:5px;font-style:normal;font-size:1.2em;margin-bottom:5px;}#dashboard .main,#dashboard .secondary{position:relative;display:block;overflow:hidden;}#dashboard .main .dashboard-main{width:730px;display:block;position:relative;}#dashboard .secondary ul.box-list{display:block;position:relative;overflow:hidden;margin-bottom:20px;border-top-style:none;}#dashboard .secondary ul.box-list li{height:30px;line-height:30px;border-bottom:1px solid #ededed;color:#6a7e8d;display:block;position:relative;overflow:hidden;font-size:1.0em;text-align:left;}#dashboard .secondary ul.box-list li a{font-size:1.0em;color:#6a7e8d;text-align:left;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#dashboard .secondary ul.box-list li span{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;line-height:1.4em;!important display:block;float:right;background-color:#eee;padding:3px 5px;top:5px;display:block;position:relative;font-size:.9em;text-align:left;color:#575757;text-shadow:#fff 0 1px 0;}#dashboard .secondary ul.box-list li:hover span{background-color:#469dfc;color:#fff;text-shadow:#000 0 1px 0;}#dashboard .secondary ul.box-list li img{vertical-align:middle;margin-top:-2px;margin-right:5px;}#dashboard .main .dashboard-menu{display:block;position:relative;overflow:hidden;}#dashboard .secondary .dashboard-header{display:block;position:relative;overflow:hidden;padding-right:10px;margin-bottom:5px;border-bottom:3px solid #dedede;padding-bottom:5px;}#dashboard .secondary .dashboard-header span{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b;}#dashboard .main .dashboard-menu ul{display:block;position:relative;overflow:hidden;padding-right:10px;padding-left:10px;margin-bottom:10px;border-bottom:3px solid #dedede;width:710px;}#dashboard .main .dashboard-menu ul li{float:left;margin-right:10px;padding-bottom:5px;}#dashboard .main .dashboard-menu ul li img{vertical-align:middle;margin-top:-3px;margin-left:10px;}#dashboard .main .dashboard-menu ul li.active a{color:#405fa3;}#dashboard .main .dashboard-menu ul li a{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b;}#dashboard .main .dashboard-menu ul li a:hover{border-bottom:2px solid #bdbdbd;color:#405fa3;}#dashboard .main #box-holder{display:block;position:relative;overflow:hidden;}#dashboard .main .box{height:190px;border:1px solid #dbdbdb;position:relative;overflow:hidden;display:block;margin-bottom:15px;background:#ededed url(../images/dashboard/box-bg.png?1290220934) no-repeat;}#dashboard .main .box-large{width:724px;border:4px solid #eee;position:relative;overflow:hidden;display:block;margin-bottom:10px;}#dashboard .main .box-large .box-large-inside{position:relative;overflow:hidden;display:block;border:1px solid #e0e0e0;}#dashboard .main .box .content{height:140px;margin:10px 10px 5px;padding:5px;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border:1px solid #f7fef4;}#dashboard .main .box .content .data{height:145px;display:block;position:relative;overflow:hidden;}#dashboard .main .box .content .data #box-title{font-weight:normal;text-decoration:none;font-variant:normal;color:#454549;font-size:1.3em;text-align:center;text-transform:uppercase;letter-spacing:-1px;margin-top:5px;text-shadow:#fff 0 1px 0;font-style:normal;}#dashboard .main .box .content .data #box-count{text-align:center;text-decoration:none;color:#646167;margin-top:10px;text-shadow:#fff 0 1px 0;font-style:normal;font-weight:bold;font-size:5.0em;}#dashboard .main .box .content .data .box-graph{position:absolute;bottom:5px;right:5px;left:5px;display:block;overflow:hidden;text-align:center;}#dashboard .main .box .footer{vertical-align:middle;line-height:20px;height:20px;padding-left:10px;padding-right:10px;text-align:left;color:#45637a;font-size:.9em;font-weight:bold;}#dashboard .main .box .footer span{color:#b2aeb0;}#dashboard .main .box .footer img{vertical-align:middle;float:right;}#search-box{display:block;position:relative;overflow:hidden;}#search-box input{width:270px;}#search-box select{width:285px;}#search-box div{margin-bottom:15px;}#snorbybox-content{display:block;overflow:hidden;position:relative;}#snorbybox-content #snorbybox-form-holder{display:block;position:relative;overflow:hidden;}#snorbybox-content #snorbybox-form-holder #snorbybox-form{width:320px;float:left;display:block;position:relative;overflow:hidden;margin-bottom:10px;}#snorbybox-content select#user_select,#snorbybox-content select#sensor_select{width:610px;}#snorbybox-content #snorbybox-form-full{display:block;position:relative;overflow:hidden;}#snorbybox-content #snorbybox-form-full textarea{height:200px;width:610px;}#snorbybox-content h2{font-size:1.4em;color:#1f1f1f;font-weight:bold;text-decoration:none;font-variant:normal;margin-bottom:10px;}#snorbybox-content #hotkey-section{width:365px;float:left;margin-bottom:15px;}#snorbybox-content #hotkey-section dl{display:block;position:relative;overflow:hidden;}#snorbybox-content #hotkey-section dl dd{display:block;overflow:hidden;position:relative;height:30px;line-height:30px;color:#2e2e2e;font-weight:bold;text-decoration:none;font-variant:normal;margin-top:3px;margin-bottom:3px;}#snorbybox-content #hotkey-section dl dd span.hotkey{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:5px;background-color:#2774fb;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;margin-right:10px;text-shadow:#000 0 1px 0;}#snorbybox-content #hotkey-section dl dd span.hotkey strong{color:#c9c8ce;text-transform:uppercase;}#snorbybox-content #hotkey-section dl dd span.hotkey em{color:#c3c3c3;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:none;font-style:normal;}form#new_severity p{margin-bottom:5px;}form#new_classification p{margin-bottom:5px;}form#new_classification textarea{width:450px;}
\ No newline at end of file
+.container_12{margin-left:auto;margin-right:auto;width:1020px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12{display:inline;float:left;position:relative;margin-left:10px;margin-right:10px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:65px}.container_12 .grid_2{width:150px}.container_12 .grid_3{width:235px}.container_12 .grid_4{width:320px}.container_12 .grid_5{width:405px}.container_12 .grid_6{width:490px}.container_12 .grid_7{width:575px}.container_12 .grid_8{width:660px}.container_12 .grid_9{width:745px}.container_12 .grid_10{width:830px}.container_12 .grid_11{width:915px}.container_12 .grid_12{width:1000px}.container_12 .prefix_1{padding-left:85px}.container_12 .prefix_2{padding-left:170px}.container_12 .prefix_3{padding-left:255px}.container_12 .prefix_4{padding-left:340px}.container_12 .prefix_5{padding-left:425px}.container_12 .prefix_6{padding-left:510px}.container_12 .prefix_7{padding-left:595px}.container_12 .prefix_8{padding-left:680px}.container_12 .prefix_9{padding-left:765px}.container_12 .prefix_10{padding-left:850px}.container_12 .prefix_11{padding-left:935px}.container_12 .suffix_1{padding-right:85px}.container_12 .suffix_2{padding-right:170px}.container_12 .suffix_3{padding-right:255px}.container_12 .suffix_4{padding-right:340px}.container_12 .suffix_5{padding-right:425px}.container_12 .suffix_6{padding-right:510px}.container_12 .suffix_7{padding-right:595px}.container_12 .suffix_8{padding-right:680px}.container_12 .suffix_9{padding-right:765px}.container_12 .suffix_10{padding-right:850px}.container_12 .suffix_11{padding-right:935px}.container_12 .push_1{left:85px}.container_12 .push_2{left:170px}.container_12 .push_3{left:255px}.container_12 .push_4{left:340px}.container_12 .push_5{left:425px}.container_12 .push_6{left:510px}.container_12 .push_7{left:595px}.container_12 .push_8{left:680px}.container_12 .push_9{left:765px}.container_12 .push_10{left:850px}.container_12 .push_11{left:935px}.container_12 .pull_1{left:-85px}.container_12 .pull_2{left:-170px}.container_12 .pull_3{left:-255px}.container_12 .pull_4{left:-340px}.container_12 .pull_5{left:-425px}.container_12 .pull_6{left:-510px}.container_12 .pull_7{left:-595px}.container_12 .pull_8{left:-680px}.container_12 .pull_9{left:-765px}.container_12 .pull_10{left:-850px}.container_12 .pull_11{left:-935px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}.ui-state-default{padding:0!important;text-align:center!important}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:1104;display:none}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(../images/fancybox/fancybox.png?1308968925)}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:1101;outline:none;display:none}#fancybox-outer{position:relative;width:100%;height:100%;background:transparent}#fancybox-content{width:0;height:0;padding:0;outline:none;position:relative;overflow:hidden;z-index:1102;background-color:transparent}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:1101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url(../images/fancybox/fancybox.png?1308968925) -40px 0;cursor:pointer;z-index:1103;display:none}#fancybox-error{color:#444;font:normal 12px/20px Arial;padding:14px;margin:0}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:none;line-height:0;vertical-align:top}#fancybox-frame{width:100%;height:100%;border:none;display:block;background:transparent}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url(../images/fancybox/blank.gif?1308968925);z-index:1102;display:none}#fancybox-left{left:0}#fancybox-right{right:0}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:1102;display:block}#fancybox-left-ico{background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -30px}#fancybox-right-ico{background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -60px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}#fancybox-right:hover span{left:auto;right:20px}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1308968925);-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -162px}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1308968925);background-position:-20px 0}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -182px}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1308968925);background-position:0 -20px;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -142px}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1308968925)}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -122px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:1102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}#fancybox-title-over{padding:10px;background-image:url(../images/fancybox/fancy_title_over.png?1308968925);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{white-space:nowrap}#fancybox-title-float-left{padding-left:15px;background:url(../images/fancybox/fancybox.png?1308968925) -40px -90px no-repeat}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:bold;padding-bottom:3px;background:url(../images/fancybox/fancybox-x.png?1308968925) 0 -40px}#fancybox-title-float-right{padding-left:15px;background:url(../images/fancybox/fancybox.png?1308968925) -55px -90px no-repeat}.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_close.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_left.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_right.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/ancy_title_over.png',sizingMethod='scale');zoom:1}.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_left.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_main.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_right.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight+"px")}#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight ? document.documentElement.clientHeight/2:document.body.clientHeight/2)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop))+'px')}#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_loading.png',sizingMethod='scale')}.fancybox-ie .fancybox-bg{background:transparent!important}.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png',sizingMethod='scale')}div.rule-data pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;background-color:#000;color:#fff;text-decoration:none;padding:10px;margin:5px 0;height:auto;width:auto;border:3px solid #666;font:normal normal normal 1.1em "Courier New",Courier,mono}.boxit{float:none}html,body{font-family:Helvetica,Arial;font-size:12px;background:#ededed url(../images/page/body-bg.png?1311637946) repeat}a img{border:none}a{color:#00f}.clear{clear:both;height:0;overflow:hidden}#snorby-box{border:10px solid rgba(36,36,36,0.9);display:block;position:relative;overflow:visible}#snorby-box #box-content{overflow:auto;display:block;position:relative;padding:10px;height:500px;width:750px;background-color:#fff}#snorby-box #box-content-small{overflow:auto;display:block;position:relative;padding:10px;height:auto;width:750px;background-color:#fff}#snorby-box #box-title{cursor:move;padding:17px 10px;color:#fff;font-weight:normal;font-variant:normal;text-decoration:none;font-size:2.0em;letter-spacing:-1px;text-shadow:#2a2a2a 0 1px 0;font-style:normal;background:#474747 filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#545454',endColorstr='#474747');background:-webkit-gradient(linear,0% 0,0% 100%,from(#545454),to(#474747));background:-moz-linear-gradient(-90deg,#545454,#474747)}#snorby-box #box-footer{display:block;position:relative;overflow:visible;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);border-top:1px solid #dbdbdb;margin-left:-10px;margin-right:-10px;margin-bottom:-10px;padding:10px 10px 12px}div#note-box{padding:10px;display:block;position:relative;overflow:hidden}div#note-box img{vertical-align:top;margin-right:5px;margin-top:-3px}div#note-box.error{background-color:#820d06;color:#fff;margin-top:5px;margin-bottom:5px;border:2px solid #590602}#flash_message{cursor:pointer;position:absolute;display:block;overflow:hidden;top:0;right:0;left:0;background-color:rgba(24,31,34,0.9);z-index:9999999;height:61px}body.login #flash_message{border-bottom:1px solid #000;background-color:rgba(117,29,5,0.8)}body.login #flash_message.success{border-bottom:1px solid #000;background-color:rgba(15,113,12,0.8)}#flash_message div.message{cursor:pointer;text-shadow:#000 0 0 0;line-height:60px;width:960px;margin:auto;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:2.0em;text-align:center;display:block;position:relative;overflow:hidden}#header{display:block;position:relative;overflow:visible;background:#202325 url(../images/header/header-bg.png?1311637946) repeat;border-bottom:1px solid #000}#header #header-inside{display:block;position:relative;overflow:visible;height:92px;border-bottom:1px solid #5a5a5a}#header #header-inside #header-content{height:60px;display:block;position:relative;overflow:visible;border-bottom:1px solid #000}#header #header-inside #header-content #header-top{display:block;position:relative;overflow:visible}#header #header-inside #header-content #header-top #logo{height:60px;text-align:right;background:url(../images/header/logo.png?1311637946) no-repeat;text-indent:-99999em;position:absolute;display:block;overflow:visible;top:0;left:-55px;bottom:0}#header #header-inside #header-content #header-top #logo a{width:265px;display:block;position:relative;overflow:hidden;height:60px;text-indent:99999em}#header #header-inside #header-content #header-top #user-menu{display:block;position:relative;overflow:hidden}#header #header-inside #header-content #header-top #user-menu ul{float:right;display:block;position:relative;overflow:hidden;margin-top:10px}#header #header-inside #header-content #header-top #user-menu ul li{color:#d7d7d7;float:left;padding-right:5px;padding-left:5px;border-left:1px solid #4f4f4f}#header #header-inside #header-content #header-top #user-menu ul li.first{border-left-style:none}#header #header-inside #header-content #header-top #user-menu ul li.last{border-right-style:none}#header #header-inside #header-content #header-top #user-menu ul li a{color:#909090;float:left}#header #header-inside #header-content #header-top #user-menu ul li a:hover{color:#fff}#header #header-inside #menu{border-top:1px solid #5a5a5a;background:#41464a url(../images/header/menu-bg.png?1312053037) repeat-x;display:block;position:relative;overflow:visible;height:30px}#header #header-inside #menu ul{overflow:visible;width:1020px;margin:auto;display:block;position:absolute;top:0;right:0;bottom:0;left:0}#header #header-inside #menu ul li{height:30px;line-height:30px;float:left;overflow:visible;position:relative;display:block;text-align:center;border-right:1px solid #616161;border-left:1px solid #313131}#header #header-inside #menu ul li.menu-error.admin{border-style:none;color:#e3e7e7;margin-right:135px}#header #header-inside #menu ul li.menu-error{border-style:none;color:#e3e7e7;margin-right:5px}#header #header-inside #menu ul li.menu-error:hover{background:transparent none}#header #header-inside #menu ul li.menu-error img{vertical-align:middle;margin-right:5px;margin-top:-5px}#header #header-inside #menu ul li.administration{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat;width:127px;margin-left:10px;position:absolute;height:32px;right:-1px;top:-1px;bottom:0;text-shadow:#6f0a0b 0 1px 0;border-style:none;line-height:32px}#header #header-inside #menu ul li.administration:hover{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat 0 -32px}#header #header-inside #menu ul li.administration:active{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat 0 bottom}#header #header-inside #menu ul li.administration a{color:#f0f0f0;border-style:none;!important}dl#admin-menu{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 20px rgba(0,0,0,0.4);-moz-box-shadow:0 1px 20px rgba(0,0,0,0.4);box-shadow:0 1px 20px rgba(0,0,0,0.4);min-width:200px;padding:0;opacity:.95;display:block;overflow:visible;position:absolute;background:#111;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#2b2b2b',endColorstr='#111');background:-webkit-gradient(linear,0% 0,0% 100%,from(#2b2b2b),to(#111));background:-moz-linear-gradient(-90deg,#2b2b2b,#111);z-index:99999;border:1px solid #151515;top:40px;right:-32.5px;margin-right:0;margin-left:0;margin-bottom:0}dl#admin-menu dd{margin:0;padding:4px 15px;height:25px;display:block;position:relative;overflow:hidden;border:1px solid #000;border-top-style:none;border-bottom-style:none}dl#admin-menu div.admin-arrow{background:url(../images/menu-arrow.png?1312071259) no-repeat;width:23px;height:13px;position:absolute;display:block;top:-10px;right:42%}dl#admin-menu dd:first-child{border-top:1px solid #000;-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}dl#admin-menu dd:last-child{border-bottom:1px solid #000;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}dl#admin-menu dd span{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);float:right;display:block;background-color:#000;padding:0 5px;line-height:20px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;margin-top:2px;border:1px solid #393939;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;height:20px;margin-right:-10px}dl#admin-menu dd:hover{background-color:rgba(66,66,66,0.4)}dl#admin-menu dd a{line-height:25px;margin:0;padding:0;position:relative;display:block;overflow:visible;color:#ececec;text-decoration:none;font-variant:normal;font-weight:normal;font-style:normal}#header #header-inside #menu ul li:hover{background:transparent url(../images/header/menu-bg.png?1312053037) repeat-x 0 bottom}#header #header-inside #menu ul li.blank{width:1px;padding:0;margin:0;border-style:none}#header #header-inside #menu ul li.blank.first{border-right:1px solid #616161}#header #header-inside #menu ul li.blank.last{border-left:1px solid #313131}#header #header-inside #menu ul li a{color:#c8c7c9;font-weight:normal;text-decoration:none;font-variant:normal;font-size:1.1em;font-style:normal;display:block;position:relative;overflow:hidden;padding-right:20px;padding-left:20px}#header #header-inside #menu ul li a:hover{color:#fffeff}#wrapper{padding-top:15px;clear:both;display:block;position:relative;overflow:visible;border-top:1px solid #fff}#wrapper #content{display:block;background-color:#fff;min-height:100px;position:relative;display:block;border:1px solid #bebebe;padding-bottom:5px;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.2);box-shadow:0 1px 10px rgba(0,0,0,0.2)}#wrapper #content div.note{cursor:pointer;border:1px solid #fdf5a2;padding:10px 10px 10px 35px;color:#313131;margin-bottom:10px;text-align:left;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:#fff 0 1px 0;background:#fefae8 url(../images/icons/note.png?1308968925) no-repeat 10px center;font-style:normal;font-size:1.1em}#wrapper #content div.note.lookups{display:block;position:relative;overflow:hidden}.page{margin-top:10px;margin-bottom:10px;display:block;position:relative}#wrapper #content #title{height:35px;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);border-bottom:1px solid #d5d5d5}#wrapper #content #title #title-header{height:35px;line-height:37px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;text-shadow:#fff 0 1px 0;color:#4a4a4a;font-size:1.3em}#title-header i{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#wrapper #content #title #title-header-dashboard{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;text-shadow:#fff 0 1px 0;color:#313131;padding-left:10px}#wrapper #content #title #options-header-dashboard{float:right;margin-right:10px}#wrapper #content #title #title-header img{vertical-align:middle;margin-top:-5px;margin-right:10px}#wrapper #content #title #title-menu-holder{line-height:35px;height:35px;float:right}#wrapper #content #title #title-menu-holder ul#title-menu{line-height:34px;height:35px;float:right;margin-right:10px}#wrapper #content #title #title-menu-holder ul#title-menu li{float:left;padding-left:10px;padding-right:10px;border-right:1px solid #ddd;border-left:1px solid #fff;display:block;position:relative;overflow:visible}#wrapper #content #title #title-menu-holder ul#title-menu li:hover{background-color:rgba(255,254,255,0.7);border-bottom:1px solid #fff}#wrapper #content #title #title-menu-holder ul#title-menu li:first-child{border-left-style:none;width:1px;display:block;position:relative;overflow:hidden;padding:0}#wrapper #content #title #title-menu-holder ul#title-menu li:last-child{border-right-style:none;width:1px;!important display:block;position:relative;overflow:hidden;padding:0}#wrapper #content #title #title-menu-holder ul#title-menu li a{font-weight:bold;text-decoration:none;font-variant:normal;color:#353535;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative;overflow:hidden;margin-right:2px;top:1px}#wrapper #content #title #title-menu-holder ul#title-menu li a img{vertical-align:middle;margin-top:-5px;margin-right:3px}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu{clear:both;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.3);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.3);box-shadow:0 1px 10px rgba(0,0,0,0.3);display:inline-block;position:absolute;top:36px;z-index:999999;background-color:#fff;min-width:230px;right:-1px;padding:5px;visibility:visible;overflow:visible;border-bottom:1px solid #c6c6c6;border-left:1px solid #c6c6c6;border-right:1px solid #c6c6c6}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:first-child{border-top-style:none}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd{height:35px;line-height:35px;padding-left:5px;padding-right:5px;display:block;position:relative;overflow:hidden;border-top:1px dotted #eee;font-size:.9em;color:#222;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:1.0em;color:#000}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a span.shortcut{-webkit-border-radius:5px;-moz-border-radius:5px;line-height:1.4em;vertical-align:middle;float:right;background-color:#424242;color:#fffeff;text-shadow:#000 0 1px 0;display:block;position:relative;overflow:hidden;margin-top:8px;margin-right:5px;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;text-transform:none;padding:3px 5px}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:hover{background-color:#f6f6f6}#wrapper #content #sidebar{display:block;position:relative;overflow:hidden;background-color:#ededed}#wrapper #content #sidebar #sidebar-inside{min-height:500px;display:block;position:relative;overflow:hidden;border:1px solid #fff}#footer{margin-top:10px;margin-bottom:30px}#footer #footer-inside{color:#939393;font-size:.9em;text-align:right;height:25px;line-height:25px;padding-left:20px;padding-right:10px}#footer #footer-inside a{color:#494949}.clearfix:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}div.cover-loader{vertical-align:middle;position:absolute;overflow:hidden;display:block;z-index:99999;text-align:center;font-weight:bold;text-decoration:none;font-variant:normal;color:#222;font-size:2.0em;text-shadow:#fff 0 1px 0}div.pad-left{margin-left:10px}#form-holder{display:block;position:relative;overflow:hidden}form.validate textarea{height:140px;width:600px;padding:5px}#snorbybox-holder{position:relative;display:block;height:700px;overflow:auto;width:1015px}h3{font-size:1.3em;color:#5188e7;margin-bottom:5px;display:block;position:relative;overflow:hidden;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:lowercase;text-align:left}.blur{color:#bdbdbd}.blank{color:#e5e5e5}.no-overflow{overflow:hidden}.right{float:right!important}.left{float:left}.round{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.round-with-tabs{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}.round_top{-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}.round_bottom{-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}.shadow{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2)}.shadow-in{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2)}.shadow-light{-webkit-box-shadow:inset 0 1px 10px #fbfbfb;-moz-box-shadow:inset 0 1px 10px #fbfbfb;box-shadow:inset 0 1px 10px #fbfbfb}.no-wrap{white-space:nowrap}#box-holder div.box{cursor:pointer}.fieldWithErrors{display:inline}#error_explanation,.error_messages{width:400px;border:2px solid #cf0000;padding:0;padding-bottom:12px;margin-bottom:20px;background-color:#f0f0f0;font-size:12px}.error_messages h2{text-align:left;font-weight:bold;padding:5px 10px;font-size:12px;margin:0;background-color:#c00;color:#fff}.error_messages p{margin:8px 10px}.error_messages ul{margin:0}.ui-notify{width:350px;position:fixed;top:10px;right:10px;z-index:999999}.ui-notify-message{padding:10px;margin-bottom:15px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.ui-notify-message h1{font-size:14px;margin:0;padding:0}.ui-notify-message p{margin:3px 0;padding:0;line-height:18px}.ui-notify-message:last-child{margin-bottom:0}.ui-notify-message-style{background:#000;background:rgba(0,0,0,0.8);-moz-box-shadow:0 0 6px #000;-webkit-box-shadow:0 0 6px #000;box-shadow:0 0 6px #000}.ui-notify-message-style h1{color:#fff;font-weight:bold}.ui-notify-message-style p{color:#fff}.ui-notify-close{color:#fff;text-decoration:underline}.ui-notify-click{cursor:pointer}.ui-notify-cross{margin-top:-4px;float:right;cursor:pointer;text-decoration:none;font-size:12px;font-weight:bold;text-shadow:0 1px 1px #fff;padding:2px}.ui-notify-cross:hover{color:#ffffab}.ui-notify-cross:active{position:relative;top:1px}#sensors{display:block;position:relative;padding:10px 10px 5px}span.status{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd}span.status.ok{background:#1ba316}span.status.warning{background:#fea922}span.status.fail{background:#fd2516}td.search-by-signature{cursor:pointer}table td a{padding:3px 5px;background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(-90deg,#fff,#e0e0e0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#575757;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #9a9a9b}table td a.ip-button{height:15px;line-height:17px;position:relative;overflow:hidden;display:block;text-align:left;top:5px;float:left;padding-right:25px;text-shadow:#fff 0 1px 0}span.ip-copy{float:right}span.clippy{display:inline-block;position:absolute;right:5px;overflow:visible;width:14px;height:14px;top:4px}table td a:hover{background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(90deg,#fff,#e0e0e0);border:1px solid #9a9a9b}table{width:100%;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3}.table-tooltip{display:block;position:relative;overflow:hidden;margin-bottom:10px;background:url(../images/table-tooltip.png?1308968925) repeat-x 0 top;height:9px;margin-left:8px;margin-right:6px}table th{text-align:left;padding-left:10px;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em}table th img{vertical-align:middle;margin-top:-3px}table th input{vertical-align:middle;margin-left:4px}table td img{vertical-align:middle;margin-top:-2px;margin-right:5px}table td img.edit,table td img.trash{margin-right:0;padding-right:3px;padding-left:3px}table td{padding-left:10px;height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1308968925) repeat-x 0 bottom}table td.severity{width:45px}table td.first{border-left:1px solid #cdcdcd}table tbody.top tr:first-child td{border-top:1px solid #cdcdcd}table td.last{border-right:1px solid #cdcdcd}table tr:hover td{background-color:#fefeeb}table td:last{border-bottom-style:none}table td.last_error a,table td.handler a{font-family:mono,Courier,"Courier New"}ul.table{width:990px;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;margin:0;padding:0}ul.table li.header{text-align:left;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative}ul.table li.header div{display:block;position:relative;overflow:hidden;float:left}ul.table li.header div.row{width:990px!important;float:none!important}ul.table li.header div.row a{color:#474747;font-weight:bold;text-decoration:none;font-variant:normal}ul.table div.content li .row{min-height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1308968925) repeat-x 0 bottom;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;position:relative;display:block;overflow:hidden}ul.table div.content li .row .signature{white-space:nowrap;display:block;width:430px;position:relative;overflow:hidden}ul.table div.content li .row.classified .signature{text-decoration:line-through;color:#aaa}ul.table div.content li.event.highlight .row{background-color:#414346;border-bottom:1px solid #414346;background-image:none;color:#fff}ul.table div.content li.event.highlight .row div.timestamp{color:#fffeff;text-shadow:#000 0 1px 0;position:absolute;top:0;right:0}ul.table div.content li.event .row div .create-favorite{cursor:pointer;background:url(../images/icons/star.png?1308968925) no-repeat 0 bottom;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px}ul.table div.content li.event .row div .destroy-favorite{cursor:pointer;background:url(../images/icons/star.png?1308968925) no-repeat 0 top;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px}ul.table div.content li .row div{float:left}ul.table div.content li .row div.click{cursor:pointer}ul.table div.content li.currently-over .row{background-color:#fcfed7}ul.table li .row div img{vertical-align:middle;margin-top:-5px}ul.table li .row div.address{width:105px;padding-left:12px}ul.table li .row div.timestamp{width:100px;display:block;position:absolute;overflow:hidden;color:#b1b1b1;font-weight:bold;text-decoration:none;font-variant:normal;font-size:.9em;text-shadow:#fff 0 1px 0;text-align:right;right:0;padding-right:15px}ul.table li .row div.timestamp span{color:#fff;font-weight:normal;text-decoration:none;font-variant:normal;margin-right:5px;text-shadow:none;font-style:normal;font-size:1em;padding:5px 7px;text-align:left;position:absolute;left:15px;height:12px;line-height:12px;top:4px}ul.table li .row div.small{display:block;position:relative;overflow:visible;min-width:20px;width:20px;padding-left:10px}#events{display:block;position:relative;padding-top:10px;padding-bottom:10px}table.ip-header td a{color:#202222;text-decoration:none;font-variant:normal;font-weight:bold}ul.table div.content div.event-data{display:block;position:relative;float:none;!important clear:none;width:100%}ul.table div.content div.event-data table{background:#47494a;border:3px solid #47494a;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}ul.table div.content div.event-data table th{background-color:#5f6264;color:#fffeff;text-shadow:#000 0 0 0;border-bottom:1px solid #e3e3e3}ul.table div.content div.event-data table th.first{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px}ul.table div.content div.event-data table th.last{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px}ul.table div.content div.event-data table td.first{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px}ul.table div.content div.event-data table td.last{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px}ul.table div.content div.event-data table td{background-color:#fff}ul.table div.content div.event-data table tr:hover td{background-color:#fff}ul.table div.content div.event-data div.event-data-holder{float:none;!important display:block;position:relative;border:1px solid #cdcdcd;background-color:#2d2f31;border-top-style:none}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside{position:relative;display:block;border-top-style:none;padding:5px;overflow:visible}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus{margin:10px;display:block;position:relative}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus-side{display:block;position:relative;overflow:hidden;margin:0 10px}ul.table div.content div.event-data div.event-data-holder .section-title{margin:5px 0;padding:0 0 5px;font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;width:500px}ul.table div.content div.event-data div.event-data-holder ul div#tab-title{font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;float:left}a.dark-button{cursor:pointer;padding:3px 5px;background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#787c7e',endColorstr='#5f6264');background:-webkit-gradient(linear,0% 0,0% 100%,from(#787c7e),to(#5f6264));background:-moz-linear-gradient(-90deg,#787c7e,#5f6264);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#fffeff;font-weight:normal;text-decoration:none;font-variant:normal;border:1px solid #090809;font-size:.9em;text-shadow:#787c7e 0 1px 0}a.dark-button img{vertical-align:middle;margin-top:-2px;padding:0}a.dark-button:hover{background-color:#6b6f71;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#929597',endColorstr='#6b6f71');background:-webkit-gradient(linear,0% 0,0% 100%,from(#929597),to(#6b6f71));background:-moz-linear-gradient(-90deg,#929597,#6b6f71)}a.dark-button:active{background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5f6264',endColorstr='#46484a');background:-webkit-gradient(linear,0% 100%,0% 0,from(#5f6264),to(#46484a));background:-moz-linear-gradient(90deg,#5f6264,#46484a)}ul.table div.content #event-menu{float:right;display:block;position:relative;overflow:visible}dl.event-sub-menu{display:block;position:absolute;z-index:99999;background-color:#363636;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#000000',endColorstr='#363636');background:-webkit-gradient(linear,0% 100%,0% 0,from(#000),to(#363636));background:-moz-linear-gradient(90deg,#000,#363636);-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.5);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.5);box-shadow:0 1px 10px rgba(0,0,0,0.5);color:#fffeff;width:200px;border:1px solid #222;padding:5px;overflow:visible}dl.event-sub-menu.push-down{top:61px}dl.event-sub-menu dd{padding:0 5px}dl.event-sub-menu dd a{color:#fff;text-shadow:#000 0 1px 0;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;position:relative;background:transparent!important;border:none!important;margin:0!important;padding:0!important}dl.event-sub-menu dd:hover{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-color:#790908;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#790908',endColorstr='#a90d0b');background:-webkit-gradient(linear,0% 100%,0% 0,from(#790908),to(#a90d0b));background:-moz-linear-gradient(90deg,#790908,#a90d0b);color:#fff;text-shadow:#000 0 1px 0}ul.table div.content #event-menu ul{display:block;position:relative}ul.table div.content #event-menu ul li{float:left;display:block;position:relative;height:30px;line-height:30px;margin-right:10px}ul.table div.content div.event-data div.event-data-holder .section-title.bottom-none{margin-bottom:0;padding-bottom:0}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs{display:block;position:relative;overflow:hidden;margin-top:10px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li{float:right;height:25px;line-height:25px;margin-right:5px;background-color:#6e7172}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current{background-color:#47494a}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li a{font-weight:normal;text-decoration:none;font-variant:normal;padding:3px 10px;color:#bdc1c3;font-style:normal;font-size:.9em}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current a{color:#fff}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{padding:5px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-holder{margin-bottom:12px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii,ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload{background-color:#ededed;border:5px solid #47494a;color:#242424;font-family:"Courier New",Courier,mono;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;overflow:auto;max-height:500px;overflow:auto}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload pre{border:1px solid #fff;line-height:14px;font-variant:normal;text-decoration:none;font-weight:normal;font-style:normal;padding:10px 10px 0}.form-actions{text-align:right;padding-bottom:2px}.form-actions .cancel{margin-top:5px;float:left}.form-actions .minibutton.cancel{margin-top:0}.form-actions .optional{display:block;padding-top:8px;float:left;margin-right:15px}.form-actions .optional span.text{padding:0 3px}.form-actions .optional input{position:relative;top:-1px}button.default,a.button.default{height:27px;padding:0;position:relative;top:1px;font-family:helvetica,arial,freesans,clean,sans-serif;font-weight:bold;font-size:12px;color:#333;text-shadow:1px 1px 0 #fff;white-space:nowrap;overflow:visible;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border-bottom:1px solid #ebebeb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.2);box-shadow:0 1px 4px rgba(0,0,0,0.2);cursor:pointer;-webkit-font-smoothing:subpixel-antialiased!important;border:1px solid #cbcbcb;margin-right:5px}button.default.loading,a.button.default.loading{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1308968925) no-repeat center center}button.default.loading:hover,a.button.default.loading:hover{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1308968925) no-repeat center center}button.default.warning,a.button.default.warning{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-color:#716b6f;background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219)}div#new_note button.default.warning,div#new_note a.button.default.warning{border:1px solid #fd462d}button.default.success,a.button.default.success{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #159117;background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#23c926',endColorstr='#1fb322');background:-webkit-gradient(linear,0% 0,0% 100%,from(#23c926),to(#1fb322));background:-moz-linear-gradient(-90deg,#23c926,#1fb322)}button.default.success:hover,a.button.default.success:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#08da10',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#08da10),to(#23c926));background:-moz-linear-gradient(-90deg,#08da10,#23c926);border:1px solid #159117}button.default.success:active,a.button.default.success:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1ef727;border-bottom-color:#1ef727;background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1fb322',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1fb322),to(#23c926));background:-moz-linear-gradient(-90deg,#1fb322,#23c926);border:1px solid #159117}button.default.warning:hover,a.button.default.warning:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b)}button.default.warning:active,a.button.default.warning:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(90deg,#fd4f52,#d72219)}a.button.default{display:inline-block}button.default span,a.button.default span{display:block;height:27px;padding:0 10px;line-height:27px}button.default:hover,a.button.default:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-bottom-color:#0770a0;background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #515151}#new_note button.add_new_note:hover,#new_note button.submit_new_note:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #808080}button.default:active,a.button.default:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 100%,0% 0,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(90deg,#8a8a8a,#575757)}button.default:active span,a.button.default:active span{background-position:0 -120px}button.default::-moz-focus-inner{margin:-1px -3px}button.default img,a.button.default img{position:relative;top:-1px;margin-right:3px;vertical-align:middle}button.default:disabled,.button.default.disabled{opacity:.5}div.paginate-info{display:block;position:relative;overflow:hidden;text-align:center;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;color:#a6a6a6;margin-top:10px}ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background:#ededed;padding-top:7px;padding-bottom:7px;border-bottom:1px solid #fff;border:1px solid #dedede;text-align:center}div.pagination span,div.pagination em,ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#ededed;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbfbfb',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fbfbfb),to(#ededed));background:-moz-linear-gradient(-90deg,#fbfbfb,#ededed);border:1px solid #AAA;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px}.notes ul.pager{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background-color:#1b1b1b;padding-top:5px;padding-bottom:5px;border-bottom:1px solid #fff;border:1px solid #0d0d0d;text-align:center}.notes div.pagination span,.notes div.pagination em,.notes ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#282828 -webkit-gradient(linear,0% 0,0% 100%,from(#282828),to(#000));background-color:#282828;border:1px solid #000;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px}.notes ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#fff;font-size:1.1em;font-style:normal;text-shadow:#000 0 1px 0}.notes ul.pager li.active a{color:#fd2516;font-weight:bold;text-decoration:none;font-variant:normal}.notes div.pagination span:hover,.notes ul.pager li:hover{border:1px solid #424242}.notes ul.pager li.loading{text-indent:-9999em;background:#000 url(../images/icons/pager.gif?1308968925) no-repeat center center}div.pagination span:hover,ul.pager li:hover{color:#1b67fb;border:1px solid #7b7b7b}ul.pager li.loading{text-indent:-9999em;background:#fff url(../images/icons/pager.gif?1308968925) no-repeat center center}ul.pager li.more:hover,ul.pager li.more{color:#8c8d90;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal}ul.pager li.active a{color:#2578fc;font-weight:bold;text-decoration:none;font-variant:normal}ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#383838;font-size:1.1em;font-style:normal}span.severity-example{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em}span.severity,ul.table li div.small span.severity{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/color-picker/colorpicker_background.png?1308968925);font-family:Arial,Helvetica,sans-serif;display:none}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/color-picker/colorpicker_overlay.png?1308968925)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/color-picker/colorpicker_select.gif?1308968925);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/color-picker/colorpicker_indic.gif?1308968925) left top;margin:-4px 0 0 0;left:0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:11px;font:normal normal 10px Arial,Helvetica,sans-serif;text-decoration:none}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/color-picker/colorpicker_hex.png?1308968925) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../images/color-picker/colorpicker_rgb_r.png?1308968925);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../images/color-picker/colorpicker_rgb_g.png?1308968925);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../images/color-picker/colorpicker_rgb_b.png?1308968925);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../images/color-picker/colorpicker_hsb_h.png?1308968925);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../images/color-picker/colorpicker_hsb_s.png?1308968925);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../images/color-picker/colorpicker_hsb_b.png?1308968925);top:112px;left:282px}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/color-picker/colorpicker_submit.png?1308968925) top;left:322px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus{background-position:bottom}.colorpicker_submit.colorpicker_focus{background-position:bottom}.colorpicker_slider{background-position:bottom}.spch-bub-inside{position:relative}a.spch-bub-inside{color:#00F;text-decoration:none}.spch-bub-inside em{font-style:normal;font-size:.8em}.spch-bub-inside em{background:#00F;color:#FFF;padding:0 .4em;-moz-border-radius:.25em;-webkit-border-radius:.25em;border-radius:.25em;position:relative}.spch-bub-inside .point{width:0;height:0;position:absolute;top:1.1em;left:.4em;display:block;border-left:.45em solid #00F;border-bottom:.45em solid #FFF;border-bottom:.45em solid rgba(0,0,0,0);overflow:hidden}a.spch-bub-inside:hover{color:#F00}a.spch-bub-inside:hover em{cursor:pointer;background:#F00;color:#FF0}a.spch-bub-inside:hover .point{border-left:.5em solid #F00}span.payload-number{color:#8a8a8d}span.payload-hex{color:#343e4b}span.payload-ascii{color:#505254;font-weight:bold;text-decoration:none;font-variant:normal}label{text-transform:none}input.error{border:2px solid #fd2e3f!important}#lookup-form{position:relative;display:block;overflow:visible;padding-top:5px}p.form-order{position:relative;display:inline-block;overflow:hidden;width:500px;float:left;height:50px}input.large{width:430px;margin-bottom:10px}input[disabled]{opacity:.9;color:#e6e6e6}form.basic-form label{color:#4a4a4a}form.basic-form input[type='password'],form.basic-form input[type='text']{width:300px;padding:7px}form.basic-form p{margin-top:10px;margin-bottom:10px}label.error{visibility:hidden;display:none;position:absolute;bottom:0;left:0;overflow:hidden}i{color:#a5a5a5;font-style:italic;text-decoration:none;font-variant:normal;font-size:.8em}#form-actions{display:block;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);margin:10px -10px -15px;border-top:1px solid #e7e7e7;padding:7px 10px 9px}#box-footer #form-actions{background:none;margin:0;border-style:none;padding:0}div.note-body #form-actions{margin-left:45px!important}div.notes #form-actions{background:none;margin:0;border-style:none}input[type='password'],input[type='text']{-webkit-font-smoothing:antialiased;margin-bottom:10px;padding:5px;font:bold 1.3em "Helvetica Neue",Arial,Helvetica,Geneva,sans-serif;letter-spacing:-1px;color:#383838}td.chart{position:relative;width:200px;padding-left:10px;padding-bottom:0}div.progress-container{vertical-align:middle;border:1px solid #c0c0c0;width:180px;float:left;background:#fff;display:block;position:relative;top:6px;overflow:hidden}div.progress-container>div{height:17px;background:transparent url(../images/page/chart-bg-blue.png?1308968925) repeat-x}div.progress-container>div>span{height:17px;font-size:x-small;color:#545454;line-height:17px;display:block;position:absolute;right:5px;font-weight:bold;text-shadow:#fff 0 1px 0}div.notes{display:block;position:relative;overflow:hidden}strong.no-notes{color:#acacac}div#new_note{display:block;position:relative;overflow:visible;padding:0;margin:0}div.notes div#new_note textarea#body{outline:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:130px;background-color:#000;width:800px;padding:5px;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;border:4px solid #525252}.event-note{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);display:block;position:relative;overflow:hidden;background-color:#212121;padding:10px;border:1px solid #3f3f3f;margin-bottom:10px}.event-note:hover{background-color:#242424}.event-note .note-avatar-holder{float:left;width:55px;display:block;position:relative;overflow:hidden}.event-note .note-avatar-holder img{background:#000;border:1px solid #3a3a3a;float:left;margin:1px 10px 0 0;padding:4px;width:32px;height:32px}.event-note .username{font-weight:normal;text-decoration:none;font-variant:normal;color:#bdced6;text-shadow:#000 0 1px 0;margin-bottom:10px;font-style:normal;font-size:1.2em}.event-note .note-body{color:#fff;line-height:17px;margin-bottom:5px;word-wrap:break-word}.event-note .note-body strong{color:#fc251f;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:capitalize;display:inline-block}.event-note .note-body p{padding-bottom:5px}.event-note .note-body a{color:#fd3640;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}.event-note .note-body sup.footnote{font-size:.9em;padding-left:5px;padding-right:5px}.event-note .note-body span.caps{font-weight:bold;color:#d9d9d9;text-decoration:underline}.event-note .note-options{display:none;visibility:hidden}.event-note:hover .note-options{text-decoration:none;font-variant:normal;font-size:small;text-align:right;display:block;position:absolute;overflow:hidden;top:5px;right:10px;visibility:visible;height:25px;line-height:25px}.event-note .note-options a{padding:3px 5px;color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #fd462d;font-size:.8em}.event-note .note-options a:hover{background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b)}div.notes div#new_note textarea#body:focus,div.notes div#new_note textarea#body:active{outline:none}img.avatar{border:5px solid #ededed}img.avatar-small{border:3px solid #ededed}#general-settings div.pc-settings{background:#fbfbfb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#fbfbfb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#fbfbfb));background:-moz-linear-gradient(-90deg,#fff,#fbfbfb);display:block;position:relative;overflow:hidden;margin-bottom:10px;border:1px solid #d1d1d1}#general-settings div.pc-settings p{padding-top:3px;padding-bottom:3px}#settings .crop-holder{display:block;position:relative;overflow:hidden;margin-bottom:20px}#settings .user-show-avatar{position:relative;display:block;overflow:hidden;margin-bottom:10px;color:#686868;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#settings .user-show-avatar strong{color:#141414;font-weight:bold;text-decoration:none;font-variant:normal}#settings .user-show-avatar p{margin:0 0 7px;padding:0}#settings ul#user-info{display:block;position:relative;overflow:hidden;background-color:#ededed;border:3px solid #ededed}#settings ul#user-info .inside{padding:10px;display:block;position:relative;overflow:hidden;background:#fff;border:1px solid #dcdcdc}#settings ul#user-info li{height:25px;line-height:25px;border-bottom:1px solid #eee}#settings ul#user-info li strong{color:#a1a1a1;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;width:120px;display:block;position:relative;overflow:hidden;float:left;text-align:left;margin-right:10px}#settings .user-show-avatar img{min-height:100px;min-width:100px;float:left;margin-right:10px}.tipsy{padding:5px;font-size:10px;position:absolute;z-index:100000}.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:left;line-height:15px}.tipsy-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.tipsy-arrow{position:absolute;background:url(../images/tipsy.gif?1308968925) no-repeat top left;width:9px;height:5px}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-4px}.tipsy-nw .tipsy-arrow{top:0;left:10px}.tipsy-ne .tipsy-arrow{top:0;right:10px}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-4px;background-position:bottom left}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;background-position:bottom left}.tipsy-se .tipsy-arrow{bottom:0;right:10px;background-position:bottom left}.tipsy-e .tipsy-arrow{top:50%;margin-top:-4px;right:0;width:5px;height:9px;background-position:top right}.tipsy-w .tipsy-arrow{top:50%;margin-top:-4px;left:0;width:5px;height:9px}#dashboard{position:relative;overflow:hidden;display:block;margin-bottom:10px;margin-top:10px}#dashboard #box-tabs{position:relative;display:block;overflow:hidden}#dashboard #box-tabs ul#box-menu{display:block;position:relative;overflow:hidden;height:25px;line-height:25px;padding-left:10px}div.dashboard-graph{height:400px;width:722px}div.dashboard-graph.no-pie-data{background:#fff url(../images/dashboard/pie-no-data.png?1312071259) no-repeat center;display:block;position:relative;overflow:hidden}#dashboard #box-tabs ul#box-menu li{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;background-color:#c3c5cb;position:relative;overflow:hidden;display:block;float:left;margin-right:3px;top:5px}#dashboard #box-tabs ul#box-menu li:hover{top:0;background-color:#b3b5bb}#dashboard #box-tabs ul#box-menu li.active{background-color:#eee;top:0}#dashboard #box-tabs ul#box-menu li.active a{color:#282828}#dashboard #box-tabs ul#box-menu li a{padding-right:10px;padding-left:10px;color:#fffeff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block}#dashboard h2{text-transform:capitalize;color:#6a8092;font-weight:normal;text-decoration:none;font-variant:normal;padding-left:5px;font-style:normal;font-size:1.2em;margin-bottom:5px}#dashboard .main,#dashboard .secondary{position:relative;display:block;overflow:hidden}#dashboard .main .dashboard-main{width:730px;display:block;position:relative}#dashboard .secondary ul.box-list{display:block;position:relative;overflow:hidden;margin-bottom:20px;border-top-style:none}#dashboard .secondary ul.box-list li{height:30px;line-height:30px;border-bottom:1px solid #ededed;color:#6a7e8d;display:block;position:relative;overflow:hidden;font-size:1.0em;text-align:left}#dashboard .secondary ul.box-list li a{font-size:1.0em;color:#6a7e8d;text-align:left;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;position:relative;display:block;overflow:visible}#dashboard .secondary ul.box-list li.has-image a{margin-left:30px}#dashboard .secondary ul.box-list li span{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;line-height:1.4em;!important display:block;float:right;background-color:#eee;padding:3px 5px;top:5px;display:block;position:absolute;font-size:.9em;text-align:left;color:#868686;text-shadow:#fffeff 0 1px 0;right:0}#dashboard .secondary ul.box-list li:hover span{background-color:#469dfc;color:#fff;text-shadow:#000 0 1px 0}#dashboard .secondary ul.box-list li img{vertical-align:middle;margin-top:-2px;margin-right:5px;position:absolute;display:block;overflow:hidden;bottom:0;left:0;top:5px}#dashboard .main .dashboard-menu{display:block;position:relative;overflow:hidden}#dashboard .secondary .dashboard-header{display:block;position:relative;overflow:hidden;padding-right:10px;margin-bottom:5px;border-bottom:3px solid #dedede;padding-bottom:5px}#dashboard .secondary .dashboard-header span{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b}#dashboard .main .dashboard-menu ul{display:block;position:relative;overflow:hidden;padding-right:10px;padding-left:10px;margin-bottom:10px;border-bottom:3px solid #dedede;width:710px}#dashboard .main .dashboard-menu ul li{float:left;margin-right:10px;padding-bottom:5px}#dashboard .main .dashboard-menu ul li img{vertical-align:middle;margin-top:-3px;margin-left:10px}#dashboard .main .dashboard-menu ul li.active a{color:#405fa3}#dashboard .main .dashboard-menu ul li a{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b}#dashboard .main .dashboard-menu ul li a:hover{border-bottom:2px solid #bdbdbd;color:#405fa3}#dashboard .main #box-holder{display:block;position:relative;overflow:hidden}#dashboard .main .box{height:190px;border:1px solid #dbdbdb;position:relative;overflow:hidden;display:block;margin-bottom:15px;background:#ededed url(../images/dashboard/box-bg.png?1308968925) no-repeat}#dashboard .main .box-large{width:724px;border:4px solid #eee;position:relative;overflow:hidden;display:block;margin-bottom:10px}#dashboard .main .box-large .box-large-inside{position:relative;overflow:hidden;display:block;border:1px solid #e0e0e0}#dashboard .main .box .content{height:140px;margin:10px 10px 5px;padding:5px;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border:1px solid #f7fef4}#dashboard .main .box .content .data{height:145px;display:block;position:relative;overflow:hidden}#dashboard .main .box .content .data #box-title{font-weight:normal;text-decoration:none;font-variant:normal;color:#454549;font-size:1.3em;text-align:center;text-transform:uppercase;letter-spacing:-1px;margin-top:5px;text-shadow:#fff 0 1px 0;font-style:normal}#dashboard .main .box .content .data #box-count{text-align:center;text-decoration:none;color:#646167;margin-top:10px;text-shadow:#fff 0 1px 0;font-style:normal;font-weight:bold;font-size:5.0em}#dashboard .main .box .content .data .box-graph{position:absolute;bottom:5px;right:5px;left:5px;display:block;overflow:hidden;text-align:center}#dashboard .main .box .footer{vertical-align:middle;line-height:20px;height:20px;padding-left:10px;padding-right:10px;text-align:left;color:#45637a;font-size:.9em;font-weight:bold}#dashboard .main .box .footer span{color:#b2aeb0}#dashboard .main .box .footer img{vertical-align:middle;float:right}#search-box{display:block;position:relative;overflow:visible;height:195px}#search-box input{width:270px}#search-box select{width:285px}#search-box div{margin-bottom:15px}#snorbybox-content{display:block;overflow:visible;position:relative}#snorbybox-content form{display:block;overflow:hidden;position:relative}#snorbybox-content #snorbybox-form-holder{display:block;position:relative;overflow:hidden}#snorbybox-content #snorbybox-form-holder #snorbybox-form{width:320px;float:left;display:block;position:relative;overflow:hidden;margin-bottom:10px}#snorbybox-content select#user_select,#snorbybox-content select#sensor_select{width:610px}#snorbybox-content #snorbybox-form-full{display:block;position:relative;overflow:visible}#snorbybox-content #snorbybox-form-full textarea{height:200px;width:610px}#snorbybox-content h2{font-size:1.4em;color:#1f1f1f;font-weight:bold;text-decoration:none;font-variant:normal;margin-bottom:10px}#snorbybox-content #hotkey-section{width:365px;float:left;margin-bottom:15px}#snorbybox-content #hotkey-section dl{display:block;position:relative;overflow:hidden}#snorbybox-content #hotkey-section dl dd{display:block;overflow:hidden;position:relative;height:30px;line-height:30px;color:#2e2e2e;font-weight:bold;text-decoration:none;font-variant:normal;margin-top:3px;margin-bottom:3px}#snorbybox-content #hotkey-section dl dd span.hotkey{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:5px;background:#2774fb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5994fc',endColorstr='#2774fb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#5994fc),to(#2774fb));background:-moz-linear-gradient(-90deg,#5994fc,#2774fb);color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;margin-right:10px;text-shadow:#000 0 1px 0}#snorbybox-content #hotkey-section dl dd span.hotkey strong{color:#c9c8ce;text-transform:uppercase}#snorbybox-content #hotkey-section dl dd span.hotkey em{color:#c3c3c3;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:none;font-style:normal}form#new_severity p{margin-bottom:5px}form#new_classification p{margin-bottom:5px}input#classification_name{width:448px}form#new_classification textarea{width:450px;font-size:1.1em}html.login,body.login{font-family:Helvetica,Arial;font-size:12px;background:#202325 url(../images/header/header-bg.png?1311637946) repeat}#login{display:block;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}#login #wrapper{width:960px;display:block;position:absolute;right:0;bottom:0;left:0;overflow:hidden;border-style:none;top:0;margin:auto}#login #login-logo{width:960px;height:600px;background:url(../images/login.png?1311637946) no-repeat 130px 30px;overflow:hidden;position:absolute;display:block;margin-right:auto;margin-left:auto;margin-bottom:auto}#login #wrapper #content{-webkit-box-shadow:0 1px 20px rgba(0,0,0,0.5);-moz-box-shadow:0 1px 20px rgba(0,0,0,0.5);box-shadow:0 1px 20px rgba(0,0,0,0.5);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;width:555px;border:1px solid #000;background-color:#181718;position:relative;display:block;overflow:hidden;height:225px;margin-top:240px;margin-left:176px}#login #wrapper #content #title{-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}#login #content form p{margin-bottom:2px}#login #content form input[type='text'],#login #content form input[type='password']{width:515px;padding:9px;color:#000;margin-left:-1px}#login #wrapper #content #signin,#login #wrapper #content #password{width:555px;background-color:#fff;margin:0;padding:0}#login #wrapper #content form{margin:0;padding:11px 10px 10px;height:149px;display:block;position:relative;overflow:visible;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}#login #wrapper #content #form-actions{-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px;width:535px;display:block;position:absolute;overflow:hidden;bottom:-9px;right:0;left:10px}#login #wrapper #content #note{cursor:default}#login #wrapper #content #password input,#login #wrapper #content #password .field_with_errors input{margin-top:5px;margin-bottom:69px!important;position:relative;display:block;overflow:visible}#login #wrapper #content #password br{display:none}#login #wrapper #content #password p lable{margin-top:5px}#login #wrapper #content #form-actions p{position:absolute;display:block;overflow:hidden;bottom:0;margin:0;padding:0;top:13px;right:20px}div.map{display:block;position:relative;overflow:hidden}.chzn-container{font-size:13px;position:relative;display:inline-block;zoom:1;*display:inline}.chzn-container .chzn-drop{background:#fff;border:1px solid #aaa;border-top:0;position:absolute;top:29px;left:0;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);-moz-box-shadow:0 4px 5px rgba(0,0,0,.15);-o-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);z-index:999}.chzn-container-single .chzn-single{background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.5,white));background-image:-webkit-linear-gradient(center bottom,#eee 0,white 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,white 50%);background-image:-o-linear-gradient(top,#eee 0,#fff 50%);background-image:-ms-linear-gradient(top,#eee 0,#fff 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(top,#eee 0,#fff 50%);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #aaa;display:block;overflow:hidden;white-space:nowrap;position:relative;height:26px;line-height:26px;padding:0 0 0 8px;color:#444;text-decoration:none}.chzn-container-single .chzn-single span{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.chzn-container-single .chzn-single div{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(0.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-o-linear-gradient(bottom,#ccc 0,#eee 60%);background-image:-ms-linear-gradient(top,#ccc 0,#eee 60%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#ccc 0,#eee 60%);border-left:1px solid #aaa;position:absolute;right:0;top:0;display:block;height:100%;width:18px}.chzn-container-single .chzn-single div b{background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 0 1px;display:block;width:100%;height:100%}.chzn-container-single .chzn-search{padding:3px 4px;margin:0;white-space:nowrap}.chzn-container-single .chzn-search input{background:#fff url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px;background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-moz-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-o-linear-gradient(bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,linear-gradient(top,#fff 85%,#eee 99%);margin:1px 0;padding:4px 20px 4px 5px;outline:0;border:1px solid #aaa;font-family:sans-serif;font-size:1em}.chzn-container-single .chzn-drop{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.chzn-container-multi .chzn-choices{background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background-image:-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background-image:-moz-linear-gradient(center bottom,white 85%,#eee 99%);background-image:-o-linear-gradient(bottom,white 85%,#eee 99%);background-image:-ms-linear-gradient(top,#fff 85%,#eee 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#fff 85%,#eee 99%);border:1px solid #aaa;margin:0;padding:0;cursor:text;overflow:hidden;height:auto!important;height:1%;position:relative}.chzn-container-multi .chzn-choices li{float:left;list-style:none}.chzn-container-multi .chzn-choices .search-field{white-space:nowrap;margin:0;padding:0}.chzn-container-multi .chzn-choices .search-field input{color:#666;background:transparent!important;border:0!important;padding:5px;margin:1px 0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;-o-box-shadow:none;box-shadow:none}.chzn-container-multi .chzn-choices .search-field .default{color:#999}.chzn-container-multi .chzn-choices .search-choice{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#e4e4e4),color-stop(0.7,#eee));background-image:-webkit-linear-gradient(center bottom,#e4e4e4 0,#eee 70%);background-image:-moz-linear-gradient(center bottom,#e4e4e4 0,#eee 70%);background-image:-o-linear-gradient(bottom,#e4e4e4 0,#eee 70%);background-image:-ms-linear-gradient(top,#e4e4e4 0,#eee 70%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#e4e4e4 0,#eee 70%);color:#333;border:1px solid #b4b4b4;line-height:13px;padding:3px 19px 3px 6px;margin:3px 0 3px 5px;position:relative}.chzn-container-multi .chzn-choices .search-choice span{cursor:default}.chzn-container-multi .chzn-choices .search-choice-focus{background:#d4d4d4}.chzn-container-multi .chzn-choices .search-choice .search-choice-close{display:block;position:absolute;right:5px;top:6px;width:8px;height:9px;font-size:1px;background:url(../stylesheets/chosen-sprite.png?1314476377) right top no-repeat}.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover{background-position:right -9px}.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close{background-position:right -9px}.chzn-container .chzn-results{margin:0 4px 4px 0;max-height:190px;padding:0 0 0 4px;position:relative;overflow-x:hidden;overflow-y:auto}.chzn-container-multi .chzn-results{margin:-1px 0 0;padding:0}.chzn-container .chzn-results li{line-height:80%;padding:7px 7px 8px;margin:0;list-style:none}.chzn-container .chzn-results .active-result{cursor:pointer}.chzn-container .chzn-results .highlighted{background:#3875d7;color:#fff}.chzn-container .chzn-results li em{background:#feffde;font-style:normal}.chzn-container .chzn-results .highlighted em{background:transparent}.chzn-container .chzn-results .no-results{background:#f4f4f4}.chzn-container .chzn-results .group-result{cursor:default;color:#999;font-weight:bold}.chzn-container .chzn-results .group-option{padding-left:20px}.chzn-container-multi .chzn-drop .result-selected{display:none}.chzn-container-active .chzn-single{-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);-moz-box-shadow:0 0 5px rgba(0,0,0,.3);-o-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3);border:1px solid #5897fb}.chzn-container-active .chzn-single-with-drop{border:1px solid #aaa;-webkit-box-shadow:0 1px 0 #fff inset;-moz-box-shadow:0 1px 0 #fff inset;-o-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,white),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center bottom,white 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,white 0,#eee 50%);background-image:-o-linear-gradient(bottom,white 0,#eee 50%);background-image:-ms-linear-gradient(top,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#fff 0,#eee 50%);-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.chzn-container-active .chzn-single-with-drop div{background:transparent;border-left:none}.chzn-container-active .chzn-single-with-drop div b{background-position:-18px 1px}.chzn-container-active .chzn-choices{-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);-moz-box-shadow:0 0 5px rgba(0,0,0,.3);-o-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3);border:1px solid #5897fb}.chzn-container-active .chzn-choices .search-field input{color:#111!important}.chzn-rtl{direction:rtl;text-align:right}.chzn-rtl .chzn-single{padding-left:0;padding-right:8px}.chzn-rtl .chzn-single span{margin-left:26px;margin-right:0}.chzn-rtl .chzn-single div{left:0;right:auto;border-left:none;border-right:1px solid #aaa;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.chzn-rtl .chzn-choices li{float:right}.chzn-rtl .chzn-choices .search-choice{padding:3px 6px 3px 19px;margin:3px 5px 3px 0}.chzn-rtl .chzn-choices .search-choice .search-choice-close{left:5px;right:auto;background-position:right top}.chzn-rtl.chzn-container-single .chzn-results{margin-left:4px;margin-right:0;padding-left:0;padding-right:4px}.chzn-rtl .chzn-results .group-option{padding-left:0;padding-right:20px}.chzn-rtl.chzn-container-active .chzn-single-with-drop div{border-right:none}.chzn-rtl .chzn-search input{background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,#fff;background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-moz-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-o-linear-gradient(bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,linear-gradient(top,#fff 85%,#eee 99%);padding:4px 5px 4px 20px}
\ No newline at end of file
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/assets/snorby.css.gz
^
|
@@ -1 +1 @@
-.container_12{margin-left:auto;margin-right:auto;width:1020px;}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12{display:inline;float:left;position:relative;margin-left:10px;margin-right:10px;}.alpha{margin-left:0;}.omega{margin-right:0;}.container_12 .grid_1{width:65px;}.container_12 .grid_2{width:150px;}.container_12 .grid_3{width:235px;}.container_12 .grid_4{width:320px;}.container_12 .grid_5{width:405px;}.container_12 .grid_6{width:490px;}.container_12 .grid_7{width:575px;}.container_12 .grid_8{width:660px;}.container_12 .grid_9{width:745px;}.container_12 .grid_10{width:830px;}.container_12 .grid_11{width:915px;}.container_12 .grid_12{width:1000px;}.container_12 .prefix_1{padding-left:85px;}.container_12 .prefix_2{padding-left:170px;}.container_12 .prefix_3{padding-left:255px;}.container_12 .prefix_4{padding-left:340px;}.container_12 .prefix_5{padding-left:425px;}.container_12 .prefix_6{padding-left:510px;}.container_12 .prefix_7{padding-left:595px;}.container_12 .prefix_8{padding-left:680px;}.container_12 .prefix_9{padding-left:765px;}.container_12 .prefix_10{padding-left:850px;}.container_12 .prefix_11{padding-left:935px;}.container_12 .suffix_1{padding-right:85px;}.container_12 .suffix_2{padding-right:170px;}.container_12 .suffix_3{padding-right:255px;}.container_12 .suffix_4{padding-right:340px;}.container_12 .suffix_5{padding-right:425px;}.container_12 .suffix_6{padding-right:510px;}.container_12 .suffix_7{padding-right:595px;}.container_12 .suffix_8{padding-right:680px;}.container_12 .suffix_9{padding-right:765px;}.container_12 .suffix_10{padding-right:850px;}.container_12 .suffix_11{padding-right:935px;}.container_12 .push_1{left:85px;}.container_12 .push_2{left:170px;}.container_12 .push_3{left:255px;}.container_12 .push_4{left:340px;}.container_12 .push_5{left:425px;}.container_12 .push_6{left:510px;}.container_12 .push_7{left:595px;}.container_12 .push_8{left:680px;}.container_12 .push_9{left:765px;}.container_12 .push_10{left:850px;}.container_12 .push_11{left:935px;}.container_12 .pull_1{left:-85px;}.container_12 .pull_2{left:-170px;}.container_12 .pull_3{left:-255px;}.container_12 .pull_4{left:-340px;}.container_12 .pull_5{left:-425px;}.container_12 .pull_6{left:-510px;}.container_12 .pull_7{left:-595px;}.container_12 .pull_8{left:-680px;}.container_12 .pull_9{left:-765px;}.container_12 .pull_10{left:-850px;}.container_12 .pull_11{left:-935px;}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0;}.clearfix{display:inline-block;}* html .clearfix{height:1%;}.clearfix{display:block;}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}:focus{outline:0;}ins{text-decoration:none;}del{text-decoration:line-through;}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:1104;display:none;}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(../images/fancybox/fancybox.png?1290220918);}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;display:none;}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none;}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:1101;outline:none;display:none;}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff;}#fancybox-content{width:0;height:0;padding:0;outline:none;position:relative;overflow:hidden;z-index:1102;border:0 solid #fff;}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:1101;}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url(../images/fancybox/fancybox.png?1290220918) -40px 0;cursor:pointer;z-index:1103;display:none;}#fancybox-error{color:#444;font:normal 12px/20px Arial;padding:14px;margin:0;}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:none;line-height:0;vertical-align:top;}#fancybox-frame{width:100%;height:100%;border:none;display:block;}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url(../images/fancybox/blank.gif?1265051996);z-index:1102;display:none;}#fancybox-left{left:0;}#fancybox-right{right:0;}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:1102;display:block;}#fancybox-left-ico{background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -30px;}#fancybox-right-ico{background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -60px;}#fancybox-left:hover,#fancybox-right:hover{visibility:visible;}#fancybox-left:hover span{left:20px;}#fancybox-right:hover span{left:auto;right:20px;}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001;}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1290220937);}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -162px;}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1290220937);background-position:-20px 0;}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -182px;}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1290220937);background-position:0 -20px;}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -142px;}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1290220937);}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1290220918);background-position:-40px -122px;}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:1102;}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative;}.fancybox-title-outside{padding-top:10px;color:#fff;}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left;}#fancybox-title-over{padding:10px;background-image:url(../images/fancybox/fancy_title_over.png?1290220910);display:block;}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px;}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto;}#fancybox-title-float-wrap td{white-space:nowrap;}#fancybox-title-float-left{padding-left:15px;background:url(../images/fancybox/fancybox.png?1290220918) -40px -90px no-repeat;}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:bold;padding-bottom:3px;background:url(../images/fancybox/fancybox-x.png?1290220937) 0 -40px;}#fancybox-title-float-right{padding-left:15px;background:url(../images/fancybox/fancybox.png?1290220918) -55px -90px no-repeat;}.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_close.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_left.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_right.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/ancy_title_over.png',sizingMethod='scale');zoom:1;}.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_left.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_main.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_right.png',sizingMethod='scale');}.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight+"px");}#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight ? document.documentElement.clientHeight/2:document.body.clientHeight/2)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop))+'px');}#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_loading.png',sizingMethod='scale');}.fancybox-ie .fancybox-bg{background:transparent!important;}.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png',sizingMethod='scale');}.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png',sizingMethod='scale');}.boxit{float:none;}html,body{background-color:#ededed;font-family:Helvetica,Arial;font-size:12px;}a img{border:none;}a{color:#00F;}.clear{clear:both;height:0;overflow:hidden;}#snorby-box{border:10px solid #242424;display:block;position:relative;overflow:hidden;}#snorby-box #box-content{overflow:auto;display:block;position:relative;padding:10px;height:500px;width:750px;!important;}#snorby-box #box-content-small{overflow:auto;display:block;position:relative;padding:10px;height:auto;width:750px;!important;}#snorby-box #box-title{padding:20px 10px;background-color:#474747;color:#fff;font-weight:normal;font-variant:normal;text-decoration:none;font-size:2.0em;letter-spacing:-1px;text-shadow:#2a2a2a 0 1px 0;font-style:normal;}#snorby-box #box-footer{display:block;position:relative;overflow:hidden;background-color:#ebebeb;padding:10px;}div#note-box{padding:10px;display:block;position:relative;overflow:hidden;}div#note-box img{vertical-align:top;margin-right:5px;margin-top:-3px;}div#note-box.error{background-color:#820d06;color:#fff;margin-top:5px;margin-bottom:5px;border:2px solid #590602;}#flash_message{cursor:pointer;position:absolute;height:90px;display:block;overflow:hidden;top:0;right:0;left:0;background-color:rgba(24,31,34,0.79);z-index:9999999;}#flash_message div.message{cursor:pointer;text-shadow:#000 0 0 0;line-height:90px;width:960px;margin:auto;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:2.0em;text-align:center;display:block;position:relative;overflow:hidden;}#header{display:block;position:relative;overflow:hidden;background:#202325;border-bottom:1px solid #000;}#header #header-inside{display:block;position:relative;overflow:hidden;height:90px;border-bottom:1px solid #5a5a5a;}#header #header-inside #header-content{height:60px;display:block;position:relative;overflow:hidden;border-bottom:1px solid #000;}#header #header-inside #header-content #header-top{display:block;position:relative;overflow:hidden;}#header #header-inside #header-content #header-top #logo{height:60px;text-align:right;background:url(../images/header/logo.png?1290220914) no-repeat;text-indent:-99999em;}#header #header-inside #header-content #header-top #logo a{width:265px;display:block;position:relative;overflow:hidden;height:60px;text-indent:99999em;}#header #header-inside #header-content #header-top #user-menu{display:block;position:relative;overflow:hidden;}#header #header-inside #header-content #header-top #user-menu ul{float:right;display:block;position:relative;overflow:hidden;margin-top:10px;}#header #header-inside #header-content #header-top #user-menu ul li{color:#d7d7d7;float:left;padding-right:5px;padding-left:5px;border-left:1px solid #4f4f4f;}#header #header-inside #header-content #header-top #user-menu ul li.first{border-left-style:none;}#header #header-inside #header-content #header-top #user-menu ul li.last{border-right-style:none;}#header #header-inside #header-content #header-top #user-menu ul li a{color:#909090;float:left;}#header #header-inside #header-content #header-top #user-menu ul li a:hover{color:#fff;}#header #header-inside #menu{border-top:1px solid #5a5a5a;background:#41464a;display:block;position:relative;overflow:hidden;height:30px;}#header #header-inside #menu ul li{height:30px;line-height:30px;float:left;overflow:hidden;position:relative;display:block;text-align:center;border-right:1px solid #616161;border-left:1px solid #313131;}#header #header-inside #menu ul li.menu-error{border-style:none;color:#e3e7e7;}#header #header-inside #menu ul li.menu-error:hover{background-color:#41464a;}#header #header-inside #menu ul li.menu-error img{vertical-align:middle;margin-right:5px;margin-top:-5px;}#header #header-inside #menu ul li.administration{background:transparent url(../images/header/admin-button.png?1290220937) no-repeat 0 top;color:#e3e3e3;width:124px;border-style:none;margin-left:10px;}#header #header-inside #menu ul li.administration:hover{background:transparent url(../images/header/admin-button.png?1290220937) no-repeat 0 bottom;border-style:none;!important;}#header #header-inside #menu ul li.administration a{color:#e3e3e3;border-style:none;!important;}#header #header-inside #menu ul li:hover{background:#464d4f;}#header #header-inside #menu ul li.blank{width:1px;padding:0;margin:0;border-style:none;}#header #header-inside #menu ul li.blank.first{border-right:1px solid #616161;}#header #header-inside #menu ul li.blank.last{border-left:1px solid #313131;}#header #header-inside #menu ul li a{color:#c8c7c9;font-weight:normal;text-decoration:none;font-variant:normal;font-size:1.1em;font-style:normal;display:block;position:relative;overflow:hidden;padding-right:20px;padding-left:20px;}#header #header-inside #menu ul li a:hover{color:#fffeff;}#wrapper{background-color:#ededed;padding-top:20px;clear:both;display:block;position:relative;overflow:visible;border-top:1px solid #fff;}#wrapper #content{display:block;background-color:#fff;min-height:100px;position:relative;display:block;border:1px solid #cdcdcd;padding-bottom:5px;}#wrapper #content div.note{cursor:pointer;border:1px solid #fdf5a2;padding:10px 10px 10px 35px;color:#313131;margin-bottom:10px;text-align:left;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:#fff 0 1px 0;background:#fefae8 url(../images/icons/note.png?1290220917) no-repeat 10px center;font-style:normal;font-size:1.1em;}.page{margin-top:10px;margin-bottom:10px;display:block;position:relative;}#wrapper #content #title{height:35px;background:#ededed url(../images/page/title-bg.png?1290220919) repeat-x 0 bottom;}#wrapper #content #title #title-header{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.6em;text-shadow:#fff 0 1px 0;color:#313131;}#wrapper #content #title #title-header-dashboard{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;text-shadow:#fff 0 1px 0;color:#313131;padding-left:10px;}#wrapper #content #title #options-header-dashboard{float:right;margin-right:10px;}#wrapper #content #title #title-header img{vertical-align:middle;margin-top:-5px;margin-right:10px;}#wrapper #content #title #title-menu-holder{line-height:35px;height:35px;float:right;}#wrapper #content #title #title-menu-holder ul#title-menu{line-height:34px;height:35px;float:right;}#wrapper #content #title #title-menu-holder ul#title-menu li{float:left;padding-left:10px;padding-right:10px;border-right:1px solid #ddd;border-left:1px solid #fff;display:block;position:relative;overflow:visible;}#wrapper #content #title #title-menu-holder ul#title-menu li:hover{background-color:rgba(255,254,255,0.7);}#wrapper #content #title #title-menu-holder ul#title-menu li:first-child{border-left-style:none;width:1px;display:block;position:relative;overflow:hidden;padding:0;}#wrapper #content #title #title-menu-holder ul#title-menu li:last-child{border-right-style:none;width:1px;!important display:block;position:relative;overflow:hidden;padding:0;}#wrapper #content #title #title-menu-holder ul#title-menu li a{font-weight:bold;text-decoration:none;font-variant:normal;color:#353535;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative;overflow:hidden;}#wrapper #content #title #title-menu-holder ul#title-menu li a img{vertical-align:middle;margin-top:-5px;margin-right:5px;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu{clear:both;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.2);box-shadow:0 1px 10px rgba(0,0,0,0.2);display:inline-block;position:absolute;top:35px;z-index:999999;background-color:#fff;min-width:230px;right:0;padding:5px;visibility:visible;overflow:visible;border-bottom:1px solid #cdcdcd;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:first-child{border-top-style:none;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd{height:35px;line-height:35px;padding-left:5px;padding-right:5px;display:block;position:relative;overflow:hidden;border-top:1px dotted #eee;font-size:.9em;color:#222;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:1.0em;color:#000;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a span.shortcut{-webkit-border-radius:5px;-moz-border-radius:5px;line-height:1.4em;vertical-align:middle;float:right;background-color:#424242;color:#fffeff;text-shadow:#000 0 1px 0;display:block;position:relative;overflow:hidden;margin-top:8px;margin-right:5px;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;text-transform:none;padding:3px 5px;}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:hover{background-color:#f6f6f6;}#wrapper #content #sidebar{display:block;position:relative;overflow:hidden;background-color:#ededed;}#wrapper #content #sidebar #sidebar-inside{min-height:500px;display:block;position:relative;overflow:hidden;border:1px solid #fff;}#footer{margin-top:10px;margin-bottom:30px;}#footer #footer-inside{color:#939393;font-size:.9em;text-align:right;height:25px;line-height:25px;padding-left:20px;padding-right:10px;}#footer #footer-inside a{color:#494949;}div.pad-left{margin-left:10px;}#form-holder{display:block;position:relative;overflow:hidden;}form.validate textarea{height:140px;width:600px;padding:5px;}#snorbybox-holder{position:relative;display:block;height:700px;overflow:auto;width:1015px;}h3{font-size:1.3em;color:#5188e7;margin-bottom:5px;display:block;position:relative;overflow:hidden;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:lowercase;text-align:left;}.blur{color:#bdbdbd;}.blank{color:#e5e5e5;}.no-overflow{overflow:hidden;}.right{float:right!important;}.left{float:left;}.round{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}.round-with-tabs{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;}.round_top{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;}.round_bottom{-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;}.shadow{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);}.shadow-in{-webkit-box-shadow:inset 0 1px 10px #b0b0b0;-moz-box-shadow:inset 0 1px 10px #b0b0b0;box-shadow:inset 0 1px 10px #b0b0b0;}.shadow-light{-webkit-box-shadow:inset 0 1px 10px #fbfbfb;-moz-box-shadow:inset 0 1px 10px #fbfbfb;box-shadow:inset 0 1px 10px #fbfbfb;}.no-wrap{white-space:nowrap;}#box-holder div.box{cursor:pointer;}.fieldWithErrors{display:inline;}#error_explanation,.error_messages{width:400px;border:2px solid #CF0000;padding:0;padding-bottom:12px;margin-bottom:20px;background-color:#f0f0f0;font-size:12px;}.error_messages h2{text-align:left;font-weight:bold;padding:5px 10px;font-size:12px;margin:0;background-color:#c00;color:#fff;}.error_messages p{margin:8px 10px;}.error_messages ul{margin:0;}.ui-notify{width:350px;position:fixed;top:10px;right:10px;z-index:999999;}.ui-notify-message{padding:10px;margin-bottom:15px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}.ui-notify-message h1{font-size:14px;margin:0;padding:0;}.ui-notify-message p{margin:3px 0;padding:0;line-height:18px;}.ui-notify-message:last-child{margin-bottom:0;}.ui-notify-message-style{background:#000;background:rgba(0,0,0,0.8);-moz-box-shadow:0 0 6px #000;-webkit-box-shadow:0 0 6px #000;box-shadow:0 0 6px #000;}.ui-notify-message-style h1{color:#fff;font-weight:bold;}.ui-notify-message-style p{color:#fff;}.ui-notify-close{color:#fff;text-decoration:underline;}.ui-notify-click{cursor:pointer;}.ui-notify-cross{margin-top:-4px;float:right;cursor:pointer;text-decoration:none;font-size:12px;font-weight:bold;text-shadow:0 1px 1px #fff;padding:2px;}.ui-notify-cross:hover{color:#ffffab;}.ui-notify-cross:active{position:relative;top:1px;}#sensors{display:block;position:relative;padding:10px 10px 5px;}span.status{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd;}span.status.ok{background:#1ba316;}span.status.warning{background:#fea922;}span.status.fail{background:#fd2516;}table td a{padding:3px 5px;background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(-90deg,#fff,#e0e0e0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#575757;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #9a9a9b;}table td a.ip-button{height:15px;line-height:17px;width:100px;position:relative;overflow:hidden;display:block;text-align:center;top:2px;}table td a:hover{background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(90deg,#fff,#e0e0e0);border:1px solid #9a9a9b;}table{width:100%;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;}.table-tooltip{display:block;position:relative;overflow:hidden;margin-bottom:10px;background:url(../images/table-tooltip.png?1291170801) repeat-x 0 top;height:9px;margin-left:8px;margin-right:6px;}table th{text-align:left;padding-left:10px;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;}table th img{vertical-align:middle;margin-top:-3px;}table th input{vertical-align:middle;margin-left:4px;}table td img{vertical-align:middle;margin-top:-2px;margin-right:5px;}table td img.edit,table td img.trash{margin-right:0;padding-right:3px;padding-left:3px;}table td{padding-left:10px;height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1290220919) repeat-x 0 bottom;}table td.severity{width:45px;}table td.first{border-left:1px solid #cdcdcd;}table tbody.top tr:first-child td{border-top:1px solid #cdcdcd;}table td.last{border-right:1px solid #cdcdcd;}table tr:hover td{background-color:#fefeeb;}table td:last{border-bottom-style:none;}table td.last_error a,table td.handler a{font-family:mono,Courier,"Courier New";}ul.table{width:990px;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;margin:0;padding:0;}ul.table li.header{text-align:left;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;}ul.table li.header div{display:block;position:relative;overflow:hidden;float:left;}ul.table div.content li .row{min-height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1290220919) repeat-x 0 bottom;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}ul.table div.content li .row .signature{white-space:nowrap;display:block;width:430px;position:relative;overflow:hidden;}ul.table div.content li .row.classified .signature{text-decoration:line-through;color:#aaa;}ul.table div.content li.event.highlight .row{background-color:#414346;border-bottom:1px solid #414346;background-image:none;color:#fff;}ul.table div.content li.event.highlight .row div.timestamp{color:#fffeff;text-shadow:#000 0 1px 0;}ul.table div.content li.event .row div .create-favorite{cursor:pointer;background:url(../images/icons/star.png?1290220944) no-repeat 0 bottom;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px;}ul.table div.content li.event .row div .destroy-favorite{cursor:pointer;background:url(../images/icons/star.png?1290220944) no-repeat 0 top;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px;}ul.table div.content li .row div{float:left;}ul.table div.content li .row div.click{cursor:pointer;}ul.table div.content li.currently-over .row{background-color:#fcfed7;}ul.table li .row div img{vertical-align:middle;margin-top:-5px;}ul.table li .row div.address{width:105px;padding-left:12px;}ul.table li .row div.timestamp{width:100px;display:block;position:absolute;overflow:hidden;color:#b1b1b1;font-weight:bold;text-decoration:none;font-variant:normal;font-size:.9em;text-shadow:#fff 0 1px 0;text-align:right;right:0;padding-right:15px;}ul.table li .row div.timestamp span{color:#fff;font-weight:normal;text-decoration:none;font-variant:normal;margin-right:5px;text-shadow:none;font-style:normal;font-size:1em;padding:5px 7px;text-align:left;position:absolute;left:15px;height:12px;line-height:12px;top:4px;}ul.table li .row div.small{display:block;position:relative;overflow:visible;min-width:20px;width:20px;padding-left:10px;}#events{display:block;position:relative;padding-top:10px;padding-bottom:10px;}table.ip-header td a{color:#202222;text-decoration:none;font-variant:normal;font-weight:bold;}ul.table div.content div.event-data{display:block;position:relative;float:none;!important clear:none;width:100%;}ul.table div.content div.event-data table{background:#47494a;border:3px solid #47494a;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}ul.table div.content div.event-data table th{background-color:#5f6264;color:#fffeff;text-shadow:#000 0 0 0;border-bottom:1px solid #e3e3e3;}ul.table div.content div.event-data table th.first{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;}ul.table div.content div.event-data table th.last{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}ul.table div.content div.event-data table td.first{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}ul.table div.content div.event-data table td.last{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}ul.table div.content div.event-data table td{background-color:#fff;}ul.table div.content div.event-data table tr:hover td{background-color:#fff;}ul.table div.content div.event-data div.event-data-holder{float:none;!important display:block;position:relative;border:1px solid #cdcdcd;background-color:#2d2f31;border-top-style:none;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside{position:relative;display:block;border-top-style:none;padding:5px;overflow:visible;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus{margin:10px;display:block;position:relative;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus-side{display:block;position:relative;overflow:hidden;margin:0 10px;}ul.table div.content div.event-data div.event-data-holder .section-title{margin:5px 0;padding:0 0 5px;font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;width:500px;}ul.table div.content div.event-data div.event-data-holder ul div#tab-title{font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;float:left;}a.dark-button{cursor:pointer;padding:3px 5px;background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#787c7e',endColorstr='#5f6264');background:-webkit-gradient(linear,0% 0,0% 100%,from(#787c7e),to(#5f6264));background:-moz-linear-gradient(-90deg,#787c7e,#5f6264);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#fffeff;font-weight:normal;text-decoration:none;font-variant:normal;border:1px solid #090809;font-size:.9em;text-shadow:#787c7e 0 1px 0;}a.dark-button img{vertical-align:middle;margin-top:-2px;padding:0;}a.dark-button:hover{background-color:#6b6f71;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#929597',endColorstr='#6b6f71');background:-webkit-gradient(linear,0% 0,0% 100%,from(#929597),to(#6b6f71));background:-moz-linear-gradient(-90deg,#929597,#6b6f71);}a.dark-button:active{background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5f6264',endColorstr='#46484a');background:-webkit-gradient(linear,0% 100%,0% 0,from(#5f6264),to(#46484a));background:-moz-linear-gradient(90deg,#5f6264,#46484a);}ul.table div.content #event-menu{float:right;display:block;position:relative;}ul.table div.content #event-menu dl#event-sub-menu{display:block;position:absolute;z-index:99999;background-color:#363636;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#000000',endColorstr='#363636');background:-webkit-gradient(linear,0% 100%,0% 0,from(#000),to(#363636));background:-moz-linear-gradient(90deg,#000,#363636);color:#fffeff;width:200px;border:1px solid #222;padding:5px;}ul.table div.content #event-menu dl#event-sub-menu dd{padding:0 5px;}ul.table div.content #event-menu dl#event-sub-menu dd a{color:#fff;text-shadow:#000 0 1px 0;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;position:relative;}ul.table div.content #event-menu dl#event-sub-menu dd:hover{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-color:#790908;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#790908',endColorstr='#a90d0b');background:-webkit-gradient(linear,0% 100%,0% 0,from(#790908),to(#a90d0b));background:-moz-linear-gradient(90deg,#790908,#a90d0b);color:#fff;text-shadow:#000 0 1px 0;}ul.table div.content #event-menu ul{display:block;position:relative;}ul.table div.content #event-menu ul li{float:left;display:block;position:relative;height:30px;line-height:30px;margin-right:10px;}ul.table div.content div.event-data div.event-data-holder .section-title.bottom-none{margin-bottom:0;padding-bottom:0;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs{display:block;position:relative;overflow:hidden;margin-top:10px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li{float:right;height:25px;line-height:25px;margin-right:5px;background-color:#6e7172;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current{background-color:#47494a;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li a{font-weight:normal;text-decoration:none;font-variant:normal;padding:3px 10px;color:#bdc1c3;font-style:normal;font-size:.9em;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current a{color:#fff;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{padding:5px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-holder{margin-bottom:12px;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii,ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload{background-color:#ededed;border:5px solid #47494a;color:#242424;font-family:"Courier New",Courier,mono;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;overflow:auto;max-height:500px;overflow:auto;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload pre{border:1px solid #fff;line-height:14px;font-variant:normal;text-decoration:none;font-weight:normal;font-style:normal;padding:10px 10px 0;}.form-actions{text-align:right;padding-bottom:2px;}.form-actions .cancel{margin-top:5px;float:left;}.form-actions .minibutton.cancel{margin-top:0;}.form-actions .optional{display:block;padding-top:8px;float:left;margin-right:15px;}.form-actions .optional span.text{padding:0 3px;}.form-actions .optional input{position:relative;top:-1px;}button.default,a.button.default{height:30px;padding:0;position:relative;top:1px;font-family:helvetica,arial,freesans,clean,sans-serif;font-weight:bold;font-size:12px;color:#333;text-shadow:1px 1px 0 #fff;white-space:nowrap;overflow:visible;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border-bottom:1px solid #ebebeb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.3);box-shadow:0 1px 2px rgba(0,0,0,0.3);cursor:pointer;-webkit-font-smoothing:subpixel-antialiased!important;border:1px solid #cbcbcb;margin-right:5px;}button.default.loading,a.button.default.loading{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1287102143) no-repeat center center;}button.default.loading:hover,a.button.default.loading:hover{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1287102143) no-repeat center center;}button.default.warning,a.button.default.warning{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-color:#716b6f;background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);}div#new_note button.default.warning,div#new_note a.button.default.warning{border:1px solid #fd462d;}button.default.success,a.button.default.success{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1fc021;border-bottom-color:#1aa31b;background:#23c926;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#23c926));background:-moz-linear-gradient(-90deg,#1ef727,#23c926);}button.default.success:hover,a.button.default.success:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1fc021;border-bottom-color:#1aa31b;background:#27de29;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#27de29');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#27de29));background:-moz-linear-gradient(-90deg,#1ef727,#27de29);}button.default.success:active,a.button.default.success:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1ef727;border-bottom-color:#1ef727;background:#23c926;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');background:-webkit-gradient(linear,0% 100%,0% 0,from(#1ef727),to(#23c926));background:-moz-linear-gradient(90deg,#1ef727,#23c926);}button.default.warning:hover,a.button.default.warning:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b);}button.default.warning:active,a.button.default.warning:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(90deg,#fd4f52,#d72219);}a.button.default{display:inline-block;}button.default span,a.button.default span{display:block;height:30px;padding:0 10px;line-height:30px;}button.default:hover,a.button.default:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-bottom-color:#0770a0;background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #515151;}button.default:active,a.button.default:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 100%,0% 0,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(90deg,#8a8a8a,#575757);}button.default:active span,a.button.default:active span{background-position:0 -120px;}button.default::-moz-focus-inner{margin:-1px -3px;}button.default img,a.button.default img{position:relative;top:-1px;margin-right:3px;vertical-align:middle;}button.default:disabled,.button.default.disabled{opacity:.5;}div.paginate-info{display:block;position:relative;overflow:hidden;text-align:center;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;color:#a6a6a6;margin-top:10px;}ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background:#ededed;padding-top:7px;padding-bottom:7px;border-bottom:1px solid #fff;border:1px solid #dedede;text-align:center;}div.pagination span,div.pagination em,ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#ededed;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbfbfb',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fbfbfb),to(#ededed));background:-moz-linear-gradient(-90deg,#fbfbfb,#ededed);border:1px solid #AAA;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px;}.notes ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background-color:#1b1b1b;padding-top:5px;padding-bottom:5px;border-bottom:1px solid #fff;border:1px solid #000;text-align:center;}.notes div.pagination span,.notes div.pagination em,.notes ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#282828 -webkit-gradient(linear,0% 0,0% 100%,from(#282828),to(#000));background-color:#282828;border:1px solid #000;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px;}.notes ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#fff;font-size:1.1em;font-style:normal;text-shadow:#000 0 1px 0;}.notes ul.pager li.active a{color:#fd2516;font-weight:bold;text-decoration:none;font-variant:normal;}.notes div.pagination span:hover,.notes ul.pager li:hover{border:1px solid #424242;}.notes ul.pager li.loading{text-indent:-9999em;background:#000 url(../images/icons/pager.gif?1287102143) no-repeat center center;}div.pagination span:hover,ul.pager li:hover{color:#1b67fb;border:1px solid #7b7b7b;}ul.pager li.loading{text-indent:-9999em;background:#fff url(../images/icons/pager.gif?1287102143) no-repeat center center;}ul.pager li.more:hover,ul.pager li.more{color:#8c8d90;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;}ul.pager li.active a{color:#2578fc;font-weight:bold;text-decoration:none;font-variant:normal;}ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#383838;font-size:1.1em;font-style:normal;}span.severity-example{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;}span.severity,ul.table li div.small span.severity{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd;}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/color-picker/colorpicker_background.png?1290220898);font-family:Arial,Helvetica,sans-serif;display:none;}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair;}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/color-picker/colorpicker_overlay.png?1290220933);}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/color-picker/colorpicker_select.gif?1290220894);margin:-5px 0 0 -5px;}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize;}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/color-picker/colorpicker_indic.gif?1290220894) left top;margin:-4px 0 0 0;left:0;}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00;}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00;}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:11px;}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/color-picker/colorpicker_hex.png?1290220926) top;left:212px;top:142px;}.colorpicker_hex input{right:6px;}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute;}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize;}.colorpicker_rgb_r{background-image:url(../images/color-picker/colorpicker_rgb_r.png?1290220927);top:52px;left:212px;}.colorpicker_rgb_g{background-image:url(../images/color-picker/colorpicker_rgb_g.png?1290220927);top:82px;left:212px;}.colorpicker_rgb_b{background-image:url(../images/color-picker/colorpicker_rgb_b.png?1290220927);top:112px;left:212px;}.colorpicker_hsb_h{background-image:url(../images/color-picker/colorpicker_hsb_h.png?1290220926);top:52px;left:282px;}.colorpicker_hsb_s{background-image:url(../images/color-picker/colorpicker_hsb_s.png?1290220927);top:82px;left:282px;}.colorpicker_hsb_b{background-image:url(../images/color-picker/colorpicker_hsb_b.png?1290220926);top:112px;left:282px;}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/color-picker/colorpicker_submit.png?1290220898) top;left:322px;top:142px;overflow:hidden;}.colorpicker_focus{background-position:center;}.colorpicker_hex.colorpicker_focus{background-position:bottom;}.colorpicker_submit.colorpicker_focus{background-position:bottom;}.colorpicker_slider{background-position:bottom;}.spch-bub-inside{position:relative;}a.spch-bub-inside{color:#00F;text-decoration:none;}.spch-bub-inside em{font-style:normal;font-size:.8em;}.spch-bub-inside em{background:#00F;color:#FFF;padding:0 .4em;-moz-border-radius:.25em;-webkit-border-radius:.25em;border-radius:.25em;position:relative;}.spch-bub-inside .point{width:0;height:0;position:absolute;top:1.1em;left:.4em;display:block;border-left:.45em solid #00F;border-bottom:.45em solid #FFF;border-bottom:.45em solid rgba(0,0,0,0);overflow:hidden;}a.spch-bub-inside:hover{color:#F00;}a.spch-bub-inside:hover em{cursor:pointer;background:#F00;color:#FF0;}a.spch-bub-inside:hover .point{border-left:.5em solid #F00;}span.payload-number{color:#8a8a8d;}span.payload-hex{color:#343e4b;}span.payload-ascii{color:#505254;font-weight:bold;text-decoration:none;font-variant:normal;}label{text-transform:capitalize;}input.error{border:2px solid #fd2e3f;}input[disabled]{opacity:.9;color:#e6e6e6;}form.basic-form label{color:#4a4a4a;}form.basic-form input[type='password'],form.basic-form input[type='text']{width:300px;padding:7px;}form.basic-form p{margin-top:10px;margin-bottom:10px;}label.error{visibility:hidden;display:none;position:absolute;bottom:0;left:0;overflow:hidden;}i{color:#a5a5a5;font-style:italic;text-decoration:none;font-variant:normal;font-size:.8em;}#form-actions{margin-bottom:10px;display:block;margin-top:10px;}input[type='password'],input[type='text']{margin-bottom:10px;font-size:1.3em;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;padding:5px;}td.chart{position:relative;width:200px;padding-left:10px;padding-bottom:0;}div.progress-container{vertical-align:middle;border:1px solid #c0c0c0;width:180px;float:left;background:#fff;display:block;position:relative;top:6px;overflow:hidden;}div.progress-container>div{height:17px;background:transparent url(../images/page/chart-bg-blue.png?1290220945) repeat-x;}div.progress-container>div>span{height:17px;font-size:x-small;color:#545454;line-height:17px;display:block;position:absolute;right:5px;font-weight:bold;text-shadow:#fff 0 1px 0;}div.notes{display:block;position:relative;overflow:hidden;}strong.no-notes{color:#acacac;}div#new_note{display:block;position:relative;overflow:hidden;}div.notes div#new_note textarea#body{outline:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:130px;background-color:#000;width:800px;padding:5px;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;border:4px solid #525252;}.event-note{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);display:block;position:relative;overflow:hidden;background-color:#212121;padding:10px;border:1px solid #3f3f3f;margin-bottom:10px;}.event-note:hover{background-color:#242424;}.event-note .note-avatar-holder{float:left;width:55px;display:block;position:relative;overflow:hidden;}.event-note .note-avatar-holder img{background:#000;border:1px solid #3a3a3a;float:left;margin:1px 10px 0 0;padding:4px;width:32px;height:32px;}.event-note .username{font-weight:normal;text-decoration:none;font-variant:normal;color:#bdced6;text-shadow:#000 0 1px 0;margin-bottom:10px;font-style:normal;font-size:1.2em;}.event-note .note-body{color:#fff;line-height:17px;margin-bottom:20px;}.event-note .note-body strong{color:#fc251f;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:capitalize;display:inline-block;}.event-note .note-body p{padding-bottom:5px;}.event-note .note-body a{color:#fd3640;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}.event-note .note-body sup.footnote{font-size:.9em;padding-left:5px;padding-right:5px;}.event-note .note-body span.caps{font-weight:bold;color:#d9d9d9;text-decoration:underline;}.event-note .note-options{display:none;visibility:hidden;}.event-note:hover .note-options{text-decoration:none;font-variant:normal;font-size:small;text-align:right;display:block;position:absolute;overflow:hidden;top:5px;right:10px;visibility:visible;height:25px;line-height:25px;}.event-note .note-options a{padding:3px 5px;color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #fd462d;font-size:.8em;}.event-note .note-options a:hover{background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b);}div.notes div#new_note textarea#body:focus,div.notes div#new_note textarea#body:active{outline:none;}img.avatar{border:5px solid #ededed;}img.avatar-small{border:3px solid #ededed;}#general-settings div.pc-settings{background:#fbfbfb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#fbfbfb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#fbfbfb));background:-moz-linear-gradient(-90deg,#fff,#fbfbfb);display:block;position:relative;overflow:hidden;border:1px solid #d1d1d1;margin-bottom:15px;}#general-settings div.pc-settings p{padding-top:3px;padding-bottom:3px;}#settings .crop-holder{display:block;position:relative;overflow:hidden;margin-bottom:20px;}#settings .user-show-avatar{position:relative;display:block;overflow:hidden;margin-bottom:10px;color:#686868;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#settings .user-show-avatar strong{color:#141414;font-weight:bold;text-decoration:none;font-variant:normal;}#settings .user-show-avatar p{margin:0 0 7px;padding:0;}#settings ul#user-info{display:block;position:relative;overflow:hidden;background-color:#ededed;border:3px solid #ededed;}#settings ul#user-info .inside{padding:10px;display:block;position:relative;overflow:hidden;background:#fff;border:1px solid #dcdcdc;}#settings ul#user-info li{height:25px;line-height:25px;border-bottom:1px solid #eee;}#settings ul#user-info li strong{color:#a1a1a1;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;width:120px;display:block;position:relative;overflow:hidden;float:left;text-align:left;margin-right:10px;}#settings .user-show-avatar img{float:left;margin-right:10px;}.tipsy{padding:5px;font-size:10px;position:absolute;z-index:100000;}.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:left;line-height:15px;}.tipsy-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;}.tipsy-arrow{position:absolute;background:url(../images/tipsy.gif?1289444651) no-repeat top left;width:9px;height:5px;}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-4px;}.tipsy-nw .tipsy-arrow{top:0;left:10px;}.tipsy-ne .tipsy-arrow{top:0;right:10px;}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-4px;background-position:bottom left;}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;background-position:bottom left;}.tipsy-se .tipsy-arrow{bottom:0;right:10px;background-position:bottom left;}.tipsy-e .tipsy-arrow{top:50%;margin-top:-4px;right:0;width:5px;height:9px;background-position:top right;}.tipsy-w .tipsy-arrow{top:50%;margin-top:-4px;left:0;width:5px;height:9px;}#dashboard{position:relative;overflow:hidden;display:block;margin-bottom:10px;margin-top:10px;}#dashboard #box-tabs{position:relative;display:block;overflow:hidden;}#dashboard #box-tabs ul#box-menu{display:block;position:relative;overflow:hidden;height:25px;line-height:25px;padding-left:10px;}div.dashboard-graph{height:400px;width:722px;}div.dashboard-graph.no-pie-data{background:#fff url(../images/dashboard/pie-no-data.png?1291576897) no-repeat center;display:block;position:relative;overflow:hidden;}#dashboard #box-tabs ul#box-menu li{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;background-color:#c3c5cb;position:relative;overflow:hidden;display:block;float:left;margin-right:3px;top:5px;}#dashboard #box-tabs ul#box-menu li:hover{top:0;background-color:#b3b5bb;}#dashboard #box-tabs ul#box-menu li.active{background-color:#eee;top:0;}#dashboard #box-tabs ul#box-menu li.active a{color:#282828;}#dashboard #box-tabs ul#box-menu li a{padding-right:10px;padding-left:10px;color:#fffeff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;}#dashboard h2{text-transform:capitalize;color:#6a8092;font-weight:normal;text-decoration:none;font-variant:normal;padding-left:5px;font-style:normal;font-size:1.2em;margin-bottom:5px;}#dashboard .main,#dashboard .secondary{position:relative;display:block;overflow:hidden;}#dashboard .main .dashboard-main{width:730px;display:block;position:relative;}#dashboard .secondary ul.box-list{display:block;position:relative;overflow:hidden;margin-bottom:20px;border-top-style:none;}#dashboard .secondary ul.box-list li{height:30px;line-height:30px;border-bottom:1px solid #ededed;color:#6a7e8d;display:block;position:relative;overflow:hidden;font-size:1.0em;text-align:left;}#dashboard .secondary ul.box-list li a{font-size:1.0em;color:#6a7e8d;text-align:left;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;}#dashboard .secondary ul.box-list li span{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;line-height:1.4em;!important display:block;float:right;background-color:#eee;padding:3px 5px;top:5px;display:block;position:relative;font-size:.9em;text-align:left;color:#575757;text-shadow:#fff 0 1px 0;}#dashboard .secondary ul.box-list li:hover span{background-color:#469dfc;color:#fff;text-shadow:#000 0 1px 0;}#dashboard .secondary ul.box-list li img{vertical-align:middle;margin-top:-2px;margin-right:5px;}#dashboard .main .dashboard-menu{display:block;position:relative;overflow:hidden;}#dashboard .secondary .dashboard-header{display:block;position:relative;overflow:hidden;padding-right:10px;margin-bottom:5px;border-bottom:3px solid #dedede;padding-bottom:5px;}#dashboard .secondary .dashboard-header span{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b;}#dashboard .main .dashboard-menu ul{display:block;position:relative;overflow:hidden;padding-right:10px;padding-left:10px;margin-bottom:10px;border-bottom:3px solid #dedede;width:710px;}#dashboard .main .dashboard-menu ul li{float:left;margin-right:10px;padding-bottom:5px;}#dashboard .main .dashboard-menu ul li img{vertical-align:middle;margin-top:-3px;margin-left:10px;}#dashboard .main .dashboard-menu ul li.active a{color:#405fa3;}#dashboard .main .dashboard-menu ul li a{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b;}#dashboard .main .dashboard-menu ul li a:hover{border-bottom:2px solid #bdbdbd;color:#405fa3;}#dashboard .main #box-holder{display:block;position:relative;overflow:hidden;}#dashboard .main .box{height:190px;border:1px solid #dbdbdb;position:relative;overflow:hidden;display:block;margin-bottom:15px;background:#ededed url(../images/dashboard/box-bg.png?1290220934) no-repeat;}#dashboard .main .box-large{width:724px;border:4px solid #eee;position:relative;overflow:hidden;display:block;margin-bottom:10px;}#dashboard .main .box-large .box-large-inside{position:relative;overflow:hidden;display:block;border:1px solid #e0e0e0;}#dashboard .main .box .content{height:140px;margin:10px 10px 5px;padding:5px;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border:1px solid #f7fef4;}#dashboard .main .box .content .data{height:145px;display:block;position:relative;overflow:hidden;}#dashboard .main .box .content .data #box-title{font-weight:normal;text-decoration:none;font-variant:normal;color:#454549;font-size:1.3em;text-align:center;text-transform:uppercase;letter-spacing:-1px;margin-top:5px;text-shadow:#fff 0 1px 0;font-style:normal;}#dashboard .main .box .content .data #box-count{text-align:center;text-decoration:none;color:#646167;margin-top:10px;text-shadow:#fff 0 1px 0;font-style:normal;font-weight:bold;font-size:5.0em;}#dashboard .main .box .content .data .box-graph{position:absolute;bottom:5px;right:5px;left:5px;display:block;overflow:hidden;text-align:center;}#dashboard .main .box .footer{vertical-align:middle;line-height:20px;height:20px;padding-left:10px;padding-right:10px;text-align:left;color:#45637a;font-size:.9em;font-weight:bold;}#dashboard .main .box .footer span{color:#b2aeb0;}#dashboard .main .box .footer img{vertical-align:middle;float:right;}#search-box{display:block;position:relative;overflow:hidden;}#search-box input{width:270px;}#search-box select{width:285px;}#search-box div{margin-bottom:15px;}#snorbybox-content{display:block;overflow:hidden;position:relative;}#snorbybox-content #snorbybox-form-holder{display:block;position:relative;overflow:hidden;}#snorbybox-content #snorbybox-form-holder #snorbybox-form{width:320px;float:left;display:block;position:relative;overflow:hidden;margin-bottom:10px;}#snorbybox-content select#user_select,#snorbybox-content select#sensor_select{width:610px;}#snorbybox-content #snorbybox-form-full{display:block;position:relative;overflow:hidden;}#snorbybox-content #snorbybox-form-full textarea{height:200px;width:610px;}#snorbybox-content h2{font-size:1.4em;color:#1f1f1f;font-weight:bold;text-decoration:none;font-variant:normal;margin-bottom:10px;}#snorbybox-content #hotkey-section{width:365px;float:left;margin-bottom:15px;}#snorbybox-content #hotkey-section dl{display:block;position:relative;overflow:hidden;}#snorbybox-content #hotkey-section dl dd{display:block;overflow:hidden;position:relative;height:30px;line-height:30px;color:#2e2e2e;font-weight:bold;text-decoration:none;font-variant:normal;margin-top:3px;margin-bottom:3px;}#snorbybox-content #hotkey-section dl dd span.hotkey{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:5px;background-color:#2774fb;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;margin-right:10px;text-shadow:#000 0 1px 0;}#snorbybox-content #hotkey-section dl dd span.hotkey strong{color:#c9c8ce;text-transform:uppercase;}#snorbybox-content #hotkey-section dl dd span.hotkey em{color:#c3c3c3;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:none;font-style:normal;}form#new_severity p{margin-bottom:5px;}form#new_classification p{margin-bottom:5px;}form#new_classification textarea{width:450px;}
\ No newline at end of file
+.container_12{margin-left:auto;margin-right:auto;width:1020px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12{display:inline;float:left;position:relative;margin-left:10px;margin-right:10px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:65px}.container_12 .grid_2{width:150px}.container_12 .grid_3{width:235px}.container_12 .grid_4{width:320px}.container_12 .grid_5{width:405px}.container_12 .grid_6{width:490px}.container_12 .grid_7{width:575px}.container_12 .grid_8{width:660px}.container_12 .grid_9{width:745px}.container_12 .grid_10{width:830px}.container_12 .grid_11{width:915px}.container_12 .grid_12{width:1000px}.container_12 .prefix_1{padding-left:85px}.container_12 .prefix_2{padding-left:170px}.container_12 .prefix_3{padding-left:255px}.container_12 .prefix_4{padding-left:340px}.container_12 .prefix_5{padding-left:425px}.container_12 .prefix_6{padding-left:510px}.container_12 .prefix_7{padding-left:595px}.container_12 .prefix_8{padding-left:680px}.container_12 .prefix_9{padding-left:765px}.container_12 .prefix_10{padding-left:850px}.container_12 .prefix_11{padding-left:935px}.container_12 .suffix_1{padding-right:85px}.container_12 .suffix_2{padding-right:170px}.container_12 .suffix_3{padding-right:255px}.container_12 .suffix_4{padding-right:340px}.container_12 .suffix_5{padding-right:425px}.container_12 .suffix_6{padding-right:510px}.container_12 .suffix_7{padding-right:595px}.container_12 .suffix_8{padding-right:680px}.container_12 .suffix_9{padding-right:765px}.container_12 .suffix_10{padding-right:850px}.container_12 .suffix_11{padding-right:935px}.container_12 .push_1{left:85px}.container_12 .push_2{left:170px}.container_12 .push_3{left:255px}.container_12 .push_4{left:340px}.container_12 .push_5{left:425px}.container_12 .push_6{left:510px}.container_12 .push_7{left:595px}.container_12 .push_8{left:680px}.container_12 .push_9{left:765px}.container_12 .push_10{left:850px}.container_12 .push_11{left:935px}.container_12 .pull_1{left:-85px}.container_12 .pull_2{left:-170px}.container_12 .pull_3{left:-255px}.container_12 .pull_4{left:-340px}.container_12 .pull_5{left:-425px}.container_12 .pull_6{left:-510px}.container_12 .pull_7{left:-595px}.container_12 .pull_8{left:-680px}.container_12 .pull_9{left:-765px}.container_12 .pull_10{left:-850px}.container_12 .pull_11{left:-935px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}.ui-state-default{padding:0!important;text-align:center!important}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:1104;display:none}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(../images/fancybox/fancybox.png?1308968925)}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:1101;outline:none;display:none}#fancybox-outer{position:relative;width:100%;height:100%;background:transparent}#fancybox-content{width:0;height:0;padding:0;outline:none;position:relative;overflow:hidden;z-index:1102;background-color:transparent}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:1101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url(../images/fancybox/fancybox.png?1308968925) -40px 0;cursor:pointer;z-index:1103;display:none}#fancybox-error{color:#444;font:normal 12px/20px Arial;padding:14px;margin:0}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:none;line-height:0;vertical-align:top}#fancybox-frame{width:100%;height:100%;border:none;display:block;background:transparent}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url(../images/fancybox/blank.gif?1308968925);z-index:1102;display:none}#fancybox-left{left:0}#fancybox-right{right:0}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:1102;display:block}#fancybox-left-ico{background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -30px}#fancybox-right-ico{background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -60px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}#fancybox-right:hover span{left:auto;right:20px}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1308968925);-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -162px}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1308968925);background-position:-20px 0}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -182px}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(../images/fancybox/fancybox-x.png?1308968925);background-position:0 -20px;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -142px}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(../images/fancybox/fancybox-y.png?1308968925)}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(../images/fancybox/fancybox.png?1308968925);background-position:-40px -122px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:1102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}#fancybox-title-over{padding:10px;background-image:url(../images/fancybox/fancy_title_over.png?1308968925);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{white-space:nowrap}#fancybox-title-float-left{padding-left:15px;background:url(../images/fancybox/fancybox.png?1308968925) -40px -90px no-repeat}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:bold;padding-bottom:3px;background:url(../images/fancybox/fancybox-x.png?1308968925) 0 -40px}#fancybox-title-float-right{padding-left:15px;background:url(../images/fancybox/fancybox.png?1308968925) -55px -90px no-repeat}.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_close.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_left.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_nav_right.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/ancy_title_over.png',sizingMethod='scale');zoom:1}.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_left.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_main.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_title_right.png',sizingMethod='scale')}.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight+"px")}#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight ? document.documentElement.clientHeight/2:document.body.clientHeight/2)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop))+'px')}#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/fancybox/fancy_loading.png',sizingMethod='scale')}.fancybox-ie .fancybox-bg{background:transparent!important}.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png',sizingMethod='scale')}.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png',sizingMethod='scale')}div.rule-data pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;background-color:#000;color:#fff;text-decoration:none;padding:10px;margin:5px 0;height:auto;width:auto;border:3px solid #666;font:normal normal normal 1.1em "Courier New",Courier,mono}.boxit{float:none}html,body{font-family:Helvetica,Arial;font-size:12px;background:#ededed url(../images/page/body-bg.png?1311637946) repeat}a img{border:none}a{color:#00f}.clear{clear:both;height:0;overflow:hidden}#snorby-box{border:10px solid rgba(36,36,36,0.9);display:block;position:relative;overflow:visible}#snorby-box #box-content{overflow:auto;display:block;position:relative;padding:10px;height:500px;width:750px;background-color:#fff}#snorby-box #box-content-small{overflow:auto;display:block;position:relative;padding:10px;height:auto;width:750px;background-color:#fff}#snorby-box #box-title{cursor:move;padding:17px 10px;color:#fff;font-weight:normal;font-variant:normal;text-decoration:none;font-size:2.0em;letter-spacing:-1px;text-shadow:#2a2a2a 0 1px 0;font-style:normal;background:#474747 filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#545454',endColorstr='#474747');background:-webkit-gradient(linear,0% 0,0% 100%,from(#545454),to(#474747));background:-moz-linear-gradient(-90deg,#545454,#474747)}#snorby-box #box-footer{display:block;position:relative;overflow:visible;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);border-top:1px solid #dbdbdb;margin-left:-10px;margin-right:-10px;margin-bottom:-10px;padding:10px 10px 12px}div#note-box{padding:10px;display:block;position:relative;overflow:hidden}div#note-box img{vertical-align:top;margin-right:5px;margin-top:-3px}div#note-box.error{background-color:#820d06;color:#fff;margin-top:5px;margin-bottom:5px;border:2px solid #590602}#flash_message{cursor:pointer;position:absolute;display:block;overflow:hidden;top:0;right:0;left:0;background-color:rgba(24,31,34,0.9);z-index:9999999;height:61px}body.login #flash_message{border-bottom:1px solid #000;background-color:rgba(117,29,5,0.8)}body.login #flash_message.success{border-bottom:1px solid #000;background-color:rgba(15,113,12,0.8)}#flash_message div.message{cursor:pointer;text-shadow:#000 0 0 0;line-height:60px;width:960px;margin:auto;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:2.0em;text-align:center;display:block;position:relative;overflow:hidden}#header{display:block;position:relative;overflow:visible;background:#202325 url(../images/header/header-bg.png?1311637946) repeat;border-bottom:1px solid #000}#header #header-inside{display:block;position:relative;overflow:visible;height:92px;border-bottom:1px solid #5a5a5a}#header #header-inside #header-content{height:60px;display:block;position:relative;overflow:visible;border-bottom:1px solid #000}#header #header-inside #header-content #header-top{display:block;position:relative;overflow:visible}#header #header-inside #header-content #header-top #logo{height:60px;text-align:right;background:url(../images/header/logo.png?1311637946) no-repeat;text-indent:-99999em;position:absolute;display:block;overflow:visible;top:0;left:-55px;bottom:0}#header #header-inside #header-content #header-top #logo a{width:265px;display:block;position:relative;overflow:hidden;height:60px;text-indent:99999em}#header #header-inside #header-content #header-top #user-menu{display:block;position:relative;overflow:hidden}#header #header-inside #header-content #header-top #user-menu ul{float:right;display:block;position:relative;overflow:hidden;margin-top:10px}#header #header-inside #header-content #header-top #user-menu ul li{color:#d7d7d7;float:left;padding-right:5px;padding-left:5px;border-left:1px solid #4f4f4f}#header #header-inside #header-content #header-top #user-menu ul li.first{border-left-style:none}#header #header-inside #header-content #header-top #user-menu ul li.last{border-right-style:none}#header #header-inside #header-content #header-top #user-menu ul li a{color:#909090;float:left}#header #header-inside #header-content #header-top #user-menu ul li a:hover{color:#fff}#header #header-inside #menu{border-top:1px solid #5a5a5a;background:#41464a url(../images/header/menu-bg.png?1312053037) repeat-x;display:block;position:relative;overflow:visible;height:30px}#header #header-inside #menu ul{overflow:visible;width:1020px;margin:auto;display:block;position:absolute;top:0;right:0;bottom:0;left:0}#header #header-inside #menu ul li{height:30px;line-height:30px;float:left;overflow:visible;position:relative;display:block;text-align:center;border-right:1px solid #616161;border-left:1px solid #313131}#header #header-inside #menu ul li.menu-error.admin{border-style:none;color:#e3e7e7;margin-right:135px}#header #header-inside #menu ul li.menu-error{border-style:none;color:#e3e7e7;margin-right:5px}#header #header-inside #menu ul li.menu-error:hover{background:transparent none}#header #header-inside #menu ul li.menu-error img{vertical-align:middle;margin-right:5px;margin-top:-5px}#header #header-inside #menu ul li.administration{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat;width:127px;margin-left:10px;position:absolute;height:32px;right:-1px;top:-1px;bottom:0;text-shadow:#6f0a0b 0 1px 0;border-style:none;line-height:32px}#header #header-inside #menu ul li.administration:hover{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat 0 -32px}#header #header-inside #menu ul li.administration:active{background:transparent url(../images/header/admin-button.png?1312053037) no-repeat 0 bottom}#header #header-inside #menu ul li.administration a{color:#f0f0f0;border-style:none;!important}dl#admin-menu{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 20px rgba(0,0,0,0.4);-moz-box-shadow:0 1px 20px rgba(0,0,0,0.4);box-shadow:0 1px 20px rgba(0,0,0,0.4);min-width:200px;padding:0;opacity:.95;display:block;overflow:visible;position:absolute;background:#111;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#2b2b2b',endColorstr='#111');background:-webkit-gradient(linear,0% 0,0% 100%,from(#2b2b2b),to(#111));background:-moz-linear-gradient(-90deg,#2b2b2b,#111);z-index:99999;border:1px solid #151515;top:40px;right:-32.5px;margin-right:0;margin-left:0;margin-bottom:0}dl#admin-menu dd{margin:0;padding:4px 15px;height:25px;display:block;position:relative;overflow:hidden;border:1px solid #000;border-top-style:none;border-bottom-style:none}dl#admin-menu div.admin-arrow{background:url(../images/menu-arrow.png?1312071259) no-repeat;width:23px;height:13px;position:absolute;display:block;top:-10px;right:42%}dl#admin-menu dd:first-child{border-top:1px solid #000;-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}dl#admin-menu dd:last-child{border-bottom:1px solid #000;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}dl#admin-menu dd span{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);float:right;display:block;background-color:#000;padding:0 5px;line-height:20px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;margin-top:2px;border:1px solid #393939;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;height:20px;margin-right:-10px}dl#admin-menu dd:hover{background-color:rgba(66,66,66,0.4)}dl#admin-menu dd a{line-height:25px;margin:0;padding:0;position:relative;display:block;overflow:visible;color:#ececec;text-decoration:none;font-variant:normal;font-weight:normal;font-style:normal}#header #header-inside #menu ul li:hover{background:transparent url(../images/header/menu-bg.png?1312053037) repeat-x 0 bottom}#header #header-inside #menu ul li.blank{width:1px;padding:0;margin:0;border-style:none}#header #header-inside #menu ul li.blank.first{border-right:1px solid #616161}#header #header-inside #menu ul li.blank.last{border-left:1px solid #313131}#header #header-inside #menu ul li a{color:#c8c7c9;font-weight:normal;text-decoration:none;font-variant:normal;font-size:1.1em;font-style:normal;display:block;position:relative;overflow:hidden;padding-right:20px;padding-left:20px}#header #header-inside #menu ul li a:hover{color:#fffeff}#wrapper{padding-top:15px;clear:both;display:block;position:relative;overflow:visible;border-top:1px solid #fff}#wrapper #content{display:block;background-color:#fff;min-height:100px;position:relative;display:block;border:1px solid #bebebe;padding-bottom:5px;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.2);box-shadow:0 1px 10px rgba(0,0,0,0.2)}#wrapper #content div.note{cursor:pointer;border:1px solid #fdf5a2;padding:10px 10px 10px 35px;color:#313131;margin-bottom:10px;text-align:left;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:#fff 0 1px 0;background:#fefae8 url(../images/icons/note.png?1308968925) no-repeat 10px center;font-style:normal;font-size:1.1em}#wrapper #content div.note.lookups{display:block;position:relative;overflow:hidden}.page{margin-top:10px;margin-bottom:10px;display:block;position:relative}#wrapper #content #title{height:35px;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);border-bottom:1px solid #d5d5d5}#wrapper #content #title #title-header{height:35px;line-height:37px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;text-shadow:#fff 0 1px 0;color:#4a4a4a;font-size:1.3em}#title-header i{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#wrapper #content #title #title-header-dashboard{height:35px;line-height:35px;font-weight:bold;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;text-shadow:#fff 0 1px 0;color:#313131;padding-left:10px}#wrapper #content #title #options-header-dashboard{float:right;margin-right:10px}#wrapper #content #title #title-header img{vertical-align:middle;margin-top:-5px;margin-right:10px}#wrapper #content #title #title-menu-holder{line-height:35px;height:35px;float:right}#wrapper #content #title #title-menu-holder ul#title-menu{line-height:34px;height:35px;float:right;margin-right:10px}#wrapper #content #title #title-menu-holder ul#title-menu li{float:left;padding-left:10px;padding-right:10px;border-right:1px solid #ddd;border-left:1px solid #fff;display:block;position:relative;overflow:visible}#wrapper #content #title #title-menu-holder ul#title-menu li:hover{background-color:rgba(255,254,255,0.7);border-bottom:1px solid #fff}#wrapper #content #title #title-menu-holder ul#title-menu li:first-child{border-left-style:none;width:1px;display:block;position:relative;overflow:hidden;padding:0}#wrapper #content #title #title-menu-holder ul#title-menu li:last-child{border-right-style:none;width:1px;!important display:block;position:relative;overflow:hidden;padding:0}#wrapper #content #title #title-menu-holder ul#title-menu li a{font-weight:bold;text-decoration:none;font-variant:normal;color:#353535;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative;overflow:hidden;margin-right:2px;top:1px}#wrapper #content #title #title-menu-holder ul#title-menu li a img{vertical-align:middle;margin-top:-5px;margin-right:3px}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu{clear:both;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.3);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.3);box-shadow:0 1px 10px rgba(0,0,0,0.3);display:inline-block;position:absolute;top:36px;z-index:999999;background-color:#fff;min-width:230px;right:-1px;padding:5px;visibility:visible;overflow:visible;border-bottom:1px solid #c6c6c6;border-left:1px solid #c6c6c6;border-right:1px solid #c6c6c6}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:first-child{border-top-style:none}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd{height:35px;line-height:35px;padding-left:5px;padding-right:5px;display:block;position:relative;overflow:hidden;border-top:1px dotted #eee;font-size:.9em;color:#222;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a{font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;font-size:1.0em;color:#000}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd a span.shortcut{-webkit-border-radius:5px;-moz-border-radius:5px;line-height:1.4em;vertical-align:middle;float:right;background-color:#424242;color:#fffeff;text-shadow:#000 0 1px 0;display:block;position:relative;overflow:hidden;margin-top:8px;margin-right:5px;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal;text-transform:none;padding:3px 5px}#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:hover{background-color:#f6f6f6}#wrapper #content #sidebar{display:block;position:relative;overflow:hidden;background-color:#ededed}#wrapper #content #sidebar #sidebar-inside{min-height:500px;display:block;position:relative;overflow:hidden;border:1px solid #fff}#footer{margin-top:10px;margin-bottom:30px}#footer #footer-inside{color:#939393;font-size:.9em;text-align:right;height:25px;line-height:25px;padding-left:20px;padding-right:10px}#footer #footer-inside a{color:#494949}.clearfix:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}div.cover-loader{vertical-align:middle;position:absolute;overflow:hidden;display:block;z-index:99999;text-align:center;font-weight:bold;text-decoration:none;font-variant:normal;color:#222;font-size:2.0em;text-shadow:#fff 0 1px 0}div.pad-left{margin-left:10px}#form-holder{display:block;position:relative;overflow:hidden}form.validate textarea{height:140px;width:600px;padding:5px}#snorbybox-holder{position:relative;display:block;height:700px;overflow:auto;width:1015px}h3{font-size:1.3em;color:#5188e7;margin-bottom:5px;display:block;position:relative;overflow:hidden;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:lowercase;text-align:left}.blur{color:#bdbdbd}.blank{color:#e5e5e5}.no-overflow{overflow:hidden}.right{float:right!important}.left{float:left}.round{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.round-with-tabs{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}.round_top{-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}.round_bottom{-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}.shadow{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2)}.shadow-in{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2)}.shadow-light{-webkit-box-shadow:inset 0 1px 10px #fbfbfb;-moz-box-shadow:inset 0 1px 10px #fbfbfb;box-shadow:inset 0 1px 10px #fbfbfb}.no-wrap{white-space:nowrap}#box-holder div.box{cursor:pointer}.fieldWithErrors{display:inline}#error_explanation,.error_messages{width:400px;border:2px solid #cf0000;padding:0;padding-bottom:12px;margin-bottom:20px;background-color:#f0f0f0;font-size:12px}.error_messages h2{text-align:left;font-weight:bold;padding:5px 10px;font-size:12px;margin:0;background-color:#c00;color:#fff}.error_messages p{margin:8px 10px}.error_messages ul{margin:0}.ui-notify{width:350px;position:fixed;top:10px;right:10px;z-index:999999}.ui-notify-message{padding:10px;margin-bottom:15px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.ui-notify-message h1{font-size:14px;margin:0;padding:0}.ui-notify-message p{margin:3px 0;padding:0;line-height:18px}.ui-notify-message:last-child{margin-bottom:0}.ui-notify-message-style{background:#000;background:rgba(0,0,0,0.8);-moz-box-shadow:0 0 6px #000;-webkit-box-shadow:0 0 6px #000;box-shadow:0 0 6px #000}.ui-notify-message-style h1{color:#fff;font-weight:bold}.ui-notify-message-style p{color:#fff}.ui-notify-close{color:#fff;text-decoration:underline}.ui-notify-click{cursor:pointer}.ui-notify-cross{margin-top:-4px;float:right;cursor:pointer;text-decoration:none;font-size:12px;font-weight:bold;text-shadow:0 1px 1px #fff;padding:2px}.ui-notify-cross:hover{color:#ffffab}.ui-notify-cross:active{position:relative;top:1px}#sensors{display:block;position:relative;padding:10px 10px 5px}span.status{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd}span.status.ok{background:#1ba316}span.status.warning{background:#fea922}span.status.fail{background:#fd2516}td.search-by-signature{cursor:pointer}table td a{padding:3px 5px;background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(-90deg,#fff,#e0e0e0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#575757;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #9a9a9b}table td a.ip-button{height:15px;line-height:17px;position:relative;overflow:hidden;display:block;text-align:left;top:5px;float:left;padding-right:25px;text-shadow:#fff 0 1px 0}span.ip-copy{float:right}span.clippy{display:inline-block;position:absolute;right:5px;overflow:visible;width:14px;height:14px;top:4px}table td a:hover{background-color:#e0e0e0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e0e0e0');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fff),to(#e0e0e0));background:-moz-linear-gradient(90deg,#fff,#e0e0e0);border:1px solid #9a9a9b}table{width:100%;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3}.table-tooltip{display:block;position:relative;overflow:hidden;margin-bottom:10px;background:url(../images/table-tooltip.png?1308968925) repeat-x 0 top;height:9px;margin-left:8px;margin-right:6px}table th{text-align:left;padding-left:10px;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em}table th img{vertical-align:middle;margin-top:-3px}table th input{vertical-align:middle;margin-left:4px}table td img{vertical-align:middle;margin-top:-2px;margin-right:5px}table td img.edit,table td img.trash{margin-right:0;padding-right:3px;padding-left:3px}table td{padding-left:10px;height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1308968925) repeat-x 0 bottom}table td.severity{width:45px}table td.first{border-left:1px solid #cdcdcd}table tbody.top tr:first-child td{border-top:1px solid #cdcdcd}table td.last{border-right:1px solid #cdcdcd}table tr:hover td{background-color:#fefeeb}table td:last{border-bottom-style:none}table td.last_error a,table td.handler a{font-family:mono,Courier,"Courier New"}ul.table{width:990px;-webkit-border-radius:5px;-moz-border-radius:5px;border:5px solid #f3f3f3;margin:0;padding:0}ul.table li.header{text-align:left;color:#3f3f3f;height:25px;line-height:25px;font-weight:bold;text-decoration:none;font-variant:normal;border-bottom:1px solid #bababa;background-color:#ddd;text-shadow:#fff 0 1px 0;font-size:.9em;display:block;position:relative}ul.table li.header div{display:block;position:relative;overflow:hidden;float:left}ul.table li.header div.row{width:990px!important;float:none!important}ul.table li.header div.row a{color:#474747;font-weight:bold;text-decoration:none;font-variant:normal}ul.table div.content li .row{min-height:30px;line-height:30px;border-bottom:1px solid #cdcdcd;color:#474747;background:#fff url(../images/page/table-bg.png?1308968925) repeat-x 0 bottom;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;position:relative;display:block;overflow:hidden}ul.table div.content li .row .signature{white-space:nowrap;display:block;width:430px;position:relative;overflow:hidden}ul.table div.content li .row.classified .signature{text-decoration:line-through;color:#aaa}ul.table div.content li.event.highlight .row{background-color:#414346;border-bottom:1px solid #414346;background-image:none;color:#fff}ul.table div.content li.event.highlight .row div.timestamp{color:#fffeff;text-shadow:#000 0 1px 0;position:absolute;top:0;right:0}ul.table div.content li.event .row div .create-favorite{cursor:pointer;background:url(../images/icons/star.png?1308968925) no-repeat 0 bottom;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px}ul.table div.content li.event .row div .destroy-favorite{cursor:pointer;background:url(../images/icons/star.png?1308968925) no-repeat 0 top;width:16px;height:16px;position:relative;display:block;overflow:hidden;top:6px}ul.table div.content li .row div{float:left}ul.table div.content li .row div.click{cursor:pointer}ul.table div.content li.currently-over .row{background-color:#fcfed7}ul.table li .row div img{vertical-align:middle;margin-top:-5px}ul.table li .row div.address{width:105px;padding-left:12px}ul.table li .row div.timestamp{width:100px;display:block;position:absolute;overflow:hidden;color:#b1b1b1;font-weight:bold;text-decoration:none;font-variant:normal;font-size:.9em;text-shadow:#fff 0 1px 0;text-align:right;right:0;padding-right:15px}ul.table li .row div.timestamp span{color:#fff;font-weight:normal;text-decoration:none;font-variant:normal;margin-right:5px;text-shadow:none;font-style:normal;font-size:1em;padding:5px 7px;text-align:left;position:absolute;left:15px;height:12px;line-height:12px;top:4px}ul.table li .row div.small{display:block;position:relative;overflow:visible;min-width:20px;width:20px;padding-left:10px}#events{display:block;position:relative;padding-top:10px;padding-bottom:10px}table.ip-header td a{color:#202222;text-decoration:none;font-variant:normal;font-weight:bold}ul.table div.content div.event-data{display:block;position:relative;float:none;!important clear:none;width:100%}ul.table div.content div.event-data table{background:#47494a;border:3px solid #47494a;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}ul.table div.content div.event-data table th{background-color:#5f6264;color:#fffeff;text-shadow:#000 0 0 0;border-bottom:1px solid #e3e3e3}ul.table div.content div.event-data table th.first{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px}ul.table div.content div.event-data table th.last{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px}ul.table div.content div.event-data table td.first{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px}ul.table div.content div.event-data table td.last{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px}ul.table div.content div.event-data table td{background-color:#fff}ul.table div.content div.event-data table tr:hover td{background-color:#fff}ul.table div.content div.event-data div.event-data-holder{float:none;!important display:block;position:relative;border:1px solid #cdcdcd;background-color:#2d2f31;border-top-style:none}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside{position:relative;display:block;border-top-style:none;padding:5px;overflow:visible}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus{margin:10px;display:block;position:relative}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside .plus-side{display:block;position:relative;overflow:hidden;margin:0 10px}ul.table div.content div.event-data div.event-data-holder .section-title{margin:5px 0;padding:0 0 5px;font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;width:500px}ul.table div.content div.event-data div.event-data-holder ul div#tab-title{font-size:1.2em;color:#fffbfe;font-weight:bold;text-decoration:none;font-variant:normal;text-shadow:#000 0 1px 0;float:left}a.dark-button{cursor:pointer;padding:3px 5px;background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#787c7e',endColorstr='#5f6264');background:-webkit-gradient(linear,0% 0,0% 100%,from(#787c7e),to(#5f6264));background:-moz-linear-gradient(-90deg,#787c7e,#5f6264);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#fffeff;font-weight:normal;text-decoration:none;font-variant:normal;border:1px solid #090809;font-size:.9em;text-shadow:#787c7e 0 1px 0}a.dark-button img{vertical-align:middle;margin-top:-2px;padding:0}a.dark-button:hover{background-color:#6b6f71;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#929597',endColorstr='#6b6f71');background:-webkit-gradient(linear,0% 0,0% 100%,from(#929597),to(#6b6f71));background:-moz-linear-gradient(-90deg,#929597,#6b6f71)}a.dark-button:active{background-color:#5f6264;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5f6264',endColorstr='#46484a');background:-webkit-gradient(linear,0% 100%,0% 0,from(#5f6264),to(#46484a));background:-moz-linear-gradient(90deg,#5f6264,#46484a)}ul.table div.content #event-menu{float:right;display:block;position:relative;overflow:visible}dl.event-sub-menu{display:block;position:absolute;z-index:99999;background-color:#363636;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#000000',endColorstr='#363636');background:-webkit-gradient(linear,0% 100%,0% 0,from(#000),to(#363636));background:-moz-linear-gradient(90deg,#000,#363636);-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.5);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.5);box-shadow:0 1px 10px rgba(0,0,0,0.5);color:#fffeff;width:200px;border:1px solid #222;padding:5px;overflow:visible}dl.event-sub-menu.push-down{top:61px}dl.event-sub-menu dd{padding:0 5px}dl.event-sub-menu dd a{color:#fff;text-shadow:#000 0 1px 0;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block;position:relative;background:transparent!important;border:none!important;margin:0!important;padding:0!important}dl.event-sub-menu dd:hover{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-color:#790908;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#790908',endColorstr='#a90d0b');background:-webkit-gradient(linear,0% 100%,0% 0,from(#790908),to(#a90d0b));background:-moz-linear-gradient(90deg,#790908,#a90d0b);color:#fff;text-shadow:#000 0 1px 0}ul.table div.content #event-menu ul{display:block;position:relative}ul.table div.content #event-menu ul li{float:left;display:block;position:relative;height:30px;line-height:30px;margin-right:10px}ul.table div.content div.event-data div.event-data-holder .section-title.bottom-none{margin-bottom:0;padding-bottom:0}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs{display:block;position:relative;overflow:hidden;margin-top:10px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li{float:right;height:25px;line-height:25px;margin-right:5px;background-color:#6e7172}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current{background-color:#47494a}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li a{font-weight:normal;text-decoration:none;font-variant:normal;padding:3px 10px;color:#bdc1c3;font-style:normal;font-size:.9em}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside ul.payload-tabs li.current a{color:#fff}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{padding:5px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-holder{margin-bottom:12px}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii,ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload{background-color:#ededed;border:5px solid #47494a;color:#242424;font-family:"Courier New",Courier,mono;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;overflow:auto;max-height:500px;overflow:auto}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload-ascii{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}ul.table div.content div.event-data div.event-data-holder div.event-data-holder-inside div.payload pre{border:1px solid #fff;line-height:14px;font-variant:normal;text-decoration:none;font-weight:normal;font-style:normal;padding:10px 10px 0}.form-actions{text-align:right;padding-bottom:2px}.form-actions .cancel{margin-top:5px;float:left}.form-actions .minibutton.cancel{margin-top:0}.form-actions .optional{display:block;padding-top:8px;float:left;margin-right:15px}.form-actions .optional span.text{padding:0 3px}.form-actions .optional input{position:relative;top:-1px}button.default,a.button.default{height:27px;padding:0;position:relative;top:1px;font-family:helvetica,arial,freesans,clean,sans-serif;font-weight:bold;font-size:12px;color:#333;text-shadow:1px 1px 0 #fff;white-space:nowrap;overflow:visible;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border-bottom:1px solid #ebebeb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.2);box-shadow:0 1px 4px rgba(0,0,0,0.2);cursor:pointer;-webkit-font-smoothing:subpixel-antialiased!important;border:1px solid #cbcbcb;margin-right:5px}button.default.loading,a.button.default.loading{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1308968925) no-repeat center center}button.default.loading:hover,a.button.default.loading:hover{text-indent:-9999em;background:#575757 url(../images/icons/pager.gif?1308968925) no-repeat center center}button.default.warning,a.button.default.warning{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-color:#716b6f;background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219)}div#new_note button.default.warning,div#new_note a.button.default.warning{border:1px solid #fd462d}button.default.success,a.button.default.success{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #159117;background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#23c926',endColorstr='#1fb322');background:-webkit-gradient(linear,0% 0,0% 100%,from(#23c926),to(#1fb322));background:-moz-linear-gradient(-90deg,#23c926,#1fb322)}button.default.success:hover,a.button.default.success:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#08da10',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#08da10),to(#23c926));background:-moz-linear-gradient(-90deg,#08da10,#23c926);border:1px solid #159117}button.default.success:active,a.button.default.success:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:1px solid #1ef727;border-bottom-color:#1ef727;background:#1fb322;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1fb322',endColorstr='#23c926');background:-webkit-gradient(linear,0% 0,0% 100%,from(#1fb322),to(#23c926));background:-moz-linear-gradient(-90deg,#1fb322,#23c926);border:1px solid #159117}button.default.warning:hover,a.button.default.warning:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b)}button.default.warning:active,a.button.default.warning:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 100%,0% 0,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(90deg,#fd4f52,#d72219)}a.button.default{display:inline-block}button.default span,a.button.default span{display:block;height:27px;padding:0 10px;line-height:27px}button.default:hover,a.button.default:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border-bottom-color:#0770a0;background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #515151}#new_note button.add_new_note:hover,#new_note button.submit_new_note:hover{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(-90deg,#8a8a8a,#575757);border:1px solid #808080}button.default:active,a.button.default:active{color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#575757;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');background:-webkit-gradient(linear,0% 100%,0% 0,from(#8a8a8a),to(#575757));background:-moz-linear-gradient(90deg,#8a8a8a,#575757)}button.default:active span,a.button.default:active span{background-position:0 -120px}button.default::-moz-focus-inner{margin:-1px -3px}button.default img,a.button.default img{position:relative;top:-1px;margin-right:3px;vertical-align:middle}button.default:disabled,.button.default.disabled{opacity:.5}div.paginate-info{display:block;position:relative;overflow:hidden;text-align:center;font-size:.9em;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;color:#a6a6a6;margin-top:10px}ul.pager{-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background:#ededed;padding-top:7px;padding-bottom:7px;border-bottom:1px solid #fff;border:1px solid #dedede;text-align:center}div.pagination span,div.pagination em,ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#ededed;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fbfbfb',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fbfbfb),to(#ededed));background:-moz-linear-gradient(-90deg,#fbfbfb,#ededed);border:1px solid #AAA;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px}.notes ul.pager{-webkit-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);box-shadow:inset 0 1px 10px rgba(0,0,0,0.2);-webkit-border-radius:5px;-moz-border-radius:5px;display:block;position:relative;overflow:hidden;margin-right:auto;margin-top:10px;margin-left:auto;background-color:#1b1b1b;padding-top:5px;padding-bottom:5px;border-bottom:1px solid #fff;border:1px solid #0d0d0d;text-align:center}.notes div.pagination span,.notes div.pagination em,.notes ul.pager li{border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;cursor:pointer;display:inline-block;font-size:1em;font-weight:bold;line-height:1.25em;overflow:visible;padding:7px;width:auto;zoom:1;background:#282828 -webkit-gradient(linear,0% 0,0% 100%,from(#282828),to(#000));background-color:#282828;border:1px solid #000;color:#333;text-shadow:white 0 1px 0;padding:6px;text-decoration:none;font-variant:normal;text-align:center;margin-left:2px;margin-right:2px}.notes ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#fff;font-size:1.1em;font-style:normal;text-shadow:#000 0 1px 0}.notes ul.pager li.active a{color:#fd2516;font-weight:bold;text-decoration:none;font-variant:normal}.notes div.pagination span:hover,.notes ul.pager li:hover{border:1px solid #424242}.notes ul.pager li.loading{text-indent:-9999em;background:#000 url(../images/icons/pager.gif?1308968925) no-repeat center center}div.pagination span:hover,ul.pager li:hover{color:#1b67fb;border:1px solid #7b7b7b}ul.pager li.loading{text-indent:-9999em;background:#fff url(../images/icons/pager.gif?1308968925) no-repeat center center}ul.pager li.more:hover,ul.pager li.more{color:#8c8d90;font-weight:normal;text-decoration:none;font-variant:normal;font-style:normal}ul.pager li.active a{color:#2578fc;font-weight:bold;text-decoration:none;font-variant:normal}ul.pager li a{width:3em;font-weight:normal;text-decoration:none;font-variant:normal;color:#383838;font-size:1.1em;font-style:normal}span.severity-example{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em}span.severity,ul.table li div.small span.severity{-webkit-border-radius:5px;-moz-border-radius:5px;padding:3px 7px;color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;font-size:1.1em;background-color:#ddd}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/color-picker/colorpicker_background.png?1308968925);font-family:Arial,Helvetica,sans-serif;display:none}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/color-picker/colorpicker_overlay.png?1308968925)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/color-picker/colorpicker_select.gif?1308968925);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/color-picker/colorpicker_indic.gif?1308968925) left top;margin:-4px 0 0 0;left:0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:11px;font:normal normal 10px Arial,Helvetica,sans-serif;text-decoration:none}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/color-picker/colorpicker_hex.png?1308968925) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../images/color-picker/colorpicker_rgb_r.png?1308968925);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../images/color-picker/colorpicker_rgb_g.png?1308968925);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../images/color-picker/colorpicker_rgb_b.png?1308968925);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../images/color-picker/colorpicker_hsb_h.png?1308968925);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../images/color-picker/colorpicker_hsb_s.png?1308968925);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../images/color-picker/colorpicker_hsb_b.png?1308968925);top:112px;left:282px}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/color-picker/colorpicker_submit.png?1308968925) top;left:322px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus{background-position:bottom}.colorpicker_submit.colorpicker_focus{background-position:bottom}.colorpicker_slider{background-position:bottom}.spch-bub-inside{position:relative}a.spch-bub-inside{color:#00F;text-decoration:none}.spch-bub-inside em{font-style:normal;font-size:.8em}.spch-bub-inside em{background:#00F;color:#FFF;padding:0 .4em;-moz-border-radius:.25em;-webkit-border-radius:.25em;border-radius:.25em;position:relative}.spch-bub-inside .point{width:0;height:0;position:absolute;top:1.1em;left:.4em;display:block;border-left:.45em solid #00F;border-bottom:.45em solid #FFF;border-bottom:.45em solid rgba(0,0,0,0);overflow:hidden}a.spch-bub-inside:hover{color:#F00}a.spch-bub-inside:hover em{cursor:pointer;background:#F00;color:#FF0}a.spch-bub-inside:hover .point{border-left:.5em solid #F00}span.payload-number{color:#8a8a8d}span.payload-hex{color:#343e4b}span.payload-ascii{color:#505254;font-weight:bold;text-decoration:none;font-variant:normal}label{text-transform:none}input.error{border:2px solid #fd2e3f!important}#lookup-form{position:relative;display:block;overflow:visible;padding-top:5px}p.form-order{position:relative;display:inline-block;overflow:hidden;width:500px;float:left;height:50px}input.large{width:430px;margin-bottom:10px}input[disabled]{opacity:.9;color:#e6e6e6}form.basic-form label{color:#4a4a4a}form.basic-form input[type='password'],form.basic-form input[type='text']{width:300px;padding:7px}form.basic-form p{margin-top:10px;margin-bottom:10px}label.error{visibility:hidden;display:none;position:absolute;bottom:0;left:0;overflow:hidden}i{color:#a5a5a5;font-style:italic;text-decoration:none;font-variant:normal;font-size:.8em}#form-actions{display:block;background:#ededed filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(-90deg,#fff,#ededed);margin:10px -10px -15px;border-top:1px solid #e7e7e7;padding:7px 10px 9px}#box-footer #form-actions{background:none;margin:0;border-style:none;padding:0}div.note-body #form-actions{margin-left:45px!important}div.notes #form-actions{background:none;margin:0;border-style:none}input[type='password'],input[type='text']{-webkit-font-smoothing:antialiased;margin-bottom:10px;padding:5px;font:bold 1.3em "Helvetica Neue",Arial,Helvetica,Geneva,sans-serif;letter-spacing:-1px;color:#383838}td.chart{position:relative;width:200px;padding-left:10px;padding-bottom:0}div.progress-container{vertical-align:middle;border:1px solid #c0c0c0;width:180px;float:left;background:#fff;display:block;position:relative;top:6px;overflow:hidden}div.progress-container>div{height:17px;background:transparent url(../images/page/chart-bg-blue.png?1308968925) repeat-x}div.progress-container>div>span{height:17px;font-size:x-small;color:#545454;line-height:17px;display:block;position:absolute;right:5px;font-weight:bold;text-shadow:#fff 0 1px 0}div.notes{display:block;position:relative;overflow:hidden}strong.no-notes{color:#acacac}div#new_note{display:block;position:relative;overflow:visible;padding:0;margin:0}div.notes div#new_note textarea#body{outline:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:130px;background-color:#000;width:800px;padding:5px;color:#fff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;letter-spacing:-1px;font-size:1.2em;border:4px solid #525252}.event-note{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.2);box-shadow:0 1px 5px rgba(0,0,0,0.2);display:block;position:relative;overflow:hidden;background-color:#212121;padding:10px;border:1px solid #3f3f3f;margin-bottom:10px}.event-note:hover{background-color:#242424}.event-note .note-avatar-holder{float:left;width:55px;display:block;position:relative;overflow:hidden}.event-note .note-avatar-holder img{background:#000;border:1px solid #3a3a3a;float:left;margin:1px 10px 0 0;padding:4px;width:32px;height:32px}.event-note .username{font-weight:normal;text-decoration:none;font-variant:normal;color:#bdced6;text-shadow:#000 0 1px 0;margin-bottom:10px;font-style:normal;font-size:1.2em}.event-note .note-body{color:#fff;line-height:17px;margin-bottom:5px;word-wrap:break-word}.event-note .note-body strong{color:#fc251f;font-weight:bold;text-decoration:none;font-variant:normal;text-transform:capitalize;display:inline-block}.event-note .note-body p{padding-bottom:5px}.event-note .note-body a{color:#fd3640;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}.event-note .note-body sup.footnote{font-size:.9em;padding-left:5px;padding-right:5px}.event-note .note-body span.caps{font-weight:bold;color:#d9d9d9;text-decoration:underline}.event-note .note-options{display:none;visibility:hidden}.event-note:hover .note-options{text-decoration:none;font-variant:normal;font-size:small;text-align:right;display:block;position:absolute;overflow:hidden;top:5px;right:10px;visibility:visible;height:25px;line-height:25px}.event-note .note-options a{padding:3px 5px;color:#fff;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#d72219');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#d72219));background:-moz-linear-gradient(-90deg,#fd4f52,#d72219);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;border:1px solid #fd462d;font-size:.8em}.event-note .note-options a:hover{background:#d72219;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fd4f52',endColorstr='#e8433b');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fd4f52),to(#e8433b));background:-moz-linear-gradient(-90deg,#fd4f52,#e8433b)}div.notes div#new_note textarea#body:focus,div.notes div#new_note textarea#body:active{outline:none}img.avatar{border:5px solid #ededed}img.avatar-small{border:3px solid #ededed}#general-settings div.pc-settings{background:#fbfbfb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#fbfbfb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#fbfbfb));background:-moz-linear-gradient(-90deg,#fff,#fbfbfb);display:block;position:relative;overflow:hidden;margin-bottom:10px;border:1px solid #d1d1d1}#general-settings div.pc-settings p{padding-top:3px;padding-bottom:3px}#settings .crop-holder{display:block;position:relative;overflow:hidden;margin-bottom:20px}#settings .user-show-avatar{position:relative;display:block;overflow:hidden;margin-bottom:10px;color:#686868;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal}#settings .user-show-avatar strong{color:#141414;font-weight:bold;text-decoration:none;font-variant:normal}#settings .user-show-avatar p{margin:0 0 7px;padding:0}#settings ul#user-info{display:block;position:relative;overflow:hidden;background-color:#ededed;border:3px solid #ededed}#settings ul#user-info .inside{padding:10px;display:block;position:relative;overflow:hidden;background:#fff;border:1px solid #dcdcdc}#settings ul#user-info li{height:25px;line-height:25px;border-bottom:1px solid #eee}#settings ul#user-info li strong{color:#a1a1a1;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;width:120px;display:block;position:relative;overflow:hidden;float:left;text-align:left;margin-right:10px}#settings .user-show-avatar img{min-height:100px;min-width:100px;float:left;margin-right:10px}.tipsy{padding:5px;font-size:10px;position:absolute;z-index:100000}.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:left;line-height:15px}.tipsy-inner{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.tipsy-arrow{position:absolute;background:url(../images/tipsy.gif?1308968925) no-repeat top left;width:9px;height:5px}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-4px}.tipsy-nw .tipsy-arrow{top:0;left:10px}.tipsy-ne .tipsy-arrow{top:0;right:10px}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-4px;background-position:bottom left}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;background-position:bottom left}.tipsy-se .tipsy-arrow{bottom:0;right:10px;background-position:bottom left}.tipsy-e .tipsy-arrow{top:50%;margin-top:-4px;right:0;width:5px;height:9px;background-position:top right}.tipsy-w .tipsy-arrow{top:50%;margin-top:-4px;left:0;width:5px;height:9px}#dashboard{position:relative;overflow:hidden;display:block;margin-bottom:10px;margin-top:10px}#dashboard #box-tabs{position:relative;display:block;overflow:hidden}#dashboard #box-tabs ul#box-menu{display:block;position:relative;overflow:hidden;height:25px;line-height:25px;padding-left:10px}div.dashboard-graph{height:400px;width:722px}div.dashboard-graph.no-pie-data{background:#fff url(../images/dashboard/pie-no-data.png?1312071259) no-repeat center;display:block;position:relative;overflow:hidden}#dashboard #box-tabs ul#box-menu li{-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;background-color:#c3c5cb;position:relative;overflow:hidden;display:block;float:left;margin-right:3px;top:5px}#dashboard #box-tabs ul#box-menu li:hover{top:0;background-color:#b3b5bb}#dashboard #box-tabs ul#box-menu li.active{background-color:#eee;top:0}#dashboard #box-tabs ul#box-menu li.active a{color:#282828}#dashboard #box-tabs ul#box-menu li a{padding-right:10px;padding-left:10px;color:#fffeff;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;display:block}#dashboard h2{text-transform:capitalize;color:#6a8092;font-weight:normal;text-decoration:none;font-variant:normal;padding-left:5px;font-style:normal;font-size:1.2em;margin-bottom:5px}#dashboard .main,#dashboard .secondary{position:relative;display:block;overflow:hidden}#dashboard .main .dashboard-main{width:730px;display:block;position:relative}#dashboard .secondary ul.box-list{display:block;position:relative;overflow:hidden;margin-bottom:20px;border-top-style:none}#dashboard .secondary ul.box-list li{height:30px;line-height:30px;border-bottom:1px solid #ededed;color:#6a7e8d;display:block;position:relative;overflow:hidden;font-size:1.0em;text-align:left}#dashboard .secondary ul.box-list li a{font-size:1.0em;color:#6a7e8d;text-align:left;font-weight:normal;font-style:normal;text-decoration:none;font-variant:normal;position:relative;display:block;overflow:visible}#dashboard .secondary ul.box-list li.has-image a{margin-left:30px}#dashboard .secondary ul.box-list li span{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;line-height:1.4em;!important display:block;float:right;background-color:#eee;padding:3px 5px;top:5px;display:block;position:absolute;font-size:.9em;text-align:left;color:#868686;text-shadow:#fffeff 0 1px 0;right:0}#dashboard .secondary ul.box-list li:hover span{background-color:#469dfc;color:#fff;text-shadow:#000 0 1px 0}#dashboard .secondary ul.box-list li img{vertical-align:middle;margin-top:-2px;margin-right:5px;position:absolute;display:block;overflow:hidden;bottom:0;left:0;top:5px}#dashboard .main .dashboard-menu{display:block;position:relative;overflow:hidden}#dashboard .secondary .dashboard-header{display:block;position:relative;overflow:hidden;padding-right:10px;margin-bottom:5px;border-bottom:3px solid #dedede;padding-bottom:5px}#dashboard .secondary .dashboard-header span{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b}#dashboard .main .dashboard-menu ul{display:block;position:relative;overflow:hidden;padding-right:10px;padding-left:10px;margin-bottom:10px;border-bottom:3px solid #dedede;width:710px}#dashboard .main .dashboard-menu ul li{float:left;margin-right:10px;padding-bottom:5px}#dashboard .main .dashboard-menu ul li img{vertical-align:middle;margin-top:-3px;margin-left:10px}#dashboard .main .dashboard-menu ul li.active a{color:#405fa3}#dashboard .main .dashboard-menu ul li a{font-weight:bold;text-decoration:none;font-variant:normal;text-transform:uppercase;color:#4f5f6b}#dashboard .main .dashboard-menu ul li a:hover{border-bottom:2px solid #bdbdbd;color:#405fa3}#dashboard .main #box-holder{display:block;position:relative;overflow:hidden}#dashboard .main .box{height:190px;border:1px solid #dbdbdb;position:relative;overflow:hidden;display:block;margin-bottom:15px;background:#ededed url(../images/dashboard/box-bg.png?1308968925) no-repeat}#dashboard .main .box-large{width:724px;border:4px solid #eee;position:relative;overflow:hidden;display:block;margin-bottom:10px}#dashboard .main .box-large .box-large-inside{position:relative;overflow:hidden;display:block;border:1px solid #e0e0e0}#dashboard .main .box .content{height:140px;margin:10px 10px 5px;padding:5px;background:#ddd;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));background:-moz-linear-gradient(-90deg,#fff,#e1e1e1);border:1px solid #f7fef4}#dashboard .main .box .content .data{height:145px;display:block;position:relative;overflow:hidden}#dashboard .main .box .content .data #box-title{font-weight:normal;text-decoration:none;font-variant:normal;color:#454549;font-size:1.3em;text-align:center;text-transform:uppercase;letter-spacing:-1px;margin-top:5px;text-shadow:#fff 0 1px 0;font-style:normal}#dashboard .main .box .content .data #box-count{text-align:center;text-decoration:none;color:#646167;margin-top:10px;text-shadow:#fff 0 1px 0;font-style:normal;font-weight:bold;font-size:5.0em}#dashboard .main .box .content .data .box-graph{position:absolute;bottom:5px;right:5px;left:5px;display:block;overflow:hidden;text-align:center}#dashboard .main .box .footer{vertical-align:middle;line-height:20px;height:20px;padding-left:10px;padding-right:10px;text-align:left;color:#45637a;font-size:.9em;font-weight:bold}#dashboard .main .box .footer span{color:#b2aeb0}#dashboard .main .box .footer img{vertical-align:middle;float:right}#search-box{display:block;position:relative;overflow:visible;height:195px}#search-box input{width:270px}#search-box select{width:285px}#search-box div{margin-bottom:15px}#snorbybox-content{display:block;overflow:visible;position:relative}#snorbybox-content form{display:block;overflow:hidden;position:relative}#snorbybox-content #snorbybox-form-holder{display:block;position:relative;overflow:hidden}#snorbybox-content #snorbybox-form-holder #snorbybox-form{width:320px;float:left;display:block;position:relative;overflow:hidden;margin-bottom:10px}#snorbybox-content select#user_select,#snorbybox-content select#sensor_select{width:610px}#snorbybox-content #snorbybox-form-full{display:block;position:relative;overflow:visible}#snorbybox-content #snorbybox-form-full textarea{height:200px;width:610px}#snorbybox-content h2{font-size:1.4em;color:#1f1f1f;font-weight:bold;text-decoration:none;font-variant:normal;margin-bottom:10px}#snorbybox-content #hotkey-section{width:365px;float:left;margin-bottom:15px}#snorbybox-content #hotkey-section dl{display:block;position:relative;overflow:hidden}#snorbybox-content #hotkey-section dl dd{display:block;overflow:hidden;position:relative;height:30px;line-height:30px;color:#2e2e2e;font-weight:bold;text-decoration:none;font-variant:normal;margin-top:3px;margin-bottom:3px}#snorbybox-content #hotkey-section dl dd span.hotkey{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:5px;background:#2774fb;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5994fc',endColorstr='#2774fb');background:-webkit-gradient(linear,0% 0,0% 100%,from(#5994fc),to(#2774fb));background:-moz-linear-gradient(-90deg,#5994fc,#2774fb);color:#fff;font-weight:bold;text-decoration:none;font-variant:normal;margin-right:10px;text-shadow:#000 0 1px 0}#snorbybox-content #hotkey-section dl dd span.hotkey strong{color:#c9c8ce;text-transform:uppercase}#snorbybox-content #hotkey-section dl dd span.hotkey em{color:#c3c3c3;font-weight:normal;text-decoration:none;font-variant:normal;text-shadow:none;font-style:normal}form#new_severity p{margin-bottom:5px}form#new_classification p{margin-bottom:5px}input#classification_name{width:448px}form#new_classification textarea{width:450px;font-size:1.1em}html.login,body.login{font-family:Helvetica,Arial;font-size:12px;background:#202325 url(../images/header/header-bg.png?1311637946) repeat}#login{display:block;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}#login #wrapper{width:960px;display:block;position:absolute;right:0;bottom:0;left:0;overflow:hidden;border-style:none;top:0;margin:auto}#login #login-logo{width:960px;height:600px;background:url(../images/login.png?1311637946) no-repeat 130px 30px;overflow:hidden;position:absolute;display:block;margin-right:auto;margin-left:auto;margin-bottom:auto}#login #wrapper #content{-webkit-box-shadow:0 1px 20px rgba(0,0,0,0.5);-moz-box-shadow:0 1px 20px rgba(0,0,0,0.5);box-shadow:0 1px 20px rgba(0,0,0,0.5);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;width:555px;border:1px solid #000;background-color:#181718;position:relative;display:block;overflow:hidden;height:225px;margin-top:240px;margin-left:176px}#login #wrapper #content #title{-moz-border-radius-topright:5px;-moz-border-radius-topleft:5px;-webkit-border-top-right-radius:5px;-webkit-border-top-left-radius:5px}#login #content form p{margin-bottom:2px}#login #content form input[type='text'],#login #content form input[type='password']{width:515px;padding:9px;color:#000;margin-left:-1px}#login #wrapper #content #signin,#login #wrapper #content #password{width:555px;background-color:#fff;margin:0;padding:0}#login #wrapper #content form{margin:0;padding:11px 10px 10px;height:149px;display:block;position:relative;overflow:visible;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px}#login #wrapper #content #form-actions{-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px;width:535px;display:block;position:absolute;overflow:hidden;bottom:-9px;right:0;left:10px}#login #wrapper #content #note{cursor:default}#login #wrapper #content #password input,#login #wrapper #content #password .field_with_errors input{margin-top:5px;margin-bottom:69px!important;position:relative;display:block;overflow:visible}#login #wrapper #content #password br{display:none}#login #wrapper #content #password p lable{margin-top:5px}#login #wrapper #content #form-actions p{position:absolute;display:block;overflow:hidden;bottom:0;margin:0;padding:0;top:13px;right:20px}div.map{display:block;position:relative;overflow:hidden}.chzn-container{font-size:13px;position:relative;display:inline-block;zoom:1;*display:inline}.chzn-container .chzn-drop{background:#fff;border:1px solid #aaa;border-top:0;position:absolute;top:29px;left:0;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);-moz-box-shadow:0 4px 5px rgba(0,0,0,.15);-o-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);z-index:999}.chzn-container-single .chzn-single{background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.5,white));background-image:-webkit-linear-gradient(center bottom,#eee 0,white 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,white 50%);background-image:-o-linear-gradient(top,#eee 0,#fff 50%);background-image:-ms-linear-gradient(top,#eee 0,#fff 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(top,#eee 0,#fff 50%);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #aaa;display:block;overflow:hidden;white-space:nowrap;position:relative;height:26px;line-height:26px;padding:0 0 0 8px;color:#444;text-decoration:none}.chzn-container-single .chzn-single span{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.chzn-container-single .chzn-single div{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(0.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-o-linear-gradient(bottom,#ccc 0,#eee 60%);background-image:-ms-linear-gradient(top,#ccc 0,#eee 60%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#ccc 0,#eee 60%);border-left:1px solid #aaa;position:absolute;right:0;top:0;display:block;height:100%;width:18px}.chzn-container-single .chzn-single div b{background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 0 1px;display:block;width:100%;height:100%}.chzn-container-single .chzn-search{padding:3px 4px;margin:0;white-space:nowrap}.chzn-container-single .chzn-search input{background:#fff url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px;background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-moz-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-o-linear-gradient(bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat 100% -20px,linear-gradient(top,#fff 85%,#eee 99%);margin:1px 0;padding:4px 20px 4px 5px;outline:0;border:1px solid #aaa;font-family:sans-serif;font-size:1em}.chzn-container-single .chzn-drop{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.chzn-container-multi .chzn-choices{background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background-image:-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background-image:-moz-linear-gradient(center bottom,white 85%,#eee 99%);background-image:-o-linear-gradient(bottom,white 85%,#eee 99%);background-image:-ms-linear-gradient(top,#fff 85%,#eee 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#fff 85%,#eee 99%);border:1px solid #aaa;margin:0;padding:0;cursor:text;overflow:hidden;height:auto!important;height:1%;position:relative}.chzn-container-multi .chzn-choices li{float:left;list-style:none}.chzn-container-multi .chzn-choices .search-field{white-space:nowrap;margin:0;padding:0}.chzn-container-multi .chzn-choices .search-field input{color:#666;background:transparent!important;border:0!important;padding:5px;margin:1px 0;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;-o-box-shadow:none;box-shadow:none}.chzn-container-multi .chzn-choices .search-field .default{color:#999}.chzn-container-multi .chzn-choices .search-choice{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#e4e4e4),color-stop(0.7,#eee));background-image:-webkit-linear-gradient(center bottom,#e4e4e4 0,#eee 70%);background-image:-moz-linear-gradient(center bottom,#e4e4e4 0,#eee 70%);background-image:-o-linear-gradient(bottom,#e4e4e4 0,#eee 70%);background-image:-ms-linear-gradient(top,#e4e4e4 0,#eee 70%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#e4e4e4 0,#eee 70%);color:#333;border:1px solid #b4b4b4;line-height:13px;padding:3px 19px 3px 6px;margin:3px 0 3px 5px;position:relative}.chzn-container-multi .chzn-choices .search-choice span{cursor:default}.chzn-container-multi .chzn-choices .search-choice-focus{background:#d4d4d4}.chzn-container-multi .chzn-choices .search-choice .search-choice-close{display:block;position:absolute;right:5px;top:6px;width:8px;height:9px;font-size:1px;background:url(../stylesheets/chosen-sprite.png?1314476377) right top no-repeat}.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover{background-position:right -9px}.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close{background-position:right -9px}.chzn-container .chzn-results{margin:0 4px 4px 0;max-height:190px;padding:0 0 0 4px;position:relative;overflow-x:hidden;overflow-y:auto}.chzn-container-multi .chzn-results{margin:-1px 0 0;padding:0}.chzn-container .chzn-results li{line-height:80%;padding:7px 7px 8px;margin:0;list-style:none}.chzn-container .chzn-results .active-result{cursor:pointer}.chzn-container .chzn-results .highlighted{background:#3875d7;color:#fff}.chzn-container .chzn-results li em{background:#feffde;font-style:normal}.chzn-container .chzn-results .highlighted em{background:transparent}.chzn-container .chzn-results .no-results{background:#f4f4f4}.chzn-container .chzn-results .group-result{cursor:default;color:#999;font-weight:bold}.chzn-container .chzn-results .group-option{padding-left:20px}.chzn-container-multi .chzn-drop .result-selected{display:none}.chzn-container-active .chzn-single{-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);-moz-box-shadow:0 0 5px rgba(0,0,0,.3);-o-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3);border:1px solid #5897fb}.chzn-container-active .chzn-single-with-drop{border:1px solid #aaa;-webkit-box-shadow:0 1px 0 #fff inset;-moz-box-shadow:0 1px 0 #fff inset;-o-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,white),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center bottom,white 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,white 0,#eee 50%);background-image:-o-linear-gradient(bottom,white 0,#eee 50%);background-image:-ms-linear-gradient(top,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#fff 0,#eee 50%);-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.chzn-container-active .chzn-single-with-drop div{background:transparent;border-left:none}.chzn-container-active .chzn-single-with-drop div b{background-position:-18px 1px}.chzn-container-active .chzn-choices{-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);-moz-box-shadow:0 0 5px rgba(0,0,0,.3);-o-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3);border:1px solid #5897fb}.chzn-container-active .chzn-choices .search-field input{color:#111!important}.chzn-rtl{direction:rtl;text-align:right}.chzn-rtl .chzn-single{padding-left:0;padding-right:8px}.chzn-rtl .chzn-single span{margin-left:26px;margin-right:0}.chzn-rtl .chzn-single div{left:0;right:auto;border-left:none;border-right:1px solid #aaa;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.chzn-rtl .chzn-choices li{float:right}.chzn-rtl .chzn-choices .search-choice{padding:3px 6px 3px 19px;margin:3px 5px 3px 0}.chzn-rtl .chzn-choices .search-choice .search-choice-close{left:5px;right:auto;background-position:right top}.chzn-rtl.chzn-container-single .chzn-results{margin-left:4px;margin-right:0;padding-left:0;padding-right:4px}.chzn-rtl .chzn-results .group-option{padding-left:0;padding-right:20px}.chzn-rtl.chzn-container-active .chzn-single-with-drop div{border-right:none}.chzn-rtl .chzn-search input{background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,#fff;background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,white),color-stop(0.99,#eee));background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-webkit-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-moz-linear-gradient(center bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-o-linear-gradient(bottom,white 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,-ms-linear-gradient(top,#fff 85%,#eee 99%);background:url(../stylesheets/chosen-sprite.png?1314476377) no-repeat -38px -20px,linear-gradient(top,#fff 85%,#eee 99%);padding:4px 5px 4px 20px}
\ No newline at end of file
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/assets/snorby.js
^
|
@@ -1,4 +1,4 @@
-/*
+/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
@@ -14,7 +14,7 @@
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(aP,M){function a1(){if(!ai.isReady){try{S.documentElement.doScroll("left")}catch(c){setTimeout(a1,1);return}ai.ready()}}function H(s,c){c.src?ai.ajax({url:c.src,async:false,dataType:"script"}):ai.globalEval(c.text||c.textContent||c.innerHTML||"");c.parentNode&&c.parentNode.removeChild(c)}function aq(s,c,K,F,G,w){var A=s.length;if(typeof c==="object"){for(var J in c){aq(s,J,c[J],F,G,K)}return s}if(K!==M){F=!w&&F&&ai.isFunction(K);for(J=0;J<A;J++){G(s[J],c,F?K.call(s[J],J,G(s[J],c)):K,w)}return s}return A?G(s[0],c):M}function aG(){return(new Date).getTime()}function ap(){return false}function an(){return true}function aL(s,c,w){w[0].type=s;return ai.event.handle.apply(c,w)}function ah(O){var N,L=[],J=[],K=arguments,F,G,s,A,w,c;G=ai.data(this,"events");if(!(O.liveFired===this||!G||!G.live||O.button&&O.type==="click")){O.liveFired=this;var P=G.live.slice(0);for(A=0;A<P.length;A++){G=P[A];G.origType.replace(aA,"")===O.type?J.push(G.selector):P.splice(A--,1)}F=ai(O.target).closest(J,O.currentTarget);w=0;for(c=F.length;w<c;w++){for(A=0;A<P.length;A++){G=P[A];if(F[w].selector===G.selector){s=F[w].elem;J=null;if(G.preType==="mouseenter"||G.preType==="mouseleave"){J=ai(O.relatedTarget).closest(G.selector)[0]}if(!J||J!==s){L.push({elem:s,handleObj:G})}}}}w=0;for(c=L.length;w<c;w++){F=L[w];O.currentTarget=F.elem;O.data=F.handleObj.data;O.handleObj=F.handleObj;if(F.handleObj.origHandler.apply(F.elem,K)===false){N=false;break}}return N}}function B(s,c){return"live."+(s&&s!=="*"?s+".":"")+c.replace(/\./g,"`").replace(/ /g,"&")}function l(c){return !c||!c.parentNode||c.parentNode.nodeType===11}function bk(s,c){var w=0;c.each(function(){if(this.nodeName===(s[w]&&s[w].nodeName)){var G=ai.data(s[w++]),J=ai.data(this,G);if(G=G&&G.events){delete J.handle;J.events={};for(var A in G){for(var F in G[A]){ai.event.add(this,A,G[A][F],G[A][F].data)}}}}})}function a4(s,c,G){var A,F,w;c=c&&c[0]?c[0].ownerDocument||c[0]:S;if(s.length===1&&typeof s[0]==="string"&&s[0].length<512&&c===S&&!aQ.test(s[0])&&(ai.support.checkClone||!al.test(s[0]))){F=true;if(w=ai.fragments[s[0]]){if(w!==1){A=w}}}if(!A){A=c.createDocumentFragment();ai.clean(s,c,A,G)}if(F){ai.fragments[s[0]]=w?A:1}return{fragment:A,cacheable:F}}function aD(s,c){var w={};ai.each(E.concat.apply([],E.slice(0,c)),function(){w[this]=s});return w}function o(c){return"scrollTo" in c&&c.document?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var ai=function(s,c){return new ai.fn.init(s,c)},p=aP.jQuery,d=aP.$,S=aP.document,au,a8=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,aU=/^.[^:#\[\.,]*$/,ao=/\S/,I=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,q=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ay=navigator.userAgent,b=false,aw=[],aC,a2=Object.prototype.toString,aW=Object.prototype.hasOwnProperty,az=Array.prototype.push,av=Array.prototype.slice,a7=Array.prototype.indexOf;ai.fn=ai.prototype={init:function(s,c){var A,w;if(!s){return this}if(s.nodeType){this.context=this[0]=s;this.length=1;return this}if(s==="body"&&!c){this.context=S;this[0]=S.body;this.selector="body";this.length=1;return this}if(typeof s==="string"){if((A=a8.exec(s))&&(A[1]||!c)){if(A[1]){w=c?c.ownerDocument||c:S;if(s=q.exec(s)){if(ai.isPlainObject(c)){s=[S.createElement(s[1])];ai.fn.attr.call(s,c,true)}else{s=[w.createElement(s[1])]}}else{s=a4([A[1]],[w]);s=(s.cacheable?s.fragment.cloneNode(true):s.fragment).childNodes}return ai.merge(this,s)}else{if(c=S.getElementById(A[2])){if(c.id!==A[2]){return au.find(s)}this.length=1;this[0]=c}this.context=S;this.selector=s;return this}}else{if(!c&&/^\w+$/.test(s)){this.selector=s;this.context=S;s=S.getElementsByTagName(s);return ai.merge(this,s)}else{return !c||c.jquery?(c||au).find(s):ai(c).find(s)}}}else{if(ai.isFunction(s)){return au.ready(s)}}if(s.selector!==M){this.selector=s.selector;this.context=s.context}return ai.makeArray(s,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return av.call(this,0)},get:function(c){return c==null?this.toArray():c<0?this.slice(c)[0]:this[c]},pushStack:function(s,c,A){var w=ai();ai.isArray(s)?az.apply(w,s):ai.merge(w,s);w.prevObject=this;w.context=this.context;if(c==="find"){w.selector=this.selector+(this.selector?" ":"")+A}else{if(c){w.selector=this.selector+"."+c+"("+A+")"}}return w},each:function(s,c){return ai.each(this,s,c)},ready:function(c){ai.bindReady();if(ai.isReady){c.call(S,ai)}else{aw&&aw.push(c)}return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(av.apply(this,arguments),"slice",av.call(arguments).join(","))},map:function(c){return this.pushStack(ai.map(this,function(s,w){return c.call(s,w,s)}))},end:function(){return this.prevObject||ai(null)},push:az,sort:[].sort,splice:[].splice};ai.fn.init.prototype=ai.fn;ai.extend=ai.fn.extend=function(){var s=arguments[0]||{},c=1,K=arguments.length,F=false,G,w,A,J;if(typeof s==="boolean"){F=s;s=arguments[1]||{};c=2}if(typeof s!=="object"&&!ai.isFunction(s)){s={}}if(K===c){s=this;--c}for(;c<K;c++){if((G=arguments[c])!=null){for(w in G){A=s[w];J=G[w];if(s!==J){if(F&&J&&(ai.isPlainObject(J)||ai.isArray(J))){A=A&&(ai.isPlainObject(A)||ai.isArray(A))?A:ai.isArray(J)?[]:{};s[w]=ai.extend(F,A,J)}else{if(J!==M){s[w]=J}}}}}}return s};ai.extend({noConflict:function(c){aP.$=d;if(c){aP.jQuery=p}return ai},isReady:false,ready:function(){if(!ai.isReady){if(!S.body){return setTimeout(ai.ready,13)}ai.isReady=true;if(aw){for(var s,c=0;s=aw[c++];){s.call(S,ai)}aw=null}ai.fn.triggerHandler&&ai(S).triggerHandler("ready")}},bindReady:function(){if(!b){b=true;if(S.readyState==="complete"){return ai.ready()}if(S.addEventListener){S.addEventListener("DOMContentLoaded",aC,false);aP.addEventListener("load",ai.ready,false)}else{if(S.attachEvent){S.attachEvent("onreadystatechange",aC);aP.attachEvent("onload",ai.ready);var s=false;try{s=aP.frameElement==null}catch(c){}S.documentElement.doScroll&&s&&a1()}}}},isFunction:function(c){return a2.call(c)==="[object Function]"},isArray:function(c){return a2.call(c)==="[object Array]"},isPlainObject:function(s){if(!s||a2.call(s)!=="[object Object]"||s.nodeType||s.setInterval){return false}if(s.constructor&&!aW.call(s,"constructor")&&!aW.call(s.constructor.prototype,"isPrototypeOf")){return false}var c;for(c in s){}return c===M||aW.call(s,c)},isEmptyObject:function(s){for(var c in s){return false}return true},error:function(c){throw c},parseJSON:function(c){if(typeof c!=="string"||!c){return null}c=ai.trim(c);if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return aP.JSON&&aP.JSON.parse?aP.JSON.parse(c):(new Function("return "+c))()}else{ai.error("Invalid JSON: "+c)}},noop:function(){},globalEval:function(s){if(s&&ao.test(s)){var c=S.getElementsByTagName("head")[0]||S.documentElement,w=S.createElement("script");w.type="text/javascript";if(ai.support.scriptEval){w.appendChild(S.createTextNode(s))}else{w.text=s}c.insertBefore(w,c.firstChild);c.removeChild(w)}},nodeName:function(s,c){return s.nodeName&&s.nodeName.toUpperCase()===c.toUpperCase()},each:function(s,c,J){var F,G=0,w=s.length,A=w===M||ai.isFunction(s);if(J){if(A){for(F in s){if(c.apply(s[F],J)===false){break}}}else{for(;G<w;){if(c.apply(s[G++],J)===false){break}}}}else{if(A){for(F in s){if(c.call(s[F],F,s[F])===false){break}}}else{for(J=s[0];G<w&&c.call(J,G,J)!==false;J=s[++G]){}}}return s},trim:function(c){return(c||"").replace(I,"")},makeArray:function(s,c){c=c||[];if(s!=null){s.length==null||typeof s==="string"||ai.isFunction(s)||typeof s!=="function"&&s.setInterval?az.call(c,s):ai.merge(c,s)}return c},inArray:function(s,c){if(c.indexOf){return c.indexOf(s)}for(var A=0,w=c.length;A<w;A++){if(c[A]===s){return A}}return -1},merge:function(s,c){var F=s.length,w=0;if(typeof c.length==="number"){for(var A=c.length;w<A;w++){s[F++]=c[w]}}else{for(;c[w]!==M;){s[F++]=c[w++]}}s.length=F;return s},grep:function(s,c,G){for(var A=[],F=0,w=s.length;F<w;F++){!G!==!c(s[F],F)&&A.push(s[F])}return A},map:function(s,c,J){for(var F=[],G,w=0,A=s.length;w<A;w++){G=c(s[w],w,J);if(G!=null){F[F.length]=G}}return F.concat.apply([],F)},guid:1,proxy:function(s,c,w){if(arguments.length===2){if(typeof c==="string"){w=s;s=w[c];c=M}else{if(c&&!ai.isFunction(c)){w=c;c=M}}}if(!c&&s){c=function(){return s.apply(w||this,arguments)}}if(s){c.guid=s.guid=s.guid||c.guid||ai.guid++}return c},uaMatch:function(c){c=c.toLowerCase();c=/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||!/compatible/.test(c)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(c)||[];return{browser:c[1]||"",version:c[2]||"0"}},browser:{}});ay=ai.uaMatch(ay);if(ay.browser){ai.browser[ay.browser]=true;ai.browser.version=ay.version}if(ai.browser.webkit){ai.browser.safari=true}if(a7){ai.inArray=function(s,c){return a7.call(c,s)}}au=ai(S);if(S.addEventListener){aC=function(){S.removeEventListener("DOMContentLoaded",aC,false);ai.ready()}}else{if(S.attachEvent){aC=function(){if(S.readyState==="complete"){S.detachEvent("onreadystatechange",aC);ai.ready()}}}}(function(){ai.support={};var L=S.documentElement,K=S.createElement("script"),J=S.createElement("div"),F="script"+aG();J.style.display="none";J.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var G=J.getElementsByTagName("*"),w=J.getElementsByTagName("a")[0];if(!(!G||!G.length||!w)){ai.support={leadingWhitespace:J.firstChild.nodeType===3,tbody:!J.getElementsByTagName("tbody").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(w.getAttribute("style")),hrefNormalized:w.getAttribute("href")==="/a",opacity:/^0.55$/.test(w.style.opacity),cssFloat:!!w.style.cssFloat,checkOn:J.getElementsByTagName("input")[0].value==="on",optSelected:S.createElement("select").appendChild(S.createElement("option")).selected,parentNode:J.removeChild(J.appendChild(S.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};K.type="text/javascript";try{K.appendChild(S.createTextNode("window."+F+"=1;"))}catch(A){}L.insertBefore(K,L.firstChild);if(aP[F]){ai.support.scriptEval=true;delete aP[F]}try{delete K.test}catch(c){ai.support.deleteExpando=false}L.removeChild(K);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function s(){ai.support.noCloneEvent=false;J.detachEvent("onclick",s)});J.cloneNode(true).fireEvent("onclick")}J=S.createElement("div");J.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";L=S.createDocumentFragment();L.appendChild(J.firstChild);ai.support.checkClone=L.cloneNode(true).cloneNode(true).lastChild.checked;ai(function(){var N=S.createElement("div");N.style.width=N.style.paddingLeft="1px";S.body.appendChild(N);ai.boxModel=ai.support.boxModel=N.offsetWidth===2;S.body.removeChild(N).style.display="none"});L=function(N){var P=S.createElement("div");N="on"+N;var O=N in P;if(!O){P.setAttribute(N,"return;");O=typeof P[N]==="function"}return O};ai.support.submitBubbles=L("submit");ai.support.changeBubbles=L("change");L=K=J=G=w=null}})();ai.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var aI="jQuery"+aG(),e=0,aT={};ai.extend({cache:{},expando:aI,noData:{embed:true,object:true,applet:true},data:function(s,c,F){if(!(s.nodeName&&ai.noData[s.nodeName.toLowerCase()])){s=s==aP?aT:s;var w=s[aI],A=ai.cache;if(!w&&typeof c==="string"&&F===M){return null}w||(w=++e);if(typeof c==="object"){s[aI]=w;A[w]=ai.extend(true,{},c)}else{if(!A[w]){s[aI]=w;A[w]={}}}s=A[w];if(F!==M){s[c]=F}return typeof c==="string"?s[c]:s}},removeData:function(s,c){if(!(s.nodeName&&ai.noData[s.nodeName.toLowerCase()])){s=s==aP?aT:s;var F=s[aI],w=ai.cache,A=w[F];if(c){if(A){delete A[c];ai.isEmptyObject(A)&&ai.removeData(s)}}else{if(ai.support.deleteExpando){delete s[ai.expando]}else{s.removeAttribute&&s.removeAttribute(ai.expando)}delete w[F]}}}});ai.fn.extend({data:function(s,c){if(typeof s==="undefined"&&this.length){return ai.data(this[0])}else{if(typeof s==="object"){return this.each(function(){ai.data(this,s)})}}var A=s.split(".");A[1]=A[1]?"."+A[1]:"";if(c===M){var w=this.triggerHandler("getData"+A[1]+"!",[A[0]]);if(w===M&&this.length){w=ai.data(this[0],s)}return w===M&&A[1]?this.data(A[0]):w}else{return this.trigger("setData"+A[1]+"!",[A[0],c]).each(function(){ai.data(this,s,c)})}},removeData:function(c){return this.each(function(){ai.removeData(this,c)})}});ai.extend({queue:function(s,c,A){if(s){c=(c||"fx")+"queue";var w=ai.data(s,c);if(!A){return w||[]}if(!w||ai.isArray(A)){w=ai.data(s,c,ai.makeArray(A))}else{w.push(A)}return w}},dequeue:function(s,c){c=c||"fx";var A=ai.queue(s,c),w=A.shift();if(w==="inprogress"){w=A.shift()}if(w){c==="fx"&&A.unshift("inprogress");w.call(s,function(){ai.dequeue(s,c)})}}});ai.fn.extend({queue:function(s,c){if(typeof s!=="string"){c=s;s="fx"}if(c===M){return ai.queue(this[0],s)}return this.each(function(){var w=ai.queue(this,s,c);s==="fx"&&w[0]!=="inprogress"&&ai.dequeue(this,s)})},dequeue:function(c){return this.each(function(){ai.dequeue(this,c)})},delay:function(s,c){s=ai.fx?ai.fx.speeds[s]||s:s;c=c||"fx";return this.queue(c,function(){var w=this;setTimeout(function(){ai.dequeue(w,c)},s)})},clearQueue:function(c){return this.queue(c||"fx",[])}});var bf=/[\n\t]/g,ac=/\s+/,a9=/\r/g,aN=/href|src|style/,aV=/(button|input)/i,ax=/(button|input|object|select|textarea)/i,U=/^(a|area)$/i,aZ=/radio|checkbox/;ai.fn.extend({attr:function(s,c){return aq(this,s,c,true,ai.attr)},removeAttr:function(c){return this.each(function(){ai.attr(this,c,"");this.nodeType===1&&this.removeAttribute(c)})},addClass:function(L){if(ai.isFunction(L)){return this.each(function(O){var N=ai(this);N.addClass(L.call(this,O,N.attr("class")))})}if(L&&typeof L==="string"){for(var K=(L||"").split(ac),J=0,F=this.length;J<F;J++){var G=this[J];if(G.nodeType===1){if(G.className){for(var w=" "+G.className+" ",A=G.className,c=0,s=K.length;c<s;c++){if(w.indexOf(" "+K[c]+" ")<0){A+=" "+K[c]}}G.className=ai.trim(A)}else{G.className=L}}}}return this},removeClass:function(s){if(ai.isFunction(s)){return this.each(function(L){var N=ai(this);N.removeClass(s.call(this,L,N.attr("class")))})}if(s&&typeof s==="string"||s===M){for(var c=(s||"").split(ac),K=0,F=this.length;K<F;K++){var G=this[K];if(G.nodeType===1&&G.className){if(s){for(var w=(" "+G.className+" ").replace(bf," "),A=0,J=c.length;A<J;A++){w=w.replace(" "+c[A]+" "," ")}G.className=ai.trim(w)}else{G.className=""}}}}return this},toggleClass:function(s,c){var A=typeof s,w=typeof c==="boolean";if(ai.isFunction(s)){return this.each(function(G){var F=ai(this);F.toggleClass(s.call(this,G,F.attr("class"),c),c)})}return this.each(function(){if(A==="string"){for(var K,G=0,J=ai(this),L=c,F=s.split(ac);K=F[G++];){L=w?L:!J.hasClass(K);J[L?"addClass":"removeClass"](K)}}else{if(A==="undefined"||A==="boolean"){this.className&&ai.data(this,"__className__",this.className);this.className=this.className||s===false?"":ai.data(this,"__className__")||""}}})},hasClass:function(s){s=" "+s+" ";for(var c=0,w=this.length;c<w;c++){if((" "+this[c].className+" ").replace(bf," ").indexOf(s)>-1){return true}}return false},val:function(s){if(s===M){var c=this[0];if(c){if(ai.nodeName(c,"option")){return(c.attributes.value||{}).specified?c.value:c.text}if(ai.nodeName(c,"select")){var K=c.selectedIndex,F=[],G=c.options;c=c.type==="select-one";if(K<0){return null}var w=c?K:0;for(K=c?K+1:G.length;w<K;w++){var A=G[w];if(A.selected){s=ai(A).val();if(c){return s}F.push(s)}}return F}if(aZ.test(c.type)&&!ai.support.checkOn){return c.getAttribute("value")===null?"on":c.value}return(c.value||"").replace(a9,"")}return M}var J=ai.isFunction(s);return this.each(function(L){var P=ai(this),O=s;if(this.nodeType===1){if(J){O=s.call(this,L,P.val())}if(typeof O==="number"){O+=""}if(ai.isArray(O)&&aZ.test(this.type)){this.checked=ai.inArray(P.val(),O)>=0}else{if(ai.nodeName(this,"select")){var N=ai.makeArray(O);ai("option",this).each(function(){this.selected=ai.inArray(ai(this).val(),N)>=0});if(!N.length){this.selectedIndex=-1}}else{this.value=O}}}})}});ai.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(s,c,G,A){if(!s||s.nodeType===3||s.nodeType===8){return M}if(A&&c in ai.attrFn){return ai(s)[c](G)}A=s.nodeType!==1||!ai.isXMLDoc(s);var F=G!==M;c=A&&ai.props[c]||c;if(s.nodeType===1){var w=aN.test(c);if(c in s&&A&&!w){if(F){c==="type"&&aV.test(s.nodeName)&&s.parentNode&&ai.error("type property can't be changed");s[c]=G}if(ai.nodeName(s,"form")&&s.getAttributeNode(c)){return s.getAttributeNode(c).nodeValue}if(c==="tabIndex"){return(c=s.getAttributeNode("tabIndex"))&&c.specified?c.value:ax.test(s.nodeName)||U.test(s.nodeName)&&s.href?0:M}return s[c]}if(!ai.support.style&&A&&c==="style"){if(F){s.style.cssText=""+G}return s.style.cssText}F&&s.setAttribute(c,""+G);s=!ai.support.hrefNormalized&&A&&w?s.getAttribute(c,2):s.getAttribute(c);return s===null?M:s}return ai.style(s,c,G)}});var aA=/\.(.*)$/,r=function(c){return c.replace(/[^\w\s\.\|`]/g,function(s){return"\\"+s})};ai.event={add:function(P,O,L,J){if(!(P.nodeType===3||P.nodeType===8)){if(P.setInterval&&P!==aP&&!P.frameElement){P=aP}var K,F;if(L.handler){K=L;L=K.handler}if(!L.guid){L.guid=ai.guid++}if(F=ai.data(P)){var G=F.events=F.events||{},s=F.handle;if(!s){F.handle=s=function(){return typeof ai!=="undefined"&&!ai.event.triggered?ai.event.handle.apply(s.elem,arguments):M}}s.elem=P;O=O.split(" ");for(var A,w=0,c;A=O[w++];){F=K?ai.extend({},K):{handler:L,data:J};if(A.indexOf(".")>-1){c=A.split(".");A=c.shift();F.namespace=c.slice(0).sort().join(".")}else{c=[];F.namespace=""}F.type=A;F.guid=L.guid;var Q=G[A],N=ai.event.special[A]||{};if(!Q){Q=G[A]=[];if(!N.setup||N.setup.call(P,J,c,s)===false){if(P.addEventListener){P.addEventListener(A,s,false)}else{P.attachEvent&&P.attachEvent("on"+A,s)}}}if(N.add){N.add.call(P,F);if(!F.handler.guid){F.handler.guid=L.guid}}Q.push(F);ai.event.global[A]=true}P=null}}},global:{},remove:function(R,Q,O,L){if(!(R.nodeType===3||R.nodeType===8)){var N,J=0,K,A,G,F,c,T,P=ai.data(R),s=P&&P.events;if(P&&s){if(Q&&Q.type){O=Q.handler;Q=Q.type}if(!Q||typeof Q==="string"&&Q.charAt(0)==="."){Q=Q||"";for(N in s){ai.event.remove(R,N+Q)}}else{for(Q=Q.split(" ");N=Q[J++];){F=N;K=N.indexOf(".")<0;A=[];if(!K){A=N.split(".");N=A.shift();G=new RegExp("(^|\\.)"+ai.map(A.slice(0).sort(),r).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(c=s[N]){if(O){F=ai.event.special[N]||{};for(w=L||0;w<c.length;w++){T=c[w];if(O.guid===T.guid){if(K||G.test(T.namespace)){L==null&&c.splice(w--,1);F.remove&&F.remove.call(R,T)}if(L!=null){break}}}if(c.length===0||L!=null&&c.length===1){if(!F.teardown||F.teardown.call(R,A)===false){aH(R,N,P.handle)}delete s[N]}}else{for(var w=0;w<c.length;w++){T=c[w];if(K||G.test(T.namespace)){ai.event.remove(R,F,T.handler,w);c.splice(w--,1)}}}}}if(ai.isEmptyObject(s)){if(Q=P.handle){Q.elem=null}delete P.events;delete P.handle;ai.isEmptyObject(P)&&ai.removeData(R)}}}}},trigger:function(N,L,K,G){var J=N.type||N;if(!G){N=typeof N==="object"?N[aI]?N:ai.extend(ai.Event(J),N):ai.Event(J);if(J.indexOf("!")>=0){N.type=J=J.slice(0,-1);N.exclusive=true}if(!K){N.stopPropagation();ai.event.global[J]&&ai.each(ai.cache,function(){this.events&&this.events[J]&&ai.event.trigger(N,L,this.handle.elem)})}if(!K||K.nodeType===3||K.nodeType===8){return M}N.result=M;N.target=K;L=ai.makeArray(L);L.unshift(N)}N.currentTarget=K;(G=ai.data(K,"handle"))&&G.apply(K,L);G=K.parentNode||K.ownerDocument;try{if(!(K&&K.nodeName&&ai.noData[K.nodeName.toLowerCase()])){if(K["on"+J]&&K["on"+J].apply(K,L)===false){N.result=false}}}catch(A){}if(!N.isPropagationStopped()&&G){ai.event.trigger(N,L,G,true)}else{if(!N.isDefaultPrevented()){G=N.target;var F,c=ai.nodeName(G,"a")&&J==="click",w=ai.event.special[J]||{};if((!w._default||w._default.call(K,N)===false)&&!c&&!(G&&G.nodeName&&ai.noData[G.nodeName.toLowerCase()])){try{if(G[J]){if(F=G["on"+J]){G["on"+J]=null}ai.event.triggered=true;G[J]()}}catch(s){}if(F){G["on"+J]=F}ai.event.triggered=false}}}},handle:function(s){var c,J,F,G;s=arguments[0]=ai.event.fix(s||aP.event);s.currentTarget=this;c=s.type.indexOf(".")<0&&!s.exclusive;if(!c){J=s.type.split(".");s.type=J.shift();F=new RegExp("(^|\\.)"+J.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}G=ai.data(this,"events");J=G[s.type];if(G&&J){J=J.slice(0);G=0;for(var w=J.length;G<w;G++){var A=J[G];if(c||F.test(A.namespace)){s.handler=A.handler;s.data=A.data;s.handleObj=A;A=A.handler.apply(this,arguments);if(A!==M){s.result=A;if(A===false){s.preventDefault();s.stopPropagation()}}if(s.isImmediatePropagationStopped()){break}}}}return s.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(s){if(s[aI]){return s}var c=s;s=ai.Event(c);for(var A=this.props.length,w;A;){w=this.props[--A];s[w]=c[w]}if(!s.target){s.target=s.srcElement||S}if(s.target.nodeType===3){s.target=s.target.parentNode}if(!s.relatedTarget&&s.fromElement){s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement}if(s.pageX==null&&s.clientX!=null){c=S.documentElement;A=S.body;s.pageX=s.clientX+(c&&c.scrollLeft||A&&A.scrollLeft||0)-(c&&c.clientLeft||A&&A.clientLeft||0);s.pageY=s.clientY+(c&&c.scrollTop||A&&A.scrollTop||0)-(c&&c.clientTop||A&&A.clientTop||0)}if(!s.which&&(s.charCode||s.charCode===0?s.charCode:s.keyCode)){s.which=s.charCode||s.keyCode}if(!s.metaKey&&s.ctrlKey){s.metaKey=s.ctrlKey}if(!s.which&&s.button!==M){s.which=s.button&1?1:s.button&2?3:s.button&4?2:0}return s},guid:100000000,proxy:ai.proxy,special:{ready:{setup:ai.bindReady,teardown:ai.noop},live:{add:function(c){ai.event.add(this,c.origType,ai.extend({},c,{handler:ah}))},remove:function(s){var c=true,w=s.origType.replace(aA,"");ai.each(ai.data(this,"events").live||[],function(){if(w===this.origType.replace(aA,"")){return c=false}});c&&ai.event.remove(this,s.origType,ah)}},beforeunload:{setup:function(s,c,w){if(this.setInterval){this.onbeforeunload=w}return false},teardown:function(s,c){if(this.onbeforeunload===c){this.onbeforeunload=null}}}}};var aH=S.removeEventListener?function(s,c,w){s.removeEventListener(c,w,false)}:function(s,c,w){s.detachEvent("on"+c,w)};ai.Event=function(c){if(!this.preventDefault){return new ai.Event(c)}if(c&&c.type){this.originalEvent=c;this.type=c.type}else{this.type=c}this.timeStamp=aG();this[aI]=true};ai.Event.prototype={preventDefault:function(){this.isDefaultPrevented=an;var c=this.originalEvent;if(c){c.preventDefault&&c.preventDefault();c.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=an;var c=this.originalEvent;if(c){c.stopPropagation&&c.stopPropagation();c.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=an;this.stopPropagation()},isDefaultPrevented:ap,isPropagationStopped:ap,isImmediatePropagationStopped:ap};var af=function(s){var c=s.relatedTarget;try{for(;c&&c!==this;){c=c.parentNode}if(c!==this){s.type=s.data;ai.event.handle.apply(this,arguments)}}catch(w){}},y=function(c){c.type=c.data;ai.event.handle.apply(this,arguments)};ai.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(s,c){ai.event.special[s]={setup:function(w){ai.event.add(this,c,w&&w.selector?y:af,s)},teardown:function(w){ai.event.remove(this,c,w&&w.selector?y:af)}}});if(!ai.support.submitBubbles){ai.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){ai.event.add(this,"click.specialSubmit",function(s){var c=s.target,w=c.type;if((w==="submit"||w==="image")&&ai(c).closest("form").length){return aL("submit",this,arguments)}});ai.event.add(this,"keypress.specialSubmit",function(s){var c=s.target,w=c.type;if((w==="text"||w==="password")&&ai(c).closest("form").length&&s.keyCode===13){return aL("submit",this,arguments)}})}else{return false}},teardown:function(){ai.event.remove(this,".specialSubmit")}}}if(!ai.support.changeBubbles){var u=/textarea|input|select/i,g,j=function(s){var c=s.type,w=s.value;if(c==="radio"||c==="checkbox"){w=s.checked}else{if(c==="select-multiple"){w=s.selectedIndex>-1?ai.map(s.options,function(A){return A.selected}).join("-"):""}else{if(s.nodeName.toLowerCase()==="select"){w=s.selectedIndex}}}return w},be=function(s,c){var F=s.target,w,A;if(!(!u.test(F.nodeName)||F.readOnly)){w=ai.data(F,"_change_data");A=j(F);if(s.type!=="focusout"||F.type!=="radio"){ai.data(F,"_change_data",A)}if(!(w===M||A===w)){if(w!=null||A){s.type="change";return ai.event.trigger(s,c,F)}}}};ai.event.special.change={filters:{focusout:be,click:function(s){var c=s.target,w=c.type;if(w==="radio"||w==="checkbox"||c.nodeName.toLowerCase()==="select"){return be.call(this,s)}},keydown:function(s){var c=s.target,w=c.type;if(s.keyCode===13&&c.nodeName.toLowerCase()!=="textarea"||s.keyCode===32&&(w==="checkbox"||w==="radio")||w==="select-multiple"){return be.call(this,s)}},beforeactivate:function(c){c=c.target;ai.data(c,"_change_data",j(c))}},setup:function(){if(this.type==="file"){return false}for(var c in g){ai.event.add(this,c+".specialChange",g[c])}return u.test(this.nodeName)},teardown:function(){ai.event.remove(this,".specialChange");return u.test(this.nodeName)}};g=ai.event.special.change.filters}S.addEventListener&&ai.each({focus:"focusin",blur:"focusout"},function(s,c){function w(A){A=ai.event.fix(A);A.type=c;return ai.event.handle.call(this,A)}ai.event.special[c]={setup:function(){this.addEventListener(s,w,true)},teardown:function(){this.removeEventListener(s,w,true)}}});ai.each(["bind","one"],function(s,c){ai.fn[c]=function(K,F,G){if(typeof K==="object"){for(var w in K){this[c](w,F,K[w],G)}return this}if(ai.isFunction(F)){G=F;F=M}var A=c==="one"?ai.proxy(G,function(L){ai(this).unbind(L,A);return G.apply(this,arguments)}):G;if(K==="unload"&&c!=="one"){this.one(K,F,G)}else{w=0;for(var J=this.length;w<J;w++){ai.event.add(this[w],K,A,F)}}return this}});ai.fn.extend({unbind:function(s,c){if(typeof s==="object"&&!s.preventDefault){for(var A in s){this.unbind(A,s[A])}}else{A=0;for(var w=this.length;A<w;A++){ai.event.remove(this[A],s,c)}}return this},delegate:function(s,c,A,w){return this.live(c,A,w,s)},undelegate:function(s,c,w){return arguments.length===0?this.unbind("live"):this.die(c,null,w,s)},trigger:function(s,c){return this.each(function(){ai.event.trigger(s,c,this)})},triggerHandler:function(s,c){if(this[0]){s=ai.Event(s);s.preventDefault();s.stopPropagation();ai.event.trigger(s,c,this[0]);return s.result}},toggle:function(s){for(var c=arguments,w=1;w<c.length;){ai.proxy(s,c[w++])}return this.click(ai.proxy(s,function(A){var F=(ai.data(this,"lastToggle"+s.guid)||0)%w;ai.data(this,"lastToggle"+s.guid,F+1);A.preventDefault();return c[F].apply(this,arguments)||false}))},hover:function(s,c){return this.mouseenter(s).mouseleave(c||s)}});var bi={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};ai.each(["live","die"],function(s,c){ai.fn[c]=function(O,L,N,J){var K,A=0,G,F,w=J||this.selector,P=J?this:ai(this.context);if(ai.isFunction(L)){N=L;L=M}for(O=(O||"").split(" ");(K=O[A++])!=null;){J=aA.exec(K);G="";if(J){G=J[0];K=K.replace(aA,"")}if(K==="hover"){O.push("mouseenter"+G,"mouseleave"+G)}else{F=K;if(K==="focus"||K==="blur"){O.push(bi[K]+G);K+=G}else{K=(bi[K]||K)+G}c==="live"?P.each(function(){ai.event.add(this,B(K,w),{data:L,selector:w,handler:N,origType:K,origHandler:N,preType:F})}):P.unbind(B(K,w),N)}}return this}});ai.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".split(" "),function(s,c){ai.fn[c]=function(w){return w?this.bind(c,w):this.trigger(c)};if(ai.attrFn){ai.attrFn[c]=true}});aP.attachEvent&&!aP.addEventListener&&aP.attachEvent("onunload",function(){for(var s in ai.cache){if(ai.cache[s].handle){try{ai.event.remove(ai.cache[s].handle.elem)}catch(c){}}}});(function(){function W(ab){for(var aa="",Z,Y=0;ab[Y];Y++){Z=ab[Y];if(Z.nodeType===3||Z.nodeType===4){aa+=Z.nodeValue}else{if(Z.nodeType!==8){aa+=W(Z.childNodes)}}}return aa}function V(bb,ba,ab,aa,Y,Z){Y=0;for(var bn=aa.length;Y<bn;Y++){var bo=aa[Y];if(bo){bo=bo[bb];for(var bm=false;bo;){if(bo.sizcache===ab){bm=aa[bo.sizset];break}if(bo.nodeType===1&&!Z){bo.sizcache=ab;bo.sizset=Y}if(bo.nodeName.toLowerCase()===ba){bm=bo;break}bo=bo[bb]}aa[Y]=bm}}}function T(bb,ba,ab,aa,Y,Z){Y=0;for(var bn=aa.length;Y<bn;Y++){var bo=aa[Y];if(bo){bo=bo[bb];for(var bm=false;bo;){if(bo.sizcache===ab){bm=aa[bo.sizset];break}if(bo.nodeType===1){if(!Z){bo.sizcache=ab;bo.sizset=Y}if(typeof ba!=="string"){if(bo===ba){bm=true;break}}else{if(N.filter(ba,[bo]).length>0){bm=bo;break}}}bo=bo[bb]}aa[Y]=bm}}}var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,R=0,O=Object.prototype.toString,P=false,K=true;[0,0].sort(function(){K=false;return 0});var N=function(bn,bm,ba,ab){ba=ba||[];var Z=bm=bm||S;if(bm.nodeType!==1&&bm.nodeType!==9){return[]}if(!bn||typeof bn!=="string"){return ba}for(var aa=[],bs,bt,bp,bb,br=true,bo=s(bm),bq=bn;(Q.exec(""),bs=Q.exec(bq))!==null;){bq=bs[3];aa.push(bs[1]);if(bs[2]){bb=bs[3];break}}if(aa.length>1&&G.exec(bn)){if(aa.length===2&&L.relative[aa[0]]){bt=X(aa[0]+aa[1],bm)}else{for(bt=L.relative[aa[0]]?[bm]:N(aa.shift(),bm);aa.length;){bn=aa.shift();if(L.relative[bn]){bn+=aa.shift()}bt=X(bn,bt)}}}else{if(!ab&&aa.length>1&&bm.nodeType===9&&!bo&&L.match.ID.test(aa[0])&&!L.match.ID.test(aa[aa.length-1])){bs=N.find(aa.shift(),bm,bo);bm=bs.expr?N.filter(bs.expr,bs.set)[0]:bs.set[0]}if(bm){bs=ab?{expr:aa.pop(),set:c(ab)}:N.find(aa.pop(),aa.length===1&&(aa[0]==="~"||aa[0]==="+")&&bm.parentNode?bm.parentNode:bm,bo);bt=bs.expr?N.filter(bs.expr,bs.set):bs.set;if(aa.length>0){bp=c(bt)}else{br=false}for(;aa.length;){var Y=aa.pop();bs=Y;if(L.relative[Y]){bs=aa.pop()}else{Y=""}if(bs==null){bs=bm}L.relative[Y](bp,bs,bo)}}else{bp=[]}}bp||(bp=bt);bp||N.error(Y||bn);if(O.call(bp)==="[object Array]"){if(br){if(bm&&bm.nodeType===1){for(bn=0;bp[bn]!=null;bn++){if(bp[bn]&&(bp[bn]===true||bp[bn].nodeType===1&&A(bm,bp[bn]))){ba.push(bt[bn])}}}else{for(bn=0;bp[bn]!=null;bn++){bp[bn]&&bp[bn].nodeType===1&&ba.push(bt[bn])}}}else{ba.push.apply(ba,bp)}}else{c(bp,ba)}if(bb){N(bb,Z,ba,ab);N.uniqueSort(ba)}return ba};N.uniqueSort=function(Z){if(J){P=K;Z.sort(J);if(P){for(var Y=1;Y<Z.length;Y++){Z[Y]===Z[Y-1]&&Z.splice(Y--,1)}}}return Z};N.matches=function(Z,Y){return N(Z,null,null,Y)};N.find=function(bb,ba,ab){var aa,Y;if(!bb){return[]}for(var Z=0,bn=L.order.length;Z<bn;Z++){var bo=L.order[Z];if(Y=L.leftMatch[bo].exec(bb)){var bm=Y[1];Y.splice(1,1);if(bm.substr(bm.length-1)!=="\\"){Y[1]=(Y[1]||"").replace(/\\/g,"");aa=L.find[bo](Y,ba,ab);if(aa!=null){bb=bb.replace(L.match[bo],"");break}}}}aa||(aa=ba.getElementsByTagName("*"));return{set:aa,expr:bb}};N.filter=function(bo,bn,bb,ab){for(var Z=bo,aa=[],bu=bn,bv,br,bm=bn&&bn[0]&&s(bn[0]);bo&&bn.length;){for(var bt in L.filter){if((bv=L.leftMatch[bt].exec(bo))!=null&&bv[2]){var bp=L.filter[bt],bs,Y;Y=bv[1];br=false;bv.splice(1,1);if(Y.substr(Y.length-1)!=="\\"){if(bu===aa){aa=[]}if(L.preFilter[bt]){if(bv=L.preFilter[bt](bv,bu,bb,aa,ab,bm)){if(bv===true){continue}}else{br=bs=true}}if(bv){for(var ba=0;(Y=bu[ba])!=null;ba++){if(Y){bs=bp(Y,bv,ba,bu);var bq=ab^!!bs;if(bb&&bs!=null){if(bq){br=true}else{bu[ba]=false}}else{if(bq){aa.push(Y);br=true}}}}}if(bs!==M){bb||(bu=aa);bo=bo.replace(L.match[bt],"");if(!br){return[]}break}}}}if(bo===Z){if(br==null){N.error(bo)}else{break}}Z=bo}return bu};N.error=function(Y){throw"Syntax error, unrecognized expression: "+Y};var L=N.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(Y){return Y.getAttribute("href")}},relative:{"+":function(ab,aa){var Z=typeof aa==="string",Y=Z&&!/\W/.test(aa);Z=Z&&!Y;if(Y){aa=aa.toLowerCase()}Y=0;for(var ba=ab.length,bb;Y<ba;Y++){if(bb=ab[Y]){for(;(bb=bb.previousSibling)&&bb.nodeType!==1;){}ab[Y]=Z||bb&&bb.nodeName.toLowerCase()===aa?bb||false:bb===aa}}Z&&N.filter(aa,ab,true)},">":function(ab,aa){var Z=typeof aa==="string";if(Z&&!/\W/.test(aa)){aa=aa.toLowerCase();for(var Y=0,ba=ab.length;Y<ba;Y++){var bb=ab[Y];if(bb){Z=bb.parentNode;ab[Y]=Z.nodeName.toLowerCase()===aa?Z:false}}}else{Y=0;for(ba=ab.length;Y<ba;Y++){if(bb=ab[Y]){ab[Y]=Z?bb.parentNode:bb.parentNode===aa}}Z&&N.filter(aa,ab,true)}},"":function(ab,aa,Z){var Y=R++,ba=T;if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("parentNode",aa,Y,ab,bb,Z)},"~":function(ab,aa,Z){var Y=R++,ba=T;if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("previousSibling",aa,Y,ab,bb,Z)}},find:{ID:function(aa,Z,Y){if(typeof Z.getElementById!=="undefined"&&!Y){return(aa=Z.getElementById(aa[1]))?[aa]:[]}},NAME:function(ab,aa){if(typeof aa.getElementsByName!=="undefined"){var Z=[];aa=aa.getElementsByName(ab[1]);for(var Y=0,ba=aa.length;Y<ba;Y++){aa[Y].getAttribute("name")===ab[1]&&Z.push(aa[Y])}return Z.length===0?null:Z}},TAG:function(Z,Y){return Y.getElementsByTagName(Z[1])}},preFilter:{CLASS:function(ba,ab,Z,Y,bb,bm){ba=" "+ba[1].replace(/\\/g,"")+" ";if(bm){return ba}bm=0;for(var aa;(aa=ab[bm])!=null;bm++){if(aa){if(bb^(aa.className&&(" "+aa.className+" ").replace(/[\t\n]/g," ").indexOf(ba)>=0)){Z||Y.push(aa)}else{if(Z){ab[bm]=false}}}}return false},ID:function(Y){return Y[1].replace(/\\/g,"")},TAG:function(Y){return Y[1].toLowerCase()},CHILD:function(Z){if(Z[1]==="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Z[2]==="even"&&"2n"||Z[2]==="odd"&&"2n+1"||!/\D/.test(Z[2])&&"0n+"+Z[2]||Z[2]);Z[2]=Y[1]+(Y[2]||1)-0;Z[3]=Y[3]-0}Z[0]=R++;return Z},ATTR:function(ab,aa,Z,Y,ba,bb){aa=ab[1].replace(/\\/g,"");if(!bb&&L.attrMap[aa]){ab[1]=L.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,aa,Z,Y,ba){if(ab[1]==="not"){if((Q.exec(ab[3])||"").length>1||/^\w/.test(ab[3])){ab[3]=N(ab[3],null,null,aa)}else{ab=N.filter(ab[3],aa,Z,true^ba);Z||Y.push.apply(Y,ab);return false}}else{if(L.match.POS.test(ab[0])||L.match.CHILD.test(ab[0])){return true}}return ab},POS:function(Y){Y.unshift(true);return Y}},filters:{enabled:function(Y){return Y.disabled===false&&Y.type!=="hidden"},disabled:function(Y){return Y.disabled===true},checked:function(Y){return Y.checked===true},selected:function(Y){return Y.selected===true},parent:function(Y){return !!Y.firstChild},empty:function(Y){return !Y.firstChild},has:function(aa,Z,Y){return !!N(Y[3],aa).length},header:function(Y){return/h\d/i.test(Y.nodeName)},text:function(Y){return"text"===Y.type},radio:function(Y){return"radio"===Y.type},checkbox:function(Y){return"checkbox"===Y.type},file:function(Y){return"file"===Y.type},password:function(Y){return"password"===Y.type},submit:function(Y){return"submit"===Y.type},image:function(Y){return"image"===Y.type},reset:function(Y){return"reset"===Y.type},button:function(Y){return"button"===Y.type||Y.nodeName.toLowerCase()==="button"},input:function(Y){return/input|select|textarea|button/i.test(Y.nodeName)}},setFilters:{first:function(Z,Y){return Y===0},last:function(ab,aa,Z,Y){return aa===Y.length-1},even:function(Z,Y){return Y%2===0},odd:function(Z,Y){return Y%2===1},lt:function(aa,Z,Y){return Z<Y[3]-0},gt:function(aa,Z,Y){return Z>Y[3]-0},nth:function(aa,Z,Y){return Y[3]-0===Z},eq:function(aa,Z,Y){return Y[3]-0===Z}},filter:{PSEUDO:function(ab,aa,Z,Y){var ba=aa[1],bb=L.filters[ba];if(bb){return bb(ab,Z,aa,Y)}else{if(ba==="contains"){return(ab.textContent||ab.innerText||W([ab])||"").indexOf(aa[3])>=0}else{if(ba==="not"){aa=aa[3];Z=0;for(Y=aa.length;Z<Y;Z++){if(aa[Z]===ab){return false}}return true}else{N.error("Syntax error, unrecognized expression: "+ba)}}}},CHILD:function(ba,ab){var Z=ab[1],Y=ba;switch(Z){case"only":case"first":for(;Y=Y.previousSibling;){if(Y.nodeType===1){return false}}if(Z==="first"){return true}Y=ba;case"last":for(;Y=Y.nextSibling;){if(Y.nodeType===1){return false}}return true;case"nth":Z=ab[2];var bb=ab[3];if(Z===1&&bb===0){return true}ab=ab[0];var bm=ba.parentNode;if(bm&&(bm.sizcache!==ab||!ba.nodeIndex)){var aa=0;for(Y=bm.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++aa}}bm.sizcache=ab}ba=ba.nodeIndex-bb;return Z===0?ba===0:ba%Z===0&&ba/Z>=0}},ID:function(Z,Y){return Z.nodeType===1&&Z.getAttribute("id")===Y},TAG:function(Z,Y){return Y==="*"&&Z.nodeType===1||Z.nodeName.toLowerCase()===Y},CLASS:function(Z,Y){return(" "+(Z.className||Z.getAttribute("class"))+" ").indexOf(Y)>-1},ATTR:function(ab,aa){var Z=aa[1];ab=L.attrHandle[Z]?L.attrHandle[Z](ab):ab[Z]!=null?ab[Z]:ab.getAttribute(Z);Z=ab+"";var Y=aa[2];aa=aa[4];return ab==null?Y==="!=":Y==="="?Z===aa:Y==="*="?Z.indexOf(aa)>=0:Y==="~="?(" "+Z+" ").indexOf(aa)>=0:!aa?Z&&ab!==false:Y==="!="?Z!==aa:Y==="^="?Z.indexOf(aa)===0:Y==="$="?Z.substr(Z.length-aa.length)===aa:Y==="|="?Z===aa||Z.substr(0,aa.length+1)===aa+"-":false},POS:function(ab,aa,Z,Y){var ba=L.setFilters[aa[2]];if(ba){return ba(ab,Z,aa,Y)}}}},G=L.match.POS;for(var w in L.match){L.match[w]=new RegExp(L.match[w].source+/(?![^\[]*\])(?![^\(]*\))/.source);L.leftMatch[w]=new RegExp(/(^(?:.|\r|\n)*?)/.source+L.match[w].source.replace(/\\(\d+)/g,function(Z,Y){return"\\"+(Y-0+1)}))}var c=function(Z,Y){Z=Array.prototype.slice.call(Z,0);if(Y){Y.push.apply(Y,Z);return Y}return Z};try{Array.prototype.slice.call(S.documentElement.childNodes,0)}catch(F){c=function(ab,aa){aa=aa||[];if(O.call(ab)==="[object Array]"){Array.prototype.push.apply(aa,ab)}else{if(typeof ab.length==="number"){for(var Z=0,Y=ab.length;Z<Y;Z++){aa.push(ab[Z])}}else{for(Z=0;ab[Z];Z++){aa.push(ab[Z])}}}return aa}}var J;if(S.documentElement.compareDocumentPosition){J=function(Z,Y){if(!Z.compareDocumentPosition||!Y.compareDocumentPosition){if(Z==Y){P=true}return Z.compareDocumentPosition?-1:1}Z=Z.compareDocumentPosition(Y)&4?-1:Z===Y?0:1;if(Z===0){P=true}return Z}}else{if("sourceIndex" in S.documentElement){J=function(Z,Y){if(!Z.sourceIndex||!Y.sourceIndex){if(Z==Y){P=true}return Z.sourceIndex?-1:1}Z=Z.sourceIndex-Y.sourceIndex;if(Z===0){P=true}return Z}}else{if(S.createRange){J=function(ab,aa){if(!ab.ownerDocument||!aa.ownerDocument){if(ab==aa){P=true}return ab.ownerDocument?-1:1}var Z=ab.ownerDocument.createRange(),Y=aa.ownerDocument.createRange();Z.setStart(ab,0);Z.setEnd(ab,0);Y.setStart(aa,0);Y.setEnd(aa,0);ab=Z.compareBoundaryPoints(Range.START_TO_END,Y);if(ab===0){P=true}return ab}}}}(function(){var aa=S.createElement("div"),Z="script"+(new Date).getTime();aa.innerHTML="<a name='"+Z+"'/>";var Y=S.documentElement;Y.insertBefore(aa,Y.firstChild);if(S.getElementById(Z)){L.find.ID=function(ab,ba,bb){if(typeof ba.getElementById!=="undefined"&&!bb){return(ba=ba.getElementById(ab[1]))?ba.id===ab[1]||typeof ba.getAttributeNode!=="undefined"&&ba.getAttributeNode("id").nodeValue===ab[1]?[ba]:M:[]}};L.filter.ID=function(ab,ba){var bb=typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id");return ab.nodeType===1&&bb&&bb.nodeValue===ba}}Y.removeChild(aa);Y=aa=null})();(function(){var Y=S.createElement("div");Y.appendChild(S.createComment(""));if(Y.getElementsByTagName("*").length>0){L.find.TAG=function(ab,aa){aa=aa.getElementsByTagName(ab[1]);if(ab[1]==="*"){ab=[];for(var Z=0;aa[Z];Z++){aa[Z].nodeType===1&&ab.push(aa[Z])}aa=ab}return aa}}Y.innerHTML="<a href='#'></a>";if(Y.firstChild&&typeof Y.firstChild.getAttribute!=="undefined"&&Y.firstChild.getAttribute("href")!=="#"){L.attrHandle.href=function(Z){return Z.getAttribute("href",2)}}Y=null})();S.querySelectorAll&&function(){var aa=N,Z=S.createElement("div");Z.innerHTML="<p class='TEST'></p>";if(!(Z.querySelectorAll&&Z.querySelectorAll(".TEST").length===0)){N=function(ab,bm,bn,ba){bm=bm||S;if(!ba&&bm.nodeType===9&&!s(bm)){try{return c(bm.querySelectorAll(ab),bn)}catch(bb){}}return aa(ab,bm,bn,ba)};for(var Y in aa){N[Y]=aa[Y]}Z=null}}();(function(){var Y=S.createElement("div");Y.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!Y.getElementsByClassName||Y.getElementsByClassName("e").length===0)){Y.lastChild.className="e";if(Y.getElementsByClassName("e").length!==1){L.order.splice(1,0,"CLASS");L.find.CLASS=function(ab,aa,Z){if(typeof aa.getElementsByClassName!=="undefined"&&!Z){return aa.getElementsByClassName(ab[1])}};Y=null}}})();var A=S.compareDocumentPosition?function(Z,Y){return !!(Z.compareDocumentPosition(Y)&16)}:function(Z,Y){return Z!==Y&&(Z.contains?Z.contains(Y):true)},s=function(Y){return(Y=(Y?Y.ownerDocument||Y:0).documentElement)?Y.nodeName!=="HTML":false},X=function(ab,aa){var Z=[],Y="",ba;for(aa=aa.nodeType?[aa]:aa;ba=L.match.PSEUDO.exec(ab);){Y+=ba[0];ab=ab.replace(L.match.PSEUDO,"")}ab=L.relative[ab]?ab+"*":ab;ba=0;for(var bb=aa.length;ba<bb;ba++){N(ab,aa[ba],Z)}return N.filter(Y,Z)};ai.find=N;ai.expr=N.selectors;ai.expr[":"]=ai.expr.filters;ai.unique=N.uniqueSort;ai.text=W;ai.isXMLDoc=s;ai.contains=A})();var f=/Until$/,bc=/^(?:parents|prevUntil|prevAll)/,aX=/,/;av=Array.prototype.slice;var aM=function(s,c,A){if(ai.isFunction(c)){return ai.grep(s,function(G,F){return !!c.call(G,F,G)===A})}else{if(c.nodeType){return ai.grep(s,function(F){return F===c===A})}else{if(typeof c==="string"){var w=ai.grep(s,function(F){return F.nodeType===1});if(aU.test(c)){return ai.filter(c,w,!A)}else{c=ai.filter(c,w)}}}}return ai.grep(s,function(F){return ai.inArray(F,c)>=0===A})};ai.fn.extend({find:function(s){for(var c=this.pushStack("","find",s),J=0,F=0,G=this.length;F<G;F++){J=c.length;ai.find(s,this[F],c);if(F>0){for(var w=J;w<c.length;w++){for(var A=0;A<J;A++){if(c[A]===c[w]){c.splice(w--,1);break}}}}}return c},has:function(s){var c=ai(s);return this.filter(function(){for(var A=0,w=c.length;A<w;A++){if(ai.contains(this,c[A])){return true}}})},not:function(c){return this.pushStack(aM(this,c,false),"not",c)},filter:function(c){return this.pushStack(aM(this,c,true),"filter",c)},is:function(c){return !!c&&ai.filter(c,this).length>0},closest:function(L,K){if(ai.isArray(L)){var J=[],F=this[0],G,w={},A;if(F&&L.length){G=0;for(var c=L.length;G<c;G++){A=L[G];w[A]||(w[A]=ai.expr.match.POS.test(A)?ai(A,K||this.context):A)}for(;F&&F.ownerDocument&&F!==K;){for(A in w){G=w[A];if(G.jquery?G.index(F)>-1:ai(F).is(G)){J.push({selector:A,elem:F});delete w[A]}}F=F.parentNode}}return J}var s=ai.expr.match.POS.test(L)?ai(L,K||this.context):null;return this.map(function(O,N){for(;N&&N.ownerDocument&&N!==K;){if(s?s.index(N)>-1:ai(N).is(L)){return N}N=N.parentNode}return null})},index:function(c){if(!c||typeof c==="string"){return ai.inArray(this[0],c?ai(c):this.parent().children())}return ai.inArray(c.jquery?c[0]:c,this)},add:function(s,c){s=typeof s==="string"?ai(s,c||this.context):ai.makeArray(s);c=ai.merge(this.get(),s);return this.pushStack(l(s[0])||l(c[0])?c:ai.unique(c))},andSelf:function(){return this.add(this.prevObject)}});ai.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return ai.dir(c,"parentNode")},parentsUntil:function(s,c,w){return ai.dir(s,"parentNode",w)},next:function(c){return ai.nth(c,2,"nextSibling")},prev:function(c){return ai.nth(c,2,"previousSibling")},nextAll:function(c){return ai.dir(c,"nextSibling")},prevAll:function(c){return ai.dir(c,"previousSibling")},nextUntil:function(s,c,w){return ai.dir(s,"nextSibling",w)},prevUntil:function(s,c,w){return ai.dir(s,"previousSibling",w)},siblings:function(c){return ai.sibling(c.parentNode.firstChild,c)},children:function(c){return ai.sibling(c.firstChild)},contents:function(c){return ai.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:ai.makeArray(c.childNodes)}},function(s,c){ai.fn[s]=function(F,w){var A=ai.map(this,c,F);f.test(s)||(w=F);if(w&&typeof w==="string"){A=ai.filter(w,A)}A=this.length>1?ai.unique(A):A;if((this.length>1||aX.test(w))&&bc.test(s)){A=A.reverse()}return this.pushStack(A,s,av.call(arguments).join(","))}});ai.extend({filter:function(s,c,w){if(w){s=":not("+s+")"}return ai.find.matches(s,c)},dir:function(s,c,A){var w=[];for(s=s[c];s&&s.nodeType!==9&&(A===M||s.nodeType!==1||!ai(s).is(A));){s.nodeType===1&&w.push(s);s=s[c]}return w},nth:function(s,c,A){c=c||1;for(var w=0;s;s=s[A]){if(s.nodeType===1&&++w===c){break}}return s},sibling:function(s,c){for(var w=[];s;s=s.nextSibling){s.nodeType===1&&s!==c&&w.push(s)}return w}});var aj=/ jQuery\d+="(?:\d+|null)"/g,at=/^\s+/,C=/(<([\w:]+)[^>]*?)\/>/g,aE=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,m=/<([\w:]+)/,ad=/<tbody/i,v=/<|&#?\w+;/,aQ=/<script|<object|<embed|<option|<style/i,al=/checked\s*(?:[^=]|=\s*.checked.)/i,bl=function(s,c,w){return aE.test(w)?s:c+"></"+w+">"},aK={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};aK.optgroup=aK.option;aK.tbody=aK.tfoot=aK.colgroup=aK.caption=aK.thead;aK.th=aK.td;if(!ai.support.htmlSerialize){aK._default=[1,"div<div>","</div>"]}ai.fn.extend({text:function(c){if(ai.isFunction(c)){return this.each(function(s){var w=ai(this);w.text(c.call(this,s,w.text()))})}if(typeof c!=="object"&&c!==M){return this.empty().append((this[0]&&this[0].ownerDocument||S).createTextNode(c))}return ai.text(this)},wrapAll:function(s){if(ai.isFunction(s)){return this.each(function(w){ai(this).wrapAll(s.call(this,w))})}if(this[0]){var c=ai(s,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&c.insertBefore(this[0]);c.map(function(){for(var w=this;w.firstChild&&w.firstChild.nodeType===1;){w=w.firstChild}return w}).append(this)}return this},wrapInner:function(c){if(ai.isFunction(c)){return this.each(function(s){ai(this).wrapInner(c.call(this,s))})}return this.each(function(){var s=ai(this),w=s.contents();w.length?w.wrapAll(c):s.append(c)})},wrap:function(c){return this.each(function(){ai(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){ai.nodeName(this,"body")||ai(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this)})}else{if(arguments.length){var c=ai(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this.nextSibling)})}else{if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,ai(arguments[0]).toArray());return c}}},remove:function(s,c){for(var A=0,w;(w=this[A])!=null;A++){if(!s||ai.filter(s,[w]).length){if(!c&&w.nodeType===1){ai.cleanData(w.getElementsByTagName("*"));ai.cleanData([w])}w.parentNode&&w.parentNode.removeChild(w)}}return this},empty:function(){for(var s=0,c;(c=this[s])!=null;s++){for(c.nodeType===1&&ai.cleanData(c.getElementsByTagName("*"));c.firstChild;){c.removeChild(c.firstChild)}}return this},clone:function(s){var c=this.map(function(){if(!ai.support.noCloneEvent&&!ai.isXMLDoc(this)){var A=this.outerHTML,w=this.ownerDocument;if(!A){A=w.createElement("div");A.appendChild(this.cloneNode(true));A=A.innerHTML}return ai.clean([A.replace(aj,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(at,"")],w)[0]}else{return this.cloneNode(true)}});if(s===true){bk(this,c);bk(this.find("*"),c.find("*"))}return c},html:function(s){if(s===M){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(aj,""):null}else{if(typeof s==="string"&&!aQ.test(s)&&(ai.support.leadingWhitespace||!at.test(s))&&!aK[(m.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(C,bl);try{for(var c=0,A=this.length;c<A;c++){if(this[c].nodeType===1){ai.cleanData(this[c].getElementsByTagName("*"));this[c].innerHTML=s}}}catch(w){this.empty().append(s)}}else{ai.isFunction(s)?this.each(function(J){var F=ai(this),G=F.html();F.empty().append(function(){return s.call(this,J,G)})}):this.empty().append(s)}}return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(ai.isFunction(c)){return this.each(function(s){var A=ai(this),w=A.html();A.replaceWith(c.call(this,s,w))})}if(typeof c!=="string"){c=ai(c).detach()}return this.each(function(){var s=this.nextSibling,w=this.parentNode;ai(this).remove();s?ai(s).before(c):ai(w).append(c)})}else{return this.pushStack(ai(ai.isFunction(c)?c():c),"replaceWith",c)}},detach:function(c){return this.remove(c,true)},domManip:function(O,N,L){function J(P){return ai.nodeName(P,"table")?P.getElementsByTagName("tbody")[0]||P.appendChild(P.ownerDocument.createElement("tbody")):P}var K,F,G=O[0],s=[],A;if(!ai.support.checkClone&&arguments.length===3&&typeof G==="string"&&al.test(G)){return this.each(function(){ai(this).domManip(O,N,L,true)})}if(ai.isFunction(G)){return this.each(function(P){var Q=ai(this);O[0]=G.call(this,P,N?Q.html():M);Q.domManip(O,N,L)})}if(this[0]){K=G&&G.parentNode;K=ai.support.parentNode&&K&&K.nodeType===11&&K.childNodes.length===this.length?{fragment:K}:a4(O,this,s);A=K.fragment;if(F=A.childNodes.length===1?(A=A.firstChild):A.firstChild){N=N&&ai.nodeName(F,"tr");for(var w=0,c=this.length;w<c;w++){L.call(N?J(this[w],F):this[w],w>0||K.cacheable||this.length>1?A.cloneNode(true):A)}}s.length&&ai.each(s,H)}return this}});ai.fragments={};ai.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(s,c){ai.fn[s]=function(J){var F=[];J=ai(J);var G=this.length===1&&this[0].parentNode;if(G&&G.nodeType===11&&G.childNodes.length===1&&J.length===1){J[c](this[0]);return this}else{G=0;for(var w=J.length;G<w;G++){var A=(G>0?this.clone(true):this).get();ai.fn[c].apply(ai(J[G]),A);F=F.concat(A)}return this.pushStack(F,s,J.selector)}}});ai.extend({clean:function(O,N,L,J){N=N||S;if(typeof N.createElement==="undefined"){N=N.ownerDocument||N[0]&&N[0].ownerDocument||S}for(var K=[],F=0,G;(G=O[F])!=null;F++){if(typeof G==="number"){G+=""}if(G){if(typeof G==="string"&&!v.test(G)){G=N.createTextNode(G)}else{if(typeof G==="string"){G=G.replace(C,bl);var s=(m.exec(G)||["",""])[1].toLowerCase(),A=aK[s]||aK._default,w=A[0],c=N.createElement("div");for(c.innerHTML=A[1]+G+A[2];w--;){c=c.lastChild}if(!ai.support.tbody){w=ad.test(G);s=s==="table"&&!w?c.firstChild&&c.firstChild.childNodes:A[1]==="<table>"&&!w?c.childNodes:[];for(A=s.length-1;A>=0;--A){ai.nodeName(s[A],"tbody")&&!s[A].childNodes.length&&s[A].parentNode.removeChild(s[A])}}!ai.support.leadingWhitespace&&at.test(G)&&c.insertBefore(N.createTextNode(at.exec(G)[0]),c.firstChild);G=c.childNodes}}if(G.nodeType){K.push(G)}else{K=ai.merge(K,G)}}}if(L){for(F=0;K[F];F++){if(J&&ai.nodeName(K[F],"script")&&(!K[F].type||K[F].type.toLowerCase()==="text/javascript")){J.push(K[F].parentNode?K[F].parentNode.removeChild(K[F]):K[F])}else{K[F].nodeType===1&&K.splice.apply(K,[F+1,0].concat(ai.makeArray(K[F].getElementsByTagName("script"))));L.appendChild(K[F])}}}return K},cleanData:function(L){for(var K,J,F=ai.cache,G=ai.event.special,w=ai.support.deleteExpando,A=0,c;(c=L[A])!=null;A++){if(J=c[ai.expando]){K=F[J];if(K.events){for(var s in K.events){G[s]?ai.event.remove(c,s):aH(c,s,K.handle)}}if(w){delete c[ai.expando]}else{c.removeAttribute&&c.removeAttribute(ai.expando)}delete F[J]}}}});var h=/z-?index|font-?weight|opacity|zoom|line-?height/i,a5=/alpha\([^)]*\)/,aR=/opacity=([^)]*)/,aF=/float/i,ae=/-([a-z])/ig,bg=/([A-Z])/g,a0=/^-?\d+(?:px)?$/i,aJ=/^-?\d/,ag={position:"absolute",visibility:"hidden",display:"block"},z=["Left","Right"],k=["Top","Bottom"],bj=S.defaultView&&S.defaultView.getComputedStyle,am=ai.support.cssFloat?"cssFloat":"styleFloat",x=function(s,c){return c.toUpperCase()};ai.fn.css=function(s,c){return aq(this,s,c,true,function(F,w,A){if(A===M){return ai.curCSS(F,w)}if(typeof A==="number"&&!h.test(w)){A+="px"}ai.style(F,w,A)})};ai.extend({style:function(s,c,F){if(!s||s.nodeType===3||s.nodeType===8){return M}if((c==="width"||c==="height")&&parseFloat(F)<0){F=M}var w=s.style||s,A=F!==M;if(!ai.support.opacity&&c==="opacity"){if(A){w.zoom=1;c=parseInt(F,10)+""==="NaN"?"":"alpha(opacity="+F*100+")";s=w.filter||ai.curCSS(s,"filter")||"";w.filter=a5.test(s)?s.replace(a5,c):c}return w.filter&&w.filter.indexOf("opacity=")>=0?parseFloat(aR.exec(w.filter)[1])/100+"":""}if(aF.test(c)){c=am}c=c.replace(ae,x);if(A){w[c]=F}return w[c]},css:function(s,c,J,F){if(c==="width"||c==="height"){var G,w=c==="width"?z:k;function A(){G=c==="width"?s.offsetWidth:s.offsetHeight;F!=="border"&&ai.each(w,function(){F||(G-=parseFloat(ai.curCSS(s,"padding"+this,true))||0);if(F==="margin"){G+=parseFloat(ai.curCSS(s,"margin"+this,true))||0}else{G-=parseFloat(ai.curCSS(s,"border"+this+"Width",true))||0}})}s.offsetWidth!==0?A():ai.swap(s,ag,A);return Math.max(0,Math.round(G))}return ai.curCSS(s,c,J)},curCSS:function(s,c,G){var A,F=s.style;if(!ai.support.opacity&&c==="opacity"&&s.currentStyle){A=aR.test(s.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return A===""?"1":A}if(aF.test(c)){c=am}if(!G&&F&&F[c]){A=F[c]}else{if(bj){if(aF.test(c)){c="float"}c=c.replace(bg,"-$1").toLowerCase();F=s.ownerDocument.defaultView;if(!F){return null}if(s=F.getComputedStyle(s,null)){A=s.getPropertyValue(c)}if(c==="opacity"&&A===""){A="1"}}else{if(s.currentStyle){G=c.replace(ae,x);A=s.currentStyle[c]||s.currentStyle[G];if(!a0.test(A)&&aJ.test(A)){c=F.left;var w=s.runtimeStyle.left;s.runtimeStyle.left=s.currentStyle.left;F.left=G==="fontSize"?"1em":A||0;A=F.pixelLeft+"px";F.left=c;s.runtimeStyle.left=w}}}}return A},swap:function(s,c,F){var w={};for(var A in c){w[A]=s.style[A];s.style[A]=c[A]}F.call(s);for(A in c){s.style[A]=w[A]}}});if(ai.expr&&ai.expr.filters){ai.expr.filters.hidden=function(s){var c=s.offsetWidth,A=s.offsetHeight,w=s.nodeName.toLowerCase()==="tr";return c===0&&A===0&&!w?true:c>0&&A>0&&!w?false:ai.curCSS(s,"display")==="none"};ai.expr.filters.visible=function(c){return !ai.expr.filters.hidden(c)}}var a3=aG(),aO=/<script(.|\s)*?\/script>/gi,ak=/select|textarea/i,D=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,aB=/=\?(&|$)/,i=/\?/,n=/(\?|&)_=.*?(&|$)/,a=/^(\w+:)?\/\/([^\/?#]+)/,a6=/%20/g,aS=ai.fn.load;ai.fn.extend({load:function(s,c,G){if(typeof s!=="string"){return aS.call(this,s)}else{if(!this.length){return this}}var A=s.indexOf(" ");if(A>=0){var F=s.slice(A,s.length);s=s.slice(0,A)}A="GET";if(c){if(ai.isFunction(c)){G=c;c=null}else{if(typeof c==="object"){c=ai.param(c,ai.ajaxSettings.traditional);A="POST"}}}var w=this;ai.ajax({url:s,type:A,dataType:"html",data:c,complete:function(J,K){if(K==="success"||K==="notmodified"){w.html(F?ai("<div />").append(J.responseText.replace(aO,"")).find(F):J.responseText)}G&&w.each(G,[J.responseText,K,J])}});return this},serialize:function(){return ai.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?ai.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ak.test(this.nodeName)||D.test(this.type))}).map(function(s,c){s=ai(this).val();return s==null?null:ai.isArray(s)?ai.map(s,function(w){return{name:c.name,value:w}}):{name:c.name,value:s}}).get()}});ai.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(s,c){ai.fn[c]=function(w){return this.bind(c,w)}});ai.extend({get:function(s,c,A,w){if(ai.isFunction(c)){w=w||A;A=c;c=null}return ai.ajax({type:"GET",url:s,data:c,success:A,dataType:w})},getScript:function(s,c){return ai.get(s,null,c,"script")},getJSON:function(s,c,w){return ai.get(s,c,w,"json")},post:function(s,c,A,w){if(ai.isFunction(c)){w=w||A;A=c;c={}}return ai.ajax({type:"POST",url:s,data:c,success:A,dataType:w})},ajaxSetup:function(c){ai.extend(ai.ajaxSettings,c)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:aP.XMLHttpRequest&&(aP.location.protocol!=="file:"||!aP.ActiveXObject)?function(){return new aP.XMLHttpRequest}:function(){try{return new aP.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(aa){function Z(){X.success&&X.success.call(P,K,R,s);X.global&&W("ajaxSuccess",[s,X])}function Y(){X.complete&&X.complete.call(P,s,R);X.global&&W("ajaxComplete",[s,X]);X.global&&!--ai.active&&ai.event.trigger("ajaxStop")}function W(ba,bb){(X.context?ai(X.context):ai.event).trigger(ba,bb)}var X=ai.extend(true,{},ai.ajaxSettings,aa),Q,R,K,P=aa&&aa.context||X,L=X.type.toUpperCase();if(X.data&&X.processData&&typeof X.data!=="string"){X.data=ai.param(X.data,X.traditional)}if(X.dataType==="jsonp"){if(L==="GET"){aB.test(X.url)||(X.url+=(i.test(X.url)?"&":"?")+(X.jsonp||"callback")+"=?")}else{if(!X.data||!aB.test(X.data)){X.data=(X.data?X.data+"&":"")+(X.jsonp||"callback")+"=?"}}X.dataType="json"}if(X.dataType==="json"&&(X.data&&aB.test(X.data)||aB.test(X.url))){Q=X.jsonpCallback||"jsonp"+a3++;if(X.data){X.data=(X.data+"").replace(aB,"="+Q+"$1")}X.url=X.url.replace(aB,"="+Q+"$1");X.dataType="script";aP[Q]=aP[Q]||function(ba){K=ba;Z();Y();aP[Q]=M;try{delete aP[Q]}catch(bb){}c&&c.removeChild(F)}}if(X.dataType==="script"&&X.cache===null){X.cache=false}if(X.cache===false&&L==="GET"){var G=aG(),w=X.url.replace(n,"$1_="+G+"$2");X.url=w+(w===X.url?(i.test(X.url)?"&":"?")+"_="+G:"")}if(X.data&&L==="GET"){X.url+=(i.test(X.url)?"&":"?")+X.data}X.global&&!ai.active++&&ai.event.trigger("ajaxStart");G=(G=a.exec(X.url))&&(G[1]&&G[1]!==location.protocol||G[2]!==location.host);if(X.dataType==="script"&&L==="GET"&&G){var c=S.getElementsByTagName("head")[0]||S.documentElement,F=S.createElement("script");F.src=X.url;if(X.scriptCharset){F.charset=X.scriptCharset}if(!Q){var J=false;F.onload=F.onreadystatechange=function(){if(!J&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){J=true;Z();Y();F.onload=F.onreadystatechange=null;c&&F.parentNode&&c.removeChild(F)}}}c.insertBefore(F,c.firstChild);return M}var A=false,s=X.xhr();if(s){X.username?s.open(L,X.url,X.async,X.username,X.password):s.open(L,X.url,X.async);try{if(X.data||aa&&aa.contentType){s.setRequestHeader("Content-Type",X.contentType)}if(X.ifModified){ai.lastModified[X.url]&&s.setRequestHeader("If-Modified-Since",ai.lastModified[X.url]);ai.etag[X.url]&&s.setRequestHeader("If-None-Match",ai.etag[X.url])}G||s.setRequestHeader("X-Requested-With","XMLHttpRequest");s.setRequestHeader("Accept",X.dataType&&X.accepts[X.dataType]?X.accepts[X.dataType]+", */*":X.accepts._default)}catch(ab){}if(X.beforeSend&&X.beforeSend.call(P,s,X)===false){X.global&&!--ai.active&&ai.event.trigger("ajaxStop");s.abort();return false}X.global&&W("ajaxSend",[s,X]);var V=s.onreadystatechange=function(bb){if(!s||s.readyState===0||bb==="abort"){A||Y();A=true;if(s){s.onreadystatechange=ai.noop}}else{if(!A&&s&&(s.readyState===4||bb==="timeout")){A=true;s.onreadystatechange=ai.noop;R=bb==="timeout"?"timeout":!ai.httpSuccess(s)?"error":X.ifModified&&ai.httpNotModified(s,X.url)?"notmodified":"success";var bm;if(R==="success"){try{K=ai.httpData(s,X.dataType,X)}catch(ba){R="parsererror";bm=ba}}if(R==="success"||R==="notmodified"){Q||Z()}else{ai.handleError(X,s,R,bm)}Y();bb==="timeout"&&s.abort();if(X.async){s=null}}}};try{var T=s.abort;s.abort=function(){s&&T.call(s);V("abort")}}catch(O){}X.async&&X.timeout>0&&setTimeout(function(){s&&!A&&V("timeout")},X.timeout);try{s.send(L==="POST"||L==="PUT"||L==="DELETE"?X.data:null)}catch(N){ai.handleError(X,s,null,N);Y()}X.async||V();return s}},handleError:function(s,c,A,w){if(s.error){s.error.call(s.context||s,c,A,w)}if(s.global){(s.context?ai(s.context):ai.event).trigger("ajaxError",[c,s,w])}},active:0,httpSuccess:function(s){try{return !s.status&&location.protocol==="file:"||s.status>=200&&s.status<300||s.status===304||s.status===1223||s.status===0}catch(c){}return false},httpNotModified:function(s,c){var A=s.getResponseHeader("Last-Modified"),w=s.getResponseHeader("Etag");if(A){ai.lastModified[c]=A}if(w){ai.etag[c]=w}return s.status===304||s.status===0},httpData:function(s,c,F){var w=s.getResponseHeader("content-type")||"",A=c==="xml"||!c&&w.indexOf("xml")>=0;s=A?s.responseXML:s.responseText;A&&s.documentElement.nodeName==="parsererror"&&ai.error("parsererror");if(F&&F.dataFilter){s=F.dataFilter(s,c)}if(typeof s==="string"){if(c==="json"||!c&&w.indexOf("json")>=0){s=ai.parseJSON(s)}else{if(c==="script"||!c&&w.indexOf("javascript")>=0){ai.globalEval(s)}}}return s},param:function(s,c){function G(J,K){if(ai.isArray(K)){ai.each(K,function(L,N){c||/\[\]$/.test(J)?A(J,N):G(J+"["+(typeof N==="object"||ai.isArray(N)?L:"")+"]",N)})}else{!c&&K!=null&&typeof K==="object"?ai.each(K,function(L,N){G(J+"["+L+"]",N)}):A(J,K)}}function A(J,K){K=ai.isFunction(K)?K():K;F[F.length]=encodeURIComponent(J)+"="+encodeURIComponent(K)}var F=[];if(c===M){c=ai.ajaxSettings.traditional}if(ai.isArray(s)||s.jquery){ai.each(s,function(){A(this.name,this.value)})}else{for(var w in s){G(w,s[w])}}return F.join("&").replace(a6,"+")}});var bh={},bd=/toggle|show|hide/,aY=/^([+-]=)?([\d+-.]+)(.*)$/,ar,E=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];ai.fn.extend({show:function(s,c){if(s||s===0){return this.animate(aD("show",3),s,c)}else{s=0;for(c=this.length;s<c;s++){var F=ai.data(this[s],"olddisplay");this[s].style.display=F||"";if(ai.css(this[s],"display")==="none"){F=this[s].nodeName;var w;if(bh[F]){w=bh[F]}else{var A=ai("<"+F+" />").appendTo("body");w=A.css("display");if(w==="none"){w="block"}A.remove();bh[F]=w}ai.data(this[s],"olddisplay",w)}}s=0;for(c=this.length;s<c;s++){this[s].style.display=ai.data(this[s],"olddisplay")||""}return this}},hide:function(s,c){if(s||s===0){return this.animate(aD("hide",3),s,c)}else{s=0;for(c=this.length;s<c;s++){var w=ai.data(this[s],"olddisplay");!w&&w!=="none"&&ai.data(this[s],"olddisplay",ai.css(this[s],"display"))}s=0;for(c=this.length;s<c;s++){this[s].style.display="none"}return this}},_toggle:ai.fn.toggle,toggle:function(s,c){var w=typeof s==="boolean";if(ai.isFunction(s)&&ai.isFunction(c)){this._toggle.apply(this,arguments)}else{s==null||w?this.each(function(){var A=w?s:ai(this).is(":hidden");ai(this)[A?"show":"hide"]()}):this.animate(aD("toggle",3),s,c)}return this},fadeTo:function(s,c,w){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:c},s,w)},animate:function(s,c,F,w){var A=ai.speed(c,F,w);if(ai.isEmptyObject(s)){return this.each(A.complete)}return this[A.queue===false?"each":"queue"](function(){var J=ai.extend({},A),K,L=this.nodeType===1&&ai(this).is(":hidden"),G=this;for(K in s){var N=K.replace(ae,x);if(K!==N){s[N]=s[K];delete s[K];K=N}if(s[K]==="hide"&&L||s[K]==="show"&&!L){return J.complete.call(this)}if((K==="height"||K==="width")&&this.style){J.display=ai.css(this,"display");J.overflow=this.style.overflow}if(ai.isArray(s[K])){(J.specialEasing=J.specialEasing||{})[K]=s[K][1];s[K]=s[K][0]}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=ai.extend({},s);ai.each(s,function(P,O){var T=new ai.fx(G,J,P);if(bd.test(O)){T[O==="toggle"?L?"show":"hide":O](s)}else{var R=aY.exec(O),V=T.cur(true)||0;if(R){O=parseFloat(R[2]);var Q=R[3]||"px";if(Q!=="px"){G.style[P]=(O||1)+Q;V=(O||1)/T.cur(true)*V;G.style[P]=V+Q}if(R[1]){O=(R[1]==="-="?-1:1)*O+V}T.custom(V,O,Q)}else{T.custom(V,O,"")}}});return true})},stop:function(s,c){var w=ai.timers;s&&this.queue([]);this.each(function(){for(var A=w.length-1;A>=0;A--){if(w[A].elem===this){c&&w[A](true);w.splice(A,1)}}});c||this.dequeue();return this}});ai.each({slideDown:aD("show",1),slideUp:aD("hide",1),slideToggle:aD("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(s,c){ai.fn[s]=function(A,w){return this.animate(c,A,w)}});ai.extend({speed:function(s,c,A){var w=s&&typeof s==="object"?s:{complete:A||!A&&c||ai.isFunction(s)&&s,duration:s,easing:A&&c||c&&!ai.isFunction(c)&&c};w.duration=ai.fx.off?0:typeof w.duration==="number"?w.duration:ai.fx.speeds[w.duration]||ai.fx.speeds._default;w.old=w.complete;w.complete=function(){w.queue!==false&&ai(this).dequeue();ai.isFunction(w.old)&&w.old.call(this)};return w},easing:{linear:function(s,c,A,w){return A+w*s},swing:function(s,c,A,w){return(-Math.cos(s*Math.PI)/2+0.5)*w+A}},timers:[],fx:function(s,c,w){this.options=c;this.elem=s;this.prop=w;if(!c.orig){c.orig={}}}});ai.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(ai.fx.step[this.prop]||ai.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(c){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}return(c=parseFloat(ai.css(this.elem,this.prop,c)))&&c>-10000?c:parseFloat(ai.curCSS(this.elem,this.prop))||0},custom:function(s,c,F){function w(G){return A.step(G)}this.startTime=aG();this.start=s;this.end=c;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var A=this;w.elem=this.elem;if(w()&&ai.timers.push(w)&&!ar){ar=setInterval(ai.fx.tick,13)}},show:function(){this.options.orig[this.prop]=ai.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());ai(this.elem).show()},hide:function(){this.options.orig[this.prop]=ai.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(s){var c=aG(),F=true;if(s||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var w in this.options.curAnim){if(this.options.curAnim[w]!==true){F=false}}if(F){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;s=ai.data(this.elem,"olddisplay");this.elem.style.display=s?s:this.options.display;if(ai.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&ai(this.elem).hide();if(this.options.hide||this.options.show){for(var A in this.options.curAnim){ai.style(this.elem,A,this.options.orig[A])}}this.options.complete.call(this.elem)}return false}else{A=c-this.startTime;this.state=A/this.options.duration;s=this.options.easing||(ai.easing.swing?"swing":"linear");this.pos=ai.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||s](this.state,A,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};ai.extend(ai.fx,{tick:function(){for(var s=ai.timers,c=0;c<s.length;c++){s[c]()||s.splice(c--,1)}s.length||ai.fx.stop()},stop:function(){clearInterval(ar);ar=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){ai.style(c.elem,"opacity",c.now)},_default:function(c){if(c.elem.style&&c.elem.style[c.prop]!=null){c.elem.style[c.prop]=(c.prop==="width"||c.prop==="height"?Math.max(0,c.now):c.now)+c.unit}else{c.elem[c.prop]=c.now}}}});if(ai.expr&&ai.expr.filters){ai.expr.filters.animated=function(c){return ai.grep(ai.timers,function(s){return c===s.elem}).length}}ai.fn.offset="getBoundingClientRect" in S.documentElement?function(s){var c=this[0];if(s){return this.each(function(F){ai.offset.setOffset(this,s,F)})}if(!c||!c.ownerDocument){return null}if(c===c.ownerDocument.body){return ai.offset.bodyOffset(c)}var A=c.getBoundingClientRect(),w=c.ownerDocument;c=w.body;w=w.documentElement;return{top:A.top+(self.pageYOffset||ai.support.boxModel&&w.scrollTop||c.scrollTop)-(w.clientTop||c.clientTop||0),left:A.left+(self.pageXOffset||ai.support.boxModel&&w.scrollLeft||c.scrollLeft)-(w.clientLeft||c.clientLeft||0)}}:function(N){var L=this[0];if(N){return this.each(function(O){ai.offset.setOffset(this,N,O)})}if(!L||!L.ownerDocument){return null}if(L===L.ownerDocument.body){return ai.offset.bodyOffset(L)}ai.offset.initialize();var K=L.offsetParent,G=L,J=L.ownerDocument,A,F=J.documentElement,c=J.body;G=(J=J.defaultView)?J.getComputedStyle(L,null):L.currentStyle;for(var w=L.offsetTop,s=L.offsetLeft;(L=L.parentNode)&&L!==c&&L!==F;){if(ai.offset.supportsFixedPosition&&G.position==="fixed"){break}A=J?J.getComputedStyle(L,null):L.currentStyle;w-=L.scrollTop;s-=L.scrollLeft;if(L===K){w+=L.offsetTop;s+=L.offsetLeft;if(ai.offset.doesNotAddBorder&&!(ai.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(L.nodeName))){w+=parseFloat(A.borderTopWidth)||0;s+=parseFloat(A.borderLeftWidth)||0}G=K;K=L.offsetParent}if(ai.offset.subtractsBorderForOverflowNotVisible&&A.overflow!=="visible"){w+=parseFloat(A.borderTopWidth)||0;s+=parseFloat(A.borderLeftWidth)||0}G=A}if(G.position==="relative"||G.position==="static"){w+=c.offsetTop;s+=c.offsetLeft}if(ai.offset.supportsFixedPosition&&G.position==="fixed"){w+=Math.max(F.scrollTop,c.scrollTop);s+=Math.max(F.scrollLeft,c.scrollLeft)}return{top:w,left:s}};ai.offset={initialize:function(){var s=S.body,c=S.createElement("div"),G,A,F,w=parseFloat(ai.curCSS(s,"marginTop",true))||0;ai.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});c.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";s.insertBefore(c,s.firstChild);G=c.firstChild;A=G.firstChild;F=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=A.offsetTop!==5;this.doesAddBorderForTableAndCells=F.offsetTop===5;A.style.position="fixed";A.style.top="20px";this.supportsFixedPosition=A.offsetTop===20||A.offsetTop===15;A.style.position=A.style.top="";G.style.overflow="hidden";G.style.position="relative";this.subtractsBorderForOverflowNotVisible=A.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=s.offsetTop!==w;s.removeChild(c);ai.offset.initialize=ai.noop},bodyOffset:function(s){var c=s.offsetTop,w=s.offsetLeft;ai.offset.initialize();if(ai.offset.doesNotIncludeMarginInBodyOffset){c+=parseFloat(ai.curCSS(s,"marginTop",true))||0;w+=parseFloat(ai.curCSS(s,"marginLeft",true))||0}return{top:c,left:w}},setOffset:function(s,c,J){if(/static/.test(ai.curCSS(s,"position"))){s.style.position="relative"}var F=ai(s),G=F.offset(),w=parseInt(ai.curCSS(s,"top",true),10)||0,A=parseInt(ai.curCSS(s,"left",true),10)||0;if(ai.isFunction(c)){c=c.call(s,J,G)}J={top:c.top-G.top+w,left:c.left-G.left+A};"using" in c?c.using.call(s,J):F.css(J)}};ai.fn.extend({position:function(){if(!this[0]){return null}var s=this[0],c=this.offsetParent(),A=this.offset(),w=/^body|html$/i.test(c[0].nodeName)?{top:0,left:0}:c.offset();A.top-=parseFloat(ai.curCSS(s,"marginTop",true))||0;A.left-=parseFloat(ai.curCSS(s,"marginLeft",true))||0;w.top+=parseFloat(ai.curCSS(c[0],"borderTopWidth",true))||0;w.left+=parseFloat(ai.curCSS(c[0],"borderLeftWidth",true))||0;return{top:A.top-w.top,left:A.left-w.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||S.body;c&&!/^body|html$/i.test(c.nodeName)&&ai.css(c,"position")==="static";){c=c.offsetParent}return c})}});ai.each(["Left","Top"],function(s,c){var w="scroll"+c;ai.fn[w]=function(F){var G=this[0],A;if(!G){return null}if(F!==M){return this.each(function(){if(A=o(this)){A.scrollTo(!s?F:ai(A).scrollLeft(),s?F:ai(A).scrollTop())}else{this[w]=F}})}else{return(A=o(G))?"pageXOffset" in A?A[s?"pageYOffset":"pageXOffset"]:ai.support.boxModel&&A.document.documentElement[w]||A.document.body[w]:G[w]}}});ai.each(["Height","Width"],function(s,c){var w=c.toLowerCase();ai.fn["inner"+c]=function(){return this[0]?ai.css(this[0],w,false,"padding"):null};ai.fn["outer"+c]=function(A){return this[0]?ai.css(this[0],w,false,A?"margin":"border"):null};ai.fn[w]=function(A){var F=this[0];if(!F){return A==null?null:this}if(ai.isFunction(A)){return this.each(function(G){var J=ai(this);J[w](A.call(this,G,J[w]()))})}return"scrollTo" in F&&F.document?F.document.compatMode==="CSS1Compat"&&F.document.documentElement["client"+c]||F.document.body["client"+c]:F.nodeType===9?Math.max(F.documentElement["client"+c],F.body["scroll"+c],F.documentElement["scroll"+c],F.body["offset"+c],F.documentElement["offset"+c]):A===M?ai.css(F,w):this.css(w,typeof A==="string"?A:A+"px")}});aP.jQuery=aP.$=ai})(window);
-/*
+/*!
* jQuery UI 1.8.4
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
@@ -23,4 +23,4 @@
*
* http://docs.jquery.com/UI
*/
-(function(d,b){function a(c){return !d(c).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};if(!d.ui.version){d.extend(d.ui,{version:"1.8.4",plugin:{add:function(f,c,h){f=d.ui[f].prototype;for(var g in h){f.plugins[g]=f.plugins[g]||[];f.plugins[g].push([c,h[g]])}},call:function(f,c,h){if((c=f.plugins[c])&&f.element[0].parentNode){for(var g=0;g<c.length;g++){f.options[c[g][0]]&&c[g][1].apply(f.element,h)}}}},contains:function(e,c){return document.compareDocumentPosition?e.compareDocumentPosition(c)&16:e!==c&&e.contains(c)},hasScroll:function(e,c){if(d(e).css("overflow")==="hidden"){return false}c=c&&c==="left"?"scrollLeft":"scrollTop";var f=false;if(e[c]>0){return true}e[c]=1;f=e[c]>0;e[c]=0;return f},isOverAxis:function(e,c,f){return e>c&&e<c+f},isOver:function(f,c,l,k,j,g){return d.ui.isOverAxis(f,l,j)&&d.ui.isOverAxis(c,k,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});d.fn.extend({_focus:d.fn.focus,focus:function(e,c){return typeof e==="number"?this.each(function(){var f=this;setTimeout(function(){d(f).focus();c&&c.call(f)},e)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var c;c=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?d(document):c},zIndex:function(e){if(e!==b){return this.css("zIndex",e)}if(this.length){e=d(this[0]);for(var c;e.length&&e[0]!==document;){c=e.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(e.css("zIndex"));if(!isNaN(c)&&c!=0){return c}}e=e.parent()}}return 0}});d.each(["Width","Height"],function(f,c){function l(n,i,h,e){d.each(k,function(){i-=parseFloat(d.curCSS(n,"padding"+this,true))||0;if(h){i-=parseFloat(d.curCSS(n,"border"+this+"Width",true))||0}if(e){i-=parseFloat(d.curCSS(n,"margin"+this,true))||0}});return i}var k=c==="Width"?["Left","Right"]:["Top","Bottom"],j=c.toLowerCase(),g={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+c]=function(e){if(e===b){return g["inner"+c].call(this)}return this.each(function(){d.style(this,j,l(this,e)+"px")})};d.fn["outer"+c]=function(h,e){if(typeof h!=="number"){return g["outer"+c].call(this,h)}return this.each(function(){d.style(this,j,l(this,h,true,e)+"px")})}});d.extend(d.expr[":"],{data:function(e,c,f){return !!d.data(e,f[3])},focusable:function(e){var c=e.nodeName.toLowerCase(),f=d.attr(e,"tabindex");if("area"===c){c=e.parentNode;f=c.name;if(!e.href||!f||c.nodeName.toLowerCase()!=="map"){return false}e=d("img[usemap=#"+f+"]")[0];return !!e&&a(e)}return(/input|select|textarea|button|object/.test(c)?!e.disabled:"a"==c?e.href||!isNaN(f):!isNaN(f))&&a(e)},tabbable:function(e){var c=d.attr(e,"tabindex");return(isNaN(c)||c>=0)&&d(e).is(":focusable")}})}})(jQuery);(function(a,d){var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){if(!e){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return c.call(a(this),b,e)})};a.widget=function(b,j,i){var h=b.split(".")[0],g;b=b.split(".")[1];g=h+"-"+b;if(!i){i=j;j=a.Widget}a.expr[":"][g]=function(e){return !!a.data(e,b)};a[h]=a[h]||{};a[h][b]=function(e,f){arguments.length&&this._createWidget(e,f)};j=new j;j.options=a.extend(true,{},j.options);a[h][b].prototype=a.extend(true,j,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:g},i);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,e){a.fn[b]=function(k){var j=typeof k==="string",i=Array.prototype.slice.call(arguments,1),g=this;k=!j&&i.length?a.extend.apply(null,[true,k].concat(i)):k;if(j&&k.substring(0,1)==="_"){return g}j?this.each(function(){var h=a.data(this,b),f=h&&a.isFunction(h[k])?h[k].apply(h,i):h;if(f!==h&&f!==d){g=f;return false}}):this.each(function(){var f=a.data(this,b);if(f){k&&f.option(k);f._init()}else{a.data(this,b,new e(k,this))}});return g}};a.Widget=function(b,e){arguments.length&&this._createWidget(b,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,h){var g=b,f=this;if(arguments.length===0){return a.extend({},f.options)}if(typeof b==="string"){if(h===d){return this.options[b]}g={};g[b]=h}a.each(g,function(i,e){f._setOption(i,e)});return f},_setOption:function(b,e){this.options[b]=e;if(b==="disabled"){this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,j,i){var h=this.options[b];j=a.Event(j);j.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();i=i||{};if(j.originalEvent){b=a.event.props.length;for(var g;b;){g=a.event.props[--b];j[g]=j.originalEvent[g]}}this.element.trigger(j,i);return !(a.isFunction(h)&&h.call(this.element[0],j,i)===false||j.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(!d.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,h=d.which==1,g=typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false;if(!h||g||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(b){return c._mouseMove(b)};this._mouseUpDelegate=function(b){return c._mouseUp(b)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||d.preventDefault();return d.originalEvent.mouseHandled=true}},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(d);if(!this.handle){return false}return true},_mouseStart:function(d){var c=this.options;this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);return true},_mouseDrag:function(d,c){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(e){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,e)}if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",e)!==false&&f._clear()})}else{this._trigger("stop",e)!==false&&this._clear()}return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==d.target){c=true}});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone():this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var d=a(e.containment)[0];if(d){e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(e,d){if(!d){d=this.position}e=e=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*e),left:d.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*e)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=/(html|body)/i.test(l[0].tagName),k=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){k=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){k=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;k=this.originalPageX+Math.round((k-this.originalPageX)/d.grid[0])*d.grid[0];k=this.containment?!(k-this.offset.click.left<this.containment[0]||k-this.offset.click.left>this.containment[2])?k:!(k-this.offset.click.left<this.containment[0])?k-d.grid[0]:k+d.grid[0]:k}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():j?0:l.scrollTop()),left:k-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:l.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(e,d,f){f=f||this._uiHash();a.ui.plugin.call(this,e,[d,f]);if(e=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,e,d,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.4"});a.ui.plugin.add("draggable","connectToSortable",{start:function(g,d){var j=a(this).data("draggable"),h=j.options,i=a.extend({},d,{item:j.element});j.sortables=[];a(h.connectToSortable).each(function(){var b=a.data(this,"sortable");if(b&&!b.options.disabled){j.sortables.push({instance:b,shouldRevert:b.options.revert});b._refreshItems();b._trigger("activate",g,i)}})},stop:function(e,d){var h=a(this).data("draggable"),g=a.extend({},d,{item:h.element});a.each(h.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;h.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(e);this.instance.options.helper=this.instance.options._helper;h.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",e,g)}})},drag:function(e,d){var h=a(this).data("draggable"),g=this;a.each(h.sortables,function(){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};e.target=this.instance.currentItem[0];this.instance._mouseCapture(e,true);this.instance._mouseStart(e,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger("toSortable",e);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}this.instance.currentItem&&this.instance._mouseDrag(e)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",e,this.instance._uiHash(this.instance));this.instance._mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();h._trigger("fromSortable",e);h.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor")){c._cursor=d.css("cursor")}d.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity")){c._opacity=d.css("opacity")}d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(e){var d=a(this).data("draggable"),h=d.options,g=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!h.axis||h.axis!="x"){if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-e.pageY<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop+h.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop-h.scrollSpeed}}}if(!h.axis||h.axis!="y"){if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-e.pageX<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft-h.scrollSpeed}}}}else{if(!h.axis||h.axis!="x"){if(e.pageY-a(document).scrollTop()<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}}if(!h.axis||h.axis!="y"){if(e.pageX-a(document).scrollLeft()<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}}g!==false&&a.ui.ddmanager&&!h.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,e)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var e=a(this),b=e.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:b.top,left:b.left})})},drag:function(L,K){for(var J=a(this).data("draggable"),H=J.options,I=H.snapTolerance,G=K.offset.left,z=G+J.helperProportions.width,A=K.offset.top,y=A+J.helperProportions.height,F=J.snapElements.length-1;F>=0;F--){var E=J.snapElements[F].left,C=E+J.snapElements[F].width,D=J.snapElements[F].top,B=D+J.snapElements[F].height;if(E-I<G&&G<C+I&&D-I<A&&A<B+I||E-I<G&&G<C+I&&D-I<y&&y<B+I||E-I<z&&z<C+I&&D-I<A&&A<B+I||E-I<z&&z<C+I&&D-I<y&&y<B+I){if(H.snapMode!="inner"){var x=Math.abs(D-y)<=I,w=Math.abs(B-A)<=I,v=Math.abs(E-z)<=I,u=Math.abs(C-G)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D-J.helperProportions.height,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E-J.helperProportions.width}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C}).left-J.margins.left}}var d=x||w||v||u;if(H.snapMode!="outer"){x=Math.abs(D-A)<=I;w=Math.abs(B-y)<=I;v=Math.abs(E-G)<=I;u=Math.abs(C-z)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B-J.helperProportions.height,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[F].snapping&&(x||w||v||u||d)){J.options.snap.snap&&J.options.snap.snap.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}))}J.snapElements[F].snapping=x||w||v||u||d}else{J.snapElements[F].snapping&&J.options.snap.release&&J.options.snap.release.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}));J.snapElements[F].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(e,b){return(parseInt(a(e).css("zIndex"),10)||0)-(parseInt(a(b).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(b){this.style.zIndex=c+b});this[0].style.zIndex=c+d.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex")){c._zIndex=d.css("zIndex")}d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(b){return b.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++){d[c]==this&&d.splice(c,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept"){this.accept=a.isFunction(c)?c:function(b){return b.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",d,this.ui(c))}}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}}},_drop:function(f,d){var h=d||a.ui.ddmanager.current;if(!h||(h.currentItem||h.element)[0]==this.element[0]){return false}var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==h.options.scope&&b.accept.call(b.element[0],h.currentItem||h.element)&&a.ui.intersect(h,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){g=true;return false}});if(g){return false}if(this.accept.call(this.element[0],h.currentItem||h.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",f,this.ui(h));return this.element}return false},ui:function(b){return{draggable:b.currentItem||b.element,helper:b.helper,position:b.position,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.4"});a.ui.intersect=function(w,v,u){if(!v.offset){return false}var s=(w.positionAbs||w.position.absolute).left,q=s+w.helperProportions.width,r=(w.positionAbs||w.position.absolute).top,p=r+w.helperProportions.height,o=v.offset.left,m=o+v.proportions.width,n=v.offset.top,d=n+v.proportions.height;switch(u){case"fit":return o<=s&&q<=m&&n<=r&&p<=d;case"intersect":return o<s+w.helperProportions.width/2&&q-w.helperProportions.width/2<m&&n<r+w.helperProportions.height/2&&p-w.helperProportions.height/2<d;case"pointer":return a.ui.isOver((w.positionAbs||w.position.absolute).top+(w.clickOffset||w.offset.click).top,(w.positionAbs||w.position.absolute).left+(w.clickOffset||w.offset.click).left,n,o,v.proportions.height,v.proportions.width);case"touch":return(r>=n&&r<=d||p>=n&&p<=d||r<n&&p>d)&&(s>=o&&s<=m||q>=o&&q<=m||s<o&&q>m);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(i,d){var n=a.ui.ddmanager.droppables[i.options.scope]||[],m=d?d.type:null,k=(i.currentItem||i.element).find(":data(droppable)").andSelf(),l=0;i:for(;l<n.length;l++){if(!(n[l].options.disabled||i&&!n[l].accept.call(n[l].element[0],i.currentItem||i.element))){for(var j=0;j<k.length;j++){if(k[j]==n[l].element[0]){n[l].proportions.height=0;continue i}}n[l].visible=n[l].element.css("display")!="none";if(n[l].visible){n[l].offset=n[l].element.offset();n[l].proportions={width:n[l].element[0].offsetWidth,height:n[l].element[0].offsetHeight};m=="mousedown"&&n[l]._activate.call(n[l],d)}}}},drop:function(e,d){var f=false;a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance)){f=f||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return f},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var h=a.ui.intersect(d,this,this.options.tolerance);if(h=!h&&this.isover==1?"isout":h&&this.isover==0?"isover":null){var f;if(this.options.greedy){var b=this.element.parents(":data(droppable):eq(0)");if(b.length){f=a.data(b[0],"droppable");f.greedyChild=h=="isover"?1:0}}if(f&&h=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,c);if(f&&h=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}}}})}}})(jQuery);(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var e=this,h=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&c.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var k=0;k<l.length;k++){var j=c.trim(l[k]),i=c('<div class="ui-resizable-handle '+("ui-resizable-"+j)+'"></div>');/sw|se|ne|nw/.test(j)&&i.css({zIndex:++h.zIndex});"se"==j&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[j]=".ui-resizable-"+j;this.element.append(i)}}this._renderAxis=function(m){m=m||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=c(this.handles[g],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var f=c(this.handles[g],this.element),d=0;d=/sw|ne|nw|se|n|s/.test(g)?f.outerHeight():f.outerWidth();f=["padding",/ne|nw|n/.test(g)?"Top":/se|sw|s/.test(g)?"Bottom":/^e$/.test(g)?"Right":"Left"].join("");m.css(f,d);this._proportionallyResize()}c(this.handles[g])}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var d=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=d&&d[1]?d[1]:"se"}});if(h.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(d){var e=false;for(var f in this.handles){if(c(this.handles[f])[0]==d.target){e=true}}return !this.options.disabled&&e},_mouseStart:function(e){var g=this.options,j=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position"))){i.css({position:"absolute",top:j.top,left:j.left})}c.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();j=a(this.helper.css("left"));var h=a(this.helper.css("top"));if(g.containment){j+=c(g.containment).scrollLeft()||0;h+=c(g.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:h};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:j,top:h};this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof g.aspectRatio=="number"?g.aspectRatio:this.originalSize.width/this.originalSize.height||1;g=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",g=="auto"?this.axis+"-resize":g);i.addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var f=this.helper,h=this.originalMousePosition,g=this._change[this.axis];if(!g){return false}h=g.apply(this,[e,e.pageX-h.left||0,e.pageY-h.top||0]);if(this._aspectRatio||e.shiftKey){h=this._updateRatio(h,e)}h=this._respectSize(h,e);this._propagate("resize",e);f.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(h);this._trigger("resize",e,this.ui());return false},_mouseStop:function(e){this.resizing=false;var h=this.options,l=this;if(this._helper){var k=this._proportionallyResizeElements,j=k.length&&/textarea/i.test(k[0].nodeName);k=j&&c.ui.hasScroll(k[0],"left")?0:l.sizeDiff.height;j={width:l.size.width-(j?0:l.sizeDiff.width),height:l.size.height-k};k=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null;var i=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null;h.animate||this.element.css(c.extend(j,{top:i,left:k}));l.helper.height(l.size.height);l.helper.width(l.size.width);this._helper&&!h.animate&&this._proportionallyResize()}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",e);this._helper&&this.helper.remove();return false},_updateCache:function(d){this.offset=this.helper.offset();if(b(d.left)){this.position.left=d.left}if(b(d.top)){this.position.top=d.top}if(b(d.height)){this.size.height=d.height}if(b(d.width)){this.size.width=d.width}},_updateRatio:function(e){var f=this.position,h=this.size,g=this.axis;if(e.height){e.width=h.height*this.aspectRatio}else{if(e.width){e.height=h.width/this.aspectRatio}}if(g=="sw"){e.left=f.left+(h.width-e.width);e.top=null}if(g=="nw"){e.top=f.top+(h.height-e.height);e.left=f.left+(h.width-e.width)}return e},_respectSize:function(s){var u=this.options,r=this.axis,q=b(s.width)&&u.maxWidth&&u.maxWidth<s.width,p=b(s.height)&&u.maxHeight&&u.maxHeight<s.height,o=b(s.width)&&u.minWidth&&u.minWidth>s.width,n=b(s.height)&&u.minHeight&&u.minHeight>s.height;if(o){s.width=u.minWidth}if(n){s.height=u.minHeight}if(q){s.width=u.maxWidth}if(p){s.height=u.maxHeight}var m=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,e=/sw|nw|w/.test(r);r=/nw|ne|n/.test(r);if(o&&e){s.left=m-u.minWidth}if(q&&e){s.left=m-u.maxWidth}if(n&&r){s.top=l-u.minHeight}if(p&&r){s.top=l-u.maxHeight}if((u=!s.width&&!s.height)&&!s.left&&s.top){s.top=null}else{if(u&&!s.top&&s.left){s.left=null}}return s},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var e=this.helper||this.element,g=0;g<this._proportionallyResizeElements.length;g++){var j=this._proportionallyResizeElements[g];if(!this.borderDif){var i=[j.css("borderTopWidth"),j.css("borderRightWidth"),j.css("borderBottomWidth"),j.css("borderLeftWidth")],h=[j.css("paddingTop"),j.css("paddingRight"),j.css("paddingBottom"),j.css("paddingLeft")];this.borderDif=c.map(i,function(f,d){f=parseInt(f,10)||0;d=parseInt(h[d],10)||0;return f+d})}c.browser.msie&&(c(e).is(":hidden")||c(e).parents(":hidden").length)||j.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var d=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,f=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++d.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(d,e){return{width:this.originalSize.width+e}},w:function(d,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(d,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(d,e,f){return{height:this.originalSize.height+f}},se:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},sw:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,e,f]))},ne:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},nw:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,e,f]))}},_propagate:function(d,e){c.ui.plugin.call(this,d,[e,this.ui()]);d!="resize"&&this._trigger(d,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.4"});c.ui.plugin.add("resizable","alsoResize",{start:function(){var d=c(this).data("resizable").options,e=function(f){c(f).each(function(){var g=c(this);g.data("resizable-alsoresize",{width:parseInt(g.width(),10),height:parseInt(g.height(),10),left:parseInt(g.css("left"),10),top:parseInt(g.css("top"),10),position:g.css("position")})})};if(typeof d.alsoResize=="object"&&!d.alsoResize.parentNode){if(d.alsoResize.length){d.alsoResize=d.alsoResize[0];e(d.alsoResize)}else{c.each(d.alsoResize,function(f){e(f)})}}else{e(d.alsoResize)}},resize:function(e,i){var n=c(this).data("resizable");e=n.options;var m=n.originalSize,l=n.originalPosition,k={height:n.size.height-m.height||0,width:n.size.width-m.width||0,top:n.position.top-l.top||0,left:n.position.left-l.left||0},j=function(f,d){c(f).each(function(){var g=c(this),o=c(this).data("resizable-alsoresize"),s={},h=d&&d.length?d:g.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(h,function(q,p){if((q=(o[p]||0)+(k[p]||0))&&q>=0){s[p]=q||null}});if(c.browser.opera&&/relative/.test(g.css("position"))){n._revertToRelativePosition=true;g.css({position:"absolute",top:"auto",left:"auto"})}g.css(s)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(f,d){j(f,d)}):j(e.alsoResize)},stop:function(){var d=c(this).data("resizable"),e=d.options,f=function(g){c(g).each(function(){var h=c(this);h.css({position:h.data("resizable-alsoresize").position})})};if(d._revertToRelativePosition){d._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(g){f(g)}):f(e.alsoResize)}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(e){var i=c(this).data("resizable"),n=i.options,m=i._proportionallyResizeElements,l=m.length&&/textarea/i.test(m[0].nodeName),k=l&&c.ui.hasScroll(m[0],"left")?0:i.sizeDiff.height;l={width:i.size.width-(l?0:i.sizeDiff.width),height:i.size.height-k};k=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null;var j=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(c.extend(l,j&&k?{top:j,left:k}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var d={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};m&&m.length&&c(m[0]).css({width:d.width,height:d.height});i._updateCache(d);i._propagate("resize",e)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var e=c(this).data("resizable"),i=e.element,n=e.options.containment;if(i=n instanceof c?n.get(0):/parent/.test(n)?i.parent().get(0):n){e.containerElement=c(i);if(/document/.test(n)||n==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(i),l=[];c(["Top","Right","Left","Bottom"]).each(function(f,d){l[f]=a(m.css("padding"+d))});e.containerOffset=m.offset();e.containerPosition=m.position();e.containerSize={height:m.innerHeight()-l[3],width:m.innerWidth()-l[1]};n=e.containerOffset;var k=e.containerSize.height,j=e.containerSize.width;j=c.ui.hasScroll(i,"left")?i.scrollWidth:j;k=c.ui.hasScroll(i)?i.scrollHeight:k;e.parentData={element:i,left:n.left,top:n.top,width:j,height:k}}}},resize:function(e){var i=c(this).data("resizable"),n=i.options,m=i.containerOffset,l=i.position;e=i._aspectRatio||e.shiftKey;var k={top:0,left:0},j=i.containerElement;if(j[0]!=document&&/static/.test(j.css("position"))){k=m}if(l.left<(i._helper?m.left:0)){i.size.width+=i._helper?i.position.left-m.left:i.position.left-k.left;if(e){i.size.height=i.size.width/n.aspectRatio}i.position.left=n.helper?m.left:0}if(l.top<(i._helper?m.top:0)){i.size.height+=i._helper?i.position.top-m.top:i.position.top;if(e){i.size.width=i.size.height*n.aspectRatio}i.position.top=i._helper?m.top:0}i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;n=Math.abs((i._helper?i.offset.left-k.left:i.offset.left-k.left)+i.sizeDiff.width);m=Math.abs((i._helper?i.offset.top-k.top:i.offset.top-m.top)+i.sizeDiff.height);l=i.containerElement.get(0)==i.element.parent().get(0);k=/relative|absolute/.test(i.containerElement.css("position"));if(l&&k){n-=i.parentData.left}if(n+i.size.width>=i.parentData.width){i.size.width=i.parentData.width-n;if(e){i.size.height=i.size.width/i.aspectRatio}}if(m+i.size.height>=i.parentData.height){i.size.height=i.parentData.height-m;if(e){i.size.width=i.size.height*i.aspectRatio}}},stop:function(){var e=c(this).data("resizable"),j=e.options,p=e.containerOffset,o=e.containerPosition,n=e.containerElement,m=c(e.helper),l=m.offset(),k=m.outerWidth()-e.sizeDiff.width;m=m.outerHeight()-e.sizeDiff.height;e._helper&&!j.animate&&/relative/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m});e._helper&&!j.animate&&/static/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m})}});c.ui.plugin.add("resizable","ghost",{start:function(){var d=c(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var d=c(this).data("resizable");d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=c(this).data("resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var e=c(this).data("resizable"),i=e.options,n=e.size,m=e.originalSize,l=e.originalPosition,k=e.axis;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var j=Math.round((n.width-m.width)/(i.grid[0]||1))*(i.grid[0]||1);i=Math.round((n.height-m.height)/(i.grid[1]||1))*(i.grid[1]||1);if(/^(se|s|e)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{if(/^(ne)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}else{if(/^(sw)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}e.position.left=l.left-j}}}});var a=function(d){return parseInt(d,10)||0},b=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var b;this.refresh=function(){b=a(d.options.filter,d.element[0]);b.each(function(){var e=a(this),c=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:c.left,top:c.top,right:c.left+e.outerWidth(),bottom:c.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(g){var b=this;this.opos=[g.pageX,g.pageY];if(!this.options.disabled){var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",g);a(e.appendTo).append(this.helper);this.helper.css({left:g.clientX,top:g.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=a.data(this,"selectable-item");c.startselected=true;if(!g.metaKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=true;b._trigger("unselecting",g,{unselecting:c.element})}});a(g.target).parents().andSelf().each(function(){var c=a.data(this,"selectable-item");if(c){var d=!g.metaKey||!c.$element.hasClass("ui-selected");c.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting");c.unselecting=!d;c.selecting=d;(c.selected=d)?b._trigger("selecting",g,{selecting:c.element}):b._trigger("unselecting",g,{unselecting:c.element});return false}})}},_mouseDrag:function(q){var o=this;this.dragged=true;if(!this.options.disabled){var p=this.options,e=this.opos[0],n=this.opos[1],m=q.pageX,l=q.pageY;if(e>m){var k=m;m=e;e=k}if(n>l){k=l;l=n;n=k}this.helper.css({left:e,top:n,width:m-e,height:l-n});this.selectees.each(function(){var b=a.data(this,"selectable-item");if(!(!b||b.element==o.element[0])){var c=false;if(p.tolerance=="touch"){c=!(b.left>m||b.right<e||b.top>l||b.bottom<n)}else{if(p.tolerance=="fit"){c=b.left>e&&b.right<m&&b.top>n&&b.bottom<l}}if(c){if(b.selected){b.$element.removeClass("ui-selected");b.selected=false}if(b.unselecting){b.$element.removeClass("ui-unselecting");b.unselecting=false}if(!b.selecting){b.$element.addClass("ui-selecting");b.selecting=true;o._trigger("selecting",q,{selecting:b.element})}}else{if(b.selecting){if(q.metaKey&&b.startselected){b.$element.removeClass("ui-selecting");b.selecting=false;b.$element.addClass("ui-selected");b.selected=true}else{b.$element.removeClass("ui-selecting");b.selecting=false;if(b.startselected){b.$element.addClass("ui-unselecting");b.unselecting=true}o._trigger("unselecting",q,{unselecting:b.element})}}if(b.selected){if(!q.metaKey&&!b.startselected){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;o._trigger("unselecting",q,{unselecting:b.element})}}}}});return false}},_mouseStop:function(d){var b=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=false;b._trigger("unselected",d,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;b._trigger("selected",d,{selected:c.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}return this},_setOption:function(d,c){if(d==="disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(g,d){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(g);var j=null,i=this;a(g.target).parents().each(function(){if(a.data(this,"sortable-item")==i){j=a(this);return false}});if(a.data(g.target,"sortable-item")==i){j=a(g.target)}if(!j){return false}if(this.options.handle&&!d){var h=false;a(this.options.handle,j).find("*").andSelf().each(function(){if(this==g.target){h=true}});if(!h){return false}}this.currentItem=j;this._removeCurrentsFromItems();return true},_mouseStart:function(f,d,h){d=this.options;var g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();d.containment&&this._setContainment();if(d.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",d.cursor)}if(d.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",d.opacity)}if(d.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",d.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!h){for(h=this.containers.length-1;h>=0;h--){this.containers[h]._trigger("activate",f,g._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var d=this.options,j=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-g.pageY<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop+d.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop-d.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-g.pageX<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft-d.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}j!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(d=this.items.length-1;d>=0;d--){j=this.items[d];var i=j.item[0],h=this._intersectsWithPointer(j);if(h){if(i!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=i&&!a.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],i):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(j)){this._rearrange(g,j)}else{break}this._trigger("change",g,this._uiHash());break}}}this._contactContainers(g);a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(e,d){if(e){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,e);if(this.options.revert){var f=this;d=f.placeholder.offset();f.reverting=true;a(this.helper).animate({left:d.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(e)})}else{this._clear(e,d)}return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};a(d).each(function(){var b=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);if(b){f.push((e.key||b[1]+"[]")+"="+(e.key&&e.expression?b[1]:b[2]))}});!f.length&&e.key&&f.push(e.key+"=");return f.join("&")},toArray:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};d.each(function(){f.push(a(e.item||this).attr(e.attribute||"id")||"")});return f},_intersectsWith:function(w){var v=this.positionAbs.left,u=v+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,q=w.left,p=q+w.width,o=w.top,m=o+w.height,n=this.offset.click.top,d=this.offset.click.left;n=s+n>o&&s+n<m&&v+d>q&&v+d<p;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>w[this.floating?"width":"height"]?n:q<v+this.helperProportions.width/2&&u-this.helperProportions.width/2<p&&o<s+this.helperProportions.height/2&&r-this.helperProportions.height/2<m},_intersectsWithPointer:function(e){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height);e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);d=d&&e;e=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!d){return false}return this.floating?f&&f=="right"||e=="down"?2:1:e&&(e=="down"?2:1)},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height);f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width);var h=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return this.floating&&g?g=="right"&&f||g=="left"&&!f:h&&(h=="down"&&d||h=="up"&&!d)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(i){var d=[],n=[],m=this._connectWith();if(m&&i){for(i=m.length-1;i>=0;i--){for(var l=a(m[i]),k=l.length-1;k>=0;k--){var j=a.data(l[k],"sortable");if(j&&j!=this&&!j.options.disabled){n.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}}}n.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=n.length-1;i>=0;i--){n[i][0].each(function(){d.push(this)})}return a(d)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data(sortable-item)"),d=0;d<this.items.length;d++){for(var f=0;f<e.length;f++){e[f]==this.items[d].item[0]&&this.items.splice(d,1)}}},_refreshItems:function(j){this.items=[];this.containers=[this];var d=this.items,p=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],j,{item:this.currentItem}):a(this.options.items,this.element),this]],o=this._connectWith();if(o){for(var n=o.length-1;n>=0;n--){for(var m=a(o[n]),l=m.length-1;l>=0;l--){var k=a.data(m[l],"sortable");if(k&&k!=this&&!k.options.disabled){p.push([a.isFunction(k.options.items)?k.options.items.call(k.element[0],j,{item:this.currentItem}):a(k.options.items,k.element),k]);this.containers.push(k)}}}}for(n=p.length-1;n>=0;n--){j=p[n][1];o=p[n][0];l=0;for(m=o.length;l<m;l++){k=a(o[l]);k.data("sortable-item",j);d.push({item:k,instance:j,width:0,height:0,left:0,top:0})}}},refreshPositions:function(f){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var h=this.items[d],g=this.options.toleranceElement?a(this.options.toleranceElement,h.item):h.item;if(!f){h.width=g.outerWidth();h.height=g.outerHeight()}g=g.offset();h.left=g.left;h.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(d=this.containers.length-1;d>=0;d--){g=this.containers[d].element.offset();this.containers[d].containerCache.left=g.left;this.containers[d].containerCache.top=g.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}return this},_createPlaceholder:function(f){var d=f||this,h=d.options;if(!h.placeholder||h.placeholder.constructor==String){var g=h.placeholder;h.placeholder={element:function(){var b=a(document.createElement(d.currentItem[0].nodeName)).addClass(g||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g){b.style.visibility="hidden"}return b},update:function(c,b){if(!(g&&!h.forcePlaceholderSize)){b.height()||b.height(d.currentItem.innerHeight()-parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||0,10));b.width()||b.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=a(h.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);h.placeholder.update(d,d.placeholder)},_contactContainers:function(i){for(var d=null,n=null,m=this.containers.length-1;m>=0;m--){if(!a.ui.contains(this.currentItem[0],this.containers[m].element[0])){if(this._intersectsWith(this.containers[m].containerCache)){if(!(d&&a.ui.contains(this.containers[m].element[0],d.element[0]))){d=this.containers[m];n=m}}else{if(this.containers[m].containerCache.over){this.containers[m]._trigger("out",i,this._uiHash(this));this.containers[m].containerCache.over=0}}}}if(d){if(this.containers.length===1){this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}else{if(this.currentContainer!=this.containers[n]){d=10000;m=null;for(var l=this.positionAbs[this.containers[n].floating?"left":"top"],k=this.items.length-1;k>=0;k--){if(a.ui.contains(this.containers[n].element[0],this.items[k].item[0])){var j=this.items[k][this.containers[n].floating?"left":"top"];if(Math.abs(j-l)<d){d=Math.abs(j-l);m=this.items[k]}}}if(m||this.options.dropOnEmpty){this.currentContainer=this.containers[n];m?this._rearrange(i,m,null,true):this._rearrange(i,null,this.containers[n].element,true);this._trigger("change",i,this._uiHash());this.containers[n]._trigger("change",i,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}}}}},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[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")}}if(d[0].style.width==""||c.forceHelperSize){d.width(this.currentItem.width())}if(d[0].style.height==""||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)){var d=a(e.containment)[0];e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,d){if(!d){d=this.position}f=f=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*f),left:d.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*f)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,k=/(html|body)/i.test(l[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var j=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){j=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){j=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;j=this.originalPageX+Math.round((j-this.originalPageX)/d.grid[0])*d.grid[0];j=this.containment?!(j-this.offset.click.left<this.containment[0]||j-this.offset.click.left>this.containment[2])?j:!(j-this.offset.click.left<this.containment[0])?j-d.grid[0]:j+d.grid[0]:j}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():k?0:l.scrollTop()),left:j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():k?0:l.scrollLeft())}},_rearrange:function(h,d,l,k){l?l[0].appendChild(this.placeholder[0]):d.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?d.item[0]:d.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var j=this,i=this.counter;window.setTimeout(function(){i==j.counter&&j.refreshPositions(!k)},0)},_clear:function(f,d){this.reverting=false;var h=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var g in this._storedCSS){if(this._storedCSS[g]=="auto"||this._storedCSS[g]=="static"){this._storedCSS[g]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!d&&h.push(function(b){this._trigger("receive",b,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!d){h.push(function(b){this._trigger("update",b,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){d||h.push(function(b){this._trigger("remove",b,this._uiHash())});for(g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!d){h.push(function(b){return function(c){b._trigger("receive",c,this._uiHash(this))}}.call(this,this.containers[g]));h.push(function(b){return function(c){b._trigger("update",c,this._uiHash(this))}}.call(this,this.containers[g]))}}}for(g=this.containers.length-1;g>=0;g--){d||h.push(function(b){return function(c){b._trigger("deactivate",c,this._uiHash(this))}}.call(this,this.containers[g]));if(this.containers[g].containerCache.over){h.push(function(b){return function(c){b._trigger("out",c,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!d){this._trigger("beforeStop",f,this._uiHash());for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}return false}d||this._trigger("beforeStop",f,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!d){for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.4"})})(jQuery);jQuery.effects||function(q,i){function g(j){var f;if(j&&j.constructor==Array&&j.length==3){return j}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(j)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(j)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(j)){return e.transparent}return e[q.trim(j).toLowerCase()]}function a(k,j){var f;do{f=q.curCSS(k,j);if(f!=""&&f!="transparent"||q.nodeName(k,"body")){break}j="backgroundColor"}while(k=k.parentNode);return g(f)}function d(){var m=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,j={},f,l;if(m&&m.length&&m[0]&&m[m[0]]){for(var k=m.length;k--;){f=m[k];if(typeof m[f]=="string"){l=f.replace(/\-(\w)/g,function(o,n){return n.toUpperCase()});j[l]=m[f]}}}else{for(f in m){if(typeof m[f]==="string"){j[f]=m[f]}}}return j}function c(k){var j,f;for(j in k){f=k[j];if(f==null||q.isFunction(f)||j in v||/scrollbar/.test(j)||!/color/i.test(j)&&isNaN(parseFloat(f))){delete k[j]}}return k}function u(l,j){var f={_:0},k;for(k in j){if(l[k]!=j[k]){f[k]=j[k]}}return f}function h(l,j,f,k){if(typeof l=="object"){k=j;f=null;j=l;l=j.effect}if(q.isFunction(j)){k=j;f=null;j={}}if(typeof j=="number"||q.fx.speeds[j]){k=f;f=j;j={}}if(q.isFunction(f)){k=f;f=null}j=j||{};f=f||j.duration;f=q.fx.off?0:typeof f=="number"?f:q.fx.speeds[f]||q.fx.speeds._default;k=k||j.complete;return[l,j,f,k]}q.effects={};q.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(j,f){q.fx.step[f]=function(k){if(!k.colorInit){k.start=a(k.elem,f);k.end=g(k.end);k.colorInit=true}k.elem.style[f]="rgb("+Math.max(Math.min(parseInt(k.pos*(k.end[0]-k.start[0])+k.start[0],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[1]-k.start[1])+k.start[1],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[2]-k.start[2])+k.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},b=["add","remove","toggle"],v={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};q.effects.animateClass=function(l,j,f,k){if(q.isFunction(f)){k=f;f=null}return this.each(function(){var r=q(this),o=r.attr("style")||" ",n=c(d.call(this)),p,m=r.attr("className");q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});p=c(d.call(this));r.attr("className",m);r.animate(u(n,p),j,f,function(){q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=o}else{r.attr("style",o)}k&&k.apply(this,arguments)})})};q.fn.extend({_addClass:q.fn.addClass,addClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{add:l},j,f,k]):this._addClass(l)},_removeClass:q.fn.removeClass,removeClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{remove:l},j,f,k]):this._removeClass(l)},_toggleClass:q.fn.toggleClass,toggleClass:function(m,j,f,l,k){return typeof j=="boolean"||j===i?f?q.effects.animateClass.apply(this,[j?{add:m}:{remove:m},f,l,k]):this._toggleClass(m,j):q.effects.animateClass.apply(this,[{toggle:m},j,f,l])},switchClass:function(m,j,f,l,k){return q.effects.animateClass.apply(this,[{add:j,remove:m},f,l,k])}});q.extend(q.effects,{version:"1.8.4",save:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.data("ec.storage."+j[f],k[0].style[j[f]])}},restore:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.css(j[f],k.data("ec.storage."+j[f]))}},setMode:function(j,f){if(f=="toggle"){f=j.is(":hidden")?"show":"hide"}return f},getBaseline:function(k,j){var f;switch(k[0]){case"top":f=0;break;case"middle":f=0.5;break;case"bottom":f=1;break;default:f=k[0]/j.height}switch(k[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=k[1]/j.width}return{x:k,y:f}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent()}var j={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},f=q("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(f);f=k.parent();if(k.css("position")=="static"){f.css({position:"relative"});k.css({position:"relative"})}else{q.extend(j,{position:k.css("position"),zIndex:k.css("z-index")});q.each(["top","left","bottom","right"],function(m,l){j[l]=k.css(l);if(isNaN(parseInt(j[l],10))){j[l]="auto"}});k.css({position:"relative",top:0,left:0})}return f.css(j).show()},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(l,j,f,k){k=k||{};q.each(j,function(n,m){unit=l.cssUnit(m);if(unit[0]>0){k[m]=unit[0]*f+unit[1]}});return k}});q.fn.extend({effect:function(k){var j=h.apply(this,arguments);j={options:j[1],duration:j[2],callback:j[3]};var f=q.effects[k];return f&&!q.fx.off?f.call(this,j):this},_show:q.fn.show,show:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._show.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="show";return this.effect.apply(this,f)}},_hide:q.fn.hide,hide:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._hide.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="hide";return this.effect.apply(this,f)}},__toggle:q.fn.toggle,toggle:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]||typeof j=="boolean"||q.isFunction(j)){return this.__toggle.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(k){var j=this.css(k),f=[];q.each(["em","px","%","pt"],function(m,l){if(j.indexOf(l)>0){f=[parseFloat(j),l]}});return f}});q.easing.jswing=q.easing.swing;q.extend(q.easing,{def:"easeOutQuad",swing:function(m,j,f,l,k){return q.easing[q.easing.def](m,j,f,l,k)},easeInQuad:function(m,j,f,l,k){return l*(j/=k)*j+f},easeOutQuad:function(m,j,f,l,k){return -l*(j/=k)*(j-2)+f},easeInOutQuad:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j+f}return -l/2*(--j*(j-2)-1)+f},easeInCubic:function(m,j,f,l,k){return l*(j/=k)*j*j+f},easeOutCubic:function(m,j,f,l,k){return l*((j=j/k-1)*j*j+1)+f},easeInOutCubic:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j+f}return l/2*((j-=2)*j*j+2)+f},easeInQuart:function(m,j,f,l,k){return l*(j/=k)*j*j*j+f},easeOutQuart:function(m,j,f,l,k){return -l*((j=j/k-1)*j*j*j-1)+f},easeInOutQuart:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j+f}return -l/2*((j-=2)*j*j*j-2)+f},easeInQuint:function(m,j,f,l,k){return l*(j/=k)*j*j*j*j+f},easeOutQuint:function(m,j,f,l,k){return l*((j=j/k-1)*j*j*j*j+1)+f},easeInOutQuint:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j*j+f}return l/2*((j-=2)*j*j*j*j+2)+f},easeInSine:function(m,j,f,l,k){return -l*Math.cos(j/k*(Math.PI/2))+l+f},easeOutSine:function(m,j,f,l,k){return l*Math.sin(j/k*(Math.PI/2))+f},easeInOutSine:function(m,j,f,l,k){return -l/2*(Math.cos(Math.PI*j/k)-1)+f},easeInExpo:function(m,j,f,l,k){return j==0?f:l*Math.pow(2,10*(j/k-1))+f},easeOutExpo:function(m,j,f,l,k){return j==k?f+l:l*(-Math.pow(2,-10*j/k)+1)+f},easeInOutExpo:function(m,j,f,l,k){if(j==0){return f}if(j==k){return f+l}if((j/=k/2)<1){return l/2*Math.pow(2,10*(j-1))+f}return l/2*(-Math.pow(2,-10*--j)+2)+f},easeInCirc:function(m,j,f,l,k){return -l*(Math.sqrt(1-(j/=k)*j)-1)+f},easeOutCirc:function(m,j,f,l,k){return l*Math.sqrt(1-(j=j/k-1)*j)+f},easeInOutCirc:function(m,j,f,l,k){if((j/=k/2)<1){return -l/2*(Math.sqrt(1-j*j)-1)+f}return l/2*(Math.sqrt(1-(j-=2)*j)+1)+f},easeInElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return -(k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l))+f},easeOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return k*Math.pow(2,-10*j)*Math.sin((j*m-o)*2*Math.PI/l)+n+f},easeInOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m/2)==2){return f+n}l||(l=m*0.3*1.5);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}if(j<1){return -0.5*k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)+f}return k*Math.pow(2,-10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)*0.5+n+f},easeInBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*(j/=l)*j*((k+1)*j-k)+f},easeOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*((j=j/l-1)*j*((k+1)*j+k)+1)+f},easeInOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}if((j/=l/2)<1){return m/2*j*j*(((k*=1.525)+1)*j-k)+f}return m/2*((j-=2)*j*(((k*=1.525)+1)*j+k)+2)+f},easeInBounce:function(m,j,f,l,k){return l-q.easing.easeOutBounce(m,k-j,0,l,k)+f},easeOutBounce:function(m,j,f,l,k){return(j/=k)<1/2.75?l*7.5625*j*j+f:j<2/2.75?l*(7.5625*(j-=1.5/2.75)*j+0.75)+f:j<2.5/2.75?l*(7.5625*(j-=2.25/2.75)*j+0.9375)+f:l*(7.5625*(j-=2.625/2.75)*j+0.984375)+f},easeInOutBounce:function(m,j,f,l,k){if(j<k/2){return q.easing.easeInBounce(m,j*2,0,l,k)*0.5+f}return q.easing.easeOutBounce(m,j*2-k,0,l,k)*0.5+l*0.5+f}})}(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var c=a(this),l=["position","top","left"],m=a.effects.setMode(c,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(c,l);c.show();var n=a.effects.createWrapper(c).css({overflow:"hidden"}),k=o=="vertical"?"height":"width";o=o=="vertical"?n.height():n.width();m=="show"&&n.css(k,0);var j={};j[k]=m=="show"?o:0;n.animate(j,b.duration,b.options.easing,function(){m=="hide"&&c.hide();a.effects.restore(c,l);a.effects.removeWrapper(c);b.callback&&b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a){a.effects.bounce=function(c){return this.queue(function(){var w=a(this),e=["position","top","left"],q=a.effects.setMode(w,c.options.mode||"effect"),u=c.options.direction||"up",v=c.options.distance||20,b=c.options.times||5,p=c.duration||250;/show|hide/.test(q)&&e.push("opacity");a.effects.save(w,e);w.show();a.effects.createWrapper(w);var s=u=="up"||u=="down"?"top":"left";u=u=="up"||u=="left"?"pos":"neg";v=c.options.distance||(s=="top"?w.outerHeight({margin:true})/3:w.outerWidth({margin:true})/3);if(q=="show"){w.css("opacity",0).css(s,u=="pos"?-v:v)}if(q=="hide"){v/=b*2}q!="hide"&&b--;if(q=="show"){var r={opacity:1};r[s]=(u=="pos"?"+=":"-=")+v;w.animate(r,p/2,c.options.easing);v/=2;b--}for(r=0;r<b;r++){var o={},n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing);v=q=="hide"?v*2:v/2}if(q=="hide"){r={opacity:0};r[s]=(u=="pos"?"-=":"+=")+v;w.animate(r,p/2,c.options.easing,function(){w.hide();a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}else{o={};n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing,function(){a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}w.queue("fx",function(){w.dequeue()});w.dequeue()})}})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var e=a(this),j=["position","top","left","height","width"],m=a.effects.setMode(e,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(e,j);e.show();var n=a.effects.createWrapper(e).css({overflow:"hidden"});n=e[0].tagName=="IMG"?n:e;var l={size:o=="vertical"?"height":"width",position:o=="vertical"?"top":"left"};o=o=="vertical"?n.height():n.width();if(m=="show"){n.css(l.size,0);n.css(l.position,o/2)}var k={};k[l.size]=m=="show"?o:0;k[l.position]=m=="show"?0:o/2;n.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){m=="hide"&&e.hide();a.effects.restore(e,j);a.effects.removeWrapper(e);b.callback&&b.callback.apply(e[0],arguments);e.dequeue()}})})}})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var d=a(this),k=["position","top","left","opacity"],n=a.effects.setMode(d,b.options.mode||"hide"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d);var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true})/2:d.outerWidth({margin:true})/2);if(n=="show"){d.css("opacity",0).css(m,c=="pos"?-l:l)}var j={opacity:n=="show"?1:0};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var q=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,p=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var j=a(this).show().css("visibility","hidden"),m=j.offset();m.top-=parseInt(j.css("marginTop"),10)||0;m.left-=parseInt(j.css("marginLeft"),10)||0;for(var l=j.outerWidth(true),k=j.outerHeight(true),o=0;o<q;o++){for(var n=0;n<p;n++){j.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*(l/p),top:-o*(k/q)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:l/p,height:k/q,left:m.left+n*(l/p)+(b.options.mode=="show"?(n-Math.floor(p/2))*(l/p):0),top:m.top+o*(k/q)+(b.options.mode=="show"?(o-Math.floor(q/2))*(k/q):0),opacity:b.options.mode=="show"?0:1}).animate({left:m.left+n*(l/p)+(b.options.mode=="show"?0:(n-Math.floor(p/2))*(l/p)),top:m.top+o*(k/q)+(b.options.mode=="show"?0:(o-Math.floor(q/2))*(k/q)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?j.css({visibility:"visible"}):j.css({visibility:"visible"}).hide();b.callback&&b.callback.apply(j[0]);j.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fade=function(b){return this.queue(function(){var f=a(this),e=a.effects.setMode(f,b.options.mode||"hide");f.animate({opacity:e},{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"],u=a.effects.setMode(v,b.options.mode||"hide"),q=b.options.size||15,p=!!b.options.horizFirst,m=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(v,n);v.show();var s=a.effects.createWrapper(v).css({overflow:"hidden"}),r=u=="show"!=p,c=r?["width","height"]:["height","width"];r=r?[s.width(),s.height()]:[s.height(),s.width()];var o=/([0-9]+)%/.exec(q);if(o){q=parseInt(o[1],10)/100*r[u=="hide"?0:1]}if(u=="show"){s.css(p?{height:0,width:q}:{height:q,width:0})}p={};o={};p[c[0]]=u=="show"?r[0]:q;o[c[1]]=u=="show"?r[1]:0;s.animate(p,m,b.options.easing).animate(o,m,b.options.easing,function(){u=="hide"&&v.hide();a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(v[0],arguments);v.dequeue()})})}})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),h=["backgroundImage","backgroundColor","opacity"],i=a.effects.setMode(c,b.options.mode||"show"),g={backgroundColor:c.css("backgroundColor")};if(i=="hide"){g.opacity=0}a.effects.save(c,h);c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){i=="hide"&&c.hide();a.effects.restore(c,h);i=="show"&&!a.support.opacity&&this.style.removeAttribute("filter");b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,b.options.mode||"show");times=(b.options.times||5)*2-1;duration=b.duration?b.duration/2:a.fx.speeds._default/2;isVisible=d.is(":visible");animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if(e=="hide"&&isVisible||e=="show"&&!isVisible){times--}for(e=0;e<times;e++){d.animate({opacity:animateTo},duration,b.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,b.options.easing,function(){animateTo==0&&d.hide();b.callback&&b.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);(function(a){a.effects.puff=function(c){return this.queue(function(){var b=a(this),k=a.effects.setMode(b,c.options.mode||"hide"),j=parseInt(c.options.percent,10)||150,f=j/100,d={height:b.height(),width:b.width()};a.extend(c.options,{fade:true,mode:k,percent:k=="hide"?j:100,from:k=="hide"?d:{height:d.height*f,width:d.width*f}});b.effect("scale",c.options,c.duration,c.callback);b.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var b=a(this),m=a.extend(true,{},c.options),k=a.effects.setMode(b,c.options.mode||"effect"),j=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:k=="hide"?0:100),d=c.options.direction||"both",l=c.options.origin;if(k!="effect"){m.origin=l||["middle","center"];m.restore=true}l={height:b.height(),width:b.width()};b.from=c.options.from||(k=="show"?{height:0,width:0}:l);j={y:d!="horizontal"?j/100:1,x:d!="vertical"?j/100:1};b.to={height:l.height*j.y,width:l.width*j.x};if(c.options.fade){if(k=="show"){b.from.opacity=0;b.to.opacity=1}if(k=="hide"){b.from.opacity=1;b.to.opacity=0}}m.from=b.from;m.to=b.to;m.mode=k;b.effect("size",m,c.duration,c.callback);b.dequeue()})};a.effects.size=function(c){return this.queue(function(){var B=a(this),z=["position","top","left","width","height","overflow","opacity"],x=["position","top","left","overflow","opacity"],w=["width","height","overflow"],v=["fontSize"],y=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],s=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],b=a.effects.setMode(B,c.options.mode||"effect"),o=c.options.restore||false,q=c.options.scale||"both",r=c.options.origin,u={height:B.height(),width:B.width()};B.from=c.options.from||u;B.to=c.options.to||u;if(r){r=a.effects.getBaseline(r,u);B.from.top=(u.height-B.from.height)*r.y;B.from.left=(u.width-B.from.width)*r.x;B.to.top=(u.height-B.to.height)*r.y;B.to.left=(u.width-B.to.width)*r.x}var A={from:{y:B.from.height/u.height,x:B.from.width/u.width},to:{y:B.to.height/u.height,x:B.to.width/u.width}};if(q=="box"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(y);B.from=a.effects.setTransition(B,y,A.from.y,B.from);B.to=a.effects.setTransition(B,y,A.to.y,B.to)}if(A.from.x!=A.to.x){z=z.concat(s);B.from=a.effects.setTransition(B,s,A.from.x,B.from);B.to=a.effects.setTransition(B,s,A.to.x,B.to)}}if(q=="content"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(v);B.from=a.effects.setTransition(B,v,A.from.y,B.from);B.to=a.effects.setTransition(B,v,A.to.y,B.to)}}a.effects.save(B,o?z:x);B.show();a.effects.createWrapper(B);B.css("overflow","hidden").css(B.from);if(q=="content"||q=="both"){y=y.concat(["marginTop","marginBottom"]).concat(v);s=s.concat(["marginLeft","marginRight"]);w=z.concat(y).concat(s);B.find("*[width]").each(function(){child=a(this);o&&a.effects.save(child,w);var d={height:child.height(),width:child.width()};child.from={height:d.height*A.from.y,width:d.width*A.from.x};child.to={height:d.height*A.to.y,width:d.width*A.to.x};if(A.from.y!=A.to.y){child.from=a.effects.setTransition(child,y,A.from.y,child.from);child.to=a.effects.setTransition(child,y,A.to.y,child.to)}if(A.from.x!=A.to.x){child.from=a.effects.setTransition(child,s,A.from.x,child.from);child.to=a.effects.setTransition(child,s,A.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){o&&a.effects.restore(child,w)})})}B.animate(B.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){B.to.opacity===0&&B.css("opacity",B.from.opacity);b=="hide"&&B.hide();a.effects.restore(B,o?z:x);a.effects.removeWrapper(B);c.callback&&c.callback.apply(this,arguments);B.dequeue()}})})}})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"];a.effects.setMode(v,b.options.mode||"effect");var u=b.options.direction||"left",s=b.options.distance||20,d=b.options.times||3,r=b.duration||b.options.duration||140;a.effects.save(v,n);v.show();a.effects.createWrapper(v);var q=u=="up"||u=="down"?"top":"left",p=u=="up"||u=="left"?"pos":"neg";u={};var o={},m={};u[q]=(p=="pos"?"-=":"+=")+s;o[q]=(p=="pos"?"+=":"-=")+s*2;m[q]=(p=="pos"?"-=":"+=")+s*2;v.animate(u,r,b.options.easing);for(s=1;s<d;s++){v.animate(o,r,b.options.easing).animate(m,r,b.options.easing)}v.animate(o,r,b.options.easing).animate(u,r/2,b.options.easing,function(){a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(this,arguments)});v.queue("fx",function(){v.dequeue()});v.dequeue()})}})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var d=a(this),k=["position","top","left"],n=a.effects.setMode(d,b.options.mode||"show"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d).css({overflow:"hidden"});var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(n=="show"){d.css(m,c=="pos"?-l:l)}var j={};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var e=a(this),i=a(b.options.to),h=i.offset();i={top:h.top,left:h.left,height:i.innerHeight(),width:i.innerWidth()};h=e.offset();var g=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:h.top,left:h.left,height:e.innerHeight(),width:e.innerWidth(),position:"absolute"}).animate(i,b.duration,b.options.easing,function(){g.remove();b.callback&&b.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var e=this,c=e.options;e.running=0;e.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");e.headers=e.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});e.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var h=e.element.find("a").filter(c.navigationFilter).eq(0);if(h.length){var g=h.closest(".ui-accordion-header");e.active=g.length?g:h.closest(".ui-accordion-content").prev()}}e.active=e._findActive(e.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");e.active.next().addClass("ui-accordion-content-active");e._createIcons();e.resize();e.element.attr("role","tablist");e.headers.attr("role","tab").bind("keydown.accordion",function(b){return e._keydown(b)}).next().attr("role","tabpanel");e.headers.not(e.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();e.active.length?e.active.attr({"aria-expanded":"true",tabIndex:0}):e.headers.eq(0).attr("tabIndex",0);a.browser.safari||e.headers.find("a").attr("tabIndex",-1);c.event&&e.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(b){e._clickHandler.call(e,b,this);b.preventDefault()})},_createIcons:function(){var b=this.options;if(b.icons){a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight){c.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();c&&this._createIcons()}if(d=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(e){if(!(this.options.disabled||e.altKey||e.ctrlKey)){var c=a.ui.keyCode,j=this.headers.length,i=this.headers.index(e.target),h=false;switch(e.keyCode){case c.RIGHT:case c.DOWN:h=this.headers[(i+1)%j];break;case c.LEFT:case c.UP:h=this.headers[(i-1+j)%j];break;case c.SPACE:case c.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(h){a(e.target).attr("tabIndex",-1);a(h).attr("tabIndex",0);h.focus();return false}return true}},resize:function(){var e=this.options,c;if(e.fillSpace){if(a.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(e.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}}return this},activate:function(b){this.options.active=b;b=this._findActive(b)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b==="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(e,c){var l=this.options;if(!l.disabled){if(e.target){e=a(e.currentTarget||c);c=e[0]===this.active[0];l.active=l.collapsible&&c?false:this.headers.index(e);if(!(this.running||!l.collapsible&&c)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);if(!c){e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(l.icons.header).addClass(l.icons.headerSelected);e.next().addClass("ui-accordion-content-active")}i=e.next();k=this.active.next();j={options:l,newHeader:c&&l.collapsible?a([]):e,oldHeader:this.active,newContent:c&&l.collapsible?a([]):i,oldContent:k};l=this.headers.index(this.active[0])>this.headers.index(e[0]);this.active=c?a([]):e;this._toggle(i,k,j,c,l)}}else{if(l.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);this.active.next().addClass("ui-accordion-content-active");var k=this.active.next(),j={options:l,newHeader:a([]),oldHeader:l.active,newContent:a([]),oldContent:k},i=this.active=a([]);this._toggle(i,k,j)}}}},_toggle:function(u,s,r,p,o){var n=this,q=n.options;n.toShow=u;n.toHide=s;n.data=r;var l=function(){if(n){return n._completed.apply(n,arguments)}};n._trigger("changestart",null,n.data);n.running=s.size()===0?u.size():s.size();if(q.animated){r={};r=q.collapsible&&p?{toShow:a([]),toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace}:{toShow:u,toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace};if(!q.proxied){q.proxied=q.animated}if(!q.proxiedDuration){q.proxiedDuration=q.duration}q.animated=a.isFunction(q.proxied)?q.proxied(r):q.proxied;q.duration=a.isFunction(q.proxiedDuration)?q.proxiedDuration(r):q.proxiedDuration;p=a.ui.accordion.animations;var m=q.duration,c=q.animated;if(c&&!p[c]&&!a.easing[c]){c="slide"}p[c]||(p[c]=function(b){this.slide(b,{easing:c,duration:m||700})});p[c](r)}else{if(q.collapsible&&p){u.toggle()}else{s.hide();u.show()}l(true)}s.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();u.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(b){this.running=b?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.4",animations:{slide:function(i,c){i=a.extend({easing:"swing",duration:300},i,c);if(i.toHide.size()){if(i.toShow.size()){var n=i.toShow.css("overflow"),l=0,k={},j={},m;c=i.toShow;m=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(b,d){j[d]="hide";b=(""+a.css(i.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);k[d]={value:b[1],unit:b[2]||"px"}});i.toShow.css({height:0,overflow:"hidden"}).show();i.toHide.filter(":hidden").each(i.complete).end().filter(":visible").animate(j,{step:function(b,d){if(d.prop=="height"){l=d.end-d.start===0?0:(d.now-d.start)/(d.end-d.start)}i.toShow[0].style[d.prop]=l*k[d.prop].value+k[d.prop].unit},duration:i.duration,easing:i.easing,complete:function(){i.autoHeight||i.toShow.css("height","");i.toShow.css({width:m,overflow:n});i.complete()}})}else{i.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},i)}}else{i.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},i)}},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})}}})})(jQuery);(function(a){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var d=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!d.options.disabled){var b=a.ui.keyCode;switch(e.keyCode){case b.PAGE_UP:d._move("previousPage",e);break;case b.PAGE_DOWN:d._move("nextPage",e);break;case b.UP:d._move("previous",e);e.preventDefault();break;case b.DOWN:d._move("next",e);e.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:d.menu.element.is(":visible")&&e.preventDefault();case b.TAB:if(!d.menu.active){return}d.menu.select(e);break;case b.ESCAPE:d.element.val(d.term);d.close(e);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,e)}},d.options.delay);break}}}).bind("focus.autocomplete",function(){if(!d.options.disabled){d.selectedItem=null;d.previous=d.element.val()}}).bind("blur.autocomplete",function(b){if(!d.options.disabled){clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(b);d._change(b)},150)}});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(e){var b=d.menu.element[0];e.target===b&&setTimeout(function(){a(document).one("mousedown",function(g){g.target!==d.element[0]&&g.target!==b&&!a.ui.contains(b,g.target)&&d.close()})},1);setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(e,b){b=b.item.data("item.autocomplete");false!==d._trigger("focus",null,{item:b})&&/^key/.test(e.originalEvent.type)&&d.element.val(b.value)},selected:function(g,e){e=e.item.data("item.autocomplete");var b=d.previous;if(d.element[0]!==c.activeElement){d.element.focus();d.previous=b}false!==d._trigger("select",g,{item:e})&&d.element.val(e.value);d.close(g);d.selectedItem=e},blur:function(){d.menu.element.is(":visible")&&d.element.val()!==d.term&&d.element.val(d.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d==="source"&&this._initSource();if(d==="appendTo"){this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0])}},_initSource:function(){var d,c;if(a.isArray(this.options.source)){d=this.options.source;this.source=function(e,b){b(a.ui.autocomplete.filter(d,e.term))}}else{if(typeof this.options.source==="string"){c=this.options.source;this.source=function(e,b){a.getJSON(c,e,b)}}else{this.source=this.options.source}}},search:function(d,c){d=d!=null?d:this.element.val();if(d.length<this.options.minLength){return this.close(c)}clearTimeout(this.closing);if(this._trigger("search")!==false){return this._search(d)}},_search:function(b){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:b},this.response)},_response:function(b){if(b.length){b=this._normalize(b);this._suggest(b);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")},close:function(b){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",b);this.menu.element.hide();this.menu.deactivate()}},_change:function(b){this.previous!==this.element.val()&&this._trigger("change",b,{item:this.selectedItem})},_normalize:function(b){if(b.length&&b[0].label&&b[0].value){return b}return a.map(b,function(c){if(typeof c==="string"){return{label:c,value:c}}return a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(e){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1),f;this._renderMenu(d,e);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(a.extend({of:this.element},this.options.position));e=d.width("").outerWidth();f=this.element.outerWidth();d.outerWidth(Math.max(e,f))},_renderMenu:function(e,d){var f=this;a.each(d,function(c,b){f._renderItem(e,b)})},_renderItem:function(d,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(d)},_move:function(d,c){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[d](c)}}else{this.search(null,c)}},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,d){var f=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(e,function(b){return f.test(b.label||b.value||b)})}})})(jQuery);(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();b.select(c)}});this.refresh()},refresh:function(){var b=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(g,e){this.deactivate();if(this.hasScroll()){var j=e.offset().top-this.element.offset().top,i=this.element.attr("scrollTop"),h=this.element.height();if(j<0){this.element.attr("scrollTop",i+j)}else{j>h&&this.element.attr("scrollTop",i+j-h+e.height())}}this.active=e.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",g,{item:e})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,d,f){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(f,e):this.activate(f,this.element.children(d))}else{this.activate(f,this.element.children(d))}},nextPage:function(f){if(this.hasScroll()){if(!this.active||this.last()){this.activate(f,this.element.children(":first"))}else{var e=this.active.offset().top,h=this.element.height(),g=this.element.children("li").filter(function(){var b=a(this).offset().top-e-h+a(this).height();return b<10&&b>-10});g.length||(g=this.element.children(":last"));this.activate(f,g)}}else{this.activate(f,this.element.children(!this.active||this.last()?":first":":last"))}},previousPage:function(e){if(this.hasScroll()){if(!this.active||this.first()){this.activate(e,this.element.children(":last"))}else{var d=this.active.offset().top,f=this.element.height();result=this.element.children("li").filter(function(){var b=a(this).offset().top-d+f-a(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(e,result)}}else{this.activate(e,this.element.children(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})})(jQuery);(function(b){var e,c=function(a){b(":ui-button",a.target.form).each(function(){var f=b(this).data("button");setTimeout(function(){f.refresh()},1)})},d=function(a){var h=a.name,g=a.form,f=b([]);if(h){f=g?b(g).find("[name='"+h+"']"):b("[name='"+h+"']",a.ownerDocument).filter(function(){return !this.form})}return f};b.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",c);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,h=this.options,g=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!g?" ui-state-active":"");if(h.label===null){h.label=this.buttonElement.html()}if(this.element.is(":disabled")){h.disabled=true}this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!h.disabled){b(this).addClass("ui-state-hover");this===e&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){h.disabled||b(this).removeClass(f)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});g&&this.element.bind("change.button",function(){a.refresh()});if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);var i=a.element[0];d(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");e=this;b(document).one("mouseup",function(){e=null})}).bind("mouseup.button",function(){if(h.disabled){return false}b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(h.disabled){return false}if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER){b(this).addClass("ui-state-active")}}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}}this._setOption("disabled",h.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var a=this.element.is(":checked");a&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(a,f){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled"){f?this.element.attr("disabled",true):this.element.removeAttr("disabled")}this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio"){d(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)})}else{if(this.type==="checkbox"){this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label)}else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),h=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),g=this.options.icons,f=g.primary&&g.secondary;if(g.primary||g.secondary){a.addClass("ui-button-text-icon"+(f?"s":g.primary?"-primary":"-secondary"));g.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>");g.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>");if(!this.options.text){a.addClass(f?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||a.attr("title",h)}}else{a.addClass("ui-button-text-only")}}}});b.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(a,f){a==="disabled"&&this.buttons.button("option",a,f);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);(function(d,G){function L(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function E(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==G){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b)}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().removeClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().addClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass,b.dpDiv).add(d("td."+d.datepicker._currentClass,b.dpDiv));c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-i[0],top:-i[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),k=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose")){a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,k=c=-1,l=-1,u=-1,j=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p){throw"Missing number at position "+s}s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++){if(b.substr(s,p[w].length)==p[w]){s+=p[w].length;return w+1}}throw"Unknown name at position "+s},r=function(){if(b.charAt(s)!=a.charAt(z)){throw"Unexpected literal at position "+s}s++},s=0,z=0;z<a.length;z++){if(j){if(a.charAt(z)=="'"&&!o("'")){j=false}else{r()}}else{switch(a.charAt(z)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":k=m("m");break;case"M":k=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){r()}else{j=true}break;default:r()}}}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){k=1;l=u;do{e=this._getDaysInMonth(c,k-1);if(l<=e){break}k++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,k-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=k||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=j+1<a.length&&a.charAt(j+1)==o)&&j++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},k=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b){for(var j=0;j<a.length;j++){if(u){if(a.charAt(j)=="'"&&!i("'")){u=false}else{l+=a.charAt(j)}}else{switch(a.charAt(j)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000,3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(j)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,k=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=u.exec(h);j;){switch(j[2]||"d"){case"d":case"D":g+=parseInt(j[1],10);break;case"w":case"W":g+=parseInt(j[1],10)*7;break;case"m":case"M":l+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break;case"y":case"Y":k+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break}j=u.exec(h)}return new Date(k,l,g)};if(b=(b=b==null?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):b)&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),j=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=j&&n<j?j:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-k,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+k,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";k=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;k=!h?k:this.formatDate(k,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;k=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),w=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var N="",D=0;D<i[1];D++){var J=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1){switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,A)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,K=B&&!H||!F[0]||j&&q<j||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==J.getTime()&&g==a.selectedMonth&&a._keyEvent||M.getTime()==q.getTime()&&M.getTime()==J.getTime()?" "+this._dayOverClass:"")+(K?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(K?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?" ":K?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==J.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=x}I+=N}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='<div class="ui-datepicker-title">',o="";if(h||!k){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l){j+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){j+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}j+="</select>"}j+=this._get(a,"yearSuffix");if(u){j+=(h||!(k&&l)?" ":"")+o}j+="</div>";return j},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);(function(b,a){b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(d){var c=b(this).css(d).offset().top;c<0&&b(this).css("top",d.top-c)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}var i=this,c=i.options,n=c.title||i.originalTitle||" ",l=b.ui.dialog.getTitleId(i.element),k=(i.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c.dialogClass).css({zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(d){if(c.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){i.close(d);d.preventDefault()}}).attr({role:"dialog","aria-labelledby":l}).mousedown(function(d){i.moveToTop(false,d)});i.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var m=(i.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),j=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(d){i.close(d);return false}).appendTo(m);(i.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j);b("<span></span>").addClass("ui-dialog-title").attr("id",l).html(n).prependTo(m);if(b.isFunction(c.beforeclose)&&!b.isFunction(c.beforeClose)){c.beforeClose=c.beforeclose}m.find("*").add(m).disableSelection();c.draggable&&b.fn.draggable&&i._makeDraggable();c.resizable&&b.fn.resizable&&i._makeResizable();i._createButtons(c.buttons);i._isOpen=false;b.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var c=this;c.overlay&&c.overlay.destroy();c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");c.uiDialog.remove();c.originalTitle&&c.element.attr("title",c.originalTitle);return c},widget:function(){return this.uiDialog},close:function(e){var c=this,f;if(false!==c._trigger("beforeClose",e)){c.overlay&&c.overlay.destroy();c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",e)})}else{c.uiDialog.hide();c._trigger("close",e)}b.ui.dialog.overlay.resize();if(c.options.modal){f=0;b(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){f=Math.max(f,b(this).css("z-index"))}});b.ui.dialog.maxZ=f}return c}},isOpen:function(){return this._isOpen},moveToTop:function(e,c){var h=this,g=h.options;if(g.modal&&!e||!g.stack&&!g.modal){return h._trigger("focus",c)}if(g.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=g.zIndex}if(h.overlay){b.ui.dialog.maxZ+=1;h.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:h.element.attr("scrollTop"),scrollLeft:h.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;h.uiDialog.css("z-index",b.ui.dialog.maxZ);h.element.attr(e);h._trigger("focus",c);return h},open:function(){if(!this._isOpen){var e=this,c=e.options,f=e.uiDialog;e.overlay=c.modal?new b.ui.dialog.overlay(e):null;f.next().length&&f.appendTo("body");e._size();e._position(c.position);f.show(c.show);e.moveToTop(true);c.modal&&f.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var d=b(":tabbable",this),i=d.filter(":first");d=d.filter(":last");if(h.target===d[0]&&!h.shiftKey){i.focus(1);return false}else{if(h.target===i[0]&&h.shiftKey){d.focus(1);return false}}}});b(e.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();e._trigger("open");e._isOpen=true;return e}},_createButtons:function(e){var c=this,j=false,i=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),h=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(i);c.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return !(j=true)});if(j){b.each(e,function(f,d){f=b('<button type="button"></button>').text(f).click(function(){d.apply(c.element[0],arguments)}).appendTo(h);b.fn.button&&f.button()});i.appendTo(c.uiDialog)}},_makeDraggable:function(){function e(d){return{position:d.position,offset:d.offset}}var c=this,j=c.options,i=b(document),h;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,d){h=j.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",f,e(d))},drag:function(f,d){c._trigger("drag",f,e(d))},stop:function(f,d){j.position=[d.position.left-i.scrollLeft(),d.position.top-i.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(h);c._trigger("dragStop",f,e(d));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function c(d){return{originalPosition:d.originalPosition,originalSize:d.originalSize,position:d.position,size:d.size}}e=e===a?this.options.resizable:e;var j=this,i=j.options,h=j.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";j.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:j.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:j._minHeight(),handles:e,start:function(f,d){b(this).addClass("ui-dialog-resizing");j._trigger("resizeStart",f,c(d))},resize:function(f,d){j._trigger("resize",f,c(d))},stop:function(f,d){b(this).removeClass("ui-dialog-resizing");i.height=b(this).height();i.width=b(this).width();j._trigger("resizeStop",f,c(d));b.ui.dialog.overlay.resize()}}).css("position",h).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(e){var c=[],h=[0,0],g;if(e){if(typeof e==="string"||typeof e==="object"&&"0" in e){c=e.split?e.split(" "):[e[0],e[1]];if(c.length===1){c[1]=c[0]}b.each(["left","top"],function(d,f){if(+c[d]===c[d]){h[d]=c[d];c[d]=f}});e={my:c.join(" "),at:c.join(" "),offset:h.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else{e=b.ui.dialog.prototype.options.position}(g=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(e);g||this.uiDialog.hide()},_setOption:function(h,c){var l=this,j=l.uiDialog,i=j.is(":data(resizable)"),k=false;switch(h){case"beforeclose":h="beforeClose";break;case"buttons":l._createButtons(c);k=true;break;case"closeText":l.uiDialogTitlebarCloseText.text(""+c);break;case"dialogClass":j.removeClass(l.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c);break;case"disabled":c?j.addClass("ui-dialog-disabled"):j.removeClass("ui-dialog-disabled");break;case"draggable":c?l._makeDraggable():j.draggable("destroy");break;case"height":k=true;break;case"maxHeight":i&&j.resizable("option","maxHeight",c);k=true;break;case"maxWidth":i&&j.resizable("option","maxWidth",c);k=true;break;case"minHeight":i&&j.resizable("option","minHeight",c);k=true;break;case"minWidth":i&&j.resizable("option","minWidth",c);k=true;break;case"position":l._position(c);break;case"resizable":i&&!c&&j.resizable("destroy");i&&typeof c==="string"&&j.resizable("option","handles",c);!i&&c!==false&&l._makeResizable(c);break;case"title":b(".ui-dialog-title",l.uiDialogTitlebar).html(""+(c||" "));break;case"width":k=true;break}b.Widget.prototype._setOption.apply(l,arguments);k&&l._size()},_size:function(){var d=this.options,c;this.element.css({width:"auto",minHeight:0,height:0});if(d.minWidth>d.width){d.width=d.minWidth}c=this.uiDialog.css({height:"auto",width:d.width}).height();this.element.css(d.height==="auto"?{minHeight:Math.max(d.minHeight-c,0),height:"auto"}:{minHeight:0,height:Math.max(d.height-c,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c){this.uuid+=1;c=this.uuid}return"ui-dialog-title-"+c},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(e){return b(e.target).zIndex()>=b.ui.dialog.overlay.maxZ})},1);b(document).bind("keydown.dialog-overlay",function(e){if(d.options.closeOnEscape&&e.keyCode&&e.keyCode===b.ui.keyCode.ESCAPE){d.close(e);e.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});b.fn.bgiframe&&c.bgiframe();this.instances.push(c);return c},destroy:function(d){this.oldInstances.push(this.instances.splice(b.inArray(d,this.instances),1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");d.remove();var c=0;b.each(this.instances,function(){c=Math.max(c,this.css("z-index"))});this.maxZ=c},height:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return d<c?b(window).height()+"px":d+"px"}else{return b(document).height()+"px"}},width:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return d<c?b(window).width()+"px":d+"px"}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(f){f.ui=f.ui||{};var a=/left|center|right/,e=/top|center|bottom/,d=f.fn.position,b=f.fn.offset;f.fn.position=function(j){if(!j||!j.of){return d.apply(this,arguments)}j=f.extend({},j);var c=f(j.of),o=(j.collision||"flip").split(" "),n=j.offset?j.offset.split(" "):[0,0],m,l,k;if(j.of.nodeType===9){m=c.width();l=c.height();k={top:0,left:0}}else{if(j.of.scrollTo&&j.of.document){m=c.width();l=c.height();k={top:c.scrollTop(),left:c.scrollLeft()}}else{if(j.of.preventDefault){j.at="left top";m=l=0;k={top:j.of.pageY,left:j.of.pageX}}else{m=c.outerWidth();l=c.outerHeight();k=c.offset()}}}f.each(["my","at"],function(){var g=(j[this]||"").split(" ");if(g.length===1){g=a.test(g[0])?g.concat(["center"]):e.test(g[0])?["center"].concat(g):["center","center"]}g[0]=a.test(g[0])?g[0]:"center";g[1]=e.test(g[1])?g[1]:"center";j[this]=g});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(j.at[0]==="right"){k.left+=m}else{if(j.at[0]==="center"){k.left+=m/2}}if(j.at[1]==="bottom"){k.top+=l}else{if(j.at[1]==="center"){k.top+=l/2}}k.left+=n[0];k.top+=n[1];return this.each(function(){var p=f(this),h=p.outerWidth(),g=p.outerHeight(),i=f.extend({},k);if(j.my[0]==="right"){i.left-=h}else{if(j.my[0]==="center"){i.left-=h/2}}if(j.my[1]==="bottom"){i.top-=g}else{if(j.my[1]==="center"){i.top-=g/2}}i.left=parseInt(i.left);i.top=parseInt(i.top);f.each(["left","top"],function(s,q){f.ui.position[o[s]]&&f.ui.position[o[s]][q](i,{targetWidth:m,targetHeight:l,elemWidth:h,elemHeight:g,offset:n,my:j.my,at:j.at})});f.fn.bgiframe&&p.bgiframe();p.offset(f.extend(i,{using:j.using}))})};f.ui.position={fit:{left:function(g,c){var h=f(window);c=g.left+c.elemWidth-h.width()-h.scrollLeft();g.left=c>0?g.left-c:Math.max(0,g.left)},top:function(g,c){var h=f(window);c=g.top+c.elemHeight-h.height()-h.scrollTop();g.top=c>0?g.top-c:Math.max(0,g.top)}},flip:{left:function(h,c){if(c.at[0]!=="center"){var k=f(window);k=h.left+c.elemWidth-k.width()-k.scrollLeft();var j=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,i=-2*c.offset[0];h.left+=h.left<0?j+c.targetWidth+i:k>0?j-c.targetWidth+i:0}},top:function(i,c){if(c.at[1]!=="center"){var m=f(window);m=i.top+c.elemHeight-m.height()-m.scrollTop();var l=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,k=c.at[1]==="top"?c.targetHeight:-c.targetHeight,j=-2*c.offset[1];i.top+=i.top<0?l+c.targetHeight+j:m>0?l+k+j:0}}}};if(!f.offset.setOffset){f.offset.setOffset=function(i,c){if(/static/.test(f.curCSS(i,"position"))){i.style.position="relative"}var m=f(i),l=m.offset(),k=parseInt(f.curCSS(i,"top",true),10)||0,j=parseInt(f.curCSS(i,"left",true),10)||0;l={top:c.top-l.top+k,left:c.left-l.left+j};"using" in c?c.using.call(i,l):m.css(l)};f.fn.offset=function(g){var c=this[0];if(!c||!c.ownerDocument){return null}if(g){return this.each(function(){f.offset.setOffset(this,g)})}return b.call(this)}}})(jQuery);(function(a,d){a.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===d){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){if(b==="value"){this.options.value=c;this._refreshValue();this._trigger("change")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!=="number"){b=0}return Math.min(this.max,Math.max(this.min,b))},_refreshValue:function(){var b=this.value();this.valueDiv.toggleClass("ui-corner-right",b===this.max).width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");c.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!==2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range==="min"||c.range==="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length===0&&a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");if(c.values&&c.values.length){for(;a(".ui-slider-handle",this.element).length<c.values.length;){a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled){a(this).blur()}else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(n){var m=true,l=a(this).data("index.ui-slider-handle"),j,k,b;if(!d.options.disabled){switch(n.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:m=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");j=d._start(n,l);if(j===false){return}}break}b=d.options.step;j=d.options.values&&d.options.values.length?(k=d.values(l)):(k=d.value());switch(n.keyCode){case a.ui.keyCode.HOME:k=d._valueMin();break;case a.ui.keyCode.END:k=d._valueMax();break;case a.ui.keyCode.PAGE_UP:k=d._trimAlignValue(j+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:k=d._trimAlignValue(j-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(j===d._valueMax()){return}k=d._trimAlignValue(j+b);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(j===d._valueMin()){return}k=d._trimAlignValue(j-b);break}d._slide(n,l,k);return m}}).keyup(function(f){var b=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(f,b);d._change(f,b);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(i){var d=this.options,n,m,l,j,k;if(d.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();n=this._normValueFromMouse({x:i.pageX,y:i.pageY});m=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(c){var b=Math.abs(n-j.values(c));if(m>b){m=b;l=a(this);k=c}});if(d.range===true&&this.values(1)===d.min){k+=1;l=a(this.handles[k])}if(this._start(i,k)===false){return false}this._mouseSliding=true;j._handleIndex=k;l.addClass("ui-state-active").focus();d=l.offset();this._clickOffset=!a(i.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:i.pageX-d.left-l.width()/2,top:i.pageY-d.top-l.height()/2-(parseInt(l.css("borderTopWidth"),10)||0)-(parseInt(l.css("borderBottomWidth"),10)||0)+(parseInt(l.css("marginTop"),10)||0)};this._slide(i,k,n);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1){c=1}if(c<0){c=0}if(this.orientation==="vertical"){c=1-c}d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}return this._trigger("start",e,f)},_slide:function(f,d,h){var g;if(this.options.values&&this.options.values.length){g=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&h>g||d===1&&h<g)){h=g}if(h!==this.values(d)){g=this.values();g[d]=h;f=this._trigger("slide",f,{handle:this.handles[d],value:h,values:g});this.values(d?0:1);f!==false&&this.values(d,h,true)}}else{if(h!==this.value()){f=this._trigger("slide",f,{handle:this.handles[d],value:h});f!==false&&this.value(h)}}},_stop:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("stop",e,f)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("change",e,f)}},value:function(b){if(arguments.length){this.options.value=this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(g,d){var j,i,h;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(d);this._refreshValue();this._change(null,g)}if(arguments.length){if(a.isArray(arguments[0])){j=this.options.values;i=arguments[0];for(h=0;h<j.length;h+=1){j[h]=this._trimAlignValue(i[h]);this._change(null,h)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(g):this.value()}}else{return this._values()}},_setOption:function(f,d){var h,g=0;if(a.isArray(this.options.values)){g=this.options.values.length}a.Widget.prototype._setOption.apply(this,arguments);switch(f){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(h=0;h<g;h+=1){this._change(null,h)}this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(e){var d,f;if(arguments.length){d=this.options.values[e];return d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(f=0;f<d.length;f+=1){d[f]=this._trimAlignValue(d[f])}return d}},_trimAlignValue:function(e){if(e<this._valueMin()){return this._valueMin()}if(e>this._valueMax()){return this._valueMax()}var d=this.options.step>0?this.options.step:1,f=e%d;e=e-f;if(Math.abs(f)*2>=d){e+=f>0?d:-d}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var u=this.options.range,s=this.options,r=this,q=!this._animateOff?s.animate:false,p,n={},o,m,k,d;if(this.options.values&&this.options.values.length){this.handles.each(function(b){p=(r.values(b)-r._valueMin())/(r._valueMax()-r._valueMin())*100;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";a(this).stop(1,1)[q?"animate":"css"](n,s.animate);if(r.options.range===true){if(r.orientation==="horizontal"){if(b===0){r.range.stop(1,1)[q?"animate":"css"]({left:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({width:p-o+"%"},{queue:false,duration:s.animate})}}else{if(b===0){r.range.stop(1,1)[q?"animate":"css"]({bottom:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({height:p-o+"%"},{queue:false,duration:s.animate})}}}o=p})}else{m=this.value();k=this._valueMin();d=this._valueMax();p=d!==k?(m-k)/(d-k)*100:0;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";this.handle.stop(1,1)[q?"animate":"css"](n,s.animate);if(u==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[q?"animate":"css"]({width:p+"%"},s.animate)}if(u==="max"&&this.orientation==="horizontal"){this.range[q?"animate":"css"]({width:100-p+"%"},{queue:false,duration:s.animate})}if(u==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[q?"animate":"css"]({height:p+"%"},s.animate)}if(u==="max"&&this.orientation==="vertical"){this.range[q?"animate":"css"]({height:100-p+"%"},{queue:false,duration:s.animate})}}}});a.extend(a.ui.slider,{version:"1.8.4"})})(jQuery);(function(g,f){function e(){return ++c}function b(){return ++a}var c=0,a=0;g.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected"){this.options.collapsible&&h==this.options.selected||this.select(h)}else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return g.cookie.apply(null,[d].concat(g.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=g(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(z){function w(h,i){h.css("display","");!g.support.opacity&&i.opacity&&h[0].style.removeAttribute("filter")}var y=this,x=this.options,v=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=g("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return g("a",this)[0]});this.panels=g([]);this.anchors.each(function(k,n){var i=g(n).attr("href"),h=i.split("#")[0],m;if(h&&(h===location.toString().split("#")[0]||(m=g("base")[0])&&h===m.href)){i=n.hash;n.href=i}if(v.test(i)){y.panels=y.panels.add(y._sanitizeSelector(i))}else{if(i!=="#"){g.data(n,"href.tabs",i);g.data(n,"load.tabs",i.replace(/#.*$/,""));i=y._tabId(n);n.href="#"+i;n=g("#"+i);if(!n.length){n=g(x.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(y.panels[k-1]||y.list);n.data("destroy.tabs",true)}y.panels=y.panels.add(n)}else{x.disabled.push(k)}}});if(z){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(x.selected===f){location.hash&&this.anchors.each(function(h,i){if(i.hash==location.hash){x.selected=h;return false}});if(typeof x.selected!=="number"&&x.cookie){x.selected=parseInt(y._cookie(),10)}if(typeof x.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}x.selected=x.selected||(this.lis.length?0:-1)}else{if(x.selected===null){x.selected=-1}}x.selected=x.selected>=0&&this.anchors[x.selected]||x.selected<0?x.selected:0;x.disabled=g.unique(x.disabled.concat(g.map(this.lis.filter(".ui-state-disabled"),function(h){return y.lis.index(h)}))).sort();g.inArray(x.selected,x.disabled)!=-1&&x.disabled.splice(g.inArray(x.selected,x.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(x.selected>=0&&this.anchors.length){this.panels.eq(x.selected).removeClass("ui-tabs-hide");this.lis.eq(x.selected).addClass("ui-tabs-selected ui-state-active");y.element.queue("tabs",function(){y._trigger("show",null,y._ui(y.anchors[x.selected],y.panels[x.selected]))});this.load(x.selected)}g(window).bind("unload",function(){y.lis.add(y.anchors).unbind(".tabs");y.lis=y.anchors=y.panels=null})}else{x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[x.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");x.cookie&&this._cookie(x.selected,x.cookie);z=0;for(var u;u=this.lis[z];z++){g(u)[g.inArray(z,x.disabled)!=-1&&!g(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}x.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(x.event!=="mouseover"){var q=function(h,i){i.is(":not(.ui-state-disabled)")&&i.addClass("ui-state-"+h)},l=function(h,i){i.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){q("hover",g(this))});this.lis.bind("mouseout.tabs",function(){l("hover",g(this))});this.anchors.bind("focus.tabs",function(){q("focus",g(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",g(this).closest("li"))})}var p,j;if(x.fx){if(g.isArray(x.fx)){p=x.fx[0];j=x.fx[1]}else{p=j=x.fx}}var d=j?function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){w(i,j);y._trigger("show",null,y._ui(h,i[0]))})}:function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");y._trigger("show",null,y._ui(h,i[0]))},A=p?function(h,i){i.animate(p,p.duration||"normal",function(){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");w(i,p);y.element.dequeue("tabs")})}:function(h,i){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");y.element.dequeue("tabs")};this.anchors.bind(x.event+".tabs",function(){var k=this,m=g(k).closest("li"),i=y.panels.filter(":not(.ui-tabs-hide)"),h=g(y._sanitizeSelector(k.hash));if(m.hasClass("ui-tabs-selected")&&!x.collapsible||m.hasClass("ui-state-disabled")||m.hasClass("ui-state-processing")||y._trigger("select",null,y._ui(this,h[0]))===false){this.blur();return false}x.selected=y.anchors.index(this);y.abort();if(x.collapsible){if(m.hasClass("ui-tabs-selected")){x.selected=-1;x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){A(k,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this));this.blur();return false}}}x.cookie&&y._cookie(x.selected,x.cookie);if(h.length){i.length&&y.element.queue("tabs",function(){A(k,i)});y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}g.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=g.data(this,"href.tabs");if(i){this.href=i}var h=g(this).unbind(".tabs");g.each(["href","load","cache"],function(k,j){h.removeData(j+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){g.data(this,"destroy.tabs")?g(this).remove():g(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(j,m,d){if(d===f){d=this.anchors.length}var n=this,l=this.options;m=g(l.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,m));j=!j.indexOf("#")?j.replace("#",""):this._tabId(g("a",m)[0]);m.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=g("#"+j);k.length||(k=g(l.panelTemplate).attr("id",j).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(d>=this.lis.length){m.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{m.insertBefore(this.lis[d]);k.insertBefore(this.panels[d])}l.disabled=g.map(l.disabled,function(h){return h>=d?++h:h});this._tabify();if(this.anchors.length==1){l.selected=0;m.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[0],n.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]));return this},remove:function(h){h=this._getIndex(h);var i=this.options,d=this.lis.eq(h).remove(),j=this.panels.eq(h).remove();if(d.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(h+(h+1<this.anchors.length?1:-1))}i.disabled=g.map(g.grep(i.disabled,function(k){return k!=h}),function(k){return k>=h?--k:k});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(g.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=g.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1){if(this.options.collapsible&&this.options.selected!=-1){d=this.options.selected}else{return this}}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(j){j=this._getIndex(j);var m=this,d=this.options,n=this.anchors.eq(j)[0],l=g.data(n,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&g.data(n,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(j).addClass("ui-state-processing");if(d.spinner){var k=g("span",n);k.data("label.tabs",k.html()).html(d.spinner)}this.xhr=g.ajax(g.extend({},d.ajaxOptions,{url:l,success:function(i,o){g(m._sanitizeSelector(n.hash)).html(i);m._cleanup();d.cache&&g.data(n,"cache.tabs",true);m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.success(i,o)}catch(h){}},error:function(i,o){m._cleanup();m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.error(i,o,j,n)}catch(h){}}}));m.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});g.extend(g.ui.tabs,{version:"1.8.4"});g.extend(g.ui.tabs.prototype,{rotation:null,rotate:function(i,k){var d=this,l=this.options,j=d._rotate||(d._rotate=function(h){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var m=l.selected;d.select(++m<d.anchors.length?m:0)},i);h&&h.stopPropagation()});k=d._unrotate||(d._unrotate=!k?function(h){h.clientX&&d.rotate(null)}:function(){t=l.selected;j()});if(i){this.element.bind("tabsshow",j);this.anchors.bind(l.event+".tabs",k);j()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(l.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);jQuery(function(f){var e=f("meta[name=csrf-token]").attr("content"),g=f("meta[name=csrf-param]").attr("content");f.fn.extend({triggerAndReturn:function(h,j){var i=new f.Event(h);this.trigger(i,j);return i.result!==false},callRemote:function(){var j=this,l=j.attr("method")||j.attr("data-method")||"GET",i=j.attr("action")||j.attr("href"),h=j.attr("data-type")||"script";if(i===undefined){throw"No URL specified for remote call (action or href must be present)."}else{if(j.triggerAndReturn("ajax:before")){var k=j.is("form")?j.serializeArray():[];f.ajax({url:i,data:k,dataType:h,type:l.toUpperCase(),beforeSend:function(m){j.trigger("ajax:loading",m)},success:function(n,m,o){j.trigger("ajax:success",[n,m,o])},complete:function(m){j.trigger("ajax:complete",m)},error:function(o,m,n){j.trigger("ajax:failure",[o,m,n])}})}j.trigger("ajax:after")}}});f("a[data-confirm],input[data-confirm]").live("click",function(){var h=f(this);if(h.triggerAndReturn("confirm")){if(!confirm(h.attr("data-confirm"))){return false}}});f("form[data-remote]").live("submit",function(h){f(this).callRemote();h.preventDefault()});f("a[data-remote],input[data-remote]").live("click",function(h){f(this).callRemote();h.preventDefault()});f("a[data-method]:not([data-remote])").live("click",function(l){var k=f(this),i=k.attr("href"),m=k.attr("data-method"),j=f('<form method="post" action="'+i+'"></form>'),h='<input name="_method" value="'+m+'" type="hidden" />';if(g!=null&&e!=null){h+='<input name="'+g+'" value="'+e+'" type="hidden" />'}j.hide().append(h).appendTo("body");l.preventDefault();j.submit()});var c="input[data-disable-with]";var d="form[data-remote]:has("+c+")";var b="form:not([data-remote]):has("+c+")";var a=function(){f(this).find(c).each(function(){var h=f(this);h.data("enable-with",h.val()).attr("value",h.attr("data-disable-with")).attr("disabled","disabled")})};f(d).live("ajax:before",a);f(b).live("submit",a);f(d).live("ajax:complete",function(){f(this).find(c).each(function(){var h=f(this);h.removeAttr("disabled").val(h.data("enable-with"))})})});(function(b){b.fn.__bind__=b.fn.bind;b.fn.__unbind__=b.fn.unbind;b.fn.__find__=b.fn.find;var a={version:"0.7.9",override:/keypress|keydown|keyup/g,triggersMap:{},specialKeys:{27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",109:"-",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",191:"/"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},newTrigger:function(e,d,f){var c={};c[e]={};c[e][d]={cb:f,disableInInput:false};return c}};a.specialKeys=b.extend(a.specialKeys,{96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"});b.fn.find=function(c){this.query=c;return b.fn.__find__.apply(this,arguments)};b.fn.unbind=function(h,e,g){if(b.isFunction(e)){g=e;e=null}if(e&&typeof e==="string"){var f=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var d=h.split(" ");for(var c=0;c<d.length;c++){delete a.triggersMap[f][d[c]][e]}}return this.__unbind__(h,g)};b.fn.bind=function(j,f,k){var h=j.match(a.override);if(b.isFunction(f)||!h){return this.__bind__(j,f,k)}else{var n=null,i=b.trim(j.replace(a.override,""));if(i){n=this.__bind__(i,f,k)}if(typeof f==="string"){f={combi:f}}if(f.combi){for(var m=0;m<h.length;m++){var d=h[m];var g=f.combi.toLowerCase(),e=a.newTrigger(d,g,k),l=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();e[d][g].disableInInput=f.disableInInput;if(!a.triggersMap[l]){a.triggersMap[l]=e}else{if(!a.triggersMap[l][d]){a.triggersMap[l][d]=e[d]}}var c=a.triggersMap[l][d][g];if(!c){a.triggersMap[l][d][g]=[e[d][g]]}else{if(c.constructor!==Array){a.triggersMap[l][d][g]=[c]}else{a.triggersMap[l][d][g][c.length]=e[d][g]}}this.each(function(){var o=b(this);if(o.attr("hkId")&&o.attr("hkId")!==l){l=o.attr("hkId")+";"+l}o.attr("hkId",l)});n=this.__bind__(h.join(" "),f,a.handler)}}return n}};a.findElement=function(c){if(!b(c).attr("hkId")){if(b.browser.opera||b.browser.safari){while(!b(c).attr("hkId")&&c.parentNode){c=c.parentNode}}}return c};a.handler=function(e){var o=a.findElement(e.currentTarget),i=b(o),d=i.attr("hkId");if(d){d=d.split(";");var g=e.which,q=e.type,p=a.specialKeys[g],n=!p&&String.fromCharCode(g).toLowerCase(),h=e.shiftKey,c=e.ctrlKey,m=e.altKey||e.originalEvent.altKey,f=null;for(var r=0;r<d.length;r++){if(a.triggersMap[d[r]][q]){f=a.triggersMap[d[r]][q];break}}if(f){var j;if(!h&&!c&&!m){if(f[p]){j=f[p];if(j&&p!=e.data.combi){return}}else{if(n&&f[n]){j=f[n];if(j&&n!=e.data.combi){return}}}}else{var l="";if(m){l+="alt+"}if(c){l+="ctrl+"}if(h){l+="shift+"}j=f[l+p];if(j&&(l+p)!=e.data.combi){return}if(!j){if(n){if(f[l+n]){j=f[l+n];if(j&&(l+n)!=e.data.combi){return}}else{if(f[l+a.shiftNums[n]]){j=f[l+a.shiftNums[n]];if(j&&(l+a.shiftNums[n])!=e.data.combi){return}}else{if(l==="shift+"&&f[a.shiftNums[n]]){j=f[a.shiftNums[n]];if(j&&a.shiftNums[n]!=e.data.combi){return}}}}}}}if(j){var s=false;for(var r=0;r<j.length;r++){if(j[r].disableInInput){var k=b(e.target);if(i.is("input")||i.is("textarea")||i.is("select")||k.is("input")||k.is("textarea")||k.is("select")){return true}}s=s||j[r].cb.apply(this,[e])}return s}}}};window.hotkeys=a;return b})(jQuery);var Mustache=function(){var a=function(){};a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(e,d,c,f){if(!f){this.context=d;this.buffer=[]}if(!this.includes("",e)){if(f){return e}else{this.send(e);return}}e=this.render_pragmas(e);var b=this.render_section(e,d,c);if(f){return this.render_tags(b,d,c,f)}this.render_tags(b,d,c,f)},send:function(b){if(b!=""){this.buffer.push(b)}},render_pragmas:function(b){if(!this.includes("%",b)){return b}var d=this;var c=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);return b.replace(c,function(g,e,f){if(!d.pragmas_implemented[e]){throw ({message:"This implementation of mustache doesn't understand the '"+e+"' pragma"})}d.pragmas[e]={};if(f){var h=f.split("=");d.pragmas[e][h[0]]=h[1]}return""})},render_partial:function(b,d,c){b=this.trim(b);if(!c||c[b]===undefined){throw ({message:"unknown_partial '"+b+"'"})}if(typeof(d[b])!="object"){return this.render(c[b],d,c,true)}return this.render(c[b],d[b],c,true)},render_section:function(d,c,b){if(!this.includes("#",d)&&!this.includes("^",d)){return d}var f=this;var e=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");return d.replace(e,function(h,i,g,j){var k=f.find(g,c);if(i=="^"){if(!k||f.is_array(k)&&k.length===0){return f.render(j,c,b,true)}else{return""}}else{if(i=="#"){if(f.is_array(k)){return f.map(k,function(l){return f.render(j,f.create_context(l),b,true)}).join("")}else{if(f.is_object(k)){return f.render(j,f.create_context(k),b,true)}else{if(typeof k==="function"){return k.call(c,j,function(l){return f.render(l,c,b,true)})}else{if(k){return f.render(j,c,b,true)}else{return""}}}}}}})},render_tags:function(k,b,d,f){var e=this;var j=function(){return new RegExp(e.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")};var g=j();var h=function(n,i,m){switch(i){case"!":return"";case"=":e.set_delimiters(m);g=j();return"";case">":return e.render_partial(m,b,d);case"{":return e.find(m,b);default:return e.escape(e.find(m,b))}};var l=k.split("\n");for(var c=0;c<l.length;c++){l[c]=l[c].replace(g,h,this);if(!f){this.send(l[c])}}if(f){return l.join("\n")}},set_delimiters:function(c){var b=c.split(" ");this.otag=this.escape_regex(b[0]);this.ctag=this.escape_regex(b[1])},escape_regex:function(c){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return c.replace(arguments.callee.sRE,"\\$1")},find:function(c,d){c=this.trim(c);function b(f){return f===false||f===0||f}var e;if(b(d[c])){e=d[c]}else{if(b(this.context[c])){e=this.context[c]}}if(typeof e==="function"){return e.apply(d)}if(e!==undefined){return e}return""},includes:function(c,b){return b.indexOf(this.otag+c)!=-1},escape:function(b){b=String(b===null?"":b);return b.replace(/&(?!\w+;)|["<>\\]/g,function(c){switch(c){case"&":return"&";case"\\":return"\\\\";case'"':return'"';case"<":return"<";case">":return">";default:return c}})},create_context:function(c){if(this.is_object(c)){return c}else{var d=".";if(this.pragmas["IMPLICIT-ITERATOR"]){d=this.pragmas["IMPLICIT-ITERATOR"].iterator}var b={};b[d]=c;return b}},is_object:function(b){return b&&typeof b=="object"},is_array:function(b){return Object.prototype.toString.call(b)==="[object Array]"},trim:function(b){return b.replace(/^\s*|\s*$/g,"")},map:function(f,d){if(typeof f.map=="function"){return f.map(d)}else{var e=[];var b=f.length;for(var c=0;c<b;c++){e.push(d(f[c]))}return e}}};return({name:"mustache.js",version:"0.3.1-dev",to_html:function(d,b,c,f){var e=new a();if(f){e.send=f}e.render(d,b,c);if(!f){return e.buffer.join("\n")}}})}();eval(function(h,b,i,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(i--){f[g(i)]=d[i]||g(i)}d=[function(a){return f[a]}];g=function(){return"\\w+"};i=1}while(i--){if(d[i]){h=h.replace(new RegExp("\\b"+g(i)+"\\b","g"),d[i])}}return h}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),0,{}));(function(aG){var ay,aq,ap,aD,aj,aC,ai,ax,am,al,au=0,aE={},aw=[],av=0,aF={},az=[],af=null,ao=new Image,ae=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,ad,ac=1,an=0,ar="",at,aA,aB=false,ak=aG.extend(aG("<div/>")[0],{prop:0}),ab=aG.browser.msie&&aG.browser.version<7&&!window.XMLHttpRequest,aa=function(){aq.hide();ao.onerror=ao.onload=null;af&&af.abort();ay.empty()},U=function(){if(false===aE.onError(aw,au,aE)){aq.hide();aB=false}else{aE.titleShow=false;aE.width="auto";aE.height="auto";ay.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');ah()}},ag=function(){var a=aw[au],j,f,e,i,h,c;aa();aE=aG.extend({},aG.fn.fancybox.defaults,typeof aG(a).data("fancybox")=="undefined"?aE:aG(a).data("fancybox"));c=aE.onStart(aw,au,aE);if(c===false){aB=false}else{if(typeof c=="object"){aE=aG.extend(aE,c)}e=aE.title||(a.nodeName?aG(a).attr("title"):a.title)||"";if(a.nodeName&&!aE.orig){aE.orig=aG(a).children("img:first").length?aG(a).children("img:first"):aG(a)}if(e===""&&aE.orig&&aE.titleFromAlt){e=aE.orig.attr("alt")}j=aE.href||(a.nodeName?aG(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(j)||j=="#"){j=null}if(aE.type){f=aE.type;if(!j){j=aE.content}}else{if(aE.content){f="html"}else{if(j){f=j.match(ae)?"image":j.match(k)?"swf":aG(a).hasClass("iframe")?"iframe":j.indexOf("#")===0?"inline":"ajax"}}}if(f){if(f=="inline"){a=j.substr(j.indexOf("#"));f=aG(a).length>0?"inline":"ajax"}aE.type=f;aE.href=j;aE.title=e;if(aE.autoDimensions&&aE.type!=="iframe"&&aE.type!=="swf"){aE.width="auto";aE.height="auto"}if(aE.modal){aE.overlayShow=true;aE.hideOnOverlayClick=false;aE.hideOnContentClick=false;aE.enableEscapeButton=false;aE.showCloseButton=false}aE.padding=parseInt(aE.padding,10);aE.margin=parseInt(aE.margin,10);ay.css("padding",aE.padding+aE.margin);aG(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){aG(this).replaceWith(aC.children())});switch(f){case"html":ay.html(aE.content);ah();break;case"inline":if(aG(a).parent().is("#fancybox-content")===true){aB=false;break}aG('<div class="fancybox-inline-tmp" />').hide().insertBefore(aG(a)).bind("fancybox-cleanup",function(){aG(this).replaceWith(aC.children())}).bind("fancybox-cancel",function(){aG(this).replaceWith(ay.children())});aG(a).appendTo(ay);ah();break;case"image":aB=false;aG.fancybox.showActivity();ao=new Image;ao.onerror=function(){U()};ao.onload=function(){aB=true;ao.onerror=ao.onload=null;aE.width=ao.width;aE.height=ao.height;aG("<img />").attr({id:"fancybox-img",src:ao.src,alt:aE.title}).appendTo(ay);P()};ao.src=j;break;case"swf":i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+aE.width+'" height="'+aE.height+'"><param name="movie" value="'+j+'"></param>';h="";aG.each(aE.swf,function(l,m){i+='<param name="'+l+'" value="'+m+'"></param>';h+=" "+l+'="'+m+'"'});i+='<embed src="'+j+'" type="application/x-shockwave-flash" width="'+aE.width+'" height="'+aE.height+'"'+h+"></embed></object>";ay.html(i);ah();break;case"ajax":aB=false;aG.fancybox.showActivity();aE.ajax.win=aE.ajax.success;af=aG.ajax(aG.extend({},aE.ajax,{url:j,data:aE.ajax.data||{},error:function(l){l.status>0&&U()},success:function(l,n,m){if(m.status==200){if(typeof aE.ajax.win=="function"){c=aE.ajax.win(j,l,n,m);if(c===false){aq.hide();return}else{if(typeof c=="string"||typeof c=="object"){l=c}}}ay.html(l);ah()}}}));break;case"iframe":P()}}else{U()}}},ah=function(){ay.width(aE.width);ay.height(aE.height);if(aE.width=="auto"){aE.width=ay.width()}if(aE.height=="auto"){aE.height=ay.height()}P()},P=function(){var a,c;aq.hide();if(aD.is(":visible")&&false===aF.onCleanup(az,av,aF)){aG.event.trigger("fancybox-cancel");aB=false}else{aB=true;aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aD.is(":visible")&&aF.titlePosition!=="outside"&&aD.css("height",aD.height());az=aw;av=au;aF=aE;if(aF.overlayShow){ap.css({"background-color":aF.overlayColor,opacity:aF.overlayOpacity,cursor:aF.hideOnOverlayClick?"pointer":"auto",height:aG(document).height()});if(!ap.is(":visible")){ab&&aG("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});ap.show()}}else{ap.hide()}aC.get(0).scrollTop=0;aC.get(0).scrollLeft=0;aA=g();ar=aF.title||"";an=0;ax.empty().removeAttr("style").removeClass();if(aF.titleShow!==false){if(aG.isFunction(aF.titleFormat)){a=aF.titleFormat(ar,az,av,aF)}else{a=ar&&ar.length?aF.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+ar+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+aF.titlePosition+'">'+ar+"</div>":false}ar=a;if(!(!ar||ar==="")){ax.addClass("fancybox-title-"+aF.titlePosition).html(ar).appendTo("body").show();switch(aF.titlePosition){case"inside":ax.css({width:aA.width-aF.padding*2,marginLeft:aF.padding,marginRight:aF.padding});an=ax.outerHeight(true);ax.appendTo(aj);aA.height+=an;break;case"over":ax.css({marginLeft:aF.padding,width:aA.width-aF.padding*2,bottom:aF.padding}).appendTo(aj);break;case"float":ax.css("left",parseInt((ax.width()-aA.width-40)/2,10)*-1).appendTo(aD);break;default:ax.css({width:aA.width-aF.padding*2,paddingLeft:aF.padding,paddingRight:aF.padding}).appendTo(aD)}}}ax.hide();if(aD.is(":visible")){aG(ai.add(am).add(al)).hide();a=aD.position();at={top:a.top,left:a.left,width:aD.width(),height:aD.height()};c=at.width==aA.width&&at.height==aA.height;aC.fadeTo(aF.changeFade,0.3,function(){var e=function(){aC.html(ay.contents()).fadeTo(aF.changeFade,1,G)};aG.event.trigger("fancybox-change");aC.empty().removeAttr("filter").css({"border-width":aF.padding,width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"});if(c){e()}else{ak.prop=0;aG(ak).animate({prop:1},{duration:aF.changeSpeed,easing:aF.easingChange,step:C,complete:e})}})}else{aD.removeAttr("style");aC.css("border-width",aF.padding);if(aF.transitionIn=="elastic"){at=w();aC.html(ay.contents());aD.show();if(aF.opacity){aA.opacity=0}ak.prop=0;aG(ak).animate({prop:1},{duration:aF.speedIn,easing:aF.easingIn,step:C,complete:G})}else{aF.titlePosition=="inside"&&an>0&&ax.show();aC.css({width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"}).html(ay.contents());aD.css(aA).fadeIn(aF.transitionIn=="none"?0:aF.fadeIn,G)}}}},d=function(){if(aF.enableEscapeButton||aF.enableKeyboardNav){aG(document).bind("keydown.fb",function(a){if(a.keyCode==27&&aF.enableEscapeButton){a.preventDefault();aG.fancybox.close()}else{if((a.keyCode==37||a.keyCode==39)&&aF.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();aG.fancybox[a.keyCode==37?"prev":"next"]()}}})}if(aF.showNavArrows){if(aF.cyclic&&az.length>1||av!==0){am.show()}if(aF.cyclic&&az.length>1||av!=az.length-1){al.show()}}else{am.hide();al.hide()}},G=function(){if(!aG.support.opacity){aC.get(0).style.removeAttribute("filter");aD.get(0).style.removeAttribute("filter")}aD.css("height","auto");aF.type!=="image"&&aF.type!=="swf"&&aF.type!=="iframe"&&aC.css("height","auto");ar&&ar.length&&ax.show();aF.showCloseButton&&ai.show();d();aF.hideOnContentClick&&aC.bind("click",aG.fancybox.close);aF.hideOnOverlayClick&&ap.bind("click",aG.fancybox.close);aG(window).bind("resize.fb",aG.fancybox.resize);aF.centerOnScroll&&aG(window).bind("scroll.fb",aG.fancybox.center);if(aF.type=="iframe"){aG('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(aG.browser.msie?'allowtransparency="true""':"")+' scrolling="'+aE.scrolling+'" src="'+aF.href+'"></iframe>').appendTo(aC)}aD.show();aB=false;aG.fancybox.center();aF.onComplete(az,av,aF);var a,c;if(az.length-1>av){a=az[av+1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}if(av>0){a=az[av-1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}},C=function(a){var c={width:parseInt(at.width+(aA.width-at.width)*a,10),height:parseInt(at.height+(aA.height-at.height)*a,10),top:parseInt(at.top+(aA.top-at.top)*a,10),left:parseInt(at.left+(aA.left-at.left)*a,10)};if(typeof aA.opacity!=="undefined"){c.opacity=a<0.5?0.5:a}aD.css(c);aC.css({width:c.width-aF.padding*2,height:c.height-an*a-aF.padding*2})},x=function(){return[aG(window).width()-aF.margin*2,aG(window).height()-aF.margin*2,aG(document).scrollLeft()+aF.margin,aG(document).scrollTop()+aF.margin]},g=function(){var a=x(),f={},e=aF.autoScale,c=aF.padding*2;f.width=aF.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(aF.width)/100,10):aF.width+c;f.height=aF.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(aF.height)/100,10):aF.height+c;if(e&&(f.width>a[0]||f.height>a[1])){if(aE.type=="image"||aE.type=="swf"){e=aF.width/aF.height;if(f.width>a[0]){f.width=a[0];f.height=parseInt((f.width-c)/e+c,10)}if(f.height>a[1]){f.height=a[1];f.width=parseInt((f.height-c)*e+c,10)}}else{f.width=Math.min(f.width,a[0]);f.height=Math.min(f.height,a[1])}}f.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-f.height-40)*0.5),10);f.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-f.width-40)*0.5),10);return f},w=function(){var a=aE.orig?aG(aE.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+aF.padding*2,height:c.height+aF.padding*2,top:c.top-aF.padding-20,left:c.left-aF.padding-20}}else{a=x();c={width:aF.padding*2,height:aF.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},b=function(){if(aq.is(":visible")){aG("div",aq).css("top",ac*-40+"px");ac=(ac+1)%12}else{clearInterval(ad)}};aG.fn.fancybox=function(a){if(!aG(this).length){return this}aG(this).data("fancybox",aG.extend({},a,aG.metadata?aG(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!aB){aB=true;aG(this).blur();aw=[];au=0;c=aG(this).attr("rel")||"";if(!c||c==""||c==="nofollow"){aw.push(this)}else{aw=aG("a[rel="+c+"], area[rel="+c+"]");au=aw.index(this)}ag()}});return this};aG.fancybox=function(a,h){var e;if(!aB){aB=true;e=typeof h!=="undefined"?h:{};aw=[];au=parseInt(e.index,10)||0;if(aG.isArray(a)){for(var c=0,f=a.length;c<f;c++){if(typeof a[c]=="object"){aG(a[c]).data("fancybox",aG.extend({},e,a[c]))}else{a[c]=aG({}).data("fancybox",aG.extend({content:a[c]},e))}}aw=jQuery.merge(aw,a)}else{if(typeof a=="object"){aG(a).data("fancybox",aG.extend({},e,a))}else{a=aG({}).data("fancybox",aG.extend({content:a},e))}aw.push(a)}if(au>aw.length||au<0){au=0}ag()}};aG.fancybox.showActivity=function(){clearInterval(ad);aq.show();ad=setInterval(b,66)};aG.fancybox.hideActivity=function(){aq.hide()};aG.fancybox.next=function(){return aG.fancybox.pos(av+1)};aG.fancybox.prev=function(){return aG.fancybox.pos(av-1)};aG.fancybox.pos=function(a){if(!aB){a=parseInt(a);aw=az;if(a>-1&&a<az.length){au=a;ag()}else{if(aF.cyclic&&az.length>1){au=a>=az.length?0:az.length-1;ag()}}}};aG.fancybox.cancel=function(){if(!aB){aB=true;aG.event.trigger("fancybox-cancel");aa();aE.onCancel(aw,au,aE);aB=false}};aG.fancybox.close=function(){function a(){ap.fadeOut("fast");ax.empty().hide();aD.hide();aG.event.trigger("fancybox-cleanup");aC.empty();aF.onClosed(az,av,aF);az=aE=[];av=au=0;aF=aE={};aB=false}if(!(aB||aD.is(":hidden"))){aB=true;if(aF&&false===aF.onCleanup(az,av,aF)){aB=false}else{aa();aG(ai.add(am).add(al)).hide();aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aC.find("iframe").attr("src",ab&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");aF.titlePosition!=="inside"&&ax.empty();aD.stop();if(aF.transitionOut=="elastic"){at=w();var c=aD.position();aA={top:c.top,left:c.left,width:aD.width(),height:aD.height()};if(aF.opacity){aA.opacity=1}ax.empty().hide();ak.prop=1;aG(ak).animate({prop:0},{duration:aF.speedOut,easing:aF.easingOut,step:C,complete:a})}else{aD.fadeOut(aF.transitionOut=="none"?0:aF.speedOut,a)}}}};aG.fancybox.resize=function(){ap.is(":visible")&&ap.css("height",aG(document).height());aG.fancybox.center(true)};aG.fancybox.center=function(a){var e,c;if(!aB){c=a===true?1:0;e=x();!c&&(aD.width()>e[0]||aD.height()>e[1])||aD.stop().animate({top:parseInt(Math.max(e[3]-20,e[3]+(e[1]-aC.height()-40)*0.5-aF.padding)),left:parseInt(Math.max(e[2]-20,e[2]+(e[0]-aC.width()-40)*0.5-aF.padding))},typeof a=="number"?a:200)}};aG.fancybox.init=function(){if(!aG("#fancybox-wrap").length){aG("body").append(ay=aG('<div id="fancybox-tmp"></div>'),aq=aG('<div id="fancybox-loading"><div></div></div>'),ap=aG('<div id="fancybox-overlay"></div>'),aD=aG('<div id="fancybox-wrap"></div>'));aj=aG('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(aD);aj.append(aC=aG('<div id="fancybox-content"></div>'),ai=aG('<a id="fancybox-close"></a>'),ax=aG('<div id="fancybox-title"></div>'),am=aG('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),al=aG('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));ai.click(aG.fancybox.close);aq.click(aG.fancybox.cancel);am.click(function(a){a.preventDefault();aG.fancybox.prev()});al.click(function(a){a.preventDefault();aG.fancybox.next()});aG.fn.mousewheel&&aD.bind("mousewheel.fb",function(a,c){a.preventDefault();aG.fancybox[c>0?"prev":"next"]()});aG.support.opacity||aD.addClass("fancybox-ie");if(ab){aq.addClass("fancybox-ie6");aD.addClass("fancybox-ie6");aG('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(aj)}}};aG.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};aG(document).ready(function(){aG.fancybox.init()})})(jQuery);(function(a){a.widget("ech.notify",{options:{speed:500,expires:5000,stack:"below",custom:false},_create:function(){var b=this;this.templates={};this.keys=[];this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(d){var c=this.id||d;b.keys.push(c);b.templates[c]=a(this).removeAttr("id").wrap("<div></div>").parent().html()}).end().empty().show()},create:function(c,e,d){if(typeof c==="object"){d=e;e=c;c=null}var b=this.templates[c||this.keys[0]];if(d&&d.custom){b=a(b).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html()}return new a.ech.notify.instance(this)._create(e,a.extend({},this.options,d),b)}});a.extend(a.ech.notify,{instance:function(b){this.parent=b;this.isOpen=false}});a.extend(a.ech.notify.instance.prototype,{_create:function(h,e,g){this.options=e;var d=this,f=g.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g,function(i,j){return(j in h)?h[j]:""}),c=(this.element=a(f)),b=c.find(".ui-notify-close");if(typeof this.options.click==="function"){c.addClass("ui-notify-click").bind("click",function(i){d._trigger("click",i,d)})}if(b.length){b.bind("click",function(){d.close();return false})}this.open();if(typeof e.expires==="number"){window.setTimeout(function(){d.close()},e.expires)}return this},close:function(){var b=this,c=this.options.speed;this.element.fadeTo(c,0).slideUp(c,function(){b._trigger("close");b.isOpen=false});return this},open:function(){if(this.isOpen||this._trigger("beforeopen")===false){return this}var b=this;this.element[this.options.stack==="above"?"prependTo":"appendTo"](this.parent.element).css({display:"none",opacity:""}).fadeIn(this.options.speed,function(){b._trigger("open");b.isOpen=true});return this},widget:function(){return this.element},_trigger:function(c,d,b){return this.parent._trigger.call(this,c,d,b)}})})(jQuery);(function(b){var a=function(){var T={},c,O=65,u,Q='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',C={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},K=function(U,W){var V=j(U);b(W).data("colorpicker").fields.eq(1).val(V.r).end().eq(2).val(V.g).end().eq(3).val(V.b).end()},v=function(U,V){b(V).data("colorpicker").fields.eq(4).val(U.h).end().eq(5).val(U.s).end().eq(6).val(U.b).end()},g=function(U,V){b(V).data("colorpicker").fields.eq(0).val(S(U)).end()},l=function(U,V){b(V).data("colorpicker").selector.css("backgroundColor","#"+S({h:U.h,s:100,b:100}));b(V).data("colorpicker").selectorIndic.css({left:parseInt(150*U.s/100,10),top:parseInt(150*(100-U.b)/100,10)})},H=function(U,V){b(V).data("colorpicker").hue.css("top",parseInt(150-150*U.h/360,10))},h=function(U,V){b(V).data("colorpicker").currentColor.css("backgroundColor","#"+S(U))},F=function(U,V){b(V).data("colorpicker").newColor.css("backgroundColor","#"+S(U))},n=function(U){var W=U.charCode||U.keyCode||-1;if((W>O&&W<=90)||W==32){return false}var V=b(this).parent().parent();if(V.data("colorpicker").livePreview===true){e.apply(this)}},e=function(V){var W=b(this).parent().parent(),U;if(this.parentNode.className.indexOf("_hex")>0){W.data("colorpicker").color=U=m(z(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){W.data("colorpicker").color=U=f({h:parseInt(W.data("colorpicker").fields.eq(4).val(),10),s:parseInt(W.data("colorpicker").fields.eq(5).val(),10),b:parseInt(W.data("colorpicker").fields.eq(6).val(),10)})}else{W.data("colorpicker").color=U=i(N({r:parseInt(W.data("colorpicker").fields.eq(1).val(),10),g:parseInt(W.data("colorpicker").fields.eq(2).val(),10),b:parseInt(W.data("colorpicker").fields.eq(3).val(),10)}))}}if(V){K(U,W.get(0));g(U,W.get(0));v(U,W.get(0))}l(U,W.get(0));H(U,W.get(0));F(U,W.get(0));W.data("colorpicker").onChange.apply(W,[U,S(U),j(U)])},o=function(U){var V=b(this).parent().parent();V.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},L=function(){O=this.parentNode.className.indexOf("_hex")>0?70:65;b(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");b(this).parent().addClass("colorpicker_focus")},J=function(U){var W=b(this).parent().find("input").focus();var V={el:b(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:U.pageY,field:W,val:parseInt(W.val(),10),preview:b(this).parent().parent().data("colorpicker").livePreview};b(document).bind("mouseup",V,s);b(document).bind("mousemove",V,M)},M=function(U){U.data.field.val(Math.max(0,Math.min(U.data.max,parseInt(U.data.val+U.pageY-U.data.y,10))));if(U.data.preview){e.apply(U.data.field.get(0),[true])}return false},s=function(U){e.apply(U.data.field.get(0),[true]);U.data.el.removeClass("colorpicker_slider").find("input").focus();b(document).unbind("mouseup",s);b(document).unbind("mousemove",M);return false},x=function(U){var V={cal:b(this).parent(),y:b(this).offset().top};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,r);b(document).bind("mousemove",V,k)},k=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(U.pageY-U.data.y))))/150,10)).get(0),[U.data.preview]);return false},r=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",r);b(document).unbind("mousemove",k);return false},y=function(U){var V={cal:b(this).parent(),pos:b(this).offset()};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,B);b(document).bind("mousemove",V,q)},q=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(U.pageY-U.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(U.pageX-U.data.pos.left))))/150,10)).get(0),[U.data.preview]);return false},B=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",B);b(document).unbind("mousemove",q);return false},w=function(U){b(this).addClass("colorpicker_focus")},R=function(U){b(this).removeClass("colorpicker_focus")},p=function(V){var W=b(this).parent();var U=W.data("colorpicker").color;W.data("colorpicker").origColor=U;h(U,W.get(0));W.data("colorpicker").onSubmit(U,S(U),j(U),W.data("colorpicker").el)},E=function(U){var Y=b("#"+b(this).data("colorpickerId"));Y.data("colorpicker").onBeforeShow.apply(this,[Y.get(0)]);var Z=b(this).offset();var X=A();var W=Z.top+this.offsetHeight;var V=Z.left;if(W+176>X.t+X.h){W-=this.offsetHeight+176}if(V+356>X.l+X.w){V-=356}Y.css({left:V+"px",top:W+"px"});if(Y.data("colorpicker").onShow.apply(this,[Y.get(0)])!=false){Y.show()}b(document).bind("mousedown",{cal:Y},P);return false},P=function(U){if(!I(U.data.cal.get(0),U.target,U.data.cal.get(0))){if(U.data.cal.data("colorpicker").onHide.apply(this,[U.data.cal.get(0)])!=false){U.data.cal.hide()}b(document).unbind("mousedown",P)}},I=function(W,V,U){if(W==V){return true}if(W.contains){return W.contains(V)}if(W.compareDocumentPosition){return !!(W.compareDocumentPosition(V)&16)}var X=V.parentNode;while(X&&X!=U){if(X==W){return true}X=X.parentNode}return false},A=function(){var U=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(U?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(U?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(U?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(U?document.documentElement.clientHeight:document.body.clientHeight)}},f=function(U){return{h:Math.min(360,Math.max(0,U.h)),s:Math.min(100,Math.max(0,U.s)),b:Math.min(100,Math.max(0,U.b))}},N=function(U){return{r:Math.min(255,Math.max(0,U.r)),g:Math.min(255,Math.max(0,U.g)),b:Math.min(255,Math.max(0,U.b))}},z=function(W){var U=6-W.length;if(U>0){var X=[];for(var V=0;V<U;V++){X.push("0")}X.push(W);W=X.join("")}return W},d=function(U){var U=parseInt(((U.indexOf("#")>-1)?U.substring(1):U),16);return{r:U>>16,g:(U&65280)>>8,b:(U&255)}},m=function(U){return i(d(U))},i=function(W){var V={h:0,s:0,b:0};var X=Math.min(W.r,W.g,W.b);var U=Math.max(W.r,W.g,W.b);var Y=U-X;V.b=U;if(U!=0){}V.s=U!=0?255*Y/U:0;if(V.s!=0){if(W.r==U){V.h=(W.g-W.b)/Y}else{if(W.g==U){V.h=2+(W.b-W.r)/Y}else{V.h=4+(W.r-W.g)/Y}}}else{V.h=-1}V.h*=60;if(V.h<0){V.h+=360}V.s*=100/255;V.b*=100/255;return V},j=function(U){var W={};var aa=Math.round(U.h);var Z=Math.round(U.s*255/100);var V=Math.round(U.b*255/100);if(Z==0){W.r=W.g=W.b=V}else{var ab=V;var Y=(255-Z)*V/255;var X=(ab-Y)*(aa%60)/60;if(aa==360){aa=0}if(aa<60){W.r=ab;W.b=Y;W.g=Y+X}else{if(aa<120){W.g=ab;W.b=Y;W.r=ab-X}else{if(aa<180){W.g=ab;W.r=Y;W.b=Y+X}else{if(aa<240){W.b=ab;W.r=Y;W.g=ab-X}else{if(aa<300){W.b=ab;W.g=Y;W.r=Y+X}else{if(aa<360){W.r=ab;W.g=Y;W.b=ab-X}else{W.r=0;W.g=0;W.b=0}}}}}}}return{r:Math.round(W.r),g:Math.round(W.g),b:Math.round(W.b)}},D=function(U){var V=[U.r.toString(16),U.g.toString(16),U.b.toString(16)];b.each(V,function(W,X){if(X.length==1){V[W]="0"+X}});return V.join("")},S=function(U){return D(j(U))},G=function(){var V=b(this).parent();var U=V.data("colorpicker").origColor;V.data("colorpicker").color=U;K(U,V.get(0));g(U,V.get(0));v(U,V.get(0));l(U,V.get(0));H(U,V.get(0));F(U,V.get(0))};return{init:function(U){U=b.extend({},C,U||{});if(typeof U.color=="string"){U.color=m(U.color)}else{if(U.color.r!=undefined&&U.color.g!=undefined&&U.color.b!=undefined){U.color=i(U.color)}else{if(U.color.h!=undefined&&U.color.s!=undefined&&U.color.b!=undefined){U.color=f(U.color)}else{return this}}}return this.each(function(){if(!b(this).data("colorpickerId")){var V=b.extend({},U);V.origColor=U.color;var X="collorpicker_"+parseInt(Math.random()*1000);b(this).data("colorpickerId",X);var W=b(Q).attr("id",X);if(V.flat){W.appendTo(this).show()}else{W.appendTo(document.body)}V.fields=W.find("input").bind("keyup",n).bind("change",e).bind("blur",o).bind("focus",L);W.find("span").bind("mousedown",J).end().find(">div.colorpicker_current_color").bind("click",G);V.selector=W.find("div.colorpicker_color").bind("mousedown",y);V.selectorIndic=V.selector.find("div div");V.el=this;V.hue=W.find("div.colorpicker_hue div");W.find("div.colorpicker_hue").bind("mousedown",x);V.newColor=W.find("div.colorpicker_new_color");V.currentColor=W.find("div.colorpicker_current_color");W.data("colorpicker",V);W.find("div.colorpicker_submit").bind("mouseenter",w).bind("mouseleave",R).bind("click",p);K(V.color,W.get(0));v(V.color,W.get(0));g(V.color,W.get(0));H(V.color,W.get(0));l(V.color,W.get(0));h(V.color,W.get(0));F(V.color,W.get(0));if(V.flat){W.css({position:"relative",display:"block"})}else{b(this).bind(V.eventName,E)}}})},showPicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){E.apply(this)}})},hidePicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){b("#"+b(this).data("colorpickerId")).hide()}})},setColor:function(U){if(typeof U=="string"){U=m(U)}else{if(U.r!=undefined&&U.g!=undefined&&U.b!=undefined){U=i(U)}else{if(U.h!=undefined&&U.s!=undefined&&U.b!=undefined){U=f(U)}else{return this}}}return this.each(function(){if(b(this).data("colorpickerId")){var V=b("#"+b(this).data("colorpickerId"));V.data("colorpicker").color=U;V.data("colorpicker").origColor=U;K(U,V.get(0));v(U,V.get(0));g(U,V.get(0));H(U,V.get(0));l(U,V.get(0));h(U,V.get(0));F(U,V.get(0))}})}}}();b.fn.extend({ColorPicker:a.init,ColorPickerHide:a.hidePicker,ColorPickerShow:a.showPicker,ColorPickerSetColor:a.setColor})})(jQuery);jQuery.fn.editable=function(d,i,h){if(this.length===0){return(this)}var a={target:d,name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",loaddata:{},submitdata:{}};if(i){jQuery.extend(a,i)}var c=jQuery.editable.types[a.type].plugin||function(){};var f=jQuery.editable.types[a.type].submit||function(){};var g=jQuery.editable.types[a.type].buttons||jQuery.editable.types.defaults.buttons;var e=jQuery.editable.types[a.type].content||jQuery.editable.types.defaults.content;var b=jQuery.editable.types[a.type].element||jQuery.editable.types.defaults.element;h=h||function(){};jQuery(this).attr("title",a.tooltip);a.autowidth="auto"==a.width;a.autoheight="auto"==a.height;jQuery(this)[a.event](function(p){var j=this;if(j.editing){return}if(a.width!="none"){a.width=a.autowidth?jQuery(j).width():a.width}if(a.height!="none"){a.height=a.autoheight?jQuery(j).height():a.height}j.editing=true;j.revert=jQuery(j).html();j.innerHTML="";var o=document.createElement("form");if(a.cssclass){if("inherit"==a.cssclass){jQuery(o).attr("class",jQuery(j).attr("class"))}else{jQuery(o).attr("class",a.cssclass)}}if(a.style){if("inherit"==a.style){jQuery(o).attr("style",jQuery(j).attr("style"));jQuery(o).css("display",jQuery(j).css("display"))}else{jQuery(o).attr("style",a.style)}}var m=b.apply(o,[a,j]);if(a.getload){a.loadurl=a.getload;a.loadtype="GET"}else{if(a.postload){a.loadurl=a.postload;a.loadtype="POST"}}if(a.loadurl){var l=setTimeout(function(){m.disabled=true;e.apply(o,[a.loadtext,a,j])},100);var k={};k[a.id]=j.id;if(jQuery.isFunction(a.loaddata)){jQuery.extend(k,a.loaddata.apply(j,[j.revert,a]))}else{jQuery.extend(k,a.loaddata)}jQuery.ajax({type:a.loadtype,url:a.loadurl,data:k,success:function(r){window.clearTimeout(l);e.apply(o,[r,a,j]);m.disabled=false}})}else{if(a.data){var q=a.data;if(jQuery.isFunction(a.data)){var q=a.data.apply(j,[j.revert,a])}e.apply(o,[q,a,j])}else{e.apply(o,[j.revert,a,j])}}m.name=a.name;g.apply(o,[a,j]);j.appendChild(o);if(a.select){m.select()}c.apply(o,[a,j]);jQuery(":input:visible:enabled:first",o).focus();jQuery(m).keydown(function(r){if(r.keyCode==27){r.preventDefault();n()}});var l;if("cancel"==a.onblur){jQuery(m).blur(function(r){l=setTimeout(n,500)})}else{if("submit"==a.onblur){jQuery(m).blur(function(r){jQuery(o).submit()})}else{jQuery(m).blur(function(r){})}}jQuery(o).submit(function(s){if(l){clearTimeout(l)}s.preventDefault();f.apply(o,[a,j]);if(jQuery.isFunction(a.target)){var u=a.target.apply(j,[jQuery(m).val(),a]);j.innerHTML=u;j.editing=false;h.apply(j,[j.innerHTML,a])}else{var r={};r[m.name]=jQuery(m).val();r[a.id]=j.id;if(jQuery.isFunction(a.submitdata)){jQuery.extend(r,a.submitdata.apply(j,[j.revert,a]))}else{jQuery.extend(r,a.submitdata)}jQuery(j).html(a.indicator);jQuery.post(a.target,r,function(v){j.innerHTML=v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");j.editing=false;h.apply(j,[j.innerHTML,a])})}return false});function n(){j.innerHTML=j.revert;j.editing=false}});return(this)};jQuery.editable={types:{defaults:{element:function(c,b){var a=jQuery('<input type="hidden">');jQuery(this).append(a);return(a)},content:function(a,c,b){jQuery(":input:first",this).val(a)},buttons:function(b,a){if(b.submit){var d=jQuery('<input type="submit">');d.val(b.submit);jQuery(this).append(d)}if(b.cancel){var c=jQuery('<input type="button">');c.val(b.cancel);jQuery(this).append(c);jQuery(c).click(function(){jQuery(a).html(a.revert);a.editing=false})}}},text:{element:function(c,b){var a=jQuery("<input>");if(c.width!="none"){a.width(c.width)}if(c.height!="none"){a.height(c.height)}a.attr("autocomplete","off");jQuery(this).append(a);return(a)}},textarea:{element:function(c,b){var a=jQuery("<textarea>");if(c.rows){a.attr("rows",c.rows)}else{a.height(c.height)}if(c.cols){a.attr("cols",c.cols)}else{a.width(c.width)}jQuery(this).append(a);return(a)}},select:{element:function(c,b){var a=jQuery("<select>");jQuery(this).append(a);return(a)},content:function(string,settings,original){var select=jQuery("select",this);if(String==string.constructor){eval("var json = "+string);for(var key in json){if("selected"==key){continue}var option=$("<option>").val(key).append(json[key]);select.append(option)}}jQuery.editable.types.select.iefix(select,json.selected)},iefix:function(a,b){console.log(this);console.log(a);a.children().each(function(){if(jQuery(this).val()==b){jQuery(this).attr("selected","selected")}})}}},addInputType:function(b,a){jQuery.editable.types[b]=a}};(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var u=r=="x"?"Left":"Top",s=u.toLowerCase(),w="scroll"+u,p=n[w],g=a.max(n,r);if(j){k[w]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[w]-=parseInt(m.css("margin"+u))||0;k[w]-=parseInt(m.css("border"+u+"Width"))||0}k[w]+=d.offset[s]||0;if(d.over[s]){k[w]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var v=m[s];k[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*g:v}if(/^\d+$/.test(k[w])){k[w]=k[w]<=0?0:Math.min(k[w],g)}if(!q&&d.queue){if(p!=k[w]){i(d.onAfterFirst)}delete k[w]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var h=a(c).rules();var d=false;for(method in h){var g={method:method,parameters:h[method]};try{var b=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(d.old!==f){d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true;if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var l={};var j=(d.message=i||b.defaultMessage(c,"remote"));l[c.name]=a.isFunction(j)?j(f):j;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return d.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);(function(b){function a(d,c){this.$element=b(d);this.options=c;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var f=this.getTitle();if(f&&this.enabled){var e=this.tip();e.find(".tipsy-inner")[this.options.html?"html":"text"](f);e[0].className="tipsy";e.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var i=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var c=e[0].offsetWidth,h=e[0].offsetHeight;var g=(typeof this.options.gravity=="function")?this.options.gravity.call(this.$element[0]):this.options.gravity;var d;switch(g.charAt(0)){case"n":d={top:i.top+i.height+this.options.offset,left:i.left+i.width/2-c/2};break;case"s":d={top:i.top-h-this.options.offset,left:i.left+i.width/2-c/2};break;case"e":d={top:i.top+i.height/2-h/2,left:i.left-c-this.options.offset};break;case"w":d={top:i.top+i.height/2-h/2,left:i.left+i.width+this.options.offset};break}if(g.length==2){if(g.charAt(1)=="w"){d.left=i.left+i.width/2-15}else{d.left=i.left+i.width/2-c+15}}e.css(d).addClass("tipsy-"+g);if(this.options.fade){e.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{e.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){b(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var c=this.$element;if(c.attr("title")||typeof(c.attr("original-title"))!="string"){c.attr("original-title",c.attr("title")||"").removeAttr("title")}},getTitle:function(){var e,c=this.$element,d=this.options;this.fixTitle();var e,d=this.options;if(typeof d.title=="string"){e=c.attr(d.title=="title"?"original-title":d.title)}else{if(typeof d.title=="function"){e=d.title.call(c[0])}}e=(""+e).replace(/(^\s*|\s*$)/,"");return e||d.fallback},tip:function(){if(!this.$tip){this.$tip=b('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};b.fn.tipsy=function(g){if(g===true){return this.data("tipsy")}else{if(typeof g=="string"){var i=this.data("tipsy");if(i){i[g]()}return this}}g=b.extend({},b.fn.tipsy.defaults,g);function f(k){var l=b.data(k,"tipsy");if(!l){l=new a(k,b.fn.tipsy.elementOptions(k,g));b.data(k,"tipsy",l)}return l}function j(){var k=f(this);k.hoverState="in";if(g.delayIn==0){k.show()}else{k.fixTitle();setTimeout(function(){if(k.hoverState=="in"){k.show()}},g.delayIn)}}function e(){var k=f(this);k.hoverState="out";if(g.delayOut==0){k.hide()}else{setTimeout(function(){if(k.hoverState=="out"){k.hide()}},g.delayOut)}}if(!g.live){this.each(function(){f(this)})}if(g.trigger!="manual"){var c=g.live?"live":"bind",h=g.trigger=="hover"?"mouseenter":"focus",d=g.trigger=="hover"?"mouseleave":"blur";this[c](h,j)[c](d,e)}return this};b.fn.tipsy.defaults={delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};b.fn.tipsy.elementOptions=function(d,c){return b.metadata?b.extend({},c,b(d).metadata()):c};b.fn.tipsy.autoNS=function(){return b(this).offset().top>(b(document).scrollTop()+b(window).height()/2)?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>(b(document).scrollLeft()+b(window).width()/2)?"e":"w"}})(jQuery);var selected_events=[];var flash_message=[];function Queue(){if(!(this instanceof arguments.callee)){return new arguments.callee(arguments)}var a=this;a.up=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b+1)};a.down=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b-1)}}function flash(a){$("div#flash_message").remove();$.each(flash_message,function(b,d){var c=Snorby.templates.flash(d);$("body").prepend(c);$("div#flash_message").fadeIn("slow").delay(2000).fadeOut("slow");flash_message=[]});return false}function clear_selected_events(){selected_events=[];$("input#selected_events").val("");return false}function set_classification(a){var b=$("input#selected_events").attr("value");var c=$("div#events").attr("data-action");var d=$("div#events").attr("data-page");if(b.length>0){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$.post("/events/classify",{events:b,classification:a},function(){if(c=="index"){clear_selected_events();$.getScript("/events?page="+d)}else{if(c=="queue"){clear_selected_events();$.getScript("/events/queue?page="+d)}else{if(c=="history"){clear_selected_events();$.getScript("/events/history?page="+d)}else{if(c=="results"){clear_selected_events();$.getScript($("input#current_url").val())}else{}}}}flash_message.push({type:"success",message:"Event(s) Classified Successfully"})})}else{if($("ul.table div.content li.event.currently-over.highlight").is(":visible")){$("ul.table div.content li.event.currently-over.highlight .row div.select input#event-selector").click().trigger("change");set_classification(a)}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash();$.scrollTo("#header",500)}}}function update_note_count(e,d){var a=$("li#"+e+" div.row div.timestamp");var b=a.find("span.notes-count");var c='<span class="add_tipsy round notes-count" title="{{notes_count_in_words}}"><img alt="Notes" height="16" src="/images/icons/notes.png" width="16"></span>';var f=Mustache.to_html(c,d);if(d.notes_count==0){b.remove()}else{if(b.length>0){b.replaceWith(f).trigger("change")}else{a.prepend(f).trigger("change")}}}var Snorby={setup:function(){$(window).resize(function(){$.fancybox.center});$("div#flash_message, div#flash_message > *").live("click",function(){$("div#flash_message").stop().fadeOut("fast")});$("#growl").notify({speed:500,expires:5000});$(".edit-sensor-name").editable("/sensors/update_name",{height:"20px",width:"180px",name:"name",indicator:'<img src="/images/icons/pager.gif">',data:function(b){var a=b.replace(/<br[\s\/]?>/gi,"\n");return a},submitdata:function(){return{id:$(this).attr("data-sensor-id")}}})},pages:{classifications:function(){$("a.classification").live("click",function(){var a=$(this).attr("data-classification-id");set_classification(a);return false})},dashboard:function(){$("#box-holder div.box").live("click",function(a){a.preventDefault();window.location=$(this).attr("data-url");return false});$("a.show_events_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#events-graph").show();return false});$("a.show_severities_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#severity-graph").show();return false});$("a.show_protocol_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#protocol-graph").show();return false});$("a.show_signature_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#signature-graph").show();return false});$("a.show_classification_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#classification-graph").show();return false});$("a.show_source_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#source-ips-graph").show();return false});$("a.show_destination_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#destination-ips-graph").show();return false})},events:function(){$("select.email-user-select").live("change",function(b){var a=$("select.email-user-select").val();if(a!=""){if($("input#email_to").val()==""){$("input#email_to").val(a)}else{$("input#email_to").val($("input#email_to").val()+", "+a)}}});$("button.email-event-information").live("click",function(a){a.preventDefault();if($("input#email_to").val()==""){flash_message.push({type:"error",message:"The email recipients cannot be blank."});flash();$.scrollTo("#header",500)}else{if($("input#email_subject").val()==""){console.log($("input#email_subject"));flash_message.push({type:"error",message:"The email subject cannot be blank."});flash();$.scrollTo("#header",500)}else{$("a#fancybox-close").click();$.post("/events/email",$("form.email-event-information").serialize(),null,"script")}}return false});$("button.request_packet_capture").live("click",function(a){a.preventDefault();if($(this).attr("data-deepsee")){$("form.request_packet_capture input#method").val("deepsee")}$.post("/events/request_packet_capture",$("form.request_packet_capture").serialize(),null,"script");return false});$("dl#event-sub-menu a").live("click",function(a){$("dl#event-sub-menu").hide()});$("a.has-event-menu").live("click",function(a){a.preventDefault();var b=$(this).parent("li").find("dl#event-sub-menu");if(b.is(":visible")){b.fadeOut("fast")}else{$("dl#event-sub-menu").hide();b.fadeIn("fast")}return false});$("button.mass-action").live("click",function(b){b.preventDefault();var a=$("form#mass-action-form");$("a#fancybox-close").click();$.post("/events/mass_action",a.serialize(),null,"script");return false});$("button.create-notification").live("click",function(b){b.preventDefault();var a=$("form#new_notification");$.post("/notifications",a.serialize(),null,"script");$("a#fancybox-close").click();return false});$("button.cancel-snorbybox").live("click",function(a){a.preventDefault();$("a#fancybox-close").click();return false});$("ul.payload-tabs li a").live("click",function(b){b.preventDefault();var a=$(this).attr("data-div");$(this).parents("ul").find("li").removeClass("current");$(this).parent("li").addClass("current");$("div.payload-holder").hide();$("div."+a+" pre").css("opacity",0);$("div."+a).show();$("div."+a+" pre").stop().animate({opacity:1},1000);return false});$("a.export").live("click",function(b){b.preventDefault();var a=$("input#selected_events").attr("value");if(a){$.post(this.href,{events:a})}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash()}return false});$("a.edit-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");$.getScript("/notes/"+a+"/edit");return false});$("a.destroy-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");if(confirm("Are you sure you want to delete this note?")){$("div.notes").fadeTo(500,0.4);$.post("/notes/destroy",{id:a,_method:"delete"},null,"script")}return false});$("button.add_new_note-working").live("click",function(a){a.preventDefault();return false});$("button.cancel-note").live("click",function(a){a.preventDefault();$(this).parents("div#new_note_box").remove();return false});$("button.add_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");if($("div#new_note_box").length>0){}else{$(this).removeClass("add_new_note").addClass("add_new_note-working");var a=$(this).width();$(this).addClass("loading").css("width",a);$.get("/notes/new",{sid:c,cid:b},null,"script")}return false});$("button.submit_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");var f=$(this).parent("div#form-actions").parent("div#new_note").find("textarea#body").val();if(f.length>0){var a=$(this).width();$(this).addClass("loading").css("width",a);$.post("/notes/create",{sid:c,cid:b,body:f},null,"script")}else{flash_message.push({type:"error",message:"The note body cannot be blank!"});flash();$.scrollTo("#header",500)}return false});$("a.query-data").live("click",function(){$("pre.query-data-content").hide();$("pre#"+$(this).attr("data-content-name")).show();return false});$("a.snorbybox").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href,onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","ctrl+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}});return false});$("div.create-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var c=$(this).parents("li.event").attr("data-event-cid");$(this).removeClass("create-favorite").addClass("destroy-favorite");$.post("/events/favorite",{sid:a,cid:c});var b=new Queue();b.up();return false});$("div.destroy-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var d=$(this).parents("li.event").attr("data-event-cid");var c=$("div#events").attr("data-action");$(this).removeClass("destroy-favorite").addClass("create-favorite");$.post("/events/favorite",{sid:a,cid:d});var b=new Queue();b.down();if(c=="queue"){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$("div.destroy-favorite").removeClass("enabled").css("cursor","default");$.get("/events/queue",null,null,"script")}return false});$("input.event-select-all").live("change",function(){if($(this).attr("checked")){$("ul.table div.content li.event input.event-selector").attr("checked",true)}else{$("ul.table div.content li.event input.event-selector").attr("checked",false)}return true});$("ul.table div.content li.event div.click").live("click",function(){$("dl#event-sub-menu").hide();var b=$(this).parents("li").attr("data-event-sid");var e=$(this).parents("li").attr("data-event-cid");var d=$("li#event_"+b+""+e);var c=$("li#event_"+b+""+e+" input#event-selector");var a=$("li#event_"+b+""+e+" div.event-data");Snorby.helpers.remove_click_events(true);$("li.event").removeClass("highlight");if(!a.is(":visible")){d.addClass("highlight")}else{d.removeClass("highlight")}if(a.attr("data")=="true"){Snorby.helpers.remove_click_events(false);if(a.is(":visible")){a.slideUp("fast",function(){$("li.event div.event-data").slideUp("fast")})}else{$("li.event div.event-data").slideUp("fast");a.slideDown("fast")}}else{c.hide();$("li.event div.event-data").slideUp("fast");d.find("div.select").append("<img alt='laoding' src='/images/icons/loading.gif' class='select-loading'>");$.get("/events/show/"+b+"/"+e,function(){Snorby.helpers.remove_click_events(false);$(".select-loading").remove();c.show();a.attr("data",true)},"script")}return false});$("div.new_events").live("click",function(){$(this).remove();if(parseInt($("strong.new_event_count").html())>100){window.location="/events"}else{$("#events ul.table div.content li").fadeIn("slow")}return false})},},admin:function(){$("#users input#enabled").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{enabled:true}})}else{$.post("/users/toggle_settings",{user_id:a,user:{enabled:false}})}});$("#users input#admin").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{admin:true}})}else{$.post("/users/toggle_settings",{user_id:a,user:{admin:false}})}});$("#severity-color-bg").ColorPicker({color:$("#severity-color-bg").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-bg").val("#"+c);$("span.severity").css("backgroundColor","#"+c)}});$("#severity-color-text").ColorPicker({color:$("#severity-color-text").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-text").val("#"+c);$("span.severity").css("color","#"+c)}})},templates:{flash:function(b){var a=" <div class='{{type}}' id='flash_message' style='display:none;'> <div class='message {{type}}'>{{message}}</div> </div>";return Mustache.to_html(a,b)},event_table:function(b){var a=" {{#events}} <li id='event_{{sid}}{{cid}}' class='event' style='display:none;' data-event-id='{{sid}}-{{cid}}' data-event-sid='{{sid}}' data-event-cid='{{cid}}'> <div class='row'> <div class='select small'><input class='event-selector' id='event-selector' name='event-selector' type='checkbox'></div> <div class='important small'><div class='create-favorite enabled'></div></div> <div class='severity small'><span class='severity sev{{severity}}'>{{severity}}</span></div> <div class='click sensor address'>{{hostname}}</div> <div class='click src_ip address'>{{ip_src}}</div> <div class='click dst_ip address'>{{ip_dst}}</div> <div class='click signature'>{{message}}</div> <div class='click timestamp'>{{timestamp}}</div> </div> <div style='display:none;' class='event-data' data='false'></div> </li> {{/events}}";return Mustache.to_html(a,b)},},notification:function(a){$("#growl").notify("create",a,{expires:3000,speed:500})},helpers:{tipsy:function(){$(".add_tipsy").tipsy({fade:true,html:true,gravity:"s",live:true})},input_style:function(){$("div#form-actions button.cancel").live("click",function(){window.location="/";return false});$("input[name=blank]").focus()},dropdown:function(){$(document).click(function(){$("dl.drop-down-menu:visible").hide()});$("dl.drop-down-menu dd a").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");return true});$("dl.drop-down-menu").hover(function(){var a=$(this).data("timeout");if(a){clearTimeout(a)}},function(){$(this).data("timeout",setTimeout($.proxy(function(){$(this).fadeOut("fast")},this),500))});$("a.has_dropdown").live("click",function(){var b=$(this).attr("id");var a=$(this).parents("li").find("dl#"+b);$("dl.drop-down-menu").each(function(c){if(b===$(this).attr("id")){if($(this).is(":visible")){a.fadeOut("fast")}else{a.slideDown({duration:"fast",easing:"easeOutSine"})}}else{$(this).fadeOut("fast")}});return false})},persistence_selections:function(){$("input#event-selector").live("change",function(){var a=$(this).parents("li").attr("data-event-id");if($(this).attr("checked")){selected_events.push(a);$('input#selected_events[type="hidden"]').val(selected_events)}else{var b=a;selected_events=jQuery.grep(selected_events,function(c){return c!=b});$('input#selected_events[type="hidden"]').val(selected_events)}});$("input#event-select-all").live("change",function(){if($(this).attr("checked")){$('ul.table div.content li input[type="checkbox"]').each(function(a,c){var b=$(this).parents("li").attr("data-event-id");$(this).attr("checked","checked");selected_events.push(b)})}else{$('ul.table div.content li input[type="checkbox"]').each(function(a,b){var c=$(this).parents("li").attr("data-event-id");$(this).attr("checked","");selected_events=jQuery.grep(selected_events,function(d){return d!=c})})}$('input#selected_events[type="hidden"]').val(selected_events)})},recheck_selected_events:function(){$("input#selected_events").val(selected_events);$.each(selected_events,function(a,b){$("input.check_box_"+b).attr("checked","checked")})},pagenation:function(){$("ul.pager li").live("click",function(){if(history&&history.pushState){$(window).bind("popstate",function(){$.getScript(location.href)})}if(!$(this).hasClass("more")){var a=$(this).width();if(a<16){var a=16}$(this).addClass("loading").css("width",a);if($(this).parents("div").hasClass("notes-pager")){$("div.notes").fadeTo(500,0.4)}else{$("div.content, tbody.content").fadeTo(500,0.4)}Snorby.helpers.remove_click_events(true);if(history&&history.pushState){$.getScript($(this).find("a").attr("href"));history.pushState(null,document.title,$(this).find("a").attr("href"))}else{$.getScript($(this).find("a").attr("href"))}}return false})},remove_click_events:function(a){if(a){$("ul.table div.content div").removeClass("click")}else{$("li.event div.sensor, li.event div.src_ip, li.event div.dst_ip, li.event div.signature, li.event div.timestamp").addClass("click")}},},callbacks:function(){$("body").ajaxError(function(c,d,a,b){$("div.content").fadeTo(500,1);$('ul.table div.content li input[type="checkbox"]').attr("checked","");Snorby.helpers.remove_click_events(false);if(d.status===404){flash_message.push({type:"error",message:"The requested page could not be found."});flash()}else{flash_message.push({type:"error",message:"The request failed to complete successfully."});flash()}})},hotkeys:function(){$(document).bind("keydown","ctrl+shift+h",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:"/events/hotkey"});return false});$(document).bind("keydown","ctrl+3",function(){window.location="/jobs";return false});$(document).bind("keydown","ctrl+2",function(){window.location="/events";return false});$(document).bind("keydown","ctrl+1",function(){window.location="/events/queue";return false});$(document).bind("keydown","ctrl+shift+s",function(){window.location="/search";return false});$("ul.table div.content li.event").live("hover",function(){$("ul.table div.content li.event").removeClass("currently-over");$(this).addClass("currently-over")},function(){$(this).removeClass("currently-over")});if($("div.pager").is(":visible")){$(document).bind("keydown","ctrl+down",function(){if($("ul.table div.content li.event.currently-over").is(":visible")){$("ul.table div.content li.event.currently-over").removeClass("currently-over").next().addClass("currently-over")}else{$("ul.table div.content li.event:first").addClass("currently-over")}return false});$(document).bind("keydown","ctrl+up",function(){if($("ul.table div.content li.event.currently-over").is(":visible")){$("ul.table div.content li.event.currently-over").removeClass("currently-over").prev().addClass("currently-over")}else{$("ul.table div.content li.event:last").addClass("currently-over")}return false});$(document).bind("keydown","ctrl+o",function(){$("ul.table div.content li.event.currently-over div.row div.click").click();return false});$(document).bind("keydown","esc",function(){$("ul.table div.content li.event.highlight div.row div.click").click();return false});$(document).bind("keydown","ctrl+shift+1",function(){$("span.sev1").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+2",function(){$("span.sev2").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+3",function(){$("span.sev3").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+u",function(){set_classification(0);return false});$(document).bind("keydown","ctrl+right",function(){$("div.pager.main ul.pager li.last a").click();return false});$(document).bind("keydown","shift+right",function(){$("div.pager.notes-pager ul.pager li.next a").click();return false});$(document).bind("keydown","right",function(){$("div.pager.main ul.pager li.next a").click();return false});$(document).bind("keydown","ctrl+left",function(){$("div.pager.main ul.pager li.first a").click();return false});$(document).bind("keydown","shift+left",function(){$("div.pager.notes-pager ul.pager li.previous a").click();return false});$(document).bind("keydown","left",function(){$("div.pager.main ul.pager li.previous a").click();return false});$(document).bind("keydown","ctrl+shift+a",function(){$("input.event-select-all").click().trigger("change");return false})}},validations:function(){jQuery.validator.addMethod("hex-color",function(b,a,c){return this.optional(a)||/^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/i.test(b)},jQuery.validator.messages.url);$(".validate").validate()},settings:function(){if($("div#general-settings").length>0){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}if($("input#_settings_packet_capture_auto_auth:checked").length==0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}var a=$("select#_settings_packet_capture_type").attr("packet_capture_plugin");$('select#_settings_packet_capture_type option[value="'+a+'"]').attr("selected","selected")}$("input#_settings_packet_capture").live("click",function(){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}});$("input#_settings_packet_capture_auto_auth").live("click",function(){if($("input#_settings_packet_capture_auto_auth:checked").length>0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").addClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled")}})},jobs:function(){$("a.view_job_handler, a.view_job_last_error").live("click",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href});return false})}};jQuery(document).ready(function(a){Snorby.setup();Snorby.admin();Snorby.callbacks();Snorby.hotkeys();Snorby.jobs();Snorby.settings();Snorby.validations();Snorby.helpers.tipsy();Snorby.helpers.dropdown();Snorby.helpers.input_style();Snorby.helpers.persistence_selections();Snorby.helpers.pagenation();Snorby.pages.classifications();Snorby.pages.dashboard();Snorby.pages.events()});
\ No newline at end of file
+(function(d,b){function a(c){return !d(c).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};if(!d.ui.version){d.extend(d.ui,{version:"1.8.4",plugin:{add:function(f,c,h){f=d.ui[f].prototype;for(var g in h){f.plugins[g]=f.plugins[g]||[];f.plugins[g].push([c,h[g]])}},call:function(f,c,h){if((c=f.plugins[c])&&f.element[0].parentNode){for(var g=0;g<c.length;g++){f.options[c[g][0]]&&c[g][1].apply(f.element,h)}}}},contains:function(e,c){return document.compareDocumentPosition?e.compareDocumentPosition(c)&16:e!==c&&e.contains(c)},hasScroll:function(e,c){if(d(e).css("overflow")==="hidden"){return false}c=c&&c==="left"?"scrollLeft":"scrollTop";var f=false;if(e[c]>0){return true}e[c]=1;f=e[c]>0;e[c]=0;return f},isOverAxis:function(e,c,f){return e>c&&e<c+f},isOver:function(f,c,l,k,j,g){return d.ui.isOverAxis(f,l,j)&&d.ui.isOverAxis(c,k,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});d.fn.extend({_focus:d.fn.focus,focus:function(e,c){return typeof e==="number"?this.each(function(){var f=this;setTimeout(function(){d(f).focus();c&&c.call(f)},e)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var c;c=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?d(document):c},zIndex:function(e){if(e!==b){return this.css("zIndex",e)}if(this.length){e=d(this[0]);for(var c;e.length&&e[0]!==document;){c=e.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(e.css("zIndex"));if(!isNaN(c)&&c!=0){return c}}e=e.parent()}}return 0}});d.each(["Width","Height"],function(f,c){function l(n,i,h,e){d.each(k,function(){i-=parseFloat(d.curCSS(n,"padding"+this,true))||0;if(h){i-=parseFloat(d.curCSS(n,"border"+this+"Width",true))||0}if(e){i-=parseFloat(d.curCSS(n,"margin"+this,true))||0}});return i}var k=c==="Width"?["Left","Right"]:["Top","Bottom"],j=c.toLowerCase(),g={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+c]=function(e){if(e===b){return g["inner"+c].call(this)}return this.each(function(){d.style(this,j,l(this,e)+"px")})};d.fn["outer"+c]=function(h,e){if(typeof h!=="number"){return g["outer"+c].call(this,h)}return this.each(function(){d.style(this,j,l(this,h,true,e)+"px")})}});d.extend(d.expr[":"],{data:function(e,c,f){return !!d.data(e,f[3])},focusable:function(e){var c=e.nodeName.toLowerCase(),f=d.attr(e,"tabindex");if("area"===c){c=e.parentNode;f=c.name;if(!e.href||!f||c.nodeName.toLowerCase()!=="map"){return false}e=d("img[usemap=#"+f+"]")[0];return !!e&&a(e)}return(/input|select|textarea|button|object/.test(c)?!e.disabled:"a"==c?e.href||!isNaN(f):!isNaN(f))&&a(e)},tabbable:function(e){var c=d.attr(e,"tabindex");return(isNaN(c)||c>=0)&&d(e).is(":focusable")}})}})(jQuery);(function(a,d){var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){if(!e){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return c.call(a(this),b,e)})};a.widget=function(b,j,i){var h=b.split(".")[0],g;b=b.split(".")[1];g=h+"-"+b;if(!i){i=j;j=a.Widget}a.expr[":"][g]=function(e){return !!a.data(e,b)};a[h]=a[h]||{};a[h][b]=function(e,f){arguments.length&&this._createWidget(e,f)};j=new j;j.options=a.extend(true,{},j.options);a[h][b].prototype=a.extend(true,j,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:g},i);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,e){a.fn[b]=function(k){var j=typeof k==="string",i=Array.prototype.slice.call(arguments,1),g=this;k=!j&&i.length?a.extend.apply(null,[true,k].concat(i)):k;if(j&&k.substring(0,1)==="_"){return g}j?this.each(function(){var h=a.data(this,b),f=h&&a.isFunction(h[k])?h[k].apply(h,i):h;if(f!==h&&f!==d){g=f;return false}}):this.each(function(){var f=a.data(this,b);if(f){k&&f.option(k);f._init()}else{a.data(this,b,new e(k,this))}});return g}};a.Widget=function(b,e){arguments.length&&this._createWidget(b,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,h){var g=b,f=this;if(arguments.length===0){return a.extend({},f.options)}if(typeof b==="string"){if(h===d){return this.options[b]}g={};g[b]=h}a.each(g,function(i,e){f._setOption(i,e)});return f},_setOption:function(b,e){this.options[b]=e;if(b==="disabled"){this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,j,i){var h=this.options[b];j=a.Event(j);j.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();i=i||{};if(j.originalEvent){b=a.event.props.length;for(var g;b;){g=a.event.props[--b];j[g]=j.originalEvent[g]}}this.element.trigger(j,i);return !(a.isFunction(h)&&h.call(this.element[0],j,i)===false||j.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(!d.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,h=d.which==1,g=typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false;if(!h||g||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(b){return c._mouseMove(b)};this._mouseUpDelegate=function(b){return c._mouseUp(b)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||d.preventDefault();return d.originalEvent.mouseHandled=true}},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(d);if(!this.handle){return false}return true},_mouseStart:function(d){var c=this.options;this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);return true},_mouseDrag:function(d,c){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(e){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,e)}if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",e)!==false&&f._clear()})}else{this._trigger("stop",e)!==false&&this._clear()}return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==d.target){c=true}});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone():this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var d=a(e.containment)[0];if(d){e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(e,d){if(!d){d=this.position}e=e=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*e),left:d.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*e)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=/(html|body)/i.test(l[0].tagName),k=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){k=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){k=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;k=this.originalPageX+Math.round((k-this.originalPageX)/d.grid[0])*d.grid[0];k=this.containment?!(k-this.offset.click.left<this.containment[0]||k-this.offset.click.left>this.containment[2])?k:!(k-this.offset.click.left<this.containment[0])?k-d.grid[0]:k+d.grid[0]:k}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():j?0:l.scrollTop()),left:k-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:l.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(e,d,f){f=f||this._uiHash();a.ui.plugin.call(this,e,[d,f]);if(e=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,e,d,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.4"});a.ui.plugin.add("draggable","connectToSortable",{start:function(g,d){var j=a(this).data("draggable"),h=j.options,i=a.extend({},d,{item:j.element});j.sortables=[];a(h.connectToSortable).each(function(){var b=a.data(this,"sortable");if(b&&!b.options.disabled){j.sortables.push({instance:b,shouldRevert:b.options.revert});b._refreshItems();b._trigger("activate",g,i)}})},stop:function(e,d){var h=a(this).data("draggable"),g=a.extend({},d,{item:h.element});a.each(h.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;h.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(e);this.instance.options.helper=this.instance.options._helper;h.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",e,g)}})},drag:function(e,d){var h=a(this).data("draggable"),g=this;a.each(h.sortables,function(){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};e.target=this.instance.currentItem[0];this.instance._mouseCapture(e,true);this.instance._mouseStart(e,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger("toSortable",e);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}this.instance.currentItem&&this.instance._mouseDrag(e)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",e,this.instance._uiHash(this.instance));this.instance._mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();h._trigger("fromSortable",e);h.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor")){c._cursor=d.css("cursor")}d.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity")){c._opacity=d.css("opacity")}d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(e){var d=a(this).data("draggable"),h=d.options,g=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!h.axis||h.axis!="x"){if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-e.pageY<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop+h.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop-h.scrollSpeed}}}if(!h.axis||h.axis!="y"){if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-e.pageX<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft-h.scrollSpeed}}}}else{if(!h.axis||h.axis!="x"){if(e.pageY-a(document).scrollTop()<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}}if(!h.axis||h.axis!="y"){if(e.pageX-a(document).scrollLeft()<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}}g!==false&&a.ui.ddmanager&&!h.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,e)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var e=a(this),b=e.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:b.top,left:b.left})})},drag:function(L,K){for(var J=a(this).data("draggable"),H=J.options,I=H.snapTolerance,G=K.offset.left,z=G+J.helperProportions.width,A=K.offset.top,y=A+J.helperProportions.height,F=J.snapElements.length-1;F>=0;F--){var E=J.snapElements[F].left,C=E+J.snapElements[F].width,D=J.snapElements[F].top,B=D+J.snapElements[F].height;if(E-I<G&&G<C+I&&D-I<A&&A<B+I||E-I<G&&G<C+I&&D-I<y&&y<B+I||E-I<z&&z<C+I&&D-I<A&&A<B+I||E-I<z&&z<C+I&&D-I<y&&y<B+I){if(H.snapMode!="inner"){var x=Math.abs(D-y)<=I,w=Math.abs(B-A)<=I,v=Math.abs(E-z)<=I,u=Math.abs(C-G)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D-J.helperProportions.height,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E-J.helperProportions.width}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C}).left-J.margins.left}}var d=x||w||v||u;if(H.snapMode!="outer"){x=Math.abs(D-A)<=I;w=Math.abs(B-y)<=I;v=Math.abs(E-G)<=I;u=Math.abs(C-z)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B-J.helperProportions.height,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[F].snapping&&(x||w||v||u||d)){J.options.snap.snap&&J.options.snap.snap.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}))}J.snapElements[F].snapping=x||w||v||u||d}else{J.snapElements[F].snapping&&J.options.snap.release&&J.options.snap.release.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}));J.snapElements[F].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(e,b){return(parseInt(a(e).css("zIndex"),10)||0)-(parseInt(a(b).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(b){this.style.zIndex=c+b});this[0].style.zIndex=c+d.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex")){c._zIndex=d.css("zIndex")}d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(b){return b.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++){d[c]==this&&d.splice(c,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept"){this.accept=a.isFunction(c)?c:function(b){return b.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",d,this.ui(c))}}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}}},_drop:function(f,d){var h=d||a.ui.ddmanager.current;if(!h||(h.currentItem||h.element)[0]==this.element[0]){return false}var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==h.options.scope&&b.accept.call(b.element[0],h.currentItem||h.element)&&a.ui.intersect(h,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){g=true;return false}});if(g){return false}if(this.accept.call(this.element[0],h.currentItem||h.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",f,this.ui(h));return this.element}return false},ui:function(b){return{draggable:b.currentItem||b.element,helper:b.helper,position:b.position,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.4"});a.ui.intersect=function(w,v,u){if(!v.offset){return false}var s=(w.positionAbs||w.position.absolute).left,q=s+w.helperProportions.width,r=(w.positionAbs||w.position.absolute).top,p=r+w.helperProportions.height,o=v.offset.left,m=o+v.proportions.width,n=v.offset.top,d=n+v.proportions.height;switch(u){case"fit":return o<=s&&q<=m&&n<=r&&p<=d;case"intersect":return o<s+w.helperProportions.width/2&&q-w.helperProportions.width/2<m&&n<r+w.helperProportions.height/2&&p-w.helperProportions.height/2<d;case"pointer":return a.ui.isOver((w.positionAbs||w.position.absolute).top+(w.clickOffset||w.offset.click).top,(w.positionAbs||w.position.absolute).left+(w.clickOffset||w.offset.click).left,n,o,v.proportions.height,v.proportions.width);case"touch":return(r>=n&&r<=d||p>=n&&p<=d||r<n&&p>d)&&(s>=o&&s<=m||q>=o&&q<=m||s<o&&q>m);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(i,d){var n=a.ui.ddmanager.droppables[i.options.scope]||[],m=d?d.type:null,k=(i.currentItem||i.element).find(":data(droppable)").andSelf(),l=0;i:for(;l<n.length;l++){if(!(n[l].options.disabled||i&&!n[l].accept.call(n[l].element[0],i.currentItem||i.element))){for(var j=0;j<k.length;j++){if(k[j]==n[l].element[0]){n[l].proportions.height=0;continue i}}n[l].visible=n[l].element.css("display")!="none";if(n[l].visible){n[l].offset=n[l].element.offset();n[l].proportions={width:n[l].element[0].offsetWidth,height:n[l].element[0].offsetHeight};m=="mousedown"&&n[l]._activate.call(n[l],d)}}}},drop:function(e,d){var f=false;a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance)){f=f||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return f},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var h=a.ui.intersect(d,this,this.options.tolerance);if(h=!h&&this.isover==1?"isout":h&&this.isover==0?"isover":null){var f;if(this.options.greedy){var b=this.element.parents(":data(droppable):eq(0)");if(b.length){f=a.data(b[0],"droppable");f.greedyChild=h=="isover"?1:0}}if(f&&h=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,c);if(f&&h=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}}}})}}})(jQuery);(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var e=this,h=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&c.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var k=0;k<l.length;k++){var j=c.trim(l[k]),i=c('<div class="ui-resizable-handle '+("ui-resizable-"+j)+'"></div>');/sw|se|ne|nw/.test(j)&&i.css({zIndex:++h.zIndex});"se"==j&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[j]=".ui-resizable-"+j;this.element.append(i)}}this._renderAxis=function(m){m=m||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=c(this.handles[g],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var f=c(this.handles[g],this.element),d=0;d=/sw|ne|nw|se|n|s/.test(g)?f.outerHeight():f.outerWidth();f=["padding",/ne|nw|n/.test(g)?"Top":/se|sw|s/.test(g)?"Bottom":/^e$/.test(g)?"Right":"Left"].join("");m.css(f,d);this._proportionallyResize()}c(this.handles[g])}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var d=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=d&&d[1]?d[1]:"se"}});if(h.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(d){var e=false;for(var f in this.handles){if(c(this.handles[f])[0]==d.target){e=true}}return !this.options.disabled&&e},_mouseStart:function(e){var g=this.options,j=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position"))){i.css({position:"absolute",top:j.top,left:j.left})}c.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();j=a(this.helper.css("left"));var h=a(this.helper.css("top"));if(g.containment){j+=c(g.containment).scrollLeft()||0;h+=c(g.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:h};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:j,top:h};this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof g.aspectRatio=="number"?g.aspectRatio:this.originalSize.width/this.originalSize.height||1;g=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",g=="auto"?this.axis+"-resize":g);i.addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var f=this.helper,h=this.originalMousePosition,g=this._change[this.axis];if(!g){return false}h=g.apply(this,[e,e.pageX-h.left||0,e.pageY-h.top||0]);if(this._aspectRatio||e.shiftKey){h=this._updateRatio(h,e)}h=this._respectSize(h,e);this._propagate("resize",e);f.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(h);this._trigger("resize",e,this.ui());return false},_mouseStop:function(e){this.resizing=false;var h=this.options,l=this;if(this._helper){var k=this._proportionallyResizeElements,j=k.length&&/textarea/i.test(k[0].nodeName);k=j&&c.ui.hasScroll(k[0],"left")?0:l.sizeDiff.height;j={width:l.size.width-(j?0:l.sizeDiff.width),height:l.size.height-k};k=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null;var i=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null;h.animate||this.element.css(c.extend(j,{top:i,left:k}));l.helper.height(l.size.height);l.helper.width(l.size.width);this._helper&&!h.animate&&this._proportionallyResize()}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",e);this._helper&&this.helper.remove();return false},_updateCache:function(d){this.offset=this.helper.offset();if(b(d.left)){this.position.left=d.left}if(b(d.top)){this.position.top=d.top}if(b(d.height)){this.size.height=d.height}if(b(d.width)){this.size.width=d.width}},_updateRatio:function(e){var f=this.position,h=this.size,g=this.axis;if(e.height){e.width=h.height*this.aspectRatio}else{if(e.width){e.height=h.width/this.aspectRatio}}if(g=="sw"){e.left=f.left+(h.width-e.width);e.top=null}if(g=="nw"){e.top=f.top+(h.height-e.height);e.left=f.left+(h.width-e.width)}return e},_respectSize:function(s){var u=this.options,r=this.axis,q=b(s.width)&&u.maxWidth&&u.maxWidth<s.width,p=b(s.height)&&u.maxHeight&&u.maxHeight<s.height,o=b(s.width)&&u.minWidth&&u.minWidth>s.width,n=b(s.height)&&u.minHeight&&u.minHeight>s.height;if(o){s.width=u.minWidth}if(n){s.height=u.minHeight}if(q){s.width=u.maxWidth}if(p){s.height=u.maxHeight}var m=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,e=/sw|nw|w/.test(r);r=/nw|ne|n/.test(r);if(o&&e){s.left=m-u.minWidth}if(q&&e){s.left=m-u.maxWidth}if(n&&r){s.top=l-u.minHeight}if(p&&r){s.top=l-u.maxHeight}if((u=!s.width&&!s.height)&&!s.left&&s.top){s.top=null}else{if(u&&!s.top&&s.left){s.left=null}}return s},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var e=this.helper||this.element,g=0;g<this._proportionallyResizeElements.length;g++){var j=this._proportionallyResizeElements[g];if(!this.borderDif){var i=[j.css("borderTopWidth"),j.css("borderRightWidth"),j.css("borderBottomWidth"),j.css("borderLeftWidth")],h=[j.css("paddingTop"),j.css("paddingRight"),j.css("paddingBottom"),j.css("paddingLeft")];this.borderDif=c.map(i,function(f,d){f=parseInt(f,10)||0;d=parseInt(h[d],10)||0;return f+d})}c.browser.msie&&(c(e).is(":hidden")||c(e).parents(":hidden").length)||j.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var d=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,f=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++d.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(d,e){return{width:this.originalSize.width+e}},w:function(d,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(d,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(d,e,f){return{height:this.originalSize.height+f}},se:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},sw:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,e,f]))},ne:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},nw:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,e,f]))}},_propagate:function(d,e){c.ui.plugin.call(this,d,[e,this.ui()]);d!="resize"&&this._trigger(d,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.4"});c.ui.plugin.add("resizable","alsoResize",{start:function(){var d=c(this).data("resizable").options,e=function(f){c(f).each(function(){var g=c(this);g.data("resizable-alsoresize",{width:parseInt(g.width(),10),height:parseInt(g.height(),10),left:parseInt(g.css("left"),10),top:parseInt(g.css("top"),10),position:g.css("position")})})};if(typeof d.alsoResize=="object"&&!d.alsoResize.parentNode){if(d.alsoResize.length){d.alsoResize=d.alsoResize[0];e(d.alsoResize)}else{c.each(d.alsoResize,function(f){e(f)})}}else{e(d.alsoResize)}},resize:function(e,i){var n=c(this).data("resizable");e=n.options;var m=n.originalSize,l=n.originalPosition,k={height:n.size.height-m.height||0,width:n.size.width-m.width||0,top:n.position.top-l.top||0,left:n.position.left-l.left||0},j=function(f,d){c(f).each(function(){var g=c(this),o=c(this).data("resizable-alsoresize"),s={},h=d&&d.length?d:g.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(h,function(q,p){if((q=(o[p]||0)+(k[p]||0))&&q>=0){s[p]=q||null}});if(c.browser.opera&&/relative/.test(g.css("position"))){n._revertToRelativePosition=true;g.css({position:"absolute",top:"auto",left:"auto"})}g.css(s)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(f,d){j(f,d)}):j(e.alsoResize)},stop:function(){var d=c(this).data("resizable"),e=d.options,f=function(g){c(g).each(function(){var h=c(this);h.css({position:h.data("resizable-alsoresize").position})})};if(d._revertToRelativePosition){d._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(g){f(g)}):f(e.alsoResize)}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(e){var i=c(this).data("resizable"),n=i.options,m=i._proportionallyResizeElements,l=m.length&&/textarea/i.test(m[0].nodeName),k=l&&c.ui.hasScroll(m[0],"left")?0:i.sizeDiff.height;l={width:i.size.width-(l?0:i.sizeDiff.width),height:i.size.height-k};k=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null;var j=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(c.extend(l,j&&k?{top:j,left:k}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var d={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};m&&m.length&&c(m[0]).css({width:d.width,height:d.height});i._updateCache(d);i._propagate("resize",e)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var e=c(this).data("resizable"),i=e.element,n=e.options.containment;if(i=n instanceof c?n.get(0):/parent/.test(n)?i.parent().get(0):n){e.containerElement=c(i);if(/document/.test(n)||n==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(i),l=[];c(["Top","Right","Left","Bottom"]).each(function(f,d){l[f]=a(m.css("padding"+d))});e.containerOffset=m.offset();e.containerPosition=m.position();e.containerSize={height:m.innerHeight()-l[3],width:m.innerWidth()-l[1]};n=e.containerOffset;var k=e.containerSize.height,j=e.containerSize.width;j=c.ui.hasScroll(i,"left")?i.scrollWidth:j;k=c.ui.hasScroll(i)?i.scrollHeight:k;e.parentData={element:i,left:n.left,top:n.top,width:j,height:k}}}},resize:function(e){var i=c(this).data("resizable"),n=i.options,m=i.containerOffset,l=i.position;e=i._aspectRatio||e.shiftKey;var k={top:0,left:0},j=i.containerElement;if(j[0]!=document&&/static/.test(j.css("position"))){k=m}if(l.left<(i._helper?m.left:0)){i.size.width+=i._helper?i.position.left-m.left:i.position.left-k.left;if(e){i.size.height=i.size.width/n.aspectRatio}i.position.left=n.helper?m.left:0}if(l.top<(i._helper?m.top:0)){i.size.height+=i._helper?i.position.top-m.top:i.position.top;if(e){i.size.width=i.size.height*n.aspectRatio}i.position.top=i._helper?m.top:0}i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;n=Math.abs((i._helper?i.offset.left-k.left:i.offset.left-k.left)+i.sizeDiff.width);m=Math.abs((i._helper?i.offset.top-k.top:i.offset.top-m.top)+i.sizeDiff.height);l=i.containerElement.get(0)==i.element.parent().get(0);k=/relative|absolute/.test(i.containerElement.css("position"));if(l&&k){n-=i.parentData.left}if(n+i.size.width>=i.parentData.width){i.size.width=i.parentData.width-n;if(e){i.size.height=i.size.width/i.aspectRatio}}if(m+i.size.height>=i.parentData.height){i.size.height=i.parentData.height-m;if(e){i.size.width=i.size.height*i.aspectRatio}}},stop:function(){var e=c(this).data("resizable"),j=e.options,p=e.containerOffset,o=e.containerPosition,n=e.containerElement,m=c(e.helper),l=m.offset(),k=m.outerWidth()-e.sizeDiff.width;m=m.outerHeight()-e.sizeDiff.height;e._helper&&!j.animate&&/relative/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m});e._helper&&!j.animate&&/static/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m})}});c.ui.plugin.add("resizable","ghost",{start:function(){var d=c(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var d=c(this).data("resizable");d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=c(this).data("resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var e=c(this).data("resizable"),i=e.options,n=e.size,m=e.originalSize,l=e.originalPosition,k=e.axis;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var j=Math.round((n.width-m.width)/(i.grid[0]||1))*(i.grid[0]||1);i=Math.round((n.height-m.height)/(i.grid[1]||1))*(i.grid[1]||1);if(/^(se|s|e)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{if(/^(ne)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}else{if(/^(sw)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}e.position.left=l.left-j}}}});var a=function(d){return parseInt(d,10)||0},b=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var b;this.refresh=function(){b=a(d.options.filter,d.element[0]);b.each(function(){var e=a(this),c=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:c.left,top:c.top,right:c.left+e.outerWidth(),bottom:c.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(g){var b=this;this.opos=[g.pageX,g.pageY];if(!this.options.disabled){var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",g);a(e.appendTo).append(this.helper);this.helper.css({left:g.clientX,top:g.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=a.data(this,"selectable-item");c.startselected=true;if(!g.metaKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=true;b._trigger("unselecting",g,{unselecting:c.element})}});a(g.target).parents().andSelf().each(function(){var c=a.data(this,"selectable-item");if(c){var d=!g.metaKey||!c.$element.hasClass("ui-selected");c.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting");c.unselecting=!d;c.selecting=d;(c.selected=d)?b._trigger("selecting",g,{selecting:c.element}):b._trigger("unselecting",g,{unselecting:c.element});return false}})}},_mouseDrag:function(q){var o=this;this.dragged=true;if(!this.options.disabled){var p=this.options,e=this.opos[0],n=this.opos[1],m=q.pageX,l=q.pageY;if(e>m){var k=m;m=e;e=k}if(n>l){k=l;l=n;n=k}this.helper.css({left:e,top:n,width:m-e,height:l-n});this.selectees.each(function(){var b=a.data(this,"selectable-item");if(!(!b||b.element==o.element[0])){var c=false;if(p.tolerance=="touch"){c=!(b.left>m||b.right<e||b.top>l||b.bottom<n)}else{if(p.tolerance=="fit"){c=b.left>e&&b.right<m&&b.top>n&&b.bottom<l}}if(c){if(b.selected){b.$element.removeClass("ui-selected");b.selected=false}if(b.unselecting){b.$element.removeClass("ui-unselecting");b.unselecting=false}if(!b.selecting){b.$element.addClass("ui-selecting");b.selecting=true;o._trigger("selecting",q,{selecting:b.element})}}else{if(b.selecting){if(q.metaKey&&b.startselected){b.$element.removeClass("ui-selecting");b.selecting=false;b.$element.addClass("ui-selected");b.selected=true}else{b.$element.removeClass("ui-selecting");b.selecting=false;if(b.startselected){b.$element.addClass("ui-unselecting");b.unselecting=true}o._trigger("unselecting",q,{unselecting:b.element})}}if(b.selected){if(!q.metaKey&&!b.startselected){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;o._trigger("unselecting",q,{unselecting:b.element})}}}}});return false}},_mouseStop:function(d){var b=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=false;b._trigger("unselected",d,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;b._trigger("selected",d,{selected:c.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}return this},_setOption:function(d,c){if(d==="disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(g,d){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(g);var j=null,i=this;a(g.target).parents().each(function(){if(a.data(this,"sortable-item")==i){j=a(this);return false}});if(a.data(g.target,"sortable-item")==i){j=a(g.target)}if(!j){return false}if(this.options.handle&&!d){var h=false;a(this.options.handle,j).find("*").andSelf().each(function(){if(this==g.target){h=true}});if(!h){return false}}this.currentItem=j;this._removeCurrentsFromItems();return true},_mouseStart:function(f,d,h){d=this.options;var g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();d.containment&&this._setContainment();if(d.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",d.cursor)}if(d.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",d.opacity)}if(d.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",d.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!h){for(h=this.containers.length-1;h>=0;h--){this.containers[h]._trigger("activate",f,g._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var d=this.options,j=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-g.pageY<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop+d.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop-d.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-g.pageX<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft-d.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}j!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(d=this.items.length-1;d>=0;d--){j=this.items[d];var i=j.item[0],h=this._intersectsWithPointer(j);if(h){if(i!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=i&&!a.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],i):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(j)){this._rearrange(g,j)}else{break}this._trigger("change",g,this._uiHash());break}}}this._contactContainers(g);a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(e,d){if(e){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,e);if(this.options.revert){var f=this;d=f.placeholder.offset();f.reverting=true;a(this.helper).animate({left:d.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(e)})}else{this._clear(e,d)}return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};a(d).each(function(){var b=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);if(b){f.push((e.key||b[1]+"[]")+"="+(e.key&&e.expression?b[1]:b[2]))}});!f.length&&e.key&&f.push(e.key+"=");return f.join("&")},toArray:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};d.each(function(){f.push(a(e.item||this).attr(e.attribute||"id")||"")});return f},_intersectsWith:function(w){var v=this.positionAbs.left,u=v+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,q=w.left,p=q+w.width,o=w.top,m=o+w.height,n=this.offset.click.top,d=this.offset.click.left;n=s+n>o&&s+n<m&&v+d>q&&v+d<p;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>w[this.floating?"width":"height"]?n:q<v+this.helperProportions.width/2&&u-this.helperProportions.width/2<p&&o<s+this.helperProportions.height/2&&r-this.helperProportions.height/2<m},_intersectsWithPointer:function(e){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height);e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);d=d&&e;e=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!d){return false}return this.floating?f&&f=="right"||e=="down"?2:1:e&&(e=="down"?2:1)},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height);f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width);var h=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return this.floating&&g?g=="right"&&f||g=="left"&&!f:h&&(h=="down"&&d||h=="up"&&!d)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(i){var d=[],n=[],m=this._connectWith();if(m&&i){for(i=m.length-1;i>=0;i--){for(var l=a(m[i]),k=l.length-1;k>=0;k--){var j=a.data(l[k],"sortable");if(j&&j!=this&&!j.options.disabled){n.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}}}n.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=n.length-1;i>=0;i--){n[i][0].each(function(){d.push(this)})}return a(d)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data(sortable-item)"),d=0;d<this.items.length;d++){for(var f=0;f<e.length;f++){e[f]==this.items[d].item[0]&&this.items.splice(d,1)}}},_refreshItems:function(j){this.items=[];this.containers=[this];var d=this.items,p=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],j,{item:this.currentItem}):a(this.options.items,this.element),this]],o=this._connectWith();if(o){for(var n=o.length-1;n>=0;n--){for(var m=a(o[n]),l=m.length-1;l>=0;l--){var k=a.data(m[l],"sortable");if(k&&k!=this&&!k.options.disabled){p.push([a.isFunction(k.options.items)?k.options.items.call(k.element[0],j,{item:this.currentItem}):a(k.options.items,k.element),k]);this.containers.push(k)}}}}for(n=p.length-1;n>=0;n--){j=p[n][1];o=p[n][0];l=0;for(m=o.length;l<m;l++){k=a(o[l]);k.data("sortable-item",j);d.push({item:k,instance:j,width:0,height:0,left:0,top:0})}}},refreshPositions:function(f){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var h=this.items[d],g=this.options.toleranceElement?a(this.options.toleranceElement,h.item):h.item;if(!f){h.width=g.outerWidth();h.height=g.outerHeight()}g=g.offset();h.left=g.left;h.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(d=this.containers.length-1;d>=0;d--){g=this.containers[d].element.offset();this.containers[d].containerCache.left=g.left;this.containers[d].containerCache.top=g.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}return this},_createPlaceholder:function(f){var d=f||this,h=d.options;if(!h.placeholder||h.placeholder.constructor==String){var g=h.placeholder;h.placeholder={element:function(){var b=a(document.createElement(d.currentItem[0].nodeName)).addClass(g||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g){b.style.visibility="hidden"}return b},update:function(c,b){if(!(g&&!h.forcePlaceholderSize)){b.height()||b.height(d.currentItem.innerHeight()-parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||0,10));b.width()||b.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=a(h.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);h.placeholder.update(d,d.placeholder)},_contactContainers:function(i){for(var d=null,n=null,m=this.containers.length-1;m>=0;m--){if(!a.ui.contains(this.currentItem[0],this.containers[m].element[0])){if(this._intersectsWith(this.containers[m].containerCache)){if(!(d&&a.ui.contains(this.containers[m].element[0],d.element[0]))){d=this.containers[m];n=m}}else{if(this.containers[m].containerCache.over){this.containers[m]._trigger("out",i,this._uiHash(this));this.containers[m].containerCache.over=0}}}}if(d){if(this.containers.length===1){this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}else{if(this.currentContainer!=this.containers[n]){d=10000;m=null;for(var l=this.positionAbs[this.containers[n].floating?"left":"top"],k=this.items.length-1;k>=0;k--){if(a.ui.contains(this.containers[n].element[0],this.items[k].item[0])){var j=this.items[k][this.containers[n].floating?"left":"top"];if(Math.abs(j-l)<d){d=Math.abs(j-l);m=this.items[k]}}}if(m||this.options.dropOnEmpty){this.currentContainer=this.containers[n];m?this._rearrange(i,m,null,true):this._rearrange(i,null,this.containers[n].element,true);this._trigger("change",i,this._uiHash());this.containers[n]._trigger("change",i,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}}}}},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[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")}}if(d[0].style.width==""||c.forceHelperSize){d.width(this.currentItem.width())}if(d[0].style.height==""||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)){var d=a(e.containment)[0];e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,d){if(!d){d=this.position}f=f=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*f),left:d.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*f)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,k=/(html|body)/i.test(l[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var j=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){j=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){j=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;j=this.originalPageX+Math.round((j-this.originalPageX)/d.grid[0])*d.grid[0];j=this.containment?!(j-this.offset.click.left<this.containment[0]||j-this.offset.click.left>this.containment[2])?j:!(j-this.offset.click.left<this.containment[0])?j-d.grid[0]:j+d.grid[0]:j}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():k?0:l.scrollTop()),left:j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():k?0:l.scrollLeft())}},_rearrange:function(h,d,l,k){l?l[0].appendChild(this.placeholder[0]):d.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?d.item[0]:d.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var j=this,i=this.counter;window.setTimeout(function(){i==j.counter&&j.refreshPositions(!k)},0)},_clear:function(f,d){this.reverting=false;var h=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var g in this._storedCSS){if(this._storedCSS[g]=="auto"||this._storedCSS[g]=="static"){this._storedCSS[g]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!d&&h.push(function(b){this._trigger("receive",b,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!d){h.push(function(b){this._trigger("update",b,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){d||h.push(function(b){this._trigger("remove",b,this._uiHash())});for(g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!d){h.push(function(b){return function(c){b._trigger("receive",c,this._uiHash(this))}}.call(this,this.containers[g]));h.push(function(b){return function(c){b._trigger("update",c,this._uiHash(this))}}.call(this,this.containers[g]))}}}for(g=this.containers.length-1;g>=0;g--){d||h.push(function(b){return function(c){b._trigger("deactivate",c,this._uiHash(this))}}.call(this,this.containers[g]));if(this.containers[g].containerCache.over){h.push(function(b){return function(c){b._trigger("out",c,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!d){this._trigger("beforeStop",f,this._uiHash());for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}return false}d||this._trigger("beforeStop",f,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!d){for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.4"})})(jQuery);jQuery.effects||function(q,i){function g(j){var f;if(j&&j.constructor==Array&&j.length==3){return j}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(j)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(j)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(j)){return e.transparent}return e[q.trim(j).toLowerCase()]}function a(k,j){var f;do{f=q.curCSS(k,j);if(f!=""&&f!="transparent"||q.nodeName(k,"body")){break}j="backgroundColor"}while(k=k.parentNode);return g(f)}function d(){var m=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,j={},f,l;if(m&&m.length&&m[0]&&m[m[0]]){for(var k=m.length;k--;){f=m[k];if(typeof m[f]=="string"){l=f.replace(/\-(\w)/g,function(o,n){return n.toUpperCase()});j[l]=m[f]}}}else{for(f in m){if(typeof m[f]==="string"){j[f]=m[f]}}}return j}function c(k){var j,f;for(j in k){f=k[j];if(f==null||q.isFunction(f)||j in v||/scrollbar/.test(j)||!/color/i.test(j)&&isNaN(parseFloat(f))){delete k[j]}}return k}function u(l,j){var f={_:0},k;for(k in j){if(l[k]!=j[k]){f[k]=j[k]}}return f}function h(l,j,f,k){if(typeof l=="object"){k=j;f=null;j=l;l=j.effect}if(q.isFunction(j)){k=j;f=null;j={}}if(typeof j=="number"||q.fx.speeds[j]){k=f;f=j;j={}}if(q.isFunction(f)){k=f;f=null}j=j||{};f=f||j.duration;f=q.fx.off?0:typeof f=="number"?f:q.fx.speeds[f]||q.fx.speeds._default;k=k||j.complete;return[l,j,f,k]}q.effects={};q.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(j,f){q.fx.step[f]=function(k){if(!k.colorInit){k.start=a(k.elem,f);k.end=g(k.end);k.colorInit=true}k.elem.style[f]="rgb("+Math.max(Math.min(parseInt(k.pos*(k.end[0]-k.start[0])+k.start[0],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[1]-k.start[1])+k.start[1],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[2]-k.start[2])+k.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},b=["add","remove","toggle"],v={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};q.effects.animateClass=function(l,j,f,k){if(q.isFunction(f)){k=f;f=null}return this.each(function(){var r=q(this),o=r.attr("style")||" ",n=c(d.call(this)),p,m=r.attr("className");q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});p=c(d.call(this));r.attr("className",m);r.animate(u(n,p),j,f,function(){q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=o}else{r.attr("style",o)}k&&k.apply(this,arguments)})})};q.fn.extend({_addClass:q.fn.addClass,addClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{add:l},j,f,k]):this._addClass(l)},_removeClass:q.fn.removeClass,removeClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{remove:l},j,f,k]):this._removeClass(l)},_toggleClass:q.fn.toggleClass,toggleClass:function(m,j,f,l,k){return typeof j=="boolean"||j===i?f?q.effects.animateClass.apply(this,[j?{add:m}:{remove:m},f,l,k]):this._toggleClass(m,j):q.effects.animateClass.apply(this,[{toggle:m},j,f,l])},switchClass:function(m,j,f,l,k){return q.effects.animateClass.apply(this,[{add:j,remove:m},f,l,k])}});q.extend(q.effects,{version:"1.8.4",save:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.data("ec.storage."+j[f],k[0].style[j[f]])}},restore:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.css(j[f],k.data("ec.storage."+j[f]))}},setMode:function(j,f){if(f=="toggle"){f=j.is(":hidden")?"show":"hide"}return f},getBaseline:function(k,j){var f;switch(k[0]){case"top":f=0;break;case"middle":f=0.5;break;case"bottom":f=1;break;default:f=k[0]/j.height}switch(k[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=k[1]/j.width}return{x:k,y:f}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent()}var j={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},f=q("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(f);f=k.parent();if(k.css("position")=="static"){f.css({position:"relative"});k.css({position:"relative"})}else{q.extend(j,{position:k.css("position"),zIndex:k.css("z-index")});q.each(["top","left","bottom","right"],function(m,l){j[l]=k.css(l);if(isNaN(parseInt(j[l],10))){j[l]="auto"}});k.css({position:"relative",top:0,left:0})}return f.css(j).show()},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(l,j,f,k){k=k||{};q.each(j,function(n,m){unit=l.cssUnit(m);if(unit[0]>0){k[m]=unit[0]*f+unit[1]}});return k}});q.fn.extend({effect:function(k){var j=h.apply(this,arguments);j={options:j[1],duration:j[2],callback:j[3]};var f=q.effects[k];return f&&!q.fx.off?f.call(this,j):this},_show:q.fn.show,show:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._show.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="show";return this.effect.apply(this,f)}},_hide:q.fn.hide,hide:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._hide.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="hide";return this.effect.apply(this,f)}},__toggle:q.fn.toggle,toggle:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]||typeof j=="boolean"||q.isFunction(j)){return this.__toggle.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(k){var j=this.css(k),f=[];q.each(["em","px","%","pt"],function(m,l){if(j.indexOf(l)>0){f=[parseFloat(j),l]}});return f}});q.easing.jswing=q.easing.swing;q.extend(q.easing,{def:"easeOutQuad",swing:function(m,j,f,l,k){return q.easing[q.easing.def](m,j,f,l,k)},easeInQuad:function(m,j,f,l,k){return l*(j/=k)*j+f},easeOutQuad:function(m,j,f,l,k){return -l*(j/=k)*(j-2)+f},easeInOutQuad:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j+f}return -l/2*(--j*(j-2)-1)+f},easeInCubic:function(m,j,f,l,k){return l*(j/=k)*j*j+f},easeOutCubic:function(m,j,f,l,k){return l*((j=j/k-1)*j*j+1)+f},easeInOutCubic:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j+f}return l/2*((j-=2)*j*j+2)+f},easeInQuart:function(m,j,f,l,k){return l*(j/=k)*j*j*j+f},easeOutQuart:function(m,j,f,l,k){return -l*((j=j/k-1)*j*j*j-1)+f},easeInOutQuart:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j+f}return -l/2*((j-=2)*j*j*j-2)+f},easeInQuint:function(m,j,f,l,k){return l*(j/=k)*j*j*j*j+f},easeOutQuint:function(m,j,f,l,k){return l*((j=j/k-1)*j*j*j*j+1)+f},easeInOutQuint:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j*j+f}return l/2*((j-=2)*j*j*j*j+2)+f},easeInSine:function(m,j,f,l,k){return -l*Math.cos(j/k*(Math.PI/2))+l+f},easeOutSine:function(m,j,f,l,k){return l*Math.sin(j/k*(Math.PI/2))+f},easeInOutSine:function(m,j,f,l,k){return -l/2*(Math.cos(Math.PI*j/k)-1)+f},easeInExpo:function(m,j,f,l,k){return j==0?f:l*Math.pow(2,10*(j/k-1))+f},easeOutExpo:function(m,j,f,l,k){return j==k?f+l:l*(-Math.pow(2,-10*j/k)+1)+f},easeInOutExpo:function(m,j,f,l,k){if(j==0){return f}if(j==k){return f+l}if((j/=k/2)<1){return l/2*Math.pow(2,10*(j-1))+f}return l/2*(-Math.pow(2,-10*--j)+2)+f},easeInCirc:function(m,j,f,l,k){return -l*(Math.sqrt(1-(j/=k)*j)-1)+f},easeOutCirc:function(m,j,f,l,k){return l*Math.sqrt(1-(j=j/k-1)*j)+f},easeInOutCirc:function(m,j,f,l,k){if((j/=k/2)<1){return -l/2*(Math.sqrt(1-j*j)-1)+f}return l/2*(Math.sqrt(1-(j-=2)*j)+1)+f},easeInElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return -(k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l))+f},easeOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return k*Math.pow(2,-10*j)*Math.sin((j*m-o)*2*Math.PI/l)+n+f},easeInOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m/2)==2){return f+n}l||(l=m*0.3*1.5);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}if(j<1){return -0.5*k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)+f}return k*Math.pow(2,-10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)*0.5+n+f},easeInBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*(j/=l)*j*((k+1)*j-k)+f},easeOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*((j=j/l-1)*j*((k+1)*j+k)+1)+f},easeInOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}if((j/=l/2)<1){return m/2*j*j*(((k*=1.525)+1)*j-k)+f}return m/2*((j-=2)*j*(((k*=1.525)+1)*j+k)+2)+f},easeInBounce:function(m,j,f,l,k){return l-q.easing.easeOutBounce(m,k-j,0,l,k)+f},easeOutBounce:function(m,j,f,l,k){return(j/=k)<1/2.75?l*7.5625*j*j+f:j<2/2.75?l*(7.5625*(j-=1.5/2.75)*j+0.75)+f:j<2.5/2.75?l*(7.5625*(j-=2.25/2.75)*j+0.9375)+f:l*(7.5625*(j-=2.625/2.75)*j+0.984375)+f},easeInOutBounce:function(m,j,f,l,k){if(j<k/2){return q.easing.easeInBounce(m,j*2,0,l,k)*0.5+f}return q.easing.easeOutBounce(m,j*2-k,0,l,k)*0.5+l*0.5+f}})}(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var c=a(this),l=["position","top","left"],m=a.effects.setMode(c,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(c,l);c.show();var n=a.effects.createWrapper(c).css({overflow:"hidden"}),k=o=="vertical"?"height":"width";o=o=="vertical"?n.height():n.width();m=="show"&&n.css(k,0);var j={};j[k]=m=="show"?o:0;n.animate(j,b.duration,b.options.easing,function(){m=="hide"&&c.hide();a.effects.restore(c,l);a.effects.removeWrapper(c);b.callback&&b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a){a.effects.bounce=function(c){return this.queue(function(){var w=a(this),e=["position","top","left"],q=a.effects.setMode(w,c.options.mode||"effect"),u=c.options.direction||"up",v=c.options.distance||20,b=c.options.times||5,p=c.duration||250;/show|hide/.test(q)&&e.push("opacity");a.effects.save(w,e);w.show();a.effects.createWrapper(w);var s=u=="up"||u=="down"?"top":"left";u=u=="up"||u=="left"?"pos":"neg";v=c.options.distance||(s=="top"?w.outerHeight({margin:true})/3:w.outerWidth({margin:true})/3);if(q=="show"){w.css("opacity",0).css(s,u=="pos"?-v:v)}if(q=="hide"){v/=b*2}q!="hide"&&b--;if(q=="show"){var r={opacity:1};r[s]=(u=="pos"?"+=":"-=")+v;w.animate(r,p/2,c.options.easing);v/=2;b--}for(r=0;r<b;r++){var o={},n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing);v=q=="hide"?v*2:v/2}if(q=="hide"){r={opacity:0};r[s]=(u=="pos"?"-=":"+=")+v;w.animate(r,p/2,c.options.easing,function(){w.hide();a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}else{o={};n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing,function(){a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}w.queue("fx",function(){w.dequeue()});w.dequeue()})}})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var e=a(this),j=["position","top","left","height","width"],m=a.effects.setMode(e,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(e,j);e.show();var n=a.effects.createWrapper(e).css({overflow:"hidden"});n=e[0].tagName=="IMG"?n:e;var l={size:o=="vertical"?"height":"width",position:o=="vertical"?"top":"left"};o=o=="vertical"?n.height():n.width();if(m=="show"){n.css(l.size,0);n.css(l.position,o/2)}var k={};k[l.size]=m=="show"?o:0;k[l.position]=m=="show"?0:o/2;n.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){m=="hide"&&e.hide();a.effects.restore(e,j);a.effects.removeWrapper(e);b.callback&&b.callback.apply(e[0],arguments);e.dequeue()}})})}})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var d=a(this),k=["position","top","left","opacity"],n=a.effects.setMode(d,b.options.mode||"hide"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d);var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true})/2:d.outerWidth({margin:true})/2);if(n=="show"){d.css("opacity",0).css(m,c=="pos"?-l:l)}var j={opacity:n=="show"?1:0};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var q=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,p=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var j=a(this).show().css("visibility","hidden"),m=j.offset();m.top-=parseInt(j.css("marginTop"),10)||0;m.left-=parseInt(j.css("marginLeft"),10)||0;for(var l=j.outerWidth(true),k=j.outerHeight(true),o=0;o<q;o++){for(var n=0;n<p;n++){j.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*(l/p),top:-o*(k/q)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:l/p,height:k/q,left:m.left+n*(l/p)+(b.options.mode=="show"?(n-Math.floor(p/2))*(l/p):0),top:m.top+o*(k/q)+(b.options.mode=="show"?(o-Math.floor(q/2))*(k/q):0),opacity:b.options.mode=="show"?0:1}).animate({left:m.left+n*(l/p)+(b.options.mode=="show"?0:(n-Math.floor(p/2))*(l/p)),top:m.top+o*(k/q)+(b.options.mode=="show"?0:(o-Math.floor(q/2))*(k/q)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?j.css({visibility:"visible"}):j.css({visibility:"visible"}).hide();b.callback&&b.callback.apply(j[0]);j.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fade=function(b){return this.queue(function(){var f=a(this),e=a.effects.setMode(f,b.options.mode||"hide");f.animate({opacity:e},{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"],u=a.effects.setMode(v,b.options.mode||"hide"),q=b.options.size||15,p=!!b.options.horizFirst,m=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(v,n);v.show();var s=a.effects.createWrapper(v).css({overflow:"hidden"}),r=u=="show"!=p,c=r?["width","height"]:["height","width"];r=r?[s.width(),s.height()]:[s.height(),s.width()];var o=/([0-9]+)%/.exec(q);if(o){q=parseInt(o[1],10)/100*r[u=="hide"?0:1]}if(u=="show"){s.css(p?{height:0,width:q}:{height:q,width:0})}p={};o={};p[c[0]]=u=="show"?r[0]:q;o[c[1]]=u=="show"?r[1]:0;s.animate(p,m,b.options.easing).animate(o,m,b.options.easing,function(){u=="hide"&&v.hide();a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(v[0],arguments);v.dequeue()})})}})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),h=["backgroundImage","backgroundColor","opacity"],i=a.effects.setMode(c,b.options.mode||"show"),g={backgroundColor:c.css("backgroundColor")};if(i=="hide"){g.opacity=0}a.effects.save(c,h);c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){i=="hide"&&c.hide();a.effects.restore(c,h);i=="show"&&!a.support.opacity&&this.style.removeAttribute("filter");b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,b.options.mode||"show");times=(b.options.times||5)*2-1;duration=b.duration?b.duration/2:a.fx.speeds._default/2;isVisible=d.is(":visible");animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if(e=="hide"&&isVisible||e=="show"&&!isVisible){times--}for(e=0;e<times;e++){d.animate({opacity:animateTo},duration,b.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,b.options.easing,function(){animateTo==0&&d.hide();b.callback&&b.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);(function(a){a.effects.puff=function(c){return this.queue(function(){var b=a(this),k=a.effects.setMode(b,c.options.mode||"hide"),j=parseInt(c.options.percent,10)||150,f=j/100,d={height:b.height(),width:b.width()};a.extend(c.options,{fade:true,mode:k,percent:k=="hide"?j:100,from:k=="hide"?d:{height:d.height*f,width:d.width*f}});b.effect("scale",c.options,c.duration,c.callback);b.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var b=a(this),m=a.extend(true,{},c.options),k=a.effects.setMode(b,c.options.mode||"effect"),j=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:k=="hide"?0:100),d=c.options.direction||"both",l=c.options.origin;if(k!="effect"){m.origin=l||["middle","center"];m.restore=true}l={height:b.height(),width:b.width()};b.from=c.options.from||(k=="show"?{height:0,width:0}:l);j={y:d!="horizontal"?j/100:1,x:d!="vertical"?j/100:1};b.to={height:l.height*j.y,width:l.width*j.x};if(c.options.fade){if(k=="show"){b.from.opacity=0;b.to.opacity=1}if(k=="hide"){b.from.opacity=1;b.to.opacity=0}}m.from=b.from;m.to=b.to;m.mode=k;b.effect("size",m,c.duration,c.callback);b.dequeue()})};a.effects.size=function(c){return this.queue(function(){var B=a(this),z=["position","top","left","width","height","overflow","opacity"],x=["position","top","left","overflow","opacity"],w=["width","height","overflow"],v=["fontSize"],y=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],s=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],b=a.effects.setMode(B,c.options.mode||"effect"),o=c.options.restore||false,q=c.options.scale||"both",r=c.options.origin,u={height:B.height(),width:B.width()};B.from=c.options.from||u;B.to=c.options.to||u;if(r){r=a.effects.getBaseline(r,u);B.from.top=(u.height-B.from.height)*r.y;B.from.left=(u.width-B.from.width)*r.x;B.to.top=(u.height-B.to.height)*r.y;B.to.left=(u.width-B.to.width)*r.x}var A={from:{y:B.from.height/u.height,x:B.from.width/u.width},to:{y:B.to.height/u.height,x:B.to.width/u.width}};if(q=="box"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(y);B.from=a.effects.setTransition(B,y,A.from.y,B.from);B.to=a.effects.setTransition(B,y,A.to.y,B.to)}if(A.from.x!=A.to.x){z=z.concat(s);B.from=a.effects.setTransition(B,s,A.from.x,B.from);B.to=a.effects.setTransition(B,s,A.to.x,B.to)}}if(q=="content"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(v);B.from=a.effects.setTransition(B,v,A.from.y,B.from);B.to=a.effects.setTransition(B,v,A.to.y,B.to)}}a.effects.save(B,o?z:x);B.show();a.effects.createWrapper(B);B.css("overflow","hidden").css(B.from);if(q=="content"||q=="both"){y=y.concat(["marginTop","marginBottom"]).concat(v);s=s.concat(["marginLeft","marginRight"]);w=z.concat(y).concat(s);B.find("*[width]").each(function(){child=a(this);o&&a.effects.save(child,w);var d={height:child.height(),width:child.width()};child.from={height:d.height*A.from.y,width:d.width*A.from.x};child.to={height:d.height*A.to.y,width:d.width*A.to.x};if(A.from.y!=A.to.y){child.from=a.effects.setTransition(child,y,A.from.y,child.from);child.to=a.effects.setTransition(child,y,A.to.y,child.to)}if(A.from.x!=A.to.x){child.from=a.effects.setTransition(child,s,A.from.x,child.from);child.to=a.effects.setTransition(child,s,A.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){o&&a.effects.restore(child,w)})})}B.animate(B.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){B.to.opacity===0&&B.css("opacity",B.from.opacity);b=="hide"&&B.hide();a.effects.restore(B,o?z:x);a.effects.removeWrapper(B);c.callback&&c.callback.apply(this,arguments);B.dequeue()}})})}})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"];a.effects.setMode(v,b.options.mode||"effect");var u=b.options.direction||"left",s=b.options.distance||20,d=b.options.times||3,r=b.duration||b.options.duration||140;a.effects.save(v,n);v.show();a.effects.createWrapper(v);var q=u=="up"||u=="down"?"top":"left",p=u=="up"||u=="left"?"pos":"neg";u={};var o={},m={};u[q]=(p=="pos"?"-=":"+=")+s;o[q]=(p=="pos"?"+=":"-=")+s*2;m[q]=(p=="pos"?"-=":"+=")+s*2;v.animate(u,r,b.options.easing);for(s=1;s<d;s++){v.animate(o,r,b.options.easing).animate(m,r,b.options.easing)}v.animate(o,r,b.options.easing).animate(u,r/2,b.options.easing,function(){a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(this,arguments)});v.queue("fx",function(){v.dequeue()});v.dequeue()})}})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var d=a(this),k=["position","top","left"],n=a.effects.setMode(d,b.options.mode||"show"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d).css({overflow:"hidden"});var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(n=="show"){d.css(m,c=="pos"?-l:l)}var j={};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var e=a(this),i=a(b.options.to),h=i.offset();i={top:h.top,left:h.left,height:i.innerHeight(),width:i.innerWidth()};h=e.offset();var g=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:h.top,left:h.left,height:e.innerHeight(),width:e.innerWidth(),position:"absolute"}).animate(i,b.duration,b.options.easing,function(){g.remove();b.callback&&b.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var e=this,c=e.options;e.running=0;e.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");e.headers=e.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});e.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var h=e.element.find("a").filter(c.navigationFilter).eq(0);if(h.length){var g=h.closest(".ui-accordion-header");e.active=g.length?g:h.closest(".ui-accordion-content").prev()}}e.active=e._findActive(e.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");e.active.next().addClass("ui-accordion-content-active");e._createIcons();e.resize();e.element.attr("role","tablist");e.headers.attr("role","tab").bind("keydown.accordion",function(b){return e._keydown(b)}).next().attr("role","tabpanel");e.headers.not(e.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();e.active.length?e.active.attr({"aria-expanded":"true",tabIndex:0}):e.headers.eq(0).attr("tabIndex",0);a.browser.safari||e.headers.find("a").attr("tabIndex",-1);c.event&&e.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(b){e._clickHandler.call(e,b,this);b.preventDefault()})},_createIcons:function(){var b=this.options;if(b.icons){a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight){c.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();c&&this._createIcons()}if(d=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(e){if(!(this.options.disabled||e.altKey||e.ctrlKey)){var c=a.ui.keyCode,j=this.headers.length,i=this.headers.index(e.target),h=false;switch(e.keyCode){case c.RIGHT:case c.DOWN:h=this.headers[(i+1)%j];break;case c.LEFT:case c.UP:h=this.headers[(i-1+j)%j];break;case c.SPACE:case c.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(h){a(e.target).attr("tabIndex",-1);a(h).attr("tabIndex",0);h.focus();return false}return true}},resize:function(){var e=this.options,c;if(e.fillSpace){if(a.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(e.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}}return this},activate:function(b){this.options.active=b;b=this._findActive(b)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b==="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(e,c){var l=this.options;if(!l.disabled){if(e.target){e=a(e.currentTarget||c);c=e[0]===this.active[0];l.active=l.collapsible&&c?false:this.headers.index(e);if(!(this.running||!l.collapsible&&c)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);if(!c){e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(l.icons.header).addClass(l.icons.headerSelected);e.next().addClass("ui-accordion-content-active")}i=e.next();k=this.active.next();j={options:l,newHeader:c&&l.collapsible?a([]):e,oldHeader:this.active,newContent:c&&l.collapsible?a([]):i,oldContent:k};l=this.headers.index(this.active[0])>this.headers.index(e[0]);this.active=c?a([]):e;this._toggle(i,k,j,c,l)}}else{if(l.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);this.active.next().addClass("ui-accordion-content-active");var k=this.active.next(),j={options:l,newHeader:a([]),oldHeader:l.active,newContent:a([]),oldContent:k},i=this.active=a([]);this._toggle(i,k,j)}}}},_toggle:function(u,s,r,p,o){var n=this,q=n.options;n.toShow=u;n.toHide=s;n.data=r;var l=function(){if(n){return n._completed.apply(n,arguments)}};n._trigger("changestart",null,n.data);n.running=s.size()===0?u.size():s.size();if(q.animated){r={};r=q.collapsible&&p?{toShow:a([]),toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace}:{toShow:u,toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace};if(!q.proxied){q.proxied=q.animated}if(!q.proxiedDuration){q.proxiedDuration=q.duration}q.animated=a.isFunction(q.proxied)?q.proxied(r):q.proxied;q.duration=a.isFunction(q.proxiedDuration)?q.proxiedDuration(r):q.proxiedDuration;p=a.ui.accordion.animations;var m=q.duration,c=q.animated;if(c&&!p[c]&&!a.easing[c]){c="slide"}p[c]||(p[c]=function(b){this.slide(b,{easing:c,duration:m||700})});p[c](r)}else{if(q.collapsible&&p){u.toggle()}else{s.hide();u.show()}l(true)}s.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();u.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(b){this.running=b?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.4",animations:{slide:function(i,c){i=a.extend({easing:"swing",duration:300},i,c);if(i.toHide.size()){if(i.toShow.size()){var n=i.toShow.css("overflow"),l=0,k={},j={},m;c=i.toShow;m=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(b,d){j[d]="hide";b=(""+a.css(i.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);k[d]={value:b[1],unit:b[2]||"px"}});i.toShow.css({height:0,overflow:"hidden"}).show();i.toHide.filter(":hidden").each(i.complete).end().filter(":visible").animate(j,{step:function(b,d){if(d.prop=="height"){l=d.end-d.start===0?0:(d.now-d.start)/(d.end-d.start)}i.toShow[0].style[d.prop]=l*k[d.prop].value+k[d.prop].unit},duration:i.duration,easing:i.easing,complete:function(){i.autoHeight||i.toShow.css("height","");i.toShow.css({width:m,overflow:n});i.complete()}})}else{i.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},i)}}else{i.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},i)}},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})}}})})(jQuery);(function(a){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var d=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!d.options.disabled){var b=a.ui.keyCode;switch(e.keyCode){case b.PAGE_UP:d._move("previousPage",e);break;case b.PAGE_DOWN:d._move("nextPage",e);break;case b.UP:d._move("previous",e);e.preventDefault();break;case b.DOWN:d._move("next",e);e.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:d.menu.element.is(":visible")&&e.preventDefault();case b.TAB:if(!d.menu.active){return}d.menu.select(e);break;case b.ESCAPE:d.element.val(d.term);d.close(e);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,e)}},d.options.delay);break}}}).bind("focus.autocomplete",function(){if(!d.options.disabled){d.selectedItem=null;d.previous=d.element.val()}}).bind("blur.autocomplete",function(b){if(!d.options.disabled){clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(b);d._change(b)},150)}});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(e){var b=d.menu.element[0];e.target===b&&setTimeout(function(){a(document).one("mousedown",function(g){g.target!==d.element[0]&&g.target!==b&&!a.ui.contains(b,g.target)&&d.close()})},1);setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(e,b){b=b.item.data("item.autocomplete");false!==d._trigger("focus",null,{item:b})&&/^key/.test(e.originalEvent.type)&&d.element.val(b.value)},selected:function(g,e){e=e.item.data("item.autocomplete");var b=d.previous;if(d.element[0]!==c.activeElement){d.element.focus();d.previous=b}false!==d._trigger("select",g,{item:e})&&d.element.val(e.value);d.close(g);d.selectedItem=e},blur:function(){d.menu.element.is(":visible")&&d.element.val()!==d.term&&d.element.val(d.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d==="source"&&this._initSource();if(d==="appendTo"){this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0])}},_initSource:function(){var d,c;if(a.isArray(this.options.source)){d=this.options.source;this.source=function(e,b){b(a.ui.autocomplete.filter(d,e.term))}}else{if(typeof this.options.source==="string"){c=this.options.source;this.source=function(e,b){a.getJSON(c,e,b)}}else{this.source=this.options.source}}},search:function(d,c){d=d!=null?d:this.element.val();if(d.length<this.options.minLength){return this.close(c)}clearTimeout(this.closing);if(this._trigger("search")!==false){return this._search(d)}},_search:function(b){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:b},this.response)},_response:function(b){if(b.length){b=this._normalize(b);this._suggest(b);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")},close:function(b){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",b);this.menu.element.hide();this.menu.deactivate()}},_change:function(b){this.previous!==this.element.val()&&this._trigger("change",b,{item:this.selectedItem})},_normalize:function(b){if(b.length&&b[0].label&&b[0].value){return b}return a.map(b,function(c){if(typeof c==="string"){return{label:c,value:c}}return a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(e){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1),f;this._renderMenu(d,e);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(a.extend({of:this.element},this.options.position));e=d.width("").outerWidth();f=this.element.outerWidth();d.outerWidth(Math.max(e,f))},_renderMenu:function(e,d){var f=this;a.each(d,function(c,b){f._renderItem(e,b)})},_renderItem:function(d,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(d)},_move:function(d,c){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[d](c)}}else{this.search(null,c)}},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,d){var f=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(e,function(b){return f.test(b.label||b.value||b)})}})})(jQuery);(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();b.select(c)}});this.refresh()},refresh:function(){var b=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(g,e){this.deactivate();if(this.hasScroll()){var j=e.offset().top-this.element.offset().top,i=this.element.attr("scrollTop"),h=this.element.height();if(j<0){this.element.attr("scrollTop",i+j)}else{j>h&&this.element.attr("scrollTop",i+j-h+e.height())}}this.active=e.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",g,{item:e})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,d,f){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(f,e):this.activate(f,this.element.children(d))}else{this.activate(f,this.element.children(d))}},nextPage:function(f){if(this.hasScroll()){if(!this.active||this.last()){this.activate(f,this.element.children(":first"))}else{var e=this.active.offset().top,h=this.element.height(),g=this.element.children("li").filter(function(){var b=a(this).offset().top-e-h+a(this).height();return b<10&&b>-10});g.length||(g=this.element.children(":last"));this.activate(f,g)}}else{this.activate(f,this.element.children(!this.active||this.last()?":first":":last"))}},previousPage:function(e){if(this.hasScroll()){if(!this.active||this.first()){this.activate(e,this.element.children(":last"))}else{var d=this.active.offset().top,f=this.element.height();result=this.element.children("li").filter(function(){var b=a(this).offset().top-d+f-a(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(e,result)}}else{this.activate(e,this.element.children(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})})(jQuery);(function(b){var e,c=function(a){b(":ui-button",a.target.form).each(function(){var f=b(this).data("button");setTimeout(function(){f.refresh()},1)})},d=function(a){var h=a.name,g=a.form,f=b([]);if(h){f=g?b(g).find("[name='"+h+"']"):b("[name='"+h+"']",a.ownerDocument).filter(function(){return !this.form})}return f};b.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",c);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,h=this.options,g=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!g?" ui-state-active":"");if(h.label===null){h.label=this.buttonElement.html()}if(this.element.is(":disabled")){h.disabled=true}this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!h.disabled){b(this).addClass("ui-state-hover");this===e&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){h.disabled||b(this).removeClass(f)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});g&&this.element.bind("change.button",function(){a.refresh()});if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);var i=a.element[0];d(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");e=this;b(document).one("mouseup",function(){e=null})}).bind("mouseup.button",function(){if(h.disabled){return false}b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(h.disabled){return false}if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER){b(this).addClass("ui-state-active")}}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}}this._setOption("disabled",h.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var a=this.element.is(":checked");a&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(a,f){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled"){f?this.element.attr("disabled",true):this.element.removeAttr("disabled")}this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio"){d(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)})}else{if(this.type==="checkbox"){this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label)}else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),h=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),g=this.options.icons,f=g.primary&&g.secondary;if(g.primary||g.secondary){a.addClass("ui-button-text-icon"+(f?"s":g.primary?"-primary":"-secondary"));g.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>");g.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>");if(!this.options.text){a.addClass(f?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||a.attr("title",h)}}else{a.addClass("ui-button-text-only")}}}});b.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(a,f){a==="disabled"&&this.buttons.button("option",a,f);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);(function(d,G){function L(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function E(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==G){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b)}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().removeClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().addClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass,b.dpDiv).add(d("td."+d.datepicker._currentClass,b.dpDiv));c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-i[0],top:-i[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),k=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose")){a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,k=c=-1,l=-1,u=-1,j=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p){throw"Missing number at position "+s}s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++){if(b.substr(s,p[w].length)==p[w]){s+=p[w].length;return w+1}}throw"Unknown name at position "+s},r=function(){if(b.charAt(s)!=a.charAt(z)){throw"Unexpected literal at position "+s}s++},s=0,z=0;z<a.length;z++){if(j){if(a.charAt(z)=="'"&&!o("'")){j=false}else{r()}}else{switch(a.charAt(z)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":k=m("m");break;case"M":k=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){r()}else{j=true}break;default:r()}}}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){k=1;l=u;do{e=this._getDaysInMonth(c,k-1);if(l<=e){break}k++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,k-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=k||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=j+1<a.length&&a.charAt(j+1)==o)&&j++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},k=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b){for(var j=0;j<a.length;j++){if(u){if(a.charAt(j)=="'"&&!i("'")){u=false}else{l+=a.charAt(j)}}else{switch(a.charAt(j)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000,3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(j)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,k=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=u.exec(h);j;){switch(j[2]||"d"){case"d":case"D":g+=parseInt(j[1],10);break;case"w":case"W":g+=parseInt(j[1],10)*7;break;case"m":case"M":l+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break;case"y":case"Y":k+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break}j=u.exec(h)}return new Date(k,l,g)};if(b=(b=b==null?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):b)&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),j=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=j&&n<j?j:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-k,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+k,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";k=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;k=!h?k:this.formatDate(k,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;k=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),w=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var N="",D=0;D<i[1];D++){var J=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1){switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,A)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,K=B&&!H||!F[0]||j&&q<j||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==J.getTime()&&g==a.selectedMonth&&a._keyEvent||M.getTime()==q.getTime()&&M.getTime()==J.getTime()?" "+this._dayOverClass:"")+(K?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(K?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?" ":K?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==J.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=x}I+=N}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='<div class="ui-datepicker-title">',o="";if(h||!k){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l){j+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){j+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}j+="</select>"}j+=this._get(a,"yearSuffix");if(u){j+=(h||!(k&&l)?" ":"")+o}j+="</div>";return j},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);(function(b,a){b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(d){var c=b(this).css(d).offset().top;c<0&&b(this).css("top",d.top-c)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}var i=this,c=i.options,n=c.title||i.originalTitle||" ",l=b.ui.dialog.getTitleId(i.element),k=(i.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c.dialogClass).css({zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(d){if(c.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){i.close(d);d.preventDefault()}}).attr({role:"dialog","aria-labelledby":l}).mousedown(function(d){i.moveToTop(false,d)});i.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var m=(i.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),j=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(d){i.close(d);return false}).appendTo(m);(i.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j);b("<span></span>").addClass("ui-dialog-title").attr("id",l).html(n).prependTo(m);if(b.isFunction(c.beforeclose)&&!b.isFunction(c.beforeClose)){c.beforeClose=c.beforeclose}m.find("*").add(m).disableSelection();c.draggable&&b.fn.draggable&&i._makeDraggable();c.resizable&&b.fn.resizable&&i._makeResizable();i._createButtons(c.buttons);i._isOpen=false;b.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var c=this;c.overlay&&c.overlay.destroy();c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");c.uiDialog.remove();c.originalTitle&&c.element.attr("title",c.originalTitle);return c},widget:function(){return this.uiDialog},close:function(e){var c=this,f;if(false!==c._trigger("beforeClose",e)){c.overlay&&c.overlay.destroy();c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",e)})}else{c.uiDialog.hide();c._trigger("close",e)}b.ui.dialog.overlay.resize();if(c.options.modal){f=0;b(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){f=Math.max(f,b(this).css("z-index"))}});b.ui.dialog.maxZ=f}return c}},isOpen:function(){return this._isOpen},moveToTop:function(e,c){var h=this,g=h.options;if(g.modal&&!e||!g.stack&&!g.modal){return h._trigger("focus",c)}if(g.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=g.zIndex}if(h.overlay){b.ui.dialog.maxZ+=1;h.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:h.element.attr("scrollTop"),scrollLeft:h.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;h.uiDialog.css("z-index",b.ui.dialog.maxZ);h.element.attr(e);h._trigger("focus",c);return h},open:function(){if(!this._isOpen){var e=this,c=e.options,f=e.uiDialog;e.overlay=c.modal?new b.ui.dialog.overlay(e):null;f.next().length&&f.appendTo("body");e._size();e._position(c.position);f.show(c.show);e.moveToTop(true);c.modal&&f.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var d=b(":tabbable",this),i=d.filter(":first");d=d.filter(":last");if(h.target===d[0]&&!h.shiftKey){i.focus(1);return false}else{if(h.target===i[0]&&h.shiftKey){d.focus(1);return false}}}});b(e.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();e._trigger("open");e._isOpen=true;return e}},_createButtons:function(e){var c=this,j=false,i=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),h=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(i);c.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return !(j=true)});if(j){b.each(e,function(f,d){f=b('<button type="button"></button>').text(f).click(function(){d.apply(c.element[0],arguments)}).appendTo(h);b.fn.button&&f.button()});i.appendTo(c.uiDialog)}},_makeDraggable:function(){function e(d){return{position:d.position,offset:d.offset}}var c=this,j=c.options,i=b(document),h;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,d){h=j.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",f,e(d))},drag:function(f,d){c._trigger("drag",f,e(d))},stop:function(f,d){j.position=[d.position.left-i.scrollLeft(),d.position.top-i.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(h);c._trigger("dragStop",f,e(d));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function c(d){return{originalPosition:d.originalPosition,originalSize:d.originalSize,position:d.position,size:d.size}}e=e===a?this.options.resizable:e;var j=this,i=j.options,h=j.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";j.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:j.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:j._minHeight(),handles:e,start:function(f,d){b(this).addClass("ui-dialog-resizing");j._trigger("resizeStart",f,c(d))},resize:function(f,d){j._trigger("resize",f,c(d))},stop:function(f,d){b(this).removeClass("ui-dialog-resizing");i.height=b(this).height();i.width=b(this).width();j._trigger("resizeStop",f,c(d));b.ui.dialog.overlay.resize()}}).css("position",h).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(e){var c=[],h=[0,0],g;if(e){if(typeof e==="string"||typeof e==="object"&&"0" in e){c=e.split?e.split(" "):[e[0],e[1]];if(c.length===1){c[1]=c[0]}b.each(["left","top"],function(d,f){if(+c[d]===c[d]){h[d]=c[d];c[d]=f}});e={my:c.join(" "),at:c.join(" "),offset:h.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else{e=b.ui.dialog.prototype.options.position}(g=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(e);g||this.uiDialog.hide()},_setOption:function(h,c){var l=this,j=l.uiDialog,i=j.is(":data(resizable)"),k=false;switch(h){case"beforeclose":h="beforeClose";break;case"buttons":l._createButtons(c);k=true;break;case"closeText":l.uiDialogTitlebarCloseText.text(""+c);break;case"dialogClass":j.removeClass(l.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c);break;case"disabled":c?j.addClass("ui-dialog-disabled"):j.removeClass("ui-dialog-disabled");break;case"draggable":c?l._makeDraggable():j.draggable("destroy");break;case"height":k=true;break;case"maxHeight":i&&j.resizable("option","maxHeight",c);k=true;break;case"maxWidth":i&&j.resizable("option","maxWidth",c);k=true;break;case"minHeight":i&&j.resizable("option","minHeight",c);k=true;break;case"minWidth":i&&j.resizable("option","minWidth",c);k=true;break;case"position":l._position(c);break;case"resizable":i&&!c&&j.resizable("destroy");i&&typeof c==="string"&&j.resizable("option","handles",c);!i&&c!==false&&l._makeResizable(c);break;case"title":b(".ui-dialog-title",l.uiDialogTitlebar).html(""+(c||" "));break;case"width":k=true;break}b.Widget.prototype._setOption.apply(l,arguments);k&&l._size()},_size:function(){var d=this.options,c;this.element.css({width:"auto",minHeight:0,height:0});if(d.minWidth>d.width){d.width=d.minWidth}c=this.uiDialog.css({height:"auto",width:d.width}).height();this.element.css(d.height==="auto"?{minHeight:Math.max(d.minHeight-c,0),height:"auto"}:{minHeight:0,height:Math.max(d.height-c,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c){this.uuid+=1;c=this.uuid}return"ui-dialog-title-"+c},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(e){return b(e.target).zIndex()>=b.ui.dialog.overlay.maxZ})},1);b(document).bind("keydown.dialog-overlay",function(e){if(d.options.closeOnEscape&&e.keyCode&&e.keyCode===b.ui.keyCode.ESCAPE){d.close(e);e.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});b.fn.bgiframe&&c.bgiframe();this.instances.push(c);return c},destroy:function(d){this.oldInstances.push(this.instances.splice(b.inArray(d,this.instances),1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");d.remove();var c=0;b.each(this.instances,function(){c=Math.max(c,this.css("z-index"))});this.maxZ=c},height:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return d<c?b(window).height()+"px":d+"px"}else{return b(document).height()+"px"}},width:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return d<c?b(window).width()+"px":d+"px"}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(f){f.ui=f.ui||{};var a=/left|center|right/,e=/top|center|bottom/,d=f.fn.position,b=f.fn.offset;f.fn.position=function(j){if(!j||!j.of){return d.apply(this,arguments)}j=f.extend({},j);var c=f(j.of),o=(j.collision||"flip").split(" "),n=j.offset?j.offset.split(" "):[0,0],m,l,k;if(j.of.nodeType===9){m=c.width();l=c.height();k={top:0,left:0}}else{if(j.of.scrollTo&&j.of.document){m=c.width();l=c.height();k={top:c.scrollTop(),left:c.scrollLeft()}}else{if(j.of.preventDefault){j.at="left top";m=l=0;k={top:j.of.pageY,left:j.of.pageX}}else{m=c.outerWidth();l=c.outerHeight();k=c.offset()}}}f.each(["my","at"],function(){var g=(j[this]||"").split(" ");if(g.length===1){g=a.test(g[0])?g.concat(["center"]):e.test(g[0])?["center"].concat(g):["center","center"]}g[0]=a.test(g[0])?g[0]:"center";g[1]=e.test(g[1])?g[1]:"center";j[this]=g});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(j.at[0]==="right"){k.left+=m}else{if(j.at[0]==="center"){k.left+=m/2}}if(j.at[1]==="bottom"){k.top+=l}else{if(j.at[1]==="center"){k.top+=l/2}}k.left+=n[0];k.top+=n[1];return this.each(function(){var p=f(this),h=p.outerWidth(),g=p.outerHeight(),i=f.extend({},k);if(j.my[0]==="right"){i.left-=h}else{if(j.my[0]==="center"){i.left-=h/2}}if(j.my[1]==="bottom"){i.top-=g}else{if(j.my[1]==="center"){i.top-=g/2}}i.left=parseInt(i.left);i.top=parseInt(i.top);f.each(["left","top"],function(s,q){f.ui.position[o[s]]&&f.ui.position[o[s]][q](i,{targetWidth:m,targetHeight:l,elemWidth:h,elemHeight:g,offset:n,my:j.my,at:j.at})});f.fn.bgiframe&&p.bgiframe();p.offset(f.extend(i,{using:j.using}))})};f.ui.position={fit:{left:function(g,c){var h=f(window);c=g.left+c.elemWidth-h.width()-h.scrollLeft();g.left=c>0?g.left-c:Math.max(0,g.left)},top:function(g,c){var h=f(window);c=g.top+c.elemHeight-h.height()-h.scrollTop();g.top=c>0?g.top-c:Math.max(0,g.top)}},flip:{left:function(h,c){if(c.at[0]!=="center"){var k=f(window);k=h.left+c.elemWidth-k.width()-k.scrollLeft();var j=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,i=-2*c.offset[0];h.left+=h.left<0?j+c.targetWidth+i:k>0?j-c.targetWidth+i:0}},top:function(i,c){if(c.at[1]!=="center"){var m=f(window);m=i.top+c.elemHeight-m.height()-m.scrollTop();var l=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,k=c.at[1]==="top"?c.targetHeight:-c.targetHeight,j=-2*c.offset[1];i.top+=i.top<0?l+c.targetHeight+j:m>0?l+k+j:0}}}};if(!f.offset.setOffset){f.offset.setOffset=function(i,c){if(/static/.test(f.curCSS(i,"position"))){i.style.position="relative"}var m=f(i),l=m.offset(),k=parseInt(f.curCSS(i,"top",true),10)||0,j=parseInt(f.curCSS(i,"left",true),10)||0;l={top:c.top-l.top+k,left:c.left-l.left+j};"using" in c?c.using.call(i,l):m.css(l)};f.fn.offset=function(g){var c=this[0];if(!c||!c.ownerDocument){return null}if(g){return this.each(function(){f.offset.setOffset(this,g)})}return b.call(this)}}})(jQuery);(function(a,d){a.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===d){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){if(b==="value"){this.options.value=c;this._refreshValue();this._trigger("change")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!=="number"){b=0}return Math.min(this.max,Math.max(this.min,b))},_refreshValue:function(){var b=this.value();this.valueDiv.toggleClass("ui-corner-right",b===this.max).width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");c.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!==2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range==="min"||c.range==="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length===0&&a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");if(c.values&&c.values.length){for(;a(".ui-slider-handle",this.element).length<c.values.length;){a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled){a(this).blur()}else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(n){var m=true,l=a(this).data("index.ui-slider-handle"),j,k,b;if(!d.options.disabled){switch(n.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:m=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");j=d._start(n,l);if(j===false){return}}break}b=d.options.step;j=d.options.values&&d.options.values.length?(k=d.values(l)):(k=d.value());switch(n.keyCode){case a.ui.keyCode.HOME:k=d._valueMin();break;case a.ui.keyCode.END:k=d._valueMax();break;case a.ui.keyCode.PAGE_UP:k=d._trimAlignValue(j+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:k=d._trimAlignValue(j-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(j===d._valueMax()){return}k=d._trimAlignValue(j+b);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(j===d._valueMin()){return}k=d._trimAlignValue(j-b);break}d._slide(n,l,k);return m}}).keyup(function(f){var b=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(f,b);d._change(f,b);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(i){var d=this.options,n,m,l,j,k;if(d.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();n=this._normValueFromMouse({x:i.pageX,y:i.pageY});m=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(c){var b=Math.abs(n-j.values(c));if(m>b){m=b;l=a(this);k=c}});if(d.range===true&&this.values(1)===d.min){k+=1;l=a(this.handles[k])}if(this._start(i,k)===false){return false}this._mouseSliding=true;j._handleIndex=k;l.addClass("ui-state-active").focus();d=l.offset();this._clickOffset=!a(i.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:i.pageX-d.left-l.width()/2,top:i.pageY-d.top-l.height()/2-(parseInt(l.css("borderTopWidth"),10)||0)-(parseInt(l.css("borderBottomWidth"),10)||0)+(parseInt(l.css("marginTop"),10)||0)};this._slide(i,k,n);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1){c=1}if(c<0){c=0}if(this.orientation==="vertical"){c=1-c}d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}return this._trigger("start",e,f)},_slide:function(f,d,h){var g;if(this.options.values&&this.options.values.length){g=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&h>g||d===1&&h<g)){h=g}if(h!==this.values(d)){g=this.values();g[d]=h;f=this._trigger("slide",f,{handle:this.handles[d],value:h,values:g});this.values(d?0:1);f!==false&&this.values(d,h,true)}}else{if(h!==this.value()){f=this._trigger("slide",f,{handle:this.handles[d],value:h});f!==false&&this.value(h)}}},_stop:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("stop",e,f)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("change",e,f)}},value:function(b){if(arguments.length){this.options.value=this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(g,d){var j,i,h;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(d);this._refreshValue();this._change(null,g)}if(arguments.length){if(a.isArray(arguments[0])){j=this.options.values;i=arguments[0];for(h=0;h<j.length;h+=1){j[h]=this._trimAlignValue(i[h]);this._change(null,h)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(g):this.value()}}else{return this._values()}},_setOption:function(f,d){var h,g=0;if(a.isArray(this.options.values)){g=this.options.values.length}a.Widget.prototype._setOption.apply(this,arguments);switch(f){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(h=0;h<g;h+=1){this._change(null,h)}this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(e){var d,f;if(arguments.length){d=this.options.values[e];return d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(f=0;f<d.length;f+=1){d[f]=this._trimAlignValue(d[f])}return d}},_trimAlignValue:function(e){if(e<this._valueMin()){return this._valueMin()}if(e>this._valueMax()){return this._valueMax()}var d=this.options.step>0?this.options.step:1,f=e%d;e=e-f;if(Math.abs(f)*2>=d){e+=f>0?d:-d}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var u=this.options.range,s=this.options,r=this,q=!this._animateOff?s.animate:false,p,n={},o,m,k,d;if(this.options.values&&this.options.values.length){this.handles.each(function(b){p=(r.values(b)-r._valueMin())/(r._valueMax()-r._valueMin())*100;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";a(this).stop(1,1)[q?"animate":"css"](n,s.animate);if(r.options.range===true){if(r.orientation==="horizontal"){if(b===0){r.range.stop(1,1)[q?"animate":"css"]({left:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({width:p-o+"%"},{queue:false,duration:s.animate})}}else{if(b===0){r.range.stop(1,1)[q?"animate":"css"]({bottom:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({height:p-o+"%"},{queue:false,duration:s.animate})}}}o=p})}else{m=this.value();k=this._valueMin();d=this._valueMax();p=d!==k?(m-k)/(d-k)*100:0;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";this.handle.stop(1,1)[q?"animate":"css"](n,s.animate);if(u==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[q?"animate":"css"]({width:p+"%"},s.animate)}if(u==="max"&&this.orientation==="horizontal"){this.range[q?"animate":"css"]({width:100-p+"%"},{queue:false,duration:s.animate})}if(u==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[q?"animate":"css"]({height:p+"%"},s.animate)}if(u==="max"&&this.orientation==="vertical"){this.range[q?"animate":"css"]({height:100-p+"%"},{queue:false,duration:s.animate})}}}});a.extend(a.ui.slider,{version:"1.8.4"})})(jQuery);(function(g,f){function e(){return ++c}function b(){return ++a}var c=0,a=0;g.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected"){this.options.collapsible&&h==this.options.selected||this.select(h)}else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return g.cookie.apply(null,[d].concat(g.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=g(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(z){function w(h,i){h.css("display","");!g.support.opacity&&i.opacity&&h[0].style.removeAttribute("filter")}var y=this,x=this.options,v=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=g("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return g("a",this)[0]});this.panels=g([]);this.anchors.each(function(k,n){var i=g(n).attr("href"),h=i.split("#")[0],m;if(h&&(h===location.toString().split("#")[0]||(m=g("base")[0])&&h===m.href)){i=n.hash;n.href=i}if(v.test(i)){y.panels=y.panels.add(y._sanitizeSelector(i))}else{if(i!=="#"){g.data(n,"href.tabs",i);g.data(n,"load.tabs",i.replace(/#.*$/,""));i=y._tabId(n);n.href="#"+i;n=g("#"+i);if(!n.length){n=g(x.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(y.panels[k-1]||y.list);n.data("destroy.tabs",true)}y.panels=y.panels.add(n)}else{x.disabled.push(k)}}});if(z){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(x.selected===f){location.hash&&this.anchors.each(function(h,i){if(i.hash==location.hash){x.selected=h;return false}});if(typeof x.selected!=="number"&&x.cookie){x.selected=parseInt(y._cookie(),10)}if(typeof x.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}x.selected=x.selected||(this.lis.length?0:-1)}else{if(x.selected===null){x.selected=-1}}x.selected=x.selected>=0&&this.anchors[x.selected]||x.selected<0?x.selected:0;x.disabled=g.unique(x.disabled.concat(g.map(this.lis.filter(".ui-state-disabled"),function(h){return y.lis.index(h)}))).sort();g.inArray(x.selected,x.disabled)!=-1&&x.disabled.splice(g.inArray(x.selected,x.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(x.selected>=0&&this.anchors.length){this.panels.eq(x.selected).removeClass("ui-tabs-hide");this.lis.eq(x.selected).addClass("ui-tabs-selected ui-state-active");y.element.queue("tabs",function(){y._trigger("show",null,y._ui(y.anchors[x.selected],y.panels[x.selected]))});this.load(x.selected)}g(window).bind("unload",function(){y.lis.add(y.anchors).unbind(".tabs");y.lis=y.anchors=y.panels=null})}else{x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[x.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");x.cookie&&this._cookie(x.selected,x.cookie);z=0;for(var u;u=this.lis[z];z++){g(u)[g.inArray(z,x.disabled)!=-1&&!g(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}x.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(x.event!=="mouseover"){var q=function(h,i){i.is(":not(.ui-state-disabled)")&&i.addClass("ui-state-"+h)},l=function(h,i){i.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){q("hover",g(this))});this.lis.bind("mouseout.tabs",function(){l("hover",g(this))});this.anchors.bind("focus.tabs",function(){q("focus",g(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",g(this).closest("li"))})}var p,j;if(x.fx){if(g.isArray(x.fx)){p=x.fx[0];j=x.fx[1]}else{p=j=x.fx}}var d=j?function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){w(i,j);y._trigger("show",null,y._ui(h,i[0]))})}:function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");y._trigger("show",null,y._ui(h,i[0]))},A=p?function(h,i){i.animate(p,p.duration||"normal",function(){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");w(i,p);y.element.dequeue("tabs")})}:function(h,i){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");y.element.dequeue("tabs")};this.anchors.bind(x.event+".tabs",function(){var k=this,m=g(k).closest("li"),i=y.panels.filter(":not(.ui-tabs-hide)"),h=g(y._sanitizeSelector(k.hash));if(m.hasClass("ui-tabs-selected")&&!x.collapsible||m.hasClass("ui-state-disabled")||m.hasClass("ui-state-processing")||y._trigger("select",null,y._ui(this,h[0]))===false){this.blur();return false}x.selected=y.anchors.index(this);y.abort();if(x.collapsible){if(m.hasClass("ui-tabs-selected")){x.selected=-1;x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){A(k,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this));this.blur();return false}}}x.cookie&&y._cookie(x.selected,x.cookie);if(h.length){i.length&&y.element.queue("tabs",function(){A(k,i)});y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}g.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=g.data(this,"href.tabs");if(i){this.href=i}var h=g(this).unbind(".tabs");g.each(["href","load","cache"],function(k,j){h.removeData(j+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){g.data(this,"destroy.tabs")?g(this).remove():g(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(j,m,d){if(d===f){d=this.anchors.length}var n=this,l=this.options;m=g(l.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,m));j=!j.indexOf("#")?j.replace("#",""):this._tabId(g("a",m)[0]);m.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=g("#"+j);k.length||(k=g(l.panelTemplate).attr("id",j).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(d>=this.lis.length){m.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{m.insertBefore(this.lis[d]);k.insertBefore(this.panels[d])}l.disabled=g.map(l.disabled,function(h){return h>=d?++h:h});this._tabify();if(this.anchors.length==1){l.selected=0;m.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[0],n.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]));return this},remove:function(h){h=this._getIndex(h);var i=this.options,d=this.lis.eq(h).remove(),j=this.panels.eq(h).remove();if(d.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(h+(h+1<this.anchors.length?1:-1))}i.disabled=g.map(g.grep(i.disabled,function(k){return k!=h}),function(k){return k>=h?--k:k});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(g.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=g.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1){if(this.options.collapsible&&this.options.selected!=-1){d=this.options.selected}else{return this}}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(j){j=this._getIndex(j);var m=this,d=this.options,n=this.anchors.eq(j)[0],l=g.data(n,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&g.data(n,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(j).addClass("ui-state-processing");if(d.spinner){var k=g("span",n);k.data("label.tabs",k.html()).html(d.spinner)}this.xhr=g.ajax(g.extend({},d.ajaxOptions,{url:l,success:function(i,o){g(m._sanitizeSelector(n.hash)).html(i);m._cleanup();d.cache&&g.data(n,"cache.tabs",true);m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.success(i,o)}catch(h){}},error:function(i,o){m._cleanup();m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.error(i,o,j,n)}catch(h){}}}));m.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});g.extend(g.ui.tabs,{version:"1.8.4"});g.extend(g.ui.tabs.prototype,{rotation:null,rotate:function(i,k){var d=this,l=this.options,j=d._rotate||(d._rotate=function(h){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var m=l.selected;d.select(++m<d.anchors.length?m:0)},i);h&&h.stopPropagation()});k=d._unrotate||(d._unrotate=!k?function(h){h.clientX&&d.rotate(null)}:function(){t=l.selected;j()});if(i){this.element.bind("tabsshow",j);this.anchors.bind(l.event+".tabs",k);j()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(l.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);jQuery(function(f){var e=f("meta[name=csrf-token]").attr("content"),g=f("meta[name=csrf-param]").attr("content");f.fn.extend({triggerAndReturn:function(h,j){var i=new f.Event(h);this.trigger(i,j);return i.result!==false},callRemote:function(){var j=this,l=j.attr("method")||j.attr("data-method")||"GET",i=j.attr("action")||j.attr("href"),h=j.attr("data-type")||"script";if(i===undefined){throw"No URL specified for remote call (action or href must be present)."}else{if(j.triggerAndReturn("ajax:before")){var k=j.is("form")?j.serializeArray():[];f.ajax({url:i,data:k,dataType:h,type:l.toUpperCase(),beforeSend:function(m){j.trigger("ajax:loading",m)},success:function(n,m,o){j.trigger("ajax:success",[n,m,o])},complete:function(m){j.trigger("ajax:complete",m)},error:function(o,m,n){j.trigger("ajax:failure",[o,m,n])}})}j.trigger("ajax:after")}}});f("a[data-confirm],input[data-confirm]").live("click",function(){var h=f(this);if(h.triggerAndReturn("confirm")){if(!confirm(h.attr("data-confirm"))){return false}}});f("form[data-remote]").live("submit",function(h){f(this).callRemote();h.preventDefault()});f("a[data-remote],input[data-remote]").live("click",function(h){f(this).callRemote();h.preventDefault()});f("a[data-method]:not([data-remote])").live("click",function(l){var k=f(this),i=k.attr("href"),m=k.attr("data-method"),j=f('<form method="post" action="'+i+'"></form>'),h='<input name="_method" value="'+m+'" type="hidden" />';if(g!=null&&e!=null){h+='<input name="'+g+'" value="'+e+'" type="hidden" />'}j.hide().append(h).appendTo("body");l.preventDefault();j.submit()});var c="input[data-disable-with]";var d="form[data-remote]:has("+c+")";var b="form:not([data-remote]):has("+c+")";var a=function(){f(this).find(c).each(function(){var h=f(this);h.data("enable-with",h.val()).attr("value",h.attr("data-disable-with")).attr("disabled","disabled")})};f(d).live("ajax:before",a);f(b).live("submit",a);f(d).live("ajax:complete",function(){f(this).find(c).each(function(){var h=f(this);h.removeAttr("disabled").val(h.data("enable-with"))})})});(function(b){b.fn.__bind__=b.fn.bind;b.fn.__unbind__=b.fn.unbind;b.fn.__find__=b.fn.find;var a={version:"0.7.9",override:/keypress|keydown|keyup/g,triggersMap:{},specialKeys:{27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",109:"-",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",191:"/"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},newTrigger:function(e,d,f){var c={};c[e]={};c[e][d]={cb:f,disableInInput:false};return c}};a.specialKeys=b.extend(a.specialKeys,{96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"});b.fn.find=function(c){this.query=c;return b.fn.__find__.apply(this,arguments)};b.fn.unbind=function(h,e,g){if(b.isFunction(e)){g=e;e=null}if(e&&typeof e==="string"){var f=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var d=h.split(" ");for(var c=0;c<d.length;c++){delete a.triggersMap[f][d[c]][e]}}return this.__unbind__(h,g)};b.fn.bind=function(j,f,k){var h=j.match(a.override);if(b.isFunction(f)||!h){return this.__bind__(j,f,k)}else{var n=null,i=b.trim(j.replace(a.override,""));if(i){n=this.__bind__(i,f,k)}if(typeof f==="string"){f={combi:f}}if(f.combi){for(var m=0;m<h.length;m++){var d=h[m];var g=f.combi.toLowerCase(),e=a.newTrigger(d,g,k),l=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();e[d][g].disableInInput=f.disableInInput;if(!a.triggersMap[l]){a.triggersMap[l]=e}else{if(!a.triggersMap[l][d]){a.triggersMap[l][d]=e[d]}}var c=a.triggersMap[l][d][g];if(!c){a.triggersMap[l][d][g]=[e[d][g]]}else{if(c.constructor!==Array){a.triggersMap[l][d][g]=[c]}else{a.triggersMap[l][d][g][c.length]=e[d][g]}}this.each(function(){var o=b(this);if(o.attr("hkId")&&o.attr("hkId")!==l){l=o.attr("hkId")+";"+l}o.attr("hkId",l)});n=this.__bind__(h.join(" "),f,a.handler)}}return n}};a.findElement=function(c){if(!b(c).attr("hkId")){if(b.browser.opera||b.browser.safari){while(!b(c).attr("hkId")&&c.parentNode){c=c.parentNode}}}return c};a.handler=function(e){var o=a.findElement(e.currentTarget),i=b(o),d=i.attr("hkId");if(d){d=d.split(";");var g=e.which,q=e.type,p=a.specialKeys[g],n=!p&&String.fromCharCode(g).toLowerCase(),h=e.shiftKey,c=e.ctrlKey,m=e.altKey||e.originalEvent.altKey,f=null;for(var r=0;r<d.length;r++){if(a.triggersMap[d[r]][q]){f=a.triggersMap[d[r]][q];break}}if(f){var j;if(!h&&!c&&!m){if(f[p]){j=f[p];if(j&&p!=e.data.combi){return}}else{if(n&&f[n]){j=f[n];if(j&&n!=e.data.combi){return}}}}else{var l="";if(m){l+="alt+"}if(c){l+="ctrl+"}if(h){l+="shift+"}j=f[l+p];if(j&&(l+p)!=e.data.combi){return}if(!j){if(n){if(f[l+n]){j=f[l+n];if(j&&(l+n)!=e.data.combi){return}}else{if(f[l+a.shiftNums[n]]){j=f[l+a.shiftNums[n]];if(j&&(l+a.shiftNums[n])!=e.data.combi){return}}else{if(l==="shift+"&&f[a.shiftNums[n]]){j=f[a.shiftNums[n]];if(j&&a.shiftNums[n]!=e.data.combi){return}}}}}}}if(j){var s=false;for(var r=0;r<j.length;r++){if(j[r].disableInInput){var k=b(e.target);if(i.is("input")||i.is("textarea")||i.is("select")||k.is("input")||k.is("textarea")||k.is("select")){return true}}s=s||j[r].cb.apply(this,[e])}return s}}}};window.hotkeys=a;return b})(jQuery);var Mustache=function(){var a=function(){};a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(e,d,c,f){if(!f){this.context=d;this.buffer=[]}if(!this.includes("",e)){if(f){return e}else{this.send(e);return}}e=this.render_pragmas(e);var b=this.render_section(e,d,c);if(f){return this.render_tags(b,d,c,f)}this.render_tags(b,d,c,f)},send:function(b){if(b!=""){this.buffer.push(b)}},render_pragmas:function(b){if(!this.includes("%",b)){return b}var d=this;var c=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);return b.replace(c,function(g,e,f){if(!d.pragmas_implemented[e]){throw ({message:"This implementation of mustache doesn't understand the '"+e+"' pragma"})}d.pragmas[e]={};if(f){var h=f.split("=");d.pragmas[e][h[0]]=h[1]}return""})},render_partial:function(b,d,c){b=this.trim(b);if(!c||c[b]===undefined){throw ({message:"unknown_partial '"+b+"'"})}if(typeof(d[b])!="object"){return this.render(c[b],d,c,true)}return this.render(c[b],d[b],c,true)},render_section:function(d,c,b){if(!this.includes("#",d)&&!this.includes("^",d)){return d}var f=this;var e=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");return d.replace(e,function(h,i,g,j){var k=f.find(g,c);if(i=="^"){if(!k||f.is_array(k)&&k.length===0){return f.render(j,c,b,true)}else{return""}}else{if(i=="#"){if(f.is_array(k)){return f.map(k,function(l){return f.render(j,f.create_context(l),b,true)}).join("")}else{if(f.is_object(k)){return f.render(j,f.create_context(k),b,true)}else{if(typeof k==="function"){return k.call(c,j,function(l){return f.render(l,c,b,true)})}else{if(k){return f.render(j,c,b,true)}else{return""}}}}}}})},render_tags:function(k,b,d,f){var e=this;var j=function(){return new RegExp(e.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")};var g=j();var h=function(n,i,m){switch(i){case"!":return"";case"=":e.set_delimiters(m);g=j();return"";case">":return e.render_partial(m,b,d);case"{":return e.find(m,b);default:return e.escape(e.find(m,b))}};var l=k.split("\n");for(var c=0;c<l.length;c++){l[c]=l[c].replace(g,h,this);if(!f){this.send(l[c])}}if(f){return l.join("\n")}},set_delimiters:function(c){var b=c.split(" ");this.otag=this.escape_regex(b[0]);this.ctag=this.escape_regex(b[1])},escape_regex:function(c){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return c.replace(arguments.callee.sRE,"\\$1")},find:function(c,d){c=this.trim(c);function b(f){return f===false||f===0||f}var e;if(b(d[c])){e=d[c]}else{if(b(this.context[c])){e=this.context[c]}}if(typeof e==="function"){return e.apply(d)}if(e!==undefined){return e}return""},includes:function(c,b){return b.indexOf(this.otag+c)!=-1},escape:function(b){b=String(b===null?"":b);return b.replace(/&(?!\w+;)|["<>\\]/g,function(c){switch(c){case"&":return"&";case"\\":return"\\\\";case'"':return'"';case"<":return"<";case">":return">";default:return c}})},create_context:function(c){if(this.is_object(c)){return c}else{var d=".";if(this.pragmas["IMPLICIT-ITERATOR"]){d=this.pragmas["IMPLICIT-ITERATOR"].iterator}var b={};b[d]=c;return b}},is_object:function(b){return b&&typeof b=="object"},is_array:function(b){return Object.prototype.toString.call(b)==="[object Array]"},trim:function(b){return b.replace(/^\s*|\s*$/g,"")},map:function(f,d){if(typeof f.map=="function"){return f.map(d)}else{var e=[];var b=f.length;for(var c=0;c<b;c++){e.push(d(f[c]))}return e}}};return({name:"mustache.js",version:"0.3.1-dev",to_html:function(d,b,c,f){var e=new a();if(f){e.send=f}e.render(d,b,c);if(!f){return e.buffer.join("\n")}}})}();eval(function(h,b,i,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(i--){f[g(i)]=d[i]||g(i)}d=[function(a){return f[a]}];g=function(){return"\\w+"};i=1}while(i--){if(d[i]){h=h.replace(new RegExp("\\b"+g(i)+"\\b","g"),d[i])}}return h}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),0,{}));(function(aG){var ay,aq,ap,aD,aj,aC,ai,ax,am,al,au=0,aE={},aw=[],av=0,aF={},az=[],af=null,ao=new Image,ae=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,ad,ac=1,an=0,ar="",at,aA,aB=false,ak=aG.extend(aG("<div/>")[0],{prop:0}),ab=aG.browser.msie&&aG.browser.version<7&&!window.XMLHttpRequest,aa=function(){aq.hide();ao.onerror=ao.onload=null;af&&af.abort();ay.empty()},U=function(){if(false===aE.onError(aw,au,aE)){aq.hide();aB=false}else{aE.titleShow=false;aE.width="auto";aE.height="auto";ay.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');ah()}},ag=function(){var a=aw[au],j,f,e,i,h,c;aa();aE=aG.extend({},aG.fn.fancybox.defaults,typeof aG(a).data("fancybox")=="undefined"?aE:aG(a).data("fancybox"));c=aE.onStart(aw,au,aE);if(c===false){aB=false}else{if(typeof c=="object"){aE=aG.extend(aE,c)}e=aE.title||(a.nodeName?aG(a).attr("title"):a.title)||"";if(a.nodeName&&!aE.orig){aE.orig=aG(a).children("img:first").length?aG(a).children("img:first"):aG(a)}if(e===""&&aE.orig&&aE.titleFromAlt){e=aE.orig.attr("alt")}j=aE.href||(a.nodeName?aG(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(j)||j=="#"){j=null}if(aE.type){f=aE.type;if(!j){j=aE.content}}else{if(aE.content){f="html"}else{if(j){f=j.match(ae)?"image":j.match(k)?"swf":aG(a).hasClass("iframe")?"iframe":j.indexOf("#")===0?"inline":"ajax"}}}if(f){if(f=="inline"){a=j.substr(j.indexOf("#"));f=aG(a).length>0?"inline":"ajax"}aE.type=f;aE.href=j;aE.title=e;if(aE.autoDimensions&&aE.type!=="iframe"&&aE.type!=="swf"){aE.width="auto";aE.height="auto"}if(aE.modal){aE.overlayShow=true;aE.hideOnOverlayClick=false;aE.hideOnContentClick=false;aE.enableEscapeButton=false;aE.showCloseButton=false}aE.padding=parseInt(aE.padding,10);aE.margin=parseInt(aE.margin,10);ay.css("padding",aE.padding+aE.margin);aG(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){aG(this).replaceWith(aC.children())});switch(f){case"html":ay.html(aE.content);ah();break;case"inline":if(aG(a).parent().is("#fancybox-content")===true){aB=false;break}aG('<div class="fancybox-inline-tmp" />').hide().insertBefore(aG(a)).bind("fancybox-cleanup",function(){aG(this).replaceWith(aC.children())}).bind("fancybox-cancel",function(){aG(this).replaceWith(ay.children())});aG(a).appendTo(ay);ah();break;case"image":aB=false;aG.fancybox.showActivity();ao=new Image;ao.onerror=function(){U()};ao.onload=function(){aB=true;ao.onerror=ao.onload=null;aE.width=ao.width;aE.height=ao.height;aG("<img />").attr({id:"fancybox-img",src:ao.src,alt:aE.title}).appendTo(ay);P()};ao.src=j;break;case"swf":i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+aE.width+'" height="'+aE.height+'"><param name="movie" value="'+j+'"></param>';h="";aG.each(aE.swf,function(l,m){i+='<param name="'+l+'" value="'+m+'"></param>';h+=" "+l+'="'+m+'"'});i+='<embed src="'+j+'" type="application/x-shockwave-flash" width="'+aE.width+'" height="'+aE.height+'"'+h+"></embed></object>";ay.html(i);ah();break;case"ajax":aB=false;aG.fancybox.showActivity();aE.ajax.win=aE.ajax.success;af=aG.ajax(aG.extend({},aE.ajax,{url:j,data:aE.ajax.data||{},error:function(l){l.status>0&&U()},success:function(l,n,m){if(m.status==200){if(typeof aE.ajax.win=="function"){c=aE.ajax.win(j,l,n,m);if(c===false){aq.hide();return}else{if(typeof c=="string"||typeof c=="object"){l=c}}}ay.html(l);ah()}}}));break;case"iframe":P()}}else{U()}}},ah=function(){ay.width(aE.width);ay.height(aE.height);if(aE.width=="auto"){aE.width=ay.width()}if(aE.height=="auto"){aE.height=ay.height()}P()},P=function(){var a,c;aq.hide();if(aD.is(":visible")&&false===aF.onCleanup(az,av,aF)){aG.event.trigger("fancybox-cancel");aB=false}else{aB=true;aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aD.is(":visible")&&aF.titlePosition!=="outside"&&aD.css("height",aD.height());az=aw;av=au;aF=aE;if(aF.overlayShow){ap.css({"background-color":aF.overlayColor,opacity:aF.overlayOpacity,cursor:aF.hideOnOverlayClick?"pointer":"auto",height:aG(document).height()});if(!ap.is(":visible")){ab&&aG("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});ap.show()}}else{ap.hide()}aC.get(0).scrollTop=0;aC.get(0).scrollLeft=0;aA=g();ar=aF.title||"";an=0;ax.empty().removeAttr("style").removeClass();if(aF.titleShow!==false){if(aG.isFunction(aF.titleFormat)){a=aF.titleFormat(ar,az,av,aF)}else{a=ar&&ar.length?aF.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+ar+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+aF.titlePosition+'">'+ar+"</div>":false}ar=a;if(!(!ar||ar==="")){ax.addClass("fancybox-title-"+aF.titlePosition).html(ar).appendTo("body").show();switch(aF.titlePosition){case"inside":ax.css({width:aA.width-aF.padding*2,marginLeft:aF.padding,marginRight:aF.padding});an=ax.outerHeight(true);ax.appendTo(aj);aA.height+=an;break;case"over":ax.css({marginLeft:aF.padding,width:aA.width-aF.padding*2,bottom:aF.padding}).appendTo(aj);break;case"float":ax.css("left",parseInt((ax.width()-aA.width-40)/2,10)*-1).appendTo(aD);break;default:ax.css({width:aA.width-aF.padding*2,paddingLeft:aF.padding,paddingRight:aF.padding}).appendTo(aD)}}}ax.hide();if(aD.is(":visible")){aG(ai.add(am).add(al)).hide();a=aD.position();at={top:a.top,left:a.left,width:aD.width(),height:aD.height()};c=at.width==aA.width&&at.height==aA.height;aC.fadeTo(aF.changeFade,0.3,function(){var e=function(){aC.html(ay.contents()).fadeTo(aF.changeFade,1,G)};aG.event.trigger("fancybox-change");aC.empty().removeAttr("filter").css({"border-width":aF.padding,width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"});if(c){e()}else{ak.prop=0;aG(ak).animate({prop:1},{duration:aF.changeSpeed,easing:aF.easingChange,step:C,complete:e})}})}else{aD.removeAttr("style");aC.css("border-width",aF.padding);if(aF.transitionIn=="elastic"){at=w();aC.html(ay.contents());aD.show();if(aF.opacity){aA.opacity=0}ak.prop=0;aG(ak).animate({prop:1},{duration:aF.speedIn,easing:aF.easingIn,step:C,complete:G})}else{aF.titlePosition=="inside"&&an>0&&ax.show();aC.css({width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"}).html(ay.contents());aD.css(aA).fadeIn(aF.transitionIn=="none"?0:aF.fadeIn,G)}}}},d=function(){if(aF.enableEscapeButton||aF.enableKeyboardNav){aG(document).bind("keydown.fb",function(a){if(a.keyCode==27&&aF.enableEscapeButton){a.preventDefault();aG.fancybox.close()}else{if((a.keyCode==37||a.keyCode==39)&&aF.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();aG.fancybox[a.keyCode==37?"prev":"next"]()}}})}if(aF.showNavArrows){if(aF.cyclic&&az.length>1||av!==0){am.show()}if(aF.cyclic&&az.length>1||av!=az.length-1){al.show()}}else{am.hide();al.hide()}},G=function(){if(!aG.support.opacity){aC.get(0).style.removeAttribute("filter");aD.get(0).style.removeAttribute("filter")}aD.css("height","auto");aF.type!=="image"&&aF.type!=="swf"&&aF.type!=="iframe"&&aC.css("height","auto");ar&&ar.length&&ax.show();aF.showCloseButton&&ai.show();d();aF.hideOnContentClick&&aC.bind("click",aG.fancybox.close);aF.hideOnOverlayClick&&ap.bind("click",aG.fancybox.close);aG(window).bind("resize.fb",aG.fancybox.resize);aF.centerOnScroll&&aG(window).bind("scroll.fb",aG.fancybox.center);if(aF.type=="iframe"){aG('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(aG.browser.msie?'allowtransparency="true""':"")+' scrolling="'+aE.scrolling+'" src="'+aF.href+'"></iframe>').appendTo(aC)}aD.show();aB=false;aG.fancybox.center();aF.onComplete(az,av,aF);var a,c;if(az.length-1>av){a=az[av+1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}if(av>0){a=az[av-1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}},C=function(a){var c={width:parseInt(at.width+(aA.width-at.width)*a,10),height:parseInt(at.height+(aA.height-at.height)*a,10),top:parseInt(at.top+(aA.top-at.top)*a,10),left:parseInt(at.left+(aA.left-at.left)*a,10)};if(typeof aA.opacity!=="undefined"){c.opacity=a<0.5?0.5:a}aD.css(c);aC.css({width:c.width-aF.padding*2,height:c.height-an*a-aF.padding*2})},x=function(){return[aG(window).width()-aF.margin*2,aG(window).height()-aF.margin*2,aG(document).scrollLeft()+aF.margin,aG(document).scrollTop()+aF.margin]},g=function(){var a=x(),f={},e=aF.autoScale,c=aF.padding*2;f.width=aF.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(aF.width)/100,10):aF.width+c;f.height=aF.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(aF.height)/100,10):aF.height+c;if(e&&(f.width>a[0]||f.height>a[1])){if(aE.type=="image"||aE.type=="swf"){e=aF.width/aF.height;if(f.width>a[0]){f.width=a[0];f.height=parseInt((f.width-c)/e+c,10)}if(f.height>a[1]){f.height=a[1];f.width=parseInt((f.height-c)*e+c,10)}}else{f.width=Math.min(f.width,a[0]);f.height=Math.min(f.height,a[1])}}f.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-f.height-40)*0.5),10);f.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-f.width-40)*0.5),10);return f},w=function(){var a=aE.orig?aG(aE.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+aF.padding*2,height:c.height+aF.padding*2,top:c.top-aF.padding-20,left:c.left-aF.padding-20}}else{a=x();c={width:aF.padding*2,height:aF.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},b=function(){if(aq.is(":visible")){aG("div",aq).css("top",ac*-40+"px");ac=(ac+1)%12}else{clearInterval(ad)}};aG.fn.fancybox=function(a){if(!aG(this).length){return this}aG(this).data("fancybox",aG.extend({},a,aG.metadata?aG(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!aB){aB=true;aG(this).blur();aw=[];au=0;c=aG(this).attr("rel")||"";if(!c||c==""||c==="nofollow"){aw.push(this)}else{aw=aG("a[rel="+c+"], area[rel="+c+"]");au=aw.index(this)}ag()}});return this};aG.fancybox=function(a,h){var e;if(!aB){aB=true;e=typeof h!=="undefined"?h:{};aw=[];au=parseInt(e.index,10)||0;if(aG.isArray(a)){for(var c=0,f=a.length;c<f;c++){if(typeof a[c]=="object"){aG(a[c]).data("fancybox",aG.extend({},e,a[c]))}else{a[c]=aG({}).data("fancybox",aG.extend({content:a[c]},e))}}aw=jQuery.merge(aw,a)}else{if(typeof a=="object"){aG(a).data("fancybox",aG.extend({},e,a))}else{a=aG({}).data("fancybox",aG.extend({content:a},e))}aw.push(a)}if(au>aw.length||au<0){au=0}ag()}};aG.fancybox.showActivity=function(){clearInterval(ad);aq.show();ad=setInterval(b,66)};aG.fancybox.hideActivity=function(){aq.hide()};aG.fancybox.next=function(){return aG.fancybox.pos(av+1)};aG.fancybox.prev=function(){return aG.fancybox.pos(av-1)};aG.fancybox.pos=function(a){if(!aB){a=parseInt(a);aw=az;if(a>-1&&a<az.length){au=a;ag()}else{if(aF.cyclic&&az.length>1){au=a>=az.length?0:az.length-1;ag()}}}};aG.fancybox.cancel=function(){if(!aB){aB=true;aG.event.trigger("fancybox-cancel");aa();aE.onCancel(aw,au,aE);aB=false}};aG.fancybox.close=function(){function a(){ap.fadeOut("fast");ax.empty().hide();aD.hide();aG.event.trigger("fancybox-cleanup");aC.empty();aF.onClosed(az,av,aF);az=aE=[];av=au=0;aF=aE={};aB=false}if(!(aB||aD.is(":hidden"))){aB=true;if(aF&&false===aF.onCleanup(az,av,aF)){aB=false}else{aa();aG(ai.add(am).add(al)).hide();aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aC.find("iframe").attr("src",ab&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");aF.titlePosition!=="inside"&&ax.empty();aD.stop();if(aF.transitionOut=="elastic"){at=w();var c=aD.position();aA={top:c.top,left:c.left,width:aD.width(),height:aD.height()};if(aF.opacity){aA.opacity=1}ax.empty().hide();ak.prop=1;aG(ak).animate({prop:0},{duration:aF.speedOut,easing:aF.easingOut,step:C,complete:a})}else{aD.fadeOut(aF.transitionOut=="none"?0:aF.speedOut,a)}}}};aG.fancybox.resize=function(){ap.is(":visible")&&ap.css("height",aG(document).height());aG.fancybox.center(true)};aG.fancybox.center=function(a){var e,c;if(!aB){c=a===true?1:0;e=x();!c&&(aD.width()>e[0]||aD.height()>e[1])||aD.stop().animate({top:parseInt(Math.max(e[3]-20,e[3]+(e[1]-aC.height()-40)*0.5-aF.padding)),left:parseInt(Math.max(e[2]-20,e[2]+(e[0]-aC.width()-40)*0.5-aF.padding))},typeof a=="number"?a:200)}};aG.fancybox.init=function(){if(!aG("#fancybox-wrap").length){aG("body").append(ay=aG('<div id="fancybox-tmp"></div>'),aq=aG('<div id="fancybox-loading"><div></div></div>'),ap=aG('<div id="fancybox-overlay"></div>'),aD=aG('<div id="fancybox-wrap"></div>'));aj=aG('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(aD);aj.append(aC=aG('<div id="fancybox-content"></div>'),ai=aG('<a id="fancybox-close"></a>'),ax=aG('<div id="fancybox-title"></div>'),am=aG('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),al=aG('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));ai.click(aG.fancybox.close);aq.click(aG.fancybox.cancel);am.click(function(a){a.preventDefault();aG.fancybox.prev()});al.click(function(a){a.preventDefault();aG.fancybox.next()});aG.fn.mousewheel&&aD.bind("mousewheel.fb",function(a,c){a.preventDefault();aG.fancybox[c>0?"prev":"next"]()});aG.support.opacity||aD.addClass("fancybox-ie");if(ab){aq.addClass("fancybox-ie6");aD.addClass("fancybox-ie6");aG('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(aj)}}};aG.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};aG(document).ready(function(){aG.fancybox.init()})})(jQuery);(function(a){a.widget("ech.notify",{options:{speed:500,expires:5000,stack:"below",custom:false},_create:function(){var b=this;this.templates={};this.keys=[];this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(d){var c=this.id||d;b.keys.push(c);b.templates[c]=a(this).removeAttr("id").wrap("<div></div>").parent().html()}).end().empty().show()},create:function(c,e,d){if(typeof c==="object"){d=e;e=c;c=null}var b=this.templates[c||this.keys[0]];if(d&&d.custom){b=a(b).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html()}return new a.ech.notify.instance(this)._create(e,a.extend({},this.options,d),b)}});a.extend(a.ech.notify,{instance:function(b){this.parent=b;this.isOpen=false}});a.extend(a.ech.notify.instance.prototype,{_create:function(h,e,g){this.options=e;var d=this,f=g.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g,function(i,j){return(j in h)?h[j]:""}),c=(this.element=a(f)),b=c.find(".ui-notify-close");if(typeof this.options.click==="function"){c.addClass("ui-notify-click").bind("click",function(i){d._trigger("click",i,d)})}if(b.length){b.bind("click",function(){d.close();return false})}this.open();if(typeof e.expires==="number"){window.setTimeout(function(){d.close()},e.expires)}return this},close:function(){var b=this,c=this.options.speed;this.element.fadeTo(c,0).slideUp(c,function(){b._trigger("close");b.isOpen=false});return this},open:function(){if(this.isOpen||this._trigger("beforeopen")===false){return this}var b=this;this.element[this.options.stack==="above"?"prependTo":"appendTo"](this.parent.element).css({display:"none",opacity:""}).fadeIn(this.options.speed,function(){b._trigger("open");b.isOpen=true});return this},widget:function(){return this.element},_trigger:function(c,d,b){return this.parent._trigger.call(this,c,d,b)}})})(jQuery);(function(b){var a=function(){var T={},c,O=65,u,Q='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',C={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},K=function(U,W){var V=j(U);b(W).data("colorpicker").fields.eq(1).val(V.r).end().eq(2).val(V.g).end().eq(3).val(V.b).end()},v=function(U,V){b(V).data("colorpicker").fields.eq(4).val(U.h).end().eq(5).val(U.s).end().eq(6).val(U.b).end()},g=function(U,V){b(V).data("colorpicker").fields.eq(0).val(S(U)).end()},l=function(U,V){b(V).data("colorpicker").selector.css("backgroundColor","#"+S({h:U.h,s:100,b:100}));b(V).data("colorpicker").selectorIndic.css({left:parseInt(150*U.s/100,10),top:parseInt(150*(100-U.b)/100,10)})},H=function(U,V){b(V).data("colorpicker").hue.css("top",parseInt(150-150*U.h/360,10))},h=function(U,V){b(V).data("colorpicker").currentColor.css("backgroundColor","#"+S(U))},F=function(U,V){b(V).data("colorpicker").newColor.css("backgroundColor","#"+S(U))},n=function(U){var W=U.charCode||U.keyCode||-1;if((W>O&&W<=90)||W==32){return false}var V=b(this).parent().parent();if(V.data("colorpicker").livePreview===true){e.apply(this)}},e=function(V){var W=b(this).parent().parent(),U;if(this.parentNode.className.indexOf("_hex")>0){W.data("colorpicker").color=U=m(z(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){W.data("colorpicker").color=U=f({h:parseInt(W.data("colorpicker").fields.eq(4).val(),10),s:parseInt(W.data("colorpicker").fields.eq(5).val(),10),b:parseInt(W.data("colorpicker").fields.eq(6).val(),10)})}else{W.data("colorpicker").color=U=i(N({r:parseInt(W.data("colorpicker").fields.eq(1).val(),10),g:parseInt(W.data("colorpicker").fields.eq(2).val(),10),b:parseInt(W.data("colorpicker").fields.eq(3).val(),10)}))}}if(V){K(U,W.get(0));g(U,W.get(0));v(U,W.get(0))}l(U,W.get(0));H(U,W.get(0));F(U,W.get(0));W.data("colorpicker").onChange.apply(W,[U,S(U),j(U)])},o=function(U){var V=b(this).parent().parent();V.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},L=function(){O=this.parentNode.className.indexOf("_hex")>0?70:65;b(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");b(this).parent().addClass("colorpicker_focus")},J=function(U){var W=b(this).parent().find("input").focus();var V={el:b(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:U.pageY,field:W,val:parseInt(W.val(),10),preview:b(this).parent().parent().data("colorpicker").livePreview};b(document).bind("mouseup",V,s);b(document).bind("mousemove",V,M)},M=function(U){U.data.field.val(Math.max(0,Math.min(U.data.max,parseInt(U.data.val+U.pageY-U.data.y,10))));if(U.data.preview){e.apply(U.data.field.get(0),[true])}return false},s=function(U){e.apply(U.data.field.get(0),[true]);U.data.el.removeClass("colorpicker_slider").find("input").focus();b(document).unbind("mouseup",s);b(document).unbind("mousemove",M);return false},x=function(U){var V={cal:b(this).parent(),y:b(this).offset().top};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,r);b(document).bind("mousemove",V,k)},k=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(U.pageY-U.data.y))))/150,10)).get(0),[U.data.preview]);return false},r=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",r);b(document).unbind("mousemove",k);return false},y=function(U){var V={cal:b(this).parent(),pos:b(this).offset()};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,B);b(document).bind("mousemove",V,q)},q=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(U.pageY-U.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(U.pageX-U.data.pos.left))))/150,10)).get(0),[U.data.preview]);return false},B=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",B);b(document).unbind("mousemove",q);return false},w=function(U){b(this).addClass("colorpicker_focus")},R=function(U){b(this).removeClass("colorpicker_focus")},p=function(V){var W=b(this).parent();var U=W.data("colorpicker").color;W.data("colorpicker").origColor=U;h(U,W.get(0));W.data("colorpicker").onSubmit(U,S(U),j(U),W.data("colorpicker").el)},E=function(U){var Y=b("#"+b(this).data("colorpickerId"));Y.data("colorpicker").onBeforeShow.apply(this,[Y.get(0)]);var Z=b(this).offset();var X=A();var W=Z.top+this.offsetHeight;var V=Z.left;if(W+176>X.t+X.h){W-=this.offsetHeight+176}if(V+356>X.l+X.w){V-=356}Y.css({left:V+"px",top:W+"px"});if(Y.data("colorpicker").onShow.apply(this,[Y.get(0)])!=false){Y.show()}b(document).bind("mousedown",{cal:Y},P);return false},P=function(U){if(!I(U.data.cal.get(0),U.target,U.data.cal.get(0))){if(U.data.cal.data("colorpicker").onHide.apply(this,[U.data.cal.get(0)])!=false){U.data.cal.hide()}b(document).unbind("mousedown",P)}},I=function(W,V,U){if(W==V){return true}if(W.contains){return W.contains(V)}if(W.compareDocumentPosition){return !!(W.compareDocumentPosition(V)&16)}var X=V.parentNode;while(X&&X!=U){if(X==W){return true}X=X.parentNode}return false},A=function(){var U=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(U?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(U?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(U?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(U?document.documentElement.clientHeight:document.body.clientHeight)}},f=function(U){return{h:Math.min(360,Math.max(0,U.h)),s:Math.min(100,Math.max(0,U.s)),b:Math.min(100,Math.max(0,U.b))}},N=function(U){return{r:Math.min(255,Math.max(0,U.r)),g:Math.min(255,Math.max(0,U.g)),b:Math.min(255,Math.max(0,U.b))}},z=function(W){var U=6-W.length;if(U>0){var X=[];for(var V=0;V<U;V++){X.push("0")}X.push(W);W=X.join("")}return W},d=function(U){var U=parseInt(((U.indexOf("#")>-1)?U.substring(1):U),16);return{r:U>>16,g:(U&65280)>>8,b:(U&255)}},m=function(U){return i(d(U))},i=function(W){var V={h:0,s:0,b:0};var X=Math.min(W.r,W.g,W.b);var U=Math.max(W.r,W.g,W.b);var Y=U-X;V.b=U;if(U!=0){}V.s=U!=0?255*Y/U:0;if(V.s!=0){if(W.r==U){V.h=(W.g-W.b)/Y}else{if(W.g==U){V.h=2+(W.b-W.r)/Y}else{V.h=4+(W.r-W.g)/Y}}}else{V.h=-1}V.h*=60;if(V.h<0){V.h+=360}V.s*=100/255;V.b*=100/255;return V},j=function(U){var W={};var aa=Math.round(U.h);var Z=Math.round(U.s*255/100);var V=Math.round(U.b*255/100);if(Z==0){W.r=W.g=W.b=V}else{var ab=V;var Y=(255-Z)*V/255;var X=(ab-Y)*(aa%60)/60;if(aa==360){aa=0}if(aa<60){W.r=ab;W.b=Y;W.g=Y+X}else{if(aa<120){W.g=ab;W.b=Y;W.r=ab-X}else{if(aa<180){W.g=ab;W.r=Y;W.b=Y+X}else{if(aa<240){W.b=ab;W.r=Y;W.g=ab-X}else{if(aa<300){W.b=ab;W.g=Y;W.r=Y+X}else{if(aa<360){W.r=ab;W.g=Y;W.b=ab-X}else{W.r=0;W.g=0;W.b=0}}}}}}}return{r:Math.round(W.r),g:Math.round(W.g),b:Math.round(W.b)}},D=function(U){var V=[U.r.toString(16),U.g.toString(16),U.b.toString(16)];b.each(V,function(W,X){if(X.length==1){V[W]="0"+X}});return V.join("")},S=function(U){return D(j(U))},G=function(){var V=b(this).parent();var U=V.data("colorpicker").origColor;V.data("colorpicker").color=U;K(U,V.get(0));g(U,V.get(0));v(U,V.get(0));l(U,V.get(0));H(U,V.get(0));F(U,V.get(0))};return{init:function(U){U=b.extend({},C,U||{});if(typeof U.color=="string"){U.color=m(U.color)}else{if(U.color.r!=undefined&&U.color.g!=undefined&&U.color.b!=undefined){U.color=i(U.color)}else{if(U.color.h!=undefined&&U.color.s!=undefined&&U.color.b!=undefined){U.color=f(U.color)}else{return this}}}return this.each(function(){if(!b(this).data("colorpickerId")){var V=b.extend({},U);V.origColor=U.color;var X="collorpicker_"+parseInt(Math.random()*1000);b(this).data("colorpickerId",X);var W=b(Q).attr("id",X);if(V.flat){W.appendTo(this).show()}else{W.appendTo(document.body)}V.fields=W.find("input").bind("keyup",n).bind("change",e).bind("blur",o).bind("focus",L);W.find("span").bind("mousedown",J).end().find(">div.colorpicker_current_color").bind("click",G);V.selector=W.find("div.colorpicker_color").bind("mousedown",y);V.selectorIndic=V.selector.find("div div");V.el=this;V.hue=W.find("div.colorpicker_hue div");W.find("div.colorpicker_hue").bind("mousedown",x);V.newColor=W.find("div.colorpicker_new_color");V.currentColor=W.find("div.colorpicker_current_color");W.data("colorpicker",V);W.find("div.colorpicker_submit").bind("mouseenter",w).bind("mouseleave",R).bind("click",p);K(V.color,W.get(0));v(V.color,W.get(0));g(V.color,W.get(0));H(V.color,W.get(0));l(V.color,W.get(0));h(V.color,W.get(0));F(V.color,W.get(0));if(V.flat){W.css({position:"relative",display:"block"})}else{b(this).bind(V.eventName,E)}}})},showPicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){E.apply(this)}})},hidePicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){b("#"+b(this).data("colorpickerId")).hide()}})},setColor:function(U){if(typeof U=="string"){U=m(U)}else{if(U.r!=undefined&&U.g!=undefined&&U.b!=undefined){U=i(U)}else{if(U.h!=undefined&&U.s!=undefined&&U.b!=undefined){U=f(U)}else{return this}}}return this.each(function(){if(b(this).data("colorpickerId")){var V=b("#"+b(this).data("colorpickerId"));V.data("colorpicker").color=U;V.data("colorpicker").origColor=U;K(U,V.get(0));v(U,V.get(0));g(U,V.get(0));H(U,V.get(0));l(U,V.get(0));h(U,V.get(0));F(U,V.get(0))}})}}}();b.fn.extend({ColorPicker:a.init,ColorPickerHide:a.hidePicker,ColorPickerShow:a.showPicker,ColorPickerSetColor:a.setColor})})(jQuery);jQuery.fn.editable=function(d,i,h){if(this.length===0){return(this)}var a={target:d,name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",loaddata:{},submitdata:{}};if(i){jQuery.extend(a,i)}var c=jQuery.editable.types[a.type].plugin||function(){};var f=jQuery.editable.types[a.type].submit||function(){};var g=jQuery.editable.types[a.type].buttons||jQuery.editable.types.defaults.buttons;var e=jQuery.editable.types[a.type].content||jQuery.editable.types.defaults.content;var b=jQuery.editable.types[a.type].element||jQuery.editable.types.defaults.element;h=h||function(){};jQuery(this).attr("title",a.tooltip);a.autowidth="auto"==a.width;a.autoheight="auto"==a.height;jQuery(this)[a.event](function(p){var j=this;if(j.editing){return}if(a.width!="none"){a.width=a.autowidth?jQuery(j).width():a.width}if(a.height!="none"){a.height=a.autoheight?jQuery(j).height():a.height}j.editing=true;j.revert=jQuery(j).html();j.innerHTML="";var o=document.createElement("form");if(a.cssclass){if("inherit"==a.cssclass){jQuery(o).attr("class",jQuery(j).attr("class"))}else{jQuery(o).attr("class",a.cssclass)}}if(a.style){if("inherit"==a.style){jQuery(o).attr("style",jQuery(j).attr("style"));jQuery(o).css("display",jQuery(j).css("display"))}else{jQuery(o).attr("style",a.style)}}var m=b.apply(o,[a,j]);if(a.getload){a.loadurl=a.getload;a.loadtype="GET"}else{if(a.postload){a.loadurl=a.postload;a.loadtype="POST"}}if(a.loadurl){var l=setTimeout(function(){m.disabled=true;e.apply(o,[a.loadtext,a,j])},100);var k={};k[a.id]=j.id;if(jQuery.isFunction(a.loaddata)){jQuery.extend(k,a.loaddata.apply(j,[j.revert,a]))}else{jQuery.extend(k,a.loaddata)}jQuery.ajax({type:a.loadtype,url:a.loadurl,data:k,success:function(r){window.clearTimeout(l);e.apply(o,[r,a,j]);m.disabled=false}})}else{if(a.data){var q=a.data;if(jQuery.isFunction(a.data)){var q=a.data.apply(j,[j.revert,a])}e.apply(o,[q,a,j])}else{e.apply(o,[j.revert,a,j])}}m.name=a.name;g.apply(o,[a,j]);j.appendChild(o);if(a.select){m.select()}c.apply(o,[a,j]);jQuery(":input:visible:enabled:first",o).focus();jQuery(m).keydown(function(r){if(r.keyCode==27){r.preventDefault();n()}});var l;if("cancel"==a.onblur){jQuery(m).blur(function(r){l=setTimeout(n,500)})}else{if("submit"==a.onblur){jQuery(m).blur(function(r){jQuery(o).submit()})}else{jQuery(m).blur(function(r){})}}jQuery(o).submit(function(s){if(l){clearTimeout(l)}s.preventDefault();f.apply(o,[a,j]);if(jQuery.isFunction(a.target)){var u=a.target.apply(j,[jQuery(m).val(),a]);j.innerHTML=u;j.editing=false;h.apply(j,[j.innerHTML,a])}else{var r={};r[m.name]=jQuery(m).val();r[a.id]=j.id;if(jQuery.isFunction(a.submitdata)){jQuery.extend(r,a.submitdata.apply(j,[j.revert,a]))}else{jQuery.extend(r,a.submitdata)}jQuery(j).html(a.indicator);jQuery.post(a.target,r,function(v){j.innerHTML=v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");j.editing=false;h.apply(j,[j.innerHTML,a])})}return false});function n(){j.innerHTML=j.revert;j.editing=false}});return(this)};jQuery.editable={types:{defaults:{element:function(c,b){var a=jQuery('<input type="hidden">');jQuery(this).append(a);return(a)},content:function(a,c,b){jQuery(":input:first",this).val(a)},buttons:function(b,a){if(b.submit){var d=jQuery('<input type="submit">');d.val(b.submit);jQuery(this).append(d)}if(b.cancel){var c=jQuery('<input type="button">');c.val(b.cancel);jQuery(this).append(c);jQuery(c).click(function(){jQuery(a).html(a.revert);a.editing=false})}}},text:{element:function(c,b){var a=jQuery("<input>");if(c.width!="none"){a.width(c.width)}if(c.height!="none"){a.height(c.height)}a.attr("autocomplete","off");jQuery(this).append(a);return(a)}},textarea:{element:function(c,b){var a=jQuery("<textarea>");if(c.rows){a.attr("rows",c.rows)}else{a.height(c.height)}if(c.cols){a.attr("cols",c.cols)}else{a.width(c.width)}jQuery(this).append(a);return(a)}},select:{element:function(c,b){var a=jQuery("<select>");jQuery(this).append(a);return(a)},content:function(string,settings,original){var select=jQuery("select",this);if(String==string.constructor){eval("var json = "+string);for(var key in json){if("selected"==key){continue}var option=$("<option>").val(key).append(json[key]);select.append(option)}}jQuery.editable.types.select.iefix(select,json.selected)},iefix:function(a,b){console.log(this);console.log(a);a.children().each(function(){if(jQuery(this).val()==b){jQuery(this).attr("selected","selected")}})}}},addInputType:function(b,a){jQuery.editable.types[b]=a}};(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var u=r=="x"?"Left":"Top",s=u.toLowerCase(),w="scroll"+u,p=n[w],g=a.max(n,r);if(j){k[w]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[w]-=parseInt(m.css("margin"+u))||0;k[w]-=parseInt(m.css("border"+u+"Width"))||0}k[w]+=d.offset[s]||0;if(d.over[s]){k[w]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var v=m[s];k[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*g:v}if(/^\d+$/.test(k[w])){k[w]=k[w]<=0?0:Math.min(k[w],g)}if(!q&&d.queue){if(p!=k[w]){i(d.onAfterFirst)}delete k[w]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var h=a(c).rules();var d=false;for(method in h){var g={method:method,parameters:h[method]};try{var b=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(d.old!==f){d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true;if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var l={};var j=(d.message=i||b.defaultMessage(c,"remote"));l[c.name]=a.isFunction(j)?j(f):j;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return d.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);(function(c){function b(e,d){return(typeof e=="function")?(e.call(d)):e}function a(e,d){this.$element=c(e);this.options=d;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var g=this.getTitle();if(g&&this.enabled){var f=this.tip();f.find(".tipsy-inner")[this.options.html?"html":"text"](g);f[0].className="tipsy";f.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var j=c.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=f[0].offsetWidth,i=f[0].offsetHeight,h=b(this.options.gravity,this.$element[0]);var e;switch(h.charAt(0)){case"n":e={top:j.top+j.height+this.options.offset,left:j.left+j.width/2-d/2};break;case"s":e={top:j.top-i-this.options.offset,left:j.left+j.width/2-d/2};break;case"e":e={top:j.top+j.height/2-i/2,left:j.left-d-this.options.offset};break;case"w":e={top:j.top+j.height/2-i/2,left:j.left+j.width+this.options.offset};break}if(h.length==2){if(h.charAt(1)=="w"){e.left=j.left+j.width/2-15}else{e.left=j.left+j.width/2-d+15}}f.css(e).addClass("tipsy-"+h);f.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0);if(this.options.className){f.addClass(b(this.options.className,this.$element[0]))}if(this.options.fade){f.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{f.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){c(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var d=this.$element;if(d.attr("title")||typeof(d.attr("original-title"))!="string"){d.attr("original-title",d.attr("title")||"").removeAttr("title")}},getTitle:function(){var f,d=this.$element,e=this.options;this.fixTitle();var f,e=this.options;if(typeof e.title=="string"){f=d.attr(e.title=="title"?"original-title":e.title)}else{if(typeof e.title=="function"){f=e.title.call(d[0])}}f=(""+f).replace(/(^\s*|\s*$)/,"");return f||e.fallback},tip:function(){if(!this.$tip){this.$tip=c('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};c.fn.tipsy=function(h){if(h===true){return this.data("tipsy")}else{if(typeof h=="string"){var j=this.data("tipsy");if(j){j[h]()}return this}}h=c.extend({},c.fn.tipsy.defaults,h);function g(l){var m=c.data(l,"tipsy");if(!m){m=new a(l,c.fn.tipsy.elementOptions(l,h));c.data(l,"tipsy",m)}c(l).bind("tipsy.reload",function(){m.options.fade=false;m.show();m.options.fade=true;return c(l)});return m}function k(){var l=g(this);l.hoverState="in";if(h.delayIn==0){l.show()}else{l.fixTitle();setTimeout(function(){if(l.hoverState=="in"){l.show()}},h.delayIn)}}function f(){var l=g(this);l.hoverState="out";if(h.delayOut==0){l.hide()}else{setTimeout(function(){if(l.hoverState=="out"){l.hide()}},h.delayOut)}}if(!h.live){this.each(function(){g(this)})}if(h.trigger!="manual"){var d=h.live?"live":"bind",i=h.trigger=="hover"?"mouseenter":"focus",e=h.trigger=="hover"?"mouseleave":"blur";this[d](i,k)[d](e,f)}return this};c.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};c.fn.tipsy.elementOptions=function(e,d){return c.metadata?c.extend({},d,c(e).metadata()):d};c.fn.tipsy.autoNS=function(){return c(this).offset().top>(c(document).scrollTop()+c(window).height()/2)?"s":"n"};c.fn.tipsy.autoWE=function(){return c(this).offset().left>(c(document).scrollLeft()+c(window).width()/2)?"e":"w"};c.fn.tipsy.autoBounds=function(e,d){return function(){var f={ns:d[0],ew:(d.length>1?d[1]:false)},i=c(document).scrollTop()+e,g=c(document).scrollLeft()+e,h=c(this);if(h.offset().top<i){f.ns="n"}if(h.offset().left<g){f.ew="w"}if(c(window).width()+c(document).scrollLeft()-h.offset().left<e){f.ew="e"}if(c(window).height()+c(document).scrollTop()-h.offset().top<e){f.ns="s"}return f.ns+(f.ew?f.ew:"")}}})(jQuery);(function(){var g,f,j,i,h=function(d,c){return function(){return d.apply(c,arguments)}};i=this,g=jQuery,g.fn.extend({chosen:function(b,a){return g.browser!=="msie"||g.browser.version!=="6.0"&&g.browser.version!=="7.0"?g(this).each(function(c){if(!g(this).hasClass("chzn-done")){return new f(this,b,a)}}):this}}),f=function(){function a(c){this.set_default_values(),this.form_field=c,this.form_field_jq=g(this.form_field),this.is_multiple=this.form_field.multiple,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl"),this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option",this.set_up_html(),this.register_observers(),this.form_field_jq.addClass("chzn-done")}a.prototype.set_default_values=function(){this.click_test_action=h(function(b){return this.test_active_click(b)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null;return this.choices=0},a.prototype.set_up_html=function(){var c,m,l,k;this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.width(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,c=g("<div />",{id:this.container_id,"class":"chzn-container "+(this.is_rtl?"chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?c.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):c.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(c),this.container=g("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),m=this.container.height(),l=this.f_width-j(this.dropdown),this.dropdown.css({width:l+"px",top:m+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),k=l-j(this.search_container)-j(this.search_field),this.search_field.css({width:k+"px"})),this.results_build();return this.set_tab_index()},a.prototype.register_observers=function(){this.container.mousedown(h(function(b){return this.container_mousedown(b)},this)),this.container.mouseenter(h(function(b){return this.mouse_enter(b)},this)),this.container.mouseleave(h(function(b){return this.mouse_leave(b)},this)),this.search_results.mouseup(h(function(b){return this.search_results_mouseup(b)},this)),this.search_results.mouseover(h(function(b){return this.search_results_mouseover(b)},this)),this.search_results.mouseout(h(function(b){return this.search_results_mouseout(b)},this)),this.form_field_jq.bind("liszt:updated",h(function(b){return this.results_update_field(b)},this)),this.search_field.blur(h(function(b){return this.input_blur(b)},this)),this.search_field.keyup(h(function(b){return this.keyup_checker(b)},this)),this.search_field.keydown(h(function(b){return this.keydown_checker(b)},this));if(this.is_multiple){this.search_choices.click(h(function(b){return this.choices_click(b)},this));return this.search_field.focus(h(function(b){return this.input_focus(b)},this))}return this.selected_item.focus(h(function(b){return this.activate_field(b)},this))},a.prototype.container_mousedown=function(c){c&&c.type==="mousedown"&&c.stopPropagation();if(!this.pending_destroy_click){this.active_field?!this.is_multiple&&c&&(g(c.target)===this.selected_item||g(c.target).parents("a.chzn-single").length)&&(c.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),g(document).click(this.click_test_action),this.results_show());return this.activate_field()}return this.pending_destroy_click=!1},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(b){if(!this.active_field){return setTimeout(h(function(){return this.container_mousedown()},this),50)}},a.prototype.input_blur=function(b){if(!this.mouse_on_container){this.active_field=!1;return setTimeout(h(function(){return this.blur_test()},this),100)}},a.prototype.blur_test=function(b){if(!this.active_field&&this.container.hasClass("chzn-container-active")){return this.close_field()}},a.prototype.close_field=function(){g(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default();return this.search_field_scale()},a.prototype.activate_field=function(){!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val());return this.search_field.focus()},a.prototype.test_active_click=function(c){return g(c.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},a.prototype.results_build=function(){var k,d,o,n,m,l;o=new Date,this.parsing=!0,this.results_data=i.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),k="",l=this.results_data;for(n=0,m=l.length;n<m;n++){d=l[n],d.group?k+=this.result_add_group(d):d.empty||(k+=this.result_add_option(d),d.selected&&this.is_multiple?this.choice_build(d):d.selected&&!this.is_multiple&&this.selected_item.find("span").text(d.text))}this.show_search_field_default(),this.search_field_scale(),this.search_results.html(k);return this.parsing=!1},a.prototype.result_add_group=function(c){if(!c.disabled){c.dom_id=this.container_id+"_g_"+c.array_index;return'<li id="'+c.dom_id+'" class="group-result">'+g("<div />").text(c.label).html()+"</li>"}return""},a.prototype.result_add_option=function(d){var c;if(!d.disabled){d.dom_id=this.container_id+"_o_"+d.array_index,c=d.selected&&this.is_multiple?[]:["active-result"],d.selected&&c.push("result-selected"),d.group_array_index!=null&&c.push("group-option");return'<li id="'+d.dom_id+'" class="'+c.join(" ")+'">'+d.html+"</li>"}return""},a.prototype.results_update_field=function(){this.result_clear_highlight(),this.result_single_selected=null;return this.results_build()},a.prototype.result_do_highlight=function(l){var k,p,o,n,m;if(l.length){this.result_clear_highlight(),this.result_highlight=l,this.result_highlight.addClass("highlighted"),o=parseInt(this.search_results.css("maxHeight"),10),m=this.search_results.scrollTop(),n=o+m,p=this.result_highlight.position().top+this.search_results.scrollTop(),k=p+this.result_highlight.outerHeight();if(k>=n){return this.search_results.scrollTop(k-o>0?k-o:0)}if(p<m){return this.search_results.scrollTop(p)}}},a.prototype.result_clear_highlight=function(){this.result_highlight&&this.result_highlight.removeClass("highlighted");return this.result_highlight=null},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_show=function(){var b;this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),b=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:b+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val());return this.winnow_results()},a.prototype.results_hide=function(){this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"});return this.results_showing=!1},a.prototype.set_tab_index=function(d){var c;if(this.form_field_jq.attr("tabindex")){c=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1);if(this.is_multiple){return this.search_field.attr("tabindex",c)}this.selected_item.attr("tabindex",c);return this.search_field.attr("tabindex",-1)}},a.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default")}this.search_field.val("");return this.search_field.removeClass("default")},a.prototype.search_results_mouseup=function(d){var e;e=g(d.target).hasClass("active-result")?g(d.target):g(d.target).parents(".active-result").first();if(e.length){this.result_highlight=e;return this.result_select(d)}},a.prototype.search_results_mouseover=function(d){var e;e=g(d.target).hasClass("active-result")?g(d.target):g(d.target).parents(".active-result").first();if(e){return this.result_do_highlight(e)}},a.prototype.search_results_mouseout=function(c){if(g(c.target).hasClass("active-result")){return this.result_clear_highlight()}},a.prototype.choices_click=function(c){c.preventDefault();if(this.active_field&&!g(c.target).hasClass("search-choice")&&!this.results_showing){return this.results_show()}},a.prototype.choice_build=function(e){var l,k;l=this.container_id+"_c_"+e.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+l+'"><span>'+e.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+e.array_index+'"></a></li>'),k=g("#"+l).find("a").first();return k.click(h(function(b){return this.choice_destroy_link_click(b)},this))},a.prototype.choice_destroy_link_click=function(c){c.preventDefault(),this.pending_destroy_click=!0;return this.choice_destroy(g(c.target))},a.prototype.choice_destroy=function(b){this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(b.attr("rel"));return b.parents("li").first().remove()},a.prototype.result_select=function(l){var k,o,n,m;if(this.result_highlight){k=this.result_highlight,o=k.attr("id"),this.result_clear_highlight(),k.addClass("result-selected"),this.is_multiple?this.result_deactivate(k):this.result_single_selected=k,m=o.substr(o.lastIndexOf("_")+1),n=this.results_data[m],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.is_multiple?this.choice_build(n):this.selected_item.find("span").first().text(n.text),(!l.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change");return this.search_field_scale()}},a.prototype.result_activate=function(b){return b.addClass("active-result").show()},a.prototype.result_deactivate=function(b){return b.removeClass("active-result").hide()},a.prototype.result_deselect=function(e){var l,k;k=this.results_data[e],k.selected=!1,this.form_field.options[k.options_index].selected=!1,l=g("#"+this.container_id+"_o_"+e),l.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change");return this.search_field_scale()},a.prototype.results_search=function(b){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var J,I,H,G,F,E,D,C,B,A,z,y,x,w,v,u,s;B=new Date,this.no_results_clear(),D=0,C=this.search_field.val()===this.default_text?"":g("<div/>").text(g.trim(this.search_field.val())).html(),F=new RegExp("^"+C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=new RegExp(C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),s=this.results_data;for(x=0,v=s.length;x<v;x++){I=s[x];if(!I.disabled&&!I.empty){if(I.group){g("#"+I.dom_id).hide()}else{if(!this.is_multiple||!I.selected){J=!1,E=I.dom_id;if(F.test(I.html)){J=!0,D+=1}else{if(I.html.indexOf(" ")>=0||I.html.indexOf("[")===0){G=I.html.replace(/\[|\]/g,"").split(" ");if(G.length){for(w=0,u=G.length;w<u;w++){H=G[w],F.test(H)&&(J=!0,D+=1)}}}}J?(C.length?(A=I.html.search(y),z=I.html.substr(0,A+C.length)+"</em>"+I.html.substr(A+C.length),z=z.substr(0,A)+"<em>"+z.substr(A)):z=I.html,g("#"+E).html!==z&&g("#"+E).html(z),this.result_activate(g("#"+E)),I.group_array_index!=null&&g("#"+this.results_data[I.group_array_index].dom_id).show()):(this.result_highlight&&E===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(g("#"+E)))}}}}return D<1&&C.length?this.no_results(C):this.winnow_results_set_highlight()},a.prototype.winnow_results_clear=function(){var k,o,n,m,l;this.search_field.val(""),o=this.search_results.find("li"),l=[];for(n=0,m=o.length;n<m;n++){k=o[n],k=g(k),l.push(k.hasClass("group-result")?k.show():!this.is_multiple||!k.hasClass("result-selected")?this.result_activate(k):void 0)}return l},a.prototype.winnow_results_set_highlight=function(){var d,c;if(!this.result_highlight){c=this.is_multiple?[]:this.search_results.find(".result-selected"),d=c.length?c.first():this.search_results.find(".active-result").first();if(d!=null){return this.result_do_highlight(d)}}},a.prototype.no_results=function(d){var e;e=g('<li class="no-results">No results match "<span></span>"</li>'),e.find("span").first().html(d);return this.search_results.append(e)},a.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},a.prototype.keydown_arrow=function(){var d,e;this.result_highlight?this.results_showing&&(e=this.result_highlight.nextAll("li.active-result").first(),e&&this.result_do_highlight(e)):(d=this.search_results.find("li.active-result").first(),d&&this.result_do_highlight(g(d)));if(!this.results_showing){return this.results_show()}},a.prototype.keyup_arrow=function(){var b;if(!this.results_showing&&!this.is_multiple){return this.results_show()}if(this.result_highlight){b=this.result_highlight.prevAll("li.active-result");if(b.length){return this.result_do_highlight(b.first())}this.choices>0&&this.results_hide();return this.result_clear_highlight()}},a.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")},a.prototype.clear_backstroke=function(){this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus");return this.pending_backstroke=null},a.prototype.keyup_checker=function(e){var d,k;d=(k=e.which)!=null?k:e.keyCode,this.search_field_scale();switch(d){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0){return this.keydown_backstroke()}if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:e.preventDefault();if(this.results_showing){return this.result_select(e)}break;case 27:if(this.results_showing){return this.results_hide()}break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.keydown_checker=function(e){var d,k;d=(k=e.which)!=null?k:e.keyCode,this.search_field_scale(),d!==8&&this.pending_backstroke&&this.clear_backstroke();switch(d){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},a.prototype.search_field_scale=function(){var s,r,q,p,o,n,m,l,k;if(this.is_multiple){q=0,m=0,o="position:absolute; left: -1000px; top: -1000px; display:none;",n=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(l=0,k=n.length;l<k;l++){p=n[l],o+=p+":"+this.search_field.css(p)+";"}r=g("<div />",{style:o}),r.text(this.search_field.val()),g("body").append(r),m=r.width()+25,r.remove(),m>this.f_width-10&&(m=this.f_width-10),this.search_field.css({width:m+"px"}),s=this.container.height();return this.dropdown.css({top:s+"px"})}},a.prototype.generate_field_id=function(){var b;b=this.generate_random_id(),this.form_field.id=b;return b},a.prototype.generate_random_id=function(){var c;c="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(g("#"+c).length>0){c+=this.generate_random_char()}return c},a.prototype.generate_random_char=function(){var e,d,k;e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",k=Math.floor(Math.random()*e.length);return d=e.substring(k,k+1)};return a}(),j=function(d){var c;return c=d.outerWidth()-d.width()},i.get_side_border_padding=j}).call(this),function(){var b;b=function(){function c(){this.options_index=0,this.parsed=[]}c.prototype.add_node=function(d){return d.nodeName==="OPTGROUP"?this.add_group(d):this.add_option(d)},c.prototype.add_group=function(i){var h,n,m,l,k,j;h=this.parsed.length,this.parsed.push({array_index:h,group:!0,label:i.label,children:0,disabled:i.disabled}),k=i.childNodes,j=[];for(m=0,l=k.length;m<l;m++){n=k[m],j.push(this.add_option(n,h,i.disabled))}return j},c.prototype.add_option=function(e,d,f){if(e.nodeName==="OPTION"){e.text!==""?(d!=null&&(this.parsed[d].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:f===!0?f:e.disabled,group_array_index:d})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0});return this.options_index+=1}};return c}(),b.select_to_array=function(a){var l,k,j,i,h;k=new b,h=a.childNodes;for(j=0,i=h.length;j<i;j++){l=h[j],k.add_node(l)}return k.parsed},this.SelectParser=b}.call(this);var selected_events=[];var flash_message=[];var csrf=$('meta[name="csrf-token"]').attr("content");function HCloader(b){var c=$("div#"+b);c.fadeTo("slow",0.2);var a=$('<div class="cover-loader" />');a.css({top:c.offset().top,left:c.offset().left,height:c.height(),width:c.width(),"line-height":c.height()+"px"}).html("Loading...");a.appendTo("body")}function clippyCopiedCallback(d){var c=$("span#main_"+d);c.length!=0&&(c.attr("title","copied!").trigger("tipsy.reload"),setTimeout(function(){c.attr("title","copy to clipboard")},500))}function Queue(){if(!(this instanceof arguments.callee)){return new arguments.callee(arguments)}var a=this;a.up=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b+1)};a.down=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b-1)}}function flash(a){$("div#flash_message").remove();$.each(flash_message,function(b,d){var c=Snorby.templates.flash(d);$("body").prepend(c);$("div#flash_message").fadeIn("slow").delay(2000).fadeOut("slow");flash_message=[]});return false}function clear_selected_events(){selected_events=[];$("input#selected_events").val("");return false}function set_classification(a){var b=$("input#selected_events").attr("value");var c=$("div#events").attr("data-action");var d=$("div#events").attr("data-page");if(b.length>0){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$.post("/events/classify",{events:b,classification:a,authenticity_token:csrf},function(){if(c=="index"){clear_selected_events();$.getScript("/events?page="+d)}else{if(c=="queue"){clear_selected_events();$.getScript("/events/queue?page="+d)}else{if(c=="history"){clear_selected_events();$.getScript("/events/history?page="+d)}else{if(c=="results"){clear_selected_events();$.getScript($("input#current_url").val())}else{}}}}flash_message.push({type:"success",message:"Event(s) Classified Successfully"})})}else{if($("ul.table div.content li.event.currently-over.highlight").is(":visible")){$("ul.table div.content li.event.currently-over.highlight .row div.select input#event-selector").click().trigger("change");set_classification(a)}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash();$.scrollTo("#header",500)}}}function update_note_count(e,d){var a=$("li#"+e+" div.row div.timestamp");var b=a.find("span.notes-count");var c='<span class="add_tipsy round notes-count" title="{{notes_count_in_words}}"><img alt="Notes" height="16" src="/images/icons/notes.png" width="16"></span>';var f=Mustache.to_html(c,d);if(d.notes_count==0){b.remove()}else{if(b.length>0){b.replaceWith(f).trigger("tipsy.reload")}else{a.prepend(f).trigger("tipsy.reload")}}}var Snorby={setup:function(){$(window).resize(function(){$.fancybox.center});$("div#flash_message, div#flash_message > *").live("click",function(){$("div#flash_message").stop().fadeOut("fast")});$("#growl").notify({speed:500,expires:5000});$(".edit-sensor-name").editable("/sensors/update_name",{height:"20px",width:"180px",name:"name",indicator:'<img src="/images/icons/pager.gif">',data:function(b){var a=b.replace(/<br[\s\/]?>/gi,"\n");return a},submitdata:function(){return{id:$(this).attr("data-sensor-id"),authenticity_token:csrf}}})},pages:{classifications:function(){$("a.classification").live("click",function(){var a=$(this).attr("data-classification-id");set_classification(a);return false})},dashboard:function(){$("#box-holder div.box").live("click",function(a){a.preventDefault();window.location=$(this).attr("data-url");return false});$("a.show_events_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#events-graph").show();return false});$("a.show_map_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#geoip-graph").show();return false});$("a.show_severities_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#severity-graph").show();return false});$("a.show_protocol_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#protocol-graph").show();return false});$("a.show_signature_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#signature-graph").show();return false});$("a.show_classification_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#classification-graph").show();return false});$("a.show_source_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#source-ips-graph").show();return false});$("a.show_destination_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#destination-ips-graph").show();return false})},events:function(){$("select.email-user-select").live("change",function(b){var a=$("select.email-user-select").val();if(a!=""){if($("input#email_to").val()==""){$("input#email_to").val(a)}else{$("input#email_to").val($("input#email_to").val()+", "+a)}}});$("button.email-event-information").live("click",function(a){a.preventDefault();if($("input#email_to").val()==""){flash_message.push({type:"error",message:"The email recipients cannot be blank."});flash();$.scrollTo("#header",500)}else{if($("input#email_subject").val()==""){flash_message.push({type:"error",message:"The email subject cannot be blank."});flash();$.scrollTo("#header",500)}else{$("a#fancybox-close").click();$.post("/events/email",$("form.email-event-information").serialize(),null,"script")}}return false});$("button.request_packet_capture").live("click",function(a){a.preventDefault();if($(this).attr("data-deepsee")){$("form.request_packet_capture input#method").val("deepsee")}$.post("/events/request_packet_capture",$("form.request_packet_capture").serialize(),null,"script");return false});$("dl#event-sub-menu a").live("click",function(a){$("dl#event-sub-menu").hide()});$("a.has-event-menu").live("click",function(a){a.preventDefault();var b=$(this).parent().find("dl.event-sub-menu");if(b.is(":visible")){b.fadeOut("fast")}else{$("dl.event-sub-menu").hide();b.fadeIn("fast")}return false});$("dl.event-sub-menu dd a").live("click",function(a){$(this).parents("dl").fadeOut("fast")});$("button.mass-action").live("click",function(b){b.preventDefault();var a=$("form#mass-action-form");$("a#fancybox-close").click();$.post("/events/mass_action",a.serialize(),null,"script");return false});$("button.create-notification").live("click",function(b){b.preventDefault();var a=$("form#new_notification");$.post("/notifications",a.serialize(),null,"script");$("a#fancybox-close").click();return false});$("button.cancel-snorbybox").live("click",function(a){a.preventDefault();$("a#fancybox-close").click();return false});$("ul.payload-tabs li a").live("click",function(b){b.preventDefault();var a=$(this).attr("data-div");$(this).parents("ul").find("li").removeClass("current");$(this).parent("li").addClass("current");$("div.payload-holder").hide();$("div."+a+" pre").css("opacity",0);$("div."+a).show();$("div."+a+" pre").stop().animate({opacity:1},1000);return false});$("a.export").live("click",function(b){b.preventDefault();var a=$("input#selected_events").attr("value");if(a){$.post(this.href,{events:a,authenticity_token:csrf})}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash()}return false});$("a.edit-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");$.getScript("/notes/"+a+"/edit");return false});$("a.destroy-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");if(confirm("Are you sure you want to delete this note?")){$("div.notes").fadeTo(500,0.4);$.post("/notes/destroy",{id:a,authenticity_token:csrf,_method:"delete"},null,"script")}return false});$("button.add_new_note-working").live("click",function(a){a.preventDefault();return false});$("button.cancel-note").live("click",function(a){a.preventDefault();$(this).parents("div#new_note_box").remove();return false});$("button.add_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");if($("div#new_note_box").length>0){}else{$(this).removeClass("add_new_note").addClass("add_new_note-working");var a=$(this).width();$(this).addClass("loading").css("width",a);$.get("/notes/new",{sid:c,cid:b,authenticity_token:csrf},null,"script")}return false});$("button.submit_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");var f=$(this).parent("div#form-actions").parent("div#new_note").find("textarea#body").val();if(f.length>0){var a=$(this).width();$(this).addClass("loading").css("width",a);$.post("/notes/create",{sid:c,cid:b,body:f,authenticity_token:csrf},null,"script")}else{flash_message.push({type:"error",message:"The note body cannot be blank!"});flash();$.scrollTo("#header",500)}return false});$("a.query-data").live("click",function(){$("pre.query-data-content").hide();$("pre#"+$(this).attr("data-content-name")).show();return false});$("a.snorbybox-content").live("click",function(b){b.preventDefault();$("dl.drop-down-menu").fadeOut("slow");var a=$(this).attr("data-content");$.fancybox({padding:0,content:a,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","shift+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}})});$("a.snorbybox").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href,onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","shift+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}});return false});$("div.create-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var c=$(this).parents("li.event").attr("data-event-cid");$(this).removeClass("create-favorite").addClass("destroy-favorite");$.post("/events/favorite",{sid:a,cid:c,authenticity_token:csrf});var b=new Queue();b.up();return false});$("div.destroy-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var d=$(this).parents("li.event").attr("data-event-cid");var c=$("div#events").attr("data-action");$(this).removeClass("destroy-favorite").addClass("create-favorite");$.post("/events/favorite",{sid:a,cid:d,authenticity_token:csrf});var b=new Queue();b.down();if(c=="queue"){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$("div.destroy-favorite").removeClass("enabled").css("cursor","default");$.get("/events/queue",null,null,"script")}return false});$("input.event-select-all").live("change",function(){if($(this).attr("checked")){$("ul.table div.content li.event input.event-selector").attr("checked",true)}else{$("ul.table div.content li.event input.event-selector").attr("checked",false)}return true});$("ul.table div.content li.event div.click").live("click",function(){$("dl#event-sub-menu").hide();var b=$(this).parents("li").attr("data-event-sid");var e=$(this).parents("li").attr("data-event-cid");var d=$("li#event_"+b+""+e);var c=$("li#event_"+b+""+e+" input#event-selector");var a=$("li#event_"+b+""+e+" div.event-data");Snorby.helpers.remove_click_events(true);$("li.event").removeClass("highlight");if(!a.is(":visible")){d.addClass("highlight")}else{d.removeClass("highlight")}if(a.attr("data")=="true"){Snorby.helpers.remove_click_events(false);if(a.is(":visible")){a.slideUp("fast",function(){$("li.event div.event-data").slideUp("fast")});Snorby.hotkeys()}else{$("li.event div.event-data").slideUp("fast");a.slideDown("fast");$(document).unbind("keydown","left");$(document).unbind("keydown","right");$(document).unbind("keydown","shift+left");$(document).unbind("keydown","shift+right")}}else{c.hide();$("li.event div.event-data").slideUp("fast");d.find("div.select").append("<img alt='laoding' src='/images/icons/loading.gif' class='select-loading'>");$.get("/events/show/"+b+"/"+e,function(){$(document).unbind("keydown","left");$(document).unbind("keydown","right");$(document).unbind("keydown","shift+left");$(document).unbind("keydown","shift+right");Snorby.helpers.remove_click_events(false);$(".select-loading").remove();c.show();a.attr("data",true)},"script")}return false});$("div.new_events").live("click",function(){$(this).remove();if(parseInt($("strong.new_event_count").html())>100){window.location="/events"}else{$("#events ul.table div.content li").fadeIn("slow")}return false})},},admin:function(){$("#users input#enabled").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{enabled:true},authenticity_token:csrf})}else{$.post("/users/toggle_settings",{user_id:a,user:{enabled:false},authenticity_token:csrf})}});$("#users input#admin").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{admin:true},authenticity_token:csrf})}else{$.post("/users/toggle_settings",{user_id:a,user:{admin:false},authenticity_token:csrf})}});$("#severity-color-bg").ColorPicker({color:$("#severity-color-bg").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-bg").val("#"+c);$("span.severity").css("backgroundColor","#"+c)}});$("#severity-color-text").ColorPicker({color:$("#severity-color-text").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-text").val("#"+c);$("span.severity").css("color","#"+c)}})},templates:{flash:function(b){var a=" <div class='{{type}}' id='flash_message' style='display:none;'> <div class='message {{type}}'>{{message}}</div> </div>";return Mustache.to_html(a,b)},event_table:function(b){var a=" {{#events}} <li id='event_{{sid}}{{cid}}' class='event' style='display:none;' data-event-id='{{sid}}-{{cid}}' data-event-sid='{{sid}}' data-event-cid='{{cid}}'> <div class='row'> <div class='select small'><input class='event-selector' id='event-selector' name='event-selector' type='checkbox'></div> <div class='important small'><div class='create-favorite enabled'></div></div> <div class='severity small'><span class='severity sev{{severity}}'>{{severity}}</span></div> <div class='click sensor address'>{{hostname}}</div> <div class='click src_ip address'>{{ip_src}}</div> <div class='click dst_ip address'>{{ip_dst}}</div> <div class='click signature'>{{message}}</div> <div class='click timestamp'>{{timestamp}}</div> </div> <div style='display:none;' class='event-data' data='false'></div> </li> {{/events}}";return Mustache.to_html(a,b)},},notification:function(a){$("#growl").notify("create",a,{expires:3000,speed:500})},helpers:{tipsy:function(){$(".add_tipsy").tipsy({fade:true,html:false,gravity:"s",live:true})},input_style:function(){$("div#form-actions button.cancel").live("click",function(){window.location="/";return false});$("input[name=blank]").focus()},dropdown:function(){$(document).click(function(){$("dl.drop-down-menu:visible").hide()});$("dl.drop-down-menu dd a").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");return true});$("dl.drop-down-menu").hover(function(){var a=$(this).data("timeout");if(a){clearTimeout(a)}},function(){$(this).data("timeout",setTimeout($.proxy(function(){$(this).fadeOut("fast")},this),500))});$("a.has_dropdown").live("click",function(){var b=$(this).attr("id");var a=$(this).parents("li").find("dl#"+b);$("dl.drop-down-menu").each(function(c){if(b===$(this).attr("id")){if($(this).is(":visible")){a.fadeOut("fast")}else{a.slideDown({duration:"fast",easing:"easeOutSine"})}}else{$(this).fadeOut("fast")}});return false})},persistence_selections:function(){$("input#event-selector").live("change",function(){var a=$(this).parents("li").attr("data-event-id");if($(this).attr("checked")){selected_events.push(a);$('input#selected_events[type="hidden"]').val(selected_events)}else{var b=a;selected_events=jQuery.grep(selected_events,function(c){return c!=b});$('input#selected_events[type="hidden"]').val(selected_events)}});$("input#event-select-all").live("change",function(){if($(this).attr("checked")){$('ul.table div.content li input[type="checkbox"]').each(function(a,c){var b=$(this).parents("li").attr("data-event-id");$(this).attr("checked","checked");selected_events.push(b)})}else{$('ul.table div.content li input[type="checkbox"]').each(function(a,b){var c=$(this).parents("li").attr("data-event-id");$(this).attr("checked","");selected_events=jQuery.grep(selected_events,function(d){return d!=c})})}$('input#selected_events[type="hidden"]').val(selected_events)})},recheck_selected_events:function(){$("input#selected_events").val(selected_events);$.each(selected_events,function(a,b){$("input.check_box_"+b).attr("checked","checked")})},pagenation:function(){$("ul.pager li").live("click",function(){if(history&&history.pushState){$(window).bind("popstate",function(){$.getScript(location.href)})}if(!$(this).hasClass("more")){var a=$(this).width();if(a<16){var a=16}$(this).addClass("loading").css("width",a);if($(this).parents("div").hasClass("notes-pager")){$("div.notes").fadeTo(500,0.4)}else{$("div.content, tbody.content").fadeTo(500,0.4)}Snorby.helpers.remove_click_events(true);if(history&&history.pushState){$.getScript($(this).find("a").attr("href"));history.pushState(null,document.title,$(this).find("a").attr("href"))}else{$.getScript($(this).find("a").attr("href"))}}return false})},remove_click_events:function(a){if(a){$("ul.table div.content div").removeClass("click")}else{$("li.event div.sensor, li.event div.src_ip, li.event div.dst_ip, li.event div.signature, li.event div.timestamp").addClass("click")}},},callbacks:function(){$("body").ajaxError(function(c,d,a,b){$("div.content").fadeTo(500,1);$('ul.table div.content li input[type="checkbox"]').attr("checked","");Snorby.helpers.remove_click_events(false);if(d.status===404){flash_message.push({type:"error",message:"The requested page could not be found."});flash()}else{flash_message.push({type:"error",message:"The request failed to complete successfully."});flash()}})},hotkeys:function(){$(document).bind("keydown","ctrl+shift+h",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:"/events/hotkey"});return false});$(document).bind("keydown","ctrl+3",function(){window.location="/jobs";return false});$(document).bind("keydown","ctrl+2",function(){window.location="/events";return false});$(document).bind("keydown","ctrl+1",function(){window.location="/events/queue";return false});$(document).bind("keydown","ctrl+shift+s",function(){window.location="/search";return false});$("ul.table div.content li.event").live("hover",function(){$("ul.table div.content li.event").removeClass("currently-over");$(this).addClass("currently-over")},function(){$(this).removeClass("currently-over")});if($("div.pager").is(":visible")){$(document).bind("keydown","shift+down",function(){var a=$("ul.table div.content li.event.currently-over");if(a.is(":visible")){if(a.next().length!=0){a.removeClass("currently-over").next().addClass("currently-over")}else{$("ul.table div.content li.event:first").addClass("currently-over")}}else{$("ul.table div.content li.event:first").addClass("currently-over")}return false});$(document).bind("keydown","shift+up",function(){var a=$("ul.table div.content li.event.currently-over");if(a.is(":visible")){if(a.prev().length!=0){a.removeClass("currently-over").prev().addClass("currently-over")}else{$("ul.table div.content li.event:last").addClass("currently-over")}}else{$("ul.table div.content li.event:last").addClass("currently-over")}return false});$(document).bind("keydown","shift+return",function(){$("ul.table div.content li.event.currently-over div.row div.click").click();return false});$(document).bind("keydown","esc",function(){$("ul.table div.content li.event.highlight div.row div.click").click();return false});$(document).bind("keydown","ctrl+shift+1",function(){$("span.sev1").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+2",function(){$("span.sev2").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+3",function(){$("span.sev3").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+u",function(){set_classification(0);return false});$(document).bind("keydown","shift+right",function(){$("div.pager.main ul.pager li.last a").click();return false});$(document).bind("keydown","alt+right",function(){$("div.pager.notes-pager ul.pager li.next a").click();return false});$(document).bind("keydown","right",function(){$("div.pager.main ul.pager li.next a").click();return false});$(document).bind("keydown","shift+left",function(){$("div.pager.main ul.pager li.first a").click();return false});$(document).bind("keydown","alt+left",function(){$("div.pager.notes-pager ul.pager li.previous a").click();return false});$(document).bind("keydown","left",function(){$("div.pager.main ul.pager li.previous a").click();return false});$(document).bind("keydown","ctrl+shift+a",function(){$("input.event-select-all").click().trigger("change");return false})}},validations:function(){jQuery.validator.addMethod("hex-color",function(b,a,c){return this.optional(a)||/^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/i.test(b)},jQuery.validator.messages.url);$(".validate").validate()},settings:function(){if($("div#general-settings").length>0){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}if($("input#_settings_packet_capture_auto_auth:checked").length==0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}var a=$("select#_settings_packet_capture_type").attr("packet_capture_plugin");$('select#_settings_packet_capture_type option[value="'+a+'"]').attr("selected","selected");if($("input#_settings_autodrop:checked").length>0){$("select#_settings_autodrop_count").attr("disabled","")}else{$("select#_settings_autodrop_count").attr("disabled","disabled")}var b=$("select#_settings_autodrop_count").attr("autodrop_count");$('select#_settings_autodrop_count option[value="'+b+'"]').attr("selected","selected")}$("input#_settings_packet_capture").live("click",function(){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}});$("input#_settings_autodrop").live("click",function(){console.log("w0ots!");if($(this).is(":checked")){$("select#_settings_autodrop_count").attr("disabled","")}else{$("select#_settings_autodrop_count").attr("disabled","disabled")}});$("input#_settings_packet_capture_auto_auth").live("click",function(){if($("input#_settings_packet_capture_auto_auth:checked").length>0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").addClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled")}})},jobs:function(){$("a.view_job_handler, a.view_job_last_error").live("click",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href});return false})}};jQuery(document).ready(function(a){a("#login form#user_new").submit(function(d){d.preventDefault();var b=a("#login");var c=this;if(a("input#user_password",c).attr("value").length>1){if(a("input#user_email",c).attr("value").length>5){a.post(c.action,a(c).serialize(),function(e){if(e.success){flash_message.push({type:"success",message:"Loading - Authentication Successful!"});flash();a.get(e.redirect,function(f){b.fadeOut("slow",function(){document.open();document.write(f);document.close();history.pushState(null,"Snorby - Dashboard","/")})})}else{flash_message.push({type:"error",message:"Fail - Authentication Failure!"});flash()}})}}});a("#login button.forgot-my-password").live("click",function(b){b.preventDefault();a.get("/users/password/new",function(d){var c=a(d).find("#content").html();a("#content").html(c);history.pushState(null,"Snorby - Password Reset","/users/password/new")})});a("#fancybox-wrap").draggable({handle:"div#box-title",cursor:"move"});a("li.administration a").live("click",function(c){var b=this;c.preventDefault();a("dl#admin-menu").toggle()});a("dl#admin-menu a").live("click",function(b){a(this).parents("dl").fadeOut("fast")});a("#wrapper").live("click",function(){if(a("dl#admin-menu").is(":visible")){a("dl#admin-menu").fadeOut("fast")}});a("td.search-by-signature").live("click",function(c){c.preventDefault();var b=a(this).attr("data-url");window.location=b});Snorby.setup();Snorby.admin();Snorby.callbacks();Snorby.hotkeys();Snorby.jobs();Snorby.settings();Snorby.validations();Snorby.helpers.tipsy();Snorby.helpers.dropdown();Snorby.helpers.input_style();Snorby.helpers.persistence_selections();Snorby.helpers.pagenation();Snorby.pages.classifications();Snorby.pages.dashboard();Snorby.pages.events();a(".add_chosen").chosen()});
\ No newline at end of file
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/assets/snorby.js.gz
^
|
@@ -1,4 +1,4 @@
-/*
+/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
@@ -14,7 +14,7 @@
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(aP,M){function a1(){if(!ai.isReady){try{S.documentElement.doScroll("left")}catch(c){setTimeout(a1,1);return}ai.ready()}}function H(s,c){c.src?ai.ajax({url:c.src,async:false,dataType:"script"}):ai.globalEval(c.text||c.textContent||c.innerHTML||"");c.parentNode&&c.parentNode.removeChild(c)}function aq(s,c,K,F,G,w){var A=s.length;if(typeof c==="object"){for(var J in c){aq(s,J,c[J],F,G,K)}return s}if(K!==M){F=!w&&F&&ai.isFunction(K);for(J=0;J<A;J++){G(s[J],c,F?K.call(s[J],J,G(s[J],c)):K,w)}return s}return A?G(s[0],c):M}function aG(){return(new Date).getTime()}function ap(){return false}function an(){return true}function aL(s,c,w){w[0].type=s;return ai.event.handle.apply(c,w)}function ah(O){var N,L=[],J=[],K=arguments,F,G,s,A,w,c;G=ai.data(this,"events");if(!(O.liveFired===this||!G||!G.live||O.button&&O.type==="click")){O.liveFired=this;var P=G.live.slice(0);for(A=0;A<P.length;A++){G=P[A];G.origType.replace(aA,"")===O.type?J.push(G.selector):P.splice(A--,1)}F=ai(O.target).closest(J,O.currentTarget);w=0;for(c=F.length;w<c;w++){for(A=0;A<P.length;A++){G=P[A];if(F[w].selector===G.selector){s=F[w].elem;J=null;if(G.preType==="mouseenter"||G.preType==="mouseleave"){J=ai(O.relatedTarget).closest(G.selector)[0]}if(!J||J!==s){L.push({elem:s,handleObj:G})}}}}w=0;for(c=L.length;w<c;w++){F=L[w];O.currentTarget=F.elem;O.data=F.handleObj.data;O.handleObj=F.handleObj;if(F.handleObj.origHandler.apply(F.elem,K)===false){N=false;break}}return N}}function B(s,c){return"live."+(s&&s!=="*"?s+".":"")+c.replace(/\./g,"`").replace(/ /g,"&")}function l(c){return !c||!c.parentNode||c.parentNode.nodeType===11}function bk(s,c){var w=0;c.each(function(){if(this.nodeName===(s[w]&&s[w].nodeName)){var G=ai.data(s[w++]),J=ai.data(this,G);if(G=G&&G.events){delete J.handle;J.events={};for(var A in G){for(var F in G[A]){ai.event.add(this,A,G[A][F],G[A][F].data)}}}}})}function a4(s,c,G){var A,F,w;c=c&&c[0]?c[0].ownerDocument||c[0]:S;if(s.length===1&&typeof s[0]==="string"&&s[0].length<512&&c===S&&!aQ.test(s[0])&&(ai.support.checkClone||!al.test(s[0]))){F=true;if(w=ai.fragments[s[0]]){if(w!==1){A=w}}}if(!A){A=c.createDocumentFragment();ai.clean(s,c,A,G)}if(F){ai.fragments[s[0]]=w?A:1}return{fragment:A,cacheable:F}}function aD(s,c){var w={};ai.each(E.concat.apply([],E.slice(0,c)),function(){w[this]=s});return w}function o(c){return"scrollTo" in c&&c.document?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var ai=function(s,c){return new ai.fn.init(s,c)},p=aP.jQuery,d=aP.$,S=aP.document,au,a8=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,aU=/^.[^:#\[\.,]*$/,ao=/\S/,I=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,q=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ay=navigator.userAgent,b=false,aw=[],aC,a2=Object.prototype.toString,aW=Object.prototype.hasOwnProperty,az=Array.prototype.push,av=Array.prototype.slice,a7=Array.prototype.indexOf;ai.fn=ai.prototype={init:function(s,c){var A,w;if(!s){return this}if(s.nodeType){this.context=this[0]=s;this.length=1;return this}if(s==="body"&&!c){this.context=S;this[0]=S.body;this.selector="body";this.length=1;return this}if(typeof s==="string"){if((A=a8.exec(s))&&(A[1]||!c)){if(A[1]){w=c?c.ownerDocument||c:S;if(s=q.exec(s)){if(ai.isPlainObject(c)){s=[S.createElement(s[1])];ai.fn.attr.call(s,c,true)}else{s=[w.createElement(s[1])]}}else{s=a4([A[1]],[w]);s=(s.cacheable?s.fragment.cloneNode(true):s.fragment).childNodes}return ai.merge(this,s)}else{if(c=S.getElementById(A[2])){if(c.id!==A[2]){return au.find(s)}this.length=1;this[0]=c}this.context=S;this.selector=s;return this}}else{if(!c&&/^\w+$/.test(s)){this.selector=s;this.context=S;s=S.getElementsByTagName(s);return ai.merge(this,s)}else{return !c||c.jquery?(c||au).find(s):ai(c).find(s)}}}else{if(ai.isFunction(s)){return au.ready(s)}}if(s.selector!==M){this.selector=s.selector;this.context=s.context}return ai.makeArray(s,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return av.call(this,0)},get:function(c){return c==null?this.toArray():c<0?this.slice(c)[0]:this[c]},pushStack:function(s,c,A){var w=ai();ai.isArray(s)?az.apply(w,s):ai.merge(w,s);w.prevObject=this;w.context=this.context;if(c==="find"){w.selector=this.selector+(this.selector?" ":"")+A}else{if(c){w.selector=this.selector+"."+c+"("+A+")"}}return w},each:function(s,c){return ai.each(this,s,c)},ready:function(c){ai.bindReady();if(ai.isReady){c.call(S,ai)}else{aw&&aw.push(c)}return this},eq:function(c){return c===-1?this.slice(c):this.slice(c,+c+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(av.apply(this,arguments),"slice",av.call(arguments).join(","))},map:function(c){return this.pushStack(ai.map(this,function(s,w){return c.call(s,w,s)}))},end:function(){return this.prevObject||ai(null)},push:az,sort:[].sort,splice:[].splice};ai.fn.init.prototype=ai.fn;ai.extend=ai.fn.extend=function(){var s=arguments[0]||{},c=1,K=arguments.length,F=false,G,w,A,J;if(typeof s==="boolean"){F=s;s=arguments[1]||{};c=2}if(typeof s!=="object"&&!ai.isFunction(s)){s={}}if(K===c){s=this;--c}for(;c<K;c++){if((G=arguments[c])!=null){for(w in G){A=s[w];J=G[w];if(s!==J){if(F&&J&&(ai.isPlainObject(J)||ai.isArray(J))){A=A&&(ai.isPlainObject(A)||ai.isArray(A))?A:ai.isArray(J)?[]:{};s[w]=ai.extend(F,A,J)}else{if(J!==M){s[w]=J}}}}}}return s};ai.extend({noConflict:function(c){aP.$=d;if(c){aP.jQuery=p}return ai},isReady:false,ready:function(){if(!ai.isReady){if(!S.body){return setTimeout(ai.ready,13)}ai.isReady=true;if(aw){for(var s,c=0;s=aw[c++];){s.call(S,ai)}aw=null}ai.fn.triggerHandler&&ai(S).triggerHandler("ready")}},bindReady:function(){if(!b){b=true;if(S.readyState==="complete"){return ai.ready()}if(S.addEventListener){S.addEventListener("DOMContentLoaded",aC,false);aP.addEventListener("load",ai.ready,false)}else{if(S.attachEvent){S.attachEvent("onreadystatechange",aC);aP.attachEvent("onload",ai.ready);var s=false;try{s=aP.frameElement==null}catch(c){}S.documentElement.doScroll&&s&&a1()}}}},isFunction:function(c){return a2.call(c)==="[object Function]"},isArray:function(c){return a2.call(c)==="[object Array]"},isPlainObject:function(s){if(!s||a2.call(s)!=="[object Object]"||s.nodeType||s.setInterval){return false}if(s.constructor&&!aW.call(s,"constructor")&&!aW.call(s.constructor.prototype,"isPrototypeOf")){return false}var c;for(c in s){}return c===M||aW.call(s,c)},isEmptyObject:function(s){for(var c in s){return false}return true},error:function(c){throw c},parseJSON:function(c){if(typeof c!=="string"||!c){return null}c=ai.trim(c);if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return aP.JSON&&aP.JSON.parse?aP.JSON.parse(c):(new Function("return "+c))()}else{ai.error("Invalid JSON: "+c)}},noop:function(){},globalEval:function(s){if(s&&ao.test(s)){var c=S.getElementsByTagName("head")[0]||S.documentElement,w=S.createElement("script");w.type="text/javascript";if(ai.support.scriptEval){w.appendChild(S.createTextNode(s))}else{w.text=s}c.insertBefore(w,c.firstChild);c.removeChild(w)}},nodeName:function(s,c){return s.nodeName&&s.nodeName.toUpperCase()===c.toUpperCase()},each:function(s,c,J){var F,G=0,w=s.length,A=w===M||ai.isFunction(s);if(J){if(A){for(F in s){if(c.apply(s[F],J)===false){break}}}else{for(;G<w;){if(c.apply(s[G++],J)===false){break}}}}else{if(A){for(F in s){if(c.call(s[F],F,s[F])===false){break}}}else{for(J=s[0];G<w&&c.call(J,G,J)!==false;J=s[++G]){}}}return s},trim:function(c){return(c||"").replace(I,"")},makeArray:function(s,c){c=c||[];if(s!=null){s.length==null||typeof s==="string"||ai.isFunction(s)||typeof s!=="function"&&s.setInterval?az.call(c,s):ai.merge(c,s)}return c},inArray:function(s,c){if(c.indexOf){return c.indexOf(s)}for(var A=0,w=c.length;A<w;A++){if(c[A]===s){return A}}return -1},merge:function(s,c){var F=s.length,w=0;if(typeof c.length==="number"){for(var A=c.length;w<A;w++){s[F++]=c[w]}}else{for(;c[w]!==M;){s[F++]=c[w++]}}s.length=F;return s},grep:function(s,c,G){for(var A=[],F=0,w=s.length;F<w;F++){!G!==!c(s[F],F)&&A.push(s[F])}return A},map:function(s,c,J){for(var F=[],G,w=0,A=s.length;w<A;w++){G=c(s[w],w,J);if(G!=null){F[F.length]=G}}return F.concat.apply([],F)},guid:1,proxy:function(s,c,w){if(arguments.length===2){if(typeof c==="string"){w=s;s=w[c];c=M}else{if(c&&!ai.isFunction(c)){w=c;c=M}}}if(!c&&s){c=function(){return s.apply(w||this,arguments)}}if(s){c.guid=s.guid=s.guid||c.guid||ai.guid++}return c},uaMatch:function(c){c=c.toLowerCase();c=/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||!/compatible/.test(c)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(c)||[];return{browser:c[1]||"",version:c[2]||"0"}},browser:{}});ay=ai.uaMatch(ay);if(ay.browser){ai.browser[ay.browser]=true;ai.browser.version=ay.version}if(ai.browser.webkit){ai.browser.safari=true}if(a7){ai.inArray=function(s,c){return a7.call(c,s)}}au=ai(S);if(S.addEventListener){aC=function(){S.removeEventListener("DOMContentLoaded",aC,false);ai.ready()}}else{if(S.attachEvent){aC=function(){if(S.readyState==="complete"){S.detachEvent("onreadystatechange",aC);ai.ready()}}}}(function(){ai.support={};var L=S.documentElement,K=S.createElement("script"),J=S.createElement("div"),F="script"+aG();J.style.display="none";J.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var G=J.getElementsByTagName("*"),w=J.getElementsByTagName("a")[0];if(!(!G||!G.length||!w)){ai.support={leadingWhitespace:J.firstChild.nodeType===3,tbody:!J.getElementsByTagName("tbody").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(w.getAttribute("style")),hrefNormalized:w.getAttribute("href")==="/a",opacity:/^0.55$/.test(w.style.opacity),cssFloat:!!w.style.cssFloat,checkOn:J.getElementsByTagName("input")[0].value==="on",optSelected:S.createElement("select").appendChild(S.createElement("option")).selected,parentNode:J.removeChild(J.appendChild(S.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};K.type="text/javascript";try{K.appendChild(S.createTextNode("window."+F+"=1;"))}catch(A){}L.insertBefore(K,L.firstChild);if(aP[F]){ai.support.scriptEval=true;delete aP[F]}try{delete K.test}catch(c){ai.support.deleteExpando=false}L.removeChild(K);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function s(){ai.support.noCloneEvent=false;J.detachEvent("onclick",s)});J.cloneNode(true).fireEvent("onclick")}J=S.createElement("div");J.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";L=S.createDocumentFragment();L.appendChild(J.firstChild);ai.support.checkClone=L.cloneNode(true).cloneNode(true).lastChild.checked;ai(function(){var N=S.createElement("div");N.style.width=N.style.paddingLeft="1px";S.body.appendChild(N);ai.boxModel=ai.support.boxModel=N.offsetWidth===2;S.body.removeChild(N).style.display="none"});L=function(N){var P=S.createElement("div");N="on"+N;var O=N in P;if(!O){P.setAttribute(N,"return;");O=typeof P[N]==="function"}return O};ai.support.submitBubbles=L("submit");ai.support.changeBubbles=L("change");L=K=J=G=w=null}})();ai.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var aI="jQuery"+aG(),e=0,aT={};ai.extend({cache:{},expando:aI,noData:{embed:true,object:true,applet:true},data:function(s,c,F){if(!(s.nodeName&&ai.noData[s.nodeName.toLowerCase()])){s=s==aP?aT:s;var w=s[aI],A=ai.cache;if(!w&&typeof c==="string"&&F===M){return null}w||(w=++e);if(typeof c==="object"){s[aI]=w;A[w]=ai.extend(true,{},c)}else{if(!A[w]){s[aI]=w;A[w]={}}}s=A[w];if(F!==M){s[c]=F}return typeof c==="string"?s[c]:s}},removeData:function(s,c){if(!(s.nodeName&&ai.noData[s.nodeName.toLowerCase()])){s=s==aP?aT:s;var F=s[aI],w=ai.cache,A=w[F];if(c){if(A){delete A[c];ai.isEmptyObject(A)&&ai.removeData(s)}}else{if(ai.support.deleteExpando){delete s[ai.expando]}else{s.removeAttribute&&s.removeAttribute(ai.expando)}delete w[F]}}}});ai.fn.extend({data:function(s,c){if(typeof s==="undefined"&&this.length){return ai.data(this[0])}else{if(typeof s==="object"){return this.each(function(){ai.data(this,s)})}}var A=s.split(".");A[1]=A[1]?"."+A[1]:"";if(c===M){var w=this.triggerHandler("getData"+A[1]+"!",[A[0]]);if(w===M&&this.length){w=ai.data(this[0],s)}return w===M&&A[1]?this.data(A[0]):w}else{return this.trigger("setData"+A[1]+"!",[A[0],c]).each(function(){ai.data(this,s,c)})}},removeData:function(c){return this.each(function(){ai.removeData(this,c)})}});ai.extend({queue:function(s,c,A){if(s){c=(c||"fx")+"queue";var w=ai.data(s,c);if(!A){return w||[]}if(!w||ai.isArray(A)){w=ai.data(s,c,ai.makeArray(A))}else{w.push(A)}return w}},dequeue:function(s,c){c=c||"fx";var A=ai.queue(s,c),w=A.shift();if(w==="inprogress"){w=A.shift()}if(w){c==="fx"&&A.unshift("inprogress");w.call(s,function(){ai.dequeue(s,c)})}}});ai.fn.extend({queue:function(s,c){if(typeof s!=="string"){c=s;s="fx"}if(c===M){return ai.queue(this[0],s)}return this.each(function(){var w=ai.queue(this,s,c);s==="fx"&&w[0]!=="inprogress"&&ai.dequeue(this,s)})},dequeue:function(c){return this.each(function(){ai.dequeue(this,c)})},delay:function(s,c){s=ai.fx?ai.fx.speeds[s]||s:s;c=c||"fx";return this.queue(c,function(){var w=this;setTimeout(function(){ai.dequeue(w,c)},s)})},clearQueue:function(c){return this.queue(c||"fx",[])}});var bf=/[\n\t]/g,ac=/\s+/,a9=/\r/g,aN=/href|src|style/,aV=/(button|input)/i,ax=/(button|input|object|select|textarea)/i,U=/^(a|area)$/i,aZ=/radio|checkbox/;ai.fn.extend({attr:function(s,c){return aq(this,s,c,true,ai.attr)},removeAttr:function(c){return this.each(function(){ai.attr(this,c,"");this.nodeType===1&&this.removeAttribute(c)})},addClass:function(L){if(ai.isFunction(L)){return this.each(function(O){var N=ai(this);N.addClass(L.call(this,O,N.attr("class")))})}if(L&&typeof L==="string"){for(var K=(L||"").split(ac),J=0,F=this.length;J<F;J++){var G=this[J];if(G.nodeType===1){if(G.className){for(var w=" "+G.className+" ",A=G.className,c=0,s=K.length;c<s;c++){if(w.indexOf(" "+K[c]+" ")<0){A+=" "+K[c]}}G.className=ai.trim(A)}else{G.className=L}}}}return this},removeClass:function(s){if(ai.isFunction(s)){return this.each(function(L){var N=ai(this);N.removeClass(s.call(this,L,N.attr("class")))})}if(s&&typeof s==="string"||s===M){for(var c=(s||"").split(ac),K=0,F=this.length;K<F;K++){var G=this[K];if(G.nodeType===1&&G.className){if(s){for(var w=(" "+G.className+" ").replace(bf," "),A=0,J=c.length;A<J;A++){w=w.replace(" "+c[A]+" "," ")}G.className=ai.trim(w)}else{G.className=""}}}}return this},toggleClass:function(s,c){var A=typeof s,w=typeof c==="boolean";if(ai.isFunction(s)){return this.each(function(G){var F=ai(this);F.toggleClass(s.call(this,G,F.attr("class"),c),c)})}return this.each(function(){if(A==="string"){for(var K,G=0,J=ai(this),L=c,F=s.split(ac);K=F[G++];){L=w?L:!J.hasClass(K);J[L?"addClass":"removeClass"](K)}}else{if(A==="undefined"||A==="boolean"){this.className&&ai.data(this,"__className__",this.className);this.className=this.className||s===false?"":ai.data(this,"__className__")||""}}})},hasClass:function(s){s=" "+s+" ";for(var c=0,w=this.length;c<w;c++){if((" "+this[c].className+" ").replace(bf," ").indexOf(s)>-1){return true}}return false},val:function(s){if(s===M){var c=this[0];if(c){if(ai.nodeName(c,"option")){return(c.attributes.value||{}).specified?c.value:c.text}if(ai.nodeName(c,"select")){var K=c.selectedIndex,F=[],G=c.options;c=c.type==="select-one";if(K<0){return null}var w=c?K:0;for(K=c?K+1:G.length;w<K;w++){var A=G[w];if(A.selected){s=ai(A).val();if(c){return s}F.push(s)}}return F}if(aZ.test(c.type)&&!ai.support.checkOn){return c.getAttribute("value")===null?"on":c.value}return(c.value||"").replace(a9,"")}return M}var J=ai.isFunction(s);return this.each(function(L){var P=ai(this),O=s;if(this.nodeType===1){if(J){O=s.call(this,L,P.val())}if(typeof O==="number"){O+=""}if(ai.isArray(O)&&aZ.test(this.type)){this.checked=ai.inArray(P.val(),O)>=0}else{if(ai.nodeName(this,"select")){var N=ai.makeArray(O);ai("option",this).each(function(){this.selected=ai.inArray(ai(this).val(),N)>=0});if(!N.length){this.selectedIndex=-1}}else{this.value=O}}}})}});ai.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(s,c,G,A){if(!s||s.nodeType===3||s.nodeType===8){return M}if(A&&c in ai.attrFn){return ai(s)[c](G)}A=s.nodeType!==1||!ai.isXMLDoc(s);var F=G!==M;c=A&&ai.props[c]||c;if(s.nodeType===1){var w=aN.test(c);if(c in s&&A&&!w){if(F){c==="type"&&aV.test(s.nodeName)&&s.parentNode&&ai.error("type property can't be changed");s[c]=G}if(ai.nodeName(s,"form")&&s.getAttributeNode(c)){return s.getAttributeNode(c).nodeValue}if(c==="tabIndex"){return(c=s.getAttributeNode("tabIndex"))&&c.specified?c.value:ax.test(s.nodeName)||U.test(s.nodeName)&&s.href?0:M}return s[c]}if(!ai.support.style&&A&&c==="style"){if(F){s.style.cssText=""+G}return s.style.cssText}F&&s.setAttribute(c,""+G);s=!ai.support.hrefNormalized&&A&&w?s.getAttribute(c,2):s.getAttribute(c);return s===null?M:s}return ai.style(s,c,G)}});var aA=/\.(.*)$/,r=function(c){return c.replace(/[^\w\s\.\|`]/g,function(s){return"\\"+s})};ai.event={add:function(P,O,L,J){if(!(P.nodeType===3||P.nodeType===8)){if(P.setInterval&&P!==aP&&!P.frameElement){P=aP}var K,F;if(L.handler){K=L;L=K.handler}if(!L.guid){L.guid=ai.guid++}if(F=ai.data(P)){var G=F.events=F.events||{},s=F.handle;if(!s){F.handle=s=function(){return typeof ai!=="undefined"&&!ai.event.triggered?ai.event.handle.apply(s.elem,arguments):M}}s.elem=P;O=O.split(" ");for(var A,w=0,c;A=O[w++];){F=K?ai.extend({},K):{handler:L,data:J};if(A.indexOf(".")>-1){c=A.split(".");A=c.shift();F.namespace=c.slice(0).sort().join(".")}else{c=[];F.namespace=""}F.type=A;F.guid=L.guid;var Q=G[A],N=ai.event.special[A]||{};if(!Q){Q=G[A]=[];if(!N.setup||N.setup.call(P,J,c,s)===false){if(P.addEventListener){P.addEventListener(A,s,false)}else{P.attachEvent&&P.attachEvent("on"+A,s)}}}if(N.add){N.add.call(P,F);if(!F.handler.guid){F.handler.guid=L.guid}}Q.push(F);ai.event.global[A]=true}P=null}}},global:{},remove:function(R,Q,O,L){if(!(R.nodeType===3||R.nodeType===8)){var N,J=0,K,A,G,F,c,T,P=ai.data(R),s=P&&P.events;if(P&&s){if(Q&&Q.type){O=Q.handler;Q=Q.type}if(!Q||typeof Q==="string"&&Q.charAt(0)==="."){Q=Q||"";for(N in s){ai.event.remove(R,N+Q)}}else{for(Q=Q.split(" ");N=Q[J++];){F=N;K=N.indexOf(".")<0;A=[];if(!K){A=N.split(".");N=A.shift();G=new RegExp("(^|\\.)"+ai.map(A.slice(0).sort(),r).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(c=s[N]){if(O){F=ai.event.special[N]||{};for(w=L||0;w<c.length;w++){T=c[w];if(O.guid===T.guid){if(K||G.test(T.namespace)){L==null&&c.splice(w--,1);F.remove&&F.remove.call(R,T)}if(L!=null){break}}}if(c.length===0||L!=null&&c.length===1){if(!F.teardown||F.teardown.call(R,A)===false){aH(R,N,P.handle)}delete s[N]}}else{for(var w=0;w<c.length;w++){T=c[w];if(K||G.test(T.namespace)){ai.event.remove(R,F,T.handler,w);c.splice(w--,1)}}}}}if(ai.isEmptyObject(s)){if(Q=P.handle){Q.elem=null}delete P.events;delete P.handle;ai.isEmptyObject(P)&&ai.removeData(R)}}}}},trigger:function(N,L,K,G){var J=N.type||N;if(!G){N=typeof N==="object"?N[aI]?N:ai.extend(ai.Event(J),N):ai.Event(J);if(J.indexOf("!")>=0){N.type=J=J.slice(0,-1);N.exclusive=true}if(!K){N.stopPropagation();ai.event.global[J]&&ai.each(ai.cache,function(){this.events&&this.events[J]&&ai.event.trigger(N,L,this.handle.elem)})}if(!K||K.nodeType===3||K.nodeType===8){return M}N.result=M;N.target=K;L=ai.makeArray(L);L.unshift(N)}N.currentTarget=K;(G=ai.data(K,"handle"))&&G.apply(K,L);G=K.parentNode||K.ownerDocument;try{if(!(K&&K.nodeName&&ai.noData[K.nodeName.toLowerCase()])){if(K["on"+J]&&K["on"+J].apply(K,L)===false){N.result=false}}}catch(A){}if(!N.isPropagationStopped()&&G){ai.event.trigger(N,L,G,true)}else{if(!N.isDefaultPrevented()){G=N.target;var F,c=ai.nodeName(G,"a")&&J==="click",w=ai.event.special[J]||{};if((!w._default||w._default.call(K,N)===false)&&!c&&!(G&&G.nodeName&&ai.noData[G.nodeName.toLowerCase()])){try{if(G[J]){if(F=G["on"+J]){G["on"+J]=null}ai.event.triggered=true;G[J]()}}catch(s){}if(F){G["on"+J]=F}ai.event.triggered=false}}}},handle:function(s){var c,J,F,G;s=arguments[0]=ai.event.fix(s||aP.event);s.currentTarget=this;c=s.type.indexOf(".")<0&&!s.exclusive;if(!c){J=s.type.split(".");s.type=J.shift();F=new RegExp("(^|\\.)"+J.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}G=ai.data(this,"events");J=G[s.type];if(G&&J){J=J.slice(0);G=0;for(var w=J.length;G<w;G++){var A=J[G];if(c||F.test(A.namespace)){s.handler=A.handler;s.data=A.data;s.handleObj=A;A=A.handler.apply(this,arguments);if(A!==M){s.result=A;if(A===false){s.preventDefault();s.stopPropagation()}}if(s.isImmediatePropagationStopped()){break}}}}return s.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(s){if(s[aI]){return s}var c=s;s=ai.Event(c);for(var A=this.props.length,w;A;){w=this.props[--A];s[w]=c[w]}if(!s.target){s.target=s.srcElement||S}if(s.target.nodeType===3){s.target=s.target.parentNode}if(!s.relatedTarget&&s.fromElement){s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement}if(s.pageX==null&&s.clientX!=null){c=S.documentElement;A=S.body;s.pageX=s.clientX+(c&&c.scrollLeft||A&&A.scrollLeft||0)-(c&&c.clientLeft||A&&A.clientLeft||0);s.pageY=s.clientY+(c&&c.scrollTop||A&&A.scrollTop||0)-(c&&c.clientTop||A&&A.clientTop||0)}if(!s.which&&(s.charCode||s.charCode===0?s.charCode:s.keyCode)){s.which=s.charCode||s.keyCode}if(!s.metaKey&&s.ctrlKey){s.metaKey=s.ctrlKey}if(!s.which&&s.button!==M){s.which=s.button&1?1:s.button&2?3:s.button&4?2:0}return s},guid:100000000,proxy:ai.proxy,special:{ready:{setup:ai.bindReady,teardown:ai.noop},live:{add:function(c){ai.event.add(this,c.origType,ai.extend({},c,{handler:ah}))},remove:function(s){var c=true,w=s.origType.replace(aA,"");ai.each(ai.data(this,"events").live||[],function(){if(w===this.origType.replace(aA,"")){return c=false}});c&&ai.event.remove(this,s.origType,ah)}},beforeunload:{setup:function(s,c,w){if(this.setInterval){this.onbeforeunload=w}return false},teardown:function(s,c){if(this.onbeforeunload===c){this.onbeforeunload=null}}}}};var aH=S.removeEventListener?function(s,c,w){s.removeEventListener(c,w,false)}:function(s,c,w){s.detachEvent("on"+c,w)};ai.Event=function(c){if(!this.preventDefault){return new ai.Event(c)}if(c&&c.type){this.originalEvent=c;this.type=c.type}else{this.type=c}this.timeStamp=aG();this[aI]=true};ai.Event.prototype={preventDefault:function(){this.isDefaultPrevented=an;var c=this.originalEvent;if(c){c.preventDefault&&c.preventDefault();c.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=an;var c=this.originalEvent;if(c){c.stopPropagation&&c.stopPropagation();c.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=an;this.stopPropagation()},isDefaultPrevented:ap,isPropagationStopped:ap,isImmediatePropagationStopped:ap};var af=function(s){var c=s.relatedTarget;try{for(;c&&c!==this;){c=c.parentNode}if(c!==this){s.type=s.data;ai.event.handle.apply(this,arguments)}}catch(w){}},y=function(c){c.type=c.data;ai.event.handle.apply(this,arguments)};ai.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(s,c){ai.event.special[s]={setup:function(w){ai.event.add(this,c,w&&w.selector?y:af,s)},teardown:function(w){ai.event.remove(this,c,w&&w.selector?y:af)}}});if(!ai.support.submitBubbles){ai.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){ai.event.add(this,"click.specialSubmit",function(s){var c=s.target,w=c.type;if((w==="submit"||w==="image")&&ai(c).closest("form").length){return aL("submit",this,arguments)}});ai.event.add(this,"keypress.specialSubmit",function(s){var c=s.target,w=c.type;if((w==="text"||w==="password")&&ai(c).closest("form").length&&s.keyCode===13){return aL("submit",this,arguments)}})}else{return false}},teardown:function(){ai.event.remove(this,".specialSubmit")}}}if(!ai.support.changeBubbles){var u=/textarea|input|select/i,g,j=function(s){var c=s.type,w=s.value;if(c==="radio"||c==="checkbox"){w=s.checked}else{if(c==="select-multiple"){w=s.selectedIndex>-1?ai.map(s.options,function(A){return A.selected}).join("-"):""}else{if(s.nodeName.toLowerCase()==="select"){w=s.selectedIndex}}}return w},be=function(s,c){var F=s.target,w,A;if(!(!u.test(F.nodeName)||F.readOnly)){w=ai.data(F,"_change_data");A=j(F);if(s.type!=="focusout"||F.type!=="radio"){ai.data(F,"_change_data",A)}if(!(w===M||A===w)){if(w!=null||A){s.type="change";return ai.event.trigger(s,c,F)}}}};ai.event.special.change={filters:{focusout:be,click:function(s){var c=s.target,w=c.type;if(w==="radio"||w==="checkbox"||c.nodeName.toLowerCase()==="select"){return be.call(this,s)}},keydown:function(s){var c=s.target,w=c.type;if(s.keyCode===13&&c.nodeName.toLowerCase()!=="textarea"||s.keyCode===32&&(w==="checkbox"||w==="radio")||w==="select-multiple"){return be.call(this,s)}},beforeactivate:function(c){c=c.target;ai.data(c,"_change_data",j(c))}},setup:function(){if(this.type==="file"){return false}for(var c in g){ai.event.add(this,c+".specialChange",g[c])}return u.test(this.nodeName)},teardown:function(){ai.event.remove(this,".specialChange");return u.test(this.nodeName)}};g=ai.event.special.change.filters}S.addEventListener&&ai.each({focus:"focusin",blur:"focusout"},function(s,c){function w(A){A=ai.event.fix(A);A.type=c;return ai.event.handle.call(this,A)}ai.event.special[c]={setup:function(){this.addEventListener(s,w,true)},teardown:function(){this.removeEventListener(s,w,true)}}});ai.each(["bind","one"],function(s,c){ai.fn[c]=function(K,F,G){if(typeof K==="object"){for(var w in K){this[c](w,F,K[w],G)}return this}if(ai.isFunction(F)){G=F;F=M}var A=c==="one"?ai.proxy(G,function(L){ai(this).unbind(L,A);return G.apply(this,arguments)}):G;if(K==="unload"&&c!=="one"){this.one(K,F,G)}else{w=0;for(var J=this.length;w<J;w++){ai.event.add(this[w],K,A,F)}}return this}});ai.fn.extend({unbind:function(s,c){if(typeof s==="object"&&!s.preventDefault){for(var A in s){this.unbind(A,s[A])}}else{A=0;for(var w=this.length;A<w;A++){ai.event.remove(this[A],s,c)}}return this},delegate:function(s,c,A,w){return this.live(c,A,w,s)},undelegate:function(s,c,w){return arguments.length===0?this.unbind("live"):this.die(c,null,w,s)},trigger:function(s,c){return this.each(function(){ai.event.trigger(s,c,this)})},triggerHandler:function(s,c){if(this[0]){s=ai.Event(s);s.preventDefault();s.stopPropagation();ai.event.trigger(s,c,this[0]);return s.result}},toggle:function(s){for(var c=arguments,w=1;w<c.length;){ai.proxy(s,c[w++])}return this.click(ai.proxy(s,function(A){var F=(ai.data(this,"lastToggle"+s.guid)||0)%w;ai.data(this,"lastToggle"+s.guid,F+1);A.preventDefault();return c[F].apply(this,arguments)||false}))},hover:function(s,c){return this.mouseenter(s).mouseleave(c||s)}});var bi={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};ai.each(["live","die"],function(s,c){ai.fn[c]=function(O,L,N,J){var K,A=0,G,F,w=J||this.selector,P=J?this:ai(this.context);if(ai.isFunction(L)){N=L;L=M}for(O=(O||"").split(" ");(K=O[A++])!=null;){J=aA.exec(K);G="";if(J){G=J[0];K=K.replace(aA,"")}if(K==="hover"){O.push("mouseenter"+G,"mouseleave"+G)}else{F=K;if(K==="focus"||K==="blur"){O.push(bi[K]+G);K+=G}else{K=(bi[K]||K)+G}c==="live"?P.each(function(){ai.event.add(this,B(K,w),{data:L,selector:w,handler:N,origType:K,origHandler:N,preType:F})}):P.unbind(B(K,w),N)}}return this}});ai.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".split(" "),function(s,c){ai.fn[c]=function(w){return w?this.bind(c,w):this.trigger(c)};if(ai.attrFn){ai.attrFn[c]=true}});aP.attachEvent&&!aP.addEventListener&&aP.attachEvent("onunload",function(){for(var s in ai.cache){if(ai.cache[s].handle){try{ai.event.remove(ai.cache[s].handle.elem)}catch(c){}}}});(function(){function W(ab){for(var aa="",Z,Y=0;ab[Y];Y++){Z=ab[Y];if(Z.nodeType===3||Z.nodeType===4){aa+=Z.nodeValue}else{if(Z.nodeType!==8){aa+=W(Z.childNodes)}}}return aa}function V(bb,ba,ab,aa,Y,Z){Y=0;for(var bn=aa.length;Y<bn;Y++){var bo=aa[Y];if(bo){bo=bo[bb];for(var bm=false;bo;){if(bo.sizcache===ab){bm=aa[bo.sizset];break}if(bo.nodeType===1&&!Z){bo.sizcache=ab;bo.sizset=Y}if(bo.nodeName.toLowerCase()===ba){bm=bo;break}bo=bo[bb]}aa[Y]=bm}}}function T(bb,ba,ab,aa,Y,Z){Y=0;for(var bn=aa.length;Y<bn;Y++){var bo=aa[Y];if(bo){bo=bo[bb];for(var bm=false;bo;){if(bo.sizcache===ab){bm=aa[bo.sizset];break}if(bo.nodeType===1){if(!Z){bo.sizcache=ab;bo.sizset=Y}if(typeof ba!=="string"){if(bo===ba){bm=true;break}}else{if(N.filter(ba,[bo]).length>0){bm=bo;break}}}bo=bo[bb]}aa[Y]=bm}}}var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,R=0,O=Object.prototype.toString,P=false,K=true;[0,0].sort(function(){K=false;return 0});var N=function(bn,bm,ba,ab){ba=ba||[];var Z=bm=bm||S;if(bm.nodeType!==1&&bm.nodeType!==9){return[]}if(!bn||typeof bn!=="string"){return ba}for(var aa=[],bs,bt,bp,bb,br=true,bo=s(bm),bq=bn;(Q.exec(""),bs=Q.exec(bq))!==null;){bq=bs[3];aa.push(bs[1]);if(bs[2]){bb=bs[3];break}}if(aa.length>1&&G.exec(bn)){if(aa.length===2&&L.relative[aa[0]]){bt=X(aa[0]+aa[1],bm)}else{for(bt=L.relative[aa[0]]?[bm]:N(aa.shift(),bm);aa.length;){bn=aa.shift();if(L.relative[bn]){bn+=aa.shift()}bt=X(bn,bt)}}}else{if(!ab&&aa.length>1&&bm.nodeType===9&&!bo&&L.match.ID.test(aa[0])&&!L.match.ID.test(aa[aa.length-1])){bs=N.find(aa.shift(),bm,bo);bm=bs.expr?N.filter(bs.expr,bs.set)[0]:bs.set[0]}if(bm){bs=ab?{expr:aa.pop(),set:c(ab)}:N.find(aa.pop(),aa.length===1&&(aa[0]==="~"||aa[0]==="+")&&bm.parentNode?bm.parentNode:bm,bo);bt=bs.expr?N.filter(bs.expr,bs.set):bs.set;if(aa.length>0){bp=c(bt)}else{br=false}for(;aa.length;){var Y=aa.pop();bs=Y;if(L.relative[Y]){bs=aa.pop()}else{Y=""}if(bs==null){bs=bm}L.relative[Y](bp,bs,bo)}}else{bp=[]}}bp||(bp=bt);bp||N.error(Y||bn);if(O.call(bp)==="[object Array]"){if(br){if(bm&&bm.nodeType===1){for(bn=0;bp[bn]!=null;bn++){if(bp[bn]&&(bp[bn]===true||bp[bn].nodeType===1&&A(bm,bp[bn]))){ba.push(bt[bn])}}}else{for(bn=0;bp[bn]!=null;bn++){bp[bn]&&bp[bn].nodeType===1&&ba.push(bt[bn])}}}else{ba.push.apply(ba,bp)}}else{c(bp,ba)}if(bb){N(bb,Z,ba,ab);N.uniqueSort(ba)}return ba};N.uniqueSort=function(Z){if(J){P=K;Z.sort(J);if(P){for(var Y=1;Y<Z.length;Y++){Z[Y]===Z[Y-1]&&Z.splice(Y--,1)}}}return Z};N.matches=function(Z,Y){return N(Z,null,null,Y)};N.find=function(bb,ba,ab){var aa,Y;if(!bb){return[]}for(var Z=0,bn=L.order.length;Z<bn;Z++){var bo=L.order[Z];if(Y=L.leftMatch[bo].exec(bb)){var bm=Y[1];Y.splice(1,1);if(bm.substr(bm.length-1)!=="\\"){Y[1]=(Y[1]||"").replace(/\\/g,"");aa=L.find[bo](Y,ba,ab);if(aa!=null){bb=bb.replace(L.match[bo],"");break}}}}aa||(aa=ba.getElementsByTagName("*"));return{set:aa,expr:bb}};N.filter=function(bo,bn,bb,ab){for(var Z=bo,aa=[],bu=bn,bv,br,bm=bn&&bn[0]&&s(bn[0]);bo&&bn.length;){for(var bt in L.filter){if((bv=L.leftMatch[bt].exec(bo))!=null&&bv[2]){var bp=L.filter[bt],bs,Y;Y=bv[1];br=false;bv.splice(1,1);if(Y.substr(Y.length-1)!=="\\"){if(bu===aa){aa=[]}if(L.preFilter[bt]){if(bv=L.preFilter[bt](bv,bu,bb,aa,ab,bm)){if(bv===true){continue}}else{br=bs=true}}if(bv){for(var ba=0;(Y=bu[ba])!=null;ba++){if(Y){bs=bp(Y,bv,ba,bu);var bq=ab^!!bs;if(bb&&bs!=null){if(bq){br=true}else{bu[ba]=false}}else{if(bq){aa.push(Y);br=true}}}}}if(bs!==M){bb||(bu=aa);bo=bo.replace(L.match[bt],"");if(!br){return[]}break}}}}if(bo===Z){if(br==null){N.error(bo)}else{break}}Z=bo}return bu};N.error=function(Y){throw"Syntax error, unrecognized expression: "+Y};var L=N.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(Y){return Y.getAttribute("href")}},relative:{"+":function(ab,aa){var Z=typeof aa==="string",Y=Z&&!/\W/.test(aa);Z=Z&&!Y;if(Y){aa=aa.toLowerCase()}Y=0;for(var ba=ab.length,bb;Y<ba;Y++){if(bb=ab[Y]){for(;(bb=bb.previousSibling)&&bb.nodeType!==1;){}ab[Y]=Z||bb&&bb.nodeName.toLowerCase()===aa?bb||false:bb===aa}}Z&&N.filter(aa,ab,true)},">":function(ab,aa){var Z=typeof aa==="string";if(Z&&!/\W/.test(aa)){aa=aa.toLowerCase();for(var Y=0,ba=ab.length;Y<ba;Y++){var bb=ab[Y];if(bb){Z=bb.parentNode;ab[Y]=Z.nodeName.toLowerCase()===aa?Z:false}}}else{Y=0;for(ba=ab.length;Y<ba;Y++){if(bb=ab[Y]){ab[Y]=Z?bb.parentNode:bb.parentNode===aa}}Z&&N.filter(aa,ab,true)}},"":function(ab,aa,Z){var Y=R++,ba=T;if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("parentNode",aa,Y,ab,bb,Z)},"~":function(ab,aa,Z){var Y=R++,ba=T;if(typeof aa==="string"&&!/\W/.test(aa)){var bb=aa=aa.toLowerCase();ba=V}ba("previousSibling",aa,Y,ab,bb,Z)}},find:{ID:function(aa,Z,Y){if(typeof Z.getElementById!=="undefined"&&!Y){return(aa=Z.getElementById(aa[1]))?[aa]:[]}},NAME:function(ab,aa){if(typeof aa.getElementsByName!=="undefined"){var Z=[];aa=aa.getElementsByName(ab[1]);for(var Y=0,ba=aa.length;Y<ba;Y++){aa[Y].getAttribute("name")===ab[1]&&Z.push(aa[Y])}return Z.length===0?null:Z}},TAG:function(Z,Y){return Y.getElementsByTagName(Z[1])}},preFilter:{CLASS:function(ba,ab,Z,Y,bb,bm){ba=" "+ba[1].replace(/\\/g,"")+" ";if(bm){return ba}bm=0;for(var aa;(aa=ab[bm])!=null;bm++){if(aa){if(bb^(aa.className&&(" "+aa.className+" ").replace(/[\t\n]/g," ").indexOf(ba)>=0)){Z||Y.push(aa)}else{if(Z){ab[bm]=false}}}}return false},ID:function(Y){return Y[1].replace(/\\/g,"")},TAG:function(Y){return Y[1].toLowerCase()},CHILD:function(Z){if(Z[1]==="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Z[2]==="even"&&"2n"||Z[2]==="odd"&&"2n+1"||!/\D/.test(Z[2])&&"0n+"+Z[2]||Z[2]);Z[2]=Y[1]+(Y[2]||1)-0;Z[3]=Y[3]-0}Z[0]=R++;return Z},ATTR:function(ab,aa,Z,Y,ba,bb){aa=ab[1].replace(/\\/g,"");if(!bb&&L.attrMap[aa]){ab[1]=L.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,aa,Z,Y,ba){if(ab[1]==="not"){if((Q.exec(ab[3])||"").length>1||/^\w/.test(ab[3])){ab[3]=N(ab[3],null,null,aa)}else{ab=N.filter(ab[3],aa,Z,true^ba);Z||Y.push.apply(Y,ab);return false}}else{if(L.match.POS.test(ab[0])||L.match.CHILD.test(ab[0])){return true}}return ab},POS:function(Y){Y.unshift(true);return Y}},filters:{enabled:function(Y){return Y.disabled===false&&Y.type!=="hidden"},disabled:function(Y){return Y.disabled===true},checked:function(Y){return Y.checked===true},selected:function(Y){return Y.selected===true},parent:function(Y){return !!Y.firstChild},empty:function(Y){return !Y.firstChild},has:function(aa,Z,Y){return !!N(Y[3],aa).length},header:function(Y){return/h\d/i.test(Y.nodeName)},text:function(Y){return"text"===Y.type},radio:function(Y){return"radio"===Y.type},checkbox:function(Y){return"checkbox"===Y.type},file:function(Y){return"file"===Y.type},password:function(Y){return"password"===Y.type},submit:function(Y){return"submit"===Y.type},image:function(Y){return"image"===Y.type},reset:function(Y){return"reset"===Y.type},button:function(Y){return"button"===Y.type||Y.nodeName.toLowerCase()==="button"},input:function(Y){return/input|select|textarea|button/i.test(Y.nodeName)}},setFilters:{first:function(Z,Y){return Y===0},last:function(ab,aa,Z,Y){return aa===Y.length-1},even:function(Z,Y){return Y%2===0},odd:function(Z,Y){return Y%2===1},lt:function(aa,Z,Y){return Z<Y[3]-0},gt:function(aa,Z,Y){return Z>Y[3]-0},nth:function(aa,Z,Y){return Y[3]-0===Z},eq:function(aa,Z,Y){return Y[3]-0===Z}},filter:{PSEUDO:function(ab,aa,Z,Y){var ba=aa[1],bb=L.filters[ba];if(bb){return bb(ab,Z,aa,Y)}else{if(ba==="contains"){return(ab.textContent||ab.innerText||W([ab])||"").indexOf(aa[3])>=0}else{if(ba==="not"){aa=aa[3];Z=0;for(Y=aa.length;Z<Y;Z++){if(aa[Z]===ab){return false}}return true}else{N.error("Syntax error, unrecognized expression: "+ba)}}}},CHILD:function(ba,ab){var Z=ab[1],Y=ba;switch(Z){case"only":case"first":for(;Y=Y.previousSibling;){if(Y.nodeType===1){return false}}if(Z==="first"){return true}Y=ba;case"last":for(;Y=Y.nextSibling;){if(Y.nodeType===1){return false}}return true;case"nth":Z=ab[2];var bb=ab[3];if(Z===1&&bb===0){return true}ab=ab[0];var bm=ba.parentNode;if(bm&&(bm.sizcache!==ab||!ba.nodeIndex)){var aa=0;for(Y=bm.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++aa}}bm.sizcache=ab}ba=ba.nodeIndex-bb;return Z===0?ba===0:ba%Z===0&&ba/Z>=0}},ID:function(Z,Y){return Z.nodeType===1&&Z.getAttribute("id")===Y},TAG:function(Z,Y){return Y==="*"&&Z.nodeType===1||Z.nodeName.toLowerCase()===Y},CLASS:function(Z,Y){return(" "+(Z.className||Z.getAttribute("class"))+" ").indexOf(Y)>-1},ATTR:function(ab,aa){var Z=aa[1];ab=L.attrHandle[Z]?L.attrHandle[Z](ab):ab[Z]!=null?ab[Z]:ab.getAttribute(Z);Z=ab+"";var Y=aa[2];aa=aa[4];return ab==null?Y==="!=":Y==="="?Z===aa:Y==="*="?Z.indexOf(aa)>=0:Y==="~="?(" "+Z+" ").indexOf(aa)>=0:!aa?Z&&ab!==false:Y==="!="?Z!==aa:Y==="^="?Z.indexOf(aa)===0:Y==="$="?Z.substr(Z.length-aa.length)===aa:Y==="|="?Z===aa||Z.substr(0,aa.length+1)===aa+"-":false},POS:function(ab,aa,Z,Y){var ba=L.setFilters[aa[2]];if(ba){return ba(ab,Z,aa,Y)}}}},G=L.match.POS;for(var w in L.match){L.match[w]=new RegExp(L.match[w].source+/(?![^\[]*\])(?![^\(]*\))/.source);L.leftMatch[w]=new RegExp(/(^(?:.|\r|\n)*?)/.source+L.match[w].source.replace(/\\(\d+)/g,function(Z,Y){return"\\"+(Y-0+1)}))}var c=function(Z,Y){Z=Array.prototype.slice.call(Z,0);if(Y){Y.push.apply(Y,Z);return Y}return Z};try{Array.prototype.slice.call(S.documentElement.childNodes,0)}catch(F){c=function(ab,aa){aa=aa||[];if(O.call(ab)==="[object Array]"){Array.prototype.push.apply(aa,ab)}else{if(typeof ab.length==="number"){for(var Z=0,Y=ab.length;Z<Y;Z++){aa.push(ab[Z])}}else{for(Z=0;ab[Z];Z++){aa.push(ab[Z])}}}return aa}}var J;if(S.documentElement.compareDocumentPosition){J=function(Z,Y){if(!Z.compareDocumentPosition||!Y.compareDocumentPosition){if(Z==Y){P=true}return Z.compareDocumentPosition?-1:1}Z=Z.compareDocumentPosition(Y)&4?-1:Z===Y?0:1;if(Z===0){P=true}return Z}}else{if("sourceIndex" in S.documentElement){J=function(Z,Y){if(!Z.sourceIndex||!Y.sourceIndex){if(Z==Y){P=true}return Z.sourceIndex?-1:1}Z=Z.sourceIndex-Y.sourceIndex;if(Z===0){P=true}return Z}}else{if(S.createRange){J=function(ab,aa){if(!ab.ownerDocument||!aa.ownerDocument){if(ab==aa){P=true}return ab.ownerDocument?-1:1}var Z=ab.ownerDocument.createRange(),Y=aa.ownerDocument.createRange();Z.setStart(ab,0);Z.setEnd(ab,0);Y.setStart(aa,0);Y.setEnd(aa,0);ab=Z.compareBoundaryPoints(Range.START_TO_END,Y);if(ab===0){P=true}return ab}}}}(function(){var aa=S.createElement("div"),Z="script"+(new Date).getTime();aa.innerHTML="<a name='"+Z+"'/>";var Y=S.documentElement;Y.insertBefore(aa,Y.firstChild);if(S.getElementById(Z)){L.find.ID=function(ab,ba,bb){if(typeof ba.getElementById!=="undefined"&&!bb){return(ba=ba.getElementById(ab[1]))?ba.id===ab[1]||typeof ba.getAttributeNode!=="undefined"&&ba.getAttributeNode("id").nodeValue===ab[1]?[ba]:M:[]}};L.filter.ID=function(ab,ba){var bb=typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id");return ab.nodeType===1&&bb&&bb.nodeValue===ba}}Y.removeChild(aa);Y=aa=null})();(function(){var Y=S.createElement("div");Y.appendChild(S.createComment(""));if(Y.getElementsByTagName("*").length>0){L.find.TAG=function(ab,aa){aa=aa.getElementsByTagName(ab[1]);if(ab[1]==="*"){ab=[];for(var Z=0;aa[Z];Z++){aa[Z].nodeType===1&&ab.push(aa[Z])}aa=ab}return aa}}Y.innerHTML="<a href='#'></a>";if(Y.firstChild&&typeof Y.firstChild.getAttribute!=="undefined"&&Y.firstChild.getAttribute("href")!=="#"){L.attrHandle.href=function(Z){return Z.getAttribute("href",2)}}Y=null})();S.querySelectorAll&&function(){var aa=N,Z=S.createElement("div");Z.innerHTML="<p class='TEST'></p>";if(!(Z.querySelectorAll&&Z.querySelectorAll(".TEST").length===0)){N=function(ab,bm,bn,ba){bm=bm||S;if(!ba&&bm.nodeType===9&&!s(bm)){try{return c(bm.querySelectorAll(ab),bn)}catch(bb){}}return aa(ab,bm,bn,ba)};for(var Y in aa){N[Y]=aa[Y]}Z=null}}();(function(){var Y=S.createElement("div");Y.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!Y.getElementsByClassName||Y.getElementsByClassName("e").length===0)){Y.lastChild.className="e";if(Y.getElementsByClassName("e").length!==1){L.order.splice(1,0,"CLASS");L.find.CLASS=function(ab,aa,Z){if(typeof aa.getElementsByClassName!=="undefined"&&!Z){return aa.getElementsByClassName(ab[1])}};Y=null}}})();var A=S.compareDocumentPosition?function(Z,Y){return !!(Z.compareDocumentPosition(Y)&16)}:function(Z,Y){return Z!==Y&&(Z.contains?Z.contains(Y):true)},s=function(Y){return(Y=(Y?Y.ownerDocument||Y:0).documentElement)?Y.nodeName!=="HTML":false},X=function(ab,aa){var Z=[],Y="",ba;for(aa=aa.nodeType?[aa]:aa;ba=L.match.PSEUDO.exec(ab);){Y+=ba[0];ab=ab.replace(L.match.PSEUDO,"")}ab=L.relative[ab]?ab+"*":ab;ba=0;for(var bb=aa.length;ba<bb;ba++){N(ab,aa[ba],Z)}return N.filter(Y,Z)};ai.find=N;ai.expr=N.selectors;ai.expr[":"]=ai.expr.filters;ai.unique=N.uniqueSort;ai.text=W;ai.isXMLDoc=s;ai.contains=A})();var f=/Until$/,bc=/^(?:parents|prevUntil|prevAll)/,aX=/,/;av=Array.prototype.slice;var aM=function(s,c,A){if(ai.isFunction(c)){return ai.grep(s,function(G,F){return !!c.call(G,F,G)===A})}else{if(c.nodeType){return ai.grep(s,function(F){return F===c===A})}else{if(typeof c==="string"){var w=ai.grep(s,function(F){return F.nodeType===1});if(aU.test(c)){return ai.filter(c,w,!A)}else{c=ai.filter(c,w)}}}}return ai.grep(s,function(F){return ai.inArray(F,c)>=0===A})};ai.fn.extend({find:function(s){for(var c=this.pushStack("","find",s),J=0,F=0,G=this.length;F<G;F++){J=c.length;ai.find(s,this[F],c);if(F>0){for(var w=J;w<c.length;w++){for(var A=0;A<J;A++){if(c[A]===c[w]){c.splice(w--,1);break}}}}}return c},has:function(s){var c=ai(s);return this.filter(function(){for(var A=0,w=c.length;A<w;A++){if(ai.contains(this,c[A])){return true}}})},not:function(c){return this.pushStack(aM(this,c,false),"not",c)},filter:function(c){return this.pushStack(aM(this,c,true),"filter",c)},is:function(c){return !!c&&ai.filter(c,this).length>0},closest:function(L,K){if(ai.isArray(L)){var J=[],F=this[0],G,w={},A;if(F&&L.length){G=0;for(var c=L.length;G<c;G++){A=L[G];w[A]||(w[A]=ai.expr.match.POS.test(A)?ai(A,K||this.context):A)}for(;F&&F.ownerDocument&&F!==K;){for(A in w){G=w[A];if(G.jquery?G.index(F)>-1:ai(F).is(G)){J.push({selector:A,elem:F});delete w[A]}}F=F.parentNode}}return J}var s=ai.expr.match.POS.test(L)?ai(L,K||this.context):null;return this.map(function(O,N){for(;N&&N.ownerDocument&&N!==K;){if(s?s.index(N)>-1:ai(N).is(L)){return N}N=N.parentNode}return null})},index:function(c){if(!c||typeof c==="string"){return ai.inArray(this[0],c?ai(c):this.parent().children())}return ai.inArray(c.jquery?c[0]:c,this)},add:function(s,c){s=typeof s==="string"?ai(s,c||this.context):ai.makeArray(s);c=ai.merge(this.get(),s);return this.pushStack(l(s[0])||l(c[0])?c:ai.unique(c))},andSelf:function(){return this.add(this.prevObject)}});ai.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return ai.dir(c,"parentNode")},parentsUntil:function(s,c,w){return ai.dir(s,"parentNode",w)},next:function(c){return ai.nth(c,2,"nextSibling")},prev:function(c){return ai.nth(c,2,"previousSibling")},nextAll:function(c){return ai.dir(c,"nextSibling")},prevAll:function(c){return ai.dir(c,"previousSibling")},nextUntil:function(s,c,w){return ai.dir(s,"nextSibling",w)},prevUntil:function(s,c,w){return ai.dir(s,"previousSibling",w)},siblings:function(c){return ai.sibling(c.parentNode.firstChild,c)},children:function(c){return ai.sibling(c.firstChild)},contents:function(c){return ai.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:ai.makeArray(c.childNodes)}},function(s,c){ai.fn[s]=function(F,w){var A=ai.map(this,c,F);f.test(s)||(w=F);if(w&&typeof w==="string"){A=ai.filter(w,A)}A=this.length>1?ai.unique(A):A;if((this.length>1||aX.test(w))&&bc.test(s)){A=A.reverse()}return this.pushStack(A,s,av.call(arguments).join(","))}});ai.extend({filter:function(s,c,w){if(w){s=":not("+s+")"}return ai.find.matches(s,c)},dir:function(s,c,A){var w=[];for(s=s[c];s&&s.nodeType!==9&&(A===M||s.nodeType!==1||!ai(s).is(A));){s.nodeType===1&&w.push(s);s=s[c]}return w},nth:function(s,c,A){c=c||1;for(var w=0;s;s=s[A]){if(s.nodeType===1&&++w===c){break}}return s},sibling:function(s,c){for(var w=[];s;s=s.nextSibling){s.nodeType===1&&s!==c&&w.push(s)}return w}});var aj=/ jQuery\d+="(?:\d+|null)"/g,at=/^\s+/,C=/(<([\w:]+)[^>]*?)\/>/g,aE=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,m=/<([\w:]+)/,ad=/<tbody/i,v=/<|&#?\w+;/,aQ=/<script|<object|<embed|<option|<style/i,al=/checked\s*(?:[^=]|=\s*.checked.)/i,bl=function(s,c,w){return aE.test(w)?s:c+"></"+w+">"},aK={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};aK.optgroup=aK.option;aK.tbody=aK.tfoot=aK.colgroup=aK.caption=aK.thead;aK.th=aK.td;if(!ai.support.htmlSerialize){aK._default=[1,"div<div>","</div>"]}ai.fn.extend({text:function(c){if(ai.isFunction(c)){return this.each(function(s){var w=ai(this);w.text(c.call(this,s,w.text()))})}if(typeof c!=="object"&&c!==M){return this.empty().append((this[0]&&this[0].ownerDocument||S).createTextNode(c))}return ai.text(this)},wrapAll:function(s){if(ai.isFunction(s)){return this.each(function(w){ai(this).wrapAll(s.call(this,w))})}if(this[0]){var c=ai(s,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&c.insertBefore(this[0]);c.map(function(){for(var w=this;w.firstChild&&w.firstChild.nodeType===1;){w=w.firstChild}return w}).append(this)}return this},wrapInner:function(c){if(ai.isFunction(c)){return this.each(function(s){ai(this).wrapInner(c.call(this,s))})}return this.each(function(){var s=ai(this),w=s.contents();w.length?w.wrapAll(c):s.append(c)})},wrap:function(c){return this.each(function(){ai(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){ai.nodeName(this,"body")||ai(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this)})}else{if(arguments.length){var c=ai(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(s){this.parentNode.insertBefore(s,this.nextSibling)})}else{if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,ai(arguments[0]).toArray());return c}}},remove:function(s,c){for(var A=0,w;(w=this[A])!=null;A++){if(!s||ai.filter(s,[w]).length){if(!c&&w.nodeType===1){ai.cleanData(w.getElementsByTagName("*"));ai.cleanData([w])}w.parentNode&&w.parentNode.removeChild(w)}}return this},empty:function(){for(var s=0,c;(c=this[s])!=null;s++){for(c.nodeType===1&&ai.cleanData(c.getElementsByTagName("*"));c.firstChild;){c.removeChild(c.firstChild)}}return this},clone:function(s){var c=this.map(function(){if(!ai.support.noCloneEvent&&!ai.isXMLDoc(this)){var A=this.outerHTML,w=this.ownerDocument;if(!A){A=w.createElement("div");A.appendChild(this.cloneNode(true));A=A.innerHTML}return ai.clean([A.replace(aj,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(at,"")],w)[0]}else{return this.cloneNode(true)}});if(s===true){bk(this,c);bk(this.find("*"),c.find("*"))}return c},html:function(s){if(s===M){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(aj,""):null}else{if(typeof s==="string"&&!aQ.test(s)&&(ai.support.leadingWhitespace||!at.test(s))&&!aK[(m.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(C,bl);try{for(var c=0,A=this.length;c<A;c++){if(this[c].nodeType===1){ai.cleanData(this[c].getElementsByTagName("*"));this[c].innerHTML=s}}}catch(w){this.empty().append(s)}}else{ai.isFunction(s)?this.each(function(J){var F=ai(this),G=F.html();F.empty().append(function(){return s.call(this,J,G)})}):this.empty().append(s)}}return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(ai.isFunction(c)){return this.each(function(s){var A=ai(this),w=A.html();A.replaceWith(c.call(this,s,w))})}if(typeof c!=="string"){c=ai(c).detach()}return this.each(function(){var s=this.nextSibling,w=this.parentNode;ai(this).remove();s?ai(s).before(c):ai(w).append(c)})}else{return this.pushStack(ai(ai.isFunction(c)?c():c),"replaceWith",c)}},detach:function(c){return this.remove(c,true)},domManip:function(O,N,L){function J(P){return ai.nodeName(P,"table")?P.getElementsByTagName("tbody")[0]||P.appendChild(P.ownerDocument.createElement("tbody")):P}var K,F,G=O[0],s=[],A;if(!ai.support.checkClone&&arguments.length===3&&typeof G==="string"&&al.test(G)){return this.each(function(){ai(this).domManip(O,N,L,true)})}if(ai.isFunction(G)){return this.each(function(P){var Q=ai(this);O[0]=G.call(this,P,N?Q.html():M);Q.domManip(O,N,L)})}if(this[0]){K=G&&G.parentNode;K=ai.support.parentNode&&K&&K.nodeType===11&&K.childNodes.length===this.length?{fragment:K}:a4(O,this,s);A=K.fragment;if(F=A.childNodes.length===1?(A=A.firstChild):A.firstChild){N=N&&ai.nodeName(F,"tr");for(var w=0,c=this.length;w<c;w++){L.call(N?J(this[w],F):this[w],w>0||K.cacheable||this.length>1?A.cloneNode(true):A)}}s.length&&ai.each(s,H)}return this}});ai.fragments={};ai.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(s,c){ai.fn[s]=function(J){var F=[];J=ai(J);var G=this.length===1&&this[0].parentNode;if(G&&G.nodeType===11&&G.childNodes.length===1&&J.length===1){J[c](this[0]);return this}else{G=0;for(var w=J.length;G<w;G++){var A=(G>0?this.clone(true):this).get();ai.fn[c].apply(ai(J[G]),A);F=F.concat(A)}return this.pushStack(F,s,J.selector)}}});ai.extend({clean:function(O,N,L,J){N=N||S;if(typeof N.createElement==="undefined"){N=N.ownerDocument||N[0]&&N[0].ownerDocument||S}for(var K=[],F=0,G;(G=O[F])!=null;F++){if(typeof G==="number"){G+=""}if(G){if(typeof G==="string"&&!v.test(G)){G=N.createTextNode(G)}else{if(typeof G==="string"){G=G.replace(C,bl);var s=(m.exec(G)||["",""])[1].toLowerCase(),A=aK[s]||aK._default,w=A[0],c=N.createElement("div");for(c.innerHTML=A[1]+G+A[2];w--;){c=c.lastChild}if(!ai.support.tbody){w=ad.test(G);s=s==="table"&&!w?c.firstChild&&c.firstChild.childNodes:A[1]==="<table>"&&!w?c.childNodes:[];for(A=s.length-1;A>=0;--A){ai.nodeName(s[A],"tbody")&&!s[A].childNodes.length&&s[A].parentNode.removeChild(s[A])}}!ai.support.leadingWhitespace&&at.test(G)&&c.insertBefore(N.createTextNode(at.exec(G)[0]),c.firstChild);G=c.childNodes}}if(G.nodeType){K.push(G)}else{K=ai.merge(K,G)}}}if(L){for(F=0;K[F];F++){if(J&&ai.nodeName(K[F],"script")&&(!K[F].type||K[F].type.toLowerCase()==="text/javascript")){J.push(K[F].parentNode?K[F].parentNode.removeChild(K[F]):K[F])}else{K[F].nodeType===1&&K.splice.apply(K,[F+1,0].concat(ai.makeArray(K[F].getElementsByTagName("script"))));L.appendChild(K[F])}}}return K},cleanData:function(L){for(var K,J,F=ai.cache,G=ai.event.special,w=ai.support.deleteExpando,A=0,c;(c=L[A])!=null;A++){if(J=c[ai.expando]){K=F[J];if(K.events){for(var s in K.events){G[s]?ai.event.remove(c,s):aH(c,s,K.handle)}}if(w){delete c[ai.expando]}else{c.removeAttribute&&c.removeAttribute(ai.expando)}delete F[J]}}}});var h=/z-?index|font-?weight|opacity|zoom|line-?height/i,a5=/alpha\([^)]*\)/,aR=/opacity=([^)]*)/,aF=/float/i,ae=/-([a-z])/ig,bg=/([A-Z])/g,a0=/^-?\d+(?:px)?$/i,aJ=/^-?\d/,ag={position:"absolute",visibility:"hidden",display:"block"},z=["Left","Right"],k=["Top","Bottom"],bj=S.defaultView&&S.defaultView.getComputedStyle,am=ai.support.cssFloat?"cssFloat":"styleFloat",x=function(s,c){return c.toUpperCase()};ai.fn.css=function(s,c){return aq(this,s,c,true,function(F,w,A){if(A===M){return ai.curCSS(F,w)}if(typeof A==="number"&&!h.test(w)){A+="px"}ai.style(F,w,A)})};ai.extend({style:function(s,c,F){if(!s||s.nodeType===3||s.nodeType===8){return M}if((c==="width"||c==="height")&&parseFloat(F)<0){F=M}var w=s.style||s,A=F!==M;if(!ai.support.opacity&&c==="opacity"){if(A){w.zoom=1;c=parseInt(F,10)+""==="NaN"?"":"alpha(opacity="+F*100+")";s=w.filter||ai.curCSS(s,"filter")||"";w.filter=a5.test(s)?s.replace(a5,c):c}return w.filter&&w.filter.indexOf("opacity=")>=0?parseFloat(aR.exec(w.filter)[1])/100+"":""}if(aF.test(c)){c=am}c=c.replace(ae,x);if(A){w[c]=F}return w[c]},css:function(s,c,J,F){if(c==="width"||c==="height"){var G,w=c==="width"?z:k;function A(){G=c==="width"?s.offsetWidth:s.offsetHeight;F!=="border"&&ai.each(w,function(){F||(G-=parseFloat(ai.curCSS(s,"padding"+this,true))||0);if(F==="margin"){G+=parseFloat(ai.curCSS(s,"margin"+this,true))||0}else{G-=parseFloat(ai.curCSS(s,"border"+this+"Width",true))||0}})}s.offsetWidth!==0?A():ai.swap(s,ag,A);return Math.max(0,Math.round(G))}return ai.curCSS(s,c,J)},curCSS:function(s,c,G){var A,F=s.style;if(!ai.support.opacity&&c==="opacity"&&s.currentStyle){A=aR.test(s.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return A===""?"1":A}if(aF.test(c)){c=am}if(!G&&F&&F[c]){A=F[c]}else{if(bj){if(aF.test(c)){c="float"}c=c.replace(bg,"-$1").toLowerCase();F=s.ownerDocument.defaultView;if(!F){return null}if(s=F.getComputedStyle(s,null)){A=s.getPropertyValue(c)}if(c==="opacity"&&A===""){A="1"}}else{if(s.currentStyle){G=c.replace(ae,x);A=s.currentStyle[c]||s.currentStyle[G];if(!a0.test(A)&&aJ.test(A)){c=F.left;var w=s.runtimeStyle.left;s.runtimeStyle.left=s.currentStyle.left;F.left=G==="fontSize"?"1em":A||0;A=F.pixelLeft+"px";F.left=c;s.runtimeStyle.left=w}}}}return A},swap:function(s,c,F){var w={};for(var A in c){w[A]=s.style[A];s.style[A]=c[A]}F.call(s);for(A in c){s.style[A]=w[A]}}});if(ai.expr&&ai.expr.filters){ai.expr.filters.hidden=function(s){var c=s.offsetWidth,A=s.offsetHeight,w=s.nodeName.toLowerCase()==="tr";return c===0&&A===0&&!w?true:c>0&&A>0&&!w?false:ai.curCSS(s,"display")==="none"};ai.expr.filters.visible=function(c){return !ai.expr.filters.hidden(c)}}var a3=aG(),aO=/<script(.|\s)*?\/script>/gi,ak=/select|textarea/i,D=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,aB=/=\?(&|$)/,i=/\?/,n=/(\?|&)_=.*?(&|$)/,a=/^(\w+:)?\/\/([^\/?#]+)/,a6=/%20/g,aS=ai.fn.load;ai.fn.extend({load:function(s,c,G){if(typeof s!=="string"){return aS.call(this,s)}else{if(!this.length){return this}}var A=s.indexOf(" ");if(A>=0){var F=s.slice(A,s.length);s=s.slice(0,A)}A="GET";if(c){if(ai.isFunction(c)){G=c;c=null}else{if(typeof c==="object"){c=ai.param(c,ai.ajaxSettings.traditional);A="POST"}}}var w=this;ai.ajax({url:s,type:A,dataType:"html",data:c,complete:function(J,K){if(K==="success"||K==="notmodified"){w.html(F?ai("<div />").append(J.responseText.replace(aO,"")).find(F):J.responseText)}G&&w.each(G,[J.responseText,K,J])}});return this},serialize:function(){return ai.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?ai.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ak.test(this.nodeName)||D.test(this.type))}).map(function(s,c){s=ai(this).val();return s==null?null:ai.isArray(s)?ai.map(s,function(w){return{name:c.name,value:w}}):{name:c.name,value:s}}).get()}});ai.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(s,c){ai.fn[c]=function(w){return this.bind(c,w)}});ai.extend({get:function(s,c,A,w){if(ai.isFunction(c)){w=w||A;A=c;c=null}return ai.ajax({type:"GET",url:s,data:c,success:A,dataType:w})},getScript:function(s,c){return ai.get(s,null,c,"script")},getJSON:function(s,c,w){return ai.get(s,c,w,"json")},post:function(s,c,A,w){if(ai.isFunction(c)){w=w||A;A=c;c={}}return ai.ajax({type:"POST",url:s,data:c,success:A,dataType:w})},ajaxSetup:function(c){ai.extend(ai.ajaxSettings,c)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:aP.XMLHttpRequest&&(aP.location.protocol!=="file:"||!aP.ActiveXObject)?function(){return new aP.XMLHttpRequest}:function(){try{return new aP.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(aa){function Z(){X.success&&X.success.call(P,K,R,s);X.global&&W("ajaxSuccess",[s,X])}function Y(){X.complete&&X.complete.call(P,s,R);X.global&&W("ajaxComplete",[s,X]);X.global&&!--ai.active&&ai.event.trigger("ajaxStop")}function W(ba,bb){(X.context?ai(X.context):ai.event).trigger(ba,bb)}var X=ai.extend(true,{},ai.ajaxSettings,aa),Q,R,K,P=aa&&aa.context||X,L=X.type.toUpperCase();if(X.data&&X.processData&&typeof X.data!=="string"){X.data=ai.param(X.data,X.traditional)}if(X.dataType==="jsonp"){if(L==="GET"){aB.test(X.url)||(X.url+=(i.test(X.url)?"&":"?")+(X.jsonp||"callback")+"=?")}else{if(!X.data||!aB.test(X.data)){X.data=(X.data?X.data+"&":"")+(X.jsonp||"callback")+"=?"}}X.dataType="json"}if(X.dataType==="json"&&(X.data&&aB.test(X.data)||aB.test(X.url))){Q=X.jsonpCallback||"jsonp"+a3++;if(X.data){X.data=(X.data+"").replace(aB,"="+Q+"$1")}X.url=X.url.replace(aB,"="+Q+"$1");X.dataType="script";aP[Q]=aP[Q]||function(ba){K=ba;Z();Y();aP[Q]=M;try{delete aP[Q]}catch(bb){}c&&c.removeChild(F)}}if(X.dataType==="script"&&X.cache===null){X.cache=false}if(X.cache===false&&L==="GET"){var G=aG(),w=X.url.replace(n,"$1_="+G+"$2");X.url=w+(w===X.url?(i.test(X.url)?"&":"?")+"_="+G:"")}if(X.data&&L==="GET"){X.url+=(i.test(X.url)?"&":"?")+X.data}X.global&&!ai.active++&&ai.event.trigger("ajaxStart");G=(G=a.exec(X.url))&&(G[1]&&G[1]!==location.protocol||G[2]!==location.host);if(X.dataType==="script"&&L==="GET"&&G){var c=S.getElementsByTagName("head")[0]||S.documentElement,F=S.createElement("script");F.src=X.url;if(X.scriptCharset){F.charset=X.scriptCharset}if(!Q){var J=false;F.onload=F.onreadystatechange=function(){if(!J&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){J=true;Z();Y();F.onload=F.onreadystatechange=null;c&&F.parentNode&&c.removeChild(F)}}}c.insertBefore(F,c.firstChild);return M}var A=false,s=X.xhr();if(s){X.username?s.open(L,X.url,X.async,X.username,X.password):s.open(L,X.url,X.async);try{if(X.data||aa&&aa.contentType){s.setRequestHeader("Content-Type",X.contentType)}if(X.ifModified){ai.lastModified[X.url]&&s.setRequestHeader("If-Modified-Since",ai.lastModified[X.url]);ai.etag[X.url]&&s.setRequestHeader("If-None-Match",ai.etag[X.url])}G||s.setRequestHeader("X-Requested-With","XMLHttpRequest");s.setRequestHeader("Accept",X.dataType&&X.accepts[X.dataType]?X.accepts[X.dataType]+", */*":X.accepts._default)}catch(ab){}if(X.beforeSend&&X.beforeSend.call(P,s,X)===false){X.global&&!--ai.active&&ai.event.trigger("ajaxStop");s.abort();return false}X.global&&W("ajaxSend",[s,X]);var V=s.onreadystatechange=function(bb){if(!s||s.readyState===0||bb==="abort"){A||Y();A=true;if(s){s.onreadystatechange=ai.noop}}else{if(!A&&s&&(s.readyState===4||bb==="timeout")){A=true;s.onreadystatechange=ai.noop;R=bb==="timeout"?"timeout":!ai.httpSuccess(s)?"error":X.ifModified&&ai.httpNotModified(s,X.url)?"notmodified":"success";var bm;if(R==="success"){try{K=ai.httpData(s,X.dataType,X)}catch(ba){R="parsererror";bm=ba}}if(R==="success"||R==="notmodified"){Q||Z()}else{ai.handleError(X,s,R,bm)}Y();bb==="timeout"&&s.abort();if(X.async){s=null}}}};try{var T=s.abort;s.abort=function(){s&&T.call(s);V("abort")}}catch(O){}X.async&&X.timeout>0&&setTimeout(function(){s&&!A&&V("timeout")},X.timeout);try{s.send(L==="POST"||L==="PUT"||L==="DELETE"?X.data:null)}catch(N){ai.handleError(X,s,null,N);Y()}X.async||V();return s}},handleError:function(s,c,A,w){if(s.error){s.error.call(s.context||s,c,A,w)}if(s.global){(s.context?ai(s.context):ai.event).trigger("ajaxError",[c,s,w])}},active:0,httpSuccess:function(s){try{return !s.status&&location.protocol==="file:"||s.status>=200&&s.status<300||s.status===304||s.status===1223||s.status===0}catch(c){}return false},httpNotModified:function(s,c){var A=s.getResponseHeader("Last-Modified"),w=s.getResponseHeader("Etag");if(A){ai.lastModified[c]=A}if(w){ai.etag[c]=w}return s.status===304||s.status===0},httpData:function(s,c,F){var w=s.getResponseHeader("content-type")||"",A=c==="xml"||!c&&w.indexOf("xml")>=0;s=A?s.responseXML:s.responseText;A&&s.documentElement.nodeName==="parsererror"&&ai.error("parsererror");if(F&&F.dataFilter){s=F.dataFilter(s,c)}if(typeof s==="string"){if(c==="json"||!c&&w.indexOf("json")>=0){s=ai.parseJSON(s)}else{if(c==="script"||!c&&w.indexOf("javascript")>=0){ai.globalEval(s)}}}return s},param:function(s,c){function G(J,K){if(ai.isArray(K)){ai.each(K,function(L,N){c||/\[\]$/.test(J)?A(J,N):G(J+"["+(typeof N==="object"||ai.isArray(N)?L:"")+"]",N)})}else{!c&&K!=null&&typeof K==="object"?ai.each(K,function(L,N){G(J+"["+L+"]",N)}):A(J,K)}}function A(J,K){K=ai.isFunction(K)?K():K;F[F.length]=encodeURIComponent(J)+"="+encodeURIComponent(K)}var F=[];if(c===M){c=ai.ajaxSettings.traditional}if(ai.isArray(s)||s.jquery){ai.each(s,function(){A(this.name,this.value)})}else{for(var w in s){G(w,s[w])}}return F.join("&").replace(a6,"+")}});var bh={},bd=/toggle|show|hide/,aY=/^([+-]=)?([\d+-.]+)(.*)$/,ar,E=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];ai.fn.extend({show:function(s,c){if(s||s===0){return this.animate(aD("show",3),s,c)}else{s=0;for(c=this.length;s<c;s++){var F=ai.data(this[s],"olddisplay");this[s].style.display=F||"";if(ai.css(this[s],"display")==="none"){F=this[s].nodeName;var w;if(bh[F]){w=bh[F]}else{var A=ai("<"+F+" />").appendTo("body");w=A.css("display");if(w==="none"){w="block"}A.remove();bh[F]=w}ai.data(this[s],"olddisplay",w)}}s=0;for(c=this.length;s<c;s++){this[s].style.display=ai.data(this[s],"olddisplay")||""}return this}},hide:function(s,c){if(s||s===0){return this.animate(aD("hide",3),s,c)}else{s=0;for(c=this.length;s<c;s++){var w=ai.data(this[s],"olddisplay");!w&&w!=="none"&&ai.data(this[s],"olddisplay",ai.css(this[s],"display"))}s=0;for(c=this.length;s<c;s++){this[s].style.display="none"}return this}},_toggle:ai.fn.toggle,toggle:function(s,c){var w=typeof s==="boolean";if(ai.isFunction(s)&&ai.isFunction(c)){this._toggle.apply(this,arguments)}else{s==null||w?this.each(function(){var A=w?s:ai(this).is(":hidden");ai(this)[A?"show":"hide"]()}):this.animate(aD("toggle",3),s,c)}return this},fadeTo:function(s,c,w){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:c},s,w)},animate:function(s,c,F,w){var A=ai.speed(c,F,w);if(ai.isEmptyObject(s)){return this.each(A.complete)}return this[A.queue===false?"each":"queue"](function(){var J=ai.extend({},A),K,L=this.nodeType===1&&ai(this).is(":hidden"),G=this;for(K in s){var N=K.replace(ae,x);if(K!==N){s[N]=s[K];delete s[K];K=N}if(s[K]==="hide"&&L||s[K]==="show"&&!L){return J.complete.call(this)}if((K==="height"||K==="width")&&this.style){J.display=ai.css(this,"display");J.overflow=this.style.overflow}if(ai.isArray(s[K])){(J.specialEasing=J.specialEasing||{})[K]=s[K][1];s[K]=s[K][0]}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=ai.extend({},s);ai.each(s,function(P,O){var T=new ai.fx(G,J,P);if(bd.test(O)){T[O==="toggle"?L?"show":"hide":O](s)}else{var R=aY.exec(O),V=T.cur(true)||0;if(R){O=parseFloat(R[2]);var Q=R[3]||"px";if(Q!=="px"){G.style[P]=(O||1)+Q;V=(O||1)/T.cur(true)*V;G.style[P]=V+Q}if(R[1]){O=(R[1]==="-="?-1:1)*O+V}T.custom(V,O,Q)}else{T.custom(V,O,"")}}});return true})},stop:function(s,c){var w=ai.timers;s&&this.queue([]);this.each(function(){for(var A=w.length-1;A>=0;A--){if(w[A].elem===this){c&&w[A](true);w.splice(A,1)}}});c||this.dequeue();return this}});ai.each({slideDown:aD("show",1),slideUp:aD("hide",1),slideToggle:aD("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(s,c){ai.fn[s]=function(A,w){return this.animate(c,A,w)}});ai.extend({speed:function(s,c,A){var w=s&&typeof s==="object"?s:{complete:A||!A&&c||ai.isFunction(s)&&s,duration:s,easing:A&&c||c&&!ai.isFunction(c)&&c};w.duration=ai.fx.off?0:typeof w.duration==="number"?w.duration:ai.fx.speeds[w.duration]||ai.fx.speeds._default;w.old=w.complete;w.complete=function(){w.queue!==false&&ai(this).dequeue();ai.isFunction(w.old)&&w.old.call(this)};return w},easing:{linear:function(s,c,A,w){return A+w*s},swing:function(s,c,A,w){return(-Math.cos(s*Math.PI)/2+0.5)*w+A}},timers:[],fx:function(s,c,w){this.options=c;this.elem=s;this.prop=w;if(!c.orig){c.orig={}}}});ai.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(ai.fx.step[this.prop]||ai.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(c){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}return(c=parseFloat(ai.css(this.elem,this.prop,c)))&&c>-10000?c:parseFloat(ai.curCSS(this.elem,this.prop))||0},custom:function(s,c,F){function w(G){return A.step(G)}this.startTime=aG();this.start=s;this.end=c;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var A=this;w.elem=this.elem;if(w()&&ai.timers.push(w)&&!ar){ar=setInterval(ai.fx.tick,13)}},show:function(){this.options.orig[this.prop]=ai.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());ai(this.elem).show()},hide:function(){this.options.orig[this.prop]=ai.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(s){var c=aG(),F=true;if(s||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var w in this.options.curAnim){if(this.options.curAnim[w]!==true){F=false}}if(F){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;s=ai.data(this.elem,"olddisplay");this.elem.style.display=s?s:this.options.display;if(ai.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&ai(this.elem).hide();if(this.options.hide||this.options.show){for(var A in this.options.curAnim){ai.style(this.elem,A,this.options.orig[A])}}this.options.complete.call(this.elem)}return false}else{A=c-this.startTime;this.state=A/this.options.duration;s=this.options.easing||(ai.easing.swing?"swing":"linear");this.pos=ai.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||s](this.state,A,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};ai.extend(ai.fx,{tick:function(){for(var s=ai.timers,c=0;c<s.length;c++){s[c]()||s.splice(c--,1)}s.length||ai.fx.stop()},stop:function(){clearInterval(ar);ar=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){ai.style(c.elem,"opacity",c.now)},_default:function(c){if(c.elem.style&&c.elem.style[c.prop]!=null){c.elem.style[c.prop]=(c.prop==="width"||c.prop==="height"?Math.max(0,c.now):c.now)+c.unit}else{c.elem[c.prop]=c.now}}}});if(ai.expr&&ai.expr.filters){ai.expr.filters.animated=function(c){return ai.grep(ai.timers,function(s){return c===s.elem}).length}}ai.fn.offset="getBoundingClientRect" in S.documentElement?function(s){var c=this[0];if(s){return this.each(function(F){ai.offset.setOffset(this,s,F)})}if(!c||!c.ownerDocument){return null}if(c===c.ownerDocument.body){return ai.offset.bodyOffset(c)}var A=c.getBoundingClientRect(),w=c.ownerDocument;c=w.body;w=w.documentElement;return{top:A.top+(self.pageYOffset||ai.support.boxModel&&w.scrollTop||c.scrollTop)-(w.clientTop||c.clientTop||0),left:A.left+(self.pageXOffset||ai.support.boxModel&&w.scrollLeft||c.scrollLeft)-(w.clientLeft||c.clientLeft||0)}}:function(N){var L=this[0];if(N){return this.each(function(O){ai.offset.setOffset(this,N,O)})}if(!L||!L.ownerDocument){return null}if(L===L.ownerDocument.body){return ai.offset.bodyOffset(L)}ai.offset.initialize();var K=L.offsetParent,G=L,J=L.ownerDocument,A,F=J.documentElement,c=J.body;G=(J=J.defaultView)?J.getComputedStyle(L,null):L.currentStyle;for(var w=L.offsetTop,s=L.offsetLeft;(L=L.parentNode)&&L!==c&&L!==F;){if(ai.offset.supportsFixedPosition&&G.position==="fixed"){break}A=J?J.getComputedStyle(L,null):L.currentStyle;w-=L.scrollTop;s-=L.scrollLeft;if(L===K){w+=L.offsetTop;s+=L.offsetLeft;if(ai.offset.doesNotAddBorder&&!(ai.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(L.nodeName))){w+=parseFloat(A.borderTopWidth)||0;s+=parseFloat(A.borderLeftWidth)||0}G=K;K=L.offsetParent}if(ai.offset.subtractsBorderForOverflowNotVisible&&A.overflow!=="visible"){w+=parseFloat(A.borderTopWidth)||0;s+=parseFloat(A.borderLeftWidth)||0}G=A}if(G.position==="relative"||G.position==="static"){w+=c.offsetTop;s+=c.offsetLeft}if(ai.offset.supportsFixedPosition&&G.position==="fixed"){w+=Math.max(F.scrollTop,c.scrollTop);s+=Math.max(F.scrollLeft,c.scrollLeft)}return{top:w,left:s}};ai.offset={initialize:function(){var s=S.body,c=S.createElement("div"),G,A,F,w=parseFloat(ai.curCSS(s,"marginTop",true))||0;ai.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});c.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";s.insertBefore(c,s.firstChild);G=c.firstChild;A=G.firstChild;F=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=A.offsetTop!==5;this.doesAddBorderForTableAndCells=F.offsetTop===5;A.style.position="fixed";A.style.top="20px";this.supportsFixedPosition=A.offsetTop===20||A.offsetTop===15;A.style.position=A.style.top="";G.style.overflow="hidden";G.style.position="relative";this.subtractsBorderForOverflowNotVisible=A.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=s.offsetTop!==w;s.removeChild(c);ai.offset.initialize=ai.noop},bodyOffset:function(s){var c=s.offsetTop,w=s.offsetLeft;ai.offset.initialize();if(ai.offset.doesNotIncludeMarginInBodyOffset){c+=parseFloat(ai.curCSS(s,"marginTop",true))||0;w+=parseFloat(ai.curCSS(s,"marginLeft",true))||0}return{top:c,left:w}},setOffset:function(s,c,J){if(/static/.test(ai.curCSS(s,"position"))){s.style.position="relative"}var F=ai(s),G=F.offset(),w=parseInt(ai.curCSS(s,"top",true),10)||0,A=parseInt(ai.curCSS(s,"left",true),10)||0;if(ai.isFunction(c)){c=c.call(s,J,G)}J={top:c.top-G.top+w,left:c.left-G.left+A};"using" in c?c.using.call(s,J):F.css(J)}};ai.fn.extend({position:function(){if(!this[0]){return null}var s=this[0],c=this.offsetParent(),A=this.offset(),w=/^body|html$/i.test(c[0].nodeName)?{top:0,left:0}:c.offset();A.top-=parseFloat(ai.curCSS(s,"marginTop",true))||0;A.left-=parseFloat(ai.curCSS(s,"marginLeft",true))||0;w.top+=parseFloat(ai.curCSS(c[0],"borderTopWidth",true))||0;w.left+=parseFloat(ai.curCSS(c[0],"borderLeftWidth",true))||0;return{top:A.top-w.top,left:A.left-w.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||S.body;c&&!/^body|html$/i.test(c.nodeName)&&ai.css(c,"position")==="static";){c=c.offsetParent}return c})}});ai.each(["Left","Top"],function(s,c){var w="scroll"+c;ai.fn[w]=function(F){var G=this[0],A;if(!G){return null}if(F!==M){return this.each(function(){if(A=o(this)){A.scrollTo(!s?F:ai(A).scrollLeft(),s?F:ai(A).scrollTop())}else{this[w]=F}})}else{return(A=o(G))?"pageXOffset" in A?A[s?"pageYOffset":"pageXOffset"]:ai.support.boxModel&&A.document.documentElement[w]||A.document.body[w]:G[w]}}});ai.each(["Height","Width"],function(s,c){var w=c.toLowerCase();ai.fn["inner"+c]=function(){return this[0]?ai.css(this[0],w,false,"padding"):null};ai.fn["outer"+c]=function(A){return this[0]?ai.css(this[0],w,false,A?"margin":"border"):null};ai.fn[w]=function(A){var F=this[0];if(!F){return A==null?null:this}if(ai.isFunction(A)){return this.each(function(G){var J=ai(this);J[w](A.call(this,G,J[w]()))})}return"scrollTo" in F&&F.document?F.document.compatMode==="CSS1Compat"&&F.document.documentElement["client"+c]||F.document.body["client"+c]:F.nodeType===9?Math.max(F.documentElement["client"+c],F.body["scroll"+c],F.documentElement["scroll"+c],F.body["offset"+c],F.documentElement["offset"+c]):A===M?ai.css(F,w):this.css(w,typeof A==="string"?A:A+"px")}});aP.jQuery=aP.$=ai})(window);
-/*
+/*!
* jQuery UI 1.8.4
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
@@ -23,4 +23,4 @@
*
* http://docs.jquery.com/UI
*/
-(function(d,b){function a(c){return !d(c).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};if(!d.ui.version){d.extend(d.ui,{version:"1.8.4",plugin:{add:function(f,c,h){f=d.ui[f].prototype;for(var g in h){f.plugins[g]=f.plugins[g]||[];f.plugins[g].push([c,h[g]])}},call:function(f,c,h){if((c=f.plugins[c])&&f.element[0].parentNode){for(var g=0;g<c.length;g++){f.options[c[g][0]]&&c[g][1].apply(f.element,h)}}}},contains:function(e,c){return document.compareDocumentPosition?e.compareDocumentPosition(c)&16:e!==c&&e.contains(c)},hasScroll:function(e,c){if(d(e).css("overflow")==="hidden"){return false}c=c&&c==="left"?"scrollLeft":"scrollTop";var f=false;if(e[c]>0){return true}e[c]=1;f=e[c]>0;e[c]=0;return f},isOverAxis:function(e,c,f){return e>c&&e<c+f},isOver:function(f,c,l,k,j,g){return d.ui.isOverAxis(f,l,j)&&d.ui.isOverAxis(c,k,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});d.fn.extend({_focus:d.fn.focus,focus:function(e,c){return typeof e==="number"?this.each(function(){var f=this;setTimeout(function(){d(f).focus();c&&c.call(f)},e)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var c;c=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?d(document):c},zIndex:function(e){if(e!==b){return this.css("zIndex",e)}if(this.length){e=d(this[0]);for(var c;e.length&&e[0]!==document;){c=e.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(e.css("zIndex"));if(!isNaN(c)&&c!=0){return c}}e=e.parent()}}return 0}});d.each(["Width","Height"],function(f,c){function l(n,i,h,e){d.each(k,function(){i-=parseFloat(d.curCSS(n,"padding"+this,true))||0;if(h){i-=parseFloat(d.curCSS(n,"border"+this+"Width",true))||0}if(e){i-=parseFloat(d.curCSS(n,"margin"+this,true))||0}});return i}var k=c==="Width"?["Left","Right"]:["Top","Bottom"],j=c.toLowerCase(),g={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+c]=function(e){if(e===b){return g["inner"+c].call(this)}return this.each(function(){d.style(this,j,l(this,e)+"px")})};d.fn["outer"+c]=function(h,e){if(typeof h!=="number"){return g["outer"+c].call(this,h)}return this.each(function(){d.style(this,j,l(this,h,true,e)+"px")})}});d.extend(d.expr[":"],{data:function(e,c,f){return !!d.data(e,f[3])},focusable:function(e){var c=e.nodeName.toLowerCase(),f=d.attr(e,"tabindex");if("area"===c){c=e.parentNode;f=c.name;if(!e.href||!f||c.nodeName.toLowerCase()!=="map"){return false}e=d("img[usemap=#"+f+"]")[0];return !!e&&a(e)}return(/input|select|textarea|button|object/.test(c)?!e.disabled:"a"==c?e.href||!isNaN(f):!isNaN(f))&&a(e)},tabbable:function(e){var c=d.attr(e,"tabindex");return(isNaN(c)||c>=0)&&d(e).is(":focusable")}})}})(jQuery);(function(a,d){var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){if(!e){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return c.call(a(this),b,e)})};a.widget=function(b,j,i){var h=b.split(".")[0],g;b=b.split(".")[1];g=h+"-"+b;if(!i){i=j;j=a.Widget}a.expr[":"][g]=function(e){return !!a.data(e,b)};a[h]=a[h]||{};a[h][b]=function(e,f){arguments.length&&this._createWidget(e,f)};j=new j;j.options=a.extend(true,{},j.options);a[h][b].prototype=a.extend(true,j,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:g},i);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,e){a.fn[b]=function(k){var j=typeof k==="string",i=Array.prototype.slice.call(arguments,1),g=this;k=!j&&i.length?a.extend.apply(null,[true,k].concat(i)):k;if(j&&k.substring(0,1)==="_"){return g}j?this.each(function(){var h=a.data(this,b),f=h&&a.isFunction(h[k])?h[k].apply(h,i):h;if(f!==h&&f!==d){g=f;return false}}):this.each(function(){var f=a.data(this,b);if(f){k&&f.option(k);f._init()}else{a.data(this,b,new e(k,this))}});return g}};a.Widget=function(b,e){arguments.length&&this._createWidget(b,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,h){var g=b,f=this;if(arguments.length===0){return a.extend({},f.options)}if(typeof b==="string"){if(h===d){return this.options[b]}g={};g[b]=h}a.each(g,function(i,e){f._setOption(i,e)});return f},_setOption:function(b,e){this.options[b]=e;if(b==="disabled"){this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,j,i){var h=this.options[b];j=a.Event(j);j.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();i=i||{};if(j.originalEvent){b=a.event.props.length;for(var g;b;){g=a.event.props[--b];j[g]=j.originalEvent[g]}}this.element.trigger(j,i);return !(a.isFunction(h)&&h.call(this.element[0],j,i)===false||j.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(!d.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,h=d.which==1,g=typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false;if(!h||g||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(b){return c._mouseMove(b)};this._mouseUpDelegate=function(b){return c._mouseUp(b)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||d.preventDefault();return d.originalEvent.mouseHandled=true}},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(d);if(!this.handle){return false}return true},_mouseStart:function(d){var c=this.options;this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);return true},_mouseDrag:function(d,c){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(e){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,e)}if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",e)!==false&&f._clear()})}else{this._trigger("stop",e)!==false&&this._clear()}return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==d.target){c=true}});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone():this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var d=a(e.containment)[0];if(d){e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(e,d){if(!d){d=this.position}e=e=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*e),left:d.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*e)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=/(html|body)/i.test(l[0].tagName),k=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){k=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){k=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;k=this.originalPageX+Math.round((k-this.originalPageX)/d.grid[0])*d.grid[0];k=this.containment?!(k-this.offset.click.left<this.containment[0]||k-this.offset.click.left>this.containment[2])?k:!(k-this.offset.click.left<this.containment[0])?k-d.grid[0]:k+d.grid[0]:k}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():j?0:l.scrollTop()),left:k-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:l.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(e,d,f){f=f||this._uiHash();a.ui.plugin.call(this,e,[d,f]);if(e=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,e,d,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.4"});a.ui.plugin.add("draggable","connectToSortable",{start:function(g,d){var j=a(this).data("draggable"),h=j.options,i=a.extend({},d,{item:j.element});j.sortables=[];a(h.connectToSortable).each(function(){var b=a.data(this,"sortable");if(b&&!b.options.disabled){j.sortables.push({instance:b,shouldRevert:b.options.revert});b._refreshItems();b._trigger("activate",g,i)}})},stop:function(e,d){var h=a(this).data("draggable"),g=a.extend({},d,{item:h.element});a.each(h.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;h.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(e);this.instance.options.helper=this.instance.options._helper;h.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",e,g)}})},drag:function(e,d){var h=a(this).data("draggable"),g=this;a.each(h.sortables,function(){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};e.target=this.instance.currentItem[0];this.instance._mouseCapture(e,true);this.instance._mouseStart(e,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger("toSortable",e);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}this.instance.currentItem&&this.instance._mouseDrag(e)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",e,this.instance._uiHash(this.instance));this.instance._mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();h._trigger("fromSortable",e);h.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor")){c._cursor=d.css("cursor")}d.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity")){c._opacity=d.css("opacity")}d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(e){var d=a(this).data("draggable"),h=d.options,g=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!h.axis||h.axis!="x"){if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-e.pageY<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop+h.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop-h.scrollSpeed}}}if(!h.axis||h.axis!="y"){if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-e.pageX<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft-h.scrollSpeed}}}}else{if(!h.axis||h.axis!="x"){if(e.pageY-a(document).scrollTop()<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}}if(!h.axis||h.axis!="y"){if(e.pageX-a(document).scrollLeft()<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}}g!==false&&a.ui.ddmanager&&!h.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,e)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var e=a(this),b=e.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:b.top,left:b.left})})},drag:function(L,K){for(var J=a(this).data("draggable"),H=J.options,I=H.snapTolerance,G=K.offset.left,z=G+J.helperProportions.width,A=K.offset.top,y=A+J.helperProportions.height,F=J.snapElements.length-1;F>=0;F--){var E=J.snapElements[F].left,C=E+J.snapElements[F].width,D=J.snapElements[F].top,B=D+J.snapElements[F].height;if(E-I<G&&G<C+I&&D-I<A&&A<B+I||E-I<G&&G<C+I&&D-I<y&&y<B+I||E-I<z&&z<C+I&&D-I<A&&A<B+I||E-I<z&&z<C+I&&D-I<y&&y<B+I){if(H.snapMode!="inner"){var x=Math.abs(D-y)<=I,w=Math.abs(B-A)<=I,v=Math.abs(E-z)<=I,u=Math.abs(C-G)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D-J.helperProportions.height,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E-J.helperProportions.width}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C}).left-J.margins.left}}var d=x||w||v||u;if(H.snapMode!="outer"){x=Math.abs(D-A)<=I;w=Math.abs(B-y)<=I;v=Math.abs(E-G)<=I;u=Math.abs(C-z)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B-J.helperProportions.height,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[F].snapping&&(x||w||v||u||d)){J.options.snap.snap&&J.options.snap.snap.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}))}J.snapElements[F].snapping=x||w||v||u||d}else{J.snapElements[F].snapping&&J.options.snap.release&&J.options.snap.release.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}));J.snapElements[F].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(e,b){return(parseInt(a(e).css("zIndex"),10)||0)-(parseInt(a(b).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(b){this.style.zIndex=c+b});this[0].style.zIndex=c+d.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex")){c._zIndex=d.css("zIndex")}d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(b){return b.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++){d[c]==this&&d.splice(c,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept"){this.accept=a.isFunction(c)?c:function(b){return b.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",d,this.ui(c))}}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}}},_drop:function(f,d){var h=d||a.ui.ddmanager.current;if(!h||(h.currentItem||h.element)[0]==this.element[0]){return false}var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==h.options.scope&&b.accept.call(b.element[0],h.currentItem||h.element)&&a.ui.intersect(h,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){g=true;return false}});if(g){return false}if(this.accept.call(this.element[0],h.currentItem||h.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",f,this.ui(h));return this.element}return false},ui:function(b){return{draggable:b.currentItem||b.element,helper:b.helper,position:b.position,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.4"});a.ui.intersect=function(w,v,u){if(!v.offset){return false}var s=(w.positionAbs||w.position.absolute).left,q=s+w.helperProportions.width,r=(w.positionAbs||w.position.absolute).top,p=r+w.helperProportions.height,o=v.offset.left,m=o+v.proportions.width,n=v.offset.top,d=n+v.proportions.height;switch(u){case"fit":return o<=s&&q<=m&&n<=r&&p<=d;case"intersect":return o<s+w.helperProportions.width/2&&q-w.helperProportions.width/2<m&&n<r+w.helperProportions.height/2&&p-w.helperProportions.height/2<d;case"pointer":return a.ui.isOver((w.positionAbs||w.position.absolute).top+(w.clickOffset||w.offset.click).top,(w.positionAbs||w.position.absolute).left+(w.clickOffset||w.offset.click).left,n,o,v.proportions.height,v.proportions.width);case"touch":return(r>=n&&r<=d||p>=n&&p<=d||r<n&&p>d)&&(s>=o&&s<=m||q>=o&&q<=m||s<o&&q>m);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(i,d){var n=a.ui.ddmanager.droppables[i.options.scope]||[],m=d?d.type:null,k=(i.currentItem||i.element).find(":data(droppable)").andSelf(),l=0;i:for(;l<n.length;l++){if(!(n[l].options.disabled||i&&!n[l].accept.call(n[l].element[0],i.currentItem||i.element))){for(var j=0;j<k.length;j++){if(k[j]==n[l].element[0]){n[l].proportions.height=0;continue i}}n[l].visible=n[l].element.css("display")!="none";if(n[l].visible){n[l].offset=n[l].element.offset();n[l].proportions={width:n[l].element[0].offsetWidth,height:n[l].element[0].offsetHeight};m=="mousedown"&&n[l]._activate.call(n[l],d)}}}},drop:function(e,d){var f=false;a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance)){f=f||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return f},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var h=a.ui.intersect(d,this,this.options.tolerance);if(h=!h&&this.isover==1?"isout":h&&this.isover==0?"isover":null){var f;if(this.options.greedy){var b=this.element.parents(":data(droppable):eq(0)");if(b.length){f=a.data(b[0],"droppable");f.greedyChild=h=="isover"?1:0}}if(f&&h=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,c);if(f&&h=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}}}})}}})(jQuery);(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var e=this,h=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&c.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var k=0;k<l.length;k++){var j=c.trim(l[k]),i=c('<div class="ui-resizable-handle '+("ui-resizable-"+j)+'"></div>');/sw|se|ne|nw/.test(j)&&i.css({zIndex:++h.zIndex});"se"==j&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[j]=".ui-resizable-"+j;this.element.append(i)}}this._renderAxis=function(m){m=m||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=c(this.handles[g],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var f=c(this.handles[g],this.element),d=0;d=/sw|ne|nw|se|n|s/.test(g)?f.outerHeight():f.outerWidth();f=["padding",/ne|nw|n/.test(g)?"Top":/se|sw|s/.test(g)?"Bottom":/^e$/.test(g)?"Right":"Left"].join("");m.css(f,d);this._proportionallyResize()}c(this.handles[g])}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var d=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=d&&d[1]?d[1]:"se"}});if(h.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(d){var e=false;for(var f in this.handles){if(c(this.handles[f])[0]==d.target){e=true}}return !this.options.disabled&&e},_mouseStart:function(e){var g=this.options,j=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position"))){i.css({position:"absolute",top:j.top,left:j.left})}c.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();j=a(this.helper.css("left"));var h=a(this.helper.css("top"));if(g.containment){j+=c(g.containment).scrollLeft()||0;h+=c(g.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:h};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:j,top:h};this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof g.aspectRatio=="number"?g.aspectRatio:this.originalSize.width/this.originalSize.height||1;g=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",g=="auto"?this.axis+"-resize":g);i.addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var f=this.helper,h=this.originalMousePosition,g=this._change[this.axis];if(!g){return false}h=g.apply(this,[e,e.pageX-h.left||0,e.pageY-h.top||0]);if(this._aspectRatio||e.shiftKey){h=this._updateRatio(h,e)}h=this._respectSize(h,e);this._propagate("resize",e);f.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(h);this._trigger("resize",e,this.ui());return false},_mouseStop:function(e){this.resizing=false;var h=this.options,l=this;if(this._helper){var k=this._proportionallyResizeElements,j=k.length&&/textarea/i.test(k[0].nodeName);k=j&&c.ui.hasScroll(k[0],"left")?0:l.sizeDiff.height;j={width:l.size.width-(j?0:l.sizeDiff.width),height:l.size.height-k};k=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null;var i=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null;h.animate||this.element.css(c.extend(j,{top:i,left:k}));l.helper.height(l.size.height);l.helper.width(l.size.width);this._helper&&!h.animate&&this._proportionallyResize()}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",e);this._helper&&this.helper.remove();return false},_updateCache:function(d){this.offset=this.helper.offset();if(b(d.left)){this.position.left=d.left}if(b(d.top)){this.position.top=d.top}if(b(d.height)){this.size.height=d.height}if(b(d.width)){this.size.width=d.width}},_updateRatio:function(e){var f=this.position,h=this.size,g=this.axis;if(e.height){e.width=h.height*this.aspectRatio}else{if(e.width){e.height=h.width/this.aspectRatio}}if(g=="sw"){e.left=f.left+(h.width-e.width);e.top=null}if(g=="nw"){e.top=f.top+(h.height-e.height);e.left=f.left+(h.width-e.width)}return e},_respectSize:function(s){var u=this.options,r=this.axis,q=b(s.width)&&u.maxWidth&&u.maxWidth<s.width,p=b(s.height)&&u.maxHeight&&u.maxHeight<s.height,o=b(s.width)&&u.minWidth&&u.minWidth>s.width,n=b(s.height)&&u.minHeight&&u.minHeight>s.height;if(o){s.width=u.minWidth}if(n){s.height=u.minHeight}if(q){s.width=u.maxWidth}if(p){s.height=u.maxHeight}var m=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,e=/sw|nw|w/.test(r);r=/nw|ne|n/.test(r);if(o&&e){s.left=m-u.minWidth}if(q&&e){s.left=m-u.maxWidth}if(n&&r){s.top=l-u.minHeight}if(p&&r){s.top=l-u.maxHeight}if((u=!s.width&&!s.height)&&!s.left&&s.top){s.top=null}else{if(u&&!s.top&&s.left){s.left=null}}return s},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var e=this.helper||this.element,g=0;g<this._proportionallyResizeElements.length;g++){var j=this._proportionallyResizeElements[g];if(!this.borderDif){var i=[j.css("borderTopWidth"),j.css("borderRightWidth"),j.css("borderBottomWidth"),j.css("borderLeftWidth")],h=[j.css("paddingTop"),j.css("paddingRight"),j.css("paddingBottom"),j.css("paddingLeft")];this.borderDif=c.map(i,function(f,d){f=parseInt(f,10)||0;d=parseInt(h[d],10)||0;return f+d})}c.browser.msie&&(c(e).is(":hidden")||c(e).parents(":hidden").length)||j.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var d=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,f=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++d.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(d,e){return{width:this.originalSize.width+e}},w:function(d,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(d,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(d,e,f){return{height:this.originalSize.height+f}},se:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},sw:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,e,f]))},ne:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},nw:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,e,f]))}},_propagate:function(d,e){c.ui.plugin.call(this,d,[e,this.ui()]);d!="resize"&&this._trigger(d,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.4"});c.ui.plugin.add("resizable","alsoResize",{start:function(){var d=c(this).data("resizable").options,e=function(f){c(f).each(function(){var g=c(this);g.data("resizable-alsoresize",{width:parseInt(g.width(),10),height:parseInt(g.height(),10),left:parseInt(g.css("left"),10),top:parseInt(g.css("top"),10),position:g.css("position")})})};if(typeof d.alsoResize=="object"&&!d.alsoResize.parentNode){if(d.alsoResize.length){d.alsoResize=d.alsoResize[0];e(d.alsoResize)}else{c.each(d.alsoResize,function(f){e(f)})}}else{e(d.alsoResize)}},resize:function(e,i){var n=c(this).data("resizable");e=n.options;var m=n.originalSize,l=n.originalPosition,k={height:n.size.height-m.height||0,width:n.size.width-m.width||0,top:n.position.top-l.top||0,left:n.position.left-l.left||0},j=function(f,d){c(f).each(function(){var g=c(this),o=c(this).data("resizable-alsoresize"),s={},h=d&&d.length?d:g.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(h,function(q,p){if((q=(o[p]||0)+(k[p]||0))&&q>=0){s[p]=q||null}});if(c.browser.opera&&/relative/.test(g.css("position"))){n._revertToRelativePosition=true;g.css({position:"absolute",top:"auto",left:"auto"})}g.css(s)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(f,d){j(f,d)}):j(e.alsoResize)},stop:function(){var d=c(this).data("resizable"),e=d.options,f=function(g){c(g).each(function(){var h=c(this);h.css({position:h.data("resizable-alsoresize").position})})};if(d._revertToRelativePosition){d._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(g){f(g)}):f(e.alsoResize)}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(e){var i=c(this).data("resizable"),n=i.options,m=i._proportionallyResizeElements,l=m.length&&/textarea/i.test(m[0].nodeName),k=l&&c.ui.hasScroll(m[0],"left")?0:i.sizeDiff.height;l={width:i.size.width-(l?0:i.sizeDiff.width),height:i.size.height-k};k=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null;var j=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(c.extend(l,j&&k?{top:j,left:k}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var d={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};m&&m.length&&c(m[0]).css({width:d.width,height:d.height});i._updateCache(d);i._propagate("resize",e)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var e=c(this).data("resizable"),i=e.element,n=e.options.containment;if(i=n instanceof c?n.get(0):/parent/.test(n)?i.parent().get(0):n){e.containerElement=c(i);if(/document/.test(n)||n==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(i),l=[];c(["Top","Right","Left","Bottom"]).each(function(f,d){l[f]=a(m.css("padding"+d))});e.containerOffset=m.offset();e.containerPosition=m.position();e.containerSize={height:m.innerHeight()-l[3],width:m.innerWidth()-l[1]};n=e.containerOffset;var k=e.containerSize.height,j=e.containerSize.width;j=c.ui.hasScroll(i,"left")?i.scrollWidth:j;k=c.ui.hasScroll(i)?i.scrollHeight:k;e.parentData={element:i,left:n.left,top:n.top,width:j,height:k}}}},resize:function(e){var i=c(this).data("resizable"),n=i.options,m=i.containerOffset,l=i.position;e=i._aspectRatio||e.shiftKey;var k={top:0,left:0},j=i.containerElement;if(j[0]!=document&&/static/.test(j.css("position"))){k=m}if(l.left<(i._helper?m.left:0)){i.size.width+=i._helper?i.position.left-m.left:i.position.left-k.left;if(e){i.size.height=i.size.width/n.aspectRatio}i.position.left=n.helper?m.left:0}if(l.top<(i._helper?m.top:0)){i.size.height+=i._helper?i.position.top-m.top:i.position.top;if(e){i.size.width=i.size.height*n.aspectRatio}i.position.top=i._helper?m.top:0}i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;n=Math.abs((i._helper?i.offset.left-k.left:i.offset.left-k.left)+i.sizeDiff.width);m=Math.abs((i._helper?i.offset.top-k.top:i.offset.top-m.top)+i.sizeDiff.height);l=i.containerElement.get(0)==i.element.parent().get(0);k=/relative|absolute/.test(i.containerElement.css("position"));if(l&&k){n-=i.parentData.left}if(n+i.size.width>=i.parentData.width){i.size.width=i.parentData.width-n;if(e){i.size.height=i.size.width/i.aspectRatio}}if(m+i.size.height>=i.parentData.height){i.size.height=i.parentData.height-m;if(e){i.size.width=i.size.height*i.aspectRatio}}},stop:function(){var e=c(this).data("resizable"),j=e.options,p=e.containerOffset,o=e.containerPosition,n=e.containerElement,m=c(e.helper),l=m.offset(),k=m.outerWidth()-e.sizeDiff.width;m=m.outerHeight()-e.sizeDiff.height;e._helper&&!j.animate&&/relative/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m});e._helper&&!j.animate&&/static/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m})}});c.ui.plugin.add("resizable","ghost",{start:function(){var d=c(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var d=c(this).data("resizable");d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=c(this).data("resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var e=c(this).data("resizable"),i=e.options,n=e.size,m=e.originalSize,l=e.originalPosition,k=e.axis;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var j=Math.round((n.width-m.width)/(i.grid[0]||1))*(i.grid[0]||1);i=Math.round((n.height-m.height)/(i.grid[1]||1))*(i.grid[1]||1);if(/^(se|s|e)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{if(/^(ne)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}else{if(/^(sw)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}e.position.left=l.left-j}}}});var a=function(d){return parseInt(d,10)||0},b=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var b;this.refresh=function(){b=a(d.options.filter,d.element[0]);b.each(function(){var e=a(this),c=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:c.left,top:c.top,right:c.left+e.outerWidth(),bottom:c.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(g){var b=this;this.opos=[g.pageX,g.pageY];if(!this.options.disabled){var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",g);a(e.appendTo).append(this.helper);this.helper.css({left:g.clientX,top:g.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=a.data(this,"selectable-item");c.startselected=true;if(!g.metaKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=true;b._trigger("unselecting",g,{unselecting:c.element})}});a(g.target).parents().andSelf().each(function(){var c=a.data(this,"selectable-item");if(c){var d=!g.metaKey||!c.$element.hasClass("ui-selected");c.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting");c.unselecting=!d;c.selecting=d;(c.selected=d)?b._trigger("selecting",g,{selecting:c.element}):b._trigger("unselecting",g,{unselecting:c.element});return false}})}},_mouseDrag:function(q){var o=this;this.dragged=true;if(!this.options.disabled){var p=this.options,e=this.opos[0],n=this.opos[1],m=q.pageX,l=q.pageY;if(e>m){var k=m;m=e;e=k}if(n>l){k=l;l=n;n=k}this.helper.css({left:e,top:n,width:m-e,height:l-n});this.selectees.each(function(){var b=a.data(this,"selectable-item");if(!(!b||b.element==o.element[0])){var c=false;if(p.tolerance=="touch"){c=!(b.left>m||b.right<e||b.top>l||b.bottom<n)}else{if(p.tolerance=="fit"){c=b.left>e&&b.right<m&&b.top>n&&b.bottom<l}}if(c){if(b.selected){b.$element.removeClass("ui-selected");b.selected=false}if(b.unselecting){b.$element.removeClass("ui-unselecting");b.unselecting=false}if(!b.selecting){b.$element.addClass("ui-selecting");b.selecting=true;o._trigger("selecting",q,{selecting:b.element})}}else{if(b.selecting){if(q.metaKey&&b.startselected){b.$element.removeClass("ui-selecting");b.selecting=false;b.$element.addClass("ui-selected");b.selected=true}else{b.$element.removeClass("ui-selecting");b.selecting=false;if(b.startselected){b.$element.addClass("ui-unselecting");b.unselecting=true}o._trigger("unselecting",q,{unselecting:b.element})}}if(b.selected){if(!q.metaKey&&!b.startselected){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;o._trigger("unselecting",q,{unselecting:b.element})}}}}});return false}},_mouseStop:function(d){var b=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=false;b._trigger("unselected",d,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;b._trigger("selected",d,{selected:c.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}return this},_setOption:function(d,c){if(d==="disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(g,d){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(g);var j=null,i=this;a(g.target).parents().each(function(){if(a.data(this,"sortable-item")==i){j=a(this);return false}});if(a.data(g.target,"sortable-item")==i){j=a(g.target)}if(!j){return false}if(this.options.handle&&!d){var h=false;a(this.options.handle,j).find("*").andSelf().each(function(){if(this==g.target){h=true}});if(!h){return false}}this.currentItem=j;this._removeCurrentsFromItems();return true},_mouseStart:function(f,d,h){d=this.options;var g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();d.containment&&this._setContainment();if(d.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",d.cursor)}if(d.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",d.opacity)}if(d.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",d.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!h){for(h=this.containers.length-1;h>=0;h--){this.containers[h]._trigger("activate",f,g._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var d=this.options,j=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-g.pageY<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop+d.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop-d.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-g.pageX<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft-d.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}j!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(d=this.items.length-1;d>=0;d--){j=this.items[d];var i=j.item[0],h=this._intersectsWithPointer(j);if(h){if(i!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=i&&!a.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],i):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(j)){this._rearrange(g,j)}else{break}this._trigger("change",g,this._uiHash());break}}}this._contactContainers(g);a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(e,d){if(e){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,e);if(this.options.revert){var f=this;d=f.placeholder.offset();f.reverting=true;a(this.helper).animate({left:d.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(e)})}else{this._clear(e,d)}return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};a(d).each(function(){var b=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);if(b){f.push((e.key||b[1]+"[]")+"="+(e.key&&e.expression?b[1]:b[2]))}});!f.length&&e.key&&f.push(e.key+"=");return f.join("&")},toArray:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};d.each(function(){f.push(a(e.item||this).attr(e.attribute||"id")||"")});return f},_intersectsWith:function(w){var v=this.positionAbs.left,u=v+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,q=w.left,p=q+w.width,o=w.top,m=o+w.height,n=this.offset.click.top,d=this.offset.click.left;n=s+n>o&&s+n<m&&v+d>q&&v+d<p;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>w[this.floating?"width":"height"]?n:q<v+this.helperProportions.width/2&&u-this.helperProportions.width/2<p&&o<s+this.helperProportions.height/2&&r-this.helperProportions.height/2<m},_intersectsWithPointer:function(e){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height);e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);d=d&&e;e=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!d){return false}return this.floating?f&&f=="right"||e=="down"?2:1:e&&(e=="down"?2:1)},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height);f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width);var h=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return this.floating&&g?g=="right"&&f||g=="left"&&!f:h&&(h=="down"&&d||h=="up"&&!d)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(i){var d=[],n=[],m=this._connectWith();if(m&&i){for(i=m.length-1;i>=0;i--){for(var l=a(m[i]),k=l.length-1;k>=0;k--){var j=a.data(l[k],"sortable");if(j&&j!=this&&!j.options.disabled){n.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}}}n.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=n.length-1;i>=0;i--){n[i][0].each(function(){d.push(this)})}return a(d)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data(sortable-item)"),d=0;d<this.items.length;d++){for(var f=0;f<e.length;f++){e[f]==this.items[d].item[0]&&this.items.splice(d,1)}}},_refreshItems:function(j){this.items=[];this.containers=[this];var d=this.items,p=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],j,{item:this.currentItem}):a(this.options.items,this.element),this]],o=this._connectWith();if(o){for(var n=o.length-1;n>=0;n--){for(var m=a(o[n]),l=m.length-1;l>=0;l--){var k=a.data(m[l],"sortable");if(k&&k!=this&&!k.options.disabled){p.push([a.isFunction(k.options.items)?k.options.items.call(k.element[0],j,{item:this.currentItem}):a(k.options.items,k.element),k]);this.containers.push(k)}}}}for(n=p.length-1;n>=0;n--){j=p[n][1];o=p[n][0];l=0;for(m=o.length;l<m;l++){k=a(o[l]);k.data("sortable-item",j);d.push({item:k,instance:j,width:0,height:0,left:0,top:0})}}},refreshPositions:function(f){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var h=this.items[d],g=this.options.toleranceElement?a(this.options.toleranceElement,h.item):h.item;if(!f){h.width=g.outerWidth();h.height=g.outerHeight()}g=g.offset();h.left=g.left;h.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(d=this.containers.length-1;d>=0;d--){g=this.containers[d].element.offset();this.containers[d].containerCache.left=g.left;this.containers[d].containerCache.top=g.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}return this},_createPlaceholder:function(f){var d=f||this,h=d.options;if(!h.placeholder||h.placeholder.constructor==String){var g=h.placeholder;h.placeholder={element:function(){var b=a(document.createElement(d.currentItem[0].nodeName)).addClass(g||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g){b.style.visibility="hidden"}return b},update:function(c,b){if(!(g&&!h.forcePlaceholderSize)){b.height()||b.height(d.currentItem.innerHeight()-parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||0,10));b.width()||b.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=a(h.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);h.placeholder.update(d,d.placeholder)},_contactContainers:function(i){for(var d=null,n=null,m=this.containers.length-1;m>=0;m--){if(!a.ui.contains(this.currentItem[0],this.containers[m].element[0])){if(this._intersectsWith(this.containers[m].containerCache)){if(!(d&&a.ui.contains(this.containers[m].element[0],d.element[0]))){d=this.containers[m];n=m}}else{if(this.containers[m].containerCache.over){this.containers[m]._trigger("out",i,this._uiHash(this));this.containers[m].containerCache.over=0}}}}if(d){if(this.containers.length===1){this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}else{if(this.currentContainer!=this.containers[n]){d=10000;m=null;for(var l=this.positionAbs[this.containers[n].floating?"left":"top"],k=this.items.length-1;k>=0;k--){if(a.ui.contains(this.containers[n].element[0],this.items[k].item[0])){var j=this.items[k][this.containers[n].floating?"left":"top"];if(Math.abs(j-l)<d){d=Math.abs(j-l);m=this.items[k]}}}if(m||this.options.dropOnEmpty){this.currentContainer=this.containers[n];m?this._rearrange(i,m,null,true):this._rearrange(i,null,this.containers[n].element,true);this._trigger("change",i,this._uiHash());this.containers[n]._trigger("change",i,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}}}}},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[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")}}if(d[0].style.width==""||c.forceHelperSize){d.width(this.currentItem.width())}if(d[0].style.height==""||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)){var d=a(e.containment)[0];e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,d){if(!d){d=this.position}f=f=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*f),left:d.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*f)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,k=/(html|body)/i.test(l[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var j=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){j=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){j=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;j=this.originalPageX+Math.round((j-this.originalPageX)/d.grid[0])*d.grid[0];j=this.containment?!(j-this.offset.click.left<this.containment[0]||j-this.offset.click.left>this.containment[2])?j:!(j-this.offset.click.left<this.containment[0])?j-d.grid[0]:j+d.grid[0]:j}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():k?0:l.scrollTop()),left:j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():k?0:l.scrollLeft())}},_rearrange:function(h,d,l,k){l?l[0].appendChild(this.placeholder[0]):d.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?d.item[0]:d.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var j=this,i=this.counter;window.setTimeout(function(){i==j.counter&&j.refreshPositions(!k)},0)},_clear:function(f,d){this.reverting=false;var h=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var g in this._storedCSS){if(this._storedCSS[g]=="auto"||this._storedCSS[g]=="static"){this._storedCSS[g]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!d&&h.push(function(b){this._trigger("receive",b,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!d){h.push(function(b){this._trigger("update",b,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){d||h.push(function(b){this._trigger("remove",b,this._uiHash())});for(g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!d){h.push(function(b){return function(c){b._trigger("receive",c,this._uiHash(this))}}.call(this,this.containers[g]));h.push(function(b){return function(c){b._trigger("update",c,this._uiHash(this))}}.call(this,this.containers[g]))}}}for(g=this.containers.length-1;g>=0;g--){d||h.push(function(b){return function(c){b._trigger("deactivate",c,this._uiHash(this))}}.call(this,this.containers[g]));if(this.containers[g].containerCache.over){h.push(function(b){return function(c){b._trigger("out",c,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!d){this._trigger("beforeStop",f,this._uiHash());for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}return false}d||this._trigger("beforeStop",f,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!d){for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.4"})})(jQuery);jQuery.effects||function(q,i){function g(j){var f;if(j&&j.constructor==Array&&j.length==3){return j}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(j)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(j)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(j)){return e.transparent}return e[q.trim(j).toLowerCase()]}function a(k,j){var f;do{f=q.curCSS(k,j);if(f!=""&&f!="transparent"||q.nodeName(k,"body")){break}j="backgroundColor"}while(k=k.parentNode);return g(f)}function d(){var m=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,j={},f,l;if(m&&m.length&&m[0]&&m[m[0]]){for(var k=m.length;k--;){f=m[k];if(typeof m[f]=="string"){l=f.replace(/\-(\w)/g,function(o,n){return n.toUpperCase()});j[l]=m[f]}}}else{for(f in m){if(typeof m[f]==="string"){j[f]=m[f]}}}return j}function c(k){var j,f;for(j in k){f=k[j];if(f==null||q.isFunction(f)||j in v||/scrollbar/.test(j)||!/color/i.test(j)&&isNaN(parseFloat(f))){delete k[j]}}return k}function u(l,j){var f={_:0},k;for(k in j){if(l[k]!=j[k]){f[k]=j[k]}}return f}function h(l,j,f,k){if(typeof l=="object"){k=j;f=null;j=l;l=j.effect}if(q.isFunction(j)){k=j;f=null;j={}}if(typeof j=="number"||q.fx.speeds[j]){k=f;f=j;j={}}if(q.isFunction(f)){k=f;f=null}j=j||{};f=f||j.duration;f=q.fx.off?0:typeof f=="number"?f:q.fx.speeds[f]||q.fx.speeds._default;k=k||j.complete;return[l,j,f,k]}q.effects={};q.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(j,f){q.fx.step[f]=function(k){if(!k.colorInit){k.start=a(k.elem,f);k.end=g(k.end);k.colorInit=true}k.elem.style[f]="rgb("+Math.max(Math.min(parseInt(k.pos*(k.end[0]-k.start[0])+k.start[0],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[1]-k.start[1])+k.start[1],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[2]-k.start[2])+k.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},b=["add","remove","toggle"],v={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};q.effects.animateClass=function(l,j,f,k){if(q.isFunction(f)){k=f;f=null}return this.each(function(){var r=q(this),o=r.attr("style")||" ",n=c(d.call(this)),p,m=r.attr("className");q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});p=c(d.call(this));r.attr("className",m);r.animate(u(n,p),j,f,function(){q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=o}else{r.attr("style",o)}k&&k.apply(this,arguments)})})};q.fn.extend({_addClass:q.fn.addClass,addClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{add:l},j,f,k]):this._addClass(l)},_removeClass:q.fn.removeClass,removeClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{remove:l},j,f,k]):this._removeClass(l)},_toggleClass:q.fn.toggleClass,toggleClass:function(m,j,f,l,k){return typeof j=="boolean"||j===i?f?q.effects.animateClass.apply(this,[j?{add:m}:{remove:m},f,l,k]):this._toggleClass(m,j):q.effects.animateClass.apply(this,[{toggle:m},j,f,l])},switchClass:function(m,j,f,l,k){return q.effects.animateClass.apply(this,[{add:j,remove:m},f,l,k])}});q.extend(q.effects,{version:"1.8.4",save:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.data("ec.storage."+j[f],k[0].style[j[f]])}},restore:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.css(j[f],k.data("ec.storage."+j[f]))}},setMode:function(j,f){if(f=="toggle"){f=j.is(":hidden")?"show":"hide"}return f},getBaseline:function(k,j){var f;switch(k[0]){case"top":f=0;break;case"middle":f=0.5;break;case"bottom":f=1;break;default:f=k[0]/j.height}switch(k[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=k[1]/j.width}return{x:k,y:f}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent()}var j={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},f=q("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(f);f=k.parent();if(k.css("position")=="static"){f.css({position:"relative"});k.css({position:"relative"})}else{q.extend(j,{position:k.css("position"),zIndex:k.css("z-index")});q.each(["top","left","bottom","right"],function(m,l){j[l]=k.css(l);if(isNaN(parseInt(j[l],10))){j[l]="auto"}});k.css({position:"relative",top:0,left:0})}return f.css(j).show()},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(l,j,f,k){k=k||{};q.each(j,function(n,m){unit=l.cssUnit(m);if(unit[0]>0){k[m]=unit[0]*f+unit[1]}});return k}});q.fn.extend({effect:function(k){var j=h.apply(this,arguments);j={options:j[1],duration:j[2],callback:j[3]};var f=q.effects[k];return f&&!q.fx.off?f.call(this,j):this},_show:q.fn.show,show:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._show.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="show";return this.effect.apply(this,f)}},_hide:q.fn.hide,hide:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._hide.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="hide";return this.effect.apply(this,f)}},__toggle:q.fn.toggle,toggle:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]||typeof j=="boolean"||q.isFunction(j)){return this.__toggle.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(k){var j=this.css(k),f=[];q.each(["em","px","%","pt"],function(m,l){if(j.indexOf(l)>0){f=[parseFloat(j),l]}});return f}});q.easing.jswing=q.easing.swing;q.extend(q.easing,{def:"easeOutQuad",swing:function(m,j,f,l,k){return q.easing[q.easing.def](m,j,f,l,k)},easeInQuad:function(m,j,f,l,k){return l*(j/=k)*j+f},easeOutQuad:function(m,j,f,l,k){return -l*(j/=k)*(j-2)+f},easeInOutQuad:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j+f}return -l/2*(--j*(j-2)-1)+f},easeInCubic:function(m,j,f,l,k){return l*(j/=k)*j*j+f},easeOutCubic:function(m,j,f,l,k){return l*((j=j/k-1)*j*j+1)+f},easeInOutCubic:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j+f}return l/2*((j-=2)*j*j+2)+f},easeInQuart:function(m,j,f,l,k){return l*(j/=k)*j*j*j+f},easeOutQuart:function(m,j,f,l,k){return -l*((j=j/k-1)*j*j*j-1)+f},easeInOutQuart:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j+f}return -l/2*((j-=2)*j*j*j-2)+f},easeInQuint:function(m,j,f,l,k){return l*(j/=k)*j*j*j*j+f},easeOutQuint:function(m,j,f,l,k){return l*((j=j/k-1)*j*j*j*j+1)+f},easeInOutQuint:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j*j+f}return l/2*((j-=2)*j*j*j*j+2)+f},easeInSine:function(m,j,f,l,k){return -l*Math.cos(j/k*(Math.PI/2))+l+f},easeOutSine:function(m,j,f,l,k){return l*Math.sin(j/k*(Math.PI/2))+f},easeInOutSine:function(m,j,f,l,k){return -l/2*(Math.cos(Math.PI*j/k)-1)+f},easeInExpo:function(m,j,f,l,k){return j==0?f:l*Math.pow(2,10*(j/k-1))+f},easeOutExpo:function(m,j,f,l,k){return j==k?f+l:l*(-Math.pow(2,-10*j/k)+1)+f},easeInOutExpo:function(m,j,f,l,k){if(j==0){return f}if(j==k){return f+l}if((j/=k/2)<1){return l/2*Math.pow(2,10*(j-1))+f}return l/2*(-Math.pow(2,-10*--j)+2)+f},easeInCirc:function(m,j,f,l,k){return -l*(Math.sqrt(1-(j/=k)*j)-1)+f},easeOutCirc:function(m,j,f,l,k){return l*Math.sqrt(1-(j=j/k-1)*j)+f},easeInOutCirc:function(m,j,f,l,k){if((j/=k/2)<1){return -l/2*(Math.sqrt(1-j*j)-1)+f}return l/2*(Math.sqrt(1-(j-=2)*j)+1)+f},easeInElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return -(k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l))+f},easeOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return k*Math.pow(2,-10*j)*Math.sin((j*m-o)*2*Math.PI/l)+n+f},easeInOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m/2)==2){return f+n}l||(l=m*0.3*1.5);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}if(j<1){return -0.5*k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)+f}return k*Math.pow(2,-10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)*0.5+n+f},easeInBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*(j/=l)*j*((k+1)*j-k)+f},easeOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*((j=j/l-1)*j*((k+1)*j+k)+1)+f},easeInOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}if((j/=l/2)<1){return m/2*j*j*(((k*=1.525)+1)*j-k)+f}return m/2*((j-=2)*j*(((k*=1.525)+1)*j+k)+2)+f},easeInBounce:function(m,j,f,l,k){return l-q.easing.easeOutBounce(m,k-j,0,l,k)+f},easeOutBounce:function(m,j,f,l,k){return(j/=k)<1/2.75?l*7.5625*j*j+f:j<2/2.75?l*(7.5625*(j-=1.5/2.75)*j+0.75)+f:j<2.5/2.75?l*(7.5625*(j-=2.25/2.75)*j+0.9375)+f:l*(7.5625*(j-=2.625/2.75)*j+0.984375)+f},easeInOutBounce:function(m,j,f,l,k){if(j<k/2){return q.easing.easeInBounce(m,j*2,0,l,k)*0.5+f}return q.easing.easeOutBounce(m,j*2-k,0,l,k)*0.5+l*0.5+f}})}(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var c=a(this),l=["position","top","left"],m=a.effects.setMode(c,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(c,l);c.show();var n=a.effects.createWrapper(c).css({overflow:"hidden"}),k=o=="vertical"?"height":"width";o=o=="vertical"?n.height():n.width();m=="show"&&n.css(k,0);var j={};j[k]=m=="show"?o:0;n.animate(j,b.duration,b.options.easing,function(){m=="hide"&&c.hide();a.effects.restore(c,l);a.effects.removeWrapper(c);b.callback&&b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a){a.effects.bounce=function(c){return this.queue(function(){var w=a(this),e=["position","top","left"],q=a.effects.setMode(w,c.options.mode||"effect"),u=c.options.direction||"up",v=c.options.distance||20,b=c.options.times||5,p=c.duration||250;/show|hide/.test(q)&&e.push("opacity");a.effects.save(w,e);w.show();a.effects.createWrapper(w);var s=u=="up"||u=="down"?"top":"left";u=u=="up"||u=="left"?"pos":"neg";v=c.options.distance||(s=="top"?w.outerHeight({margin:true})/3:w.outerWidth({margin:true})/3);if(q=="show"){w.css("opacity",0).css(s,u=="pos"?-v:v)}if(q=="hide"){v/=b*2}q!="hide"&&b--;if(q=="show"){var r={opacity:1};r[s]=(u=="pos"?"+=":"-=")+v;w.animate(r,p/2,c.options.easing);v/=2;b--}for(r=0;r<b;r++){var o={},n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing);v=q=="hide"?v*2:v/2}if(q=="hide"){r={opacity:0};r[s]=(u=="pos"?"-=":"+=")+v;w.animate(r,p/2,c.options.easing,function(){w.hide();a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}else{o={};n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing,function(){a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}w.queue("fx",function(){w.dequeue()});w.dequeue()})}})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var e=a(this),j=["position","top","left","height","width"],m=a.effects.setMode(e,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(e,j);e.show();var n=a.effects.createWrapper(e).css({overflow:"hidden"});n=e[0].tagName=="IMG"?n:e;var l={size:o=="vertical"?"height":"width",position:o=="vertical"?"top":"left"};o=o=="vertical"?n.height():n.width();if(m=="show"){n.css(l.size,0);n.css(l.position,o/2)}var k={};k[l.size]=m=="show"?o:0;k[l.position]=m=="show"?0:o/2;n.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){m=="hide"&&e.hide();a.effects.restore(e,j);a.effects.removeWrapper(e);b.callback&&b.callback.apply(e[0],arguments);e.dequeue()}})})}})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var d=a(this),k=["position","top","left","opacity"],n=a.effects.setMode(d,b.options.mode||"hide"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d);var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true})/2:d.outerWidth({margin:true})/2);if(n=="show"){d.css("opacity",0).css(m,c=="pos"?-l:l)}var j={opacity:n=="show"?1:0};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var q=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,p=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var j=a(this).show().css("visibility","hidden"),m=j.offset();m.top-=parseInt(j.css("marginTop"),10)||0;m.left-=parseInt(j.css("marginLeft"),10)||0;for(var l=j.outerWidth(true),k=j.outerHeight(true),o=0;o<q;o++){for(var n=0;n<p;n++){j.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*(l/p),top:-o*(k/q)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:l/p,height:k/q,left:m.left+n*(l/p)+(b.options.mode=="show"?(n-Math.floor(p/2))*(l/p):0),top:m.top+o*(k/q)+(b.options.mode=="show"?(o-Math.floor(q/2))*(k/q):0),opacity:b.options.mode=="show"?0:1}).animate({left:m.left+n*(l/p)+(b.options.mode=="show"?0:(n-Math.floor(p/2))*(l/p)),top:m.top+o*(k/q)+(b.options.mode=="show"?0:(o-Math.floor(q/2))*(k/q)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?j.css({visibility:"visible"}):j.css({visibility:"visible"}).hide();b.callback&&b.callback.apply(j[0]);j.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fade=function(b){return this.queue(function(){var f=a(this),e=a.effects.setMode(f,b.options.mode||"hide");f.animate({opacity:e},{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"],u=a.effects.setMode(v,b.options.mode||"hide"),q=b.options.size||15,p=!!b.options.horizFirst,m=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(v,n);v.show();var s=a.effects.createWrapper(v).css({overflow:"hidden"}),r=u=="show"!=p,c=r?["width","height"]:["height","width"];r=r?[s.width(),s.height()]:[s.height(),s.width()];var o=/([0-9]+)%/.exec(q);if(o){q=parseInt(o[1],10)/100*r[u=="hide"?0:1]}if(u=="show"){s.css(p?{height:0,width:q}:{height:q,width:0})}p={};o={};p[c[0]]=u=="show"?r[0]:q;o[c[1]]=u=="show"?r[1]:0;s.animate(p,m,b.options.easing).animate(o,m,b.options.easing,function(){u=="hide"&&v.hide();a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(v[0],arguments);v.dequeue()})})}})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),h=["backgroundImage","backgroundColor","opacity"],i=a.effects.setMode(c,b.options.mode||"show"),g={backgroundColor:c.css("backgroundColor")};if(i=="hide"){g.opacity=0}a.effects.save(c,h);c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){i=="hide"&&c.hide();a.effects.restore(c,h);i=="show"&&!a.support.opacity&&this.style.removeAttribute("filter");b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,b.options.mode||"show");times=(b.options.times||5)*2-1;duration=b.duration?b.duration/2:a.fx.speeds._default/2;isVisible=d.is(":visible");animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if(e=="hide"&&isVisible||e=="show"&&!isVisible){times--}for(e=0;e<times;e++){d.animate({opacity:animateTo},duration,b.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,b.options.easing,function(){animateTo==0&&d.hide();b.callback&&b.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);(function(a){a.effects.puff=function(c){return this.queue(function(){var b=a(this),k=a.effects.setMode(b,c.options.mode||"hide"),j=parseInt(c.options.percent,10)||150,f=j/100,d={height:b.height(),width:b.width()};a.extend(c.options,{fade:true,mode:k,percent:k=="hide"?j:100,from:k=="hide"?d:{height:d.height*f,width:d.width*f}});b.effect("scale",c.options,c.duration,c.callback);b.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var b=a(this),m=a.extend(true,{},c.options),k=a.effects.setMode(b,c.options.mode||"effect"),j=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:k=="hide"?0:100),d=c.options.direction||"both",l=c.options.origin;if(k!="effect"){m.origin=l||["middle","center"];m.restore=true}l={height:b.height(),width:b.width()};b.from=c.options.from||(k=="show"?{height:0,width:0}:l);j={y:d!="horizontal"?j/100:1,x:d!="vertical"?j/100:1};b.to={height:l.height*j.y,width:l.width*j.x};if(c.options.fade){if(k=="show"){b.from.opacity=0;b.to.opacity=1}if(k=="hide"){b.from.opacity=1;b.to.opacity=0}}m.from=b.from;m.to=b.to;m.mode=k;b.effect("size",m,c.duration,c.callback);b.dequeue()})};a.effects.size=function(c){return this.queue(function(){var B=a(this),z=["position","top","left","width","height","overflow","opacity"],x=["position","top","left","overflow","opacity"],w=["width","height","overflow"],v=["fontSize"],y=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],s=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],b=a.effects.setMode(B,c.options.mode||"effect"),o=c.options.restore||false,q=c.options.scale||"both",r=c.options.origin,u={height:B.height(),width:B.width()};B.from=c.options.from||u;B.to=c.options.to||u;if(r){r=a.effects.getBaseline(r,u);B.from.top=(u.height-B.from.height)*r.y;B.from.left=(u.width-B.from.width)*r.x;B.to.top=(u.height-B.to.height)*r.y;B.to.left=(u.width-B.to.width)*r.x}var A={from:{y:B.from.height/u.height,x:B.from.width/u.width},to:{y:B.to.height/u.height,x:B.to.width/u.width}};if(q=="box"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(y);B.from=a.effects.setTransition(B,y,A.from.y,B.from);B.to=a.effects.setTransition(B,y,A.to.y,B.to)}if(A.from.x!=A.to.x){z=z.concat(s);B.from=a.effects.setTransition(B,s,A.from.x,B.from);B.to=a.effects.setTransition(B,s,A.to.x,B.to)}}if(q=="content"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(v);B.from=a.effects.setTransition(B,v,A.from.y,B.from);B.to=a.effects.setTransition(B,v,A.to.y,B.to)}}a.effects.save(B,o?z:x);B.show();a.effects.createWrapper(B);B.css("overflow","hidden").css(B.from);if(q=="content"||q=="both"){y=y.concat(["marginTop","marginBottom"]).concat(v);s=s.concat(["marginLeft","marginRight"]);w=z.concat(y).concat(s);B.find("*[width]").each(function(){child=a(this);o&&a.effects.save(child,w);var d={height:child.height(),width:child.width()};child.from={height:d.height*A.from.y,width:d.width*A.from.x};child.to={height:d.height*A.to.y,width:d.width*A.to.x};if(A.from.y!=A.to.y){child.from=a.effects.setTransition(child,y,A.from.y,child.from);child.to=a.effects.setTransition(child,y,A.to.y,child.to)}if(A.from.x!=A.to.x){child.from=a.effects.setTransition(child,s,A.from.x,child.from);child.to=a.effects.setTransition(child,s,A.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){o&&a.effects.restore(child,w)})})}B.animate(B.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){B.to.opacity===0&&B.css("opacity",B.from.opacity);b=="hide"&&B.hide();a.effects.restore(B,o?z:x);a.effects.removeWrapper(B);c.callback&&c.callback.apply(this,arguments);B.dequeue()}})})}})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"];a.effects.setMode(v,b.options.mode||"effect");var u=b.options.direction||"left",s=b.options.distance||20,d=b.options.times||3,r=b.duration||b.options.duration||140;a.effects.save(v,n);v.show();a.effects.createWrapper(v);var q=u=="up"||u=="down"?"top":"left",p=u=="up"||u=="left"?"pos":"neg";u={};var o={},m={};u[q]=(p=="pos"?"-=":"+=")+s;o[q]=(p=="pos"?"+=":"-=")+s*2;m[q]=(p=="pos"?"-=":"+=")+s*2;v.animate(u,r,b.options.easing);for(s=1;s<d;s++){v.animate(o,r,b.options.easing).animate(m,r,b.options.easing)}v.animate(o,r,b.options.easing).animate(u,r/2,b.options.easing,function(){a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(this,arguments)});v.queue("fx",function(){v.dequeue()});v.dequeue()})}})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var d=a(this),k=["position","top","left"],n=a.effects.setMode(d,b.options.mode||"show"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d).css({overflow:"hidden"});var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(n=="show"){d.css(m,c=="pos"?-l:l)}var j={};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var e=a(this),i=a(b.options.to),h=i.offset();i={top:h.top,left:h.left,height:i.innerHeight(),width:i.innerWidth()};h=e.offset();var g=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:h.top,left:h.left,height:e.innerHeight(),width:e.innerWidth(),position:"absolute"}).animate(i,b.duration,b.options.easing,function(){g.remove();b.callback&&b.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var e=this,c=e.options;e.running=0;e.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");e.headers=e.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});e.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var h=e.element.find("a").filter(c.navigationFilter).eq(0);if(h.length){var g=h.closest(".ui-accordion-header");e.active=g.length?g:h.closest(".ui-accordion-content").prev()}}e.active=e._findActive(e.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");e.active.next().addClass("ui-accordion-content-active");e._createIcons();e.resize();e.element.attr("role","tablist");e.headers.attr("role","tab").bind("keydown.accordion",function(b){return e._keydown(b)}).next().attr("role","tabpanel");e.headers.not(e.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();e.active.length?e.active.attr({"aria-expanded":"true",tabIndex:0}):e.headers.eq(0).attr("tabIndex",0);a.browser.safari||e.headers.find("a").attr("tabIndex",-1);c.event&&e.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(b){e._clickHandler.call(e,b,this);b.preventDefault()})},_createIcons:function(){var b=this.options;if(b.icons){a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight){c.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();c&&this._createIcons()}if(d=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(e){if(!(this.options.disabled||e.altKey||e.ctrlKey)){var c=a.ui.keyCode,j=this.headers.length,i=this.headers.index(e.target),h=false;switch(e.keyCode){case c.RIGHT:case c.DOWN:h=this.headers[(i+1)%j];break;case c.LEFT:case c.UP:h=this.headers[(i-1+j)%j];break;case c.SPACE:case c.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(h){a(e.target).attr("tabIndex",-1);a(h).attr("tabIndex",0);h.focus();return false}return true}},resize:function(){var e=this.options,c;if(e.fillSpace){if(a.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(e.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}}return this},activate:function(b){this.options.active=b;b=this._findActive(b)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b==="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(e,c){var l=this.options;if(!l.disabled){if(e.target){e=a(e.currentTarget||c);c=e[0]===this.active[0];l.active=l.collapsible&&c?false:this.headers.index(e);if(!(this.running||!l.collapsible&&c)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);if(!c){e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(l.icons.header).addClass(l.icons.headerSelected);e.next().addClass("ui-accordion-content-active")}i=e.next();k=this.active.next();j={options:l,newHeader:c&&l.collapsible?a([]):e,oldHeader:this.active,newContent:c&&l.collapsible?a([]):i,oldContent:k};l=this.headers.index(this.active[0])>this.headers.index(e[0]);this.active=c?a([]):e;this._toggle(i,k,j,c,l)}}else{if(l.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);this.active.next().addClass("ui-accordion-content-active");var k=this.active.next(),j={options:l,newHeader:a([]),oldHeader:l.active,newContent:a([]),oldContent:k},i=this.active=a([]);this._toggle(i,k,j)}}}},_toggle:function(u,s,r,p,o){var n=this,q=n.options;n.toShow=u;n.toHide=s;n.data=r;var l=function(){if(n){return n._completed.apply(n,arguments)}};n._trigger("changestart",null,n.data);n.running=s.size()===0?u.size():s.size();if(q.animated){r={};r=q.collapsible&&p?{toShow:a([]),toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace}:{toShow:u,toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace};if(!q.proxied){q.proxied=q.animated}if(!q.proxiedDuration){q.proxiedDuration=q.duration}q.animated=a.isFunction(q.proxied)?q.proxied(r):q.proxied;q.duration=a.isFunction(q.proxiedDuration)?q.proxiedDuration(r):q.proxiedDuration;p=a.ui.accordion.animations;var m=q.duration,c=q.animated;if(c&&!p[c]&&!a.easing[c]){c="slide"}p[c]||(p[c]=function(b){this.slide(b,{easing:c,duration:m||700})});p[c](r)}else{if(q.collapsible&&p){u.toggle()}else{s.hide();u.show()}l(true)}s.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();u.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(b){this.running=b?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.4",animations:{slide:function(i,c){i=a.extend({easing:"swing",duration:300},i,c);if(i.toHide.size()){if(i.toShow.size()){var n=i.toShow.css("overflow"),l=0,k={},j={},m;c=i.toShow;m=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(b,d){j[d]="hide";b=(""+a.css(i.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);k[d]={value:b[1],unit:b[2]||"px"}});i.toShow.css({height:0,overflow:"hidden"}).show();i.toHide.filter(":hidden").each(i.complete).end().filter(":visible").animate(j,{step:function(b,d){if(d.prop=="height"){l=d.end-d.start===0?0:(d.now-d.start)/(d.end-d.start)}i.toShow[0].style[d.prop]=l*k[d.prop].value+k[d.prop].unit},duration:i.duration,easing:i.easing,complete:function(){i.autoHeight||i.toShow.css("height","");i.toShow.css({width:m,overflow:n});i.complete()}})}else{i.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},i)}}else{i.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},i)}},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})}}})})(jQuery);(function(a){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var d=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!d.options.disabled){var b=a.ui.keyCode;switch(e.keyCode){case b.PAGE_UP:d._move("previousPage",e);break;case b.PAGE_DOWN:d._move("nextPage",e);break;case b.UP:d._move("previous",e);e.preventDefault();break;case b.DOWN:d._move("next",e);e.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:d.menu.element.is(":visible")&&e.preventDefault();case b.TAB:if(!d.menu.active){return}d.menu.select(e);break;case b.ESCAPE:d.element.val(d.term);d.close(e);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,e)}},d.options.delay);break}}}).bind("focus.autocomplete",function(){if(!d.options.disabled){d.selectedItem=null;d.previous=d.element.val()}}).bind("blur.autocomplete",function(b){if(!d.options.disabled){clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(b);d._change(b)},150)}});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(e){var b=d.menu.element[0];e.target===b&&setTimeout(function(){a(document).one("mousedown",function(g){g.target!==d.element[0]&&g.target!==b&&!a.ui.contains(b,g.target)&&d.close()})},1);setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(e,b){b=b.item.data("item.autocomplete");false!==d._trigger("focus",null,{item:b})&&/^key/.test(e.originalEvent.type)&&d.element.val(b.value)},selected:function(g,e){e=e.item.data("item.autocomplete");var b=d.previous;if(d.element[0]!==c.activeElement){d.element.focus();d.previous=b}false!==d._trigger("select",g,{item:e})&&d.element.val(e.value);d.close(g);d.selectedItem=e},blur:function(){d.menu.element.is(":visible")&&d.element.val()!==d.term&&d.element.val(d.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d==="source"&&this._initSource();if(d==="appendTo"){this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0])}},_initSource:function(){var d,c;if(a.isArray(this.options.source)){d=this.options.source;this.source=function(e,b){b(a.ui.autocomplete.filter(d,e.term))}}else{if(typeof this.options.source==="string"){c=this.options.source;this.source=function(e,b){a.getJSON(c,e,b)}}else{this.source=this.options.source}}},search:function(d,c){d=d!=null?d:this.element.val();if(d.length<this.options.minLength){return this.close(c)}clearTimeout(this.closing);if(this._trigger("search")!==false){return this._search(d)}},_search:function(b){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:b},this.response)},_response:function(b){if(b.length){b=this._normalize(b);this._suggest(b);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")},close:function(b){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",b);this.menu.element.hide();this.menu.deactivate()}},_change:function(b){this.previous!==this.element.val()&&this._trigger("change",b,{item:this.selectedItem})},_normalize:function(b){if(b.length&&b[0].label&&b[0].value){return b}return a.map(b,function(c){if(typeof c==="string"){return{label:c,value:c}}return a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(e){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1),f;this._renderMenu(d,e);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(a.extend({of:this.element},this.options.position));e=d.width("").outerWidth();f=this.element.outerWidth();d.outerWidth(Math.max(e,f))},_renderMenu:function(e,d){var f=this;a.each(d,function(c,b){f._renderItem(e,b)})},_renderItem:function(d,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(d)},_move:function(d,c){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[d](c)}}else{this.search(null,c)}},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,d){var f=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(e,function(b){return f.test(b.label||b.value||b)})}})})(jQuery);(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();b.select(c)}});this.refresh()},refresh:function(){var b=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(g,e){this.deactivate();if(this.hasScroll()){var j=e.offset().top-this.element.offset().top,i=this.element.attr("scrollTop"),h=this.element.height();if(j<0){this.element.attr("scrollTop",i+j)}else{j>h&&this.element.attr("scrollTop",i+j-h+e.height())}}this.active=e.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",g,{item:e})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,d,f){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(f,e):this.activate(f,this.element.children(d))}else{this.activate(f,this.element.children(d))}},nextPage:function(f){if(this.hasScroll()){if(!this.active||this.last()){this.activate(f,this.element.children(":first"))}else{var e=this.active.offset().top,h=this.element.height(),g=this.element.children("li").filter(function(){var b=a(this).offset().top-e-h+a(this).height();return b<10&&b>-10});g.length||(g=this.element.children(":last"));this.activate(f,g)}}else{this.activate(f,this.element.children(!this.active||this.last()?":first":":last"))}},previousPage:function(e){if(this.hasScroll()){if(!this.active||this.first()){this.activate(e,this.element.children(":last"))}else{var d=this.active.offset().top,f=this.element.height();result=this.element.children("li").filter(function(){var b=a(this).offset().top-d+f-a(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(e,result)}}else{this.activate(e,this.element.children(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})})(jQuery);(function(b){var e,c=function(a){b(":ui-button",a.target.form).each(function(){var f=b(this).data("button");setTimeout(function(){f.refresh()},1)})},d=function(a){var h=a.name,g=a.form,f=b([]);if(h){f=g?b(g).find("[name='"+h+"']"):b("[name='"+h+"']",a.ownerDocument).filter(function(){return !this.form})}return f};b.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",c);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,h=this.options,g=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!g?" ui-state-active":"");if(h.label===null){h.label=this.buttonElement.html()}if(this.element.is(":disabled")){h.disabled=true}this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!h.disabled){b(this).addClass("ui-state-hover");this===e&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){h.disabled||b(this).removeClass(f)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});g&&this.element.bind("change.button",function(){a.refresh()});if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);var i=a.element[0];d(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");e=this;b(document).one("mouseup",function(){e=null})}).bind("mouseup.button",function(){if(h.disabled){return false}b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(h.disabled){return false}if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER){b(this).addClass("ui-state-active")}}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}}this._setOption("disabled",h.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var a=this.element.is(":checked");a&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(a,f){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled"){f?this.element.attr("disabled",true):this.element.removeAttr("disabled")}this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio"){d(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)})}else{if(this.type==="checkbox"){this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label)}else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),h=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),g=this.options.icons,f=g.primary&&g.secondary;if(g.primary||g.secondary){a.addClass("ui-button-text-icon"+(f?"s":g.primary?"-primary":"-secondary"));g.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>");g.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>");if(!this.options.text){a.addClass(f?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||a.attr("title",h)}}else{a.addClass("ui-button-text-only")}}}});b.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(a,f){a==="disabled"&&this.buttons.button("option",a,f);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);(function(d,G){function L(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function E(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==G){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b)}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().removeClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().addClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass,b.dpDiv).add(d("td."+d.datepicker._currentClass,b.dpDiv));c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-i[0],top:-i[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),k=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose")){a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,k=c=-1,l=-1,u=-1,j=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p){throw"Missing number at position "+s}s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++){if(b.substr(s,p[w].length)==p[w]){s+=p[w].length;return w+1}}throw"Unknown name at position "+s},r=function(){if(b.charAt(s)!=a.charAt(z)){throw"Unexpected literal at position "+s}s++},s=0,z=0;z<a.length;z++){if(j){if(a.charAt(z)=="'"&&!o("'")){j=false}else{r()}}else{switch(a.charAt(z)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":k=m("m");break;case"M":k=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){r()}else{j=true}break;default:r()}}}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){k=1;l=u;do{e=this._getDaysInMonth(c,k-1);if(l<=e){break}k++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,k-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=k||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=j+1<a.length&&a.charAt(j+1)==o)&&j++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},k=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b){for(var j=0;j<a.length;j++){if(u){if(a.charAt(j)=="'"&&!i("'")){u=false}else{l+=a.charAt(j)}}else{switch(a.charAt(j)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000,3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(j)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,k=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=u.exec(h);j;){switch(j[2]||"d"){case"d":case"D":g+=parseInt(j[1],10);break;case"w":case"W":g+=parseInt(j[1],10)*7;break;case"m":case"M":l+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break;case"y":case"Y":k+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break}j=u.exec(h)}return new Date(k,l,g)};if(b=(b=b==null?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):b)&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),j=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=j&&n<j?j:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-k,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+k,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";k=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;k=!h?k:this.formatDate(k,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;k=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),w=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var N="",D=0;D<i[1];D++){var J=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1){switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,A)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,K=B&&!H||!F[0]||j&&q<j||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==J.getTime()&&g==a.selectedMonth&&a._keyEvent||M.getTime()==q.getTime()&&M.getTime()==J.getTime()?" "+this._dayOverClass:"")+(K?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(K?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?" ":K?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==J.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=x}I+=N}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='<div class="ui-datepicker-title">',o="";if(h||!k){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l){j+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){j+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}j+="</select>"}j+=this._get(a,"yearSuffix");if(u){j+=(h||!(k&&l)?" ":"")+o}j+="</div>";return j},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);(function(b,a){b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(d){var c=b(this).css(d).offset().top;c<0&&b(this).css("top",d.top-c)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}var i=this,c=i.options,n=c.title||i.originalTitle||" ",l=b.ui.dialog.getTitleId(i.element),k=(i.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c.dialogClass).css({zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(d){if(c.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){i.close(d);d.preventDefault()}}).attr({role:"dialog","aria-labelledby":l}).mousedown(function(d){i.moveToTop(false,d)});i.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var m=(i.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),j=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(d){i.close(d);return false}).appendTo(m);(i.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j);b("<span></span>").addClass("ui-dialog-title").attr("id",l).html(n).prependTo(m);if(b.isFunction(c.beforeclose)&&!b.isFunction(c.beforeClose)){c.beforeClose=c.beforeclose}m.find("*").add(m).disableSelection();c.draggable&&b.fn.draggable&&i._makeDraggable();c.resizable&&b.fn.resizable&&i._makeResizable();i._createButtons(c.buttons);i._isOpen=false;b.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var c=this;c.overlay&&c.overlay.destroy();c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");c.uiDialog.remove();c.originalTitle&&c.element.attr("title",c.originalTitle);return c},widget:function(){return this.uiDialog},close:function(e){var c=this,f;if(false!==c._trigger("beforeClose",e)){c.overlay&&c.overlay.destroy();c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",e)})}else{c.uiDialog.hide();c._trigger("close",e)}b.ui.dialog.overlay.resize();if(c.options.modal){f=0;b(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){f=Math.max(f,b(this).css("z-index"))}});b.ui.dialog.maxZ=f}return c}},isOpen:function(){return this._isOpen},moveToTop:function(e,c){var h=this,g=h.options;if(g.modal&&!e||!g.stack&&!g.modal){return h._trigger("focus",c)}if(g.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=g.zIndex}if(h.overlay){b.ui.dialog.maxZ+=1;h.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:h.element.attr("scrollTop"),scrollLeft:h.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;h.uiDialog.css("z-index",b.ui.dialog.maxZ);h.element.attr(e);h._trigger("focus",c);return h},open:function(){if(!this._isOpen){var e=this,c=e.options,f=e.uiDialog;e.overlay=c.modal?new b.ui.dialog.overlay(e):null;f.next().length&&f.appendTo("body");e._size();e._position(c.position);f.show(c.show);e.moveToTop(true);c.modal&&f.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var d=b(":tabbable",this),i=d.filter(":first");d=d.filter(":last");if(h.target===d[0]&&!h.shiftKey){i.focus(1);return false}else{if(h.target===i[0]&&h.shiftKey){d.focus(1);return false}}}});b(e.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();e._trigger("open");e._isOpen=true;return e}},_createButtons:function(e){var c=this,j=false,i=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),h=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(i);c.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return !(j=true)});if(j){b.each(e,function(f,d){f=b('<button type="button"></button>').text(f).click(function(){d.apply(c.element[0],arguments)}).appendTo(h);b.fn.button&&f.button()});i.appendTo(c.uiDialog)}},_makeDraggable:function(){function e(d){return{position:d.position,offset:d.offset}}var c=this,j=c.options,i=b(document),h;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,d){h=j.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",f,e(d))},drag:function(f,d){c._trigger("drag",f,e(d))},stop:function(f,d){j.position=[d.position.left-i.scrollLeft(),d.position.top-i.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(h);c._trigger("dragStop",f,e(d));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function c(d){return{originalPosition:d.originalPosition,originalSize:d.originalSize,position:d.position,size:d.size}}e=e===a?this.options.resizable:e;var j=this,i=j.options,h=j.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";j.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:j.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:j._minHeight(),handles:e,start:function(f,d){b(this).addClass("ui-dialog-resizing");j._trigger("resizeStart",f,c(d))},resize:function(f,d){j._trigger("resize",f,c(d))},stop:function(f,d){b(this).removeClass("ui-dialog-resizing");i.height=b(this).height();i.width=b(this).width();j._trigger("resizeStop",f,c(d));b.ui.dialog.overlay.resize()}}).css("position",h).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(e){var c=[],h=[0,0],g;if(e){if(typeof e==="string"||typeof e==="object"&&"0" in e){c=e.split?e.split(" "):[e[0],e[1]];if(c.length===1){c[1]=c[0]}b.each(["left","top"],function(d,f){if(+c[d]===c[d]){h[d]=c[d];c[d]=f}});e={my:c.join(" "),at:c.join(" "),offset:h.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else{e=b.ui.dialog.prototype.options.position}(g=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(e);g||this.uiDialog.hide()},_setOption:function(h,c){var l=this,j=l.uiDialog,i=j.is(":data(resizable)"),k=false;switch(h){case"beforeclose":h="beforeClose";break;case"buttons":l._createButtons(c);k=true;break;case"closeText":l.uiDialogTitlebarCloseText.text(""+c);break;case"dialogClass":j.removeClass(l.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c);break;case"disabled":c?j.addClass("ui-dialog-disabled"):j.removeClass("ui-dialog-disabled");break;case"draggable":c?l._makeDraggable():j.draggable("destroy");break;case"height":k=true;break;case"maxHeight":i&&j.resizable("option","maxHeight",c);k=true;break;case"maxWidth":i&&j.resizable("option","maxWidth",c);k=true;break;case"minHeight":i&&j.resizable("option","minHeight",c);k=true;break;case"minWidth":i&&j.resizable("option","minWidth",c);k=true;break;case"position":l._position(c);break;case"resizable":i&&!c&&j.resizable("destroy");i&&typeof c==="string"&&j.resizable("option","handles",c);!i&&c!==false&&l._makeResizable(c);break;case"title":b(".ui-dialog-title",l.uiDialogTitlebar).html(""+(c||" "));break;case"width":k=true;break}b.Widget.prototype._setOption.apply(l,arguments);k&&l._size()},_size:function(){var d=this.options,c;this.element.css({width:"auto",minHeight:0,height:0});if(d.minWidth>d.width){d.width=d.minWidth}c=this.uiDialog.css({height:"auto",width:d.width}).height();this.element.css(d.height==="auto"?{minHeight:Math.max(d.minHeight-c,0),height:"auto"}:{minHeight:0,height:Math.max(d.height-c,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c){this.uuid+=1;c=this.uuid}return"ui-dialog-title-"+c},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(e){return b(e.target).zIndex()>=b.ui.dialog.overlay.maxZ})},1);b(document).bind("keydown.dialog-overlay",function(e){if(d.options.closeOnEscape&&e.keyCode&&e.keyCode===b.ui.keyCode.ESCAPE){d.close(e);e.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});b.fn.bgiframe&&c.bgiframe();this.instances.push(c);return c},destroy:function(d){this.oldInstances.push(this.instances.splice(b.inArray(d,this.instances),1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");d.remove();var c=0;b.each(this.instances,function(){c=Math.max(c,this.css("z-index"))});this.maxZ=c},height:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return d<c?b(window).height()+"px":d+"px"}else{return b(document).height()+"px"}},width:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return d<c?b(window).width()+"px":d+"px"}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(f){f.ui=f.ui||{};var a=/left|center|right/,e=/top|center|bottom/,d=f.fn.position,b=f.fn.offset;f.fn.position=function(j){if(!j||!j.of){return d.apply(this,arguments)}j=f.extend({},j);var c=f(j.of),o=(j.collision||"flip").split(" "),n=j.offset?j.offset.split(" "):[0,0],m,l,k;if(j.of.nodeType===9){m=c.width();l=c.height();k={top:0,left:0}}else{if(j.of.scrollTo&&j.of.document){m=c.width();l=c.height();k={top:c.scrollTop(),left:c.scrollLeft()}}else{if(j.of.preventDefault){j.at="left top";m=l=0;k={top:j.of.pageY,left:j.of.pageX}}else{m=c.outerWidth();l=c.outerHeight();k=c.offset()}}}f.each(["my","at"],function(){var g=(j[this]||"").split(" ");if(g.length===1){g=a.test(g[0])?g.concat(["center"]):e.test(g[0])?["center"].concat(g):["center","center"]}g[0]=a.test(g[0])?g[0]:"center";g[1]=e.test(g[1])?g[1]:"center";j[this]=g});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(j.at[0]==="right"){k.left+=m}else{if(j.at[0]==="center"){k.left+=m/2}}if(j.at[1]==="bottom"){k.top+=l}else{if(j.at[1]==="center"){k.top+=l/2}}k.left+=n[0];k.top+=n[1];return this.each(function(){var p=f(this),h=p.outerWidth(),g=p.outerHeight(),i=f.extend({},k);if(j.my[0]==="right"){i.left-=h}else{if(j.my[0]==="center"){i.left-=h/2}}if(j.my[1]==="bottom"){i.top-=g}else{if(j.my[1]==="center"){i.top-=g/2}}i.left=parseInt(i.left);i.top=parseInt(i.top);f.each(["left","top"],function(s,q){f.ui.position[o[s]]&&f.ui.position[o[s]][q](i,{targetWidth:m,targetHeight:l,elemWidth:h,elemHeight:g,offset:n,my:j.my,at:j.at})});f.fn.bgiframe&&p.bgiframe();p.offset(f.extend(i,{using:j.using}))})};f.ui.position={fit:{left:function(g,c){var h=f(window);c=g.left+c.elemWidth-h.width()-h.scrollLeft();g.left=c>0?g.left-c:Math.max(0,g.left)},top:function(g,c){var h=f(window);c=g.top+c.elemHeight-h.height()-h.scrollTop();g.top=c>0?g.top-c:Math.max(0,g.top)}},flip:{left:function(h,c){if(c.at[0]!=="center"){var k=f(window);k=h.left+c.elemWidth-k.width()-k.scrollLeft();var j=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,i=-2*c.offset[0];h.left+=h.left<0?j+c.targetWidth+i:k>0?j-c.targetWidth+i:0}},top:function(i,c){if(c.at[1]!=="center"){var m=f(window);m=i.top+c.elemHeight-m.height()-m.scrollTop();var l=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,k=c.at[1]==="top"?c.targetHeight:-c.targetHeight,j=-2*c.offset[1];i.top+=i.top<0?l+c.targetHeight+j:m>0?l+k+j:0}}}};if(!f.offset.setOffset){f.offset.setOffset=function(i,c){if(/static/.test(f.curCSS(i,"position"))){i.style.position="relative"}var m=f(i),l=m.offset(),k=parseInt(f.curCSS(i,"top",true),10)||0,j=parseInt(f.curCSS(i,"left",true),10)||0;l={top:c.top-l.top+k,left:c.left-l.left+j};"using" in c?c.using.call(i,l):m.css(l)};f.fn.offset=function(g){var c=this[0];if(!c||!c.ownerDocument){return null}if(g){return this.each(function(){f.offset.setOffset(this,g)})}return b.call(this)}}})(jQuery);(function(a,d){a.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===d){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){if(b==="value"){this.options.value=c;this._refreshValue();this._trigger("change")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!=="number"){b=0}return Math.min(this.max,Math.max(this.min,b))},_refreshValue:function(){var b=this.value();this.valueDiv.toggleClass("ui-corner-right",b===this.max).width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");c.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!==2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range==="min"||c.range==="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length===0&&a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");if(c.values&&c.values.length){for(;a(".ui-slider-handle",this.element).length<c.values.length;){a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled){a(this).blur()}else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(n){var m=true,l=a(this).data("index.ui-slider-handle"),j,k,b;if(!d.options.disabled){switch(n.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:m=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");j=d._start(n,l);if(j===false){return}}break}b=d.options.step;j=d.options.values&&d.options.values.length?(k=d.values(l)):(k=d.value());switch(n.keyCode){case a.ui.keyCode.HOME:k=d._valueMin();break;case a.ui.keyCode.END:k=d._valueMax();break;case a.ui.keyCode.PAGE_UP:k=d._trimAlignValue(j+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:k=d._trimAlignValue(j-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(j===d._valueMax()){return}k=d._trimAlignValue(j+b);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(j===d._valueMin()){return}k=d._trimAlignValue(j-b);break}d._slide(n,l,k);return m}}).keyup(function(f){var b=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(f,b);d._change(f,b);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(i){var d=this.options,n,m,l,j,k;if(d.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();n=this._normValueFromMouse({x:i.pageX,y:i.pageY});m=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(c){var b=Math.abs(n-j.values(c));if(m>b){m=b;l=a(this);k=c}});if(d.range===true&&this.values(1)===d.min){k+=1;l=a(this.handles[k])}if(this._start(i,k)===false){return false}this._mouseSliding=true;j._handleIndex=k;l.addClass("ui-state-active").focus();d=l.offset();this._clickOffset=!a(i.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:i.pageX-d.left-l.width()/2,top:i.pageY-d.top-l.height()/2-(parseInt(l.css("borderTopWidth"),10)||0)-(parseInt(l.css("borderBottomWidth"),10)||0)+(parseInt(l.css("marginTop"),10)||0)};this._slide(i,k,n);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1){c=1}if(c<0){c=0}if(this.orientation==="vertical"){c=1-c}d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}return this._trigger("start",e,f)},_slide:function(f,d,h){var g;if(this.options.values&&this.options.values.length){g=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&h>g||d===1&&h<g)){h=g}if(h!==this.values(d)){g=this.values();g[d]=h;f=this._trigger("slide",f,{handle:this.handles[d],value:h,values:g});this.values(d?0:1);f!==false&&this.values(d,h,true)}}else{if(h!==this.value()){f=this._trigger("slide",f,{handle:this.handles[d],value:h});f!==false&&this.value(h)}}},_stop:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("stop",e,f)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("change",e,f)}},value:function(b){if(arguments.length){this.options.value=this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(g,d){var j,i,h;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(d);this._refreshValue();this._change(null,g)}if(arguments.length){if(a.isArray(arguments[0])){j=this.options.values;i=arguments[0];for(h=0;h<j.length;h+=1){j[h]=this._trimAlignValue(i[h]);this._change(null,h)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(g):this.value()}}else{return this._values()}},_setOption:function(f,d){var h,g=0;if(a.isArray(this.options.values)){g=this.options.values.length}a.Widget.prototype._setOption.apply(this,arguments);switch(f){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(h=0;h<g;h+=1){this._change(null,h)}this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(e){var d,f;if(arguments.length){d=this.options.values[e];return d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(f=0;f<d.length;f+=1){d[f]=this._trimAlignValue(d[f])}return d}},_trimAlignValue:function(e){if(e<this._valueMin()){return this._valueMin()}if(e>this._valueMax()){return this._valueMax()}var d=this.options.step>0?this.options.step:1,f=e%d;e=e-f;if(Math.abs(f)*2>=d){e+=f>0?d:-d}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var u=this.options.range,s=this.options,r=this,q=!this._animateOff?s.animate:false,p,n={},o,m,k,d;if(this.options.values&&this.options.values.length){this.handles.each(function(b){p=(r.values(b)-r._valueMin())/(r._valueMax()-r._valueMin())*100;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";a(this).stop(1,1)[q?"animate":"css"](n,s.animate);if(r.options.range===true){if(r.orientation==="horizontal"){if(b===0){r.range.stop(1,1)[q?"animate":"css"]({left:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({width:p-o+"%"},{queue:false,duration:s.animate})}}else{if(b===0){r.range.stop(1,1)[q?"animate":"css"]({bottom:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({height:p-o+"%"},{queue:false,duration:s.animate})}}}o=p})}else{m=this.value();k=this._valueMin();d=this._valueMax();p=d!==k?(m-k)/(d-k)*100:0;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";this.handle.stop(1,1)[q?"animate":"css"](n,s.animate);if(u==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[q?"animate":"css"]({width:p+"%"},s.animate)}if(u==="max"&&this.orientation==="horizontal"){this.range[q?"animate":"css"]({width:100-p+"%"},{queue:false,duration:s.animate})}if(u==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[q?"animate":"css"]({height:p+"%"},s.animate)}if(u==="max"&&this.orientation==="vertical"){this.range[q?"animate":"css"]({height:100-p+"%"},{queue:false,duration:s.animate})}}}});a.extend(a.ui.slider,{version:"1.8.4"})})(jQuery);(function(g,f){function e(){return ++c}function b(){return ++a}var c=0,a=0;g.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected"){this.options.collapsible&&h==this.options.selected||this.select(h)}else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return g.cookie.apply(null,[d].concat(g.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=g(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(z){function w(h,i){h.css("display","");!g.support.opacity&&i.opacity&&h[0].style.removeAttribute("filter")}var y=this,x=this.options,v=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=g("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return g("a",this)[0]});this.panels=g([]);this.anchors.each(function(k,n){var i=g(n).attr("href"),h=i.split("#")[0],m;if(h&&(h===location.toString().split("#")[0]||(m=g("base")[0])&&h===m.href)){i=n.hash;n.href=i}if(v.test(i)){y.panels=y.panels.add(y._sanitizeSelector(i))}else{if(i!=="#"){g.data(n,"href.tabs",i);g.data(n,"load.tabs",i.replace(/#.*$/,""));i=y._tabId(n);n.href="#"+i;n=g("#"+i);if(!n.length){n=g(x.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(y.panels[k-1]||y.list);n.data("destroy.tabs",true)}y.panels=y.panels.add(n)}else{x.disabled.push(k)}}});if(z){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(x.selected===f){location.hash&&this.anchors.each(function(h,i){if(i.hash==location.hash){x.selected=h;return false}});if(typeof x.selected!=="number"&&x.cookie){x.selected=parseInt(y._cookie(),10)}if(typeof x.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}x.selected=x.selected||(this.lis.length?0:-1)}else{if(x.selected===null){x.selected=-1}}x.selected=x.selected>=0&&this.anchors[x.selected]||x.selected<0?x.selected:0;x.disabled=g.unique(x.disabled.concat(g.map(this.lis.filter(".ui-state-disabled"),function(h){return y.lis.index(h)}))).sort();g.inArray(x.selected,x.disabled)!=-1&&x.disabled.splice(g.inArray(x.selected,x.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(x.selected>=0&&this.anchors.length){this.panels.eq(x.selected).removeClass("ui-tabs-hide");this.lis.eq(x.selected).addClass("ui-tabs-selected ui-state-active");y.element.queue("tabs",function(){y._trigger("show",null,y._ui(y.anchors[x.selected],y.panels[x.selected]))});this.load(x.selected)}g(window).bind("unload",function(){y.lis.add(y.anchors).unbind(".tabs");y.lis=y.anchors=y.panels=null})}else{x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[x.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");x.cookie&&this._cookie(x.selected,x.cookie);z=0;for(var u;u=this.lis[z];z++){g(u)[g.inArray(z,x.disabled)!=-1&&!g(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}x.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(x.event!=="mouseover"){var q=function(h,i){i.is(":not(.ui-state-disabled)")&&i.addClass("ui-state-"+h)},l=function(h,i){i.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){q("hover",g(this))});this.lis.bind("mouseout.tabs",function(){l("hover",g(this))});this.anchors.bind("focus.tabs",function(){q("focus",g(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",g(this).closest("li"))})}var p,j;if(x.fx){if(g.isArray(x.fx)){p=x.fx[0];j=x.fx[1]}else{p=j=x.fx}}var d=j?function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){w(i,j);y._trigger("show",null,y._ui(h,i[0]))})}:function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");y._trigger("show",null,y._ui(h,i[0]))},A=p?function(h,i){i.animate(p,p.duration||"normal",function(){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");w(i,p);y.element.dequeue("tabs")})}:function(h,i){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");y.element.dequeue("tabs")};this.anchors.bind(x.event+".tabs",function(){var k=this,m=g(k).closest("li"),i=y.panels.filter(":not(.ui-tabs-hide)"),h=g(y._sanitizeSelector(k.hash));if(m.hasClass("ui-tabs-selected")&&!x.collapsible||m.hasClass("ui-state-disabled")||m.hasClass("ui-state-processing")||y._trigger("select",null,y._ui(this,h[0]))===false){this.blur();return false}x.selected=y.anchors.index(this);y.abort();if(x.collapsible){if(m.hasClass("ui-tabs-selected")){x.selected=-1;x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){A(k,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this));this.blur();return false}}}x.cookie&&y._cookie(x.selected,x.cookie);if(h.length){i.length&&y.element.queue("tabs",function(){A(k,i)});y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}g.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=g.data(this,"href.tabs");if(i){this.href=i}var h=g(this).unbind(".tabs");g.each(["href","load","cache"],function(k,j){h.removeData(j+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){g.data(this,"destroy.tabs")?g(this).remove():g(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(j,m,d){if(d===f){d=this.anchors.length}var n=this,l=this.options;m=g(l.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,m));j=!j.indexOf("#")?j.replace("#",""):this._tabId(g("a",m)[0]);m.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=g("#"+j);k.length||(k=g(l.panelTemplate).attr("id",j).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(d>=this.lis.length){m.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{m.insertBefore(this.lis[d]);k.insertBefore(this.panels[d])}l.disabled=g.map(l.disabled,function(h){return h>=d?++h:h});this._tabify();if(this.anchors.length==1){l.selected=0;m.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[0],n.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]));return this},remove:function(h){h=this._getIndex(h);var i=this.options,d=this.lis.eq(h).remove(),j=this.panels.eq(h).remove();if(d.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(h+(h+1<this.anchors.length?1:-1))}i.disabled=g.map(g.grep(i.disabled,function(k){return k!=h}),function(k){return k>=h?--k:k});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(g.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=g.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1){if(this.options.collapsible&&this.options.selected!=-1){d=this.options.selected}else{return this}}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(j){j=this._getIndex(j);var m=this,d=this.options,n=this.anchors.eq(j)[0],l=g.data(n,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&g.data(n,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(j).addClass("ui-state-processing");if(d.spinner){var k=g("span",n);k.data("label.tabs",k.html()).html(d.spinner)}this.xhr=g.ajax(g.extend({},d.ajaxOptions,{url:l,success:function(i,o){g(m._sanitizeSelector(n.hash)).html(i);m._cleanup();d.cache&&g.data(n,"cache.tabs",true);m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.success(i,o)}catch(h){}},error:function(i,o){m._cleanup();m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.error(i,o,j,n)}catch(h){}}}));m.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});g.extend(g.ui.tabs,{version:"1.8.4"});g.extend(g.ui.tabs.prototype,{rotation:null,rotate:function(i,k){var d=this,l=this.options,j=d._rotate||(d._rotate=function(h){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var m=l.selected;d.select(++m<d.anchors.length?m:0)},i);h&&h.stopPropagation()});k=d._unrotate||(d._unrotate=!k?function(h){h.clientX&&d.rotate(null)}:function(){t=l.selected;j()});if(i){this.element.bind("tabsshow",j);this.anchors.bind(l.event+".tabs",k);j()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(l.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);jQuery(function(f){var e=f("meta[name=csrf-token]").attr("content"),g=f("meta[name=csrf-param]").attr("content");f.fn.extend({triggerAndReturn:function(h,j){var i=new f.Event(h);this.trigger(i,j);return i.result!==false},callRemote:function(){var j=this,l=j.attr("method")||j.attr("data-method")||"GET",i=j.attr("action")||j.attr("href"),h=j.attr("data-type")||"script";if(i===undefined){throw"No URL specified for remote call (action or href must be present)."}else{if(j.triggerAndReturn("ajax:before")){var k=j.is("form")?j.serializeArray():[];f.ajax({url:i,data:k,dataType:h,type:l.toUpperCase(),beforeSend:function(m){j.trigger("ajax:loading",m)},success:function(n,m,o){j.trigger("ajax:success",[n,m,o])},complete:function(m){j.trigger("ajax:complete",m)},error:function(o,m,n){j.trigger("ajax:failure",[o,m,n])}})}j.trigger("ajax:after")}}});f("a[data-confirm],input[data-confirm]").live("click",function(){var h=f(this);if(h.triggerAndReturn("confirm")){if(!confirm(h.attr("data-confirm"))){return false}}});f("form[data-remote]").live("submit",function(h){f(this).callRemote();h.preventDefault()});f("a[data-remote],input[data-remote]").live("click",function(h){f(this).callRemote();h.preventDefault()});f("a[data-method]:not([data-remote])").live("click",function(l){var k=f(this),i=k.attr("href"),m=k.attr("data-method"),j=f('<form method="post" action="'+i+'"></form>'),h='<input name="_method" value="'+m+'" type="hidden" />';if(g!=null&&e!=null){h+='<input name="'+g+'" value="'+e+'" type="hidden" />'}j.hide().append(h).appendTo("body");l.preventDefault();j.submit()});var c="input[data-disable-with]";var d="form[data-remote]:has("+c+")";var b="form:not([data-remote]):has("+c+")";var a=function(){f(this).find(c).each(function(){var h=f(this);h.data("enable-with",h.val()).attr("value",h.attr("data-disable-with")).attr("disabled","disabled")})};f(d).live("ajax:before",a);f(b).live("submit",a);f(d).live("ajax:complete",function(){f(this).find(c).each(function(){var h=f(this);h.removeAttr("disabled").val(h.data("enable-with"))})})});(function(b){b.fn.__bind__=b.fn.bind;b.fn.__unbind__=b.fn.unbind;b.fn.__find__=b.fn.find;var a={version:"0.7.9",override:/keypress|keydown|keyup/g,triggersMap:{},specialKeys:{27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",109:"-",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",191:"/"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},newTrigger:function(e,d,f){var c={};c[e]={};c[e][d]={cb:f,disableInInput:false};return c}};a.specialKeys=b.extend(a.specialKeys,{96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"});b.fn.find=function(c){this.query=c;return b.fn.__find__.apply(this,arguments)};b.fn.unbind=function(h,e,g){if(b.isFunction(e)){g=e;e=null}if(e&&typeof e==="string"){var f=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var d=h.split(" ");for(var c=0;c<d.length;c++){delete a.triggersMap[f][d[c]][e]}}return this.__unbind__(h,g)};b.fn.bind=function(j,f,k){var h=j.match(a.override);if(b.isFunction(f)||!h){return this.__bind__(j,f,k)}else{var n=null,i=b.trim(j.replace(a.override,""));if(i){n=this.__bind__(i,f,k)}if(typeof f==="string"){f={combi:f}}if(f.combi){for(var m=0;m<h.length;m++){var d=h[m];var g=f.combi.toLowerCase(),e=a.newTrigger(d,g,k),l=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();e[d][g].disableInInput=f.disableInInput;if(!a.triggersMap[l]){a.triggersMap[l]=e}else{if(!a.triggersMap[l][d]){a.triggersMap[l][d]=e[d]}}var c=a.triggersMap[l][d][g];if(!c){a.triggersMap[l][d][g]=[e[d][g]]}else{if(c.constructor!==Array){a.triggersMap[l][d][g]=[c]}else{a.triggersMap[l][d][g][c.length]=e[d][g]}}this.each(function(){var o=b(this);if(o.attr("hkId")&&o.attr("hkId")!==l){l=o.attr("hkId")+";"+l}o.attr("hkId",l)});n=this.__bind__(h.join(" "),f,a.handler)}}return n}};a.findElement=function(c){if(!b(c).attr("hkId")){if(b.browser.opera||b.browser.safari){while(!b(c).attr("hkId")&&c.parentNode){c=c.parentNode}}}return c};a.handler=function(e){var o=a.findElement(e.currentTarget),i=b(o),d=i.attr("hkId");if(d){d=d.split(";");var g=e.which,q=e.type,p=a.specialKeys[g],n=!p&&String.fromCharCode(g).toLowerCase(),h=e.shiftKey,c=e.ctrlKey,m=e.altKey||e.originalEvent.altKey,f=null;for(var r=0;r<d.length;r++){if(a.triggersMap[d[r]][q]){f=a.triggersMap[d[r]][q];break}}if(f){var j;if(!h&&!c&&!m){if(f[p]){j=f[p];if(j&&p!=e.data.combi){return}}else{if(n&&f[n]){j=f[n];if(j&&n!=e.data.combi){return}}}}else{var l="";if(m){l+="alt+"}if(c){l+="ctrl+"}if(h){l+="shift+"}j=f[l+p];if(j&&(l+p)!=e.data.combi){return}if(!j){if(n){if(f[l+n]){j=f[l+n];if(j&&(l+n)!=e.data.combi){return}}else{if(f[l+a.shiftNums[n]]){j=f[l+a.shiftNums[n]];if(j&&(l+a.shiftNums[n])!=e.data.combi){return}}else{if(l==="shift+"&&f[a.shiftNums[n]]){j=f[a.shiftNums[n]];if(j&&a.shiftNums[n]!=e.data.combi){return}}}}}}}if(j){var s=false;for(var r=0;r<j.length;r++){if(j[r].disableInInput){var k=b(e.target);if(i.is("input")||i.is("textarea")||i.is("select")||k.is("input")||k.is("textarea")||k.is("select")){return true}}s=s||j[r].cb.apply(this,[e])}return s}}}};window.hotkeys=a;return b})(jQuery);var Mustache=function(){var a=function(){};a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(e,d,c,f){if(!f){this.context=d;this.buffer=[]}if(!this.includes("",e)){if(f){return e}else{this.send(e);return}}e=this.render_pragmas(e);var b=this.render_section(e,d,c);if(f){return this.render_tags(b,d,c,f)}this.render_tags(b,d,c,f)},send:function(b){if(b!=""){this.buffer.push(b)}},render_pragmas:function(b){if(!this.includes("%",b)){return b}var d=this;var c=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);return b.replace(c,function(g,e,f){if(!d.pragmas_implemented[e]){throw ({message:"This implementation of mustache doesn't understand the '"+e+"' pragma"})}d.pragmas[e]={};if(f){var h=f.split("=");d.pragmas[e][h[0]]=h[1]}return""})},render_partial:function(b,d,c){b=this.trim(b);if(!c||c[b]===undefined){throw ({message:"unknown_partial '"+b+"'"})}if(typeof(d[b])!="object"){return this.render(c[b],d,c,true)}return this.render(c[b],d[b],c,true)},render_section:function(d,c,b){if(!this.includes("#",d)&&!this.includes("^",d)){return d}var f=this;var e=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");return d.replace(e,function(h,i,g,j){var k=f.find(g,c);if(i=="^"){if(!k||f.is_array(k)&&k.length===0){return f.render(j,c,b,true)}else{return""}}else{if(i=="#"){if(f.is_array(k)){return f.map(k,function(l){return f.render(j,f.create_context(l),b,true)}).join("")}else{if(f.is_object(k)){return f.render(j,f.create_context(k),b,true)}else{if(typeof k==="function"){return k.call(c,j,function(l){return f.render(l,c,b,true)})}else{if(k){return f.render(j,c,b,true)}else{return""}}}}}}})},render_tags:function(k,b,d,f){var e=this;var j=function(){return new RegExp(e.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")};var g=j();var h=function(n,i,m){switch(i){case"!":return"";case"=":e.set_delimiters(m);g=j();return"";case">":return e.render_partial(m,b,d);case"{":return e.find(m,b);default:return e.escape(e.find(m,b))}};var l=k.split("\n");for(var c=0;c<l.length;c++){l[c]=l[c].replace(g,h,this);if(!f){this.send(l[c])}}if(f){return l.join("\n")}},set_delimiters:function(c){var b=c.split(" ");this.otag=this.escape_regex(b[0]);this.ctag=this.escape_regex(b[1])},escape_regex:function(c){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return c.replace(arguments.callee.sRE,"\\$1")},find:function(c,d){c=this.trim(c);function b(f){return f===false||f===0||f}var e;if(b(d[c])){e=d[c]}else{if(b(this.context[c])){e=this.context[c]}}if(typeof e==="function"){return e.apply(d)}if(e!==undefined){return e}return""},includes:function(c,b){return b.indexOf(this.otag+c)!=-1},escape:function(b){b=String(b===null?"":b);return b.replace(/&(?!\w+;)|["<>\\]/g,function(c){switch(c){case"&":return"&";case"\\":return"\\\\";case'"':return'"';case"<":return"<";case">":return">";default:return c}})},create_context:function(c){if(this.is_object(c)){return c}else{var d=".";if(this.pragmas["IMPLICIT-ITERATOR"]){d=this.pragmas["IMPLICIT-ITERATOR"].iterator}var b={};b[d]=c;return b}},is_object:function(b){return b&&typeof b=="object"},is_array:function(b){return Object.prototype.toString.call(b)==="[object Array]"},trim:function(b){return b.replace(/^\s*|\s*$/g,"")},map:function(f,d){if(typeof f.map=="function"){return f.map(d)}else{var e=[];var b=f.length;for(var c=0;c<b;c++){e.push(d(f[c]))}return e}}};return({name:"mustache.js",version:"0.3.1-dev",to_html:function(d,b,c,f){var e=new a();if(f){e.send=f}e.render(d,b,c);if(!f){return e.buffer.join("\n")}}})}();eval(function(h,b,i,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(i--){f[g(i)]=d[i]||g(i)}d=[function(a){return f[a]}];g=function(){return"\\w+"};i=1}while(i--){if(d[i]){h=h.replace(new RegExp("\\b"+g(i)+"\\b","g"),d[i])}}return h}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),0,{}));(function(aG){var ay,aq,ap,aD,aj,aC,ai,ax,am,al,au=0,aE={},aw=[],av=0,aF={},az=[],af=null,ao=new Image,ae=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,ad,ac=1,an=0,ar="",at,aA,aB=false,ak=aG.extend(aG("<div/>")[0],{prop:0}),ab=aG.browser.msie&&aG.browser.version<7&&!window.XMLHttpRequest,aa=function(){aq.hide();ao.onerror=ao.onload=null;af&&af.abort();ay.empty()},U=function(){if(false===aE.onError(aw,au,aE)){aq.hide();aB=false}else{aE.titleShow=false;aE.width="auto";aE.height="auto";ay.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');ah()}},ag=function(){var a=aw[au],j,f,e,i,h,c;aa();aE=aG.extend({},aG.fn.fancybox.defaults,typeof aG(a).data("fancybox")=="undefined"?aE:aG(a).data("fancybox"));c=aE.onStart(aw,au,aE);if(c===false){aB=false}else{if(typeof c=="object"){aE=aG.extend(aE,c)}e=aE.title||(a.nodeName?aG(a).attr("title"):a.title)||"";if(a.nodeName&&!aE.orig){aE.orig=aG(a).children("img:first").length?aG(a).children("img:first"):aG(a)}if(e===""&&aE.orig&&aE.titleFromAlt){e=aE.orig.attr("alt")}j=aE.href||(a.nodeName?aG(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(j)||j=="#"){j=null}if(aE.type){f=aE.type;if(!j){j=aE.content}}else{if(aE.content){f="html"}else{if(j){f=j.match(ae)?"image":j.match(k)?"swf":aG(a).hasClass("iframe")?"iframe":j.indexOf("#")===0?"inline":"ajax"}}}if(f){if(f=="inline"){a=j.substr(j.indexOf("#"));f=aG(a).length>0?"inline":"ajax"}aE.type=f;aE.href=j;aE.title=e;if(aE.autoDimensions&&aE.type!=="iframe"&&aE.type!=="swf"){aE.width="auto";aE.height="auto"}if(aE.modal){aE.overlayShow=true;aE.hideOnOverlayClick=false;aE.hideOnContentClick=false;aE.enableEscapeButton=false;aE.showCloseButton=false}aE.padding=parseInt(aE.padding,10);aE.margin=parseInt(aE.margin,10);ay.css("padding",aE.padding+aE.margin);aG(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){aG(this).replaceWith(aC.children())});switch(f){case"html":ay.html(aE.content);ah();break;case"inline":if(aG(a).parent().is("#fancybox-content")===true){aB=false;break}aG('<div class="fancybox-inline-tmp" />').hide().insertBefore(aG(a)).bind("fancybox-cleanup",function(){aG(this).replaceWith(aC.children())}).bind("fancybox-cancel",function(){aG(this).replaceWith(ay.children())});aG(a).appendTo(ay);ah();break;case"image":aB=false;aG.fancybox.showActivity();ao=new Image;ao.onerror=function(){U()};ao.onload=function(){aB=true;ao.onerror=ao.onload=null;aE.width=ao.width;aE.height=ao.height;aG("<img />").attr({id:"fancybox-img",src:ao.src,alt:aE.title}).appendTo(ay);P()};ao.src=j;break;case"swf":i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+aE.width+'" height="'+aE.height+'"><param name="movie" value="'+j+'"></param>';h="";aG.each(aE.swf,function(l,m){i+='<param name="'+l+'" value="'+m+'"></param>';h+=" "+l+'="'+m+'"'});i+='<embed src="'+j+'" type="application/x-shockwave-flash" width="'+aE.width+'" height="'+aE.height+'"'+h+"></embed></object>";ay.html(i);ah();break;case"ajax":aB=false;aG.fancybox.showActivity();aE.ajax.win=aE.ajax.success;af=aG.ajax(aG.extend({},aE.ajax,{url:j,data:aE.ajax.data||{},error:function(l){l.status>0&&U()},success:function(l,n,m){if(m.status==200){if(typeof aE.ajax.win=="function"){c=aE.ajax.win(j,l,n,m);if(c===false){aq.hide();return}else{if(typeof c=="string"||typeof c=="object"){l=c}}}ay.html(l);ah()}}}));break;case"iframe":P()}}else{U()}}},ah=function(){ay.width(aE.width);ay.height(aE.height);if(aE.width=="auto"){aE.width=ay.width()}if(aE.height=="auto"){aE.height=ay.height()}P()},P=function(){var a,c;aq.hide();if(aD.is(":visible")&&false===aF.onCleanup(az,av,aF)){aG.event.trigger("fancybox-cancel");aB=false}else{aB=true;aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aD.is(":visible")&&aF.titlePosition!=="outside"&&aD.css("height",aD.height());az=aw;av=au;aF=aE;if(aF.overlayShow){ap.css({"background-color":aF.overlayColor,opacity:aF.overlayOpacity,cursor:aF.hideOnOverlayClick?"pointer":"auto",height:aG(document).height()});if(!ap.is(":visible")){ab&&aG("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});ap.show()}}else{ap.hide()}aC.get(0).scrollTop=0;aC.get(0).scrollLeft=0;aA=g();ar=aF.title||"";an=0;ax.empty().removeAttr("style").removeClass();if(aF.titleShow!==false){if(aG.isFunction(aF.titleFormat)){a=aF.titleFormat(ar,az,av,aF)}else{a=ar&&ar.length?aF.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+ar+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+aF.titlePosition+'">'+ar+"</div>":false}ar=a;if(!(!ar||ar==="")){ax.addClass("fancybox-title-"+aF.titlePosition).html(ar).appendTo("body").show();switch(aF.titlePosition){case"inside":ax.css({width:aA.width-aF.padding*2,marginLeft:aF.padding,marginRight:aF.padding});an=ax.outerHeight(true);ax.appendTo(aj);aA.height+=an;break;case"over":ax.css({marginLeft:aF.padding,width:aA.width-aF.padding*2,bottom:aF.padding}).appendTo(aj);break;case"float":ax.css("left",parseInt((ax.width()-aA.width-40)/2,10)*-1).appendTo(aD);break;default:ax.css({width:aA.width-aF.padding*2,paddingLeft:aF.padding,paddingRight:aF.padding}).appendTo(aD)}}}ax.hide();if(aD.is(":visible")){aG(ai.add(am).add(al)).hide();a=aD.position();at={top:a.top,left:a.left,width:aD.width(),height:aD.height()};c=at.width==aA.width&&at.height==aA.height;aC.fadeTo(aF.changeFade,0.3,function(){var e=function(){aC.html(ay.contents()).fadeTo(aF.changeFade,1,G)};aG.event.trigger("fancybox-change");aC.empty().removeAttr("filter").css({"border-width":aF.padding,width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"});if(c){e()}else{ak.prop=0;aG(ak).animate({prop:1},{duration:aF.changeSpeed,easing:aF.easingChange,step:C,complete:e})}})}else{aD.removeAttr("style");aC.css("border-width",aF.padding);if(aF.transitionIn=="elastic"){at=w();aC.html(ay.contents());aD.show();if(aF.opacity){aA.opacity=0}ak.prop=0;aG(ak).animate({prop:1},{duration:aF.speedIn,easing:aF.easingIn,step:C,complete:G})}else{aF.titlePosition=="inside"&&an>0&&ax.show();aC.css({width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"}).html(ay.contents());aD.css(aA).fadeIn(aF.transitionIn=="none"?0:aF.fadeIn,G)}}}},d=function(){if(aF.enableEscapeButton||aF.enableKeyboardNav){aG(document).bind("keydown.fb",function(a){if(a.keyCode==27&&aF.enableEscapeButton){a.preventDefault();aG.fancybox.close()}else{if((a.keyCode==37||a.keyCode==39)&&aF.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();aG.fancybox[a.keyCode==37?"prev":"next"]()}}})}if(aF.showNavArrows){if(aF.cyclic&&az.length>1||av!==0){am.show()}if(aF.cyclic&&az.length>1||av!=az.length-1){al.show()}}else{am.hide();al.hide()}},G=function(){if(!aG.support.opacity){aC.get(0).style.removeAttribute("filter");aD.get(0).style.removeAttribute("filter")}aD.css("height","auto");aF.type!=="image"&&aF.type!=="swf"&&aF.type!=="iframe"&&aC.css("height","auto");ar&&ar.length&&ax.show();aF.showCloseButton&&ai.show();d();aF.hideOnContentClick&&aC.bind("click",aG.fancybox.close);aF.hideOnOverlayClick&&ap.bind("click",aG.fancybox.close);aG(window).bind("resize.fb",aG.fancybox.resize);aF.centerOnScroll&&aG(window).bind("scroll.fb",aG.fancybox.center);if(aF.type=="iframe"){aG('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(aG.browser.msie?'allowtransparency="true""':"")+' scrolling="'+aE.scrolling+'" src="'+aF.href+'"></iframe>').appendTo(aC)}aD.show();aB=false;aG.fancybox.center();aF.onComplete(az,av,aF);var a,c;if(az.length-1>av){a=az[av+1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}if(av>0){a=az[av-1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}},C=function(a){var c={width:parseInt(at.width+(aA.width-at.width)*a,10),height:parseInt(at.height+(aA.height-at.height)*a,10),top:parseInt(at.top+(aA.top-at.top)*a,10),left:parseInt(at.left+(aA.left-at.left)*a,10)};if(typeof aA.opacity!=="undefined"){c.opacity=a<0.5?0.5:a}aD.css(c);aC.css({width:c.width-aF.padding*2,height:c.height-an*a-aF.padding*2})},x=function(){return[aG(window).width()-aF.margin*2,aG(window).height()-aF.margin*2,aG(document).scrollLeft()+aF.margin,aG(document).scrollTop()+aF.margin]},g=function(){var a=x(),f={},e=aF.autoScale,c=aF.padding*2;f.width=aF.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(aF.width)/100,10):aF.width+c;f.height=aF.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(aF.height)/100,10):aF.height+c;if(e&&(f.width>a[0]||f.height>a[1])){if(aE.type=="image"||aE.type=="swf"){e=aF.width/aF.height;if(f.width>a[0]){f.width=a[0];f.height=parseInt((f.width-c)/e+c,10)}if(f.height>a[1]){f.height=a[1];f.width=parseInt((f.height-c)*e+c,10)}}else{f.width=Math.min(f.width,a[0]);f.height=Math.min(f.height,a[1])}}f.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-f.height-40)*0.5),10);f.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-f.width-40)*0.5),10);return f},w=function(){var a=aE.orig?aG(aE.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+aF.padding*2,height:c.height+aF.padding*2,top:c.top-aF.padding-20,left:c.left-aF.padding-20}}else{a=x();c={width:aF.padding*2,height:aF.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},b=function(){if(aq.is(":visible")){aG("div",aq).css("top",ac*-40+"px");ac=(ac+1)%12}else{clearInterval(ad)}};aG.fn.fancybox=function(a){if(!aG(this).length){return this}aG(this).data("fancybox",aG.extend({},a,aG.metadata?aG(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!aB){aB=true;aG(this).blur();aw=[];au=0;c=aG(this).attr("rel")||"";if(!c||c==""||c==="nofollow"){aw.push(this)}else{aw=aG("a[rel="+c+"], area[rel="+c+"]");au=aw.index(this)}ag()}});return this};aG.fancybox=function(a,h){var e;if(!aB){aB=true;e=typeof h!=="undefined"?h:{};aw=[];au=parseInt(e.index,10)||0;if(aG.isArray(a)){for(var c=0,f=a.length;c<f;c++){if(typeof a[c]=="object"){aG(a[c]).data("fancybox",aG.extend({},e,a[c]))}else{a[c]=aG({}).data("fancybox",aG.extend({content:a[c]},e))}}aw=jQuery.merge(aw,a)}else{if(typeof a=="object"){aG(a).data("fancybox",aG.extend({},e,a))}else{a=aG({}).data("fancybox",aG.extend({content:a},e))}aw.push(a)}if(au>aw.length||au<0){au=0}ag()}};aG.fancybox.showActivity=function(){clearInterval(ad);aq.show();ad=setInterval(b,66)};aG.fancybox.hideActivity=function(){aq.hide()};aG.fancybox.next=function(){return aG.fancybox.pos(av+1)};aG.fancybox.prev=function(){return aG.fancybox.pos(av-1)};aG.fancybox.pos=function(a){if(!aB){a=parseInt(a);aw=az;if(a>-1&&a<az.length){au=a;ag()}else{if(aF.cyclic&&az.length>1){au=a>=az.length?0:az.length-1;ag()}}}};aG.fancybox.cancel=function(){if(!aB){aB=true;aG.event.trigger("fancybox-cancel");aa();aE.onCancel(aw,au,aE);aB=false}};aG.fancybox.close=function(){function a(){ap.fadeOut("fast");ax.empty().hide();aD.hide();aG.event.trigger("fancybox-cleanup");aC.empty();aF.onClosed(az,av,aF);az=aE=[];av=au=0;aF=aE={};aB=false}if(!(aB||aD.is(":hidden"))){aB=true;if(aF&&false===aF.onCleanup(az,av,aF)){aB=false}else{aa();aG(ai.add(am).add(al)).hide();aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aC.find("iframe").attr("src",ab&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");aF.titlePosition!=="inside"&&ax.empty();aD.stop();if(aF.transitionOut=="elastic"){at=w();var c=aD.position();aA={top:c.top,left:c.left,width:aD.width(),height:aD.height()};if(aF.opacity){aA.opacity=1}ax.empty().hide();ak.prop=1;aG(ak).animate({prop:0},{duration:aF.speedOut,easing:aF.easingOut,step:C,complete:a})}else{aD.fadeOut(aF.transitionOut=="none"?0:aF.speedOut,a)}}}};aG.fancybox.resize=function(){ap.is(":visible")&&ap.css("height",aG(document).height());aG.fancybox.center(true)};aG.fancybox.center=function(a){var e,c;if(!aB){c=a===true?1:0;e=x();!c&&(aD.width()>e[0]||aD.height()>e[1])||aD.stop().animate({top:parseInt(Math.max(e[3]-20,e[3]+(e[1]-aC.height()-40)*0.5-aF.padding)),left:parseInt(Math.max(e[2]-20,e[2]+(e[0]-aC.width()-40)*0.5-aF.padding))},typeof a=="number"?a:200)}};aG.fancybox.init=function(){if(!aG("#fancybox-wrap").length){aG("body").append(ay=aG('<div id="fancybox-tmp"></div>'),aq=aG('<div id="fancybox-loading"><div></div></div>'),ap=aG('<div id="fancybox-overlay"></div>'),aD=aG('<div id="fancybox-wrap"></div>'));aj=aG('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(aD);aj.append(aC=aG('<div id="fancybox-content"></div>'),ai=aG('<a id="fancybox-close"></a>'),ax=aG('<div id="fancybox-title"></div>'),am=aG('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),al=aG('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));ai.click(aG.fancybox.close);aq.click(aG.fancybox.cancel);am.click(function(a){a.preventDefault();aG.fancybox.prev()});al.click(function(a){a.preventDefault();aG.fancybox.next()});aG.fn.mousewheel&&aD.bind("mousewheel.fb",function(a,c){a.preventDefault();aG.fancybox[c>0?"prev":"next"]()});aG.support.opacity||aD.addClass("fancybox-ie");if(ab){aq.addClass("fancybox-ie6");aD.addClass("fancybox-ie6");aG('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(aj)}}};aG.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};aG(document).ready(function(){aG.fancybox.init()})})(jQuery);(function(a){a.widget("ech.notify",{options:{speed:500,expires:5000,stack:"below",custom:false},_create:function(){var b=this;this.templates={};this.keys=[];this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(d){var c=this.id||d;b.keys.push(c);b.templates[c]=a(this).removeAttr("id").wrap("<div></div>").parent().html()}).end().empty().show()},create:function(c,e,d){if(typeof c==="object"){d=e;e=c;c=null}var b=this.templates[c||this.keys[0]];if(d&&d.custom){b=a(b).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html()}return new a.ech.notify.instance(this)._create(e,a.extend({},this.options,d),b)}});a.extend(a.ech.notify,{instance:function(b){this.parent=b;this.isOpen=false}});a.extend(a.ech.notify.instance.prototype,{_create:function(h,e,g){this.options=e;var d=this,f=g.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g,function(i,j){return(j in h)?h[j]:""}),c=(this.element=a(f)),b=c.find(".ui-notify-close");if(typeof this.options.click==="function"){c.addClass("ui-notify-click").bind("click",function(i){d._trigger("click",i,d)})}if(b.length){b.bind("click",function(){d.close();return false})}this.open();if(typeof e.expires==="number"){window.setTimeout(function(){d.close()},e.expires)}return this},close:function(){var b=this,c=this.options.speed;this.element.fadeTo(c,0).slideUp(c,function(){b._trigger("close");b.isOpen=false});return this},open:function(){if(this.isOpen||this._trigger("beforeopen")===false){return this}var b=this;this.element[this.options.stack==="above"?"prependTo":"appendTo"](this.parent.element).css({display:"none",opacity:""}).fadeIn(this.options.speed,function(){b._trigger("open");b.isOpen=true});return this},widget:function(){return this.element},_trigger:function(c,d,b){return this.parent._trigger.call(this,c,d,b)}})})(jQuery);(function(b){var a=function(){var T={},c,O=65,u,Q='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',C={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},K=function(U,W){var V=j(U);b(W).data("colorpicker").fields.eq(1).val(V.r).end().eq(2).val(V.g).end().eq(3).val(V.b).end()},v=function(U,V){b(V).data("colorpicker").fields.eq(4).val(U.h).end().eq(5).val(U.s).end().eq(6).val(U.b).end()},g=function(U,V){b(V).data("colorpicker").fields.eq(0).val(S(U)).end()},l=function(U,V){b(V).data("colorpicker").selector.css("backgroundColor","#"+S({h:U.h,s:100,b:100}));b(V).data("colorpicker").selectorIndic.css({left:parseInt(150*U.s/100,10),top:parseInt(150*(100-U.b)/100,10)})},H=function(U,V){b(V).data("colorpicker").hue.css("top",parseInt(150-150*U.h/360,10))},h=function(U,V){b(V).data("colorpicker").currentColor.css("backgroundColor","#"+S(U))},F=function(U,V){b(V).data("colorpicker").newColor.css("backgroundColor","#"+S(U))},n=function(U){var W=U.charCode||U.keyCode||-1;if((W>O&&W<=90)||W==32){return false}var V=b(this).parent().parent();if(V.data("colorpicker").livePreview===true){e.apply(this)}},e=function(V){var W=b(this).parent().parent(),U;if(this.parentNode.className.indexOf("_hex")>0){W.data("colorpicker").color=U=m(z(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){W.data("colorpicker").color=U=f({h:parseInt(W.data("colorpicker").fields.eq(4).val(),10),s:parseInt(W.data("colorpicker").fields.eq(5).val(),10),b:parseInt(W.data("colorpicker").fields.eq(6).val(),10)})}else{W.data("colorpicker").color=U=i(N({r:parseInt(W.data("colorpicker").fields.eq(1).val(),10),g:parseInt(W.data("colorpicker").fields.eq(2).val(),10),b:parseInt(W.data("colorpicker").fields.eq(3).val(),10)}))}}if(V){K(U,W.get(0));g(U,W.get(0));v(U,W.get(0))}l(U,W.get(0));H(U,W.get(0));F(U,W.get(0));W.data("colorpicker").onChange.apply(W,[U,S(U),j(U)])},o=function(U){var V=b(this).parent().parent();V.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},L=function(){O=this.parentNode.className.indexOf("_hex")>0?70:65;b(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");b(this).parent().addClass("colorpicker_focus")},J=function(U){var W=b(this).parent().find("input").focus();var V={el:b(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:U.pageY,field:W,val:parseInt(W.val(),10),preview:b(this).parent().parent().data("colorpicker").livePreview};b(document).bind("mouseup",V,s);b(document).bind("mousemove",V,M)},M=function(U){U.data.field.val(Math.max(0,Math.min(U.data.max,parseInt(U.data.val+U.pageY-U.data.y,10))));if(U.data.preview){e.apply(U.data.field.get(0),[true])}return false},s=function(U){e.apply(U.data.field.get(0),[true]);U.data.el.removeClass("colorpicker_slider").find("input").focus();b(document).unbind("mouseup",s);b(document).unbind("mousemove",M);return false},x=function(U){var V={cal:b(this).parent(),y:b(this).offset().top};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,r);b(document).bind("mousemove",V,k)},k=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(U.pageY-U.data.y))))/150,10)).get(0),[U.data.preview]);return false},r=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",r);b(document).unbind("mousemove",k);return false},y=function(U){var V={cal:b(this).parent(),pos:b(this).offset()};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,B);b(document).bind("mousemove",V,q)},q=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(U.pageY-U.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(U.pageX-U.data.pos.left))))/150,10)).get(0),[U.data.preview]);return false},B=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",B);b(document).unbind("mousemove",q);return false},w=function(U){b(this).addClass("colorpicker_focus")},R=function(U){b(this).removeClass("colorpicker_focus")},p=function(V){var W=b(this).parent();var U=W.data("colorpicker").color;W.data("colorpicker").origColor=U;h(U,W.get(0));W.data("colorpicker").onSubmit(U,S(U),j(U),W.data("colorpicker").el)},E=function(U){var Y=b("#"+b(this).data("colorpickerId"));Y.data("colorpicker").onBeforeShow.apply(this,[Y.get(0)]);var Z=b(this).offset();var X=A();var W=Z.top+this.offsetHeight;var V=Z.left;if(W+176>X.t+X.h){W-=this.offsetHeight+176}if(V+356>X.l+X.w){V-=356}Y.css({left:V+"px",top:W+"px"});if(Y.data("colorpicker").onShow.apply(this,[Y.get(0)])!=false){Y.show()}b(document).bind("mousedown",{cal:Y},P);return false},P=function(U){if(!I(U.data.cal.get(0),U.target,U.data.cal.get(0))){if(U.data.cal.data("colorpicker").onHide.apply(this,[U.data.cal.get(0)])!=false){U.data.cal.hide()}b(document).unbind("mousedown",P)}},I=function(W,V,U){if(W==V){return true}if(W.contains){return W.contains(V)}if(W.compareDocumentPosition){return !!(W.compareDocumentPosition(V)&16)}var X=V.parentNode;while(X&&X!=U){if(X==W){return true}X=X.parentNode}return false},A=function(){var U=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(U?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(U?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(U?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(U?document.documentElement.clientHeight:document.body.clientHeight)}},f=function(U){return{h:Math.min(360,Math.max(0,U.h)),s:Math.min(100,Math.max(0,U.s)),b:Math.min(100,Math.max(0,U.b))}},N=function(U){return{r:Math.min(255,Math.max(0,U.r)),g:Math.min(255,Math.max(0,U.g)),b:Math.min(255,Math.max(0,U.b))}},z=function(W){var U=6-W.length;if(U>0){var X=[];for(var V=0;V<U;V++){X.push("0")}X.push(W);W=X.join("")}return W},d=function(U){var U=parseInt(((U.indexOf("#")>-1)?U.substring(1):U),16);return{r:U>>16,g:(U&65280)>>8,b:(U&255)}},m=function(U){return i(d(U))},i=function(W){var V={h:0,s:0,b:0};var X=Math.min(W.r,W.g,W.b);var U=Math.max(W.r,W.g,W.b);var Y=U-X;V.b=U;if(U!=0){}V.s=U!=0?255*Y/U:0;if(V.s!=0){if(W.r==U){V.h=(W.g-W.b)/Y}else{if(W.g==U){V.h=2+(W.b-W.r)/Y}else{V.h=4+(W.r-W.g)/Y}}}else{V.h=-1}V.h*=60;if(V.h<0){V.h+=360}V.s*=100/255;V.b*=100/255;return V},j=function(U){var W={};var aa=Math.round(U.h);var Z=Math.round(U.s*255/100);var V=Math.round(U.b*255/100);if(Z==0){W.r=W.g=W.b=V}else{var ab=V;var Y=(255-Z)*V/255;var X=(ab-Y)*(aa%60)/60;if(aa==360){aa=0}if(aa<60){W.r=ab;W.b=Y;W.g=Y+X}else{if(aa<120){W.g=ab;W.b=Y;W.r=ab-X}else{if(aa<180){W.g=ab;W.r=Y;W.b=Y+X}else{if(aa<240){W.b=ab;W.r=Y;W.g=ab-X}else{if(aa<300){W.b=ab;W.g=Y;W.r=Y+X}else{if(aa<360){W.r=ab;W.g=Y;W.b=ab-X}else{W.r=0;W.g=0;W.b=0}}}}}}}return{r:Math.round(W.r),g:Math.round(W.g),b:Math.round(W.b)}},D=function(U){var V=[U.r.toString(16),U.g.toString(16),U.b.toString(16)];b.each(V,function(W,X){if(X.length==1){V[W]="0"+X}});return V.join("")},S=function(U){return D(j(U))},G=function(){var V=b(this).parent();var U=V.data("colorpicker").origColor;V.data("colorpicker").color=U;K(U,V.get(0));g(U,V.get(0));v(U,V.get(0));l(U,V.get(0));H(U,V.get(0));F(U,V.get(0))};return{init:function(U){U=b.extend({},C,U||{});if(typeof U.color=="string"){U.color=m(U.color)}else{if(U.color.r!=undefined&&U.color.g!=undefined&&U.color.b!=undefined){U.color=i(U.color)}else{if(U.color.h!=undefined&&U.color.s!=undefined&&U.color.b!=undefined){U.color=f(U.color)}else{return this}}}return this.each(function(){if(!b(this).data("colorpickerId")){var V=b.extend({},U);V.origColor=U.color;var X="collorpicker_"+parseInt(Math.random()*1000);b(this).data("colorpickerId",X);var W=b(Q).attr("id",X);if(V.flat){W.appendTo(this).show()}else{W.appendTo(document.body)}V.fields=W.find("input").bind("keyup",n).bind("change",e).bind("blur",o).bind("focus",L);W.find("span").bind("mousedown",J).end().find(">div.colorpicker_current_color").bind("click",G);V.selector=W.find("div.colorpicker_color").bind("mousedown",y);V.selectorIndic=V.selector.find("div div");V.el=this;V.hue=W.find("div.colorpicker_hue div");W.find("div.colorpicker_hue").bind("mousedown",x);V.newColor=W.find("div.colorpicker_new_color");V.currentColor=W.find("div.colorpicker_current_color");W.data("colorpicker",V);W.find("div.colorpicker_submit").bind("mouseenter",w).bind("mouseleave",R).bind("click",p);K(V.color,W.get(0));v(V.color,W.get(0));g(V.color,W.get(0));H(V.color,W.get(0));l(V.color,W.get(0));h(V.color,W.get(0));F(V.color,W.get(0));if(V.flat){W.css({position:"relative",display:"block"})}else{b(this).bind(V.eventName,E)}}})},showPicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){E.apply(this)}})},hidePicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){b("#"+b(this).data("colorpickerId")).hide()}})},setColor:function(U){if(typeof U=="string"){U=m(U)}else{if(U.r!=undefined&&U.g!=undefined&&U.b!=undefined){U=i(U)}else{if(U.h!=undefined&&U.s!=undefined&&U.b!=undefined){U=f(U)}else{return this}}}return this.each(function(){if(b(this).data("colorpickerId")){var V=b("#"+b(this).data("colorpickerId"));V.data("colorpicker").color=U;V.data("colorpicker").origColor=U;K(U,V.get(0));v(U,V.get(0));g(U,V.get(0));H(U,V.get(0));l(U,V.get(0));h(U,V.get(0));F(U,V.get(0))}})}}}();b.fn.extend({ColorPicker:a.init,ColorPickerHide:a.hidePicker,ColorPickerShow:a.showPicker,ColorPickerSetColor:a.setColor})})(jQuery);jQuery.fn.editable=function(d,i,h){if(this.length===0){return(this)}var a={target:d,name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",loaddata:{},submitdata:{}};if(i){jQuery.extend(a,i)}var c=jQuery.editable.types[a.type].plugin||function(){};var f=jQuery.editable.types[a.type].submit||function(){};var g=jQuery.editable.types[a.type].buttons||jQuery.editable.types.defaults.buttons;var e=jQuery.editable.types[a.type].content||jQuery.editable.types.defaults.content;var b=jQuery.editable.types[a.type].element||jQuery.editable.types.defaults.element;h=h||function(){};jQuery(this).attr("title",a.tooltip);a.autowidth="auto"==a.width;a.autoheight="auto"==a.height;jQuery(this)[a.event](function(p){var j=this;if(j.editing){return}if(a.width!="none"){a.width=a.autowidth?jQuery(j).width():a.width}if(a.height!="none"){a.height=a.autoheight?jQuery(j).height():a.height}j.editing=true;j.revert=jQuery(j).html();j.innerHTML="";var o=document.createElement("form");if(a.cssclass){if("inherit"==a.cssclass){jQuery(o).attr("class",jQuery(j).attr("class"))}else{jQuery(o).attr("class",a.cssclass)}}if(a.style){if("inherit"==a.style){jQuery(o).attr("style",jQuery(j).attr("style"));jQuery(o).css("display",jQuery(j).css("display"))}else{jQuery(o).attr("style",a.style)}}var m=b.apply(o,[a,j]);if(a.getload){a.loadurl=a.getload;a.loadtype="GET"}else{if(a.postload){a.loadurl=a.postload;a.loadtype="POST"}}if(a.loadurl){var l=setTimeout(function(){m.disabled=true;e.apply(o,[a.loadtext,a,j])},100);var k={};k[a.id]=j.id;if(jQuery.isFunction(a.loaddata)){jQuery.extend(k,a.loaddata.apply(j,[j.revert,a]))}else{jQuery.extend(k,a.loaddata)}jQuery.ajax({type:a.loadtype,url:a.loadurl,data:k,success:function(r){window.clearTimeout(l);e.apply(o,[r,a,j]);m.disabled=false}})}else{if(a.data){var q=a.data;if(jQuery.isFunction(a.data)){var q=a.data.apply(j,[j.revert,a])}e.apply(o,[q,a,j])}else{e.apply(o,[j.revert,a,j])}}m.name=a.name;g.apply(o,[a,j]);j.appendChild(o);if(a.select){m.select()}c.apply(o,[a,j]);jQuery(":input:visible:enabled:first",o).focus();jQuery(m).keydown(function(r){if(r.keyCode==27){r.preventDefault();n()}});var l;if("cancel"==a.onblur){jQuery(m).blur(function(r){l=setTimeout(n,500)})}else{if("submit"==a.onblur){jQuery(m).blur(function(r){jQuery(o).submit()})}else{jQuery(m).blur(function(r){})}}jQuery(o).submit(function(s){if(l){clearTimeout(l)}s.preventDefault();f.apply(o,[a,j]);if(jQuery.isFunction(a.target)){var u=a.target.apply(j,[jQuery(m).val(),a]);j.innerHTML=u;j.editing=false;h.apply(j,[j.innerHTML,a])}else{var r={};r[m.name]=jQuery(m).val();r[a.id]=j.id;if(jQuery.isFunction(a.submitdata)){jQuery.extend(r,a.submitdata.apply(j,[j.revert,a]))}else{jQuery.extend(r,a.submitdata)}jQuery(j).html(a.indicator);jQuery.post(a.target,r,function(v){j.innerHTML=v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");j.editing=false;h.apply(j,[j.innerHTML,a])})}return false});function n(){j.innerHTML=j.revert;j.editing=false}});return(this)};jQuery.editable={types:{defaults:{element:function(c,b){var a=jQuery('<input type="hidden">');jQuery(this).append(a);return(a)},content:function(a,c,b){jQuery(":input:first",this).val(a)},buttons:function(b,a){if(b.submit){var d=jQuery('<input type="submit">');d.val(b.submit);jQuery(this).append(d)}if(b.cancel){var c=jQuery('<input type="button">');c.val(b.cancel);jQuery(this).append(c);jQuery(c).click(function(){jQuery(a).html(a.revert);a.editing=false})}}},text:{element:function(c,b){var a=jQuery("<input>");if(c.width!="none"){a.width(c.width)}if(c.height!="none"){a.height(c.height)}a.attr("autocomplete","off");jQuery(this).append(a);return(a)}},textarea:{element:function(c,b){var a=jQuery("<textarea>");if(c.rows){a.attr("rows",c.rows)}else{a.height(c.height)}if(c.cols){a.attr("cols",c.cols)}else{a.width(c.width)}jQuery(this).append(a);return(a)}},select:{element:function(c,b){var a=jQuery("<select>");jQuery(this).append(a);return(a)},content:function(string,settings,original){var select=jQuery("select",this);if(String==string.constructor){eval("var json = "+string);for(var key in json){if("selected"==key){continue}var option=$("<option>").val(key).append(json[key]);select.append(option)}}jQuery.editable.types.select.iefix(select,json.selected)},iefix:function(a,b){console.log(this);console.log(a);a.children().each(function(){if(jQuery(this).val()==b){jQuery(this).attr("selected","selected")}})}}},addInputType:function(b,a){jQuery.editable.types[b]=a}};(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var u=r=="x"?"Left":"Top",s=u.toLowerCase(),w="scroll"+u,p=n[w],g=a.max(n,r);if(j){k[w]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[w]-=parseInt(m.css("margin"+u))||0;k[w]-=parseInt(m.css("border"+u+"Width"))||0}k[w]+=d.offset[s]||0;if(d.over[s]){k[w]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var v=m[s];k[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*g:v}if(/^\d+$/.test(k[w])){k[w]=k[w]<=0?0:Math.min(k[w],g)}if(!q&&d.queue){if(p!=k[w]){i(d.onAfterFirst)}delete k[w]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var h=a(c).rules();var d=false;for(method in h){var g={method:method,parameters:h[method]};try{var b=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(d.old!==f){d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true;if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var l={};var j=(d.message=i||b.defaultMessage(c,"remote"));l[c.name]=a.isFunction(j)?j(f):j;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return d.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);(function(b){function a(d,c){this.$element=b(d);this.options=c;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var f=this.getTitle();if(f&&this.enabled){var e=this.tip();e.find(".tipsy-inner")[this.options.html?"html":"text"](f);e[0].className="tipsy";e.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var i=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var c=e[0].offsetWidth,h=e[0].offsetHeight;var g=(typeof this.options.gravity=="function")?this.options.gravity.call(this.$element[0]):this.options.gravity;var d;switch(g.charAt(0)){case"n":d={top:i.top+i.height+this.options.offset,left:i.left+i.width/2-c/2};break;case"s":d={top:i.top-h-this.options.offset,left:i.left+i.width/2-c/2};break;case"e":d={top:i.top+i.height/2-h/2,left:i.left-c-this.options.offset};break;case"w":d={top:i.top+i.height/2-h/2,left:i.left+i.width+this.options.offset};break}if(g.length==2){if(g.charAt(1)=="w"){d.left=i.left+i.width/2-15}else{d.left=i.left+i.width/2-c+15}}e.css(d).addClass("tipsy-"+g);if(this.options.fade){e.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{e.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){b(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var c=this.$element;if(c.attr("title")||typeof(c.attr("original-title"))!="string"){c.attr("original-title",c.attr("title")||"").removeAttr("title")}},getTitle:function(){var e,c=this.$element,d=this.options;this.fixTitle();var e,d=this.options;if(typeof d.title=="string"){e=c.attr(d.title=="title"?"original-title":d.title)}else{if(typeof d.title=="function"){e=d.title.call(c[0])}}e=(""+e).replace(/(^\s*|\s*$)/,"");return e||d.fallback},tip:function(){if(!this.$tip){this.$tip=b('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};b.fn.tipsy=function(g){if(g===true){return this.data("tipsy")}else{if(typeof g=="string"){var i=this.data("tipsy");if(i){i[g]()}return this}}g=b.extend({},b.fn.tipsy.defaults,g);function f(k){var l=b.data(k,"tipsy");if(!l){l=new a(k,b.fn.tipsy.elementOptions(k,g));b.data(k,"tipsy",l)}return l}function j(){var k=f(this);k.hoverState="in";if(g.delayIn==0){k.show()}else{k.fixTitle();setTimeout(function(){if(k.hoverState=="in"){k.show()}},g.delayIn)}}function e(){var k=f(this);k.hoverState="out";if(g.delayOut==0){k.hide()}else{setTimeout(function(){if(k.hoverState=="out"){k.hide()}},g.delayOut)}}if(!g.live){this.each(function(){f(this)})}if(g.trigger!="manual"){var c=g.live?"live":"bind",h=g.trigger=="hover"?"mouseenter":"focus",d=g.trigger=="hover"?"mouseleave":"blur";this[c](h,j)[c](d,e)}return this};b.fn.tipsy.defaults={delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};b.fn.tipsy.elementOptions=function(d,c){return b.metadata?b.extend({},c,b(d).metadata()):c};b.fn.tipsy.autoNS=function(){return b(this).offset().top>(b(document).scrollTop()+b(window).height()/2)?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>(b(document).scrollLeft()+b(window).width()/2)?"e":"w"}})(jQuery);var selected_events=[];var flash_message=[];function Queue(){if(!(this instanceof arguments.callee)){return new arguments.callee(arguments)}var a=this;a.up=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b+1)};a.down=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b-1)}}function flash(a){$("div#flash_message").remove();$.each(flash_message,function(b,d){var c=Snorby.templates.flash(d);$("body").prepend(c);$("div#flash_message").fadeIn("slow").delay(2000).fadeOut("slow");flash_message=[]});return false}function clear_selected_events(){selected_events=[];$("input#selected_events").val("");return false}function set_classification(a){var b=$("input#selected_events").attr("value");var c=$("div#events").attr("data-action");var d=$("div#events").attr("data-page");if(b.length>0){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$.post("/events/classify",{events:b,classification:a},function(){if(c=="index"){clear_selected_events();$.getScript("/events?page="+d)}else{if(c=="queue"){clear_selected_events();$.getScript("/events/queue?page="+d)}else{if(c=="history"){clear_selected_events();$.getScript("/events/history?page="+d)}else{if(c=="results"){clear_selected_events();$.getScript($("input#current_url").val())}else{}}}}flash_message.push({type:"success",message:"Event(s) Classified Successfully"})})}else{if($("ul.table div.content li.event.currently-over.highlight").is(":visible")){$("ul.table div.content li.event.currently-over.highlight .row div.select input#event-selector").click().trigger("change");set_classification(a)}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash();$.scrollTo("#header",500)}}}function update_note_count(e,d){var a=$("li#"+e+" div.row div.timestamp");var b=a.find("span.notes-count");var c='<span class="add_tipsy round notes-count" title="{{notes_count_in_words}}"><img alt="Notes" height="16" src="/images/icons/notes.png" width="16"></span>';var f=Mustache.to_html(c,d);if(d.notes_count==0){b.remove()}else{if(b.length>0){b.replaceWith(f).trigger("change")}else{a.prepend(f).trigger("change")}}}var Snorby={setup:function(){$(window).resize(function(){$.fancybox.center});$("div#flash_message, div#flash_message > *").live("click",function(){$("div#flash_message").stop().fadeOut("fast")});$("#growl").notify({speed:500,expires:5000});$(".edit-sensor-name").editable("/sensors/update_name",{height:"20px",width:"180px",name:"name",indicator:'<img src="/images/icons/pager.gif">',data:function(b){var a=b.replace(/<br[\s\/]?>/gi,"\n");return a},submitdata:function(){return{id:$(this).attr("data-sensor-id")}}})},pages:{classifications:function(){$("a.classification").live("click",function(){var a=$(this).attr("data-classification-id");set_classification(a);return false})},dashboard:function(){$("#box-holder div.box").live("click",function(a){a.preventDefault();window.location=$(this).attr("data-url");return false});$("a.show_events_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#events-graph").show();return false});$("a.show_severities_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#severity-graph").show();return false});$("a.show_protocol_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#protocol-graph").show();return false});$("a.show_signature_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#signature-graph").show();return false});$("a.show_classification_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#classification-graph").show();return false});$("a.show_source_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#source-ips-graph").show();return false});$("a.show_destination_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#destination-ips-graph").show();return false})},events:function(){$("select.email-user-select").live("change",function(b){var a=$("select.email-user-select").val();if(a!=""){if($("input#email_to").val()==""){$("input#email_to").val(a)}else{$("input#email_to").val($("input#email_to").val()+", "+a)}}});$("button.email-event-information").live("click",function(a){a.preventDefault();if($("input#email_to").val()==""){flash_message.push({type:"error",message:"The email recipients cannot be blank."});flash();$.scrollTo("#header",500)}else{if($("input#email_subject").val()==""){console.log($("input#email_subject"));flash_message.push({type:"error",message:"The email subject cannot be blank."});flash();$.scrollTo("#header",500)}else{$("a#fancybox-close").click();$.post("/events/email",$("form.email-event-information").serialize(),null,"script")}}return false});$("button.request_packet_capture").live("click",function(a){a.preventDefault();if($(this).attr("data-deepsee")){$("form.request_packet_capture input#method").val("deepsee")}$.post("/events/request_packet_capture",$("form.request_packet_capture").serialize(),null,"script");return false});$("dl#event-sub-menu a").live("click",function(a){$("dl#event-sub-menu").hide()});$("a.has-event-menu").live("click",function(a){a.preventDefault();var b=$(this).parent("li").find("dl#event-sub-menu");if(b.is(":visible")){b.fadeOut("fast")}else{$("dl#event-sub-menu").hide();b.fadeIn("fast")}return false});$("button.mass-action").live("click",function(b){b.preventDefault();var a=$("form#mass-action-form");$("a#fancybox-close").click();$.post("/events/mass_action",a.serialize(),null,"script");return false});$("button.create-notification").live("click",function(b){b.preventDefault();var a=$("form#new_notification");$.post("/notifications",a.serialize(),null,"script");$("a#fancybox-close").click();return false});$("button.cancel-snorbybox").live("click",function(a){a.preventDefault();$("a#fancybox-close").click();return false});$("ul.payload-tabs li a").live("click",function(b){b.preventDefault();var a=$(this).attr("data-div");$(this).parents("ul").find("li").removeClass("current");$(this).parent("li").addClass("current");$("div.payload-holder").hide();$("div."+a+" pre").css("opacity",0);$("div."+a).show();$("div."+a+" pre").stop().animate({opacity:1},1000);return false});$("a.export").live("click",function(b){b.preventDefault();var a=$("input#selected_events").attr("value");if(a){$.post(this.href,{events:a})}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash()}return false});$("a.edit-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");$.getScript("/notes/"+a+"/edit");return false});$("a.destroy-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");if(confirm("Are you sure you want to delete this note?")){$("div.notes").fadeTo(500,0.4);$.post("/notes/destroy",{id:a,_method:"delete"},null,"script")}return false});$("button.add_new_note-working").live("click",function(a){a.preventDefault();return false});$("button.cancel-note").live("click",function(a){a.preventDefault();$(this).parents("div#new_note_box").remove();return false});$("button.add_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");if($("div#new_note_box").length>0){}else{$(this).removeClass("add_new_note").addClass("add_new_note-working");var a=$(this).width();$(this).addClass("loading").css("width",a);$.get("/notes/new",{sid:c,cid:b},null,"script")}return false});$("button.submit_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");var f=$(this).parent("div#form-actions").parent("div#new_note").find("textarea#body").val();if(f.length>0){var a=$(this).width();$(this).addClass("loading").css("width",a);$.post("/notes/create",{sid:c,cid:b,body:f},null,"script")}else{flash_message.push({type:"error",message:"The note body cannot be blank!"});flash();$.scrollTo("#header",500)}return false});$("a.query-data").live("click",function(){$("pre.query-data-content").hide();$("pre#"+$(this).attr("data-content-name")).show();return false});$("a.snorbybox").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href,onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","ctrl+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}});return false});$("div.create-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var c=$(this).parents("li.event").attr("data-event-cid");$(this).removeClass("create-favorite").addClass("destroy-favorite");$.post("/events/favorite",{sid:a,cid:c});var b=new Queue();b.up();return false});$("div.destroy-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var d=$(this).parents("li.event").attr("data-event-cid");var c=$("div#events").attr("data-action");$(this).removeClass("destroy-favorite").addClass("create-favorite");$.post("/events/favorite",{sid:a,cid:d});var b=new Queue();b.down();if(c=="queue"){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$("div.destroy-favorite").removeClass("enabled").css("cursor","default");$.get("/events/queue",null,null,"script")}return false});$("input.event-select-all").live("change",function(){if($(this).attr("checked")){$("ul.table div.content li.event input.event-selector").attr("checked",true)}else{$("ul.table div.content li.event input.event-selector").attr("checked",false)}return true});$("ul.table div.content li.event div.click").live("click",function(){$("dl#event-sub-menu").hide();var b=$(this).parents("li").attr("data-event-sid");var e=$(this).parents("li").attr("data-event-cid");var d=$("li#event_"+b+""+e);var c=$("li#event_"+b+""+e+" input#event-selector");var a=$("li#event_"+b+""+e+" div.event-data");Snorby.helpers.remove_click_events(true);$("li.event").removeClass("highlight");if(!a.is(":visible")){d.addClass("highlight")}else{d.removeClass("highlight")}if(a.attr("data")=="true"){Snorby.helpers.remove_click_events(false);if(a.is(":visible")){a.slideUp("fast",function(){$("li.event div.event-data").slideUp("fast")})}else{$("li.event div.event-data").slideUp("fast");a.slideDown("fast")}}else{c.hide();$("li.event div.event-data").slideUp("fast");d.find("div.select").append("<img alt='laoding' src='/images/icons/loading.gif' class='select-loading'>");$.get("/events/show/"+b+"/"+e,function(){Snorby.helpers.remove_click_events(false);$(".select-loading").remove();c.show();a.attr("data",true)},"script")}return false});$("div.new_events").live("click",function(){$(this).remove();if(parseInt($("strong.new_event_count").html())>100){window.location="/events"}else{$("#events ul.table div.content li").fadeIn("slow")}return false})},},admin:function(){$("#users input#enabled").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{enabled:true}})}else{$.post("/users/toggle_settings",{user_id:a,user:{enabled:false}})}});$("#users input#admin").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{admin:true}})}else{$.post("/users/toggle_settings",{user_id:a,user:{admin:false}})}});$("#severity-color-bg").ColorPicker({color:$("#severity-color-bg").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-bg").val("#"+c);$("span.severity").css("backgroundColor","#"+c)}});$("#severity-color-text").ColorPicker({color:$("#severity-color-text").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-text").val("#"+c);$("span.severity").css("color","#"+c)}})},templates:{flash:function(b){var a=" <div class='{{type}}' id='flash_message' style='display:none;'> <div class='message {{type}}'>{{message}}</div> </div>";return Mustache.to_html(a,b)},event_table:function(b){var a=" {{#events}} <li id='event_{{sid}}{{cid}}' class='event' style='display:none;' data-event-id='{{sid}}-{{cid}}' data-event-sid='{{sid}}' data-event-cid='{{cid}}'> <div class='row'> <div class='select small'><input class='event-selector' id='event-selector' name='event-selector' type='checkbox'></div> <div class='important small'><div class='create-favorite enabled'></div></div> <div class='severity small'><span class='severity sev{{severity}}'>{{severity}}</span></div> <div class='click sensor address'>{{hostname}}</div> <div class='click src_ip address'>{{ip_src}}</div> <div class='click dst_ip address'>{{ip_dst}}</div> <div class='click signature'>{{message}}</div> <div class='click timestamp'>{{timestamp}}</div> </div> <div style='display:none;' class='event-data' data='false'></div> </li> {{/events}}";return Mustache.to_html(a,b)},},notification:function(a){$("#growl").notify("create",a,{expires:3000,speed:500})},helpers:{tipsy:function(){$(".add_tipsy").tipsy({fade:true,html:true,gravity:"s",live:true})},input_style:function(){$("div#form-actions button.cancel").live("click",function(){window.location="/";return false});$("input[name=blank]").focus()},dropdown:function(){$(document).click(function(){$("dl.drop-down-menu:visible").hide()});$("dl.drop-down-menu dd a").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");return true});$("dl.drop-down-menu").hover(function(){var a=$(this).data("timeout");if(a){clearTimeout(a)}},function(){$(this).data("timeout",setTimeout($.proxy(function(){$(this).fadeOut("fast")},this),500))});$("a.has_dropdown").live("click",function(){var b=$(this).attr("id");var a=$(this).parents("li").find("dl#"+b);$("dl.drop-down-menu").each(function(c){if(b===$(this).attr("id")){if($(this).is(":visible")){a.fadeOut("fast")}else{a.slideDown({duration:"fast",easing:"easeOutSine"})}}else{$(this).fadeOut("fast")}});return false})},persistence_selections:function(){$("input#event-selector").live("change",function(){var a=$(this).parents("li").attr("data-event-id");if($(this).attr("checked")){selected_events.push(a);$('input#selected_events[type="hidden"]').val(selected_events)}else{var b=a;selected_events=jQuery.grep(selected_events,function(c){return c!=b});$('input#selected_events[type="hidden"]').val(selected_events)}});$("input#event-select-all").live("change",function(){if($(this).attr("checked")){$('ul.table div.content li input[type="checkbox"]').each(function(a,c){var b=$(this).parents("li").attr("data-event-id");$(this).attr("checked","checked");selected_events.push(b)})}else{$('ul.table div.content li input[type="checkbox"]').each(function(a,b){var c=$(this).parents("li").attr("data-event-id");$(this).attr("checked","");selected_events=jQuery.grep(selected_events,function(d){return d!=c})})}$('input#selected_events[type="hidden"]').val(selected_events)})},recheck_selected_events:function(){$("input#selected_events").val(selected_events);$.each(selected_events,function(a,b){$("input.check_box_"+b).attr("checked","checked")})},pagenation:function(){$("ul.pager li").live("click",function(){if(history&&history.pushState){$(window).bind("popstate",function(){$.getScript(location.href)})}if(!$(this).hasClass("more")){var a=$(this).width();if(a<16){var a=16}$(this).addClass("loading").css("width",a);if($(this).parents("div").hasClass("notes-pager")){$("div.notes").fadeTo(500,0.4)}else{$("div.content, tbody.content").fadeTo(500,0.4)}Snorby.helpers.remove_click_events(true);if(history&&history.pushState){$.getScript($(this).find("a").attr("href"));history.pushState(null,document.title,$(this).find("a").attr("href"))}else{$.getScript($(this).find("a").attr("href"))}}return false})},remove_click_events:function(a){if(a){$("ul.table div.content div").removeClass("click")}else{$("li.event div.sensor, li.event div.src_ip, li.event div.dst_ip, li.event div.signature, li.event div.timestamp").addClass("click")}},},callbacks:function(){$("body").ajaxError(function(c,d,a,b){$("div.content").fadeTo(500,1);$('ul.table div.content li input[type="checkbox"]').attr("checked","");Snorby.helpers.remove_click_events(false);if(d.status===404){flash_message.push({type:"error",message:"The requested page could not be found."});flash()}else{flash_message.push({type:"error",message:"The request failed to complete successfully."});flash()}})},hotkeys:function(){$(document).bind("keydown","ctrl+shift+h",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:"/events/hotkey"});return false});$(document).bind("keydown","ctrl+3",function(){window.location="/jobs";return false});$(document).bind("keydown","ctrl+2",function(){window.location="/events";return false});$(document).bind("keydown","ctrl+1",function(){window.location="/events/queue";return false});$(document).bind("keydown","ctrl+shift+s",function(){window.location="/search";return false});$("ul.table div.content li.event").live("hover",function(){$("ul.table div.content li.event").removeClass("currently-over");$(this).addClass("currently-over")},function(){$(this).removeClass("currently-over")});if($("div.pager").is(":visible")){$(document).bind("keydown","ctrl+down",function(){if($("ul.table div.content li.event.currently-over").is(":visible")){$("ul.table div.content li.event.currently-over").removeClass("currently-over").next().addClass("currently-over")}else{$("ul.table div.content li.event:first").addClass("currently-over")}return false});$(document).bind("keydown","ctrl+up",function(){if($("ul.table div.content li.event.currently-over").is(":visible")){$("ul.table div.content li.event.currently-over").removeClass("currently-over").prev().addClass("currently-over")}else{$("ul.table div.content li.event:last").addClass("currently-over")}return false});$(document).bind("keydown","ctrl+o",function(){$("ul.table div.content li.event.currently-over div.row div.click").click();return false});$(document).bind("keydown","esc",function(){$("ul.table div.content li.event.highlight div.row div.click").click();return false});$(document).bind("keydown","ctrl+shift+1",function(){$("span.sev1").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+2",function(){$("span.sev2").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+3",function(){$("span.sev3").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+u",function(){set_classification(0);return false});$(document).bind("keydown","ctrl+right",function(){$("div.pager.main ul.pager li.last a").click();return false});$(document).bind("keydown","shift+right",function(){$("div.pager.notes-pager ul.pager li.next a").click();return false});$(document).bind("keydown","right",function(){$("div.pager.main ul.pager li.next a").click();return false});$(document).bind("keydown","ctrl+left",function(){$("div.pager.main ul.pager li.first a").click();return false});$(document).bind("keydown","shift+left",function(){$("div.pager.notes-pager ul.pager li.previous a").click();return false});$(document).bind("keydown","left",function(){$("div.pager.main ul.pager li.previous a").click();return false});$(document).bind("keydown","ctrl+shift+a",function(){$("input.event-select-all").click().trigger("change");return false})}},validations:function(){jQuery.validator.addMethod("hex-color",function(b,a,c){return this.optional(a)||/^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/i.test(b)},jQuery.validator.messages.url);$(".validate").validate()},settings:function(){if($("div#general-settings").length>0){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}if($("input#_settings_packet_capture_auto_auth:checked").length==0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}var a=$("select#_settings_packet_capture_type").attr("packet_capture_plugin");$('select#_settings_packet_capture_type option[value="'+a+'"]').attr("selected","selected")}$("input#_settings_packet_capture").live("click",function(){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}});$("input#_settings_packet_capture_auto_auth").live("click",function(){if($("input#_settings_packet_capture_auto_auth:checked").length>0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").addClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled")}})},jobs:function(){$("a.view_job_handler, a.view_job_last_error").live("click",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href});return false})}};jQuery(document).ready(function(a){Snorby.setup();Snorby.admin();Snorby.callbacks();Snorby.hotkeys();Snorby.jobs();Snorby.settings();Snorby.validations();Snorby.helpers.tipsy();Snorby.helpers.dropdown();Snorby.helpers.input_style();Snorby.helpers.persistence_selections();Snorby.helpers.pagenation();Snorby.pages.classifications();Snorby.pages.dashboard();Snorby.pages.events()});
\ No newline at end of file
+(function(d,b){function a(c){return !d(c).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};if(!d.ui.version){d.extend(d.ui,{version:"1.8.4",plugin:{add:function(f,c,h){f=d.ui[f].prototype;for(var g in h){f.plugins[g]=f.plugins[g]||[];f.plugins[g].push([c,h[g]])}},call:function(f,c,h){if((c=f.plugins[c])&&f.element[0].parentNode){for(var g=0;g<c.length;g++){f.options[c[g][0]]&&c[g][1].apply(f.element,h)}}}},contains:function(e,c){return document.compareDocumentPosition?e.compareDocumentPosition(c)&16:e!==c&&e.contains(c)},hasScroll:function(e,c){if(d(e).css("overflow")==="hidden"){return false}c=c&&c==="left"?"scrollLeft":"scrollTop";var f=false;if(e[c]>0){return true}e[c]=1;f=e[c]>0;e[c]=0;return f},isOverAxis:function(e,c,f){return e>c&&e<c+f},isOver:function(f,c,l,k,j,g){return d.ui.isOverAxis(f,l,j)&&d.ui.isOverAxis(c,k,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});d.fn.extend({_focus:d.fn.focus,focus:function(e,c){return typeof e==="number"?this.each(function(){var f=this;setTimeout(function(){d(f).focus();c&&c.call(f)},e)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var c;c=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?d(document):c},zIndex:function(e){if(e!==b){return this.css("zIndex",e)}if(this.length){e=d(this[0]);for(var c;e.length&&e[0]!==document;){c=e.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(e.css("zIndex"));if(!isNaN(c)&&c!=0){return c}}e=e.parent()}}return 0}});d.each(["Width","Height"],function(f,c){function l(n,i,h,e){d.each(k,function(){i-=parseFloat(d.curCSS(n,"padding"+this,true))||0;if(h){i-=parseFloat(d.curCSS(n,"border"+this+"Width",true))||0}if(e){i-=parseFloat(d.curCSS(n,"margin"+this,true))||0}});return i}var k=c==="Width"?["Left","Right"]:["Top","Bottom"],j=c.toLowerCase(),g={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+c]=function(e){if(e===b){return g["inner"+c].call(this)}return this.each(function(){d.style(this,j,l(this,e)+"px")})};d.fn["outer"+c]=function(h,e){if(typeof h!=="number"){return g["outer"+c].call(this,h)}return this.each(function(){d.style(this,j,l(this,h,true,e)+"px")})}});d.extend(d.expr[":"],{data:function(e,c,f){return !!d.data(e,f[3])},focusable:function(e){var c=e.nodeName.toLowerCase(),f=d.attr(e,"tabindex");if("area"===c){c=e.parentNode;f=c.name;if(!e.href||!f||c.nodeName.toLowerCase()!=="map"){return false}e=d("img[usemap=#"+f+"]")[0];return !!e&&a(e)}return(/input|select|textarea|button|object/.test(c)?!e.disabled:"a"==c?e.href||!isNaN(f):!isNaN(f))&&a(e)},tabbable:function(e){var c=d.attr(e,"tabindex");return(isNaN(c)||c>=0)&&d(e).is(":focusable")}})}})(jQuery);(function(a,d){var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){if(!e){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return c.call(a(this),b,e)})};a.widget=function(b,j,i){var h=b.split(".")[0],g;b=b.split(".")[1];g=h+"-"+b;if(!i){i=j;j=a.Widget}a.expr[":"][g]=function(e){return !!a.data(e,b)};a[h]=a[h]||{};a[h][b]=function(e,f){arguments.length&&this._createWidget(e,f)};j=new j;j.options=a.extend(true,{},j.options);a[h][b].prototype=a.extend(true,j,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:g},i);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,e){a.fn[b]=function(k){var j=typeof k==="string",i=Array.prototype.slice.call(arguments,1),g=this;k=!j&&i.length?a.extend.apply(null,[true,k].concat(i)):k;if(j&&k.substring(0,1)==="_"){return g}j?this.each(function(){var h=a.data(this,b),f=h&&a.isFunction(h[k])?h[k].apply(h,i):h;if(f!==h&&f!==d){g=f;return false}}):this.each(function(){var f=a.data(this,b);if(f){k&&f.option(k);f._init()}else{a.data(this,b,new e(k,this))}});return g}};a.Widget=function(b,e){arguments.length&&this._createWidget(b,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,h){var g=b,f=this;if(arguments.length===0){return a.extend({},f.options)}if(typeof b==="string"){if(h===d){return this.options[b]}g={};g[b]=h}a.each(g,function(i,e){f._setOption(i,e)});return f},_setOption:function(b,e){this.options[b]=e;if(b==="disabled"){this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,j,i){var h=this.options[b];j=a.Event(j);j.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();i=i||{};if(j.originalEvent){b=a.event.props.length;for(var g;b;){g=a.event.props[--b];j[g]=j.originalEvent[g]}}this.element.trigger(j,i);return !(a.isFunction(h)&&h.call(this.element[0],j,i)===false||j.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(!d.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,h=d.which==1,g=typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false;if(!h||g||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(b){return c._mouseMove(b)};this._mouseUpDelegate=function(b){return c._mouseUp(b)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||d.preventDefault();return d.originalEvent.mouseHandled=true}},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(d);if(!this.handle){return false}return true},_mouseStart:function(d){var c=this.options;this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);return true},_mouseDrag:function(d,c){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(e){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,e)}if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",e)!==false&&f._clear()})}else{this._trigger("stop",e)!==false&&this._clear()}return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==d.target){c=true}});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone():this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)&&e.containment.constructor!=Array){var d=a(e.containment)[0];if(d){e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(e,d){if(!d){d=this.position}e=e=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*e),left:d.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*e)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=/(html|body)/i.test(l[0].tagName),k=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){k=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){k=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;k=this.originalPageX+Math.round((k-this.originalPageX)/d.grid[0])*d.grid[0];k=this.containment?!(k-this.offset.click.left<this.containment[0]||k-this.offset.click.left>this.containment[2])?k:!(k-this.offset.click.left<this.containment[0])?k-d.grid[0]:k+d.grid[0]:k}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():j?0:l.scrollTop()),left:k-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:l.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(e,d,f){f=f||this._uiHash();a.ui.plugin.call(this,e,[d,f]);if(e=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,e,d,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.4"});a.ui.plugin.add("draggable","connectToSortable",{start:function(g,d){var j=a(this).data("draggable"),h=j.options,i=a.extend({},d,{item:j.element});j.sortables=[];a(h.connectToSortable).each(function(){var b=a.data(this,"sortable");if(b&&!b.options.disabled){j.sortables.push({instance:b,shouldRevert:b.options.revert});b._refreshItems();b._trigger("activate",g,i)}})},stop:function(e,d){var h=a(this).data("draggable"),g=a.extend({},d,{item:h.element});a.each(h.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;h.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(e);this.instance.options.helper=this.instance.options._helper;h.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",e,g)}})},drag:function(e,d){var h=a(this).data("draggable"),g=this;a.each(h.sortables,function(){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};e.target=this.instance.currentItem[0];this.instance._mouseCapture(e,true);this.instance._mouseStart(e,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger("toSortable",e);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}this.instance.currentItem&&this.instance._mouseDrag(e)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",e,this.instance._uiHash(this.instance));this.instance._mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();h._trigger("fromSortable",e);h.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor")){c._cursor=d.css("cursor")}d.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity")){c._opacity=d.css("opacity")}d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(e){var d=a(this).data("draggable"),h=d.options,g=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!h.axis||h.axis!="x"){if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-e.pageY<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop+h.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<h.scrollSensitivity){d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop-h.scrollSpeed}}}if(!h.axis||h.axis!="y"){if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-e.pageX<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<h.scrollSensitivity){d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft-h.scrollSpeed}}}}else{if(!h.axis||h.axis!="x"){if(e.pageY-a(document).scrollTop()<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<h.scrollSensitivity){g=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}}if(!h.axis||h.axis!="y"){if(e.pageX-a(document).scrollLeft()<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<h.scrollSensitivity){g=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}}g!==false&&a.ui.ddmanager&&!h.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,e)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var e=a(this),b=e.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:b.top,left:b.left})})},drag:function(L,K){for(var J=a(this).data("draggable"),H=J.options,I=H.snapTolerance,G=K.offset.left,z=G+J.helperProportions.width,A=K.offset.top,y=A+J.helperProportions.height,F=J.snapElements.length-1;F>=0;F--){var E=J.snapElements[F].left,C=E+J.snapElements[F].width,D=J.snapElements[F].top,B=D+J.snapElements[F].height;if(E-I<G&&G<C+I&&D-I<A&&A<B+I||E-I<G&&G<C+I&&D-I<y&&y<B+I||E-I<z&&z<C+I&&D-I<A&&A<B+I||E-I<z&&z<C+I&&D-I<y&&y<B+I){if(H.snapMode!="inner"){var x=Math.abs(D-y)<=I,w=Math.abs(B-A)<=I,v=Math.abs(E-z)<=I,u=Math.abs(C-G)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D-J.helperProportions.height,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E-J.helperProportions.width}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C}).left-J.margins.left}}var d=x||w||v||u;if(H.snapMode!="outer"){x=Math.abs(D-A)<=I;w=Math.abs(B-y)<=I;v=Math.abs(E-G)<=I;u=Math.abs(C-z)<=I;if(x){K.position.top=J._convertPositionTo("relative",{top:D,left:0}).top-J.margins.top}if(w){K.position.top=J._convertPositionTo("relative",{top:B-J.helperProportions.height,left:0}).top-J.margins.top}if(v){K.position.left=J._convertPositionTo("relative",{top:0,left:E}).left-J.margins.left}if(u){K.position.left=J._convertPositionTo("relative",{top:0,left:C-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[F].snapping&&(x||w||v||u||d)){J.options.snap.snap&&J.options.snap.snap.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}))}J.snapElements[F].snapping=x||w||v||u||d}else{J.snapElements[F].snapping&&J.options.snap.release&&J.options.snap.release.call(J.element,L,a.extend(J._uiHash(),{snapItem:J.snapElements[F].item}));J.snapElements[F].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(e,b){return(parseInt(a(e).css("zIndex"),10)||0)-(parseInt(a(b).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(b){this.style.zIndex=c+b});this[0].style.zIndex=c+d.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex")){c._zIndex=d.css("zIndex")}d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(b){return b.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++){d[c]==this&&d.splice(c,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept"){this.accept=a.isFunction(c)?c:function(b){return b.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",d,this.ui(c))}}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0])){if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}}},_drop:function(f,d){var h=d||a.ui.ddmanager.current;if(!h||(h.currentItem||h.element)[0]==this.element[0]){return false}var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==h.options.scope&&b.accept.call(b.element[0],h.currentItem||h.element)&&a.ui.intersect(h,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){g=true;return false}});if(g){return false}if(this.accept.call(this.element[0],h.currentItem||h.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",f,this.ui(h));return this.element}return false},ui:function(b){return{draggable:b.currentItem||b.element,helper:b.helper,position:b.position,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.4"});a.ui.intersect=function(w,v,u){if(!v.offset){return false}var s=(w.positionAbs||w.position.absolute).left,q=s+w.helperProportions.width,r=(w.positionAbs||w.position.absolute).top,p=r+w.helperProportions.height,o=v.offset.left,m=o+v.proportions.width,n=v.offset.top,d=n+v.proportions.height;switch(u){case"fit":return o<=s&&q<=m&&n<=r&&p<=d;case"intersect":return o<s+w.helperProportions.width/2&&q-w.helperProportions.width/2<m&&n<r+w.helperProportions.height/2&&p-w.helperProportions.height/2<d;case"pointer":return a.ui.isOver((w.positionAbs||w.position.absolute).top+(w.clickOffset||w.offset.click).top,(w.positionAbs||w.position.absolute).left+(w.clickOffset||w.offset.click).left,n,o,v.proportions.height,v.proportions.width);case"touch":return(r>=n&&r<=d||p>=n&&p<=d||r<n&&p>d)&&(s>=o&&s<=m||q>=o&&q<=m||s<o&&q>m);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(i,d){var n=a.ui.ddmanager.droppables[i.options.scope]||[],m=d?d.type:null,k=(i.currentItem||i.element).find(":data(droppable)").andSelf(),l=0;i:for(;l<n.length;l++){if(!(n[l].options.disabled||i&&!n[l].accept.call(n[l].element[0],i.currentItem||i.element))){for(var j=0;j<k.length;j++){if(k[j]==n[l].element[0]){n[l].proportions.height=0;continue i}}n[l].visible=n[l].element.css("display")!="none";if(n[l].visible){n[l].offset=n[l].element.offset();n[l].proportions={width:n[l].element[0].offsetWidth,height:n[l].element[0].offsetHeight};m=="mousedown"&&n[l]._activate.call(n[l],d)}}}},drop:function(e,d){var f=false;a.each(a.ui.ddmanager.droppables[e.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance)){f=f||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return f},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var h=a.ui.intersect(d,this,this.options.tolerance);if(h=!h&&this.isover==1?"isout":h&&this.isover==0?"isover":null){var f;if(this.options.greedy){var b=this.element.parents(":data(droppable):eq(0)");if(b.length){f=a.data(b[0],"droppable");f.greedyChild=h=="isover"?1:0}}if(f&&h=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,c);if(f&&h=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}}}})}}})(jQuery);(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var e=this,h=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&c.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var k=0;k<l.length;k++){var j=c.trim(l[k]),i=c('<div class="ui-resizable-handle '+("ui-resizable-"+j)+'"></div>');/sw|se|ne|nw/.test(j)&&i.css({zIndex:++h.zIndex});"se"==j&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[j]=".ui-resizable-"+j;this.element.append(i)}}this._renderAxis=function(m){m=m||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=c(this.handles[g],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var f=c(this.handles[g],this.element),d=0;d=/sw|ne|nw|se|n|s/.test(g)?f.outerHeight():f.outerWidth();f=["padding",/ne|nw|n/.test(g)?"Top":/se|sw|s/.test(g)?"Bottom":/^e$/.test(g)?"Right":"Left"].join("");m.css(f,d);this._proportionallyResize()}c(this.handles[g])}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var d=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=d&&d[1]?d[1]:"se"}});if(h.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(d){var e=false;for(var f in this.handles){if(c(this.handles[f])[0]==d.target){e=true}}return !this.options.disabled&&e},_mouseStart:function(e){var g=this.options,j=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position"))){i.css({position:"absolute",top:j.top,left:j.left})}c.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();j=a(this.helper.css("left"));var h=a(this.helper.css("top"));if(g.containment){j+=c(g.containment).scrollLeft()||0;h+=c(g.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:h};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:j,top:h};this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof g.aspectRatio=="number"?g.aspectRatio:this.originalSize.width/this.originalSize.height||1;g=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",g=="auto"?this.axis+"-resize":g);i.addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var f=this.helper,h=this.originalMousePosition,g=this._change[this.axis];if(!g){return false}h=g.apply(this,[e,e.pageX-h.left||0,e.pageY-h.top||0]);if(this._aspectRatio||e.shiftKey){h=this._updateRatio(h,e)}h=this._respectSize(h,e);this._propagate("resize",e);f.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(h);this._trigger("resize",e,this.ui());return false},_mouseStop:function(e){this.resizing=false;var h=this.options,l=this;if(this._helper){var k=this._proportionallyResizeElements,j=k.length&&/textarea/i.test(k[0].nodeName);k=j&&c.ui.hasScroll(k[0],"left")?0:l.sizeDiff.height;j={width:l.size.width-(j?0:l.sizeDiff.width),height:l.size.height-k};k=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null;var i=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null;h.animate||this.element.css(c.extend(j,{top:i,left:k}));l.helper.height(l.size.height);l.helper.width(l.size.width);this._helper&&!h.animate&&this._proportionallyResize()}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",e);this._helper&&this.helper.remove();return false},_updateCache:function(d){this.offset=this.helper.offset();if(b(d.left)){this.position.left=d.left}if(b(d.top)){this.position.top=d.top}if(b(d.height)){this.size.height=d.height}if(b(d.width)){this.size.width=d.width}},_updateRatio:function(e){var f=this.position,h=this.size,g=this.axis;if(e.height){e.width=h.height*this.aspectRatio}else{if(e.width){e.height=h.width/this.aspectRatio}}if(g=="sw"){e.left=f.left+(h.width-e.width);e.top=null}if(g=="nw"){e.top=f.top+(h.height-e.height);e.left=f.left+(h.width-e.width)}return e},_respectSize:function(s){var u=this.options,r=this.axis,q=b(s.width)&&u.maxWidth&&u.maxWidth<s.width,p=b(s.height)&&u.maxHeight&&u.maxHeight<s.height,o=b(s.width)&&u.minWidth&&u.minWidth>s.width,n=b(s.height)&&u.minHeight&&u.minHeight>s.height;if(o){s.width=u.minWidth}if(n){s.height=u.minHeight}if(q){s.width=u.maxWidth}if(p){s.height=u.maxHeight}var m=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,e=/sw|nw|w/.test(r);r=/nw|ne|n/.test(r);if(o&&e){s.left=m-u.minWidth}if(q&&e){s.left=m-u.maxWidth}if(n&&r){s.top=l-u.minHeight}if(p&&r){s.top=l-u.maxHeight}if((u=!s.width&&!s.height)&&!s.left&&s.top){s.top=null}else{if(u&&!s.top&&s.left){s.left=null}}return s},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var e=this.helper||this.element,g=0;g<this._proportionallyResizeElements.length;g++){var j=this._proportionallyResizeElements[g];if(!this.borderDif){var i=[j.css("borderTopWidth"),j.css("borderRightWidth"),j.css("borderBottomWidth"),j.css("borderLeftWidth")],h=[j.css("paddingTop"),j.css("paddingRight"),j.css("paddingBottom"),j.css("paddingLeft")];this.borderDif=c.map(i,function(f,d){f=parseInt(f,10)||0;d=parseInt(h[d],10)||0;return f+d})}c.browser.msie&&(c(e).is(":hidden")||c(e).parents(":hidden").length)||j.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var d=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,f=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++d.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(d,e){return{width:this.originalSize.width+e}},w:function(d,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(d,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(d,e,f){return{height:this.originalSize.height+f}},se:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},sw:function(d,e,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,e,f]))},ne:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,e,f]))},nw:function(d,e,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,e,f]))}},_propagate:function(d,e){c.ui.plugin.call(this,d,[e,this.ui()]);d!="resize"&&this._trigger(d,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.4"});c.ui.plugin.add("resizable","alsoResize",{start:function(){var d=c(this).data("resizable").options,e=function(f){c(f).each(function(){var g=c(this);g.data("resizable-alsoresize",{width:parseInt(g.width(),10),height:parseInt(g.height(),10),left:parseInt(g.css("left"),10),top:parseInt(g.css("top"),10),position:g.css("position")})})};if(typeof d.alsoResize=="object"&&!d.alsoResize.parentNode){if(d.alsoResize.length){d.alsoResize=d.alsoResize[0];e(d.alsoResize)}else{c.each(d.alsoResize,function(f){e(f)})}}else{e(d.alsoResize)}},resize:function(e,i){var n=c(this).data("resizable");e=n.options;var m=n.originalSize,l=n.originalPosition,k={height:n.size.height-m.height||0,width:n.size.width-m.width||0,top:n.position.top-l.top||0,left:n.position.left-l.left||0},j=function(f,d){c(f).each(function(){var g=c(this),o=c(this).data("resizable-alsoresize"),s={},h=d&&d.length?d:g.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(h,function(q,p){if((q=(o[p]||0)+(k[p]||0))&&q>=0){s[p]=q||null}});if(c.browser.opera&&/relative/.test(g.css("position"))){n._revertToRelativePosition=true;g.css({position:"absolute",top:"auto",left:"auto"})}g.css(s)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(f,d){j(f,d)}):j(e.alsoResize)},stop:function(){var d=c(this).data("resizable"),e=d.options,f=function(g){c(g).each(function(){var h=c(this);h.css({position:h.data("resizable-alsoresize").position})})};if(d._revertToRelativePosition){d._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?c.each(e.alsoResize,function(g){f(g)}):f(e.alsoResize)}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(e){var i=c(this).data("resizable"),n=i.options,m=i._proportionallyResizeElements,l=m.length&&/textarea/i.test(m[0].nodeName),k=l&&c.ui.hasScroll(m[0],"left")?0:i.sizeDiff.height;l={width:i.size.width-(l?0:i.sizeDiff.width),height:i.size.height-k};k=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null;var j=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(c.extend(l,j&&k?{top:j,left:k}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var d={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};m&&m.length&&c(m[0]).css({width:d.width,height:d.height});i._updateCache(d);i._propagate("resize",e)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var e=c(this).data("resizable"),i=e.element,n=e.options.containment;if(i=n instanceof c?n.get(0):/parent/.test(n)?i.parent().get(0):n){e.containerElement=c(i);if(/document/.test(n)||n==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(i),l=[];c(["Top","Right","Left","Bottom"]).each(function(f,d){l[f]=a(m.css("padding"+d))});e.containerOffset=m.offset();e.containerPosition=m.position();e.containerSize={height:m.innerHeight()-l[3],width:m.innerWidth()-l[1]};n=e.containerOffset;var k=e.containerSize.height,j=e.containerSize.width;j=c.ui.hasScroll(i,"left")?i.scrollWidth:j;k=c.ui.hasScroll(i)?i.scrollHeight:k;e.parentData={element:i,left:n.left,top:n.top,width:j,height:k}}}},resize:function(e){var i=c(this).data("resizable"),n=i.options,m=i.containerOffset,l=i.position;e=i._aspectRatio||e.shiftKey;var k={top:0,left:0},j=i.containerElement;if(j[0]!=document&&/static/.test(j.css("position"))){k=m}if(l.left<(i._helper?m.left:0)){i.size.width+=i._helper?i.position.left-m.left:i.position.left-k.left;if(e){i.size.height=i.size.width/n.aspectRatio}i.position.left=n.helper?m.left:0}if(l.top<(i._helper?m.top:0)){i.size.height+=i._helper?i.position.top-m.top:i.position.top;if(e){i.size.width=i.size.height*n.aspectRatio}i.position.top=i._helper?m.top:0}i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;n=Math.abs((i._helper?i.offset.left-k.left:i.offset.left-k.left)+i.sizeDiff.width);m=Math.abs((i._helper?i.offset.top-k.top:i.offset.top-m.top)+i.sizeDiff.height);l=i.containerElement.get(0)==i.element.parent().get(0);k=/relative|absolute/.test(i.containerElement.css("position"));if(l&&k){n-=i.parentData.left}if(n+i.size.width>=i.parentData.width){i.size.width=i.parentData.width-n;if(e){i.size.height=i.size.width/i.aspectRatio}}if(m+i.size.height>=i.parentData.height){i.size.height=i.parentData.height-m;if(e){i.size.width=i.size.height*i.aspectRatio}}},stop:function(){var e=c(this).data("resizable"),j=e.options,p=e.containerOffset,o=e.containerPosition,n=e.containerElement,m=c(e.helper),l=m.offset(),k=m.outerWidth()-e.sizeDiff.width;m=m.outerHeight()-e.sizeDiff.height;e._helper&&!j.animate&&/relative/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m});e._helper&&!j.animate&&/static/.test(n.css("position"))&&c(this).css({left:l.left-o.left-p.left,width:k,height:m})}});c.ui.plugin.add("resizable","ghost",{start:function(){var d=c(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(){var d=c(this).data("resizable");d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=c(this).data("resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var e=c(this).data("resizable"),i=e.options,n=e.size,m=e.originalSize,l=e.originalPosition,k=e.axis;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var j=Math.round((n.width-m.width)/(i.grid[0]||1))*(i.grid[0]||1);i=Math.round((n.height-m.height)/(i.grid[1]||1))*(i.grid[1]||1);if(/^(se|s|e)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{if(/^(ne)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}else{if(/^(sw)$/.test(k)){e.size.width=m.width+j;e.size.height=m.height+i}else{e.size.width=m.width+j;e.size.height=m.height+i;e.position.top=l.top-i}e.position.left=l.left-j}}}});var a=function(d){return parseInt(d,10)||0},b=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var b;this.refresh=function(){b=a(d.options.filter,d.element[0]);b.each(function(){var e=a(this),c=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:c.left,top:c.top,right:c.left+e.outerWidth(),bottom:c.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(g){var b=this;this.opos=[g.pageX,g.pageY];if(!this.options.disabled){var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",g);a(e.appendTo).append(this.helper);this.helper.css({left:g.clientX,top:g.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=a.data(this,"selectable-item");c.startselected=true;if(!g.metaKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=true;b._trigger("unselecting",g,{unselecting:c.element})}});a(g.target).parents().andSelf().each(function(){var c=a.data(this,"selectable-item");if(c){var d=!g.metaKey||!c.$element.hasClass("ui-selected");c.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting");c.unselecting=!d;c.selecting=d;(c.selected=d)?b._trigger("selecting",g,{selecting:c.element}):b._trigger("unselecting",g,{unselecting:c.element});return false}})}},_mouseDrag:function(q){var o=this;this.dragged=true;if(!this.options.disabled){var p=this.options,e=this.opos[0],n=this.opos[1],m=q.pageX,l=q.pageY;if(e>m){var k=m;m=e;e=k}if(n>l){k=l;l=n;n=k}this.helper.css({left:e,top:n,width:m-e,height:l-n});this.selectees.each(function(){var b=a.data(this,"selectable-item");if(!(!b||b.element==o.element[0])){var c=false;if(p.tolerance=="touch"){c=!(b.left>m||b.right<e||b.top>l||b.bottom<n)}else{if(p.tolerance=="fit"){c=b.left>e&&b.right<m&&b.top>n&&b.bottom<l}}if(c){if(b.selected){b.$element.removeClass("ui-selected");b.selected=false}if(b.unselecting){b.$element.removeClass("ui-unselecting");b.unselecting=false}if(!b.selecting){b.$element.addClass("ui-selecting");b.selecting=true;o._trigger("selecting",q,{selecting:b.element})}}else{if(b.selecting){if(q.metaKey&&b.startselected){b.$element.removeClass("ui-selecting");b.selecting=false;b.$element.addClass("ui-selected");b.selected=true}else{b.$element.removeClass("ui-selecting");b.selecting=false;if(b.startselected){b.$element.addClass("ui-unselecting");b.unselecting=true}o._trigger("unselecting",q,{unselecting:b.element})}}if(b.selected){if(!q.metaKey&&!b.startselected){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;o._trigger("unselecting",q,{unselecting:b.element})}}}}});return false}},_mouseStop:function(d){var b=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=false;b._trigger("unselected",d,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;b._trigger("selected",d,{selected:c.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}return this},_setOption:function(d,c){if(d==="disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(g,d){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(g);var j=null,i=this;a(g.target).parents().each(function(){if(a.data(this,"sortable-item")==i){j=a(this);return false}});if(a.data(g.target,"sortable-item")==i){j=a(g.target)}if(!j){return false}if(this.options.handle&&!d){var h=false;a(this.options.handle,j).find("*").andSelf().each(function(){if(this==g.target){h=true}});if(!h){return false}}this.currentItem=j;this._removeCurrentsFromItems();return true},_mouseStart:function(f,d,h){d=this.options;var g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();d.containment&&this._setContainment();if(d.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",d.cursor)}if(d.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",d.opacity)}if(d.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",d.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!h){for(h=this.containers.length-1;h>=0;h--){this.containers[h]._trigger("activate",f,g._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var d=this.options,j=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-g.pageY<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop+d.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<d.scrollSensitivity){this.scrollParent[0].scrollTop=j=this.scrollParent[0].scrollTop-d.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-g.pageX<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft+d.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<d.scrollSensitivity){this.scrollParent[0].scrollLeft=j=this.scrollParent[0].scrollLeft-d.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<d.scrollSensitivity){j=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<d.scrollSensitivity){j=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}}j!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(d=this.items.length-1;d>=0;d--){j=this.items[d];var i=j.item[0],h=this._intersectsWithPointer(j);if(h){if(i!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=i&&!a.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],i):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(j)){this._rearrange(g,j)}else{break}this._trigger("change",g,this._uiHash());break}}}this._contactContainers(g);a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(e,d){if(e){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,e);if(this.options.revert){var f=this;d=f.placeholder.offset();f.reverting=true;a(this.helper).animate({left:d.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(e)})}else{this._clear(e,d)}return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};a(d).each(function(){var b=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);if(b){f.push((e.key||b[1]+"[]")+"="+(e.key&&e.expression?b[1]:b[2]))}});!f.length&&e.key&&f.push(e.key+"=");return f.join("&")},toArray:function(e){var d=this._getItemsAsjQuery(e&&e.connected),f=[];e=e||{};d.each(function(){f.push(a(e.item||this).attr(e.attribute||"id")||"")});return f},_intersectsWith:function(w){var v=this.positionAbs.left,u=v+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,q=w.left,p=q+w.width,o=w.top,m=o+w.height,n=this.offset.click.top,d=this.offset.click.left;n=s+n>o&&s+n<m&&v+d>q&&v+d<p;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>w[this.floating?"width":"height"]?n:q<v+this.helperProportions.width/2&&u-this.helperProportions.width/2<p&&o<s+this.helperProportions.height/2&&r-this.helperProportions.height/2<m},_intersectsWithPointer:function(e){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height);e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);d=d&&e;e=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!d){return false}return this.floating?f&&f=="right"||e=="down"?2:1:e&&(e=="down"?2:1)},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height);f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width);var h=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return this.floating&&g?g=="right"&&f||g=="left"&&!f:h&&(h=="down"&&d||h=="up"&&!d)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(i){var d=[],n=[],m=this._connectWith();if(m&&i){for(i=m.length-1;i>=0;i--){for(var l=a(m[i]),k=l.length-1;k>=0;k--){var j=a.data(l[k],"sortable");if(j&&j!=this&&!j.options.disabled){n.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}}}n.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=n.length-1;i>=0;i--){n[i][0].each(function(){d.push(this)})}return a(d)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data(sortable-item)"),d=0;d<this.items.length;d++){for(var f=0;f<e.length;f++){e[f]==this.items[d].item[0]&&this.items.splice(d,1)}}},_refreshItems:function(j){this.items=[];this.containers=[this];var d=this.items,p=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],j,{item:this.currentItem}):a(this.options.items,this.element),this]],o=this._connectWith();if(o){for(var n=o.length-1;n>=0;n--){for(var m=a(o[n]),l=m.length-1;l>=0;l--){var k=a.data(m[l],"sortable");if(k&&k!=this&&!k.options.disabled){p.push([a.isFunction(k.options.items)?k.options.items.call(k.element[0],j,{item:this.currentItem}):a(k.options.items,k.element),k]);this.containers.push(k)}}}}for(n=p.length-1;n>=0;n--){j=p[n][1];o=p[n][0];l=0;for(m=o.length;l<m;l++){k=a(o[l]);k.data("sortable-item",j);d.push({item:k,instance:j,width:0,height:0,left:0,top:0})}}},refreshPositions:function(f){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var h=this.items[d],g=this.options.toleranceElement?a(this.options.toleranceElement,h.item):h.item;if(!f){h.width=g.outerWidth();h.height=g.outerHeight()}g=g.offset();h.left=g.left;h.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(d=this.containers.length-1;d>=0;d--){g=this.containers[d].element.offset();this.containers[d].containerCache.left=g.left;this.containers[d].containerCache.top=g.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}return this},_createPlaceholder:function(f){var d=f||this,h=d.options;if(!h.placeholder||h.placeholder.constructor==String){var g=h.placeholder;h.placeholder={element:function(){var b=a(document.createElement(d.currentItem[0].nodeName)).addClass(g||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g){b.style.visibility="hidden"}return b},update:function(c,b){if(!(g&&!h.forcePlaceholderSize)){b.height()||b.height(d.currentItem.innerHeight()-parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||0,10));b.width()||b.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=a(h.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);h.placeholder.update(d,d.placeholder)},_contactContainers:function(i){for(var d=null,n=null,m=this.containers.length-1;m>=0;m--){if(!a.ui.contains(this.currentItem[0],this.containers[m].element[0])){if(this._intersectsWith(this.containers[m].containerCache)){if(!(d&&a.ui.contains(this.containers[m].element[0],d.element[0]))){d=this.containers[m];n=m}}else{if(this.containers[m].containerCache.over){this.containers[m]._trigger("out",i,this._uiHash(this));this.containers[m].containerCache.over=0}}}}if(d){if(this.containers.length===1){this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}else{if(this.currentContainer!=this.containers[n]){d=10000;m=null;for(var l=this.positionAbs[this.containers[n].floating?"left":"top"],k=this.items.length-1;k>=0;k--){if(a.ui.contains(this.containers[n].element[0],this.items[k].item[0])){var j=this.items[k][this.containers[n].floating?"left":"top"];if(Math.abs(j-l)<d){d=Math.abs(j-l);m=this.items[k]}}}if(m||this.options.dropOnEmpty){this.currentContainer=this.containers[n];m?this._rearrange(i,m,null,true):this._rearrange(i,null,this.containers[n].element,true);this._trigger("change",i,this._uiHash());this.containers[n]._trigger("change",i,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[n]._trigger("over",i,this._uiHash(this));this.containers[n].containerCache.over=1}}}}},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[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")}}if(d[0].style.width==""||c.forceHelperSize){d.width(this.currentItem.width())}if(d[0].style.height==""||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{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 e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)){var d=a(e.containment)[0];e=a(e.containment).offset();var f=a(d).css("overflow")!="hidden";this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,d){if(!d){d=this.position}f=f=="absolute"?1:-1;var h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(h[0].tagName);return{top:d.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:h.scrollTop())*f),left:d.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:h.scrollLeft())*f)}},_generatePosition:function(h){var d=this.options,l=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,k=/(html|body)/i.test(l[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var j=h.pageX,i=h.pageY;if(this.originalPosition){if(this.containment){if(h.pageX-this.offset.click.left<this.containment[0]){j=this.containment[0]+this.offset.click.left}if(h.pageY-this.offset.click.top<this.containment[1]){i=this.containment[1]+this.offset.click.top}if(h.pageX-this.offset.click.left>this.containment[2]){j=this.containment[2]+this.offset.click.left}if(h.pageY-this.offset.click.top>this.containment[3]){i=this.containment[3]+this.offset.click.top}}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;j=this.originalPageX+Math.round((j-this.originalPageX)/d.grid[0])*d.grid[0];j=this.containment?!(j-this.offset.click.left<this.containment[0]||j-this.offset.click.left>this.containment[2])?j:!(j-this.offset.click.left<this.containment[0])?j-d.grid[0]:j+d.grid[0]:j}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():k?0:l.scrollTop()),left:j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():k?0:l.scrollLeft())}},_rearrange:function(h,d,l,k){l?l[0].appendChild(this.placeholder[0]):d.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?d.item[0]:d.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var j=this,i=this.counter;window.setTimeout(function(){i==j.counter&&j.refreshPositions(!k)},0)},_clear:function(f,d){this.reverting=false;var h=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var g in this._storedCSS){if(this._storedCSS[g]=="auto"||this._storedCSS[g]=="static"){this._storedCSS[g]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!d&&h.push(function(b){this._trigger("receive",b,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!d){h.push(function(b){this._trigger("update",b,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){d||h.push(function(b){this._trigger("remove",b,this._uiHash())});for(g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!d){h.push(function(b){return function(c){b._trigger("receive",c,this._uiHash(this))}}.call(this,this.containers[g]));h.push(function(b){return function(c){b._trigger("update",c,this._uiHash(this))}}.call(this,this.containers[g]))}}}for(g=this.containers.length-1;g>=0;g--){d||h.push(function(b){return function(c){b._trigger("deactivate",c,this._uiHash(this))}}.call(this,this.containers[g]));if(this.containers[g].containerCache.over){h.push(function(b){return function(c){b._trigger("out",c,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!d){this._trigger("beforeStop",f,this._uiHash());for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}return false}d||this._trigger("beforeStop",f,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!d){for(g=0;g<h.length;g++){h[g].call(this,f)}this._trigger("stop",f,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.4"})})(jQuery);jQuery.effects||function(q,i){function g(j){var f;if(j&&j.constructor==Array&&j.length==3){return j}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(j)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(j)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(j)){return e.transparent}return e[q.trim(j).toLowerCase()]}function a(k,j){var f;do{f=q.curCSS(k,j);if(f!=""&&f!="transparent"||q.nodeName(k,"body")){break}j="backgroundColor"}while(k=k.parentNode);return g(f)}function d(){var m=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,j={},f,l;if(m&&m.length&&m[0]&&m[m[0]]){for(var k=m.length;k--;){f=m[k];if(typeof m[f]=="string"){l=f.replace(/\-(\w)/g,function(o,n){return n.toUpperCase()});j[l]=m[f]}}}else{for(f in m){if(typeof m[f]==="string"){j[f]=m[f]}}}return j}function c(k){var j,f;for(j in k){f=k[j];if(f==null||q.isFunction(f)||j in v||/scrollbar/.test(j)||!/color/i.test(j)&&isNaN(parseFloat(f))){delete k[j]}}return k}function u(l,j){var f={_:0},k;for(k in j){if(l[k]!=j[k]){f[k]=j[k]}}return f}function h(l,j,f,k){if(typeof l=="object"){k=j;f=null;j=l;l=j.effect}if(q.isFunction(j)){k=j;f=null;j={}}if(typeof j=="number"||q.fx.speeds[j]){k=f;f=j;j={}}if(q.isFunction(f)){k=f;f=null}j=j||{};f=f||j.duration;f=q.fx.off?0:typeof f=="number"?f:q.fx.speeds[f]||q.fx.speeds._default;k=k||j.complete;return[l,j,f,k]}q.effects={};q.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(j,f){q.fx.step[f]=function(k){if(!k.colorInit){k.start=a(k.elem,f);k.end=g(k.end);k.colorInit=true}k.elem.style[f]="rgb("+Math.max(Math.min(parseInt(k.pos*(k.end[0]-k.start[0])+k.start[0],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[1]-k.start[1])+k.start[1],10),255),0)+","+Math.max(Math.min(parseInt(k.pos*(k.end[2]-k.start[2])+k.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},b=["add","remove","toggle"],v={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};q.effects.animateClass=function(l,j,f,k){if(q.isFunction(f)){k=f;f=null}return this.each(function(){var r=q(this),o=r.attr("style")||" ",n=c(d.call(this)),p,m=r.attr("className");q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});p=c(d.call(this));r.attr("className",m);r.animate(u(n,p),j,f,function(){q.each(b,function(s,w){l[w]&&r[w+"Class"](l[w])});if(typeof r.attr("style")=="object"){r.attr("style").cssText="";r.attr("style").cssText=o}else{r.attr("style",o)}k&&k.apply(this,arguments)})})};q.fn.extend({_addClass:q.fn.addClass,addClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{add:l},j,f,k]):this._addClass(l)},_removeClass:q.fn.removeClass,removeClass:function(l,j,f,k){return j?q.effects.animateClass.apply(this,[{remove:l},j,f,k]):this._removeClass(l)},_toggleClass:q.fn.toggleClass,toggleClass:function(m,j,f,l,k){return typeof j=="boolean"||j===i?f?q.effects.animateClass.apply(this,[j?{add:m}:{remove:m},f,l,k]):this._toggleClass(m,j):q.effects.animateClass.apply(this,[{toggle:m},j,f,l])},switchClass:function(m,j,f,l,k){return q.effects.animateClass.apply(this,[{add:j,remove:m},f,l,k])}});q.extend(q.effects,{version:"1.8.4",save:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.data("ec.storage."+j[f],k[0].style[j[f]])}},restore:function(k,j){for(var f=0;f<j.length;f++){j[f]!==null&&k.css(j[f],k.data("ec.storage."+j[f]))}},setMode:function(j,f){if(f=="toggle"){f=j.is(":hidden")?"show":"hide"}return f},getBaseline:function(k,j){var f;switch(k[0]){case"top":f=0;break;case"middle":f=0.5;break;case"bottom":f=1;break;default:f=k[0]/j.height}switch(k[1]){case"left":k=0;break;case"center":k=0.5;break;case"right":k=1;break;default:k=k[1]/j.width}return{x:k,y:f}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper")){return k.parent()}var j={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},f=q("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(f);f=k.parent();if(k.css("position")=="static"){f.css({position:"relative"});k.css({position:"relative"})}else{q.extend(j,{position:k.css("position"),zIndex:k.css("z-index")});q.each(["top","left","bottom","right"],function(m,l){j[l]=k.css(l);if(isNaN(parseInt(j[l],10))){j[l]="auto"}});k.css({position:"relative",top:0,left:0})}return f.css(j).show()},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(l,j,f,k){k=k||{};q.each(j,function(n,m){unit=l.cssUnit(m);if(unit[0]>0){k[m]=unit[0]*f+unit[1]}});return k}});q.fn.extend({effect:function(k){var j=h.apply(this,arguments);j={options:j[1],duration:j[2],callback:j[3]};var f=q.effects[k];return f&&!q.fx.off?f.call(this,j):this},_show:q.fn.show,show:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._show.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="show";return this.effect.apply(this,f)}},_hide:q.fn.hide,hide:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]){return this._hide.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="hide";return this.effect.apply(this,f)}},__toggle:q.fn.toggle,toggle:function(j){if(!j||typeof j=="number"||q.fx.speeds[j]||typeof j=="boolean"||q.isFunction(j)){return this.__toggle.apply(this,arguments)}else{var f=h.apply(this,arguments);f[1].mode="toggle";return this.effect.apply(this,f)}},cssUnit:function(k){var j=this.css(k),f=[];q.each(["em","px","%","pt"],function(m,l){if(j.indexOf(l)>0){f=[parseFloat(j),l]}});return f}});q.easing.jswing=q.easing.swing;q.extend(q.easing,{def:"easeOutQuad",swing:function(m,j,f,l,k){return q.easing[q.easing.def](m,j,f,l,k)},easeInQuad:function(m,j,f,l,k){return l*(j/=k)*j+f},easeOutQuad:function(m,j,f,l,k){return -l*(j/=k)*(j-2)+f},easeInOutQuad:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j+f}return -l/2*(--j*(j-2)-1)+f},easeInCubic:function(m,j,f,l,k){return l*(j/=k)*j*j+f},easeOutCubic:function(m,j,f,l,k){return l*((j=j/k-1)*j*j+1)+f},easeInOutCubic:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j+f}return l/2*((j-=2)*j*j+2)+f},easeInQuart:function(m,j,f,l,k){return l*(j/=k)*j*j*j+f},easeOutQuart:function(m,j,f,l,k){return -l*((j=j/k-1)*j*j*j-1)+f},easeInOutQuart:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j+f}return -l/2*((j-=2)*j*j*j-2)+f},easeInQuint:function(m,j,f,l,k){return l*(j/=k)*j*j*j*j+f},easeOutQuint:function(m,j,f,l,k){return l*((j=j/k-1)*j*j*j*j+1)+f},easeInOutQuint:function(m,j,f,l,k){if((j/=k/2)<1){return l/2*j*j*j*j*j+f}return l/2*((j-=2)*j*j*j*j+2)+f},easeInSine:function(m,j,f,l,k){return -l*Math.cos(j/k*(Math.PI/2))+l+f},easeOutSine:function(m,j,f,l,k){return l*Math.sin(j/k*(Math.PI/2))+f},easeInOutSine:function(m,j,f,l,k){return -l/2*(Math.cos(Math.PI*j/k)-1)+f},easeInExpo:function(m,j,f,l,k){return j==0?f:l*Math.pow(2,10*(j/k-1))+f},easeOutExpo:function(m,j,f,l,k){return j==k?f+l:l*(-Math.pow(2,-10*j/k)+1)+f},easeInOutExpo:function(m,j,f,l,k){if(j==0){return f}if(j==k){return f+l}if((j/=k/2)<1){return l/2*Math.pow(2,10*(j-1))+f}return l/2*(-Math.pow(2,-10*--j)+2)+f},easeInCirc:function(m,j,f,l,k){return -l*(Math.sqrt(1-(j/=k)*j)-1)+f},easeOutCirc:function(m,j,f,l,k){return l*Math.sqrt(1-(j=j/k-1)*j)+f},easeInOutCirc:function(m,j,f,l,k){if((j/=k/2)<1){return -l/2*(Math.sqrt(1-j*j)-1)+f}return l/2*(Math.sqrt(1-(j-=2)*j)+1)+f},easeInElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return -(k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l))+f},easeOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m)==1){return f+n}l||(l=m*0.3);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}return k*Math.pow(2,-10*j)*Math.sin((j*m-o)*2*Math.PI/l)+n+f},easeInOutElastic:function(o,j,f,n,m){o=1.70158;var l=0,k=n;if(j==0){return f}if((j/=m/2)==2){return f+n}l||(l=m*0.3*1.5);if(k<Math.abs(n)){k=n;o=l/4}else{o=l/(2*Math.PI)*Math.asin(n/k)}if(j<1){return -0.5*k*Math.pow(2,10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)+f}return k*Math.pow(2,-10*(j-=1))*Math.sin((j*m-o)*2*Math.PI/l)*0.5+n+f},easeInBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*(j/=l)*j*((k+1)*j-k)+f},easeOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}return m*((j=j/l-1)*j*((k+1)*j+k)+1)+f},easeInOutBack:function(n,j,f,m,l,k){if(k==i){k=1.70158}if((j/=l/2)<1){return m/2*j*j*(((k*=1.525)+1)*j-k)+f}return m/2*((j-=2)*j*(((k*=1.525)+1)*j+k)+2)+f},easeInBounce:function(m,j,f,l,k){return l-q.easing.easeOutBounce(m,k-j,0,l,k)+f},easeOutBounce:function(m,j,f,l,k){return(j/=k)<1/2.75?l*7.5625*j*j+f:j<2/2.75?l*(7.5625*(j-=1.5/2.75)*j+0.75)+f:j<2.5/2.75?l*(7.5625*(j-=2.25/2.75)*j+0.9375)+f:l*(7.5625*(j-=2.625/2.75)*j+0.984375)+f},easeInOutBounce:function(m,j,f,l,k){if(j<k/2){return q.easing.easeInBounce(m,j*2,0,l,k)*0.5+f}return q.easing.easeOutBounce(m,j*2-k,0,l,k)*0.5+l*0.5+f}})}(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var c=a(this),l=["position","top","left"],m=a.effects.setMode(c,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(c,l);c.show();var n=a.effects.createWrapper(c).css({overflow:"hidden"}),k=o=="vertical"?"height":"width";o=o=="vertical"?n.height():n.width();m=="show"&&n.css(k,0);var j={};j[k]=m=="show"?o:0;n.animate(j,b.duration,b.options.easing,function(){m=="hide"&&c.hide();a.effects.restore(c,l);a.effects.removeWrapper(c);b.callback&&b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a){a.effects.bounce=function(c){return this.queue(function(){var w=a(this),e=["position","top","left"],q=a.effects.setMode(w,c.options.mode||"effect"),u=c.options.direction||"up",v=c.options.distance||20,b=c.options.times||5,p=c.duration||250;/show|hide/.test(q)&&e.push("opacity");a.effects.save(w,e);w.show();a.effects.createWrapper(w);var s=u=="up"||u=="down"?"top":"left";u=u=="up"||u=="left"?"pos":"neg";v=c.options.distance||(s=="top"?w.outerHeight({margin:true})/3:w.outerWidth({margin:true})/3);if(q=="show"){w.css("opacity",0).css(s,u=="pos"?-v:v)}if(q=="hide"){v/=b*2}q!="hide"&&b--;if(q=="show"){var r={opacity:1};r[s]=(u=="pos"?"+=":"-=")+v;w.animate(r,p/2,c.options.easing);v/=2;b--}for(r=0;r<b;r++){var o={},n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing);v=q=="hide"?v*2:v/2}if(q=="hide"){r={opacity:0};r[s]=(u=="pos"?"-=":"+=")+v;w.animate(r,p/2,c.options.easing,function(){w.hide();a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}else{o={};n={};o[s]=(u=="pos"?"-=":"+=")+v;n[s]=(u=="pos"?"+=":"-=")+v;w.animate(o,p/2,c.options.easing).animate(n,p/2,c.options.easing,function(){a.effects.restore(w,e);a.effects.removeWrapper(w);c.callback&&c.callback.apply(this,arguments)})}w.queue("fx",function(){w.dequeue()});w.dequeue()})}})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var e=a(this),j=["position","top","left","height","width"],m=a.effects.setMode(e,b.options.mode||"hide"),o=b.options.direction||"vertical";a.effects.save(e,j);e.show();var n=a.effects.createWrapper(e).css({overflow:"hidden"});n=e[0].tagName=="IMG"?n:e;var l={size:o=="vertical"?"height":"width",position:o=="vertical"?"top":"left"};o=o=="vertical"?n.height():n.width();if(m=="show"){n.css(l.size,0);n.css(l.position,o/2)}var k={};k[l.size]=m=="show"?o:0;k[l.position]=m=="show"?0:o/2;n.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){m=="hide"&&e.hide();a.effects.restore(e,j);a.effects.removeWrapper(e);b.callback&&b.callback.apply(e[0],arguments);e.dequeue()}})})}})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var d=a(this),k=["position","top","left","opacity"],n=a.effects.setMode(d,b.options.mode||"hide"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d);var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true})/2:d.outerWidth({margin:true})/2);if(n=="show"){d.css("opacity",0).css(m,c=="pos"?-l:l)}var j={opacity:n=="show"?1:0};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var q=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,p=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var j=a(this).show().css("visibility","hidden"),m=j.offset();m.top-=parseInt(j.css("marginTop"),10)||0;m.left-=parseInt(j.css("marginLeft"),10)||0;for(var l=j.outerWidth(true),k=j.outerHeight(true),o=0;o<q;o++){for(var n=0;n<p;n++){j.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*(l/p),top:-o*(k/q)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:l/p,height:k/q,left:m.left+n*(l/p)+(b.options.mode=="show"?(n-Math.floor(p/2))*(l/p):0),top:m.top+o*(k/q)+(b.options.mode=="show"?(o-Math.floor(q/2))*(k/q):0),opacity:b.options.mode=="show"?0:1}).animate({left:m.left+n*(l/p)+(b.options.mode=="show"?0:(n-Math.floor(p/2))*(l/p)),top:m.top+o*(k/q)+(b.options.mode=="show"?0:(o-Math.floor(q/2))*(k/q)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?j.css({visibility:"visible"}):j.css({visibility:"visible"}).hide();b.callback&&b.callback.apply(j[0]);j.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fade=function(b){return this.queue(function(){var f=a(this),e=a.effects.setMode(f,b.options.mode||"hide");f.animate({opacity:e},{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"],u=a.effects.setMode(v,b.options.mode||"hide"),q=b.options.size||15,p=!!b.options.horizFirst,m=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(v,n);v.show();var s=a.effects.createWrapper(v).css({overflow:"hidden"}),r=u=="show"!=p,c=r?["width","height"]:["height","width"];r=r?[s.width(),s.height()]:[s.height(),s.width()];var o=/([0-9]+)%/.exec(q);if(o){q=parseInt(o[1],10)/100*r[u=="hide"?0:1]}if(u=="show"){s.css(p?{height:0,width:q}:{height:q,width:0})}p={};o={};p[c[0]]=u=="show"?r[0]:q;o[c[1]]=u=="show"?r[1]:0;s.animate(p,m,b.options.easing).animate(o,m,b.options.easing,function(){u=="hide"&&v.hide();a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(v[0],arguments);v.dequeue()})})}})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),h=["backgroundImage","backgroundColor","opacity"],i=a.effects.setMode(c,b.options.mode||"show"),g={backgroundColor:c.css("backgroundColor")};if(i=="hide"){g.opacity=0}a.effects.save(c,h);c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){i=="hide"&&c.hide();a.effects.restore(c,h);i=="show"&&!a.support.opacity&&this.style.removeAttribute("filter");b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,b.options.mode||"show");times=(b.options.times||5)*2-1;duration=b.duration?b.duration/2:a.fx.speeds._default/2;isVisible=d.is(":visible");animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if(e=="hide"&&isVisible||e=="show"&&!isVisible){times--}for(e=0;e<times;e++){d.animate({opacity:animateTo},duration,b.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,b.options.easing,function(){animateTo==0&&d.hide();b.callback&&b.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);(function(a){a.effects.puff=function(c){return this.queue(function(){var b=a(this),k=a.effects.setMode(b,c.options.mode||"hide"),j=parseInt(c.options.percent,10)||150,f=j/100,d={height:b.height(),width:b.width()};a.extend(c.options,{fade:true,mode:k,percent:k=="hide"?j:100,from:k=="hide"?d:{height:d.height*f,width:d.width*f}});b.effect("scale",c.options,c.duration,c.callback);b.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var b=a(this),m=a.extend(true,{},c.options),k=a.effects.setMode(b,c.options.mode||"effect"),j=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:k=="hide"?0:100),d=c.options.direction||"both",l=c.options.origin;if(k!="effect"){m.origin=l||["middle","center"];m.restore=true}l={height:b.height(),width:b.width()};b.from=c.options.from||(k=="show"?{height:0,width:0}:l);j={y:d!="horizontal"?j/100:1,x:d!="vertical"?j/100:1};b.to={height:l.height*j.y,width:l.width*j.x};if(c.options.fade){if(k=="show"){b.from.opacity=0;b.to.opacity=1}if(k=="hide"){b.from.opacity=1;b.to.opacity=0}}m.from=b.from;m.to=b.to;m.mode=k;b.effect("size",m,c.duration,c.callback);b.dequeue()})};a.effects.size=function(c){return this.queue(function(){var B=a(this),z=["position","top","left","width","height","overflow","opacity"],x=["position","top","left","overflow","opacity"],w=["width","height","overflow"],v=["fontSize"],y=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],s=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],b=a.effects.setMode(B,c.options.mode||"effect"),o=c.options.restore||false,q=c.options.scale||"both",r=c.options.origin,u={height:B.height(),width:B.width()};B.from=c.options.from||u;B.to=c.options.to||u;if(r){r=a.effects.getBaseline(r,u);B.from.top=(u.height-B.from.height)*r.y;B.from.left=(u.width-B.from.width)*r.x;B.to.top=(u.height-B.to.height)*r.y;B.to.left=(u.width-B.to.width)*r.x}var A={from:{y:B.from.height/u.height,x:B.from.width/u.width},to:{y:B.to.height/u.height,x:B.to.width/u.width}};if(q=="box"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(y);B.from=a.effects.setTransition(B,y,A.from.y,B.from);B.to=a.effects.setTransition(B,y,A.to.y,B.to)}if(A.from.x!=A.to.x){z=z.concat(s);B.from=a.effects.setTransition(B,s,A.from.x,B.from);B.to=a.effects.setTransition(B,s,A.to.x,B.to)}}if(q=="content"||q=="both"){if(A.from.y!=A.to.y){z=z.concat(v);B.from=a.effects.setTransition(B,v,A.from.y,B.from);B.to=a.effects.setTransition(B,v,A.to.y,B.to)}}a.effects.save(B,o?z:x);B.show();a.effects.createWrapper(B);B.css("overflow","hidden").css(B.from);if(q=="content"||q=="both"){y=y.concat(["marginTop","marginBottom"]).concat(v);s=s.concat(["marginLeft","marginRight"]);w=z.concat(y).concat(s);B.find("*[width]").each(function(){child=a(this);o&&a.effects.save(child,w);var d={height:child.height(),width:child.width()};child.from={height:d.height*A.from.y,width:d.width*A.from.x};child.to={height:d.height*A.to.y,width:d.width*A.to.x};if(A.from.y!=A.to.y){child.from=a.effects.setTransition(child,y,A.from.y,child.from);child.to=a.effects.setTransition(child,y,A.to.y,child.to)}if(A.from.x!=A.to.x){child.from=a.effects.setTransition(child,s,A.from.x,child.from);child.to=a.effects.setTransition(child,s,A.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){o&&a.effects.restore(child,w)})})}B.animate(B.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){B.to.opacity===0&&B.css("opacity",B.from.opacity);b=="hide"&&B.hide();a.effects.restore(B,o?z:x);a.effects.removeWrapper(B);c.callback&&c.callback.apply(this,arguments);B.dequeue()}})})}})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var v=a(this),n=["position","top","left"];a.effects.setMode(v,b.options.mode||"effect");var u=b.options.direction||"left",s=b.options.distance||20,d=b.options.times||3,r=b.duration||b.options.duration||140;a.effects.save(v,n);v.show();a.effects.createWrapper(v);var q=u=="up"||u=="down"?"top":"left",p=u=="up"||u=="left"?"pos":"neg";u={};var o={},m={};u[q]=(p=="pos"?"-=":"+=")+s;o[q]=(p=="pos"?"+=":"-=")+s*2;m[q]=(p=="pos"?"-=":"+=")+s*2;v.animate(u,r,b.options.easing);for(s=1;s<d;s++){v.animate(o,r,b.options.easing).animate(m,r,b.options.easing)}v.animate(o,r,b.options.easing).animate(u,r/2,b.options.easing,function(){a.effects.restore(v,n);a.effects.removeWrapper(v);b.callback&&b.callback.apply(this,arguments)});v.queue("fx",function(){v.dequeue()});v.dequeue()})}})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var d=a(this),k=["position","top","left"],n=a.effects.setMode(d,b.options.mode||"show"),c=b.options.direction||"left";a.effects.save(d,k);d.show();a.effects.createWrapper(d).css({overflow:"hidden"});var m=c=="up"||c=="down"?"top":"left";c=c=="up"||c=="left"?"pos":"neg";var l=b.options.distance||(m=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(n=="show"){d.css(m,c=="pos"?-l:l)}var j={};j[m]=(n=="show"?c=="pos"?"+=":"-=":c=="pos"?"-=":"+=")+l;d.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){n=="hide"&&d.hide();a.effects.restore(d,k);a.effects.removeWrapper(d);b.callback&&b.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var e=a(this),i=a(b.options.to),h=i.offset();i={top:h.top,left:h.left,height:i.innerHeight(),width:i.innerWidth()};h=e.offset();var g=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:h.top,left:h.left,height:e.innerHeight(),width:e.innerWidth(),position:"absolute"}).animate(i,b.duration,b.options.easing,function(){g.remove();b.callback&&b.callback.apply(e[0],arguments);e.dequeue()})})}})(jQuery);(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var e=this,c=e.options;e.running=0;e.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");e.headers=e.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});e.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var h=e.element.find("a").filter(c.navigationFilter).eq(0);if(h.length){var g=h.closest(".ui-accordion-header");e.active=g.length?g:h.closest(".ui-accordion-content").prev()}}e.active=e._findActive(e.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");e.active.next().addClass("ui-accordion-content-active");e._createIcons();e.resize();e.element.attr("role","tablist");e.headers.attr("role","tab").bind("keydown.accordion",function(b){return e._keydown(b)}).next().attr("role","tabpanel");e.headers.not(e.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();e.active.length?e.active.attr({"aria-expanded":"true",tabIndex:0}):e.headers.eq(0).attr("tabIndex",0);a.browser.safari||e.headers.find("a").attr("tabIndex",-1);c.event&&e.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(b){e._clickHandler.call(e,b,this);b.preventDefault()})},_createIcons:function(){var b=this.options;if(b.icons){a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight){c.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();c&&this._createIcons()}if(d=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(e){if(!(this.options.disabled||e.altKey||e.ctrlKey)){var c=a.ui.keyCode,j=this.headers.length,i=this.headers.index(e.target),h=false;switch(e.keyCode){case c.RIGHT:case c.DOWN:h=this.headers[(i+1)%j];break;case c.LEFT:case c.UP:h=this.headers[(i-1+j)%j];break;case c.SPACE:case c.ENTER:this._clickHandler({target:e.target},e.target);e.preventDefault()}if(h){a(e.target).attr("tabIndex",-1);a(h).attr("tabIndex",0);h.focus();return false}return true}},resize:function(){var e=this.options,c;if(e.fillSpace){if(a.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(e.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}}return this},activate:function(b){this.options.active=b;b=this._findActive(b)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b==="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(e,c){var l=this.options;if(!l.disabled){if(e.target){e=a(e.currentTarget||c);c=e[0]===this.active[0];l.active=l.collapsible&&c?false:this.headers.index(e);if(!(this.running||!l.collapsible&&c)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);if(!c){e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(l.icons.header).addClass(l.icons.headerSelected);e.next().addClass("ui-accordion-content-active")}i=e.next();k=this.active.next();j={options:l,newHeader:c&&l.collapsible?a([]):e,oldHeader:this.active,newContent:c&&l.collapsible?a([]):i,oldContent:k};l=this.headers.index(this.active[0])>this.headers.index(e[0]);this.active=c?a([]):e;this._toggle(i,k,j,c,l)}}else{if(l.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(l.icons.headerSelected).addClass(l.icons.header);this.active.next().addClass("ui-accordion-content-active");var k=this.active.next(),j={options:l,newHeader:a([]),oldHeader:l.active,newContent:a([]),oldContent:k},i=this.active=a([]);this._toggle(i,k,j)}}}},_toggle:function(u,s,r,p,o){var n=this,q=n.options;n.toShow=u;n.toHide=s;n.data=r;var l=function(){if(n){return n._completed.apply(n,arguments)}};n._trigger("changestart",null,n.data);n.running=s.size()===0?u.size():s.size();if(q.animated){r={};r=q.collapsible&&p?{toShow:a([]),toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace}:{toShow:u,toHide:s,complete:l,down:o,autoHeight:q.autoHeight||q.fillSpace};if(!q.proxied){q.proxied=q.animated}if(!q.proxiedDuration){q.proxiedDuration=q.duration}q.animated=a.isFunction(q.proxied)?q.proxied(r):q.proxied;q.duration=a.isFunction(q.proxiedDuration)?q.proxiedDuration(r):q.proxiedDuration;p=a.ui.accordion.animations;var m=q.duration,c=q.animated;if(c&&!p[c]&&!a.easing[c]){c="slide"}p[c]||(p[c]=function(b){this.slide(b,{easing:c,duration:m||700})});p[c](r)}else{if(q.collapsible&&p){u.toggle()}else{s.hide();u.show()}l(true)}s.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();u.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(b){this.running=b?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.4",animations:{slide:function(i,c){i=a.extend({easing:"swing",duration:300},i,c);if(i.toHide.size()){if(i.toShow.size()){var n=i.toShow.css("overflow"),l=0,k={},j={},m;c=i.toShow;m=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(b,d){j[d]="hide";b=(""+a.css(i.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);k[d]={value:b[1],unit:b[2]||"px"}});i.toShow.css({height:0,overflow:"hidden"}).show();i.toHide.filter(":hidden").each(i.complete).end().filter(":visible").animate(j,{step:function(b,d){if(d.prop=="height"){l=d.end-d.start===0?0:(d.now-d.start)/(d.end-d.start)}i.toShow[0].style[d.prop]=l*k[d.prop].value+k[d.prop].unit},duration:i.duration,easing:i.easing,complete:function(){i.autoHeight||i.toShow.css("height","");i.toShow.css({width:m,overflow:n});i.complete()}})}else{i.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},i)}}else{i.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},i)}},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})}}})})(jQuery);(function(a){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},_create:function(){var d=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!d.options.disabled){var b=a.ui.keyCode;switch(e.keyCode){case b.PAGE_UP:d._move("previousPage",e);break;case b.PAGE_DOWN:d._move("nextPage",e);break;case b.UP:d._move("previous",e);e.preventDefault();break;case b.DOWN:d._move("next",e);e.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:d.menu.element.is(":visible")&&e.preventDefault();case b.TAB:if(!d.menu.active){return}d.menu.select(e);break;case b.ESCAPE:d.element.val(d.term);d.close(e);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,e)}},d.options.delay);break}}}).bind("focus.autocomplete",function(){if(!d.options.disabled){d.selectedItem=null;d.previous=d.element.val()}}).bind("blur.autocomplete",function(b){if(!d.options.disabled){clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(b);d._change(b)},150)}});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(e){var b=d.menu.element[0];e.target===b&&setTimeout(function(){a(document).one("mousedown",function(g){g.target!==d.element[0]&&g.target!==b&&!a.ui.contains(b,g.target)&&d.close()})},1);setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(e,b){b=b.item.data("item.autocomplete");false!==d._trigger("focus",null,{item:b})&&/^key/.test(e.originalEvent.type)&&d.element.val(b.value)},selected:function(g,e){e=e.item.data("item.autocomplete");var b=d.previous;if(d.element[0]!==c.activeElement){d.element.focus();d.previous=b}false!==d._trigger("select",g,{item:e})&&d.element.val(e.value);d.close(g);d.selectedItem=e},blur:function(){d.menu.element.is(":visible")&&d.element.val()!==d.term&&d.element.val(d.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d==="source"&&this._initSource();if(d==="appendTo"){this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0])}},_initSource:function(){var d,c;if(a.isArray(this.options.source)){d=this.options.source;this.source=function(e,b){b(a.ui.autocomplete.filter(d,e.term))}}else{if(typeof this.options.source==="string"){c=this.options.source;this.source=function(e,b){a.getJSON(c,e,b)}}else{this.source=this.options.source}}},search:function(d,c){d=d!=null?d:this.element.val();if(d.length<this.options.minLength){return this.close(c)}clearTimeout(this.closing);if(this._trigger("search")!==false){return this._search(d)}},_search:function(b){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:b},this.response)},_response:function(b){if(b.length){b=this._normalize(b);this._suggest(b);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")},close:function(b){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",b);this.menu.element.hide();this.menu.deactivate()}},_change:function(b){this.previous!==this.element.val()&&this._trigger("change",b,{item:this.selectedItem})},_normalize:function(b){if(b.length&&b[0].label&&b[0].value){return b}return a.map(b,function(c){if(typeof c==="string"){return{label:c,value:c}}return a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(e){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1),f;this._renderMenu(d,e);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(a.extend({of:this.element},this.options.position));e=d.width("").outerWidth();f=this.element.outerWidth();d.outerWidth(Math.max(e,f))},_renderMenu:function(e,d){var f=this;a.each(d,function(c,b){f._renderItem(e,b)})},_renderItem:function(d,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(d)},_move:function(d,c){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[d](c)}}else{this.search(null,c)}},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,d){var f=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(e,function(b){return f.test(b.label||b.value||b)})}})})(jQuery);(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();b.select(c)}});this.refresh()},refresh:function(){var b=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(g,e){this.deactivate();if(this.hasScroll()){var j=e.offset().top-this.element.offset().top,i=this.element.attr("scrollTop"),h=this.element.height();if(j<0){this.element.attr("scrollTop",i+j)}else{j>h&&this.element.attr("scrollTop",i+j-h+e.height())}}this.active=e.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",g,{item:e})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,d,f){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(f,e):this.activate(f,this.element.children(d))}else{this.activate(f,this.element.children(d))}},nextPage:function(f){if(this.hasScroll()){if(!this.active||this.last()){this.activate(f,this.element.children(":first"))}else{var e=this.active.offset().top,h=this.element.height(),g=this.element.children("li").filter(function(){var b=a(this).offset().top-e-h+a(this).height();return b<10&&b>-10});g.length||(g=this.element.children(":last"));this.activate(f,g)}}else{this.activate(f,this.element.children(!this.active||this.last()?":first":":last"))}},previousPage:function(e){if(this.hasScroll()){if(!this.active||this.first()){this.activate(e,this.element.children(":last"))}else{var d=this.active.offset().top,f=this.element.height();result=this.element.children("li").filter(function(){var b=a(this).offset().top-d+f-a(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(e,result)}}else{this.activate(e,this.element.children(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})})(jQuery);(function(b){var e,c=function(a){b(":ui-button",a.target.form).each(function(){var f=b(this).data("button");setTimeout(function(){f.refresh()},1)})},d=function(a){var h=a.name,g=a.form,f=b([]);if(h){f=g?b(g).find("[name='"+h+"']"):b("[name='"+h+"']",a.ownerDocument).filter(function(){return !this.form})}return f};b.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",c);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,h=this.options,g=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!g?" ui-state-active":"");if(h.label===null){h.label=this.buttonElement.html()}if(this.element.is(":disabled")){h.disabled=true}this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!h.disabled){b(this).addClass("ui-state-hover");this===e&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){h.disabled||b(this).removeClass(f)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});g&&this.element.bind("change.button",function(){a.refresh()});if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);var i=a.element[0];d(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled){return false}b(this).addClass("ui-state-active");e=this;b(document).one("mouseup",function(){e=null})}).bind("mouseup.button",function(){if(h.disabled){return false}b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(h.disabled){return false}if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER){b(this).addClass("ui-state-active")}}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}}this._setOption("disabled",h.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var a=this.element.is(":checked");a&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(a,f){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled"){f?this.element.attr("disabled",true):this.element.removeAttr("disabled")}this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio"){d(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)})}else{if(this.type==="checkbox"){this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label)}else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),h=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),g=this.options.icons,f=g.primary&&g.secondary;if(g.primary||g.secondary){a.addClass("ui-button-text-icon"+(f?"s":g.primary?"-primary":"-secondary"));g.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>");g.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>");if(!this.options.text){a.addClass(f?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||a.attr("title",h)}}else{a.addClass("ui-button-text-only")}}}});b.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(a,f){a==="disabled"&&this.buttons.button("option",a,f);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);(function(d,G){function L(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function E(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==G){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b)}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().removeClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().addClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass,b.dpDiv).add(d("td."+d.datepicker._currentClass,b.dpDiv));c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-i[0],top:-i[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),k=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose")){a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,k=c=-1,l=-1,u=-1,j=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p){throw"Missing number at position "+s}s+=p[0].length;return parseInt(p[0],10)},n=function(p,w,H){p=o(p)?H:w;for(w=0;w<p.length;w++){if(b.substr(s,p[w].length)==p[w]){s+=p[w].length;return w+1}}throw"Unknown name at position "+s},r=function(){if(b.charAt(s)!=a.charAt(z)){throw"Unexpected literal at position "+s}s++},s=0,z=0;z<a.length;z++){if(j){if(a.charAt(z)=="'"&&!o("'")){j=false}else{r()}}else{switch(a.charAt(z)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":k=m("m");break;case"M":k=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();k=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){r()}else{j=true}break;default:r()}}}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){k=1;l=u;do{e=this._getDaysInMonth(c,k-1);if(l<=e){break}k++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,k-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=k||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=j+1<a.length&&a.charAt(j+1)==o)&&j++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},k=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b){for(var j=0;j<a.length;j++){if(u){if(a.charAt(j)=="'"&&!i("'")){u=false}else{l+=a.charAt(j)}}else{switch(a.charAt(j)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000,3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(j)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,k=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=u.exec(h);j;){switch(j[2]||"d"){case"d":case"D":g+=parseInt(j[1],10);break;case"w":case"W":g+=parseInt(j[1],10)*7;break;case"m":case"M":l+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break;case"y":case"Y":k+=parseInt(j[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(k,l));break}j=u.exec(h)}return new Date(k,l,g)};if(b=(b=b==null?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):b)&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),j=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=j&&n<j?j:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-k,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+k,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";k=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;k=!h?k:this.formatDate(k,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;k=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),w=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var N="",D=0;D<i[1];D++){var J=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1){switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,j,o,C>0||D>0,z,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,A)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,K=B&&!H||!F[0]||j&&q<j||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==J.getTime()&&g==a.selectedMonth&&a._keyEvent||M.getTime()==q.getTime()&&M.getTime()==J.getTime()?" "+this._dayOverClass:"")+(K?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!w?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!B||w)&&F[2]?' title="'+F[2]+'"':"")+(K?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!w?" ":K?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==J.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=x}I+=N}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='<div class="ui-datepicker-title">',o="";if(h||!k){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l){j+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){j+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}j+="</select>"}j+=this._get(a,"yearSuffix");if(u){j+=(h||!(k&&l)?" ":"")+o}j+="</div>";return j},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);(function(b,a){b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(d){var c=b(this).css(d).offset().top;c<0&&b(this).css("top",d.top-c)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}var i=this,c=i.options,n=c.title||i.originalTitle||" ",l=b.ui.dialog.getTitleId(i.element),k=(i.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c.dialogClass).css({zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(d){if(c.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){i.close(d);d.preventDefault()}}).attr({role:"dialog","aria-labelledby":l}).mousedown(function(d){i.moveToTop(false,d)});i.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var m=(i.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),j=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(d){i.close(d);return false}).appendTo(m);(i.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j);b("<span></span>").addClass("ui-dialog-title").attr("id",l).html(n).prependTo(m);if(b.isFunction(c.beforeclose)&&!b.isFunction(c.beforeClose)){c.beforeClose=c.beforeclose}m.find("*").add(m).disableSelection();c.draggable&&b.fn.draggable&&i._makeDraggable();c.resizable&&b.fn.resizable&&i._makeResizable();i._createButtons(c.buttons);i._isOpen=false;b.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var c=this;c.overlay&&c.overlay.destroy();c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");c.uiDialog.remove();c.originalTitle&&c.element.attr("title",c.originalTitle);return c},widget:function(){return this.uiDialog},close:function(e){var c=this,f;if(false!==c._trigger("beforeClose",e)){c.overlay&&c.overlay.destroy();c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",e)})}else{c.uiDialog.hide();c._trigger("close",e)}b.ui.dialog.overlay.resize();if(c.options.modal){f=0;b(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){f=Math.max(f,b(this).css("z-index"))}});b.ui.dialog.maxZ=f}return c}},isOpen:function(){return this._isOpen},moveToTop:function(e,c){var h=this,g=h.options;if(g.modal&&!e||!g.stack&&!g.modal){return h._trigger("focus",c)}if(g.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=g.zIndex}if(h.overlay){b.ui.dialog.maxZ+=1;h.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:h.element.attr("scrollTop"),scrollLeft:h.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;h.uiDialog.css("z-index",b.ui.dialog.maxZ);h.element.attr(e);h._trigger("focus",c);return h},open:function(){if(!this._isOpen){var e=this,c=e.options,f=e.uiDialog;e.overlay=c.modal?new b.ui.dialog.overlay(e):null;f.next().length&&f.appendTo("body");e._size();e._position(c.position);f.show(c.show);e.moveToTop(true);c.modal&&f.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var d=b(":tabbable",this),i=d.filter(":first");d=d.filter(":last");if(h.target===d[0]&&!h.shiftKey){i.focus(1);return false}else{if(h.target===i[0]&&h.shiftKey){d.focus(1);return false}}}});b(e.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();e._trigger("open");e._isOpen=true;return e}},_createButtons:function(e){var c=this,j=false,i=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),h=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(i);c.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return !(j=true)});if(j){b.each(e,function(f,d){f=b('<button type="button"></button>').text(f).click(function(){d.apply(c.element[0],arguments)}).appendTo(h);b.fn.button&&f.button()});i.appendTo(c.uiDialog)}},_makeDraggable:function(){function e(d){return{position:d.position,offset:d.offset}}var c=this,j=c.options,i=b(document),h;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,d){h=j.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",f,e(d))},drag:function(f,d){c._trigger("drag",f,e(d))},stop:function(f,d){j.position=[d.position.left-i.scrollLeft(),d.position.top-i.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(h);c._trigger("dragStop",f,e(d));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function c(d){return{originalPosition:d.originalPosition,originalSize:d.originalSize,position:d.position,size:d.size}}e=e===a?this.options.resizable:e;var j=this,i=j.options,h=j.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";j.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:j.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:j._minHeight(),handles:e,start:function(f,d){b(this).addClass("ui-dialog-resizing");j._trigger("resizeStart",f,c(d))},resize:function(f,d){j._trigger("resize",f,c(d))},stop:function(f,d){b(this).removeClass("ui-dialog-resizing");i.height=b(this).height();i.width=b(this).width();j._trigger("resizeStop",f,c(d));b.ui.dialog.overlay.resize()}}).css("position",h).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(e){var c=[],h=[0,0],g;if(e){if(typeof e==="string"||typeof e==="object"&&"0" in e){c=e.split?e.split(" "):[e[0],e[1]];if(c.length===1){c[1]=c[0]}b.each(["left","top"],function(d,f){if(+c[d]===c[d]){h[d]=c[d];c[d]=f}});e={my:c.join(" "),at:c.join(" "),offset:h.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else{e=b.ui.dialog.prototype.options.position}(g=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(e);g||this.uiDialog.hide()},_setOption:function(h,c){var l=this,j=l.uiDialog,i=j.is(":data(resizable)"),k=false;switch(h){case"beforeclose":h="beforeClose";break;case"buttons":l._createButtons(c);k=true;break;case"closeText":l.uiDialogTitlebarCloseText.text(""+c);break;case"dialogClass":j.removeClass(l.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c);break;case"disabled":c?j.addClass("ui-dialog-disabled"):j.removeClass("ui-dialog-disabled");break;case"draggable":c?l._makeDraggable():j.draggable("destroy");break;case"height":k=true;break;case"maxHeight":i&&j.resizable("option","maxHeight",c);k=true;break;case"maxWidth":i&&j.resizable("option","maxWidth",c);k=true;break;case"minHeight":i&&j.resizable("option","minHeight",c);k=true;break;case"minWidth":i&&j.resizable("option","minWidth",c);k=true;break;case"position":l._position(c);break;case"resizable":i&&!c&&j.resizable("destroy");i&&typeof c==="string"&&j.resizable("option","handles",c);!i&&c!==false&&l._makeResizable(c);break;case"title":b(".ui-dialog-title",l.uiDialogTitlebar).html(""+(c||" "));break;case"width":k=true;break}b.Widget.prototype._setOption.apply(l,arguments);k&&l._size()},_size:function(){var d=this.options,c;this.element.css({width:"auto",minHeight:0,height:0});if(d.minWidth>d.width){d.width=d.minWidth}c=this.uiDialog.css({height:"auto",width:d.width}).height();this.element.css(d.height==="auto"?{minHeight:Math.max(d.minHeight-c,0),height:"auto"}:{minHeight:0,height:Math.max(d.height-c,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c){this.uuid+=1;c=this.uuid}return"ui-dialog-title-"+c},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(e){return b(e.target).zIndex()>=b.ui.dialog.overlay.maxZ})},1);b(document).bind("keydown.dialog-overlay",function(e){if(d.options.closeOnEscape&&e.keyCode&&e.keyCode===b.ui.keyCode.ESCAPE){d.close(e);e.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});b.fn.bgiframe&&c.bgiframe();this.instances.push(c);return c},destroy:function(d){this.oldInstances.push(this.instances.splice(b.inArray(d,this.instances),1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");d.remove();var c=0;b.each(this.instances,function(){c=Math.max(c,this.css("z-index"))});this.maxZ=c},height:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return d<c?b(window).height()+"px":d+"px"}else{return b(document).height()+"px"}},width:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return d<c?b(window).width()+"px":d+"px"}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(f){f.ui=f.ui||{};var a=/left|center|right/,e=/top|center|bottom/,d=f.fn.position,b=f.fn.offset;f.fn.position=function(j){if(!j||!j.of){return d.apply(this,arguments)}j=f.extend({},j);var c=f(j.of),o=(j.collision||"flip").split(" "),n=j.offset?j.offset.split(" "):[0,0],m,l,k;if(j.of.nodeType===9){m=c.width();l=c.height();k={top:0,left:0}}else{if(j.of.scrollTo&&j.of.document){m=c.width();l=c.height();k={top:c.scrollTop(),left:c.scrollLeft()}}else{if(j.of.preventDefault){j.at="left top";m=l=0;k={top:j.of.pageY,left:j.of.pageX}}else{m=c.outerWidth();l=c.outerHeight();k=c.offset()}}}f.each(["my","at"],function(){var g=(j[this]||"").split(" ");if(g.length===1){g=a.test(g[0])?g.concat(["center"]):e.test(g[0])?["center"].concat(g):["center","center"]}g[0]=a.test(g[0])?g[0]:"center";g[1]=e.test(g[1])?g[1]:"center";j[this]=g});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(j.at[0]==="right"){k.left+=m}else{if(j.at[0]==="center"){k.left+=m/2}}if(j.at[1]==="bottom"){k.top+=l}else{if(j.at[1]==="center"){k.top+=l/2}}k.left+=n[0];k.top+=n[1];return this.each(function(){var p=f(this),h=p.outerWidth(),g=p.outerHeight(),i=f.extend({},k);if(j.my[0]==="right"){i.left-=h}else{if(j.my[0]==="center"){i.left-=h/2}}if(j.my[1]==="bottom"){i.top-=g}else{if(j.my[1]==="center"){i.top-=g/2}}i.left=parseInt(i.left);i.top=parseInt(i.top);f.each(["left","top"],function(s,q){f.ui.position[o[s]]&&f.ui.position[o[s]][q](i,{targetWidth:m,targetHeight:l,elemWidth:h,elemHeight:g,offset:n,my:j.my,at:j.at})});f.fn.bgiframe&&p.bgiframe();p.offset(f.extend(i,{using:j.using}))})};f.ui.position={fit:{left:function(g,c){var h=f(window);c=g.left+c.elemWidth-h.width()-h.scrollLeft();g.left=c>0?g.left-c:Math.max(0,g.left)},top:function(g,c){var h=f(window);c=g.top+c.elemHeight-h.height()-h.scrollTop();g.top=c>0?g.top-c:Math.max(0,g.top)}},flip:{left:function(h,c){if(c.at[0]!=="center"){var k=f(window);k=h.left+c.elemWidth-k.width()-k.scrollLeft();var j=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,i=-2*c.offset[0];h.left+=h.left<0?j+c.targetWidth+i:k>0?j-c.targetWidth+i:0}},top:function(i,c){if(c.at[1]!=="center"){var m=f(window);m=i.top+c.elemHeight-m.height()-m.scrollTop();var l=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,k=c.at[1]==="top"?c.targetHeight:-c.targetHeight,j=-2*c.offset[1];i.top+=i.top<0?l+c.targetHeight+j:m>0?l+k+j:0}}}};if(!f.offset.setOffset){f.offset.setOffset=function(i,c){if(/static/.test(f.curCSS(i,"position"))){i.style.position="relative"}var m=f(i),l=m.offset(),k=parseInt(f.curCSS(i,"top",true),10)||0,j=parseInt(f.curCSS(i,"left",true),10)||0;l={top:c.top-l.top+k,left:c.left-l.left+j};"using" in c?c.using.call(i,l):m.css(l)};f.fn.offset=function(g){var c=this[0];if(!c||!c.ownerDocument){return null}if(g){return this.each(function(){f.offset.setOffset(this,g)})}return b.call(this)}}})(jQuery);(function(a,d){a.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===d){return this._value()}this._setOption("value",b);return this},_setOption:function(b,c){if(b==="value"){this.options.value=c;this._refreshValue();this._trigger("change")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var b=this.options.value;if(typeof b!=="number"){b=0}return Math.min(this.max,Math.max(this.min,b))},_refreshValue:function(){var b=this.value();this.valueDiv.toggleClass("ui-corner-right",b===this.max).width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.8.4"})})(jQuery);(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");c.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!==2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range==="min"||c.range==="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length===0&&a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");if(c.values&&c.values.length){for(;a(".ui-slider-handle",this.element).length<c.values.length;){a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled){a(this).blur()}else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(n){var m=true,l=a(this).data("index.ui-slider-handle"),j,k,b;if(!d.options.disabled){switch(n.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:m=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");j=d._start(n,l);if(j===false){return}}break}b=d.options.step;j=d.options.values&&d.options.values.length?(k=d.values(l)):(k=d.value());switch(n.keyCode){case a.ui.keyCode.HOME:k=d._valueMin();break;case a.ui.keyCode.END:k=d._valueMax();break;case a.ui.keyCode.PAGE_UP:k=d._trimAlignValue(j+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:k=d._trimAlignValue(j-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(j===d._valueMax()){return}k=d._trimAlignValue(j+b);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(j===d._valueMin()){return}k=d._trimAlignValue(j-b);break}d._slide(n,l,k);return m}}).keyup(function(f){var b=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(f,b);d._change(f,b);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(i){var d=this.options,n,m,l,j,k;if(d.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();n=this._normValueFromMouse({x:i.pageX,y:i.pageY});m=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(c){var b=Math.abs(n-j.values(c));if(m>b){m=b;l=a(this);k=c}});if(d.range===true&&this.values(1)===d.min){k+=1;l=a(this.handles[k])}if(this._start(i,k)===false){return false}this._mouseSliding=true;j._handleIndex=k;l.addClass("ui-state-active").focus();d=l.offset();this._clickOffset=!a(i.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:i.pageX-d.left-l.width()/2,top:i.pageY-d.top-l.height()/2-(parseInt(l.css("borderTopWidth"),10)||0)-(parseInt(l.css("borderBottomWidth"),10)||0)+(parseInt(l.css("marginTop"),10)||0)};this._slide(i,k,n);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1){c=1}if(c<0){c=0}if(this.orientation==="vertical"){c=1-c}d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}return this._trigger("start",e,f)},_slide:function(f,d,h){var g;if(this.options.values&&this.options.values.length){g=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&h>g||d===1&&h<g)){h=g}if(h!==this.values(d)){g=this.values();g[d]=h;f=this._trigger("slide",f,{handle:this.handles[d],value:h,values:g});this.values(d?0:1);f!==false&&this.values(d,h,true)}}else{if(h!==this.value()){f=this._trigger("slide",f,{handle:this.handles[d],value:h});f!==false&&this.value(h)}}},_stop:function(e,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("stop",e,f)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("change",e,f)}},value:function(b){if(arguments.length){this.options.value=this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(g,d){var j,i,h;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(d);this._refreshValue();this._change(null,g)}if(arguments.length){if(a.isArray(arguments[0])){j=this.options.values;i=arguments[0];for(h=0;h<j.length;h+=1){j[h]=this._trimAlignValue(i[h]);this._change(null,h)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(g):this.value()}}else{return this._values()}},_setOption:function(f,d){var h,g=0;if(a.isArray(this.options.values)){g=this.options.values.length}a.Widget.prototype._setOption.apply(this,arguments);switch(f){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(h=0;h<g;h+=1){this._change(null,h)}this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(e){var d,f;if(arguments.length){d=this.options.values[e];return d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(f=0;f<d.length;f+=1){d[f]=this._trimAlignValue(d[f])}return d}},_trimAlignValue:function(e){if(e<this._valueMin()){return this._valueMin()}if(e>this._valueMax()){return this._valueMax()}var d=this.options.step>0?this.options.step:1,f=e%d;e=e-f;if(Math.abs(f)*2>=d){e+=f>0?d:-d}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var u=this.options.range,s=this.options,r=this,q=!this._animateOff?s.animate:false,p,n={},o,m,k,d;if(this.options.values&&this.options.values.length){this.handles.each(function(b){p=(r.values(b)-r._valueMin())/(r._valueMax()-r._valueMin())*100;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";a(this).stop(1,1)[q?"animate":"css"](n,s.animate);if(r.options.range===true){if(r.orientation==="horizontal"){if(b===0){r.range.stop(1,1)[q?"animate":"css"]({left:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({width:p-o+"%"},{queue:false,duration:s.animate})}}else{if(b===0){r.range.stop(1,1)[q?"animate":"css"]({bottom:p+"%"},s.animate)}if(b===1){r.range[q?"animate":"css"]({height:p-o+"%"},{queue:false,duration:s.animate})}}}o=p})}else{m=this.value();k=this._valueMin();d=this._valueMax();p=d!==k?(m-k)/(d-k)*100:0;n[r.orientation==="horizontal"?"left":"bottom"]=p+"%";this.handle.stop(1,1)[q?"animate":"css"](n,s.animate);if(u==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[q?"animate":"css"]({width:p+"%"},s.animate)}if(u==="max"&&this.orientation==="horizontal"){this.range[q?"animate":"css"]({width:100-p+"%"},{queue:false,duration:s.animate})}if(u==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[q?"animate":"css"]({height:p+"%"},s.animate)}if(u==="max"&&this.orientation==="vertical"){this.range[q?"animate":"css"]({height:100-p+"%"},{queue:false,duration:s.animate})}}}});a.extend(a.ui.slider,{version:"1.8.4"})})(jQuery);(function(g,f){function e(){return ++c}function b(){return ++a}var c=0,a=0;g.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected"){this.options.collapsible&&h==this.options.selected||this.select(h)}else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return g.cookie.apply(null,[d].concat(g.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=g(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(z){function w(h,i){h.css("display","");!g.support.opacity&&i.opacity&&h[0].style.removeAttribute("filter")}var y=this,x=this.options,v=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=g("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return g("a",this)[0]});this.panels=g([]);this.anchors.each(function(k,n){var i=g(n).attr("href"),h=i.split("#")[0],m;if(h&&(h===location.toString().split("#")[0]||(m=g("base")[0])&&h===m.href)){i=n.hash;n.href=i}if(v.test(i)){y.panels=y.panels.add(y._sanitizeSelector(i))}else{if(i!=="#"){g.data(n,"href.tabs",i);g.data(n,"load.tabs",i.replace(/#.*$/,""));i=y._tabId(n);n.href="#"+i;n=g("#"+i);if(!n.length){n=g(x.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(y.panels[k-1]||y.list);n.data("destroy.tabs",true)}y.panels=y.panels.add(n)}else{x.disabled.push(k)}}});if(z){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(x.selected===f){location.hash&&this.anchors.each(function(h,i){if(i.hash==location.hash){x.selected=h;return false}});if(typeof x.selected!=="number"&&x.cookie){x.selected=parseInt(y._cookie(),10)}if(typeof x.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}x.selected=x.selected||(this.lis.length?0:-1)}else{if(x.selected===null){x.selected=-1}}x.selected=x.selected>=0&&this.anchors[x.selected]||x.selected<0?x.selected:0;x.disabled=g.unique(x.disabled.concat(g.map(this.lis.filter(".ui-state-disabled"),function(h){return y.lis.index(h)}))).sort();g.inArray(x.selected,x.disabled)!=-1&&x.disabled.splice(g.inArray(x.selected,x.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(x.selected>=0&&this.anchors.length){this.panels.eq(x.selected).removeClass("ui-tabs-hide");this.lis.eq(x.selected).addClass("ui-tabs-selected ui-state-active");y.element.queue("tabs",function(){y._trigger("show",null,y._ui(y.anchors[x.selected],y.panels[x.selected]))});this.load(x.selected)}g(window).bind("unload",function(){y.lis.add(y.anchors).unbind(".tabs");y.lis=y.anchors=y.panels=null})}else{x.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[x.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");x.cookie&&this._cookie(x.selected,x.cookie);z=0;for(var u;u=this.lis[z];z++){g(u)[g.inArray(z,x.disabled)!=-1&&!g(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}x.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(x.event!=="mouseover"){var q=function(h,i){i.is(":not(.ui-state-disabled)")&&i.addClass("ui-state-"+h)},l=function(h,i){i.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){q("hover",g(this))});this.lis.bind("mouseout.tabs",function(){l("hover",g(this))});this.anchors.bind("focus.tabs",function(){q("focus",g(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",g(this).closest("li"))})}var p,j;if(x.fx){if(g.isArray(x.fx)){p=x.fx[0];j=x.fx[1]}else{p=j=x.fx}}var d=j?function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){w(i,j);y._trigger("show",null,y._ui(h,i[0]))})}:function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");y._trigger("show",null,y._ui(h,i[0]))},A=p?function(h,i){i.animate(p,p.duration||"normal",function(){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");w(i,p);y.element.dequeue("tabs")})}:function(h,i){y.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");y.element.dequeue("tabs")};this.anchors.bind(x.event+".tabs",function(){var k=this,m=g(k).closest("li"),i=y.panels.filter(":not(.ui-tabs-hide)"),h=g(y._sanitizeSelector(k.hash));if(m.hasClass("ui-tabs-selected")&&!x.collapsible||m.hasClass("ui-state-disabled")||m.hasClass("ui-state-processing")||y._trigger("select",null,y._ui(this,h[0]))===false){this.blur();return false}x.selected=y.anchors.index(this);y.abort();if(x.collapsible){if(m.hasClass("ui-tabs-selected")){x.selected=-1;x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){A(k,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){x.cookie&&y._cookie(x.selected,x.cookie);y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this));this.blur();return false}}}x.cookie&&y._cookie(x.selected,x.cookie);if(h.length){i.length&&y.element.queue("tabs",function(){A(k,i)});y.element.queue("tabs",function(){d(k,h)});y.load(y.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}g.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=g.data(this,"href.tabs");if(i){this.href=i}var h=g(this).unbind(".tabs");g.each(["href","load","cache"],function(k,j){h.removeData(j+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){g.data(this,"destroy.tabs")?g(this).remove():g(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(j,m,d){if(d===f){d=this.anchors.length}var n=this,l=this.options;m=g(l.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,m));j=!j.indexOf("#")?j.replace("#",""):this._tabId(g("a",m)[0]);m.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=g("#"+j);k.length||(k=g(l.panelTemplate).attr("id",j).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(d>=this.lis.length){m.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{m.insertBefore(this.lis[d]);k.insertBefore(this.panels[d])}l.disabled=g.map(l.disabled,function(h){return h>=d?++h:h});this._tabify();if(this.anchors.length==1){l.selected=0;m.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){n._trigger("show",null,n._ui(n.anchors[0],n.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]));return this},remove:function(h){h=this._getIndex(h);var i=this.options,d=this.lis.eq(h).remove(),j=this.panels.eq(h).remove();if(d.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(h+(h+1<this.anchors.length?1:-1))}i.disabled=g.map(g.grep(i.disabled,function(k){return k!=h}),function(k){return k>=h?--k:k});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(g.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=g.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1){if(this.options.collapsible&&this.options.selected!=-1){d=this.options.selected}else{return this}}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(j){j=this._getIndex(j);var m=this,d=this.options,n=this.anchors.eq(j)[0],l=g.data(n,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&g.data(n,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(j).addClass("ui-state-processing");if(d.spinner){var k=g("span",n);k.data("label.tabs",k.html()).html(d.spinner)}this.xhr=g.ajax(g.extend({},d.ajaxOptions,{url:l,success:function(i,o){g(m._sanitizeSelector(n.hash)).html(i);m._cleanup();d.cache&&g.data(n,"cache.tabs",true);m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.success(i,o)}catch(h){}},error:function(i,o){m._cleanup();m._trigger("load",null,m._ui(m.anchors[j],m.panels[j]));try{d.ajaxOptions.error(i,o,j,n)}catch(h){}}}));m.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});g.extend(g.ui.tabs,{version:"1.8.4"});g.extend(g.ui.tabs.prototype,{rotation:null,rotate:function(i,k){var d=this,l=this.options,j=d._rotate||(d._rotate=function(h){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var m=l.selected;d.select(++m<d.anchors.length?m:0)},i);h&&h.stopPropagation()});k=d._unrotate||(d._unrotate=!k?function(h){h.clientX&&d.rotate(null)}:function(){t=l.selected;j()});if(i){this.element.bind("tabsshow",j);this.anchors.bind(l.event+".tabs",k);j()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(l.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);jQuery(function(f){var e=f("meta[name=csrf-token]").attr("content"),g=f("meta[name=csrf-param]").attr("content");f.fn.extend({triggerAndReturn:function(h,j){var i=new f.Event(h);this.trigger(i,j);return i.result!==false},callRemote:function(){var j=this,l=j.attr("method")||j.attr("data-method")||"GET",i=j.attr("action")||j.attr("href"),h=j.attr("data-type")||"script";if(i===undefined){throw"No URL specified for remote call (action or href must be present)."}else{if(j.triggerAndReturn("ajax:before")){var k=j.is("form")?j.serializeArray():[];f.ajax({url:i,data:k,dataType:h,type:l.toUpperCase(),beforeSend:function(m){j.trigger("ajax:loading",m)},success:function(n,m,o){j.trigger("ajax:success",[n,m,o])},complete:function(m){j.trigger("ajax:complete",m)},error:function(o,m,n){j.trigger("ajax:failure",[o,m,n])}})}j.trigger("ajax:after")}}});f("a[data-confirm],input[data-confirm]").live("click",function(){var h=f(this);if(h.triggerAndReturn("confirm")){if(!confirm(h.attr("data-confirm"))){return false}}});f("form[data-remote]").live("submit",function(h){f(this).callRemote();h.preventDefault()});f("a[data-remote],input[data-remote]").live("click",function(h){f(this).callRemote();h.preventDefault()});f("a[data-method]:not([data-remote])").live("click",function(l){var k=f(this),i=k.attr("href"),m=k.attr("data-method"),j=f('<form method="post" action="'+i+'"></form>'),h='<input name="_method" value="'+m+'" type="hidden" />';if(g!=null&&e!=null){h+='<input name="'+g+'" value="'+e+'" type="hidden" />'}j.hide().append(h).appendTo("body");l.preventDefault();j.submit()});var c="input[data-disable-with]";var d="form[data-remote]:has("+c+")";var b="form:not([data-remote]):has("+c+")";var a=function(){f(this).find(c).each(function(){var h=f(this);h.data("enable-with",h.val()).attr("value",h.attr("data-disable-with")).attr("disabled","disabled")})};f(d).live("ajax:before",a);f(b).live("submit",a);f(d).live("ajax:complete",function(){f(this).find(c).each(function(){var h=f(this);h.removeAttr("disabled").val(h.data("enable-with"))})})});(function(b){b.fn.__bind__=b.fn.bind;b.fn.__unbind__=b.fn.unbind;b.fn.__find__=b.fn.find;var a={version:"0.7.9",override:/keypress|keydown|keyup/g,triggersMap:{},specialKeys:{27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",109:"-",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",191:"/"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},newTrigger:function(e,d,f){var c={};c[e]={};c[e][d]={cb:f,disableInInput:false};return c}};a.specialKeys=b.extend(a.specialKeys,{96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"});b.fn.find=function(c){this.query=c;return b.fn.__find__.apply(this,arguments)};b.fn.unbind=function(h,e,g){if(b.isFunction(e)){g=e;e=null}if(e&&typeof e==="string"){var f=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var d=h.split(" ");for(var c=0;c<d.length;c++){delete a.triggersMap[f][d[c]][e]}}return this.__unbind__(h,g)};b.fn.bind=function(j,f,k){var h=j.match(a.override);if(b.isFunction(f)||!h){return this.__bind__(j,f,k)}else{var n=null,i=b.trim(j.replace(a.override,""));if(i){n=this.__bind__(i,f,k)}if(typeof f==="string"){f={combi:f}}if(f.combi){for(var m=0;m<h.length;m++){var d=h[m];var g=f.combi.toLowerCase(),e=a.newTrigger(d,g,k),l=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();e[d][g].disableInInput=f.disableInInput;if(!a.triggersMap[l]){a.triggersMap[l]=e}else{if(!a.triggersMap[l][d]){a.triggersMap[l][d]=e[d]}}var c=a.triggersMap[l][d][g];if(!c){a.triggersMap[l][d][g]=[e[d][g]]}else{if(c.constructor!==Array){a.triggersMap[l][d][g]=[c]}else{a.triggersMap[l][d][g][c.length]=e[d][g]}}this.each(function(){var o=b(this);if(o.attr("hkId")&&o.attr("hkId")!==l){l=o.attr("hkId")+";"+l}o.attr("hkId",l)});n=this.__bind__(h.join(" "),f,a.handler)}}return n}};a.findElement=function(c){if(!b(c).attr("hkId")){if(b.browser.opera||b.browser.safari){while(!b(c).attr("hkId")&&c.parentNode){c=c.parentNode}}}return c};a.handler=function(e){var o=a.findElement(e.currentTarget),i=b(o),d=i.attr("hkId");if(d){d=d.split(";");var g=e.which,q=e.type,p=a.specialKeys[g],n=!p&&String.fromCharCode(g).toLowerCase(),h=e.shiftKey,c=e.ctrlKey,m=e.altKey||e.originalEvent.altKey,f=null;for(var r=0;r<d.length;r++){if(a.triggersMap[d[r]][q]){f=a.triggersMap[d[r]][q];break}}if(f){var j;if(!h&&!c&&!m){if(f[p]){j=f[p];if(j&&p!=e.data.combi){return}}else{if(n&&f[n]){j=f[n];if(j&&n!=e.data.combi){return}}}}else{var l="";if(m){l+="alt+"}if(c){l+="ctrl+"}if(h){l+="shift+"}j=f[l+p];if(j&&(l+p)!=e.data.combi){return}if(!j){if(n){if(f[l+n]){j=f[l+n];if(j&&(l+n)!=e.data.combi){return}}else{if(f[l+a.shiftNums[n]]){j=f[l+a.shiftNums[n]];if(j&&(l+a.shiftNums[n])!=e.data.combi){return}}else{if(l==="shift+"&&f[a.shiftNums[n]]){j=f[a.shiftNums[n]];if(j&&a.shiftNums[n]!=e.data.combi){return}}}}}}}if(j){var s=false;for(var r=0;r<j.length;r++){if(j[r].disableInInput){var k=b(e.target);if(i.is("input")||i.is("textarea")||i.is("select")||k.is("input")||k.is("textarea")||k.is("select")){return true}}s=s||j[r].cb.apply(this,[e])}return s}}}};window.hotkeys=a;return b})(jQuery);var Mustache=function(){var a=function(){};a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(e,d,c,f){if(!f){this.context=d;this.buffer=[]}if(!this.includes("",e)){if(f){return e}else{this.send(e);return}}e=this.render_pragmas(e);var b=this.render_section(e,d,c);if(f){return this.render_tags(b,d,c,f)}this.render_tags(b,d,c,f)},send:function(b){if(b!=""){this.buffer.push(b)}},render_pragmas:function(b){if(!this.includes("%",b)){return b}var d=this;var c=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);return b.replace(c,function(g,e,f){if(!d.pragmas_implemented[e]){throw ({message:"This implementation of mustache doesn't understand the '"+e+"' pragma"})}d.pragmas[e]={};if(f){var h=f.split("=");d.pragmas[e][h[0]]=h[1]}return""})},render_partial:function(b,d,c){b=this.trim(b);if(!c||c[b]===undefined){throw ({message:"unknown_partial '"+b+"'"})}if(typeof(d[b])!="object"){return this.render(c[b],d,c,true)}return this.render(c[b],d[b],c,true)},render_section:function(d,c,b){if(!this.includes("#",d)&&!this.includes("^",d)){return d}var f=this;var e=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");return d.replace(e,function(h,i,g,j){var k=f.find(g,c);if(i=="^"){if(!k||f.is_array(k)&&k.length===0){return f.render(j,c,b,true)}else{return""}}else{if(i=="#"){if(f.is_array(k)){return f.map(k,function(l){return f.render(j,f.create_context(l),b,true)}).join("")}else{if(f.is_object(k)){return f.render(j,f.create_context(k),b,true)}else{if(typeof k==="function"){return k.call(c,j,function(l){return f.render(l,c,b,true)})}else{if(k){return f.render(j,c,b,true)}else{return""}}}}}}})},render_tags:function(k,b,d,f){var e=this;var j=function(){return new RegExp(e.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")};var g=j();var h=function(n,i,m){switch(i){case"!":return"";case"=":e.set_delimiters(m);g=j();return"";case">":return e.render_partial(m,b,d);case"{":return e.find(m,b);default:return e.escape(e.find(m,b))}};var l=k.split("\n");for(var c=0;c<l.length;c++){l[c]=l[c].replace(g,h,this);if(!f){this.send(l[c])}}if(f){return l.join("\n")}},set_delimiters:function(c){var b=c.split(" ");this.otag=this.escape_regex(b[0]);this.ctag=this.escape_regex(b[1])},escape_regex:function(c){if(!arguments.callee.sRE){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+b.join("|\\")+")","g")}return c.replace(arguments.callee.sRE,"\\$1")},find:function(c,d){c=this.trim(c);function b(f){return f===false||f===0||f}var e;if(b(d[c])){e=d[c]}else{if(b(this.context[c])){e=this.context[c]}}if(typeof e==="function"){return e.apply(d)}if(e!==undefined){return e}return""},includes:function(c,b){return b.indexOf(this.otag+c)!=-1},escape:function(b){b=String(b===null?"":b);return b.replace(/&(?!\w+;)|["<>\\]/g,function(c){switch(c){case"&":return"&";case"\\":return"\\\\";case'"':return'"';case"<":return"<";case">":return">";default:return c}})},create_context:function(c){if(this.is_object(c)){return c}else{var d=".";if(this.pragmas["IMPLICIT-ITERATOR"]){d=this.pragmas["IMPLICIT-ITERATOR"].iterator}var b={};b[d]=c;return b}},is_object:function(b){return b&&typeof b=="object"},is_array:function(b){return Object.prototype.toString.call(b)==="[object Array]"},trim:function(b){return b.replace(/^\s*|\s*$/g,"")},map:function(f,d){if(typeof f.map=="function"){return f.map(d)}else{var e=[];var b=f.length;for(var c=0;c<b;c++){e.push(d(f[c]))}return e}}};return({name:"mustache.js",version:"0.3.1-dev",to_html:function(d,b,c,f){var e=new a();if(f){e.send=f}e.render(d,b,c);if(!f){return e.buffer.join("\n")}}})}();eval(function(h,b,i,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(i--){f[g(i)]=d[i]||g(i)}d=[function(a){return f[a]}];g=function(){return"\\w+"};i=1}while(i--){if(d[i]){h=h.replace(new RegExp("\\b"+g(i)+"\\b","g"),d[i])}}return h}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),0,{}));(function(aG){var ay,aq,ap,aD,aj,aC,ai,ax,am,al,au=0,aE={},aw=[],av=0,aF={},az=[],af=null,ao=new Image,ae=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,ad,ac=1,an=0,ar="",at,aA,aB=false,ak=aG.extend(aG("<div/>")[0],{prop:0}),ab=aG.browser.msie&&aG.browser.version<7&&!window.XMLHttpRequest,aa=function(){aq.hide();ao.onerror=ao.onload=null;af&&af.abort();ay.empty()},U=function(){if(false===aE.onError(aw,au,aE)){aq.hide();aB=false}else{aE.titleShow=false;aE.width="auto";aE.height="auto";ay.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');ah()}},ag=function(){var a=aw[au],j,f,e,i,h,c;aa();aE=aG.extend({},aG.fn.fancybox.defaults,typeof aG(a).data("fancybox")=="undefined"?aE:aG(a).data("fancybox"));c=aE.onStart(aw,au,aE);if(c===false){aB=false}else{if(typeof c=="object"){aE=aG.extend(aE,c)}e=aE.title||(a.nodeName?aG(a).attr("title"):a.title)||"";if(a.nodeName&&!aE.orig){aE.orig=aG(a).children("img:first").length?aG(a).children("img:first"):aG(a)}if(e===""&&aE.orig&&aE.titleFromAlt){e=aE.orig.attr("alt")}j=aE.href||(a.nodeName?aG(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(j)||j=="#"){j=null}if(aE.type){f=aE.type;if(!j){j=aE.content}}else{if(aE.content){f="html"}else{if(j){f=j.match(ae)?"image":j.match(k)?"swf":aG(a).hasClass("iframe")?"iframe":j.indexOf("#")===0?"inline":"ajax"}}}if(f){if(f=="inline"){a=j.substr(j.indexOf("#"));f=aG(a).length>0?"inline":"ajax"}aE.type=f;aE.href=j;aE.title=e;if(aE.autoDimensions&&aE.type!=="iframe"&&aE.type!=="swf"){aE.width="auto";aE.height="auto"}if(aE.modal){aE.overlayShow=true;aE.hideOnOverlayClick=false;aE.hideOnContentClick=false;aE.enableEscapeButton=false;aE.showCloseButton=false}aE.padding=parseInt(aE.padding,10);aE.margin=parseInt(aE.margin,10);ay.css("padding",aE.padding+aE.margin);aG(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){aG(this).replaceWith(aC.children())});switch(f){case"html":ay.html(aE.content);ah();break;case"inline":if(aG(a).parent().is("#fancybox-content")===true){aB=false;break}aG('<div class="fancybox-inline-tmp" />').hide().insertBefore(aG(a)).bind("fancybox-cleanup",function(){aG(this).replaceWith(aC.children())}).bind("fancybox-cancel",function(){aG(this).replaceWith(ay.children())});aG(a).appendTo(ay);ah();break;case"image":aB=false;aG.fancybox.showActivity();ao=new Image;ao.onerror=function(){U()};ao.onload=function(){aB=true;ao.onerror=ao.onload=null;aE.width=ao.width;aE.height=ao.height;aG("<img />").attr({id:"fancybox-img",src:ao.src,alt:aE.title}).appendTo(ay);P()};ao.src=j;break;case"swf":i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+aE.width+'" height="'+aE.height+'"><param name="movie" value="'+j+'"></param>';h="";aG.each(aE.swf,function(l,m){i+='<param name="'+l+'" value="'+m+'"></param>';h+=" "+l+'="'+m+'"'});i+='<embed src="'+j+'" type="application/x-shockwave-flash" width="'+aE.width+'" height="'+aE.height+'"'+h+"></embed></object>";ay.html(i);ah();break;case"ajax":aB=false;aG.fancybox.showActivity();aE.ajax.win=aE.ajax.success;af=aG.ajax(aG.extend({},aE.ajax,{url:j,data:aE.ajax.data||{},error:function(l){l.status>0&&U()},success:function(l,n,m){if(m.status==200){if(typeof aE.ajax.win=="function"){c=aE.ajax.win(j,l,n,m);if(c===false){aq.hide();return}else{if(typeof c=="string"||typeof c=="object"){l=c}}}ay.html(l);ah()}}}));break;case"iframe":P()}}else{U()}}},ah=function(){ay.width(aE.width);ay.height(aE.height);if(aE.width=="auto"){aE.width=ay.width()}if(aE.height=="auto"){aE.height=ay.height()}P()},P=function(){var a,c;aq.hide();if(aD.is(":visible")&&false===aF.onCleanup(az,av,aF)){aG.event.trigger("fancybox-cancel");aB=false}else{aB=true;aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aD.is(":visible")&&aF.titlePosition!=="outside"&&aD.css("height",aD.height());az=aw;av=au;aF=aE;if(aF.overlayShow){ap.css({"background-color":aF.overlayColor,opacity:aF.overlayOpacity,cursor:aF.hideOnOverlayClick?"pointer":"auto",height:aG(document).height()});if(!ap.is(":visible")){ab&&aG("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});ap.show()}}else{ap.hide()}aC.get(0).scrollTop=0;aC.get(0).scrollLeft=0;aA=g();ar=aF.title||"";an=0;ax.empty().removeAttr("style").removeClass();if(aF.titleShow!==false){if(aG.isFunction(aF.titleFormat)){a=aF.titleFormat(ar,az,av,aF)}else{a=ar&&ar.length?aF.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+ar+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+aF.titlePosition+'">'+ar+"</div>":false}ar=a;if(!(!ar||ar==="")){ax.addClass("fancybox-title-"+aF.titlePosition).html(ar).appendTo("body").show();switch(aF.titlePosition){case"inside":ax.css({width:aA.width-aF.padding*2,marginLeft:aF.padding,marginRight:aF.padding});an=ax.outerHeight(true);ax.appendTo(aj);aA.height+=an;break;case"over":ax.css({marginLeft:aF.padding,width:aA.width-aF.padding*2,bottom:aF.padding}).appendTo(aj);break;case"float":ax.css("left",parseInt((ax.width()-aA.width-40)/2,10)*-1).appendTo(aD);break;default:ax.css({width:aA.width-aF.padding*2,paddingLeft:aF.padding,paddingRight:aF.padding}).appendTo(aD)}}}ax.hide();if(aD.is(":visible")){aG(ai.add(am).add(al)).hide();a=aD.position();at={top:a.top,left:a.left,width:aD.width(),height:aD.height()};c=at.width==aA.width&&at.height==aA.height;aC.fadeTo(aF.changeFade,0.3,function(){var e=function(){aC.html(ay.contents()).fadeTo(aF.changeFade,1,G)};aG.event.trigger("fancybox-change");aC.empty().removeAttr("filter").css({"border-width":aF.padding,width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"});if(c){e()}else{ak.prop=0;aG(ak).animate({prop:1},{duration:aF.changeSpeed,easing:aF.easingChange,step:C,complete:e})}})}else{aD.removeAttr("style");aC.css("border-width",aF.padding);if(aF.transitionIn=="elastic"){at=w();aC.html(ay.contents());aD.show();if(aF.opacity){aA.opacity=0}ak.prop=0;aG(ak).animate({prop:1},{duration:aF.speedIn,easing:aF.easingIn,step:C,complete:G})}else{aF.titlePosition=="inside"&&an>0&&ax.show();aC.css({width:aA.width-aF.padding*2,height:aF.type=="image"||aF.type=="swf"||aF.type=="iframe"?aA.height-an-aF.padding*2:"auto"}).html(ay.contents());aD.css(aA).fadeIn(aF.transitionIn=="none"?0:aF.fadeIn,G)}}}},d=function(){if(aF.enableEscapeButton||aF.enableKeyboardNav){aG(document).bind("keydown.fb",function(a){if(a.keyCode==27&&aF.enableEscapeButton){a.preventDefault();aG.fancybox.close()}else{if((a.keyCode==37||a.keyCode==39)&&aF.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();aG.fancybox[a.keyCode==37?"prev":"next"]()}}})}if(aF.showNavArrows){if(aF.cyclic&&az.length>1||av!==0){am.show()}if(aF.cyclic&&az.length>1||av!=az.length-1){al.show()}}else{am.hide();al.hide()}},G=function(){if(!aG.support.opacity){aC.get(0).style.removeAttribute("filter");aD.get(0).style.removeAttribute("filter")}aD.css("height","auto");aF.type!=="image"&&aF.type!=="swf"&&aF.type!=="iframe"&&aC.css("height","auto");ar&&ar.length&&ax.show();aF.showCloseButton&&ai.show();d();aF.hideOnContentClick&&aC.bind("click",aG.fancybox.close);aF.hideOnOverlayClick&&ap.bind("click",aG.fancybox.close);aG(window).bind("resize.fb",aG.fancybox.resize);aF.centerOnScroll&&aG(window).bind("scroll.fb",aG.fancybox.center);if(aF.type=="iframe"){aG('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(aG.browser.msie?'allowtransparency="true""':"")+' scrolling="'+aE.scrolling+'" src="'+aF.href+'"></iframe>').appendTo(aC)}aD.show();aB=false;aG.fancybox.center();aF.onComplete(az,av,aF);var a,c;if(az.length-1>av){a=az[av+1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}if(av>0){a=az[av-1].href;if(typeof a!=="undefined"&&a.match(ae)){c=new Image;c.src=a}}},C=function(a){var c={width:parseInt(at.width+(aA.width-at.width)*a,10),height:parseInt(at.height+(aA.height-at.height)*a,10),top:parseInt(at.top+(aA.top-at.top)*a,10),left:parseInt(at.left+(aA.left-at.left)*a,10)};if(typeof aA.opacity!=="undefined"){c.opacity=a<0.5?0.5:a}aD.css(c);aC.css({width:c.width-aF.padding*2,height:c.height-an*a-aF.padding*2})},x=function(){return[aG(window).width()-aF.margin*2,aG(window).height()-aF.margin*2,aG(document).scrollLeft()+aF.margin,aG(document).scrollTop()+aF.margin]},g=function(){var a=x(),f={},e=aF.autoScale,c=aF.padding*2;f.width=aF.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(aF.width)/100,10):aF.width+c;f.height=aF.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(aF.height)/100,10):aF.height+c;if(e&&(f.width>a[0]||f.height>a[1])){if(aE.type=="image"||aE.type=="swf"){e=aF.width/aF.height;if(f.width>a[0]){f.width=a[0];f.height=parseInt((f.width-c)/e+c,10)}if(f.height>a[1]){f.height=a[1];f.width=parseInt((f.height-c)*e+c,10)}}else{f.width=Math.min(f.width,a[0]);f.height=Math.min(f.height,a[1])}}f.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-f.height-40)*0.5),10);f.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-f.width-40)*0.5),10);return f},w=function(){var a=aE.orig?aG(aE.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+aF.padding*2,height:c.height+aF.padding*2,top:c.top-aF.padding-20,left:c.left-aF.padding-20}}else{a=x();c={width:aF.padding*2,height:aF.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},b=function(){if(aq.is(":visible")){aG("div",aq).css("top",ac*-40+"px");ac=(ac+1)%12}else{clearInterval(ad)}};aG.fn.fancybox=function(a){if(!aG(this).length){return this}aG(this).data("fancybox",aG.extend({},a,aG.metadata?aG(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!aB){aB=true;aG(this).blur();aw=[];au=0;c=aG(this).attr("rel")||"";if(!c||c==""||c==="nofollow"){aw.push(this)}else{aw=aG("a[rel="+c+"], area[rel="+c+"]");au=aw.index(this)}ag()}});return this};aG.fancybox=function(a,h){var e;if(!aB){aB=true;e=typeof h!=="undefined"?h:{};aw=[];au=parseInt(e.index,10)||0;if(aG.isArray(a)){for(var c=0,f=a.length;c<f;c++){if(typeof a[c]=="object"){aG(a[c]).data("fancybox",aG.extend({},e,a[c]))}else{a[c]=aG({}).data("fancybox",aG.extend({content:a[c]},e))}}aw=jQuery.merge(aw,a)}else{if(typeof a=="object"){aG(a).data("fancybox",aG.extend({},e,a))}else{a=aG({}).data("fancybox",aG.extend({content:a},e))}aw.push(a)}if(au>aw.length||au<0){au=0}ag()}};aG.fancybox.showActivity=function(){clearInterval(ad);aq.show();ad=setInterval(b,66)};aG.fancybox.hideActivity=function(){aq.hide()};aG.fancybox.next=function(){return aG.fancybox.pos(av+1)};aG.fancybox.prev=function(){return aG.fancybox.pos(av-1)};aG.fancybox.pos=function(a){if(!aB){a=parseInt(a);aw=az;if(a>-1&&a<az.length){au=a;ag()}else{if(aF.cyclic&&az.length>1){au=a>=az.length?0:az.length-1;ag()}}}};aG.fancybox.cancel=function(){if(!aB){aB=true;aG.event.trigger("fancybox-cancel");aa();aE.onCancel(aw,au,aE);aB=false}};aG.fancybox.close=function(){function a(){ap.fadeOut("fast");ax.empty().hide();aD.hide();aG.event.trigger("fancybox-cleanup");aC.empty();aF.onClosed(az,av,aF);az=aE=[];av=au=0;aF=aE={};aB=false}if(!(aB||aD.is(":hidden"))){aB=true;if(aF&&false===aF.onCleanup(az,av,aF)){aB=false}else{aa();aG(ai.add(am).add(al)).hide();aG(aC.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aC.find("iframe").attr("src",ab&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");aF.titlePosition!=="inside"&&ax.empty();aD.stop();if(aF.transitionOut=="elastic"){at=w();var c=aD.position();aA={top:c.top,left:c.left,width:aD.width(),height:aD.height()};if(aF.opacity){aA.opacity=1}ax.empty().hide();ak.prop=1;aG(ak).animate({prop:0},{duration:aF.speedOut,easing:aF.easingOut,step:C,complete:a})}else{aD.fadeOut(aF.transitionOut=="none"?0:aF.speedOut,a)}}}};aG.fancybox.resize=function(){ap.is(":visible")&&ap.css("height",aG(document).height());aG.fancybox.center(true)};aG.fancybox.center=function(a){var e,c;if(!aB){c=a===true?1:0;e=x();!c&&(aD.width()>e[0]||aD.height()>e[1])||aD.stop().animate({top:parseInt(Math.max(e[3]-20,e[3]+(e[1]-aC.height()-40)*0.5-aF.padding)),left:parseInt(Math.max(e[2]-20,e[2]+(e[0]-aC.width()-40)*0.5-aF.padding))},typeof a=="number"?a:200)}};aG.fancybox.init=function(){if(!aG("#fancybox-wrap").length){aG("body").append(ay=aG('<div id="fancybox-tmp"></div>'),aq=aG('<div id="fancybox-loading"><div></div></div>'),ap=aG('<div id="fancybox-overlay"></div>'),aD=aG('<div id="fancybox-wrap"></div>'));aj=aG('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(aD);aj.append(aC=aG('<div id="fancybox-content"></div>'),ai=aG('<a id="fancybox-close"></a>'),ax=aG('<div id="fancybox-title"></div>'),am=aG('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),al=aG('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));ai.click(aG.fancybox.close);aq.click(aG.fancybox.cancel);am.click(function(a){a.preventDefault();aG.fancybox.prev()});al.click(function(a){a.preventDefault();aG.fancybox.next()});aG.fn.mousewheel&&aD.bind("mousewheel.fb",function(a,c){a.preventDefault();aG.fancybox[c>0?"prev":"next"]()});aG.support.opacity||aD.addClass("fancybox-ie");if(ab){aq.addClass("fancybox-ie6");aD.addClass("fancybox-ie6");aG('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(aj)}}};aG.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};aG(document).ready(function(){aG.fancybox.init()})})(jQuery);(function(a){a.widget("ech.notify",{options:{speed:500,expires:5000,stack:"below",custom:false},_create:function(){var b=this;this.templates={};this.keys=[];this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(d){var c=this.id||d;b.keys.push(c);b.templates[c]=a(this).removeAttr("id").wrap("<div></div>").parent().html()}).end().empty().show()},create:function(c,e,d){if(typeof c==="object"){d=e;e=c;c=null}var b=this.templates[c||this.keys[0]];if(d&&d.custom){b=a(b).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html()}return new a.ech.notify.instance(this)._create(e,a.extend({},this.options,d),b)}});a.extend(a.ech.notify,{instance:function(b){this.parent=b;this.isOpen=false}});a.extend(a.ech.notify.instance.prototype,{_create:function(h,e,g){this.options=e;var d=this,f=g.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g,function(i,j){return(j in h)?h[j]:""}),c=(this.element=a(f)),b=c.find(".ui-notify-close");if(typeof this.options.click==="function"){c.addClass("ui-notify-click").bind("click",function(i){d._trigger("click",i,d)})}if(b.length){b.bind("click",function(){d.close();return false})}this.open();if(typeof e.expires==="number"){window.setTimeout(function(){d.close()},e.expires)}return this},close:function(){var b=this,c=this.options.speed;this.element.fadeTo(c,0).slideUp(c,function(){b._trigger("close");b.isOpen=false});return this},open:function(){if(this.isOpen||this._trigger("beforeopen")===false){return this}var b=this;this.element[this.options.stack==="above"?"prependTo":"appendTo"](this.parent.element).css({display:"none",opacity:""}).fadeIn(this.options.speed,function(){b._trigger("open");b.isOpen=true});return this},widget:function(){return this.element},_trigger:function(c,d,b){return this.parent._trigger.call(this,c,d,b)}})})(jQuery);(function(b){var a=function(){var T={},c,O=65,u,Q='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',C={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},K=function(U,W){var V=j(U);b(W).data("colorpicker").fields.eq(1).val(V.r).end().eq(2).val(V.g).end().eq(3).val(V.b).end()},v=function(U,V){b(V).data("colorpicker").fields.eq(4).val(U.h).end().eq(5).val(U.s).end().eq(6).val(U.b).end()},g=function(U,V){b(V).data("colorpicker").fields.eq(0).val(S(U)).end()},l=function(U,V){b(V).data("colorpicker").selector.css("backgroundColor","#"+S({h:U.h,s:100,b:100}));b(V).data("colorpicker").selectorIndic.css({left:parseInt(150*U.s/100,10),top:parseInt(150*(100-U.b)/100,10)})},H=function(U,V){b(V).data("colorpicker").hue.css("top",parseInt(150-150*U.h/360,10))},h=function(U,V){b(V).data("colorpicker").currentColor.css("backgroundColor","#"+S(U))},F=function(U,V){b(V).data("colorpicker").newColor.css("backgroundColor","#"+S(U))},n=function(U){var W=U.charCode||U.keyCode||-1;if((W>O&&W<=90)||W==32){return false}var V=b(this).parent().parent();if(V.data("colorpicker").livePreview===true){e.apply(this)}},e=function(V){var W=b(this).parent().parent(),U;if(this.parentNode.className.indexOf("_hex")>0){W.data("colorpicker").color=U=m(z(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){W.data("colorpicker").color=U=f({h:parseInt(W.data("colorpicker").fields.eq(4).val(),10),s:parseInt(W.data("colorpicker").fields.eq(5).val(),10),b:parseInt(W.data("colorpicker").fields.eq(6).val(),10)})}else{W.data("colorpicker").color=U=i(N({r:parseInt(W.data("colorpicker").fields.eq(1).val(),10),g:parseInt(W.data("colorpicker").fields.eq(2).val(),10),b:parseInt(W.data("colorpicker").fields.eq(3).val(),10)}))}}if(V){K(U,W.get(0));g(U,W.get(0));v(U,W.get(0))}l(U,W.get(0));H(U,W.get(0));F(U,W.get(0));W.data("colorpicker").onChange.apply(W,[U,S(U),j(U)])},o=function(U){var V=b(this).parent().parent();V.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},L=function(){O=this.parentNode.className.indexOf("_hex")>0?70:65;b(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");b(this).parent().addClass("colorpicker_focus")},J=function(U){var W=b(this).parent().find("input").focus();var V={el:b(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:U.pageY,field:W,val:parseInt(W.val(),10),preview:b(this).parent().parent().data("colorpicker").livePreview};b(document).bind("mouseup",V,s);b(document).bind("mousemove",V,M)},M=function(U){U.data.field.val(Math.max(0,Math.min(U.data.max,parseInt(U.data.val+U.pageY-U.data.y,10))));if(U.data.preview){e.apply(U.data.field.get(0),[true])}return false},s=function(U){e.apply(U.data.field.get(0),[true]);U.data.el.removeClass("colorpicker_slider").find("input").focus();b(document).unbind("mouseup",s);b(document).unbind("mousemove",M);return false},x=function(U){var V={cal:b(this).parent(),y:b(this).offset().top};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,r);b(document).bind("mousemove",V,k)},k=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(U.pageY-U.data.y))))/150,10)).get(0),[U.data.preview]);return false},r=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",r);b(document).unbind("mousemove",k);return false},y=function(U){var V={cal:b(this).parent(),pos:b(this).offset()};V.preview=V.cal.data("colorpicker").livePreview;b(document).bind("mouseup",V,B);b(document).bind("mousemove",V,q)},q=function(U){e.apply(U.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(U.pageY-U.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(U.pageX-U.data.pos.left))))/150,10)).get(0),[U.data.preview]);return false},B=function(U){K(U.data.cal.data("colorpicker").color,U.data.cal.get(0));g(U.data.cal.data("colorpicker").color,U.data.cal.get(0));b(document).unbind("mouseup",B);b(document).unbind("mousemove",q);return false},w=function(U){b(this).addClass("colorpicker_focus")},R=function(U){b(this).removeClass("colorpicker_focus")},p=function(V){var W=b(this).parent();var U=W.data("colorpicker").color;W.data("colorpicker").origColor=U;h(U,W.get(0));W.data("colorpicker").onSubmit(U,S(U),j(U),W.data("colorpicker").el)},E=function(U){var Y=b("#"+b(this).data("colorpickerId"));Y.data("colorpicker").onBeforeShow.apply(this,[Y.get(0)]);var Z=b(this).offset();var X=A();var W=Z.top+this.offsetHeight;var V=Z.left;if(W+176>X.t+X.h){W-=this.offsetHeight+176}if(V+356>X.l+X.w){V-=356}Y.css({left:V+"px",top:W+"px"});if(Y.data("colorpicker").onShow.apply(this,[Y.get(0)])!=false){Y.show()}b(document).bind("mousedown",{cal:Y},P);return false},P=function(U){if(!I(U.data.cal.get(0),U.target,U.data.cal.get(0))){if(U.data.cal.data("colorpicker").onHide.apply(this,[U.data.cal.get(0)])!=false){U.data.cal.hide()}b(document).unbind("mousedown",P)}},I=function(W,V,U){if(W==V){return true}if(W.contains){return W.contains(V)}if(W.compareDocumentPosition){return !!(W.compareDocumentPosition(V)&16)}var X=V.parentNode;while(X&&X!=U){if(X==W){return true}X=X.parentNode}return false},A=function(){var U=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(U?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(U?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(U?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(U?document.documentElement.clientHeight:document.body.clientHeight)}},f=function(U){return{h:Math.min(360,Math.max(0,U.h)),s:Math.min(100,Math.max(0,U.s)),b:Math.min(100,Math.max(0,U.b))}},N=function(U){return{r:Math.min(255,Math.max(0,U.r)),g:Math.min(255,Math.max(0,U.g)),b:Math.min(255,Math.max(0,U.b))}},z=function(W){var U=6-W.length;if(U>0){var X=[];for(var V=0;V<U;V++){X.push("0")}X.push(W);W=X.join("")}return W},d=function(U){var U=parseInt(((U.indexOf("#")>-1)?U.substring(1):U),16);return{r:U>>16,g:(U&65280)>>8,b:(U&255)}},m=function(U){return i(d(U))},i=function(W){var V={h:0,s:0,b:0};var X=Math.min(W.r,W.g,W.b);var U=Math.max(W.r,W.g,W.b);var Y=U-X;V.b=U;if(U!=0){}V.s=U!=0?255*Y/U:0;if(V.s!=0){if(W.r==U){V.h=(W.g-W.b)/Y}else{if(W.g==U){V.h=2+(W.b-W.r)/Y}else{V.h=4+(W.r-W.g)/Y}}}else{V.h=-1}V.h*=60;if(V.h<0){V.h+=360}V.s*=100/255;V.b*=100/255;return V},j=function(U){var W={};var aa=Math.round(U.h);var Z=Math.round(U.s*255/100);var V=Math.round(U.b*255/100);if(Z==0){W.r=W.g=W.b=V}else{var ab=V;var Y=(255-Z)*V/255;var X=(ab-Y)*(aa%60)/60;if(aa==360){aa=0}if(aa<60){W.r=ab;W.b=Y;W.g=Y+X}else{if(aa<120){W.g=ab;W.b=Y;W.r=ab-X}else{if(aa<180){W.g=ab;W.r=Y;W.b=Y+X}else{if(aa<240){W.b=ab;W.r=Y;W.g=ab-X}else{if(aa<300){W.b=ab;W.g=Y;W.r=Y+X}else{if(aa<360){W.r=ab;W.g=Y;W.b=ab-X}else{W.r=0;W.g=0;W.b=0}}}}}}}return{r:Math.round(W.r),g:Math.round(W.g),b:Math.round(W.b)}},D=function(U){var V=[U.r.toString(16),U.g.toString(16),U.b.toString(16)];b.each(V,function(W,X){if(X.length==1){V[W]="0"+X}});return V.join("")},S=function(U){return D(j(U))},G=function(){var V=b(this).parent();var U=V.data("colorpicker").origColor;V.data("colorpicker").color=U;K(U,V.get(0));g(U,V.get(0));v(U,V.get(0));l(U,V.get(0));H(U,V.get(0));F(U,V.get(0))};return{init:function(U){U=b.extend({},C,U||{});if(typeof U.color=="string"){U.color=m(U.color)}else{if(U.color.r!=undefined&&U.color.g!=undefined&&U.color.b!=undefined){U.color=i(U.color)}else{if(U.color.h!=undefined&&U.color.s!=undefined&&U.color.b!=undefined){U.color=f(U.color)}else{return this}}}return this.each(function(){if(!b(this).data("colorpickerId")){var V=b.extend({},U);V.origColor=U.color;var X="collorpicker_"+parseInt(Math.random()*1000);b(this).data("colorpickerId",X);var W=b(Q).attr("id",X);if(V.flat){W.appendTo(this).show()}else{W.appendTo(document.body)}V.fields=W.find("input").bind("keyup",n).bind("change",e).bind("blur",o).bind("focus",L);W.find("span").bind("mousedown",J).end().find(">div.colorpicker_current_color").bind("click",G);V.selector=W.find("div.colorpicker_color").bind("mousedown",y);V.selectorIndic=V.selector.find("div div");V.el=this;V.hue=W.find("div.colorpicker_hue div");W.find("div.colorpicker_hue").bind("mousedown",x);V.newColor=W.find("div.colorpicker_new_color");V.currentColor=W.find("div.colorpicker_current_color");W.data("colorpicker",V);W.find("div.colorpicker_submit").bind("mouseenter",w).bind("mouseleave",R).bind("click",p);K(V.color,W.get(0));v(V.color,W.get(0));g(V.color,W.get(0));H(V.color,W.get(0));l(V.color,W.get(0));h(V.color,W.get(0));F(V.color,W.get(0));if(V.flat){W.css({position:"relative",display:"block"})}else{b(this).bind(V.eventName,E)}}})},showPicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){E.apply(this)}})},hidePicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){b("#"+b(this).data("colorpickerId")).hide()}})},setColor:function(U){if(typeof U=="string"){U=m(U)}else{if(U.r!=undefined&&U.g!=undefined&&U.b!=undefined){U=i(U)}else{if(U.h!=undefined&&U.s!=undefined&&U.b!=undefined){U=f(U)}else{return this}}}return this.each(function(){if(b(this).data("colorpickerId")){var V=b("#"+b(this).data("colorpickerId"));V.data("colorpicker").color=U;V.data("colorpicker").origColor=U;K(U,V.get(0));v(U,V.get(0));g(U,V.get(0));H(U,V.get(0));l(U,V.get(0));h(U,V.get(0));F(U,V.get(0))}})}}}();b.fn.extend({ColorPicker:a.init,ColorPickerHide:a.hidePicker,ColorPickerShow:a.showPicker,ColorPickerSetColor:a.setColor})})(jQuery);jQuery.fn.editable=function(d,i,h){if(this.length===0){return(this)}var a={target:d,name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",loaddata:{},submitdata:{}};if(i){jQuery.extend(a,i)}var c=jQuery.editable.types[a.type].plugin||function(){};var f=jQuery.editable.types[a.type].submit||function(){};var g=jQuery.editable.types[a.type].buttons||jQuery.editable.types.defaults.buttons;var e=jQuery.editable.types[a.type].content||jQuery.editable.types.defaults.content;var b=jQuery.editable.types[a.type].element||jQuery.editable.types.defaults.element;h=h||function(){};jQuery(this).attr("title",a.tooltip);a.autowidth="auto"==a.width;a.autoheight="auto"==a.height;jQuery(this)[a.event](function(p){var j=this;if(j.editing){return}if(a.width!="none"){a.width=a.autowidth?jQuery(j).width():a.width}if(a.height!="none"){a.height=a.autoheight?jQuery(j).height():a.height}j.editing=true;j.revert=jQuery(j).html();j.innerHTML="";var o=document.createElement("form");if(a.cssclass){if("inherit"==a.cssclass){jQuery(o).attr("class",jQuery(j).attr("class"))}else{jQuery(o).attr("class",a.cssclass)}}if(a.style){if("inherit"==a.style){jQuery(o).attr("style",jQuery(j).attr("style"));jQuery(o).css("display",jQuery(j).css("display"))}else{jQuery(o).attr("style",a.style)}}var m=b.apply(o,[a,j]);if(a.getload){a.loadurl=a.getload;a.loadtype="GET"}else{if(a.postload){a.loadurl=a.postload;a.loadtype="POST"}}if(a.loadurl){var l=setTimeout(function(){m.disabled=true;e.apply(o,[a.loadtext,a,j])},100);var k={};k[a.id]=j.id;if(jQuery.isFunction(a.loaddata)){jQuery.extend(k,a.loaddata.apply(j,[j.revert,a]))}else{jQuery.extend(k,a.loaddata)}jQuery.ajax({type:a.loadtype,url:a.loadurl,data:k,success:function(r){window.clearTimeout(l);e.apply(o,[r,a,j]);m.disabled=false}})}else{if(a.data){var q=a.data;if(jQuery.isFunction(a.data)){var q=a.data.apply(j,[j.revert,a])}e.apply(o,[q,a,j])}else{e.apply(o,[j.revert,a,j])}}m.name=a.name;g.apply(o,[a,j]);j.appendChild(o);if(a.select){m.select()}c.apply(o,[a,j]);jQuery(":input:visible:enabled:first",o).focus();jQuery(m).keydown(function(r){if(r.keyCode==27){r.preventDefault();n()}});var l;if("cancel"==a.onblur){jQuery(m).blur(function(r){l=setTimeout(n,500)})}else{if("submit"==a.onblur){jQuery(m).blur(function(r){jQuery(o).submit()})}else{jQuery(m).blur(function(r){})}}jQuery(o).submit(function(s){if(l){clearTimeout(l)}s.preventDefault();f.apply(o,[a,j]);if(jQuery.isFunction(a.target)){var u=a.target.apply(j,[jQuery(m).val(),a]);j.innerHTML=u;j.editing=false;h.apply(j,[j.innerHTML,a])}else{var r={};r[m.name]=jQuery(m).val();r[a.id]=j.id;if(jQuery.isFunction(a.submitdata)){jQuery.extend(r,a.submitdata.apply(j,[j.revert,a]))}else{jQuery.extend(r,a.submitdata)}jQuery(j).html(a.indicator);jQuery.post(a.target,r,function(v){j.innerHTML=v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");j.editing=false;h.apply(j,[j.innerHTML,a])})}return false});function n(){j.innerHTML=j.revert;j.editing=false}});return(this)};jQuery.editable={types:{defaults:{element:function(c,b){var a=jQuery('<input type="hidden">');jQuery(this).append(a);return(a)},content:function(a,c,b){jQuery(":input:first",this).val(a)},buttons:function(b,a){if(b.submit){var d=jQuery('<input type="submit">');d.val(b.submit);jQuery(this).append(d)}if(b.cancel){var c=jQuery('<input type="button">');c.val(b.cancel);jQuery(this).append(c);jQuery(c).click(function(){jQuery(a).html(a.revert);a.editing=false})}}},text:{element:function(c,b){var a=jQuery("<input>");if(c.width!="none"){a.width(c.width)}if(c.height!="none"){a.height(c.height)}a.attr("autocomplete","off");jQuery(this).append(a);return(a)}},textarea:{element:function(c,b){var a=jQuery("<textarea>");if(c.rows){a.attr("rows",c.rows)}else{a.height(c.height)}if(c.cols){a.attr("cols",c.cols)}else{a.width(c.width)}jQuery(this).append(a);return(a)}},select:{element:function(c,b){var a=jQuery("<select>");jQuery(this).append(a);return(a)},content:function(string,settings,original){var select=jQuery("select",this);if(String==string.constructor){eval("var json = "+string);for(var key in json){if("selected"==key){continue}var option=$("<option>").val(key).append(json[key]);select.append(option)}}jQuery.editable.types.select.iefix(select,json.selected)},iefix:function(a,b){console.log(this);console.log(a);a.children().each(function(){if(jQuery(this).val()==b){jQuery(this).attr("selected","selected")}})}}},addInputType:function(b,a){jQuery.editable.types[b]=a}};(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var u=r=="x"?"Left":"Top",s=u.toLowerCase(),w="scroll"+u,p=n[w],g=a.max(n,r);if(j){k[w]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[w]-=parseInt(m.css("margin"+u))||0;k[w]-=parseInt(m.css("border"+u+"Width"))||0}k[w]+=d.offset[s]||0;if(d.over[s]){k[w]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var v=m[s];k[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*g:v}if(/^\d+$/.test(k[w])){k[w]=k[w]<=0?0:Math.min(k[w],g)}if(!q&&d.queue){if(p!=k[w]){i(d.onAfterFirst)}delete k[w]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var h=a(c).rules();var d=false;for(method in h){var g={method:method,parameters:h[method]};try{var b=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(d.old!==f){d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true;if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var l={};var j=(d.message=i||b.defaultMessage(c,"remote"));l[c.name]=a.isFunction(j)?j(f):j;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return d.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);(function(c){function b(e,d){return(typeof e=="function")?(e.call(d)):e}function a(e,d){this.$element=c(e);this.options=d;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var g=this.getTitle();if(g&&this.enabled){var f=this.tip();f.find(".tipsy-inner")[this.options.html?"html":"text"](g);f[0].className="tipsy";f.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var j=c.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=f[0].offsetWidth,i=f[0].offsetHeight,h=b(this.options.gravity,this.$element[0]);var e;switch(h.charAt(0)){case"n":e={top:j.top+j.height+this.options.offset,left:j.left+j.width/2-d/2};break;case"s":e={top:j.top-i-this.options.offset,left:j.left+j.width/2-d/2};break;case"e":e={top:j.top+j.height/2-i/2,left:j.left-d-this.options.offset};break;case"w":e={top:j.top+j.height/2-i/2,left:j.left+j.width+this.options.offset};break}if(h.length==2){if(h.charAt(1)=="w"){e.left=j.left+j.width/2-15}else{e.left=j.left+j.width/2-d+15}}f.css(e).addClass("tipsy-"+h);f.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0);if(this.options.className){f.addClass(b(this.options.className,this.$element[0]))}if(this.options.fade){f.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{f.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){c(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var d=this.$element;if(d.attr("title")||typeof(d.attr("original-title"))!="string"){d.attr("original-title",d.attr("title")||"").removeAttr("title")}},getTitle:function(){var f,d=this.$element,e=this.options;this.fixTitle();var f,e=this.options;if(typeof e.title=="string"){f=d.attr(e.title=="title"?"original-title":e.title)}else{if(typeof e.title=="function"){f=e.title.call(d[0])}}f=(""+f).replace(/(^\s*|\s*$)/,"");return f||e.fallback},tip:function(){if(!this.$tip){this.$tip=c('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};c.fn.tipsy=function(h){if(h===true){return this.data("tipsy")}else{if(typeof h=="string"){var j=this.data("tipsy");if(j){j[h]()}return this}}h=c.extend({},c.fn.tipsy.defaults,h);function g(l){var m=c.data(l,"tipsy");if(!m){m=new a(l,c.fn.tipsy.elementOptions(l,h));c.data(l,"tipsy",m)}c(l).bind("tipsy.reload",function(){m.options.fade=false;m.show();m.options.fade=true;return c(l)});return m}function k(){var l=g(this);l.hoverState="in";if(h.delayIn==0){l.show()}else{l.fixTitle();setTimeout(function(){if(l.hoverState=="in"){l.show()}},h.delayIn)}}function f(){var l=g(this);l.hoverState="out";if(h.delayOut==0){l.hide()}else{setTimeout(function(){if(l.hoverState=="out"){l.hide()}},h.delayOut)}}if(!h.live){this.each(function(){g(this)})}if(h.trigger!="manual"){var d=h.live?"live":"bind",i=h.trigger=="hover"?"mouseenter":"focus",e=h.trigger=="hover"?"mouseleave":"blur";this[d](i,k)[d](e,f)}return this};c.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};c.fn.tipsy.elementOptions=function(e,d){return c.metadata?c.extend({},d,c(e).metadata()):d};c.fn.tipsy.autoNS=function(){return c(this).offset().top>(c(document).scrollTop()+c(window).height()/2)?"s":"n"};c.fn.tipsy.autoWE=function(){return c(this).offset().left>(c(document).scrollLeft()+c(window).width()/2)?"e":"w"};c.fn.tipsy.autoBounds=function(e,d){return function(){var f={ns:d[0],ew:(d.length>1?d[1]:false)},i=c(document).scrollTop()+e,g=c(document).scrollLeft()+e,h=c(this);if(h.offset().top<i){f.ns="n"}if(h.offset().left<g){f.ew="w"}if(c(window).width()+c(document).scrollLeft()-h.offset().left<e){f.ew="e"}if(c(window).height()+c(document).scrollTop()-h.offset().top<e){f.ns="s"}return f.ns+(f.ew?f.ew:"")}}})(jQuery);(function(){var g,f,j,i,h=function(d,c){return function(){return d.apply(c,arguments)}};i=this,g=jQuery,g.fn.extend({chosen:function(b,a){return g.browser!=="msie"||g.browser.version!=="6.0"&&g.browser.version!=="7.0"?g(this).each(function(c){if(!g(this).hasClass("chzn-done")){return new f(this,b,a)}}):this}}),f=function(){function a(c){this.set_default_values(),this.form_field=c,this.form_field_jq=g(this.form_field),this.is_multiple=this.form_field.multiple,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl"),this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option",this.set_up_html(),this.register_observers(),this.form_field_jq.addClass("chzn-done")}a.prototype.set_default_values=function(){this.click_test_action=h(function(b){return this.test_active_click(b)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null;return this.choices=0},a.prototype.set_up_html=function(){var c,m,l,k;this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.width(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,c=g("<div />",{id:this.container_id,"class":"chzn-container "+(this.is_rtl?"chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?c.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):c.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(c),this.container=g("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),m=this.container.height(),l=this.f_width-j(this.dropdown),this.dropdown.css({width:l+"px",top:m+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),k=l-j(this.search_container)-j(this.search_field),this.search_field.css({width:k+"px"})),this.results_build();return this.set_tab_index()},a.prototype.register_observers=function(){this.container.mousedown(h(function(b){return this.container_mousedown(b)},this)),this.container.mouseenter(h(function(b){return this.mouse_enter(b)},this)),this.container.mouseleave(h(function(b){return this.mouse_leave(b)},this)),this.search_results.mouseup(h(function(b){return this.search_results_mouseup(b)},this)),this.search_results.mouseover(h(function(b){return this.search_results_mouseover(b)},this)),this.search_results.mouseout(h(function(b){return this.search_results_mouseout(b)},this)),this.form_field_jq.bind("liszt:updated",h(function(b){return this.results_update_field(b)},this)),this.search_field.blur(h(function(b){return this.input_blur(b)},this)),this.search_field.keyup(h(function(b){return this.keyup_checker(b)},this)),this.search_field.keydown(h(function(b){return this.keydown_checker(b)},this));if(this.is_multiple){this.search_choices.click(h(function(b){return this.choices_click(b)},this));return this.search_field.focus(h(function(b){return this.input_focus(b)},this))}return this.selected_item.focus(h(function(b){return this.activate_field(b)},this))},a.prototype.container_mousedown=function(c){c&&c.type==="mousedown"&&c.stopPropagation();if(!this.pending_destroy_click){this.active_field?!this.is_multiple&&c&&(g(c.target)===this.selected_item||g(c.target).parents("a.chzn-single").length)&&(c.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),g(document).click(this.click_test_action),this.results_show());return this.activate_field()}return this.pending_destroy_click=!1},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(b){if(!this.active_field){return setTimeout(h(function(){return this.container_mousedown()},this),50)}},a.prototype.input_blur=function(b){if(!this.mouse_on_container){this.active_field=!1;return setTimeout(h(function(){return this.blur_test()},this),100)}},a.prototype.blur_test=function(b){if(!this.active_field&&this.container.hasClass("chzn-container-active")){return this.close_field()}},a.prototype.close_field=function(){g(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default();return this.search_field_scale()},a.prototype.activate_field=function(){!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val());return this.search_field.focus()},a.prototype.test_active_click=function(c){return g(c.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},a.prototype.results_build=function(){var k,d,o,n,m,l;o=new Date,this.parsing=!0,this.results_data=i.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),k="",l=this.results_data;for(n=0,m=l.length;n<m;n++){d=l[n],d.group?k+=this.result_add_group(d):d.empty||(k+=this.result_add_option(d),d.selected&&this.is_multiple?this.choice_build(d):d.selected&&!this.is_multiple&&this.selected_item.find("span").text(d.text))}this.show_search_field_default(),this.search_field_scale(),this.search_results.html(k);return this.parsing=!1},a.prototype.result_add_group=function(c){if(!c.disabled){c.dom_id=this.container_id+"_g_"+c.array_index;return'<li id="'+c.dom_id+'" class="group-result">'+g("<div />").text(c.label).html()+"</li>"}return""},a.prototype.result_add_option=function(d){var c;if(!d.disabled){d.dom_id=this.container_id+"_o_"+d.array_index,c=d.selected&&this.is_multiple?[]:["active-result"],d.selected&&c.push("result-selected"),d.group_array_index!=null&&c.push("group-option");return'<li id="'+d.dom_id+'" class="'+c.join(" ")+'">'+d.html+"</li>"}return""},a.prototype.results_update_field=function(){this.result_clear_highlight(),this.result_single_selected=null;return this.results_build()},a.prototype.result_do_highlight=function(l){var k,p,o,n,m;if(l.length){this.result_clear_highlight(),this.result_highlight=l,this.result_highlight.addClass("highlighted"),o=parseInt(this.search_results.css("maxHeight"),10),m=this.search_results.scrollTop(),n=o+m,p=this.result_highlight.position().top+this.search_results.scrollTop(),k=p+this.result_highlight.outerHeight();if(k>=n){return this.search_results.scrollTop(k-o>0?k-o:0)}if(p<m){return this.search_results.scrollTop(p)}}},a.prototype.result_clear_highlight=function(){this.result_highlight&&this.result_highlight.removeClass("highlighted");return this.result_highlight=null},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_show=function(){var b;this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),b=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:b+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val());return this.winnow_results()},a.prototype.results_hide=function(){this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"});return this.results_showing=!1},a.prototype.set_tab_index=function(d){var c;if(this.form_field_jq.attr("tabindex")){c=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1);if(this.is_multiple){return this.search_field.attr("tabindex",c)}this.selected_item.attr("tabindex",c);return this.search_field.attr("tabindex",-1)}},a.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default")}this.search_field.val("");return this.search_field.removeClass("default")},a.prototype.search_results_mouseup=function(d){var e;e=g(d.target).hasClass("active-result")?g(d.target):g(d.target).parents(".active-result").first();if(e.length){this.result_highlight=e;return this.result_select(d)}},a.prototype.search_results_mouseover=function(d){var e;e=g(d.target).hasClass("active-result")?g(d.target):g(d.target).parents(".active-result").first();if(e){return this.result_do_highlight(e)}},a.prototype.search_results_mouseout=function(c){if(g(c.target).hasClass("active-result")){return this.result_clear_highlight()}},a.prototype.choices_click=function(c){c.preventDefault();if(this.active_field&&!g(c.target).hasClass("search-choice")&&!this.results_showing){return this.results_show()}},a.prototype.choice_build=function(e){var l,k;l=this.container_id+"_c_"+e.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+l+'"><span>'+e.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+e.array_index+'"></a></li>'),k=g("#"+l).find("a").first();return k.click(h(function(b){return this.choice_destroy_link_click(b)},this))},a.prototype.choice_destroy_link_click=function(c){c.preventDefault(),this.pending_destroy_click=!0;return this.choice_destroy(g(c.target))},a.prototype.choice_destroy=function(b){this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(b.attr("rel"));return b.parents("li").first().remove()},a.prototype.result_select=function(l){var k,o,n,m;if(this.result_highlight){k=this.result_highlight,o=k.attr("id"),this.result_clear_highlight(),k.addClass("result-selected"),this.is_multiple?this.result_deactivate(k):this.result_single_selected=k,m=o.substr(o.lastIndexOf("_")+1),n=this.results_data[m],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.is_multiple?this.choice_build(n):this.selected_item.find("span").first().text(n.text),(!l.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change");return this.search_field_scale()}},a.prototype.result_activate=function(b){return b.addClass("active-result").show()},a.prototype.result_deactivate=function(b){return b.removeClass("active-result").hide()},a.prototype.result_deselect=function(e){var l,k;k=this.results_data[e],k.selected=!1,this.form_field.options[k.options_index].selected=!1,l=g("#"+this.container_id+"_o_"+e),l.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change");return this.search_field_scale()},a.prototype.results_search=function(b){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var J,I,H,G,F,E,D,C,B,A,z,y,x,w,v,u,s;B=new Date,this.no_results_clear(),D=0,C=this.search_field.val()===this.default_text?"":g("<div/>").text(g.trim(this.search_field.val())).html(),F=new RegExp("^"+C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=new RegExp(C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),s=this.results_data;for(x=0,v=s.length;x<v;x++){I=s[x];if(!I.disabled&&!I.empty){if(I.group){g("#"+I.dom_id).hide()}else{if(!this.is_multiple||!I.selected){J=!1,E=I.dom_id;if(F.test(I.html)){J=!0,D+=1}else{if(I.html.indexOf(" ")>=0||I.html.indexOf("[")===0){G=I.html.replace(/\[|\]/g,"").split(" ");if(G.length){for(w=0,u=G.length;w<u;w++){H=G[w],F.test(H)&&(J=!0,D+=1)}}}}J?(C.length?(A=I.html.search(y),z=I.html.substr(0,A+C.length)+"</em>"+I.html.substr(A+C.length),z=z.substr(0,A)+"<em>"+z.substr(A)):z=I.html,g("#"+E).html!==z&&g("#"+E).html(z),this.result_activate(g("#"+E)),I.group_array_index!=null&&g("#"+this.results_data[I.group_array_index].dom_id).show()):(this.result_highlight&&E===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(g("#"+E)))}}}}return D<1&&C.length?this.no_results(C):this.winnow_results_set_highlight()},a.prototype.winnow_results_clear=function(){var k,o,n,m,l;this.search_field.val(""),o=this.search_results.find("li"),l=[];for(n=0,m=o.length;n<m;n++){k=o[n],k=g(k),l.push(k.hasClass("group-result")?k.show():!this.is_multiple||!k.hasClass("result-selected")?this.result_activate(k):void 0)}return l},a.prototype.winnow_results_set_highlight=function(){var d,c;if(!this.result_highlight){c=this.is_multiple?[]:this.search_results.find(".result-selected"),d=c.length?c.first():this.search_results.find(".active-result").first();if(d!=null){return this.result_do_highlight(d)}}},a.prototype.no_results=function(d){var e;e=g('<li class="no-results">No results match "<span></span>"</li>'),e.find("span").first().html(d);return this.search_results.append(e)},a.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},a.prototype.keydown_arrow=function(){var d,e;this.result_highlight?this.results_showing&&(e=this.result_highlight.nextAll("li.active-result").first(),e&&this.result_do_highlight(e)):(d=this.search_results.find("li.active-result").first(),d&&this.result_do_highlight(g(d)));if(!this.results_showing){return this.results_show()}},a.prototype.keyup_arrow=function(){var b;if(!this.results_showing&&!this.is_multiple){return this.results_show()}if(this.result_highlight){b=this.result_highlight.prevAll("li.active-result");if(b.length){return this.result_do_highlight(b.first())}this.choices>0&&this.results_hide();return this.result_clear_highlight()}},a.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")},a.prototype.clear_backstroke=function(){this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus");return this.pending_backstroke=null},a.prototype.keyup_checker=function(e){var d,k;d=(k=e.which)!=null?k:e.keyCode,this.search_field_scale();switch(d){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0){return this.keydown_backstroke()}if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:e.preventDefault();if(this.results_showing){return this.result_select(e)}break;case 27:if(this.results_showing){return this.results_hide()}break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.keydown_checker=function(e){var d,k;d=(k=e.which)!=null?k:e.keyCode,this.search_field_scale(),d!==8&&this.pending_backstroke&&this.clear_backstroke();switch(d){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},a.prototype.search_field_scale=function(){var s,r,q,p,o,n,m,l,k;if(this.is_multiple){q=0,m=0,o="position:absolute; left: -1000px; top: -1000px; display:none;",n=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(l=0,k=n.length;l<k;l++){p=n[l],o+=p+":"+this.search_field.css(p)+";"}r=g("<div />",{style:o}),r.text(this.search_field.val()),g("body").append(r),m=r.width()+25,r.remove(),m>this.f_width-10&&(m=this.f_width-10),this.search_field.css({width:m+"px"}),s=this.container.height();return this.dropdown.css({top:s+"px"})}},a.prototype.generate_field_id=function(){var b;b=this.generate_random_id(),this.form_field.id=b;return b},a.prototype.generate_random_id=function(){var c;c="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(g("#"+c).length>0){c+=this.generate_random_char()}return c},a.prototype.generate_random_char=function(){var e,d,k;e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",k=Math.floor(Math.random()*e.length);return d=e.substring(k,k+1)};return a}(),j=function(d){var c;return c=d.outerWidth()-d.width()},i.get_side_border_padding=j}).call(this),function(){var b;b=function(){function c(){this.options_index=0,this.parsed=[]}c.prototype.add_node=function(d){return d.nodeName==="OPTGROUP"?this.add_group(d):this.add_option(d)},c.prototype.add_group=function(i){var h,n,m,l,k,j;h=this.parsed.length,this.parsed.push({array_index:h,group:!0,label:i.label,children:0,disabled:i.disabled}),k=i.childNodes,j=[];for(m=0,l=k.length;m<l;m++){n=k[m],j.push(this.add_option(n,h,i.disabled))}return j},c.prototype.add_option=function(e,d,f){if(e.nodeName==="OPTION"){e.text!==""?(d!=null&&(this.parsed[d].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:f===!0?f:e.disabled,group_array_index:d})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0});return this.options_index+=1}};return c}(),b.select_to_array=function(a){var l,k,j,i,h;k=new b,h=a.childNodes;for(j=0,i=h.length;j<i;j++){l=h[j],k.add_node(l)}return k.parsed},this.SelectParser=b}.call(this);var selected_events=[];var flash_message=[];var csrf=$('meta[name="csrf-token"]').attr("content");function HCloader(b){var c=$("div#"+b);c.fadeTo("slow",0.2);var a=$('<div class="cover-loader" />');a.css({top:c.offset().top,left:c.offset().left,height:c.height(),width:c.width(),"line-height":c.height()+"px"}).html("Loading...");a.appendTo("body")}function clippyCopiedCallback(d){var c=$("span#main_"+d);c.length!=0&&(c.attr("title","copied!").trigger("tipsy.reload"),setTimeout(function(){c.attr("title","copy to clipboard")},500))}function Queue(){if(!(this instanceof arguments.callee)){return new arguments.callee(arguments)}var a=this;a.up=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b+1)};a.down=function(){var b=parseInt($("span.queue-count").html());$("span.queue-count").html(b-1)}}function flash(a){$("div#flash_message").remove();$.each(flash_message,function(b,d){var c=Snorby.templates.flash(d);$("body").prepend(c);$("div#flash_message").fadeIn("slow").delay(2000).fadeOut("slow");flash_message=[]});return false}function clear_selected_events(){selected_events=[];$("input#selected_events").val("");return false}function set_classification(a){var b=$("input#selected_events").attr("value");var c=$("div#events").attr("data-action");var d=$("div#events").attr("data-page");if(b.length>0){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$.post("/events/classify",{events:b,classification:a,authenticity_token:csrf},function(){if(c=="index"){clear_selected_events();$.getScript("/events?page="+d)}else{if(c=="queue"){clear_selected_events();$.getScript("/events/queue?page="+d)}else{if(c=="history"){clear_selected_events();$.getScript("/events/history?page="+d)}else{if(c=="results"){clear_selected_events();$.getScript($("input#current_url").val())}else{}}}}flash_message.push({type:"success",message:"Event(s) Classified Successfully"})})}else{if($("ul.table div.content li.event.currently-over.highlight").is(":visible")){$("ul.table div.content li.event.currently-over.highlight .row div.select input#event-selector").click().trigger("change");set_classification(a)}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash();$.scrollTo("#header",500)}}}function update_note_count(e,d){var a=$("li#"+e+" div.row div.timestamp");var b=a.find("span.notes-count");var c='<span class="add_tipsy round notes-count" title="{{notes_count_in_words}}"><img alt="Notes" height="16" src="/images/icons/notes.png" width="16"></span>';var f=Mustache.to_html(c,d);if(d.notes_count==0){b.remove()}else{if(b.length>0){b.replaceWith(f).trigger("tipsy.reload")}else{a.prepend(f).trigger("tipsy.reload")}}}var Snorby={setup:function(){$(window).resize(function(){$.fancybox.center});$("div#flash_message, div#flash_message > *").live("click",function(){$("div#flash_message").stop().fadeOut("fast")});$("#growl").notify({speed:500,expires:5000});$(".edit-sensor-name").editable("/sensors/update_name",{height:"20px",width:"180px",name:"name",indicator:'<img src="/images/icons/pager.gif">',data:function(b){var a=b.replace(/<br[\s\/]?>/gi,"\n");return a},submitdata:function(){return{id:$(this).attr("data-sensor-id"),authenticity_token:csrf}}})},pages:{classifications:function(){$("a.classification").live("click",function(){var a=$(this).attr("data-classification-id");set_classification(a);return false})},dashboard:function(){$("#box-holder div.box").live("click",function(a){a.preventDefault();window.location=$(this).attr("data-url");return false});$("a.show_events_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#events-graph").show();return false});$("a.show_map_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#geoip-graph").show();return false});$("a.show_severities_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#severity-graph").show();return false});$("a.show_protocol_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#protocol-graph").show();return false});$("a.show_signature_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#signature-graph").show();return false});$("a.show_classification_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#classification-graph").show();return false});$("a.show_source_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#source-ips-graph").show();return false});$("a.show_destination_ips_graph").live("click",function(a){a.preventDefault();$("#box-menu li").removeClass("active");$(this).parent("li").addClass("active");$("div.dashboard-graph").hide();$("div#destination-ips-graph").show();return false})},events:function(){$("select.email-user-select").live("change",function(b){var a=$("select.email-user-select").val();if(a!=""){if($("input#email_to").val()==""){$("input#email_to").val(a)}else{$("input#email_to").val($("input#email_to").val()+", "+a)}}});$("button.email-event-information").live("click",function(a){a.preventDefault();if($("input#email_to").val()==""){flash_message.push({type:"error",message:"The email recipients cannot be blank."});flash();$.scrollTo("#header",500)}else{if($("input#email_subject").val()==""){flash_message.push({type:"error",message:"The email subject cannot be blank."});flash();$.scrollTo("#header",500)}else{$("a#fancybox-close").click();$.post("/events/email",$("form.email-event-information").serialize(),null,"script")}}return false});$("button.request_packet_capture").live("click",function(a){a.preventDefault();if($(this).attr("data-deepsee")){$("form.request_packet_capture input#method").val("deepsee")}$.post("/events/request_packet_capture",$("form.request_packet_capture").serialize(),null,"script");return false});$("dl#event-sub-menu a").live("click",function(a){$("dl#event-sub-menu").hide()});$("a.has-event-menu").live("click",function(a){a.preventDefault();var b=$(this).parent().find("dl.event-sub-menu");if(b.is(":visible")){b.fadeOut("fast")}else{$("dl.event-sub-menu").hide();b.fadeIn("fast")}return false});$("dl.event-sub-menu dd a").live("click",function(a){$(this).parents("dl").fadeOut("fast")});$("button.mass-action").live("click",function(b){b.preventDefault();var a=$("form#mass-action-form");$("a#fancybox-close").click();$.post("/events/mass_action",a.serialize(),null,"script");return false});$("button.create-notification").live("click",function(b){b.preventDefault();var a=$("form#new_notification");$.post("/notifications",a.serialize(),null,"script");$("a#fancybox-close").click();return false});$("button.cancel-snorbybox").live("click",function(a){a.preventDefault();$("a#fancybox-close").click();return false});$("ul.payload-tabs li a").live("click",function(b){b.preventDefault();var a=$(this).attr("data-div");$(this).parents("ul").find("li").removeClass("current");$(this).parent("li").addClass("current");$("div.payload-holder").hide();$("div."+a+" pre").css("opacity",0);$("div."+a).show();$("div."+a+" pre").stop().animate({opacity:1},1000);return false});$("a.export").live("click",function(b){b.preventDefault();var a=$("input#selected_events").attr("value");if(a){$.post(this.href,{events:a,authenticity_token:csrf})}else{flash_message.push({type:"error",message:"Please Select Events To Perform This Action"});flash()}return false});$("a.edit-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");$.getScript("/notes/"+a+"/edit");return false});$("a.destroy-event-note").live("click",function(c){c.preventDefault();var b=$(this).parents("div.event-note");var a=$(this).attr("data-note-id");if(confirm("Are you sure you want to delete this note?")){$("div.notes").fadeTo(500,0.4);$.post("/notes/destroy",{id:a,authenticity_token:csrf,_method:"delete"},null,"script")}return false});$("button.add_new_note-working").live("click",function(a){a.preventDefault();return false});$("button.cancel-note").live("click",function(a){a.preventDefault();$(this).parents("div#new_note_box").remove();return false});$("button.add_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");if($("div#new_note_box").length>0){}else{$(this).removeClass("add_new_note").addClass("add_new_note-working");var a=$(this).width();$(this).addClass("loading").css("width",a);$.get("/notes/new",{sid:c,cid:b,authenticity_token:csrf},null,"script")}return false});$("button.submit_new_note").live("click",function(d){d.preventDefault();var c=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-sid");var b=$(this).parent("div#form-actions").parent("div#new_note").attr("data-event-cid");var f=$(this).parent("div#form-actions").parent("div#new_note").find("textarea#body").val();if(f.length>0){var a=$(this).width();$(this).addClass("loading").css("width",a);$.post("/notes/create",{sid:c,cid:b,body:f,authenticity_token:csrf},null,"script")}else{flash_message.push({type:"error",message:"The note body cannot be blank!"});flash();$.scrollTo("#header",500)}return false});$("a.query-data").live("click",function(){$("pre.query-data-content").hide();$("pre#"+$(this).attr("data-content-name")).show();return false});$("a.snorbybox-content").live("click",function(b){b.preventDefault();$("dl.drop-down-menu").fadeOut("slow");var a=$(this).attr("data-content");$.fancybox({padding:0,content:a,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","shift+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}})});$("a.snorbybox").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href,onStart:function(){$(document).unbind("keydown","right");$(document).unbind("keydown","esc");$(document).unbind("keydown","shift+left");$("dl#event-sub-menu").hide()},onClosed:function(){Snorby.hotkeys()}});return false});$("div.create-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var c=$(this).parents("li.event").attr("data-event-cid");$(this).removeClass("create-favorite").addClass("destroy-favorite");$.post("/events/favorite",{sid:a,cid:c,authenticity_token:csrf});var b=new Queue();b.up();return false});$("div.destroy-favorite.enabled").live("click",function(){var a=$(this).parents("li.event").attr("data-event-sid");var d=$(this).parents("li.event").attr("data-event-cid");var c=$("div#events").attr("data-action");$(this).removeClass("destroy-favorite").addClass("create-favorite");$.post("/events/favorite",{sid:a,cid:d,authenticity_token:csrf});var b=new Queue();b.down();if(c=="queue"){$("div.content").fadeTo(500,0.4);Snorby.helpers.remove_click_events(true);$("div.destroy-favorite").removeClass("enabled").css("cursor","default");$.get("/events/queue",null,null,"script")}return false});$("input.event-select-all").live("change",function(){if($(this).attr("checked")){$("ul.table div.content li.event input.event-selector").attr("checked",true)}else{$("ul.table div.content li.event input.event-selector").attr("checked",false)}return true});$("ul.table div.content li.event div.click").live("click",function(){$("dl#event-sub-menu").hide();var b=$(this).parents("li").attr("data-event-sid");var e=$(this).parents("li").attr("data-event-cid");var d=$("li#event_"+b+""+e);var c=$("li#event_"+b+""+e+" input#event-selector");var a=$("li#event_"+b+""+e+" div.event-data");Snorby.helpers.remove_click_events(true);$("li.event").removeClass("highlight");if(!a.is(":visible")){d.addClass("highlight")}else{d.removeClass("highlight")}if(a.attr("data")=="true"){Snorby.helpers.remove_click_events(false);if(a.is(":visible")){a.slideUp("fast",function(){$("li.event div.event-data").slideUp("fast")});Snorby.hotkeys()}else{$("li.event div.event-data").slideUp("fast");a.slideDown("fast");$(document).unbind("keydown","left");$(document).unbind("keydown","right");$(document).unbind("keydown","shift+left");$(document).unbind("keydown","shift+right")}}else{c.hide();$("li.event div.event-data").slideUp("fast");d.find("div.select").append("<img alt='laoding' src='/images/icons/loading.gif' class='select-loading'>");$.get("/events/show/"+b+"/"+e,function(){$(document).unbind("keydown","left");$(document).unbind("keydown","right");$(document).unbind("keydown","shift+left");$(document).unbind("keydown","shift+right");Snorby.helpers.remove_click_events(false);$(".select-loading").remove();c.show();a.attr("data",true)},"script")}return false});$("div.new_events").live("click",function(){$(this).remove();if(parseInt($("strong.new_event_count").html())>100){window.location="/events"}else{$("#events ul.table div.content li").fadeIn("slow")}return false})},},admin:function(){$("#users input#enabled").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{enabled:true},authenticity_token:csrf})}else{$.post("/users/toggle_settings",{user_id:a,user:{enabled:false},authenticity_token:csrf})}});$("#users input#admin").live("click",function(b){var a=$(this).parent("td").attr("data-user");if($(this).attr("checked")){$.post("/users/toggle_settings",{user_id:a,user:{admin:true},authenticity_token:csrf})}else{$.post("/users/toggle_settings",{user_id:a,user:{admin:false},authenticity_token:csrf})}});$("#severity-color-bg").ColorPicker({color:$("#severity-color-bg").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-bg").val("#"+c);$("span.severity").css("backgroundColor","#"+c)}});$("#severity-color-text").ColorPicker({color:$("#severity-color-text").attr("value"),onShow:function(a){$(a).fadeIn(500);return false},onHide:function(a){$(a).fadeOut(500);return false},onSubmit:function(a,d,b,c){$(c).ColorPickerHide()},onChange:function(a,c,b){$("#severity-color-text").val("#"+c);$("span.severity").css("color","#"+c)}})},templates:{flash:function(b){var a=" <div class='{{type}}' id='flash_message' style='display:none;'> <div class='message {{type}}'>{{message}}</div> </div>";return Mustache.to_html(a,b)},event_table:function(b){var a=" {{#events}} <li id='event_{{sid}}{{cid}}' class='event' style='display:none;' data-event-id='{{sid}}-{{cid}}' data-event-sid='{{sid}}' data-event-cid='{{cid}}'> <div class='row'> <div class='select small'><input class='event-selector' id='event-selector' name='event-selector' type='checkbox'></div> <div class='important small'><div class='create-favorite enabled'></div></div> <div class='severity small'><span class='severity sev{{severity}}'>{{severity}}</span></div> <div class='click sensor address'>{{hostname}}</div> <div class='click src_ip address'>{{ip_src}}</div> <div class='click dst_ip address'>{{ip_dst}}</div> <div class='click signature'>{{message}}</div> <div class='click timestamp'>{{timestamp}}</div> </div> <div style='display:none;' class='event-data' data='false'></div> </li> {{/events}}";return Mustache.to_html(a,b)},},notification:function(a){$("#growl").notify("create",a,{expires:3000,speed:500})},helpers:{tipsy:function(){$(".add_tipsy").tipsy({fade:true,html:false,gravity:"s",live:true})},input_style:function(){$("div#form-actions button.cancel").live("click",function(){window.location="/";return false});$("input[name=blank]").focus()},dropdown:function(){$(document).click(function(){$("dl.drop-down-menu:visible").hide()});$("dl.drop-down-menu dd a").live("click",function(){$("dl.drop-down-menu").fadeOut("slow");return true});$("dl.drop-down-menu").hover(function(){var a=$(this).data("timeout");if(a){clearTimeout(a)}},function(){$(this).data("timeout",setTimeout($.proxy(function(){$(this).fadeOut("fast")},this),500))});$("a.has_dropdown").live("click",function(){var b=$(this).attr("id");var a=$(this).parents("li").find("dl#"+b);$("dl.drop-down-menu").each(function(c){if(b===$(this).attr("id")){if($(this).is(":visible")){a.fadeOut("fast")}else{a.slideDown({duration:"fast",easing:"easeOutSine"})}}else{$(this).fadeOut("fast")}});return false})},persistence_selections:function(){$("input#event-selector").live("change",function(){var a=$(this).parents("li").attr("data-event-id");if($(this).attr("checked")){selected_events.push(a);$('input#selected_events[type="hidden"]').val(selected_events)}else{var b=a;selected_events=jQuery.grep(selected_events,function(c){return c!=b});$('input#selected_events[type="hidden"]').val(selected_events)}});$("input#event-select-all").live("change",function(){if($(this).attr("checked")){$('ul.table div.content li input[type="checkbox"]').each(function(a,c){var b=$(this).parents("li").attr("data-event-id");$(this).attr("checked","checked");selected_events.push(b)})}else{$('ul.table div.content li input[type="checkbox"]').each(function(a,b){var c=$(this).parents("li").attr("data-event-id");$(this).attr("checked","");selected_events=jQuery.grep(selected_events,function(d){return d!=c})})}$('input#selected_events[type="hidden"]').val(selected_events)})},recheck_selected_events:function(){$("input#selected_events").val(selected_events);$.each(selected_events,function(a,b){$("input.check_box_"+b).attr("checked","checked")})},pagenation:function(){$("ul.pager li").live("click",function(){if(history&&history.pushState){$(window).bind("popstate",function(){$.getScript(location.href)})}if(!$(this).hasClass("more")){var a=$(this).width();if(a<16){var a=16}$(this).addClass("loading").css("width",a);if($(this).parents("div").hasClass("notes-pager")){$("div.notes").fadeTo(500,0.4)}else{$("div.content, tbody.content").fadeTo(500,0.4)}Snorby.helpers.remove_click_events(true);if(history&&history.pushState){$.getScript($(this).find("a").attr("href"));history.pushState(null,document.title,$(this).find("a").attr("href"))}else{$.getScript($(this).find("a").attr("href"))}}return false})},remove_click_events:function(a){if(a){$("ul.table div.content div").removeClass("click")}else{$("li.event div.sensor, li.event div.src_ip, li.event div.dst_ip, li.event div.signature, li.event div.timestamp").addClass("click")}},},callbacks:function(){$("body").ajaxError(function(c,d,a,b){$("div.content").fadeTo(500,1);$('ul.table div.content li input[type="checkbox"]').attr("checked","");Snorby.helpers.remove_click_events(false);if(d.status===404){flash_message.push({type:"error",message:"The requested page could not be found."});flash()}else{flash_message.push({type:"error",message:"The request failed to complete successfully."});flash()}})},hotkeys:function(){$(document).bind("keydown","ctrl+shift+h",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:"/events/hotkey"});return false});$(document).bind("keydown","ctrl+3",function(){window.location="/jobs";return false});$(document).bind("keydown","ctrl+2",function(){window.location="/events";return false});$(document).bind("keydown","ctrl+1",function(){window.location="/events/queue";return false});$(document).bind("keydown","ctrl+shift+s",function(){window.location="/search";return false});$("ul.table div.content li.event").live("hover",function(){$("ul.table div.content li.event").removeClass("currently-over");$(this).addClass("currently-over")},function(){$(this).removeClass("currently-over")});if($("div.pager").is(":visible")){$(document).bind("keydown","shift+down",function(){var a=$("ul.table div.content li.event.currently-over");if(a.is(":visible")){if(a.next().length!=0){a.removeClass("currently-over").next().addClass("currently-over")}else{$("ul.table div.content li.event:first").addClass("currently-over")}}else{$("ul.table div.content li.event:first").addClass("currently-over")}return false});$(document).bind("keydown","shift+up",function(){var a=$("ul.table div.content li.event.currently-over");if(a.is(":visible")){if(a.prev().length!=0){a.removeClass("currently-over").prev().addClass("currently-over")}else{$("ul.table div.content li.event:last").addClass("currently-over")}}else{$("ul.table div.content li.event:last").addClass("currently-over")}return false});$(document).bind("keydown","shift+return",function(){$("ul.table div.content li.event.currently-over div.row div.click").click();return false});$(document).bind("keydown","esc",function(){$("ul.table div.content li.event.highlight div.row div.click").click();return false});$(document).bind("keydown","ctrl+shift+1",function(){$("span.sev1").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+2",function(){$("span.sev2").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+3",function(){$("span.sev3").parents("div.row").find("input#event-selector").click().trigger("change");return false});$(document).bind("keydown","ctrl+shift+u",function(){set_classification(0);return false});$(document).bind("keydown","shift+right",function(){$("div.pager.main ul.pager li.last a").click();return false});$(document).bind("keydown","alt+right",function(){$("div.pager.notes-pager ul.pager li.next a").click();return false});$(document).bind("keydown","right",function(){$("div.pager.main ul.pager li.next a").click();return false});$(document).bind("keydown","shift+left",function(){$("div.pager.main ul.pager li.first a").click();return false});$(document).bind("keydown","alt+left",function(){$("div.pager.notes-pager ul.pager li.previous a").click();return false});$(document).bind("keydown","left",function(){$("div.pager.main ul.pager li.previous a").click();return false});$(document).bind("keydown","ctrl+shift+a",function(){$("input.event-select-all").click().trigger("change");return false})}},validations:function(){jQuery.validator.addMethod("hex-color",function(b,a,c){return this.optional(a)||/^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/i.test(b)},jQuery.validator.messages.url);$(".validate").validate()},settings:function(){if($("div#general-settings").length>0){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}if($("input#_settings_packet_capture_auto_auth:checked").length==0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}var a=$("select#_settings_packet_capture_type").attr("packet_capture_plugin");$('select#_settings_packet_capture_type option[value="'+a+'"]').attr("selected","selected");if($("input#_settings_autodrop:checked").length>0){$("select#_settings_autodrop_count").attr("disabled","")}else{$("select#_settings_autodrop_count").attr("disabled","disabled")}var b=$("select#_settings_autodrop_count").attr("autodrop_count");$('select#_settings_autodrop_count option[value="'+b+'"]').attr("selected","selected")}$("input#_settings_packet_capture").live("click",function(){if($("input#_settings_packet_capture:checked").length>0){$("div.pc-settings").show();$('p.pc-settings input[type="text"], p.pc-settings select').addClass("required")}else{$("div.pc-settings").hide();$('p.pc-settings input[type="text"], p.pc-settings select').removeClass("required")}});$("input#_settings_autodrop").live("click",function(){console.log("w0ots!");if($(this).is(":checked")){$("select#_settings_autodrop_count").attr("disabled","")}else{$("select#_settings_autodrop_count").attr("disabled","disabled")}});$("input#_settings_packet_capture_auto_auth").live("click",function(){if($("input#_settings_packet_capture_auto_auth:checked").length>0){$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").addClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","")}else{$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").removeClass("required");$("input#_settings_packet_capture_user, input#_settings_packet_capture_password").attr("disabled","disabled")}})},jobs:function(){$("a.view_job_handler, a.view_job_last_error").live("click",function(){$.fancybox({padding:0,centerOnScroll:true,zoomSpeedIn:300,zoomSpeedOut:300,overlayShow:true,overlayOpacity:0.5,overlayColor:"#000",href:this.href});return false})}};jQuery(document).ready(function(a){a("#login form#user_new").submit(function(d){d.preventDefault();var b=a("#login");var c=this;if(a("input#user_password",c).attr("value").length>1){if(a("input#user_email",c).attr("value").length>5){a.post(c.action,a(c).serialize(),function(e){if(e.success){flash_message.push({type:"success",message:"Loading - Authentication Successful!"});flash();a.get(e.redirect,function(f){b.fadeOut("slow",function(){document.open();document.write(f);document.close();history.pushState(null,"Snorby - Dashboard","/")})})}else{flash_message.push({type:"error",message:"Fail - Authentication Failure!"});flash()}})}}});a("#login button.forgot-my-password").live("click",function(b){b.preventDefault();a.get("/users/password/new",function(d){var c=a(d).find("#content").html();a("#content").html(c);history.pushState(null,"Snorby - Password Reset","/users/password/new")})});a("#fancybox-wrap").draggable({handle:"div#box-title",cursor:"move"});a("li.administration a").live("click",function(c){var b=this;c.preventDefault();a("dl#admin-menu").toggle()});a("dl#admin-menu a").live("click",function(b){a(this).parents("dl").fadeOut("fast")});a("#wrapper").live("click",function(){if(a("dl#admin-menu").is(":visible")){a("dl#admin-menu").fadeOut("fast")}});a("td.search-by-signature").live("click",function(c){c.preventDefault();var b=a(this).attr("data-url");window.location=b});Snorby.setup();Snorby.admin();Snorby.callbacks();Snorby.hotkeys();Snorby.jobs();Snorby.settings();Snorby.validations();Snorby.helpers.tipsy();Snorby.helpers.dropdown();Snorby.helpers.input_style();Snorby.helpers.persistence_selections();Snorby.helpers.pagenation();Snorby.pages.classifications();Snorby.pages.dashboard();Snorby.pages.events();a(".add_chosen").chosen()});
\ No newline at end of file
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/public/flash
^
|
+(directory)
|
|
Added |
Snorby-2.3.9.tar.bz2/public/flash/clippy.swf
^
|
|
Changed |
Snorby-2.3.9.tar.bz2/public/images/dashboard/pie-no-data.png
^
|
|
Added |
Snorby-2.3.9.tar.bz2/public/images/icons/lookups.png
^
|
|
Added |
Snorby-2.3.9.tar.bz2/public/images/icons/plugin.png
^
|
|
Added |
Snorby-2.3.9.tar.bz2/public/images/icons/world.png
^
|
|
Added |
Snorby-2.3.9.tar.bz2/public/images/login.png
^
|
|
Added |
Snorby-2.3.9.tar.bz2/public/images/page/body-bg.png
^
|
|
Changed |
Snorby-2.3.9.tar.bz2/public/images/plugins/solera/logo.png
^
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/public/javascripts/chosen.js
^
|
@@ -0,0 +1,10 @@
+// Chosen, a Select Box Enhancer for jQuery and Protoype
+// by Patrick Filler for Harvest, http://getharvest.com
+//
+// Version 0.9.1
+// Full source at https://github.com/harvesthq/chosen
+// Copyright (c) 2011 Harvest http://getharvest.com
+
+// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+// This file is generated by `cake build`, do not edit it by hand.
+(function(){var a,b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}};d=this,a=jQuery,a.fn.extend({chosen:function(c,d){return a.browser!=="msie"||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(e){if(!a(this).hasClass("chzn-done"))return new b(this,c,d)}):this}}),b=function(){function b(b){this.set_default_values(),this.form_field=b,this.form_field_jq=a(this.form_field),this.is_multiple=this.form_field.multiple,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl"),this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option",this.set_up_html(),this.register_observers(),this.form_field_jq.addClass("chzn-done")}b.prototype.set_default_values=function(){this.click_test_action=e(function(a){return this.test_active_click(a)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null;return this.choices=0},b.prototype.set_up_html=function(){var b,d,e,f;this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.width(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("<div />",{id:this.container_id,"class":"chzn-container "+(this.is_rtl?"chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):b.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build();return this.set_tab_index()},b.prototype.register_observers=function(){this.container.mousedown(e(function(a){return this.container_mousedown(a)},this)),this.container.mouseenter(e(function(a){return this.mouse_enter(a)},this)),this.container.mouseleave(e(function(a){return this.mouse_leave(a)},this)),this.search_results.mouseup(e(function(a){return this.search_results_mouseup(a)},this)),this.search_results.mouseover(e(function(a){return this.search_results_mouseover(a)},this)),this.search_results.mouseout(e(function(a){return this.search_results_mouseout(a)},this)),this.form_field_jq.bind("liszt:updated",e(function(a){return this.results_update_field(a)},this)),this.search_field.blur(e(function(a){return this.input_blur(a)},this)),this.search_field.keyup(e(function(a){return this.keyup_checker(a)},this)),this.search_field.keydown(e(function(a){return this.keydown_checker(a)},this));if(this.is_multiple){this.search_choices.click(e(function(a){return this.choices_click(a)},this));return this.search_field.focus(e(function(a){return this.input_focus(a)},this))}return this.selected_item.focus(e(function(a){return this.activate_field(a)},this))},b.prototype.container_mousedown=function(b){b&&b.type==="mousedown"&&b.stopPropagation();if(!this.pending_destroy_click){this.active_field?!this.is_multiple&&b&&(a(b.target)===this.selected_item||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show());return this.activate_field()}return this.pending_destroy_click=!1},b.prototype.mouse_enter=function(){return this.mouse_on_container=!0},b.prototype.mouse_leave=function(){return this.mouse_on_container=!1},b.prototype.input_focus=function(a){if(!this.active_field)return setTimeout(e(function(){return this.container_mousedown()},this),50)},b.prototype.input_blur=function(a){if(!this.mouse_on_container){this.active_field=!1;return setTimeout(e(function(){return this.blur_test()},this),100)}},b.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},b.prototype.close_field=function(){a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default();return this.search_field_scale()},b.prototype.activate_field=function(){!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val());return this.search_field.focus()},b.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},b.prototype.results_build=function(){var a,b,c,e,f,g;c=new Date,this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),a="",g=this.results_data;for(e=0,f=g.length;e<f;e++)b=g[e],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&this.selected_item.find("span").text(b.text));this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a);return this.parsing=!1},b.prototype.result_add_group=function(b){if(!b.disabled){b.dom_id=this.container_id+"_g_"+b.array_index;return'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>"}return""},b.prototype.result_add_option=function(a){var b;if(!a.disabled){a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option");return'<li id="'+a.dom_id+'" class="'+b.join(" ")+'">'+a.html+"</li>"}return""},b.prototype.results_update_field=function(){this.result_clear_highlight(),this.result_single_selected=null;return this.results_build()},b.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},b.prototype.result_clear_highlight=function(){this.result_highlight&&this.result_highlight.removeClass("highlighted");return this.result_highlight=null},b.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},b.prototype.results_show=function(){var a;this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:a+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val());return this.winnow_results()},b.prototype.results_hide=function(){this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"});return this.results_showing=!1},b.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex")){b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1);if(this.is_multiple)return this.search_field.attr("tabindex",b);this.selected_item.attr("tabindex",b);return this.search_field.attr("tabindex",-1)}},b.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default")}this.search_field.val("");return this.search_field.removeClass("default")},b.prototype.search_results_mouseup=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length){this.result_highlight=c;return this.result_select(b)}},b.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},b.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight()},b.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},b.prototype.choice_build=function(b){var c,d;c=this.container_id+"_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first();return d.click(e(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){b.preventDefault(),this.pending_destroy_click=!0;return this.choice_destroy(a(b.target))},b.prototype.choice_destroy=function(a){this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel"));return a.parents("li").first().remove()},b.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight){b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),b.addClass("result-selected"),this.is_multiple?this.result_deactivate(b):this.result_single_selected=b,e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):this.selected_item.find("span").first().text(d.text),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change");return this.search_field_scale()}},b.prototype.result_activate=function(a){return a.addClass("active-result").show()},b.prototype.result_deactivate=function(a){return a.removeClass("active-result").hide()},b.prototype.result_deselect=function(b){var c,d;d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change");return this.search_field_scale()},b.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n<p;n++){c=r[n];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).hide();else if(!this.is_multiple||!c.selected){b=!1,g=c.dom_id;if(f.test(c.html))b=!0,h+=1;else if(c.html.indexOf(" ")>=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o<q;o++)d=e[o],f.test(d)&&(b=!0,h+=1)}b?(i.length?(k=c.html.search(m),l=c.html.substr(0,k+i.length)+"</em>"+c.html.substr(k+i.length),l=l.substr(0,k)+"<em>"+l.substr(k)):l=c.html,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),f.push(b.hasClass("group-result")?b.show():!this.is_multiple||!b.hasClass("result-selected")?this.result_activate(b):void 0);return f},b.prototype.winnow_results_set_highlight=function(){var a,b;if(!this.result_highlight){b=this.is_multiple?[]:this.search_results.find(".result-selected"),a=b.length?b.first():this.search_results.find(".active-result").first();if(a!=null)return this.result_do_highlight(a)}},b.prototype.no_results=function(b){var c;c=a('<li class="no-results">No results match "<span></span>"</li>'),c.find("span").first().html(b);return this.search_results.append(c)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight){a=this.result_highlight.prevAll("li.active-result");if(a.length)return this.result_do_highlight(a.first());this.choices>0&&this.results_hide();return this.result_clear_highlight()}},b.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")},b.prototype.clear_backstroke=function(){this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus");return this.pending_backstroke=null},b.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height();return this.dropdown.css({top:b+"px"})}},b.prototype.generate_field_id=function(){var a;a=this.generate_random_id(),this.form_field.id=a;return a},b.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},b.prototype.generate_random_char=function(){var a,b,c;a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length);return b=a.substring(c,c+1)};return b}(),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}).call(this),function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION"){a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0});return this.options_index+=1}};return a}(),a.select_to_array=function(b){var c,d,e,f,g;d=new a,g=b.childNodes;for(e=0,f=g.length;e<f;e++)c=g[e],d.add_node(c);return d.parsed},this.SelectParser=a}.call(this)
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/javascripts/highcharts.js
^
|
@@ -2,9 +2,9 @@
// @compilation_level SIMPLE_OPTIMIZATIONS
/**
- * @license Highcharts JS v2.1 alpha (merged changes from master 2010-09-28)
+ * @license Highcharts JS v2.1.5 (2011-06-22)
*
- * (c) 2009-2010 Torstein Hønsi
+ * (c) 2009-2011 Torstein Hønsi
*
* License: www.highcharts.com/license
*/
@@ -33,10 +33,14 @@
// some variables
userAgent = navigator.userAgent,
isIE = /msie/i.test(userAgent) && !win.opera,
- docMode8 = doc.documentMode == 8,
+ docMode8 = doc.documentMode === 8,
isWebKit = /AppleWebKit/.test(userAgent),
- hasSVG = win.SVGAngle || doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"),
- hasTouch = 'ontouchstart' in doc.documentElement,
+ isFirefox = /Firefox/.test(userAgent),
+ //hasSVG = win.SVGAngle || doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"),
+ hasSVG = !!doc.createElementNS && !!doc.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect,
+ SVG_NS = 'http://www.w3.org/2000/svg',
+ Renderer,
+ hasTouch = doc.documentElement.ontouchstart !== undefined,
colorCounter,
symbolCounter,
symbolSizes = {},
@@ -110,7 +114,8 @@
stop = adapter.stop,
// lookup over the types and the associated classes
- seriesTypes = {};
+ seriesTypes = {},
+ hoverChart;
/**
* Extend an object with the members of another
@@ -118,10 +123,11 @@
* @param {Object} b The object to add to the first one
*/
function extend(a, b) {
+ var n;
if (!a) {
a = {};
}
- for (var n in b) {
+ for (n in b) {
a[n] = b[n];
}
return a;
@@ -140,7 +146,7 @@
* @param {Object} s
*/
function isString(s) {
- return typeof s == 'string';
+ return typeof s === 'string';
}
/**
@@ -148,7 +154,7 @@
* @param {Object} obj
*/
function isObject(obj) {
- return typeof obj == 'object';
+ return typeof obj === 'object';
}
/**
@@ -156,7 +162,14 @@
* @param {Object} n
*/
function isNumber(n) {
- return typeof n == 'number';
+ return typeof n === 'number';
+}
+
+function log2lin(num) {
+ return math.log(num) / math.LN10;
+}
+function lin2log(num) {
+ return math.pow(10, num);
}
/**
@@ -167,7 +180,7 @@
function erase(arr, item) {
var i = arr.length;
while (i--) {
- if (arr[i] == item) {
+ if (arr[i] === item) {
arr.splice(i, 1);
break;
}
@@ -200,6 +213,7 @@
if (isString(prop)) {
// set the value
if (defined(value)) {
+
elem[setAttribute](prop, value);
// get the value
@@ -220,7 +234,7 @@
* MooTools' $.splat.
*/
function splat(obj) {
- if (!obj || obj.constructor != Array) {
+ if (!obj || obj.constructor !== Array) {
obj = [obj];
}
return obj;
@@ -234,10 +248,11 @@
function pick() {
var args = arguments,
i,
- arg;
- for (i = 0; i < args.length; i++) {
+ arg,
+ length = args.length;
+ for (i = 0; i < length; i++) {
arg = args[i];
- if (defined(arg)) {
+ if (typeof arg !== 'undefined' && arg !== null) {
return arg;
}
}
@@ -251,15 +266,15 @@
key;
// serialize the declaration
for (key in style) {
- s += hyphenate(key) +':'+ style[key] + ';';
+ s += key +':'+ style[key] + ';';
}
return s;
}
/**
- * Set CSS on a give element
+ * Set CSS on a given element
* @param {Object} el
- * @param {Object} styles
+ * @param {Object} styles Style object with camel case property names
*/
function css (el, styles) {
if (isIE) {
@@ -270,6 +285,23 @@
extend(el.style, styles);
}
+/* *
+ * Get CSS value on a given element
+ * @param {Object} el DOM object
+ * @param {String} styleProp Camel cased CSS propery
+ * /
+function getStyle (el, styleProp) {
+ var ret,
+ CURRENT_STYLE = 'currentStyle',
+ GET_COMPUTED_STYLE = 'getComputedStyle';
+ if (el[CURRENT_STYLE]) {
+ ret = el[CURRENT_STYLE][styleProp];
+ } else if (win[GET_COMPUTED_STYLE]) {
+ ret = win[GET_COMPUTED_STYLE](el, null).getPropertyValue(hyphenate(styleProp));
+ }
+ return ret;
+}*/
+
/**
* Utility function to create element with attributes and styles
* @param {Object} tag
@@ -296,6 +328,141 @@
}
/**
+ * Extend a prototyped class by new members
+ * @param {Object} parent
+ * @param {Object} members
+ */
+function extendClass(parent, members) {
+ var object = function(){};
+ object.prototype = new parent();
+ extend(object.prototype, members);
+ return object;
+}
+
+/**
+ * Format a number and return a string based on input settings
+ * @param {Number} number The input number to format
+ * @param {Number} decimals The amount of decimals
+ * @param {String} decPoint The decimal point, defaults to the one given in the lang options
+ * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
+ */
+function numberFormat (number, decimals, decPoint, thousandsSep) {
+ var lang = defaultOptions.lang,
+ // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
+ n = number, c = isNaN(decimals = mathAbs(decimals)) ? 2 : decimals,
+ d = decPoint === undefined ? lang.decimalPoint : decPoint,
+ t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep, s = n < 0 ? "-" : "",
+ i = String(pInt(n = mathAbs(+n || 0).toFixed(c))),
+ j = i.length > 3 ? i.length % 3 : 0;
+
+ return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
+ (c ? d + mathAbs(n - i).toFixed(c).slice(2) : "");
+}
+
+/**
+ * Based on http://www.php.net/manual/en/function.strftime.php
+ * @param {String} format
+ * @param {Number} timestamp
+ * @param {Boolean} capitalize
+ */
+dateFormat = function (format, timestamp, capitalize) {
+ function pad (number) {
+ return number.toString().replace(/^([0-9])$/, '0$1');
+ }
+
+ if (!defined(timestamp) || isNaN(timestamp)) {
+ return 'Invalid date';
+ }
+ format = pick(format, '%Y-%m-%d %H:%M:%S');
+
+ var date = new Date(timestamp * timeFactor),
+ key, // used in for constuct below
+ // get the basic time values
+ hours = date[getHours](),
+ day = date[getDay](),
+ dayOfMonth = date[getDate](),
+ month = date[getMonth](),
+ fullYear = date[getFullYear](),
+ lang = defaultOptions.lang,
+ langWeekdays = lang.weekdays,
+ langMonths = lang.months,
+ /* // uncomment this and the 'W' format key below to enable week numbers
+ weekNumber = function() {
+ var clone = new Date(date.valueOf()),
+ day = clone[getDay]() == 0 ? 7 : clone[getDay](),
+ dayNumber;
+ clone.setDate(clone[getDate]() + 4 - day);
+ dayNumber = mathFloor((clone.getTime() - new Date(clone[getFullYear](), 0, 1, -6)) / 86400000);
+ return 1 + mathFloor(dayNumber / 7);
+ },
+ */
+
+ // list all format keys
+ replacements = {
+
+ // Day
+ 'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
+ 'A': langWeekdays[day], // Long weekday, like 'Monday'
+ 'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
+ 'e': dayOfMonth, // Day of the month, 1 through 31
+
+ // Week (none implemented)
+ //'W': weekNumber(),
+
+ // Month
+ 'b': langMonths[month].substr(0, 3), // Short month, like 'Jan'
+ 'B': langMonths[month], // Long month, like 'January'
+ 'm': pad(month + 1), // Two digit month number, 01 through 12
+
+ // Year
+ 'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
+ 'Y': fullYear, // Four digits year, like 2009
+
+ // Time
+ 'H': pad(hours), // Two digits hours in 24h format, 00 through 23
+ 'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
+ 'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
+ 'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
+ 'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
+ 'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
+ 'S': pad(date.getSeconds()) // Two digits seconds, 00 through 59
+
+ };
+
+
+ // do the replaces
+ for (key in replacements) {
+ format = format.replace('%'+ key, replacements[key]);
+ }
+
+ // Optionally capitalize the string and return
+ return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
+};
+
+/**
+ * Loop up the node tree and add offsetWidth and offsetHeight to get the
+ * total page offset for a given element. Used by Opera and iOS on hover and
+ * all browsers on point click.
+ *
+ * @param {Object} el
+ *
+ */
+function getPosition (el) {
+ var p = { left: el.offsetLeft, top: el.offsetTop };
+ el = el.offsetParent;
+ while (el) {
+ p.left += el.offsetLeft;
+ p.top += el.offsetTop;
+ if (el !== doc.body && el !== doc.documentElement) {
+ p.left -= el.scrollLeft;
+ p.top -= el.scrollTop;
+ }
+ el = el.offsetParent;
+ }
+ return p;
+}
+
+/**
* Set the global animation to either a given value, or fall back to the
* given chart's animation option
* @param {Object} animation
@@ -321,7 +488,9 @@
* @param {Function} fn
*/
each = function(arr, fn) {
- for (var i = 0, len = arr.length; i < len; i++) {
+ var i = 0,
+ len = arr.length;
+ for (; i < len; i++) {
if (fn.call(arr[i], arr[i], i, arr) === false) {
return i;
}
@@ -340,8 +509,9 @@
*/
map = function(arr, fn){
//return jQuery.map(arr, fn);
- var results = [];
- for (var i = 0, len = arr.length; i < len; i++) {
+ var results = [],
+ i = 0, len = arr.length;
+ for (; i < len; i++) {
results[i] = fn.call(arr[i], arr[i], i, arr);
}
return results;
@@ -440,6 +610,7 @@
$el.stop();
$el.animate(params, options);
+
};
/**
* Stop running animation
@@ -464,7 +635,7 @@
jQ.fx.step._default = function(fx){
var elem = fx.elem;
if (elem.attr) { // is SVG element wrapper
- elem.attr(fx.prop, fx.now);
+ elem.attr(fx.prop, fx.now);
} else {
oldStepDefault.apply(this, arguments);
}
@@ -534,7 +705,7 @@
sixify = function(arr) { // in splines make move points have six parameters like bezier curves
i = arr.length;
while (i--) {
- if (arr[i] == M) {
+ if (arr[i] === M) {
arr.splice(i + 1, 0, arr[i+1], arr[i+2], arr[i+1], arr[i+2]);
}
}
@@ -559,16 +730,18 @@
}
// copy and append last point until the length matches the end length
- endLength = end.length;
- while (start.length < endLength) {
-
- //bezier && sixify(start);
- slice = [].concat(start).splice(start.length - numParams, numParams);
- if (bezier) { // disable first control point
- slice[numParams - 6] = slice[numParams - 2];
- slice[numParams - 5] = slice[numParams - 1];
+ if (start.length) {
+ endLength = end.length;
+ while (start.length < endLength) {
+
+ //bezier && sixify(start);
+ slice = [].concat(start).splice(start.length - numParams, numParams);
+ if (bezier) { // disable first control point
+ slice[numParams - 6] = slice[numParams - 2];
+ slice[numParams - 5] = slice[numParams - 1];
+ }
+ start = start.concat(slice);
}
- start = start.concat(slice);
}
if (startBaseLine) { // append the base lines for areas
@@ -586,10 +759,10 @@
i = start.length,
startVal;
- if (pos == 1) { // land on the final path without adjustment points appended in the ends
+ if (pos === 1) { // land on the final path without adjustment points appended in the ends
ret = complete;
- } else if (i == end.length && pos < 1) {
+ } else if (i === end.length && pos < 1) {
while (i--) {
startVal = parseFloat(start[i]);
ret[i] =
@@ -690,7 +863,8 @@
},*/
style: {
color: '#666',
- fontSize: '11px'
+ fontSize: '11px',
+ lineHeight: '14px'
}
};
@@ -777,10 +951,12 @@
animation: {
duration: 1000
},
+ // connectNulls: false, // docs
//cursor: 'default',
//dashStyle: null,
//enableMouseTracking: true,
events: {},
+ //legendIndex: 0, // docs (+ pie points)
lineWidth: 2,
shadow: true,
// stacking: null,
@@ -910,7 +1086,7 @@
//formatter: defaultFormatter,
shadow: true,
//shared: false,
- snap: 10,
+ snap: hasTouch ? 25 : 10,
style: {
color: '#333333',
fontSize: '12px',
@@ -1021,7 +1197,7 @@
//x: 0,
//y: 0
},
- type: 'linear' // linear or datetime
+ type: 'linear' // linear, logarithmic or datetime // docs
},
defaultYAxisOptions = merge(defaultXAxisOptions, {
@@ -1042,6 +1218,19 @@
title: {
rotation: 270,
text: 'Y-values'
+ },
+ stackLabels: {
+ enabled: false,
+ //align: dynamic,
+ //y: dynamic,
+ //x: dynamic,
+ //verticalAlign: dynamic,
+ //textAlign: dynamic,
+ //rotation: 0,
+ formatter: function() {
+ return this.total;
+ },
+ style: defaultLabelOptions.style
}
}),
@@ -1049,7 +1238,7 @@
labels: {
align: 'right',
x: -8,
- y: 3
+ y: null // docs
},
title: {
rotation: 270
@@ -1059,7 +1248,7 @@
labels: {
align: 'left',
x: 8,
- y: 3
+ y: null // docs
},
title: {
rotation: 90
@@ -1127,6 +1316,10 @@
borderColor: '#000000',
shadow: false
}
+ },
+ dataLabels: {
+ y: null,
+ verticalAlign: null
}
});
defaultPlotOptions.bar = merge(defaultPlotOptions.column, {
@@ -1174,19 +1367,6 @@
/**
- * Extend a prototyped class by new members
- * @param {Object} parent
- * @param {Object} members
- */
-function extendClass(parent, members) {
- var object = function(){};
- object.prototype = new parent();
- extend(object.prototype, members);
- return object;
-}
-
-
-/**
* Handle color operations. The object methods are chainable.
* @param {String} input The input color in either rbga or hex format
*/
@@ -1201,13 +1381,17 @@
function init(input) {
// rgba
- if((result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input))) {
+ result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
+ if (result) {
rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
}
// hex
- else if((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input))) {
- rgba = [pInt(result[1],16), pInt(result[2],16), pInt(result[3],16), 1];
+ else {
+ result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
+ if (result) {
+ rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
+ }
}
}
@@ -1220,9 +1404,9 @@
// it's NaN if gradient colors on a column chart
if (rgba && !isNaN(rgba[0])) {
- if (format == 'rgb') {
+ if (format === 'rgb') {
ret = 'rgb('+ rgba[0] +','+ rgba[1] +','+ rgba[2] +')';
- } else if (format == 'a') {
+ } else if (format === 'a') {
ret = rgba[3];
} else {
ret = 'rgba('+ rgba.join(',') +')';
@@ -1273,120 +1457,6 @@
};
};
-
-
-/**
- * Format a number and return a string based on input settings
- * @param {Number} number The input number to format
- * @param {Number} decimals The amount of decimals
- * @param {String} decPoint The decimal point, defaults to the one given in the lang options
- * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
- */
-function numberFormat (number, decimals, decPoint, thousandsSep) {
- var lang = defaultOptions.lang,
- // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
- n = number, c = isNaN(decimals = mathAbs(decimals)) ? 2 : decimals,
- d = decPoint === undefined ? lang.decimalPoint : decPoint,
- t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep, s = n < 0 ? "-" : "",
- i = pInt(n = mathAbs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;
-
- return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
- (c ? d + mathAbs(n - i).toFixed(c).slice(2) : "");
-}
-
-/**
- * Based on http://www.php.net/manual/en/function.strftime.php
- * @param {String} format
- * @param {Number} timestamp
- * @param {Boolean} capitalize
- */
-dateFormat = function (format, timestamp, capitalize) {
- function pad (number) {
- return number.toString().replace(/^([0-9])$/, '0$1');
- }
-
- if (!defined(timestamp) || isNaN(timestamp)) {
- return 'Invalid date';
- }
- format = pick(format, '%Y-%m-%d %H:%M:%S');
-
- var date = new Date(timestamp * timeFactor),
-
- // get the basic time values
- hours = date[getHours](),
- day = date[getDay](),
- dayOfMonth = date[getDate](),
- month = date[getMonth](),
- fullYear = date[getFullYear](),
- lang = defaultOptions.lang,
- langWeekdays = lang.weekdays,
- langMonths = lang.months,
-
- // list all format keys
- replacements = {
-
- // Day
- 'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
- 'A': langWeekdays[day], // Long weekday, like 'Monday'
- 'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
- 'e': dayOfMonth, // Day of the month, 1 through 31
-
- // Week (none implemented)
-
- // Month
- 'b': langMonths[month].substr(0, 3), // Short month, like 'Jan'
- 'B': langMonths[month], // Long month, like 'January'
- 'm': pad(month + 1), // Two digit month number, 01 through 12
-
- // Year
- 'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
- 'Y': fullYear, // Four digits year, like 2009
-
- // Time
- 'H': pad(hours), // Two digits hours in 24h format, 00 through 23
- 'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
- 'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
- 'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
- 'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
- 'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
- 'S': pad(date.getSeconds()) // Two digits seconds, 00 through 59
-
- };
-
-
- // do the replaces
- for (var key in replacements) {
- format = format.replace('%'+ key, replacements[key]);
- }
-
- // Optionally capitalize the string and return
- return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
-};
-
-
-
-/**
- * Loop up the node tree and add offsetWidth and offsetHeight to get the
- * total page offset for a given element. Used by Opera and iOS on hover and
- * all browsers on point click.
- *
- * @param {Object} el
- *
- */
-function getPosition (el) {
- var p = { left: el.offsetLeft, top: el.offsetTop };
- while ((el = el.offsetParent)) {
- p.left += el.offsetLeft;
- p.top += el.offsetTop;
- if (el != doc.body && el != doc.documentElement) {
- p.left -= el.scrollLeft;
- p.top -= el.scrollTop;
- }
- }
- return p;
-}
-
-
/**
* A wrapper object for SVG elements
*/
@@ -1399,7 +1469,7 @@
* @param {String} nodeName
*/
init: function(renderer, nodeName) {
- this.element = doc.createElementNS('http://www.w3.org/2000/svg', nodeName);
+ this.element = doc.createElementNS(SVG_NS, nodeName);
this.renderer = renderer;
},
/**
@@ -1451,14 +1521,14 @@
// used as a getter: first argument is a string, second is undefined
if (isString(hash)) {
key = hash;
- if (nodeName == 'circle') {
+ if (nodeName === 'circle') {
key = { x: 'cx', y: 'cy' }[key] || key;
- } else if (key == 'strokeWidth') {
+ } else if (key === 'strokeWidth') {
key = 'stroke-width';
}
ret = attr(element, key) || this[key] || 0;
- if (key != 'd' && key != 'visibility') { // 'd' is string in animation step
+ if (key !== 'd' && key !== 'visibility') { // 'd' is string in animation step
ret = parseFloat(ret);
}
@@ -1470,7 +1540,7 @@
value = hash[key];
// paths
- if (key == 'd') {
+ if (key === 'd') {
if (value && value.join) { // join path
value = value.join(' ');
}
@@ -1480,11 +1550,11 @@
this.d = value; // shortcut for animations
// update child tspans x values
- } else if (key == 'x' && nodeName == 'text') {
+ } else if (key === 'x' && nodeName === 'text') {
for (i = 0; i < element.childNodes.length; i++ ) {
child = element.childNodes[i];
// if the x values are equal, the tspan represents a linebreak
- if (attr(child, 'x') == attr(element, 'x')) {
+ if (attr(child, 'x') === attr(element, 'x')) {
//child.setAttribute('x', value);
attr(child, 'x', value);
}
@@ -1496,28 +1566,31 @@
}
// apply gradients
- } else if (key == 'fill') {
+ } else if (key === 'fill') {
value = renderer.color(value, element, key);
// circle x and y
- } else if (nodeName == 'circle' && (key == 'x' || key == 'y')) {
+ } else if (nodeName === 'circle' && (key === 'x' || key === 'y')) {
key = { x: 'cx', y: 'cy' }[key] || key;
// translation and text rotation
- } else if (key == 'translateX' || key == 'translateY' || key == 'rotation') {
+ } else if (key === 'translateX' || key === 'translateY' || key === 'rotation' || key === 'verticalAlign') {
this[key] = value;
this.updateTransform();
skipAttr = true;
// apply opacity as subnode (required by legacy WebKit and Batik)
- } else if (key == 'stroke') {
+ } else if (key === 'stroke') {
value = renderer.color(value, element, key);
// emulate VML's dashstyle implementation
- } else if (key == 'dashstyle') {
+ } else if (key === 'dashstyle') {
key = 'stroke-dasharray';
- if (value) {
- value = value.toLowerCase()
+ value = value && value.toLowerCase();
+ if (value === 'solid') {
+ value = NONE;
+ } else if (value) {
+ value = value
.replace('shortdashdotdot', '3,1,1,1,1,1,')
.replace('shortdashdot', '3,1,1,1')
.replace('shortdot', '1,1,')
@@ -1532,20 +1605,21 @@
while (i--) {
value[i] = pInt(value[i]) * hash['stroke-width'];
}
+
value = value.join(',');
}
// special
- } else if (key == 'isTracker') {
+ } else if (key === 'isTracker') {
this[key] = value;
// IE9/MooTools combo: MooTools returns objects instead of numbers and IE9 Beta 2
// is unable to cast them. Test again with final IE9.
- } else if (key == 'width') {
+ } else if (key === 'width') {
value = pInt(value);
// Text alignment
- } else if (key == 'align') {
+ } else if (key === 'align') {
key = 'text-anchor';
value = { left: 'start', center: 'middle', right: 'end' }[value];
}
@@ -1553,12 +1627,12 @@
// jQuery animate changes case
- if (key == 'strokeWidth') {
+ if (key === 'strokeWidth') {
key = 'stroke-width';
}
// Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461)
- if (isWebKit && key == 'stroke-width' && value === 0) {
+ if (isWebKit && key === 'stroke-width' && value === 0) {
value = 0.000001;
}
@@ -1581,15 +1655,22 @@
}
}
-
+ // validate heights
+ if ((key === 'width' || key === 'height') && nodeName === 'rect' && value < 0) {
+ value = 0;
+ }
- if (key == 'text') {
+ if (key === 'text') {
// only one node allowed
- renderer.buildText(element, value);
+ this.textStr = value;
+ if (this.added) {
+ renderer.buildText(this);
+ }
} else if (!skipAttr) {
//element.setAttribute(key, value);
attr(element, key, value);
}
+
}
}
@@ -1605,17 +1686,16 @@
symbolAttr: function(hash) {
var wrapper = this;
- wrapper.x = pick(hash.x, wrapper.x);
- wrapper.y = parseFloat(pick(hash.y, wrapper.y)); // mootools animation bug needs parseFloat
- wrapper.r = pick(hash.r, wrapper.r);
- wrapper.start = pick(hash.start, wrapper.start);
- wrapper.end = pick(hash.end, wrapper.end);
- wrapper.width = pick(hash.width, wrapper.width);
- wrapper.height = parseFloat(pick(hash.height, wrapper.height));
- wrapper.innerR = pick(hash.innerR, wrapper.innerR);
+ each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR'], function(key) {
+ wrapper[key] = pick(hash[key], wrapper[key]);
+ });
wrapper.attr({
- d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.r, {
+ d: wrapper.renderer.symbols[wrapper.symbolName](
+ mathRound(wrapper.x * 2) / 2, // Round to halves. Issue #274.
+ mathRound(wrapper.y * 2) / 2,
+ wrapper.r,
+ {
start: wrapper.start,
end: wrapper.end,
width: wrapper.width,
@@ -1629,8 +1709,44 @@
* Apply a clipping path to this object
* @param {String} id
*/
- clip: function(clipRect) {
- return this.attr('clip-path', 'url('+ this.renderer.url +'#'+ clipRect.id +')');
+ clip: function(clipRect) {
+ return this.attr('clip-path', 'url('+ this.renderer.url +'#'+ clipRect.id +')');
+ },
+
+ /**
+ * Calculate the coordinates needed for drawing a rectangle crisply and return the
+ * calculated attributes
+ * @param {Number} strokeWidth
+ * @param {Number} x
+ * @param {Number} y
+ * @param {Number} width
+ * @param {Number} height
+ */
+ crisp: function(strokeWidth, x, y, width, height) {
+
+ var wrapper = this,
+ key,
+ attr = {},
+ values = {},
+ normalizer;
+
+ strokeWidth = strokeWidth || wrapper.strokeWidth || 0;
+ normalizer = strokeWidth % 2 / 2;
+
+ // normalize for crisp edges
+ values.x = mathFloor(x || wrapper.x || 0) + normalizer;
+ values.y = mathFloor(y || wrapper.y || 0) + normalizer;
+ values.width = mathFloor((width || wrapper.width || 0) - 2 * normalizer);
+ values.height = mathFloor((height || wrapper.height || 0) - 2 * normalizer);
+ values.strokeWidth = strokeWidth;
+
+ for (key in values) {
+ if (wrapper[key] !== values[key]) { // only set attribute if changed
+ wrapper[key] = attr[key] = values[key];
+ }
+ }
+
+ return attr;
},
/**
@@ -1638,8 +1754,12 @@
* @param {Object} styles
*/
css: function(styles) {
- var elemWrapper = this;
-
+ var elemWrapper = this,
+ elem = elemWrapper.element,
+ textWidth = styles && styles.width && elem.nodeName === 'text',
+ camelStyles = styles,
+ n;
+
// convert legacy
if (styles && styles.color) {
styles.fill = styles.color;
@@ -1651,14 +1771,36 @@
styles
);
- // serialize and set style attribute
- elemWrapper.attr({
- style: serializeCSS(styles)
- });
// store object
elemWrapper.styles = styles;
+ // hyphenate
+ if (defined(styles)) {
+ styles = {};
+ for (n in camelStyles) {
+ styles[hyphenate(n)] = camelStyles[n];
+ }
+ }
+
+ // serialize and set style attribute
+ if (isIE && !hasSVG) { // legacy IE doesn't support setting style attribute
+ if (textWidth) {
+ delete styles.width;
+ }
+ css(elemWrapper.element, styles);
+ } else {
+ elemWrapper.attr({
+ style: serializeCSS(styles)
+ });
+ }
+
+
+ // re-build text
+ if (textWidth && elemWrapper.added) {
+ elemWrapper.renderer.buildText(elemWrapper);
+ }
+
return elemWrapper;
},
@@ -1668,8 +1810,17 @@
* @param {Function} handler
*/
on: function(eventType, handler) {
+ var fn = handler;
+ // touch
+ if (hasTouch && eventType === 'click') {
+ eventType = 'touchstart';
+ fn = function(e) {
+ e.preventDefault();
+ handler();
+ };
+ }
// simplest possible event model for internal use
- this.element['on'+ eventType] = handler;
+ this.element['on'+ eventType] = fn;
return this;
},
@@ -1750,19 +1901,20 @@
*
*/
align: function(alignOptions, alignByTranslate, box) {
+ var elemWrapper = this;
if (!alignOptions) { // called on resize
- alignOptions = this.alignOptions;
- alignByTranslate = this.alignByTranslate;
+ alignOptions = elemWrapper.alignOptions;
+ alignByTranslate = elemWrapper.alignByTranslate;
} else { // first call on instanciate
- this.alignOptions = alignOptions;
- this.alignByTranslate = alignByTranslate;
+ elemWrapper.alignOptions = alignOptions;
+ elemWrapper.alignByTranslate = alignByTranslate;
if (!box) { // boxes other than renderer handle this internally
- this.renderer.alignedObjects.push(this);
+ elemWrapper.renderer.alignedObjects.push(elemWrapper);
}
}
- box = pick(box, this.renderer);
+ box = pick(box, elemWrapper.renderer);
var align = alignOptions.align,
vAlign = alignOptions.verticalAlign,
@@ -1776,7 +1928,7 @@
x += (box.width - (alignOptions.width || 0) ) /
{ right: 1, center: 2 }[align];
}
- attribs[alignByTranslate ? 'translateX' : 'x'] = x;
+ attribs[alignByTranslate ? 'translateX' : 'x'] = mathRound(x);
// vertical align
@@ -1785,20 +1937,21 @@
({ bottom: 1, middle: 2 }[vAlign] || 1);
}
- attribs[alignByTranslate ? 'translateY' : 'y'] = y;
+ attribs[alignByTranslate ? 'translateY' : 'y'] = mathRound(y);
// animate only if already placed
- this[this.placed ? 'animate' : 'attr'](attribs);
- this.placed = true;
+ elemWrapper[elemWrapper.placed ? 'animate' : 'attr'](attribs);
+ elemWrapper.placed = true;
+ elemWrapper.alignAttr = attribs;
- return this;
+ return elemWrapper;
},
/**
* Get the bounding box (width, height, x and y) for the element
*/
getBBox: function() {
- var bBox,
+ var bBox,
width,
height,
rotation = this.rotation,
@@ -1870,6 +2023,11 @@
// mark as inverted
this.parentInverted = parent && parent.inverted;
+ // build formatted text
+ if (this.textStr !== undefined) {
+ renderer.buildText(this);
+ }
+
// mark the container as having z indexed children
if (zIndex) {
parentWrapper.handleZ = true;
@@ -1881,7 +2039,7 @@
for (i = 0; i < childNodes.length; i++) {
otherElement = childNodes[i];
otherZIndex = attr(otherElement, 'zIndex');
- if (otherElement != element && (
+ if (otherElement !== element && (
// insert before the first element with a higher zIndex
pInt(otherZIndex) > zIndex ||
// if no zIndex given, insert before the first element with a zIndex
@@ -1896,10 +2054,12 @@
// default: append at the end
parentNode.appendChild(element);
+
+ this.added = true;
+
return this;
},
-
/**
* Destroy the element and element wrapper
*/
@@ -1956,7 +2116,7 @@
* Add a shadow to the element. Must be done after the element is added to the DOM
* @param {Boolean} apply
*/
- shadow: function(apply) {
+ shadow: function(apply, group) {
var shadows = [],
i,
shadow,
@@ -1978,8 +2138,11 @@
'fill': NONE
});
-
- element.parentNode.insertBefore(shadow, element);
+ if (group) {
+ group.element.appendChild(shadow);
+ } else {
+ element.parentNode.insertBefore(shadow, element);
+ }
shadows.push(shadow);
}
@@ -1991,8 +2154,6 @@
}
};
-
-
/**
* The default SVG renderer
*/
@@ -2000,21 +2161,24 @@
this.init.apply(this, arguments);
};
SVGRenderer.prototype = {
+
+ Element: SVGElement,
+
/**
* Initialize the SVGRenderer
* @param {Object} container
* @param {Number} width
* @param {Number} height
+ * @param {Boolean} forExport
*/
- init: function(container, width, height) {
+ init: function(container, width, height, forExport) {
var renderer = this,
loc = location,
boxWrapper;
- renderer.Element = SVGElement;
boxWrapper = renderer.createElement('svg')
.attr({
- xmlns: 'http://www.w3.org/2000/svg',
+ xmlns: SVG_NS,
version: '1.1'
});
container.appendChild(boxWrapper.element);
@@ -2025,6 +2189,7 @@
renderer.alignedObjects = [];
renderer.url = isIE ? '' : loc.href.replace(/#.*?$/, ''); // page url used for internal references
renderer.defs = this.createElement('defs').add();
+ renderer.forExport = forExport;
renderer.setSize(width, height, false);
@@ -2046,39 +2211,48 @@
* Parse a simple HTML string into SVG tspans
*
* @param {Object} textNode The parent text SVG node
- * @param {String} str
*/
- buildText: function(textNode, str) {
- var lines = str.toString()
+ buildText: function(wrapper) {
+ var textNode = wrapper.element,
+ lines = pick(wrapper.textStr, '').toString()
.replace(/<(b|strong)>/g, '<span style="font-weight:bold">')
.replace(/<(i|em)>/g, '<span style="font-style:italic">')
.replace(/<a/g, '<span')
.replace(/<\/(b|strong|i|em|a)>/g, '</span>')
- .split(/<br[^>]?>/g),
+ .split(/<br.*?>/g),
childNodes = textNode.childNodes,
styleRegex = /style="([^"]+)"/,
hrefRegex = /href="([^"]+)"/,
parentX = attr(textNode, 'x'),
+ textStyles = wrapper.styles,
+ reverse = isFirefox && textStyles && textStyles['-hc-direction'] === 'rtl' &&
+ !this.forExport && pInt(userAgent.split('Firefox/')[1]) < 4, // issue #38
+ arr,
+ width = textStyles && pInt(textStyles.width),
+ textLineHeight = textStyles && textStyles['line-height'],
lastLine,
+ GET_COMPUTED_STYLE = 'getComputedStyle',
i = childNodes.length;
-
-
+
// remove old text
while (i--) {
textNode.removeChild(childNodes[i]);
}
+ if (width && !wrapper.added) {
+ this.box.appendChild(textNode); // attach it to the DOM to read offset width
+ }
each(lines, function(line, lineNo) {
- var spans, spanNo = 0;
+ var spans, spanNo = 0, lineHeight;
line = line.replace(/<span/g, '|||<span').replace(/<\/span>/g, '</span>|||');
spans = line.split('|||');
each(spans, function (span) {
- if (span !== '' || spans.length == 1) {
+ if (span !== '' || spans.length === 1) {
var attributes = {},
- tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');
+ tspan = doc.createElementNS(SVG_NS, 'tspan');
if (styleRegex.test(span)) {
attr(
tspan,
@@ -2091,9 +2265,23 @@
css(tspan, { cursor: 'pointer' });
}
- span = span.replace(/<(.|\n)*?>/g, '');
- tspan.appendChild(doc.createTextNode(span || ' ')); // WebKit needs a string
- //console.log('"'+tspan.textContent+'"');
+ span = (span.replace(/<(.|\n)*?>/g, '') || ' ')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+
+ // issue #38 workaround.
+ if (reverse) {
+ arr = [];
+ i = span.length;
+ while (i--) {
+ arr.push(span.charAt(i));
+ }
+ span = arr.join('');
+ }
+
+ // add the text node
+ tspan.appendChild(doc.createTextNode(span));
+
if (!spanNo) { // first span in a line, align it to the left
attributes.x = parentX;
} else {
@@ -2101,13 +2289,24 @@
attributes.dx = 3; // space
}
-
// first span on subsequent line, add the line height
if (!spanNo) {
if (lineNo) {
- attr(tspan, 'dy', pInt(lastLine.offsetHeight ||
- window.getComputedStyle(lastLine, null).getPropertyValue('line-height') ||
- 18));
+
+ // allow getting the right offset height in exporting in IE
+ if (!hasSVG && wrapper.renderer.forExport) {
+ css(tspan, { display: 'block' });
+ }
+
+ // Webkit and opera sometimes return 'normal' as the line height. In that
+ // case, webkit uses offsetHeight, while Opera falls back to 18
+ lineHeight = win[GET_COMPUTED_STYLE] &&
+ win[GET_COMPUTED_STYLE](lastLine, null).getPropertyValue('line-height');
+
+ if (!lineHeight || isNaN(lineHeight)) {
+ lineHeight = textLineHeight || lastLine.offsetHeight || 18;
+ }
+ attr(tspan, 'dy', lineHeight);
}
lastLine = tspan; // record for use in next line
}
@@ -2119,10 +2318,46 @@
textNode.appendChild(tspan);
spanNo++;
+
+ // check width and apply soft breaks
+ if (width) {
+ var words = span.replace(/-/g, '- ').split(' '),
+ tooLong,
+ actualWidth,
+ rest = [];
+
+ while (words.length || rest.length) {
+ actualWidth = textNode.getBBox().width;
+ tooLong = actualWidth > width;
+ if (!tooLong || words.length === 1) { // new line needed
+ words = rest;
+ rest = [];
+ if (words.length) {
+ tspan = doc.createElementNS(SVG_NS, 'tspan');
+ attr(tspan, {
+ dy: textLineHeight || 16,
+ x: parentX
+ });
+ textNode.appendChild(tspan);
+
+ if (actualWidth > width) { // a single word is pressing it out
+ width = actualWidth;
+ }
+ }
+ } else { // append to existing line tspan
+ tspan.removeChild(tspan.firstChild);
+ rest.unshift(words.pop());
+ }
+ if (words.length) {
+ tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g, '-')));
+ }
+ }
+ }
}
});
-
});
+
+
},
/**
@@ -2133,10 +2368,10 @@
crispLine: function(points, width) {
// points format: [M, 0, 0, L, 100, 0]
// normalize to a crisp line
- if (points[1] == points[4]) {
+ if (points[1] === points[4]) {
points[1] = points[4] = mathRound(points[1]) + (width % 2 / 2);
}
- if (points[2] == points[5]) {
+ if (points[2] === points[5]) {
points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2);
}
return points;
@@ -2211,31 +2446,21 @@
* @param {Number} strokeWidth A stroke width can be supplied to allow crisp drawing
*/
rect: function (x, y, width, height, r, strokeWidth) {
-
- if (arguments.length > 1) {
- var normalizer = (strokeWidth || 0) % 2 / 2;
-
- // normalize for crisp edges
- x = mathRound(x || 0) + normalizer;
- y = mathRound(y || 0) + normalizer;
- width = mathRound((width || 0) - 2 * normalizer);
- height = mathRound((height || 0) - 2 * normalizer);
+ if (isObject(x)) {
+ y = x.y;
+ width = x.width;
+ height = x.height;
+ r = x.r;
+ strokeWidth = x.strokeWidth;
+ x = x.x;
}
-
- var attr = isObject(x) ?
- x : // the attributes can be passed as the first argument
- {
- x: x,
- y: y,
- width: mathMax(width, 0),
- height: mathMax(height, 0)
- };
-
- return this.createElement('rect').attr(extend(attr, {
- rx: r || attr.r,
- ry: r || attr.r,
+ var wrapper = this.createElement('rect').attr({
+ rx: r,
+ ry: r,
fill: NONE
- }));
+ });
+
+ return wrapper.attr(wrapper.crisp(strokeWidth, x, y, mathMax(width, 0), mathMax(height, 0)));
},
/**
@@ -2301,8 +2526,14 @@
elemWrapper = this.createElement('image').attr(attribs);
// set the href in the xlink namespace
- elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink',
- 'href', src);
+ if (elemWrapper.element.setAttributeNS) {
+ elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink',
+ 'href', src);
+ } else {
+ // could be exporting in IE
+ // using href throws "not supported" in ie7 and under, requries regex shim to fix later
+ elemWrapper.element.setAttribute('hc-svg-href', src);
+ }
return elemWrapper;
},
@@ -2325,14 +2556,15 @@
// check if there's a path defined for this symbol
path = symbolFn && symbolFn(
- x,
- y,
+ mathRound(x),
+ mathRound(y),
radius,
options
),
imageRegex = /^url\((.*?)\)$/,
- imageSrc;
+ imageSrc,
+ imageSize;
if (path) {
@@ -2352,7 +2584,18 @@
// image symbols
} else if (imageRegex.test(symbol)) {
+ var centerImage = function(img, size) {
+ img.attr({
+ width: size[0],
+ height: size[1]
+ }).translate(
+ -mathRound(size[0] / 2),
+ -mathRound(size[1] / 2)
+ );
+ };
+
imageSrc = symbol.match(imageRegex)[1];
+ imageSize = symbolSizes[imageSrc];
// create the image synchronously, add attribs async
obj = this.image(imageSrc)
@@ -2360,22 +2603,22 @@
x: x,
y: y
});
-
- // create a dummy JavaScript image to get the width and height
- createElement('img', {
- onload: function() {
- var img = this,
- size = symbolSizes[img.src] || [img.width, img.height];
- obj.attr({
- width: size[0],
- height: size[1]
- }).translate(
- -mathRound(size[0] / 2),
- -mathRound(size[1] / 2)
- );
- },
- src: imageSrc
- });
+
+ if (imageSize) {
+ centerImage(obj, imageSize);
+ } else {
+ // initialize image to be 0 size so export will still function if there's no cached sizes
+ obj.attr({ width: 0, height: 0 });
+
+ // create a dummy JavaScript image to get the width and height
+ createElement('img', {
+ onload: function() {
+ var img = this;
+ centerImage(obj, symbolSizes[imageSrc] = [img.width, img.height]);
+ },
+ src: imageSrc
+ });
+ }
// default circles
} else {
@@ -2552,9 +2795,6 @@
* @param {String} str
* @param {Number} x Left position
* @param {Number} y Top position
- * @param {Object} style CSS styles for the text
- * @param {Nubmer} rotation Rotation in degrees
- * @param {String} align Left, center or right
*/
text: function(str, x, y) {
@@ -2569,7 +2809,7 @@
.attr({
x: x,
y: y,
- text: str
+ text: str
})
.css({
'font-family': defaultChartStyle.fontFamily,
@@ -2582,6 +2822,8 @@
}
}; // end SVGRenderer
+// general renderer
+Renderer = SVGRenderer;
@@ -2612,18 +2854,18 @@
style = ['position: ', ABSOLUTE, ';'];
// divs and shapes need size
- if (nodeName == 'shape' || nodeName == DIV) {
+ if (nodeName === 'shape' || nodeName === DIV) {
style.push('left:0;top:0;width:10px;height:10px;');
}
if (docMode8) {
- style.push('visibility: ', nodeName == DIV ? HIDDEN : VISIBLE);
+ style.push('visibility: ', nodeName === DIV ? HIDDEN : VISIBLE);
}
markup.push(' style="', style.join(''), '"/>');
// create element with default attributes and style
if (nodeName) {
- markup = nodeName == DIV || nodeName == 'span' || nodeName == 'img' ?
+ markup = nodeName === DIV || nodeName === 'span' || nodeName === 'img' ?
markup.join('')
: renderer.prepVML(markup);
this.element = createElement(markup);
@@ -2654,6 +2896,11 @@
renderer.invertChild(element, parentNode);
}
+ // issue #140 workaround - related to #61 and #74
+ if (docMode8 && parentNode.gVis === HIDDEN) {
+ css(element, { visibility: HIDDEN });
+ }
+
// append it
parentNode.appendChild(element);
@@ -2661,7 +2908,7 @@
wrapper.added = true;
if (wrapper.alignOnAdd) {
wrapper.updateTransform();
- }
+ }
return wrapper;
},
@@ -2694,7 +2941,7 @@
// used as a getter, val is undefined
if (isString(hash)) {
key = hash;
- if (key == 'strokeWidth' || key == 'stroke-width') {
+ if (key === 'strokeWidth' || key === 'stroke-width') {
ret = this.strokeweight;
} else {
ret = this[key];
@@ -2713,7 +2960,6 @@
// check all the others only once for each call to an element's
// .attr() method
if (!hasSetSymbolSize) {
-
this.symbolAttr(hash);
hasSetSymbolSize = true;
@@ -2721,7 +2967,7 @@
skipAttr = true;
- } else if (key == 'd') {
+ } else if (key === 'd') {
value = value || [];
this.d = value.join(' '); // used in getter for animation
@@ -2737,7 +2983,7 @@
convertedPath[i] = mathRound(value[i] * 10) - 5;
}
// close the path
- else if (value[i] == 'Z') {
+ else if (value[i] === 'Z') {
convertedPath[i] = 'x';
}
else {
@@ -2745,7 +2991,7 @@
}
}
- value = convertedPath.join(' ') || 'x';
+ value = convertedPath.join(' ') || 'x';
element.path = value;
// update shadows
@@ -2758,16 +3004,17 @@
skipAttr = true;
// directly mapped to css
- } else if (key == 'zIndex' || key == 'visibility') {
+ } else if (key === 'zIndex' || key === 'visibility') {
// issue 61 workaround
- if (docMode8 && key == 'visibility' && nodeName == 'DIV') {
+ if (docMode8 && key === 'visibility' && nodeName === 'DIV') {
+ element.gVis = value;
childNodes = element.childNodes;
i = childNodes.length;
while (i--) {
css(childNodes[i], { visibility: value });
}
- if (value == VISIBLE) { // issue 74
+ if (value === VISIBLE) { // issue 74
value = null;
}
}
@@ -2801,7 +3048,7 @@
this[key] = value; // used in getter
- if (element.tagName == 'SPAN') {
+ if (element.tagName === 'SPAN') {
this.updateTransform();
} else {
@@ -2809,19 +3056,19 @@
}
// class name
- } else if (key == 'class') {
+ } else if (key === 'class') {
// IE8 Standards mode has problems retrieving the className
element.className = value;
// stroke
- } else if (key == 'stroke') {
+ } else if (key === 'stroke') {
value = renderer.color(value, element, key);
key = 'strokecolor';
// stroke width
- } else if (key == 'stroke-width' || key == 'strokeWidth') {
+ } else if (key === 'stroke-width' || key === 'strokeWidth') {
element.stroked = value ? true : false;
key = 'strokeweight';
this[key] = value; // used in getter, issue #113
@@ -2830,7 +3077,7 @@
}
// dashStyle
- } else if (key == 'dashstyle') {
+ } else if (key === 'dashstyle') {
var strokeElem = element.getElementsByTagName('stroke')[0] ||
createElement(renderer.prepVML(['<stroke/>']), null, null, element);
strokeElem[key] = value || 'solid';
@@ -2839,12 +3086,12 @@
skipAttr = true;
// fill
- } else if (key == 'fill') {
+ } else if (key === 'fill') {
- if (nodeName == 'SPAN') { // text color
+ if (nodeName === 'SPAN') { // text color
elemStyle.color = value;
} else {
- element.filled = value != NONE ? true : false;
+ element.filled = value !== NONE ? true : false;
value = renderer.color(value, element, key);
@@ -2852,8 +3099,8 @@
}
// translation for animation
- } else if (key == 'translateX' || key == 'translateY' || key == 'rotation' || key == 'align') {
- if (key == 'align') {
+ } else if (key === 'translateX' || key === 'translateY' || key === 'rotation' || key === 'align') {
+ if (key === 'align') {
key = 'textAlign';
}
this[key] = value;
@@ -2863,14 +3110,15 @@
}
// text for rotated and non-rotated elements
- else if (key == 'text') {
+ else if (key === 'text') {
+ this.bBox = null;
element.innerHTML = value;
skipAttr = true;
}
// let the shadow follow the main element
- if (shadows && key == 'visibility') {
+ if (shadows && key === 'visibility') {
i = shadows.length;
while (i--) {
shadows[i].style[key] = value;
@@ -2898,12 +3146,11 @@
*/
clip: function(clipRect) {
var wrapper = this,
- clipMembers = clipRect.members,
- index = clipMembers.length;
+ clipMembers = clipRect.members;
clipMembers.push(wrapper);
wrapper.destroyClip = function() {
- clipMembers.splice(index, 1);
+ erase(clipMembers, wrapper);
};
return wrapper.css(clipRect.getCSS(wrapper.inverted));
},
@@ -2913,8 +3160,23 @@
* @param {Object} styles
*/
css: function(styles) {
- var wrapper = this;
+ var wrapper = this,
+ element = wrapper.element,
+ textWidth = styles && element.tagName === 'SPAN' && styles.width;
+
+ /*if (textWidth) {
+ extend(styles, {
+ display: 'block',
+ whiteSpace: 'normal'
+ });
+ }*/
+ if (textWidth) {
+ delete styles.width;
+ wrapper.textWidth = textWidth;
+ wrapper.updateTransform();
+ }
+ wrapper.styles = extend(wrapper.styles, styles);
css(wrapper.element, styles);
return wrapper;
@@ -2930,7 +3192,7 @@
wrapper.destroyClip();
}
- SVGElement.prototype.destroy.apply(this);
+ SVGElement.prototype.destroy.apply(wrapper);
},
/**
@@ -2955,32 +3217,25 @@
*/
getBBox: function() {
- var element = this.element;
- /*bBox,
- hasOffsetWidth = element.offsetWidth,
- origParentNode = element.parentNode;
-
- if (!hasOffsetWidth) {
- doc.body.appendChild(element);
- }
- */
- return {
- x: element.offsetLeft,
- y: element.offsetTop,
- width: element.offsetWidth,
- height: element.offsetHeight
- };
+ var wrapper = this,
+ element = wrapper.element,
+ bBox = wrapper.bBox;
- /*if (!hasOffsetWidth) {
- if (origParentNode) {
- origParentNode.appendChild(element);
- } else {
- doc.body.removeChild(element);
+ if (!bBox) {
+ // faking getBBox in exported SVG in legacy IE
+ if (element.nodeName === 'text') {
+ element.style.position = ABSOLUTE;
}
- }
-
- return bBox;*/
+ bBox = wrapper.bBox = {
+ x: element.offsetLeft,
+ y: element.offsetTop,
+ width: element.offsetWidth,
+ height: element.offsetHeight
+ };
+ }
+ return bBox;
+
},
/**
@@ -3000,31 +3255,25 @@
/**
- * Private method to update elements based on internal
+ * VML override private method to update elements based on internal
* properties based on SVG transform
*/
- updateTransform: function(hash) {
+ updateTransform: function(hash) {
// aligning non added elements is expensive
if (!this.added) {
this.alignOnAdd = true;
return;
}
-
var wrapper = this,
elem = wrapper.element,
translateX = wrapper.translateX || 0,
translateY = wrapper.translateY || 0,
x = wrapper.x || 0,
y = wrapper.y || 0,
- rotation = wrapper.rotation || 0,
- radians = rotation * deg2rad, // deg to rad
- costheta = mathCos(radians),
- sintheta = mathSin(radians),
align = wrapper.textAlign || 'left',
- alignCorrection = { right: 1, center: 2 }[align],
- nonLeft = align && align != 'left';
-
+ alignCorrection = { left: 0, center: 0.5, right: 1 }[align],
+ nonLeft = align && align !== 'left';
// apply translate
if (translateX || translateY) {
@@ -3041,34 +3290,83 @@
});
}
- if (elem.tagName == 'SPAN') {
- // Adjust for alignment and rotation.
- // Test case: http://highcharts.com/tests/?file=text-rotation
- css(elem, {
- filter: rotation ? ['progid:DXImageTransform.Microsoft.Matrix(M11=', costheta,
- ', M12=', -sintheta, ', M21=', sintheta, ', M22=', costheta,
- ', sizingMethod=\'auto expand\')'].join('') : NONE
- });
-
- var width = elem.offsetWidth,
- height = elem.offsetHeight,
- lineHeight = mathRound(pInt(elem.style.fontSize || 12) * 1.2);
-
- // correct x and y
- x += width * mathMin(costheta, 0) + mathMin(sintheta, 0) * lineHeight;
- y += height * mathMin(sintheta, 0) - mathMax(costheta, 0) * lineHeight;
-
- if (nonLeft) {
- x -= width / alignCorrection * costheta;
- y -= height / alignCorrection * sintheta;
+ if (elem.tagName === 'SPAN') {
+
+ var width, height,
+ rotation = wrapper.rotation,
+ lineHeight,
+ radians = 0,
+ costheta = 1,
+ sintheta = 0,
+ quad,
+ textWidth = pInt(wrapper.textWidth),
+ xCorr = wrapper.xCorr || 0,
+ yCorr = wrapper.yCorr || 0,
+ currentTextTransform = [rotation, align, elem.innerHTML, wrapper.textWidth].join(',');
+
+ if (currentTextTransform !== wrapper.cTT) { // do the calculations and DOM access only if properties changed
+
+ if (defined(rotation)) {
+ radians = rotation * deg2rad; // deg to rad
+ costheta = mathCos(radians);
+ sintheta = mathSin(radians);
+
+ // Adjust for alignment and rotation.
+ // Test case: http://highcharts.com/tests/?file=text-rotation
+ css(elem, {
+ filter: rotation ? ['progid:DXImageTransform.Microsoft.Matrix(M11=', costheta,
+ ', M12=', -sintheta, ', M21=', sintheta, ', M22=', costheta,
+ ', sizingMethod=\'auto expand\')'].join('') : NONE
+ });
+ }
+
+ width = elem.offsetWidth;
+ height = elem.offsetHeight;
+
+ // update textWidth
+ if (width > textWidth) {
+ css(elem, {
+ width: textWidth +PX,
+ display: 'block',
+ whiteSpace: 'normal'
+ });
+ width = textWidth;
+ }
+
+ // correct x and y
+ lineHeight = mathRound((pInt(elem.style.fontSize) || 12) * 1.2);
+ xCorr = costheta < 0 && -width;
+ yCorr = sintheta < 0 && -height;
+
+ // correct for lineHeight and corners spilling out after rotation
+ quad = costheta * sintheta < 0;
+ xCorr += sintheta * lineHeight * (quad ? 1 - alignCorrection : alignCorrection);
+ yCorr -= costheta * lineHeight * (rotation ? (quad ? alignCorrection : 1 - alignCorrection) : 1);
+
+ // correct for the length/height of the text
+ if (nonLeft) {
+ xCorr -= width * alignCorrection * (costheta < 0 ? -1 : 1);
+ if (rotation) {
+ yCorr -= height * alignCorrection * (sintheta < 0 ? -1 : 1);
+ }
+ css(elem, {
+ textAlign: align
+ });
+ }
+
+ // record correction
+ wrapper.xCorr = xCorr;
+ wrapper.yCorr = yCorr;
}
+ // apply position with correction
css(elem, {
- textAlign: align,
- left: x,
- top: y
+ left: x + xCorr,
+ top: y + yCorr
});
+ // record current text transform
+ wrapper.cTT = currentTextTransform;
}
},
@@ -3076,7 +3374,7 @@
* Apply a drop shadow by copying elements and giving them different strokes
* @param {Boolean} apply
*/
- shadow: function(apply) {
+ shadow: function(apply, group) {
var shadows = [],
i,
element = this.element,
@@ -3086,8 +3384,8 @@
markup,
path = element.path;
- // the path is some mysterious string-like object that can be cast to a string
- if (''+ element.path === '') {
+ // some times empty paths are not strings
+ if (path && typeof path.value !== 'string') {
path = 'x';
}
@@ -3109,7 +3407,11 @@
// insert it
- element.parentNode.insertBefore(shadow, element);
+ if (group) {
+ group.element.appendChild(shadow);
+ } else {
+ element.parentNode.insertBefore(shadow, element);
+ }
// record it
shadows.push(shadow);
@@ -3131,6 +3433,7 @@
};
VMLRenderer.prototype = merge( SVGRenderer.prototype, { // inherit SVGRenderer
+ Element: VMLElement,
isIE8: userAgent.indexOf('MSIE 8.0') > -1,
@@ -3144,7 +3447,6 @@
var renderer = this,
boxWrapper;
- renderer.Element = VMLElement;
renderer.alignedObjects = [];
boxWrapper = renderer.createElement(DIV);
@@ -3289,7 +3591,7 @@
// if the color is an rgba color, split it and add a fill node
// to hold the opacity component
- } else if (regexRgba.test(color) && elem.tagName != 'IMG') {
+ } else if (regexRgba.test(color) && elem.tagName !== 'IMG') {
colorObject = Color(color);
@@ -3317,7 +3619,7 @@
if (isIE8) { // add xmlns and style inline
markup = markup.replace('/>', ' xmlns="urn:schemas-microsoft-com:vml" />');
- if (markup.indexOf('style="') == -1) {
+ if (markup.indexOf('style="') === -1) {
markup = markup.replace('/>', ' style="'+ vmlStyle +'" />');
} else {
markup = markup.replace('style="', 'style="'+ vmlStyle);
@@ -3374,7 +3676,7 @@
* @param {Number} r
*/
circle: function(x, y, r) {
- return this.path(this.symbols.circle(x, y, r));
+ return this.symbol('circle').attr({ x: x, y: y, r: r});
},
/**
@@ -3426,29 +3728,19 @@
* VML uses a shape for rect to overcome bugs and rotation problems
*/
rect: function(x, y, width, height, r, strokeWidth) {
- // todo: share this code with SVG
- if (arguments.length > 1) {
- var normalizer = (strokeWidth || 0) % 2 / 2;
-
- // normalize for crisp edges
- x = mathRound(x || 0) + normalizer;
- y = mathRound(y || 0) + normalizer;
- width = mathRound((width || 0) - 2 * normalizer);
- height = mathRound((height || 0) - 2 * normalizer);
- }
- if (isObject(x)) { // the attributes can be passed as the first argument
+ if (isObject(x)) {
y = x.y;
width = x.width;
height = x.height;
r = x.r;
+ strokeWidth = x.strokeWidth;
x = x.x;
- }
+ }
+ var wrapper = this.symbol('rect');
+ wrapper.r = r;
- return this.symbol('rect', x || 0, y || 0, r || 0, {
- width: width || 0,
- height: height || 0
- });
+ return wrapper.attr(wrapper.crisp(strokeWidth, x, y, mathMax(width, 0), mathMax(height, 0)));
},
/**
@@ -3480,14 +3772,19 @@
sinStart = mathSin(start),
cosEnd = mathCos(end),
sinEnd = mathSin(end),
- innerRadius = options.innerR;
+ innerRadius = options.innerR,
+ circleCorrection = 0.07 / radius,
+ innerCorrection = (innerRadius && 0.1 / innerRadius) || 0;
if (end - start === 0) { // no angle, don't show it.
return ['x'];
- } else if (end - start == 2 * mathPI) { // full circle
+ //} else if (end - start == 2 * mathPI) { // full circle
+ } else if (2 * mathPI - end + start < circleCorrection) { // full circle
// empirical correction found by trying out the limits for different radii
- cosEnd = -0.07 / radius;
+ cosEnd = - circleCorrection;
+ } else if (end - start < innerCorrection) { // issue #186, another mysterious VML arc problem
+ cosEnd = mathCos(start + innerCorrection);
}
return [
@@ -3537,13 +3834,16 @@
* Add rectangle symbol path which eases rotation and omits arcsize problems
* compared to the built-in VML roundrect shape
*
- * @param {Object} left Left position
- * @param {Object} top Top position
- * @param {Object} r Border radius
+ * @param {Number} left Left position
+ * @param {Number} top Top position
+ * @param {Number} r Border radius
* @param {Object} options Width and height
*/
rect: function (left, top, r, options) {
+ if (!defined(options)) {
+ return [];
+ }
var width = options.width,
height = options.height,
right = left + width,
@@ -3595,17 +3895,15 @@
}
}
});
+
+// general renderer
+Renderer = VMLRenderer;
}
/* ****************************************************************************
* *
* END OF INTERNET EXPLORER <= 8 SPECIFIC CODE *
* *
*****************************************************************************/
-
-/**
- * General renderer
- */
-var Renderer = hasSVG ? SVGRenderer : VMLRenderer;
/**
@@ -3660,6 +3958,7 @@
plotBorder,
chart = this,
chartEvents = optionsChart.events,
+ runChartClick = chartEvents && !!chartEvents.click,
eventType,
isInsidePlot, // function
tooltip,
@@ -3720,7 +4019,9 @@
);
var axis = this,
- isDatetimeAxis = options.type == 'datetime',
+ type = options.type,
+ isDatetimeAxis = type === 'datetime',
+ isLog = type === 'logarithmic',
offset = options.offset || 0,
xOrY = isXAxis ? 'x' : 'y',
axisLength,
@@ -3735,8 +4036,8 @@
dataMin,
dataMax,
associatedSeries,
- userSetMin,
- userSetMax,
+ userMin,
+ userMax,
max = null,
min = null,
oldMin,
@@ -3787,7 +4088,7 @@
staggerLines = horiz && options.labels.staggerLines,
reversed = options.reversed,
- tickmarkOffset = (categories && options.tickmarkPlacement == 'between') ? 0.5 : 0;
+ tickmarkOffset = (categories && options.tickmarkPlacement === 'between') ? 0.5 : 0;
/**
* The Tick class
@@ -3810,20 +4111,31 @@
var pos = this.pos,
labelOptions = options.labels,
str,
- withLabel = !((pos == min && !pick(options.showFirstLabel, 1)) ||
- (pos == max && !pick(options.showLastLabel, 0))),
+ withLabel = !((pos === min && !pick(options.showFirstLabel, 1)) ||
+ (pos === max && !pick(options.showLastLabel, 0))),
+ width = (categories && horiz && categories.length &&
+ !labelOptions.step && !labelOptions.staggerLines &&
+ !labelOptions.rotation &&
+ plotWidth / categories.length) ||
+ (!horiz && plotWidth / 2),
+ css,
label = this.label;
// get the string
str = labelFormatter.call({
- isFirst: pos == tickPositions[0],
- isLast: pos == tickPositions[tickPositions.length - 1],
+ isFirst: pos === tickPositions[0],
+ isLast: pos === tickPositions[tickPositions.length - 1],
dateTimeLabelFormat: dateTimeLabelFormat,
value: (categories && categories[pos] ? categories[pos] : pos)
});
- // first call
+
+ // prepare CSS
+ css = width && { width: mathMax(1, mathRound(width - 2 * (labelOptions.padding || 10))) +PX };
+ css = extend(css, labelOptions.style);
+
+ // first call
if (label === UNDEFINED) {
this.label =
defined(str) && withLabel && labelOptions.enabled ?
@@ -3836,15 +4148,16 @@
align: labelOptions.align,
rotation: labelOptions.rotation
})
- .css(labelOptions.style)
+ // without position absolute, IE export sometimes is wrong
+ .css(css)
.add(axisGroup):
null;
-
+
// update
} else if (label) {
- label.attr({ text: str });
+ label.attr({ text: str })
+ .css(css);
}
-
},
/**
* Get the offset height or width of the label
@@ -3854,7 +4167,7 @@
return label ?
((this.labelBBox = label.getBBox()))[horiz ? 'height' : 'width'] :
0;
- },
+ },
/**
* Put everything in place
*
@@ -3881,7 +4194,7 @@
tickColor = major ? options.tickColor : options.minorTickColor,
tickPosition = major ? options.tickPosition : options.minorTickPosition,
step = labelOptions.step,
- cHeight = old && oldChartHeight || chartHeight,
+ cHeight = (old && oldChartHeight) || chartHeight,
attribs,
x,
y;
@@ -3889,7 +4202,7 @@
// get x and y position for ticks and labels
x = horiz ?
translate(pos + tickmarkOffset, null, null, old) + transB :
- plotLeft + offset + (opposite ? (old && oldChartWidth || chartWidth) - marginRight - plotLeft : 0);
+ plotLeft + offset + (opposite ? ((old && oldChartWidth) || chartWidth) - marginRight - plotLeft : 0);
y = horiz ?
cHeight - marginBottom + offset - (opposite ? plotHeight : 0) :
@@ -3913,7 +4226,7 @@
.attr(attribs).add(gridGroup) :
null;
}
- if (gridLine) {
+ if (gridLine && gridLinePath) {
gridLine.animate({
d: gridLinePath
});
@@ -3924,7 +4237,7 @@
if (tickWidth) {
// negate the length
- if (tickPosition == 'inside') {
+ if (tickPosition === 'inside') {
tickLength = -tickLength;
}
if (opposite) {
@@ -3955,15 +4268,21 @@
}
// the label is created on init - now move it into place
- if (label) {
+ if (label && !isNaN(x)) {
x = x + labelOptions.x - (tickmarkOffset && horiz ?
tickmarkOffset * transA * (reversed ? -1 : 1) : 0);
y = y + labelOptions.y - (tickmarkOffset && !horiz ?
tickmarkOffset * transA * (reversed ? 1 : -1) : 0);
+ // vertically centered
+ if (!defined(labelOptions.y)) {
+ y += pInt(label.styles.lineHeight) * 0.9 - label.getBBox().height / 2;
+ }
+
+
// correct for staggered labels
if (staggerLines) {
- y += (index % staggerLines) * 16;
+ y += (index / (step || 1) % staggerLines) * 16;
}
// apply step
if (step) {
@@ -4053,7 +4372,7 @@
else if (defined(from) && defined(to)) {
// keep within plot area
from = mathMax(from, min);
- to = mathMin(to, max);
+ to = mathMin(to, max);
toPath = getPlotLinePath(to);
path = getPlotLinePath(from);
@@ -4088,7 +4407,7 @@
svgElem.hide();
svgElem.onGetPath = function() {
svgElem.show();
- }
+ };
}
} else if (path && path.length) {
plotLine.svgElem = svgElem = renderer.path(path)
@@ -4135,8 +4454,8 @@
}
// get the bounding box and align the label
- xs = [path[1], path[4], path[6] || path[1]];
- ys = [path[2], path[5], path[7] || path[2]];
+ xs = [path[1], path[4], pick(path[6], path[1])];
+ ys = [path[2], path[5], pick(path[7], path[2])];
x = mathMin.apply(math, xs);
y = mathMin.apply(math, ys);
@@ -4174,6 +4493,91 @@
}
};
+ /**
+ * The class for stack items
+ */
+ function StackItem(options, isNegative, x) {
+ var stackItem = this;
+
+ // Tells if the stack is negative
+ stackItem.isNegative = isNegative;
+
+ // Save the options to be able to style the label
+ stackItem.options = options;
+
+ // Save the x value to be able to position the label later
+ stackItem.x = x;
+
+ // The align options and text align varies on whether the stack is negative and
+ // if the chart is inverted or not.
+ // First test the user supplied value, then use the dynamic.
+ stackItem.alignOptions = {
+ align: options.align || (inverted ? (isNegative ? 'left' : 'right') : 'center'),
+ verticalAlign: options.verticalAlign || (inverted ? 'middle' : (isNegative ? 'bottom' : 'top')),
+ y: pick(options.y, inverted ? 4 : (isNegative ? 14 : -6)),
+ x: pick(options.x, inverted ? (isNegative ? -6 : 6) : 0)
+ };
+
+ stackItem.textAlign = options.textAlign || (inverted ? (isNegative ? 'right' : 'left') : 'center');
+ }
+
+ StackItem.prototype = {
+ /**
+ * Sets the total of this stack. Should be called when a serie is hidden or shown
+ * since that will affect the total of other stacks.
+ */
+ setTotal: function(total) {
+ this.total = total;
+ this.cum = total;
+ },
+
+ /**
+ * Renders the stack total label and adds it to the stack label group.
+ */
+ render: function(group) {
+ var stackItem = this, // aliased this
+ str = stackItem.options.formatter.call(stackItem); // format the text in the label
+
+ // Change the text to reflect the new total and set visibility to hidden in case the serie is hidden
+ if (stackItem.label) {
+ stackItem.label.attr({text: str, visibility: HIDDEN});
+ // Create new label
+ } else {
+ stackItem.label =
+ chart.renderer.text(str, 0, 0) // dummy positions, actual position updated with setOffset method in columnseries
+ .css(stackItem.options.style) // apply style
+ .attr({align: stackItem.textAlign, // fix the text-anchor
+ rotation: stackItem.options.rotation, // rotation
+ visibility: HIDDEN }) // hidden until setOffset is called
+ .add(group); // add to the labels-group
+ }
+ },
+
+ /**
+ * Sets the offset that the stack has from the x value and repositions the label.
+ */
+ setOffset: function(xOffset, xWidth) {
+ var stackItem = this, // aliased this
+ neg = stackItem.isNegative, // special treatment is needed for negative stacks
+ y = axis.translate(stackItem.total), // stack value translated mapped to chart coordinates
+ yZero = axis.translate(0), // stack origin
+ h = mathAbs(y - yZero), // stack height
+ x = chart.xAxis[0].translate(stackItem.x) + xOffset, // stack x position
+ plotHeight = chart.plotHeight,
+ stackBox = { // this is the box for the complete stack
+ x: inverted ? (neg ? y : y - h) : x,
+ y: inverted ? plotHeight - x - xWidth : (neg ? (plotHeight - y - h) : plotHeight - y),
+ width: inverted ? h : xWidth,
+ height: inverted ? xWidth : h
+ };
+
+ if (stackItem.label) {
+ stackItem.label
+ .align(stackItem.alignOptions, null, stackBox) // align the label to the box
+ .attr({visibility: VISIBLE}); // set visibility
+ }
+ }
+ };
/**
* Get the minimum and maximum for the series of each axis
@@ -4199,9 +4603,9 @@
// the series is a cartesian type, and...
serie.isCartesian &&
// we're in the right x or y dimension, and...
- (strAxis == 'xAxis' && isXAxis || strAxis == 'yAxis' && !isXAxis) && (
+ ((strAxis === 'xAxis' && isXAxis) || (strAxis === 'yAxis' && !isXAxis)) && (
// the axis number is given in the options and matches this axis index, or
- (serie.options[strAxis] == options.index) ||
+ (serie.options[strAxis] === options.index) ||
// the axis index is not given
(serie.options[strAxis] === UNDEFINED && options.index === 0)
)
@@ -4228,7 +4632,7 @@
if (!isXAxis) {
stacking = serie.options.stacking;
- usePercentage = stacking == 'percent';
+ usePercentage = stacking === 'percent';
// create a stack for this particular series type
if (stacking) {
@@ -4254,7 +4658,8 @@
isNegative = pointY < 0,
pointStack = isNegative ? negPointStack : posPointStack,
key = isNegative ? negKey : stackKey,
- totalPos;
+ totalPos,
+ pointLow;
// initial values
if (dataMin === null) {
@@ -4279,13 +4684,13 @@
defined(pointStack[pointX]) ?
pointStack[pointX] + pointY : pointY;
}
-
totalPos = pointStack ? pointStack[pointX] : pointY;
+ pointLow = pick(point.low, totalPos);
if (!usePercentage) {
if (totalPos > dataMax) {
dataMax = totalPos;
- } else if (totalPos < dataMin) {
- dataMin = totalPos;
+ } else if (pointLow < dataMin) {
+ dataMin = pointLow;
}
}
if (stacking) {
@@ -4293,10 +4698,13 @@
if (!stacks[key]) {
stacks[key] = {};
}
- stacks[key][pointX] = {
- total: totalPos,
- cum: totalPos
- };
+
+ // If the StackItem is there, just update the values,
+ // if not, create one first
+ if (!stacks[key][pointX]) {
+ stacks[key][pointX] = new StackItem(options.stackLabels, isNegative, pointX);
+ }
+ stacks[key][pointX].setTotal(totalPos);
}
}
});
@@ -4305,11 +4713,12 @@
// For column, areas and bars, set the minimum automatically to zero
// and prevent that minPadding is added in setScale
if (/(area|column|bar)/.test(serie.type) && !isXAxis) {
- if (dataMin >= 0) {
- dataMin = 0;
+ var threshold = 0; // use series.options.threshold?
+ if (dataMin >= threshold) {
+ dataMin = threshold;
ignoreMinPadding = true;
- } else if (dataMax < 0) {
- dataMax = 0;
+ } else if (dataMax < threshold) {
+ dataMax = threshold;
ignoreMaxPadding = true;
}
}
@@ -4323,7 +4732,7 @@
* Translate from axis value to pixel position on the chart, or back
*
*/
- translate = function(val, backwards, cvsCoord, old) {
+ translate = function(val, backwards, cvsCoord, old, handleLog) {
var sign = 1,
cvsOffset = 0,
localA = old ? oldTransA : transA,
@@ -4347,9 +4756,15 @@
if (reversed) {
val = axisLength - val;
}
- returnValue = val / localA + localMin; // from chart pixel to value
+ returnValue = val / localA + localMin; // from chart pixel to value
+ if (isLog && handleLog) {
+ returnValue = lin2log(returnValue);
+ }
} else { // normal translation
+ if (isLog && handleLog) {
+ val = log2lin(val);
+ }
returnValue = sign * (val - localMin) * localA + cvsOffset; // from value to chart pixel
}
@@ -4369,8 +4784,8 @@
x2,
y2,
translatedValue = translate(value, null, null, old),
- cHeight = old && oldChartHeight || chartHeight,
- cWidth = old && oldChartWidth || chartWidth,
+ cHeight = (old && oldChartHeight) || chartHeight,
+ cWidth = (old && oldChartWidth) || chartWidth,
skip;
x1 = x2 = mathRound(translatedValue + transB);
@@ -4397,12 +4812,13 @@
renderer.crispLine([M, x1, y1, L, x2, y2], lineWidth || 0);
};
+
/**
* Take an interval and normalize it to multiples of 1, 2, 2.5 and 5
* @param {Number} interval
*/
function normalizeTickInterval(interval, multiples) {
- var normalized;
+ var normalized, i;
// round to a tenfold of 1, 2, 2.5 or 5
magnitude = multiples ? 1 : math.pow(10, mathFloor(math.log(interval) / math.LN10));
@@ -4414,8 +4830,8 @@
//multiples = [1, 2, 2.5, 4, 5, 7.5, 10];
// the allowDecimals option
- if (options.allowDecimals === false) {
- if (magnitude == 1) {
+ if (options.allowDecimals === false || isLog) {
+ if (magnitude === 1) {
multiples = [1, 2, 5, 10];
} else if (magnitude <= 0.1) {
multiples = [1 / magnitude];
@@ -4424,7 +4840,7 @@
}
// normalize the interval to the nearest multiple
- for (var i = 0; i < multiples.length; i++) {
+ for (i = 0; i < multiples.length; i++) {
interval = multiples[i];
if (normalized <= (multiples[i] + (multiples[i+1] || multiples[i])) / 2) {
break;
@@ -4507,7 +4923,7 @@
}
// prevent 2.5 years intervals, though 25, 250 etc. are allowed
- if (interval == oneYear && tickInterval < 5 * interval) {
+ if (interval === oneYear && tickInterval < 5 * interval) {
multiples = [1, 2, 5];
}
@@ -4550,7 +4966,7 @@
}
// week is a special case that runs outside the hierarchy
- if (interval == oneWeek) {
+ if (interval === oneWeek) {
// get start of current week, independent of multitude
minDate[setDate](minDate[getDate]() - minDate[getDay]() +
options.startOfWeek);
@@ -4569,18 +4985,18 @@
tickPositions.push(time);
// if the interval is years, use Date.UTC to increase years
- if (interval == oneYear) {
+ if (interval === oneYear) {
time = makeTime(minYear + i * multitude, 0) / timeFactor;
// if the interval is months, use Date.UTC to increase months
- } else if (interval == oneMonth) {
+ } else if (interval === oneMonth) {
time = makeTime(minYear, minMonth + i * multitude) / timeFactor;
// if we're using global time, the interval is not fixed as it jumps
// one hour at the DST crossover
- } else if (!useUTC && (interval == oneDay || interval == oneWeek)) {
+ } else if (!useUTC && (interval === oneDay || interval === oneWeek)) {
time = makeTime(minYear, minMonth, minDateDate +
- i * multitude * (interval == oneDay ? 1 : 7));
+ i * multitude * (interval === oneDay ? 1 : 7));
// else, the interval is fixed and we use simple addition
} else {
@@ -4592,9 +5008,9 @@
// push the last time
tickPositions.push(time);
+
// dynamic label formatter
dateTimeLabelFormat = options.dateTimeLabelFormats[unit[0]];
-
}
/**
@@ -4602,8 +5018,14 @@
* @param {Number} num
*/
function correctFloat(num) {
- var invMag = (magnitude < 1 ? mathRound(1 / magnitude) : 1) * 10;
- return mathRound(num * invMag) / invMag;
+ var invMag, ret = num;
+ magnitude = pick(magnitude, math.pow(10, mathFloor(math.log(tickInterval) / math.LN10)));
+
+ if (magnitude < 1) {
+ invMag = mathRound(1 / magnitude) * 10;
+ ret = mathRound(num * invMag) / invMag;
+ }
+ return ret;
}
/**
@@ -4612,8 +5034,8 @@
function setLinearTickPositions() {
var i,
- roundedMin = mathFloor(min / tickInterval) * tickInterval,
- roundedMax = mathCeil(max / tickInterval) * tickInterval;
+ roundedMin = correctFloat(mathFloor(min / tickInterval) * tickInterval),
+ roundedMax = correctFloat(mathCeil(max / tickInterval) * tickInterval);
tickPositions = [];
@@ -4638,7 +5060,7 @@
tickIntervalOption = options.tickInterval,
tickPixelIntervalOption = options.tickPixelInterval,
maxZoom = options.maxZoom || (
- isXAxis ?
+ isXAxis && !defined(options.min) && !defined(options.max) ?
mathMin(chart.smallestInterval * 5, dataMax - dataMin) :
null
),
@@ -4657,8 +5079,13 @@
// initial min and max from the extreme data values
else {
- min = pick(userSetMin, options.min, dataMin);
- max = pick(userSetMax, options.max, dataMax);
+ min = pick(userMin, options.min, dataMin);
+ max = pick(userMax, options.max, dataMax);
+ }
+
+ if (isLog) {
+ min = log2lin(min);
+ max = log2lin(max);
}
// maxZoom exceeded, just center the selection
@@ -4672,19 +5099,19 @@
// pad the values to get clear of the chart's edges
if (!categories && !usePercentage && !isLinked && defined(min) && defined(max)) {
length = (max - min) || 1;
- if (!defined(options.min) && !defined(userSetMin) && minPadding && (dataMin < 0 || !ignoreMinPadding)) {
+ if (!defined(options.min) && !defined(userMin) && minPadding && (dataMin < 0 || !ignoreMinPadding)) {
min -= length * minPadding;
}
- if (!defined(options.max) && !defined(userSetMax) && maxPadding && (dataMax > 0 || !ignoreMaxPadding)) {
+ if (!defined(options.max) && !defined(userMax) && maxPadding && (dataMax > 0 || !ignoreMaxPadding)) {
max += length * maxPadding;
}
}
// get tickInterval
- if (min == max) {
+ if (min === max) {
tickInterval = 1;
} else if (isLinked && !tickIntervalOption &&
- tickPixelIntervalOption == linkedParent.options.tickPixelInterval) {
+ tickPixelIntervalOption === linkedParent.options.tickPixelInterval) {
tickInterval = linkedParent.tickInterval;
} else {
tickInterval = pick(
@@ -4696,8 +5123,9 @@
}
if (!isDatetimeAxis && !defined(options.tickInterval)) { // linear
- axis.tickInterval = tickInterval = normalizeTickInterval(tickInterval);
+ tickInterval = normalizeTickInterval(tickInterval);
}
+ axis.tickInterval = tickInterval; // record for linked axis
// get minorTickInterval
minorTickInterval = options.minorTickInterval === 'auto' && tickInterval ?
@@ -4714,8 +5142,12 @@
// pad categorised axis to nearest half unit
if (categories || (isXAxis && chart.hasColumn)) {
catPad = (categories ? 1 : tickInterval) * 0.5;
- min -= catPad;
- max += catPad;
+ if (categories || !defined(pick(options.min, userMin))) {
+ min -= catPad;
+ }
+ if (categories || !defined(pick(options.max, userMax))) {
+ max += catPad;
+ }
}
// reset min/max or remove extremes based on start/end on tick
@@ -4756,7 +5188,7 @@
*/
function adjustTickAmount() {
- if (!isDatetimeAxis && !categories && !isLinked) { // only apply to linear scale
+ if (maxTicks && !isDatetimeAxis && !categories && !isLinked) { // only apply to linear scale
var oldTickAmount = tickAmount,
calculatedTickAmount = tickPositions.length;
@@ -4773,7 +5205,7 @@
max = tickPositions[tickPositions.length - 1];
}
- if (defined(oldTickAmount) && tickAmount != oldTickAmount) {
+ if (defined(oldTickAmount) && tickAmount !== oldTickAmount) {
axis.isDirty = true;
}
}
@@ -4812,7 +5244,7 @@
// mark as dirty if it is not already set to dirty and extremes have changed
if (!axis.isDirty) {
- axis.isDirty = (min != oldMin || max != oldMax);
+ axis.isDirty = (min !== oldMin || max !== oldMax);
}
}
@@ -4828,7 +5260,6 @@
*/
function setExtremes(newMin, newMax, redraw, animation) {
- setAnimation(animation, chart);
redraw = pick(redraw, true); // defaults to true
fireEvent(axis, 'setExtremes', { // fire an event to enable syncing of multiple charts
@@ -4836,13 +5267,13 @@
max: newMax
}, function() { // the default event handler
- userSetMin = newMin;
- userSetMax = newMax;
+ userMin = newMin;
+ userMax = newMax;
// redraw
if (redraw) {
- chart.redraw();
+ chart.redraw(animation);
}
});
@@ -4856,7 +5287,9 @@
min: min,
max: max,
dataMin: dataMin,
- dataMax: dataMax
+ dataMax: dataMax,
+ userMin: userMin,
+ userMax: userMax
};
}
@@ -4895,7 +5328,8 @@
titleMargin = 0,
axisTitleOptions = options.title,
labelOptions = options.labels,
- directionFactor = [-1, 1, 1, -1][side];
+ directionFactor = [-1, 1, 1, -1][side],
+ n;
if (!axisGroup) {
axisGroup = renderer.g('axis')
@@ -4917,14 +5351,15 @@
}
// left side must be align: right and right side must have align: left for labels
- if (side === 0 || side == 2 || { 1: 'left', 3: 'right' }[side] == labelOptions.align) {
-
+ if (side === 0 || side === 2 || { 1: 'left', 3: 'right' }[side] === labelOptions.align) {
+
// get the highest offset
labelOffset = mathMax(
ticks[pos].getLabelSize(),
labelOffset
);
}
+
});
if (staggerLines) {
@@ -4932,7 +5367,7 @@
}
} else { // doesn't have data
- for (var n in ticks) {
+ for (n in ticks) {
ticks[n].destroy();
delete ticks[n];
}
@@ -4966,13 +5401,14 @@
axisTitleMargin =
labelOffset +
- (side != 2 && labelOffset && directionFactor * options.labels[horiz ? 'y' : 'x']) +
+ (side !== 2 && labelOffset && directionFactor * options.labels[horiz ? 'y' : 'x']) +
titleMargin;
-
+
axisOffset[side] = mathMax(
axisOffset[side],
axisTitleMargin + titleOffset + directionFactor * offset
);
+
}
/**
@@ -4980,6 +5416,7 @@
*/
function render() {
var axisTitleOptions = options.title,
+ stackLabelOptions = options.stackLabels,
alternateGridColor = options.alternateGridColor,
lineWidth = options.lineWidth,
lineLeft,
@@ -5080,7 +5517,8 @@
// remove inactive ticks
each([ticks, minorTicks, alternateBands], function(coll) {
- for (var pos in coll) {
+ var pos;
+ for (pos in coll) {
if (!coll[pos].isActive) {
coll[pos].destroy();
delete coll[pos];
@@ -5147,7 +5585,7 @@
(opposite ? -1 : 1) * // so does opposite axes
axisTitleMargin +
//(isIE ? fontSize / 3 : 0)+ // preliminary fix for vml's centerline
- (side == 2 ? fontSize : 0);
+ (side === 2 ? fontSize : 0);
axis.axisTitle[hasRendered ? 'animate' : 'attr']({
x: horiz ?
@@ -5161,6 +5599,33 @@
}
+ // Stacked totals:
+ if (stackLabelOptions && stackLabelOptions.enabled) {
+ var stackKey, oneStack, stackCategory,
+ stackTotalGroup = axis.stackTotalGroup;
+
+ // Create a separate group for the stack total labels
+ if (!stackTotalGroup) {
+ axis.stackTotalGroup = stackTotalGroup =
+ renderer.g('stack-labels')
+ .attr({
+ visibility: VISIBLE,
+ zIndex: 6
+ })
+ .translate(plotLeft, plotTop)
+ .add();
+ }
+
+ // Render each stack total
+ for (stackKey in stacks) {
+ oneStack = stacks[stackKey];
+ for (stackCategory in oneStack) {
+ oneStack[stackCategory].render(stackTotalGroup);
+ }
+ }
+ }
+ // End stacked totals
+
axis.isDirty = false;
}
@@ -5169,8 +5634,9 @@
* @param {Object} id
*/
function removePlotBandOrLine(id) {
- for (var i = 0; i < plotLinesAndBands.length; i++) {
- if (plotLinesAndBands[i].id == id) {
+ var i = plotLinesAndBands.length;
+ while (i--) {
+ if (plotLinesAndBands[i].id === id) {
plotLinesAndBands[i].destroy();
}
}
@@ -5365,28 +5831,25 @@
*/
function defaultFormatter() {
var pThis = this,
- points = pThis.points || splat(pThis.point),
- xAxis = points[0].series.xAxis,
+ items = pThis.points || splat(pThis),
+ xAxis = items[0].series.xAxis,
x = pThis.x,
- isDateTime = xAxis && xAxis.options.type == 'datetime',
+ isDateTime = xAxis && xAxis.options.type === 'datetime',
useHeader = isString(x) || isDateTime,
series,
s;
// build the header
s = useHeader ?
- ['<span style="font-size: 10px">',
- (isDateTime ? dateFormat('%A, %b %e, %Y', x) : x),
- '</span><br/>'] : [];
+ ['<span style="font-size: 10px">' +
+ (isDateTime ? dateFormat('%A, %b %e, %Y', x) : x) +
+ '</span>'] : [];
// build the values
- each(points, function(point) {
- series = point.series;
- s.push('<span style="color:'+ series.color +'">', (point.name || series.name), '</span>: ',
- (!useHeader ? ('<b>x = '+ (point.name || point.x) + ',</b> ') : ''),
- '<b>', (!useHeader ? 'y = ' : '' ), point.y, '</b><br/>');
+ each(items, function(item) {
+ s.push(item.point.tooltipFormatter(useHeader));
});
- return s.join('');
+ return s.join('<br/>');
}
/**
@@ -5418,18 +5881,24 @@
*/
function hide() {
if (!tooltipIsHidden) {
+ var hoverPoints = chart.hoverPoints;
+
group.hide();
each(crosshairs, function(crosshair) {
- crosshair.hide();
- });
-
- // local hover points for shared tooltip
- each(series, function(item) {
- if (item.hoverPoint) {
- item.hoverPoint.setState();
+ if (crosshair) {
+ crosshair.hide();
}
});
+
+ // hide previous hoverPoints and set new
+ if (hoverPoints) {
+ each(hoverPoints, function(point) {
+ point.setState();
+ });
+ }
+ chart.hoverPoints = null;
+
tooltipIsHidden = true;
}
@@ -5455,33 +5924,34 @@
pointConfig = [],
tooltipPos = point.tooltipPos,
formatter = options.formatter || defaultFormatter,
- getConfig = function(point) {
- return {
- series: point.series,
- point: point,
- x: point.category,
- y: point.y,
- percentage: point.percentage,
- total: point.total || point.stackTotal
- };
- };
+ hoverPoints = chart.hoverPoints;
// shared tooltip, array is sent over
- if (shared) {
+ if (shared) {
+
+ // hide previous hoverPoints and set new
+ if (hoverPoints) {
+ each(hoverPoints, function(point) {
+ point.setState();
+ });
+ }
+ chart.hoverPoints = point;
+
each(point, function(item, i) {
- var series = item.series,
+ /*var series = item.series,
hoverPoint = series.hoverPoint;
if (hoverPoint) {
hoverPoint.setState();
}
- series.hoverPoint = item;
+ series.hoverPoint = item;*/
item.setState(HOVER_STATE);
plotY += item.plotY; // for average
- pointConfig.push(getConfig(item));
+ pointConfig.push(item.getLabelConfig());
});
+
plotX = point[0].plotX;
- plotY /= point.length;
+ plotY = mathRound(plotY) / point.length; // mathRound because Opera 10 has problems here
textConfig = {
x: point[0].category
@@ -5491,7 +5961,7 @@
// single point tooltip
} else {
- textConfig = getConfig(point);
+ textConfig = point.getLabelConfig();
}
text = formatter.call(textConfig);
@@ -5506,7 +5976,7 @@
// hide tooltip if the point falls outside the plot
- show = !point.series.isCartesian || isInsidePlot(x, y);
+ show = shared || !point.series.isCartesian || isInsidePlot(x, y);
// update the inner HTML
if (text === false || !show) {
@@ -5526,13 +5996,13 @@
// get the bounding box
bBox = label.getBBox();
- boxWidth = bBox.width;
- boxHeight = bBox.height;
-
+ boxWidth = bBox.width + 2 * padding;
+ boxHeight = bBox.height + 2 * padding;
+
// set the size of the box
box.attr({
- width: boxWidth + 2 * padding,
- height: boxHeight + 2 * padding,
+ width: boxWidth,
+ height: boxHeight,
stroke: options.borderColor || point.color || currentSeries.color || '#606060'
});
@@ -5570,7 +6040,8 @@
axis;
while (i--) {
- if (crosshairsOptions[i] && (axis = point.series[i ? 'yAxis' : 'xAxis'])) {
+ axis = point.series[i ? 'yAxis' : 'xAxis'];
+ if (crosshairsOptions[i] && axis) {
path = axis
.getPlotLinePath(point[i ? 'y' : 'x'], 1);
if (crosshairs[i]) {
@@ -5619,15 +6090,20 @@
zoomType = optionsChart.zoomType,
zoomX = /x/.test(zoomType),
zoomY = /y/.test(zoomType),
- zoomHor = zoomX && !inverted || zoomY && inverted,
- zoomVert = zoomY && !inverted || zoomX && inverted;
+ zoomHor = (zoomX && !inverted) || (zoomY && inverted),
+ zoomVert = (zoomY && !inverted) || (zoomX && inverted);
/**
* Add crossbrowser support for chartX and chartY
* @param {Object} e The event object in standard browsers
*/
function normalizeMouseEvent(e) {
- var ePos;
+ var ePos,
+ pageZoomFix = isWebKit && doc.width / doc.documentElement.clientWidth - 1,
+ chartPosLeft,
+ chartPosTop,
+ chartX,
+ chartY;
// common IE normalizing
e = e || win.event;
@@ -5639,25 +6115,36 @@
ePos = e.touches ? e.touches.item(0) : e;
// in certain cases, get mouse position
- if (e.type != 'mousemove' || win.opera) { // only Opera needs position on mouse move, see below
+ if (e.type !== 'mousemove' || win.opera || pageZoomFix) { // only Opera needs position on mouse move, see below
chartPosition = getPosition(container);
+ chartPosLeft = chartPosition.left;
+ chartPosTop = chartPosition.top;
}
-
+
// chartX and chartY
if (isIE) { // IE including IE9 that has chartX but in a different meaning
- e.chartX = e.x;
- e.chartY = e.y;
+ chartX = e.x;
+ chartY = e.y;
} else {
if (ePos.layerX === UNDEFINED) { // Opera and iOS
- e.chartX = ePos.pageX - chartPosition.left;
- e.chartY = ePos.pageY - chartPosition.top;
+ chartX = ePos.pageX - chartPosLeft;
+ chartY = ePos.pageY - chartPosTop;
} else {
- e.chartX = e.layerX;
- e.chartY = e.layerY;
+ chartX = e.layerX;
+ chartY = e.layerY;
}
}
- return e;
+ // correct for page zoom bug in WebKit
+ if (pageZoomFix) {
+ chartX += mathRound((pageZoomFix + 1) * chartPosLeft - chartPosLeft);
+ chartY += mathRound((pageZoomFix + 1) * chartPosTop - chartPosTop);
+ }
+
+ return extend(e, {
+ chartX: chartX,
+ chartY: chartY
+ });
}
/**
@@ -5723,12 +6210,12 @@
}
}
// refresh the tooltip if necessary
- if (points.length && (points[0].plotX != hoverX)) {
+ if (points.length && (points[0].plotX !== hoverX)) {
tooltip.refresh(points);
hoverX = points[0].plotX;
}
}
-
+
// separate tooltip and general mouse events
if (hoverSeries && hoverSeries.tracker) { // only use for line-type series with common tracker
@@ -5736,7 +6223,7 @@
point = hoverSeries.tooltipPoints[index];
// a new point is hovered, refresh the tooltip
- if (point && point != hoverPoint) {
+ if (point && point !== hoverPoint) {
// trigger the events
point.onMouseOver();
@@ -5795,18 +6282,24 @@
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
- true
+ true,
+ 0,
+ 0,
+ 1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
- true
+ true,
+ 0,
+ 0,
+ 1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
- min: mathMin(selectionMin, selectionMax), // for reversed axes
+ min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
@@ -5855,14 +6348,24 @@
// normalize
e = normalizeMouseEvent(e);
- if (e.type == 'mousemove') { // not for touch devices
+ if (!hasTouch) { // not for touch devices
e.returnValue = false;
}
-
var chartX = e.chartX,
chartY = e.chartY,
isOutsidePlot = !isInsidePlot(chartX - plotLeft, chartY - plotTop);
+
+ // on touch devices, only trigger click if a handler is defined
+ if (hasTouch && e.type === 'touchstart') {
+ if (attr(e.target, 'isTracker')) {
+ if (!chart.runTrackerClick) {
+ e.preventDefault();
+ }
+ } else if (!runChartClick && !isOutsidePlot) {
+ e.preventDefault();
+ }
+ }
// cancel on mouse outside
if (isOutsidePlot) {
@@ -5888,13 +6391,13 @@
}
- if (mouseIsDown && e.type != 'touchstart') { // make selection
+ if (mouseIsDown && e.type !== 'touchstart') { // make selection
// determine if the mouse has moved more than 10px
- if ((hasDragged = Math.sqrt(
+ hasDragged = Math.sqrt(
Math.pow(mouseDownX - chartX, 2) +
- Math.pow(mouseDownY - chartY, 2)
- ) > 10)) {
+ Math.pow(mouseDownY - chartY, 2));
+ if (hasDragged > 10) {
// make a selection
if (hasCartesianSeries && (zoomX || zoomY) &&
@@ -5939,7 +6442,9 @@
}
lastWasOutsidePlot = isOutsidePlot;
- return false;
+
+ // when outside plot, allow touch-drag by returning true
+ return isOutsidePlot || !hasCartesianSeries;
};
/*
@@ -6087,10 +6592,10 @@
return;
}
- var horizontal = options.layout == 'horizontal',
+ var horizontal = options.layout === 'horizontal',
symbolWidth = options.symbolWidth,
symbolPadding = options.symbolPadding,
- allItems = [],
+ allItems,
style = options.style,
itemStyle = options.itemStyle,
itemHoverStyle = options.itemHoverStyle,
@@ -6103,7 +6608,7 @@
itemX,
itemY,
lastItemY,
- lastItemHeight = 0,
+ itemHeight = 0,
box,
legendBorderWidth = options.borderWidth,
legendBackgroundColor = options.backgroundColor,
@@ -6126,19 +6631,22 @@
legendSymbol = item.legendSymbol,
hiddenColor = itemHiddenStyle.color,
textColor = visible ? options.itemStyle.color : hiddenColor,
- symbolColor = visible ? item.color : hiddenColor;
+ lineColor = visible ? item.color : hiddenColor,
+ symbolAttr = visible ? item.pointAttr[NORMAL_STATE] : {
+ stroke: hiddenColor,
+ fill: hiddenColor
+ };
+
if (legendItem) {
legendItem.css({ fill: textColor });
}
if (legendLine) {
- legendLine.attr({ stroke: symbolColor });
+ legendLine.attr({ stroke: lineColor });
}
if (legendSymbol) {
- legendSymbol.attr({
- stroke: symbolColor,
- fill: symbolColor
- });
+ legendSymbol.attr(symbolAttr);
}
+
}
/**
@@ -6180,7 +6688,7 @@
var checkbox = item.checkbox;
// pull out from the array
- erase(allItems, item);
+ //erase(allItems, item);
// destroy SVG elements
each(['legendItem', 'legendLine', 'legendSymbol'], function(key) {
@@ -6202,11 +6710,12 @@
*/
function positionCheckboxes() {
each(allItems, function(item) {
- var checkbox = item.checkbox;
+ var checkbox = item.checkbox,
+ alignAttr = legendGroup.alignAttr;
if (checkbox) {
css(checkbox, {
- left: (legendGroup.attr('translateX') + item.legendItemWidth + checkbox.x - 40) +PX,
- top: (legendGroup.attr('translateY') + checkbox.y - 11) + PX
+ left: (alignAttr.translateX + item.legendItemWidth + checkbox.x - 40) +PX,
+ top: (alignAttr.translateY + checkbox.y - 11) + PX
});
}
});
@@ -6217,7 +6726,7 @@
* @param {Object} item A series or point
*/
function renderItem(item) {
- var bBox,
+ var bBox,
itemWidth,
legendSymbol,
symbolX,
@@ -6225,8 +6734,10 @@
attribs,
simpleSymbol,
li = item.legendItem,
- series = item.series || item;
-
+ series = item.series || item,
+ i = allItems.length,
+ itemOptions = series.options,
+ strokeWidth = (itemOptions && itemOptions.borderWidth) || 0;
if (!li) { // generate it once, later move it
@@ -6265,14 +6776,13 @@
.add(legendGroup);
// draw the line
- if (!simpleSymbol && item.options && item.options.lineWidth) {
- var itemOptions = item.options;
- attribs = {
+ if (!simpleSymbol && itemOptions && itemOptions.lineWidth) {
+ var attrs = {
'stroke-width': itemOptions.lineWidth,
zIndex: 2
};
if (itemOptions.dashStyle) {
- attribs.dashstyle = itemOptions.dashStyle;
+ attrs.dashstyle = itemOptions.dashStyle;
}
item.legendLine = renderer.path([
M,
@@ -6282,13 +6792,13 @@
-symbolPadding,
0
])
- .attr(attribs)
+ .attr(attrs)
.add(legendGroup);
}
// draw a simple symbol
if (simpleSymbol) { // bar|pie|area|column
- //legendLayer.drawRect(
+
legendSymbol = renderer.rect(
(symbolX = -symbolWidth - symbolPadding),
(symbolY = -11),
@@ -6296,28 +6806,27 @@
12,
2
).attr({
- 'stroke-width': 0,
+ //'stroke-width': 0,
zIndex: 3
}).add(legendGroup);
}
// draw the marker
- else if (item.options && item.options.marker && item.options.marker.enabled) {
+ else if (itemOptions && itemOptions.marker && itemOptions.marker.enabled) {
legendSymbol = renderer.symbol(
item.symbol,
(symbolX = -symbolWidth / 2 - symbolPadding),
(symbolY = -4),
- item.options.marker.radius
+ itemOptions.marker.radius
)
- .attr(item.pointAttr[NORMAL_STATE])
+ //.attr(item.pointAttr[NORMAL_STATE])
.attr({ zIndex: 3 })
.add(legendGroup);
-
}
if (legendSymbol) {
- legendSymbol.xOff = symbolX;
- legendSymbol.yOff = symbolY;
+ legendSymbol.xOff = symbolX + (strokeWidth % 2 / 2);
+ legendSymbol.yOff = symbolY + (strokeWidth % 2 / 2);
}
item.legendSymbol = legendSymbol;
@@ -6327,7 +6836,7 @@
// add the HTML checkbox on top
- if (item.options && item.options.showCheckbox) {
+ if (itemOptions && itemOptions.showCheckbox) {
item.checkbox = createElement('input', {
type: 'checkbox',
checked: item.selected,
@@ -6348,35 +6857,41 @@
}
-
- // position the newly generated or reordered items
- positionItem(item, itemX, itemY);
-
// calculate the positions for the next line
bBox = li.getBBox();
- lastItemY = itemY;
- lastItemHeight = bBox.height;
- item.legendItemWidth = itemWidth =
+ itemWidth = item.legendItemWidth =
options.itemWidth || symbolWidth + symbolPadding + bBox.width + rightPadding;
- if (horizontal) {
- itemX += itemWidth;
- offsetWidth = widthOption || mathMax(itemX - initialItemX, offsetWidth);
+ itemHeight = bBox.height;
- if (itemX - initialItemX + itemWidth >
- (widthOption || (chartWidth - 2 * padding - initialItemX))) { // new line
- itemX = initialItemX;
- itemY += lastItemHeight;
- }
-
- } else {
- itemY += lastItemHeight;
- // the width of the widest item
- offsetWidth = widthOption || mathMax(itemWidth, offsetWidth);
+ // if the item exceeds the width, start a new line
+ if (horizontal && itemX - initialItemX + itemWidth >
+ (widthOption || (chartWidth - 2 * padding - initialItemX))) {
+ itemX = initialItemX;
+ itemY += itemHeight;
}
+ lastItemY = itemY;
+
+ // position the newly generated or reordered items
+ positionItem(item, itemX, itemY);
+
+ // advance
+ if (horizontal) {
+ itemX += itemWidth;
+ } else {
+ itemY += itemHeight;
+ }
+
+ // the width of the widest item
+ offsetWidth = widthOption || mathMax(
+ horizontal ? itemX - initialItemX : itemWidth,
+ offsetWidth
+ );
+
+
// add it all to an array to use below
- allItems.push(item);
+ //allItems.push(item);
}
/**
@@ -6397,31 +6912,41 @@
}
- // add HTML for each series
- if (reversedLegend) {
- series.reverse();
- }
+ // add each series or point
+ allItems = [];
each(series, function(serie) {
- if (!serie.options.showInLegend) {
+ var seriesOptions = serie.options;
+
+ if (!seriesOptions.showInLegend) {
return;
}
// use points or series for the legend item depending on legendType
- var items = (serie.options.legendType == 'point') ?
- serie.data : [serie];
-
- // render all items
- each(items, renderItem);
+ allItems = allItems.concat(seriesOptions.legendType === 'point' ?
+ serie.data :
+ serie
+ );
+
});
- if (reversedLegend) { // restore
- series.reverse();
+
+ // sort by legendIndex
+ allItems.sort(function(a, b) {
+ return (a.options.legendIndex || 0) - (b.options.legendIndex || 0);
+ });
+
+ // reversed legend
+ if (reversedLegend) {
+ allItems.reverse();
}
+ // render the items
+ each(allItems, renderItem);
+
// Draw the border
legendWidth = widthOption || offsetWidth;
- legendHeight = lastItemY - y + lastItemHeight;
+ legendHeight = lastItemY - y + itemHeight;
if (legendBorderWidth || legendBackgroundColor) {
legendWidth += 2 * padding;
@@ -6443,12 +6968,14 @@
.add(legendGroup)
.shadow(options.shadow);
- } else {
- box.animate({
- width: legendWidth,
- height: legendHeight
- });
+ } else if (legendWidth > 0 && legendHeight > 0) {
+ box.animate(
+ box.crisp(null, null, null, legendWidth, legendHeight)
+ );
}
+
+ // hide the border if no items
+ box[allItems.length ? 'show' : 'hide']();
}
// 1.x compatibility: positioning based on style
@@ -6457,7 +6984,7 @@
i = 4;
while(i--) {
prop = props[i];
- if (style[prop] && style[prop] != 'auto') {
+ if (style[prop] && style[prop] !== 'auto') {
options[i < 2 ? 'align' : 'verticalAlign'] = prop;
options[i < 2 ? 'x' : 'y'] = pInt(style[prop]) * (i % 2 ? -1 : 1);
}
@@ -6504,9 +7031,9 @@
// an inverted chart can't take a column series and vice versa
if (hasRendered) {
- if (inverted && type == 'column') {
+ if (inverted && type === 'column') {
typeClass = seriesTypes.bar;
- } else if (!inverted && type == 'bar') {
+ } else if (!inverted && type === 'bar') {
typeClass = seriesTypes.column;
}
}
@@ -6541,18 +7068,20 @@
function addSeries(options, redraw, animation) {
var series;
- setAnimation(animation, chart);
- redraw = pick(redraw, true); // defaults to true
-
- fireEvent(chart, 'addSeries', { options: options }, function() {
- series = initSeries(options);
- series.isDirty = true;
+ if (options) {
+ setAnimation(animation, chart);
+ redraw = pick(redraw, true); // defaults to true
- chart.isDirtyLegend = true; // the series array is out of sync with the display
- if (redraw) {
- chart.redraw();
- }
- });
+ fireEvent(chart, 'addSeries', { options: options }, function() {
+ series = initSeries(options);
+ series.isDirty = true;
+
+ chart.isDirtyLegend = true; // the series array is out of sync with the display
+ if (redraw) {
+ chart.redraw();
+ }
+ });
+ }
return series;
}
@@ -6591,9 +7120,10 @@
function redraw(animation) {
var redrawLegend = chart.isDirtyLegend,
hasStackedSeries,
- isDirtyBox = chart.isDirtyBox,
+ isDirtyBox = chart.isDirtyBox, // todo: check if it has actually changed?
seriesLength = series.length,
i = seriesLength,
+ clipRect = chart.clipRect,
serie;
setAnimation(animation, chart);
@@ -6622,7 +7152,7 @@
serie.cleanData();
serie.getSegments();
- if (serie.options.legendType == 'point') {
+ if (serie.options.legendType === 'point') {
redrawLegend = true;
}
}
@@ -6657,17 +7187,31 @@
isDirtyBox = true; // always redraw box to reflect changes in the axis labels
}
});
+
+
}
// the plot areas size has changed
if (isDirtyBox) {
drawChartBox();
placeTrackerGroup();
+
+ // move clip rect
+ if (clipRect) {
+ stop(clipRect);
+ clipRect.animate({ // for chart resize
+ width: chart.plotSizeX,
+ height: chart.plotSizeY
+ });
+ }
+
}
+
// redraw affected series
each(series, function(serie) {
- if (serie.isDirty && serie.visible) {
+ if (serie.isDirty && serie.visible &&
+ (!serie.isCartesian || serie.xAxis)) { // issue #153
serie.redraw();
}
});
@@ -6753,14 +7297,14 @@
// search axes
for (i = 0; i < axes.length; i++) {
- if (axes[i].options.id == id) {
+ if (axes[i].options.id === id) {
return axes[i];
}
}
// search series
for (i = 0; i < series.length; i++) {
- if (series[i].options.id == id) {
+ if (series[i].options.id === id) {
return series[i];
}
}
@@ -6769,7 +7313,7 @@
for (i = 0; i < series.length; i++) {
data = series[i].data;
for (j = 0; j < data.length; j++) {
- if (data[j].id == id) {
+ if (data[j].id === id) {
return data[j];
}
}
@@ -6904,7 +7448,6 @@
title.destroy(); // remove old
title = null;
}
-
if (chartTitleOptions && chartTitleOptions.text && !title) {
chart[name] = renderer.text(
chartTitleOptions.text,
@@ -6920,7 +7463,6 @@
.add()
.align(chartTitleOptions, false, spacingBox);
}
-
});
}
@@ -6978,7 +7520,8 @@
id: containerId
}, extend({
position: RELATIVE,
- //overflow: HIDDEN,
+ overflow: HIDDEN, // needed for context menu (avoid scrollbars) and
+ // content overflow in IE
width: chartWidth + PX,
height: chartHeight + PX,
textAlign: 'left'
@@ -6987,23 +7530,24 @@
);
chart.renderer = renderer =
- optionsChart.renderer == 'SVG' ? // force SVG, used for SVG export
- new SVGRenderer(container, chartWidth, chartHeight) :
+ optionsChart.forExport ? // force SVG, used for SVG export
+ new SVGRenderer(container, chartWidth, chartHeight, true) :
new Renderer(container, chartWidth, chartHeight);
// Issue 110 workaround:
// In Firefox, if a div is positioned by percentage, its pixel position may land
// between pixels. The container itself doesn't display this, but an SVG element
- // inside this container will be drawn at subpixel precition. In order to draw
- // sharp lines, this must be compensated for.
- var subPixelFix;
- if (/Gecko/.test(userAgent)) {
+ // inside this container will be drawn at subpixel precision. In order to draw
+ // sharp lines, this must be compensated for. This doesn't seem to work inside
+ // iframes though (like in jsFiddle).
+ var subPixelFix, rect;
+ if (isFirefox && container.getBoundingClientRect) {
subPixelFix = function() {
css(container, { left: 0, top: 0 });
- var rect = container.getBoundingClientRect();
+ rect = container.getBoundingClientRect();
css(container, {
- left: (-rect.left % 1) + PX,
- top: (-rect.top % 1) + PX
+ left: (-(rect.left - pInt(rect.left))) + PX,
+ top: (-(rect.top - pInt(rect.top))) + PX
});
};
@@ -7039,24 +7583,23 @@
// adjust for title and subtitle
if ((chart.title || chart.subtitle) && !defined(optionsMarginTop)) {
titleOffset = mathMax(
- chart.title && !chartTitleOptions.floating && !chartTitleOptions.verticalAlign && chartTitleOptions.y || 0,
- chart.subtitle && !chartSubtitleOptions.floating && !chartSubtitleOptions.verticalAlign && chartSubtitleOptions.y || 0
+ (chart.title && !chartTitleOptions.floating && !chartTitleOptions.verticalAlign && chartTitleOptions.y) || 0,
+ (chart.subtitle && !chartSubtitleOptions.floating && !chartSubtitleOptions.verticalAlign && chartSubtitleOptions.y) || 0
);
if (titleOffset) {
plotTop = mathMax(plotTop, titleOffset + pick(chartTitleOptions.margin, 15) + spacingTop);
}
}
-
// adjust for legend
if (legendOptions.enabled && !legendOptions.floating) {
- if (align == 'right') { // horizontal alignment handled first
+ if (align === 'right') { // horizontal alignment handled first
if (!defined(optionsMarginRight)) {
marginRight = mathMax(
marginRight,
legendWidth - legendX + legendMargin + spacingRight
);
}
- } else if (align == 'left') {
+ } else if (align === 'left') {
if (!defined(optionsMarginLeft)) {
plotLeft = mathMax(
plotLeft,
@@ -7064,7 +7607,7 @@
);
}
- } else if (verticalAlign == 'top') {
+ } else if (verticalAlign === 'top') {
if (!defined(optionsMarginTop)) {
plotTop = mathMax(
plotTop,
@@ -7072,7 +7615,7 @@
);
}
- } else if (verticalAlign == 'bottom') {
+ } else if (verticalAlign === 'bottom') {
if (!defined(optionsMarginBottom)) {
marginBottom = mathMax(
marginBottom,
@@ -7101,7 +7644,7 @@
if (!defined(optionsMarginRight)) {
marginRight += axisOffset[1];
}
-
+
setChartSize();
};
@@ -7115,19 +7658,21 @@
function reflow() {
var width = optionsChart.width || renderTo.offsetWidth,
height = optionsChart.height || renderTo.offsetHeight;
-
- if (width != containerWidth || height != containerHeight) {
- clearTimeout(reflowTimeout);
- reflowTimeout = setTimeout(function() {
- resize(width, height, false);
- }, 100);
+
+ if (width && height) { // means container is display:none
+ if (width !== containerWidth || height !== containerHeight) {
+ clearTimeout(reflowTimeout);
+ reflowTimeout = setTimeout(function() {
+ resize(width, height, false);
+ }, 100);
+ }
+ containerWidth = width;
+ containerHeight = height;
}
- containerWidth = width;
- containerHeight = height;
}
- addEvent(window, 'resize', reflow);
+ addEvent(win, 'resize', reflow);
addEvent(chart, 'destroy', function() {
- removeEvent(window, 'resize', reflow);
+ removeEvent(win, 'resize', reflow);
});
}
@@ -7148,14 +7693,14 @@
oldChartHeight = chartHeight;
oldChartWidth = chartWidth;
- chartWidth = mathRound(width);
- chartHeight = mathRound(height);
+ chart.chartWidth = chartWidth = mathRound(width);
+ chart.chartHeight = chartHeight = mathRound(height);
css(container, {
width: chartWidth + PX,
height: chartHeight + PX
});
- renderer.setSize(chartWidth, chartHeight);
+ renderer.setSize(chartWidth, chartHeight, animation);
// update axis lengths for more correct tick intervals:
plotWidth = chartWidth - plotLeft - marginRight;
@@ -7186,7 +7731,7 @@
chartSubtitle.align(null, null, spacingBox);
}
- redraw();
+ redraw(animation);
oldChartHeight = null;
@@ -7197,7 +7742,7 @@
fireEvent(chart, 'endResize', null, function() {
isResizing -= 1;
});
- }, globalAnimation && globalAnimation.duration || 500);
+ }, (globalAnimation && globalAnimation.duration) || 500);
};
/**
@@ -7250,7 +7795,7 @@
};
// Chart area
- mgn = 2 * chartBorderWidth + (optionsChart.shadow ? 8 : 0);
+ mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);
if (chartBorderWidth || chartBackgroundColor) {
if (!chartBackground) {
@@ -7264,10 +7809,9 @@
.add()
.shadow(optionsChart.shadow);
} else { // resize
- chartBackground.animate({
- width: chartWidth - mgn,
- height:chartHeight - mgn
- });
+ chartBackground.animate(
+ chartBackground.crisp(null, null, null, chartWidth - mgn, chartHeight - mgn)
+ );
}
}
@@ -7305,7 +7849,9 @@
})
.add();
} else {
- plotBorder.animate(plotSize);
+ plotBorder.animate(
+ plotBorder.crisp(null, plotLeft, plotTop, plotWidth, plotHeight)
+ );
}
}
@@ -7390,10 +7936,6 @@
}
// Credits
-
- // beta mark
- credits.enabled = true;
- credits.text = 'Highcharts v2.1 Beta';
if (credits.enabled && !chart.credits) {
creditsHref = credits.href;
renderer.text(
@@ -7433,7 +7975,7 @@
*/
function destroy() {
var i = series.length,
- parentNode = container.parentNode;
+ parentNode = container && container.parentNode;
// fire the chart.destoy event
fireEvent(chart, 'destroy');
@@ -7452,16 +7994,21 @@
}
// remove container and all SVG
- container.innerHTML = '';
- removeEvent(container);
- if (parentNode) {
- parentNode.removeChild(container);
+ if (container) { // can break in IE when destroyed before finished loading
+ container.innerHTML = '';
+ removeEvent(container);
+ if (parentNode) {
+ parentNode.removeChild(container);
+ }
+
+ // IE6 leak
+ container = null;
}
- // IE6 leak
- container = null;
// IE7 leak
- renderer.alignedObjects = null;
+ if (renderer) { // can break in IE when destroyed before finished loading
+ renderer.alignedObjects = null;
+ }
// memory and CPU leak
clearInterval(tooltipInterval);
@@ -7479,15 +8026,23 @@
// VML namespaces can't be added until after complete. Listening
// for Perini's doScroll hack is not enough.
- var onreadystatechange = 'onreadystatechange';
- if (!hasSVG && doc.readyState != 'complete') {
- doc.attachEvent(onreadystatechange, function() {
- doc.detachEvent(onreadystatechange, firstRender);
- firstRender();
+ var ONREADYSTATECHANGE = 'onreadystatechange',
+ COMPLETE = 'complete';
+ // Note: in spite of JSLint's complaints, win == win.top is required
+ if (!hasSVG && win == win.top && doc.readyState !== COMPLETE) {
+ doc.attachEvent(ONREADYSTATECHANGE, function() {
+ doc.detachEvent(ONREADYSTATECHANGE, firstRender);
+ if (doc.readyState === COMPLETE) {
+ firstRender();
+ }
});
return;
}
-
+
+ // Set to zero for each new chart
+ colorCounter = 0;
+ symbolCounter = 0;
+
// create the container
getContainer();
@@ -7530,11 +8085,6 @@
// Run chart
-
- // Set to zero for each new chart
- colorCounter = 0;
- symbolCounter = 0;
-
// Destroy the chart and free up memory.
addEvent(win, 'unload', destroy);
@@ -7620,7 +8170,6 @@
// Hook for exporting module
Chart.prototype.callbacks = [];
-
/**
* The Point object and prototype. Inheritable and used as base for PiePoint
*/
@@ -7699,6 +8248,7 @@
if (point.x === UNDEFINED) {
point.x = series.autoIncrement();
}
+
},
/**
@@ -7711,12 +8261,10 @@
series.chart.pointCount--;
- if (point == series.chart.hoverPoint) {
+ if (point === series.chart.hoverPoint) {
point.onMouseOut();
}
- if (point == series.hoverPoint) {
- series.hoverPoint = null;
- }
+ series.chart.hoverPoints = null; // remove reference
// remove all events
removeEvent(point);
@@ -7736,9 +8284,24 @@
}
- },
+ },
/**
+ * Return the configuration hash needed for the data label and tooltip formatters
+ */
+ getLabelConfig: function() {
+ var point = this;
+ return {
+ x: point.category,
+ y: point.y,
+ series: point.series,
+ point: point,
+ percentage: point.percentage,
+ total: point.total || point.stackTotal
+ };
+ },
+
+ /**
* Toggle the selection status of a point
* @param {Boolean} selected Whether to select or unselect the point.
* @param {Boolean} accumulate Whether to add to the previous selection. By default,
@@ -7758,7 +8321,7 @@
// unselect all other points unless Ctrl or Cmd + click
if (!accumulate) {
each(chart.getSelectedPoints(), function (loopPoint) {
- if (loopPoint.selected && loopPoint != point) {
+ if (loopPoint.selected && loopPoint !== point) {
loopPoint.selected = false;
loopPoint.setState(NORMAL_STATE);
loopPoint.firePointEvent('unselect');
@@ -7775,7 +8338,7 @@
hoverPoint = chart.hoverPoint;
// set normal state to previous series
- if (hoverPoint && hoverPoint != point) {
+ if (hoverPoint && hoverPoint !== point) {
hoverPoint.onMouseOut();
}
@@ -7801,6 +8364,23 @@
},
/**
+ * Extendable method for formatting each point's tooltip line
+ *
+ * @param {Boolean} useHeader Whether a common header is used for multiple series in the tooltip
+ *
+ * @return {String} A string to be concatenated in to the common tooltip text
+ */
+ tooltipFormatter: function(useHeader) {
+ var point = this,
+ series = point.series;
+
+ return ['<span style="color:'+ series.color +'">', (point.name || series.name), '</span>: ',
+ (!useHeader ? ('<b>x = '+ (point.name || point.x) + ',</b> ') : ''),
+ '<b>', (!useHeader ? 'y = ' : '' ), point.y, '</b>'].join('');
+
+ },
+
+ /**
* Update the point with new options (typically x/y data) and optionally redraw the series.
*
* @param {Object} options Point options as defined in the series.data array
@@ -7812,20 +8392,29 @@
update: function(options, redraw, animation) {
var point = this,
series = point.series,
+ dataLabel = point.dataLabel,
+ graphic = point.graphic,
chart = series.chart;
- setAnimation(animation, chart);
redraw = pick(redraw, true);
// fire the event with a default handler of doing the update
point.firePointEvent('update', { options: options }, function() {
point.applyOptions(options);
-
+
+ // update visuals
+ if (isObject(options)) {
+ series.getAttribs();
+ if (graphic) {
+ graphic.attr(point.pointAttr[series.state]);
+ }
+ }
+
// redraw
series.isDirty = true;
if (redraw) {
- chart.redraw();
+ chart.redraw(animation);
}
});
},
@@ -7882,7 +8471,7 @@
}
// add default handler if in selection mode
- if (eventType == 'click' && seriesOptions.allowPointSelect) {
+ if (eventType === 'click' && seriesOptions.allowPointSelect) {
defaultFunction = function (event) {
// Control key is for Windows, meta (= Cmd key) for Mac, Shift for Opera
point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);
@@ -7908,6 +8497,7 @@
addEvent(point, eventType, events[eventType]);
}
this.hasImportedEvents = true;
+
}
},
@@ -7927,19 +8517,17 @@
chart = series.chart,
pointAttr = point.pointAttr;
- if (!state) {
- state = NORMAL_STATE; // empty string
- }
+ state = state || NORMAL_STATE; // empty string
if (
// already has this state
- state == point.state ||
+ state === point.state ||
// selected points don't respond to hover
- (point.selected && state != SELECT_STATE) ||
+ (point.selected && state !== SELECT_STATE) ||
// series' state options is disabled
(stateOptions[state] && stateOptions[state].enabled === false) ||
// point marker's state options is disabled
- (state && (stateDisabled || normalDisabled && !markerStateOptions.enabled))
+ (state && (stateDisabled || (normalDisabled && !markerStateOptions.enabled)))
) {
return;
@@ -8020,10 +8608,18 @@
for (eventType in events) {
addEvent(series, eventType, events[eventType]);
}
+ if (
+ (events && events.click) ||
+ (options.point && options.point.events && options.point.events.click) ||
+ options.allowPointSelect
+ ) {
+ chart.runTrackerClick = true;
+ }
series.getColor();
series.getSymbol();
+
// set the data
series.setData(options.data, false);
@@ -8067,21 +8663,29 @@
// remove points with equal x values
// record the closest distance for calculation of column widths
- for (i = data.length - 1; i >= 0; i--) {
+ /*for (i = data.length - 1; i >= 0; i--) {
if (data[i - 1]) {
if (data[i - 1].x == data[i].x) {
+ data[i - 1].destroy();
data.splice(i - 1, 1); // remove the duplicate
}
-
}
- }
+ }*/
+ // connect nulls
+ if (series.options.connectNulls) {
+ for (i = data.length - 1; i >= 0; i--) {
+ if (data[i].y === null && data[i - 1] && data[i + 1]) {
+ data.splice(i, 1);
+ }
+ }
+ }
// find the closes pair of points
for (i = data.length - 1; i >= 0; i--) {
if (data[i - 1]) {
interval = data[i].x - data[i - 1].x;
- if (smallestInterval === UNDEFINED || interval < smallestInterval) {
+ if (interval > 0 && (smallestInterval === UNDEFINED || interval < smallestInterval)) {
smallestInterval = interval;
closestPoints = i;
}
@@ -8110,7 +8714,7 @@
segments.push(data.slice(lastNull + 1, i));
}
lastNull = i;
- } else if (i == data.length - 1) { // last value
+ } else if (i === data.length - 1) { // last value
segments.push(data.slice(lastNull + 1, i + 1));
}
});
@@ -8188,6 +8792,7 @@
if (shift) {
data[0].remove(false);
}
+ series.getAttribs();
// redraw
@@ -8207,7 +8812,7 @@
oldData = series.data,
initialColor = series.initialColor,
chart = series.chart,
- i = oldData && oldData.length || 0;
+ i = (oldData && oldData.length) || 0;
series.xIncrement = null; // reset for new data
if (defined(initialColor)) { // reset colors for pie
@@ -8229,6 +8834,10 @@
series.cleanData();
series.getSegments();
+
+ // cache attributes for shapes
+ series.getAttribs();
+
// redraw
series.isDirty = true;
chart.isDirtyBox = true;
@@ -8248,8 +8857,6 @@
remove: function(redraw, animation) {
var series = this,
chart = series.chart;
-
- setAnimation(animation, chart);
redraw = pick(redraw, true);
if (!series.isRemoving) { /* prevent triggering native event in jQuery
@@ -8267,7 +8874,7 @@
// redraw
chart.isDirtyLegend = chart.isDirtyBox = true;
if (redraw) {
- chart.redraw();
+ chart.redraw(animation);
}
});
@@ -8285,7 +8892,7 @@
stacking = series.options.stacking,
categories = series.xAxis.categories,
yAxis = series.yAxis,
- data = series.data,
+ data = series.data,
i = data.length;
// do the translation
@@ -8293,32 +8900,35 @@
var point = data[i],
xValue = point.x,
yValue = point.y,
- yBottom,
+ yBottom = point.low,
stack = yAxis.stacks[(yValue < 0 ? '-' : '') + series.stackKey],
pointStack,
pointStackTotal;
point.plotX = series.xAxis.translate(xValue);
// calculate the bottom y value for stacked series
- if (stacking && series.visible && stack[xValue]) {
+ if (stacking && series.visible && stack && stack[xValue]) {
pointStack = stack[xValue];
pointStackTotal = pointStack.total;
pointStack.cum = yBottom = pointStack.cum - yValue; // start from top
yValue = yBottom + yValue;
- if (stacking == 'percent') {
+ if (stacking === 'percent') {
yBottom = pointStackTotal ? yBottom * 100 / pointStackTotal : 0;
yValue = pointStackTotal ? yValue * 100 / pointStackTotal : 0;
}
point.percentage = pointStackTotal ? point.y * 100 / pointStackTotal : 0;
point.stackTotal = pointStackTotal;
- point.yBottom = yAxis.translate(yBottom, 0, 1);
+ }
+
+ if (defined(yBottom)) {
+ point.yBottom = yAxis.translate(yBottom, 0, 1, 0, 1);
}
// set the y value
if (yValue !== null) {
- point.plotY = yAxis.translate(yValue, 0, 1);
+ point.plotY = yAxis.translate(yValue, 0, 1, 0, 1);
}
// set client related positions for mouse tracking
@@ -8363,8 +8973,8 @@
each(data, function(point, i) {
- low = data[i - 1] ? data[i - 1].high + 1 : 0;
- high = point.high = data[i + 1] ? (
+ low = data[i - 1] ? data[i - 1]._high + 1 : 0;
+ high = point._high = data[i + 1] ? (
mathFloor((point.plotX + (data[i + 1] ?
data[i + 1].plotX : plotSize)) / 2)) :
plotSize;
@@ -8387,12 +8997,12 @@
chart = series.chart,
hoverSeries = chart.hoverSeries;
- if (chart.mouseIsDown) {
+ if (!hasTouch && chart.mouseIsDown) {
return;
}
// set normal state to previous series
- if (hoverSeries && hoverSeries != series) {
+ if (hoverSeries && hoverSeries !== series) {
hoverSeries.onMouseOut();
}
@@ -8413,7 +9023,6 @@
// hover this
series.setState(HOVER_STATE);
chart.hoverSeries = series;
-
},
/**
@@ -8470,17 +9079,14 @@
} else { // run the animation
clipRect.animate({
width: chart.plotSizeX
- }, animation && extend(animation, {
- complete: function() {
- clipRect.isAnimating = false;
- }
- }));
+ }, animation);
// delete this function to allow it only once
this.animate = null;
}
},
+
/**
* Draw the markers
*/
@@ -8575,36 +9181,29 @@
stateOptions = normalOptions.states,
stateOptionsHover = stateOptions[HOVER_STATE],
pointStateOptionsHover,
- normalDefaults = {},
seriesColor = series.color,
+ normalDefaults = {
+ stroke: seriesColor,
+ fill: seriesColor
+ },
data = series.data,
i,
point,
seriesPointAttr = [],
pointAttr,
pointAttrToOptions = series.pointAttrToOptions,
- hasPointSpecificOptions;
+ hasPointSpecificOptions,
+ key;
// series type specific modifications
if (series.options.marker) { // line, spline, area, areaspline, scatter
- // if no color is given for the point, use the general series color
- normalDefaults = {
- stroke: seriesColor,
- fill: seriesColor
- };
-
// if no hover radius is given, default to normal radius + 2
stateOptionsHover.radius = stateOptionsHover.radius || normalOptions.radius + 2;
stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + 1;
} else { // column, bar, pie
- // if no color is given for the point, use the general series color
- normalDefaults = {
- fill: seriesColor
- };
-
// if no hover color is given, brighten the normal color
stateOptionsHover.color = stateOptionsHover.color ||
Color(stateOptionsHover.color || seriesColor)
@@ -8638,7 +9237,7 @@
// check if the point has specific visual options
if (point.options) {
- for (var key in pointAttrToOptions) {
+ for (key in pointAttrToOptions) {
if (defined(normalOptions[pointAttrToOptions[key]])) {
hasPointSpecificOptions = true;
}
@@ -8703,6 +9302,8 @@
chart = series.chart,
//chartSeries = series.chart.series,
clipRect = series.clipRect,
+ issue134 = /\/5[0-9\.]+ (Safari|Mobile)\//.test(userAgent), // todo: update when Safari bug is fixed
+ destroy,
prop;
// remove all events
@@ -8720,15 +9321,18 @@
// destroy all SVGElements associated to the series
each(['area', 'graph', 'dataLabelsGroup', 'group', 'tracker'], function(prop) {
if (series[prop]) {
- series[prop].destroy();
+
+ // issue 134 workaround
+ destroy = issue134 && prop === 'group' ?
+ 'hide' :
+ 'destroy';
+
+ series[prop][destroy]();
}
});
- if (clipRect && clipRect != series.chart.clipRect) {
- clipRect.destroy();
- }
// remove from hoverSeries
- if (chart.hoverSeries == series) {
+ if (chart.hoverSeries === series) {
chart.hoverSeries = null;
}
erase(chart.series, series);
@@ -8754,15 +9358,43 @@
chart = series.chart,
inverted = chart.inverted,
seriesType = series.type,
- color;
-
+ color,
+ stacking = series.options.stacking,
+ isBarLike = seriesType === 'column' || seriesType === 'bar',
+ vAlignIsNull = options.verticalAlign === null,
+ yIsNull = options.y === null;
+
+ if (isBarLike) {
+ if (stacking) {
+ // In stacked series the default label placement is inside the bars
+ if (vAlignIsNull) {
+ options = merge(options, {verticalAlign: 'middle'});
+ }
+
+ // If no y delta is specified, try to create a good default
+ if (yIsNull) {
+ options = merge(options, {y: {top: 14, middle: 4, bottom: -6}[options.verticalAlign]});
+ }
+ } else {
+ // In non stacked series the default label placement is on top of the bars
+ if (vAlignIsNull) {
+ options = merge(options, {verticalAlign: 'top'});
+ }
+
+ // If no y delta is specified, set the default
+ if (yIsNull) {
+ options = merge(options, {y: -6});
+ }
+ }
+ }
+
// create a separate group for the data labels to avoid rotation
if (!dataLabelsGroup) {
dataLabelsGroup = series.dataLabelsGroup =
- chart.renderer.g(PREFIX +'data-labels')
+ chart.renderer.g('data-labels')
.attr({
visibility: series.visible ? VISIBLE : HIDDEN,
- zIndex: 5
+ zIndex: 6
})
.translate(chart.plotLeft, chart.plotTop)
.add();
@@ -8770,46 +9402,45 @@
// determine the color
color = options.color;
- if (color == 'auto') { // 1.0 backwards compatibility
+ if (color === 'auto') { // 1.0 backwards compatibility
color = null;
}
options.style.color = pick(color, series.color);
// make the labels for each point
each(data, function(point, i){
- var plotX = pick(point.barX, point.plotX, -999),
+ var barX = point.barX,
+ plotX = (barX && barX + point.barW / 2) || point.plotX || -999,
plotY = pick(point.plotY, -999),
dataLabel = point.dataLabel,
align = options.align;
// get the string
- str = options.formatter.call({
- x: point.x,
- y: point.y,
- series: series,
- point: point,
- percentage: point.percentage,
- total: point.total || point.stackTotal
- });
+ str = options.formatter.call(point.getLabelConfig());
x = (inverted ? chart.plotWidth - plotY : plotX) + options.x;
y = (inverted ? chart.plotHeight - plotX : plotY) + options.y;
- //align = labelPos ? labelPos[6] : options.align;
// in columns, align the string to the column
- if (seriesType == 'column') {
- x += {
- center: point.barW / 2,
- right: point.barW
- }[align] || 0;
+ if (seriesType === 'column') {
+ x += { left: -1, right: 1 }[align] * point.barW / 2 || 0;
}
+ // update existing label
if (dataLabel) {
- dataLabel.animate({
- x: x,
- y: y
- });
- } else if (str) {
- point.dataLabel = chart.renderer.text(
+ // vertically centered
+ if (inverted && !options.y) {
+ y = y + pInt(dataLabel.styles.lineHeight) * 0.9 - dataLabel.getBBox().height / 2;
+ }
+ dataLabel
+ .attr({
+ text: str
+ }).animate({
+ x: x,
+ y: y
+ });
+ // create new label
+ } else if (defined(str)) {
+ dataLabel = point.dataLabel = chart.renderer.text(
str,
x,
y
@@ -8821,9 +9452,32 @@
})
.css(options.style)
.add(dataLabelsGroup);
+ // vertically centered
+ if (inverted && !options.y) {
+ dataLabel.attr({
+ y: y + pInt(dataLabel.styles.lineHeight) * 0.9 - dataLabel.getBBox().height / 2
+ });
+ }
}
-
+
+ /*if (series.isCartesian) {
+ dataLabel[chart.isInsidePlot(plotX, plotY) ? 'show' : 'hide']();
+ }*/
+
+ if (isBarLike && series.options.stacking) {
+ var barY = point.barY,
+ barW = point.barW,
+ barH = point.barH;
+
+ dataLabel.align(options, null,
+ {
+ x: inverted ? chart.plotWidth - barY - barH : barX,
+ y: inverted ? chart.plotHeight - barX - barW : barY,
+ width: inverted ? barH : barW,
+ height: inverted ? barW : barH
+ });
+ }
});
}
},
@@ -8854,67 +9508,72 @@
// divide into segments and build graph and area paths
each(series.segments, function(segment) {
- if (segment.length > 1) {
- segmentPath = [];
+ segmentPath = [];
+
+ // build the segment line
+ each(segment, function(point, i) {
+
+ if (series.getPointSpline) { // generate the spline as defined in the SplineSeries object
+ segmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));
- // build the segment line
- each(segment, function(point, i) {
-
- if (series.getPointSpline) { // generate the spline as defined in the SplineSeries object
- segmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));
-
- } else {
+ } else {
+
+ // moveTo or lineTo
+ segmentPath.push(i ? L : M);
- // moveTo or lineTo
- segmentPath.push(i ? L : M);
-
- // step line?
- if (i && options.step) {
- var lastPoint = segment[i - 1];
- segmentPath.push(
- point.plotX,
- lastPoint.plotY
- );
- }
-
- // normal line to next point
+ // step line?
+ if (i && options.step) {
+ var lastPoint = segment[i - 1];
segmentPath.push(
point.plotX,
- point.plotY
+ lastPoint.plotY
);
}
- });
- graphPath = graphPath.concat(segmentPath);
-
- // build the area
- if (useArea) {
- var areaSegmentPath = [],
- i,
- segLength = segmentPath.length;
- for (i = 0; i < segLength; i++) {
- areaSegmentPath.push(segmentPath[i]);
- }
- if (options.stacking && series.type != 'areaspline') {
- // follow stack back. Todo: implement areaspline
- for (i = segment.length - 1; i >= 0; i--) {
- areaSegmentPath.push(segment[i].plotX, segment[i].yBottom);
- }
- } else { // follow zero line back
- areaSegmentPath.push(
- L,
- segment[segment.length - 1].plotX,
- translatedThreshold,
- L,
- segment[0].plotX,
- translatedThreshold
- );
- }
- areaPath = areaPath.concat(areaSegmentPath);
+ // normal line to next point
+ segmentPath.push(
+ point.plotX,
+ point.plotY
+ );
}
+ });
+
+ // add the segment to the graph, or a single point for tracking
+ if (segment.length > 1) {
+ graphPath = graphPath.concat(segmentPath);
} else {
singlePoints.push(segment[0]);
}
+
+ // build the area
+ if (useArea) {
+ var areaSegmentPath = [],
+ i,
+ segLength = segmentPath.length;
+ for (i = 0; i < segLength; i++) {
+ areaSegmentPath.push(segmentPath[i]);
+ }
+ if (segLength === 3) { // for animation from 1 to two points
+ areaSegmentPath.push(L, segmentPath[1], segmentPath[2]);
+ }
+ if (options.stacking && series.type !== 'areaspline') {
+ // follow stack back. Todo: implement areaspline
+ for (i = segment.length - 1; i >= 0; i--) {
+ areaSegmentPath.push(segment[i].plotX, segment[i].yBottom);
+ }
+
+ } else { // follow zero line back
+ areaSegmentPath.push(
+ L,
+ segment[segment.length - 1].plotX,
+ translatedThreshold,
+ L,
+ segment[0].plotX,
+ translatedThreshold
+ );
+ }
+ areaPath = areaPath.concat(areaSegmentPath);
+ }
});
// used in drawTracker:
@@ -8970,18 +9629,21 @@
group,
setInvert,
options = series.options,
- doAnimation = options.animation && series.animate,
+ animation = options.animation,
+ doAnimation = animation && series.animate,
+ duration = doAnimation ? (animation && animation.duration) || 500 : 0,
+ clipRect = series.clipRect,
renderer = chart.renderer;
// Add plot area clipping rectangle. If this is before chart.hasRendered,
// create one shared clipRect.
- if (!series.clipRect) {
- series.clipRect = !chart.hasRendered && chart.clipRect ?
+ if (!clipRect) {
+ clipRect = series.clipRect = !chart.hasRendered && chart.clipRect ?
chart.clipRect :
renderer.clipRect(0, 0, chart.plotSizeX, chart.plotSizeY);
if (!chart.clipRect) {
- chart.clipRect = series.clipRect;
+ chart.clipRect = clipRect;
}
}
@@ -9018,7 +9680,7 @@
}
// cache attributes for shapes
- series.getAttribs();
+ //series.getAttribs();
// draw the graph if any
if (series.drawGraph) {
@@ -9038,6 +9700,16 @@
series.animate();
}
+ // finish the individual clipRect
+ setTimeout(function() {
+ clipRect.isAnimating = false;
+ group = series.group; // can be destroyed during the timeout
+ if (group && clipRect !== chart.clipRect && clipRect.renderer) {
+ group.clip((series.clipRect = chart.clipRect));
+ clipRect.destroy();
+ }
+ }, duration);
+
series.isDirty = false; // means data is in accordance with what you see
@@ -9052,16 +9724,23 @@
clipRect = series.clipRect,
group = series.group;
- if (clipRect) {
+ /*if (clipRect) {
stop(clipRect);
clipRect.animate({ // for chart resize
width: chart.plotSizeX,
height: chart.plotSizeY
});
- }
+ }*/
// reposition on resize
if (group) {
+ if (chart.inverted) {
+ group.attr({
+ width: chart.plotWidth,
+ height: chart.plotHeight
+ });
+ }
+
group.animate({
translateX: chart.plotLeft,
translateY: chart.plotTop
@@ -9085,7 +9764,7 @@
state = state || NORMAL_STATE;
- if (series.state != state) {
+ if (series.state !== state) {
series.state = state;
if (stateOptions[state] && stateOptions[state].enabled === false) {
@@ -9231,16 +9910,15 @@
singlePoint,
i;
-
// Extend end points. A better way would be to use round linecaps,
// but those are not clickable in VML.
if (trackerPathLength) {
i = trackerPathLength + 1;
while (i--) {
- if (trackerPath[i] == M) { // extend left side
+ if (trackerPath[i] === M) { // extend left side
trackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);
}
- if ((i && trackerPath[i] == M) || i == trackerPathLength) { // extend right side
+ if ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side
trackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);
}
}
@@ -9268,7 +9946,7 @@
zIndex: 1
})
.on(hasTouch ? 'touchstart' : 'mouseover', function() {
- if (chart.hoverSeries != series) {
+ if (chart.hoverSeries !== series) {
series.onMouseOver();
}
})
@@ -9425,7 +10103,7 @@
// series affected by a new column
if (chart.hasRendered) {
each(chart.series, function(otherSeries) {
- if (otherSeries.type == series.type) {
+ if (otherSeries.type === series.type) {
otherSeries.isDirty = true;
}
});
@@ -9438,6 +10116,9 @@
translate: function() {
var series = this,
chart = series.chart,
+ options = series.options,
+ stacking = options.stacking,
+ borderWidth = options.borderWidth,
columnCount = 0,
reversedXAxis = series.xAxis.reversed,
categories = series.xAxis.categories,
@@ -9451,7 +10132,7 @@
// This is called on every series. Consider moving this logic to a
// chart.orderStacks() function and call it on init, addSeries and removeSeries
each(chart.series, function(otherSeries) {
- if (otherSeries.type == series.type) {
+ if (otherSeries.type === series.type && otherSeries.visible) {
if (otherSeries.options.stacking) {
stackKey = otherSeries.stackKey;
if (stackGroups[stackKey] === UNDEFINED) {
@@ -9468,12 +10149,11 @@
// calculate the width and position of each column based on
// the number of column series in the plot, the groupPadding
// and the pointPadding options
- var options = series.options,
- data = series.data,
+ var data = series.data,
closestPoints = series.closestPoints,
categoryWidth = mathAbs(
data[1] ? data[closestPoints].plotX - data[closestPoints - 1].plotX :
- chart.plotSizeX / (categories ? categories.length : 1)
+ chart.plotSizeX / ((categories && categories.length) || 1)
),
groupPadding = categoryWidth * options.groupPadding,
groupWidth = categoryWidth - 2 * groupPadding,
@@ -9481,7 +10161,7 @@
optionPointWidth = options.pointWidth,
pointPadding = defined(optionPointWidth) ? (pointOffsetWidth - optionPointWidth) / 2 :
pointOffsetWidth * options.pointPadding,
- pointWidth = pick(optionPointWidth, pointOffsetWidth - 2 * pointPadding),
+ pointWidth = mathMax(pick(optionPointWidth, pointOffsetWidth - 2 * pointPadding), 1),
colIndex = (reversedXAxis ? columnCount -
series.columnIndex : series.columnIndex) || 0,
pointXOffset = pointPadding + (groupPadding + colIndex *
@@ -9490,16 +10170,22 @@
threshold = options.threshold || 0,
translatedThreshold = series.yAxis.getThreshold(threshold),
minPointLength = pick(options.minPointLength, 5);
-
+
// record the new values
each(data, function(point) {
var plotY = point.plotY,
yBottom = point.yBottom || translatedThreshold,
barX = point.plotX + pointXOffset,
barY = mathCeil(mathMin(plotY, yBottom)),
- barW = pointWidth,
barH = mathCeil(mathMax(plotY, yBottom) - barY),
- trackerY;
+ stack = series.yAxis.stacks[(point.y < 0 ? '-' : '') + series.stackKey],
+ trackerY,
+ shapeArgs;
+
+ // Record the offset'ed position and width of the bar to be able to align the stacking total correctly
+ if (stacking && series.visible && stack && stack[point.x]) {
+ stack[point.x].setOffset(pointXOffset, pointWidth);
+ }
// handle options.minPointLength and tracker for small points
if (mathAbs(barH) < minPointLength) {
@@ -9516,17 +10202,26 @@
extend(point, {
barX: barX,
barY: barY,
- barW: barW,
+ barW: pointWidth,
barH: barH
});
+
+ // create shape type and shape args that are reused in drawPoints and drawTracker
point.shapeType = 'rect';
- point.shapeArgs = {
- x: barX,
- y: barY,
- width: barW,
- height: barH,
+ shapeArgs = extend(chart.renderer.Element.prototype.crisp.apply({}, [
+ borderWidth,
+ barX,
+ barY,
+ pointWidth,
+ barH
+ ]), {
r: options.borderRadius
- };
+ });
+ if (borderWidth % 2) { // correct for shorting in crisp method, visible in stacked columns with 1px border
+ shapeArgs.y -= 1;
+ shapeArgs.height += 1;
+ }
+ point.shapeArgs = shapeArgs;
// make small columns responsive to mouse
point.trackerArgs = defined(trackerY) && merge(point.shapeArgs, {
@@ -9561,7 +10256,7 @@
// draw the columns
each(series.data, function(point) {
var plotY = point.plotY;
- if (plotY !== UNDEFINED && !isNaN(plotY)) {
+ if (plotY !== UNDEFINED && !isNaN(plotY) && point.y !== null) {
graphic = point.graphic;
shapeArgs = point.shapeArgs;
if (graphic) { // update
@@ -9596,6 +10291,7 @@
each(series.data, function(point) {
tracker = point.tracker;
shapeArgs = point.trackerArgs || point.shapeArgs;
+ delete shapeArgs.strokeWidth;
if (point.y !== null) {
if (tracker) {// update
tracker.attr(shapeArgs);
@@ -9609,9 +10305,9 @@
visibility: series.visible ? VISIBLE : HIDDEN,
zIndex: 1
})
- .on('mouseover', function(event) {
+ .on(hasTouch ? 'touchstart' : 'mouseover', function(event) {
rel = event.relatedTarget || event.fromElement;
- if (chart.hoverSeries != series && attr(rel, 'isTracker') != trackerLabel) {
+ if (chart.hoverSeries !== series && attr(rel, 'isTracker') !== trackerLabel) {
series.onMouseOver();
}
point.onMouseOver();
@@ -9620,16 +10316,16 @@
.on('mouseout', function(event) {
if (!series.options.stickyTracking) {
rel = event.relatedTarget || event.toElement;
- if (attr(rel, 'isTracker') != trackerLabel) {
+ if (attr(rel, 'isTracker') !== trackerLabel) {
series.onMouseOut();
}
}
})
.css(css)
- .add(chart.trackerGroup);
+ .add(point.group || chart.trackerGroup); // pies have point group - see issue #118
}
}
- });
+ });
},
@@ -9651,7 +10347,8 @@
*/
each(data, function(point) {
- var graphic = point.graphic;
+ var graphic = point.graphic,
+ shapeArgs = point.shapeArgs;
if (graphic) {
// start values
@@ -9662,8 +10359,8 @@
// animate
graphic.animate({
- height: point.barH,
- y: point.barY
+ height: shapeArgs.height,
+ y: shapeArgs.y
}, series.options.animation);
}
});
@@ -9685,7 +10382,7 @@
// as they are either stacked or grouped
if (chart.hasRendered) {
each(chart.series, function(otherSeries) {
- if (otherSeries.type == series.type) {
+ if (otherSeries.type === series.type) {
otherSeries.isDirty = true;
}
});
@@ -9840,7 +10537,8 @@
var point = this,
series = point.series,
chart = series.chart,
- slicedTranslation = point.slicedTranslation;
+ slicedTranslation = point.slicedTranslation,
+ translation;
setAnimation(animation, chart);
@@ -9850,10 +10548,14 @@
// if called without an argument, toggle
sliced = point.sliced = defined(sliced) ? sliced : !point.sliced;
- point.group.animate({
+ translation = {
translateX: (sliced ? slicedTranslation[0] : chart.plotLeft),
translateY: (sliced ? slicedTranslation[1] : chart.plotTop)
- });
+ };
+ point.group.animate(translation);
+ if (point.shadowGroup) {
+ point.shadowGroup.animate(translation);
+ }
}
});
@@ -9920,10 +10622,11 @@
var total = 0,
series = this,
cumulative = -0.25, // start at top
+ precision = 1000, // issue #172
options = series.options,
slicedOffset = options.slicedOffset,
connectorOffset = slicedOffset + options.borderWidth,
- positions = options.center,
+ positions = options.center.concat([options.size, options.innerSize || 0]),
chart = series.chart,
plotWidth = chart.plotWidth,
plotHeight = chart.plotHeight,
@@ -9940,7 +10643,6 @@
labelDistance = options.dataLabels.distance;
// get positions - either an integer or a percentage string must be given
- positions.push(options.size, options.innerSize || 0);
positions = map(positions, function(length, i) {
isPercent = /%$/.test(length);
@@ -9948,6 +10650,7 @@
// i == 0: centerX, relative to width
// i == 1: centerY, relative to height
// i == 2: size, relative to smallestSize
+ // i == 4: innerSize, relative to smallestSize
[plotWidth, plotHeight, smallestSize, smallestSize][i] *
pInt(length) / 100:
length;
@@ -9974,10 +10677,9 @@
each(data, function(point) {
// set start and end angle
fraction = total ? point.y / total : 0;
- start = cumulative * circ;
+ start = mathRound(cumulative * circ * precision) / precision;
cumulative += fraction;
- end = cumulative * circ;
-
+ end = mathRound(cumulative * circ * precision) / precision;
// set the shape
point.shapeType = 'arc';
@@ -9997,7 +10699,6 @@
mathSin(angle) * slicedOffset + chart.plotTop
], mathRound);
-
// set the anchor point for tooltips
radiusX = mathCos(angle) * positions[2] / 2;
radiusY = mathSin(angle) * positions[2] / 2;
@@ -10037,7 +10738,7 @@
var series = this;
// cache attributes for shapes
- series.getAttribs();
+ //series.getAttribs();
this.drawPoints();
@@ -10065,22 +10766,40 @@
groupTranslation,
//center,
graphic,
+ group,
+ shadow = series.options.shadow,
+ shadowGroup,
shapeArgs;
+
// draw the slices
each(series.data, function(point) {
graphic = point.graphic;
shapeArgs = point.shapeArgs;
+ group = point.group;
+ shadowGroup = point.shadowGroup;
+ // put the shadow behind all points
+ if (shadow && !shadowGroup) {
+ shadowGroup = point.shadowGroup = renderer.g('shadow')
+ .attr({ zIndex: 4 })
+ .add();
+ }
+
// create the group the first time
- if (!point.group) {
- // if the point is sliced, use special translation, else use plot area traslation
- groupTranslation = point.sliced ? point.slicedTranslation : [chart.plotLeft, chart.plotTop];
- point.group = renderer.g('point')
+ if (!group) {
+ group = point.group = renderer.g('point')
.attr({ zIndex: 5 })
- .add()
- .translate(groupTranslation[0], groupTranslation[1]);
+ .add();
+ }
+
+ // if the point is sliced, use special translation, else use plot area traslation
+ groupTranslation = point.sliced ? point.slicedTranslation : [chart.plotLeft, chart.plotTop];
+ group.translate(groupTranslation[0], groupTranslation[1]);
+ if (shadowGroup) {
+ shadowGroup.translate(groupTranslation[0], groupTranslation[1]);
}
+
// draw the slice
if (graphic) {
@@ -10088,8 +10807,12 @@
} else {
point.graphic =
renderer.arc(shapeArgs)
- .attr(point.pointAttr[NORMAL_STATE])
- .add(point.group);
+ .attr(extend(
+ point.pointAttr[NORMAL_STATE],
+ { 'stroke-linejoin': 'round' }
+ ))
+ .add(point.group)
+ .shadow(shadow, shadowGroup);
}
// detect point specific visibility
@@ -10188,7 +10911,8 @@
for (j = 0; j < quarters[i].length; j++) {
point = quarters[i][j];
- if ((dataLabel = point.dataLabel)) {
+ dataLabel = point.dataLabel;
+ if (dataLabel) {
labelPos = point.labelPos;
visibility = VISIBLE;
x = labelPos[0];
@@ -10223,11 +10947,10 @@
visibility = HIDDEN;
}
- if (visibility == VISIBLE) {
+ if (visibility === VISIBLE) {
lastY = y;
}
-
if (secondPass) {
// move or place the data label
@@ -10235,12 +10958,12 @@
.attr({
visibility: visibility,
align: labelPos[6]
- })
- .animate({
+ })[dataLabel.moved ? 'animate' : 'attr']({
x: x + options.x +
({ left: connectorPadding, right: -connectorPadding }[labelPos[6]] || 0),
y: y + options.y
});
+ dataLabel.moved = true;
// draw the connector
if (outside && connectorWidth) {
@@ -10248,7 +10971,7 @@
connectorPath = [
M,
- x + (labelPos[6] == 'left' ? 5 : -5), y, // end of the string at the label
+ x + (labelPos[6] === 'left' ? 5 : -5), y, // end of the string at the label
L,
x, y, // first break, next to the label
L,
@@ -10301,6 +11024,7 @@
getOptions: getOptions,
numberFormat: numberFormat,
Point: Point,
+ Color: Color,
Renderer: Renderer,
seriesTypes: seriesTypes,
setOptions: setOptions,
@@ -10316,6 +11040,7 @@
map: map,
merge: merge,
pick: pick,
- extendClass: extendClass
+ extendClass: extendClass,
+ version: '2.1.5'
};
-})();
+}());
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/javascripts/jquery.js
^
|
@@ -151,4 +151,4 @@
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
+e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
\ No newline at end of file
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/public/javascripts/leaflet.js
^
|
@@ -0,0 +1,114 @@
+/*
+ Copyright (c) 2010-2011, CloudMade, Vladimir Agafonkin
+ Leaflet is a BSD-licensed JavaScript library for map display and interaction.
+ See http://cloudmade.github.com/Leaflet/ for more information.
+*/
+(function(a){var b={VERSION:"0.2",ROOT_URL:function(){for(var a=document.getElementsByTagName("script"),b=/^(.*\/)leaflet-?([\w-]*)\.js.*$/,e=0,f=a.length;e<f;e++){var g=a[e].src;if(g=g&&g.match(b)){if(g[2]=="include")break;return g[1]}}return"../../dist/"}(),noConflict:function(){a.L=this._originalL;return this},_originalL:a.L};window.L=b})(this);L.Util={extend:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=0,d=b.length,e;c<d;c++){e=b[c]||{};for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}return a},bind:function(a,b){return function(){return a.apply(b,arguments)}},stamp:function(){var a=0;return function(b){b._leaflet_id=b._leaflet_id||++a;return b._leaflet_id}}(),requestAnimFrame:function(){function a(a){window.setTimeout(a,1E3/60)}var b=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||
+window.oRequestAnimationFrame||window.msRequestAnimationFrame||a;return function(c,d,e){c=d?L.Util.bind(c,d):d;e&&b===a?c():b(c)}}(),limitExecByInterval:function(a,b,c){function d(){e=!1;f&&(g.callee.apply(c,g),f=!1)}var e,f,g;return function(){g=arguments;e?f=!0:(e=!0,setTimeout(d,b),a.apply(c,g))}},falseFn:function(){return!1},formatNum:function(a,b){var c=Math.pow(10,b||5);return Math.round(a*c)/c},setOptions:function(a,b){a.options=L.Util.extend({},a.options,b)},getParamString:function(a){var b=
+[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);return"?"+b.join("&")}};L.Class=function(){};
+L.Class.extend=function(a){var b=function(){!L.Class._prototyping&&this.initialize&&this.initialize.apply(this,arguments)};L.Class._prototyping=!0;var c=new this;L.Class._prototyping=!1;c.constructor=b;b.prototype=c;c.superclass=this.prototype;a.statics&&(L.Util.extend(b,a.statics),delete a.statics);a.includes&&(L.Util.extend.apply(null,[c].concat(a.includes)),delete a.includes);if(a.options&&c.options)a.options=L.Util.extend({},c.options,a.options);L.Util.extend(c,a);b.extend=arguments.callee;b.include=
+function(a){L.Util.extend(this.prototype,a)};for(var d in this)this.hasOwnProperty(d)&&d!="prototype"&&(b[d]=this[d]);return b};L.Mixin={};
+L.Mixin.Events={addEventListener:function(a,b,c){var d=this._leaflet_events=this._leaflet_events||{};d[a]=d[a]||[];d[a].push({action:b,context:c});return this},hasEventListeners:function(a){return"_leaflet_events"in this&&a in this._leaflet_events&&this._leaflet_events[a].length>0},removeEventListener:function(a,b,c){if(!this.hasEventListeners(a))return this;for(var d=0,e=this._leaflet_events,f=e[a].length;d<f;d++)if(e[a][d].action===b&&(!c||e[a][d].context===c)){e[a].splice(d,1);break}return this},fireEvent:function(a,
+b){if(this.hasEventListeners(a)){for(var c=L.Util.extend({type:a,target:this},b),d=this._leaflet_events[a].slice(),e=0,f=d.length;e<f;e++)d[e].action.call(d[e].context||this,c);return this}}};L.Mixin.Events.on=L.Mixin.Events.addEventListener;L.Mixin.Events.off=L.Mixin.Events.removeEventListener;L.Mixin.Events.fire=L.Mixin.Events.fireEvent;(function(){var a=navigator.userAgent.toLowerCase(),b=!!window.ActiveXObject,c=a.indexOf("webkit")!=-1,d=a.indexOf("mobi")!=-1,e=a.indexOf("android")!=-1,f=window.opera;L.Browser={ie:b,ie6:b&&!window.XMLHttpRequest,webkit:c,webkit3d:c&&"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,mobileWebkit:c&&(d||e),mobileOpera:d&&f,gecko:a.indexOf("gecko")!=-1,android:e};L.Browser.touch=L.Browser.mobileWebkit||L.Browser.mobileOpera})();L.Point=function(a,b,c){this.x=c?Math.round(a):a;this.y=c?Math.round(b):b};
+L.Point.prototype={add:function(a){return this.clone()._add(a)},_add:function(a){this.x+=a.x;this.y+=a.y;return this},subtract:function(a){return this.clone()._subtract(a)},_subtract:function(a){this.x-=a.x;this.y-=a.y;return this},divideBy:function(a,b){return new L.Point(this.x/a,this.y/a,b)},multiplyBy:function(a){return new L.Point(this.x*a,this.y*a)},distanceTo:function(a){var b=a.x-this.x,a=a.y-this.y;return Math.sqrt(b*b+a*a)},round:function(){return this.clone()._round()},_round:function(){this.x=
+Math.round(this.x);this.y=Math.round(this.y);return this},clone:function(){return new L.Point(this.x,this.y)},toString:function(){return"Point("+L.Util.formatNum(this.x)+", "+L.Util.formatNum(this.y)+")"}};L.Bounds=L.Class.extend({initialize:function(a,b){if(a)for(var c=a instanceof Array?a:[a,b],d=0,e=c.length;d<e;d++)this.extend(c[d])},extend:function(a){!this.min&&!this.max?(this.min=new L.Point(a.x,a.y),this.max=new L.Point(a.x,a.y)):(this.min.x=Math.min(a.x,this.min.x),this.max.x=Math.max(a.x,this.max.x),this.min.y=Math.min(a.y,this.min.y),this.max.y=Math.max(a.y,this.max.y))},getCenter:function(a){return new L.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,a)},contains:function(a){var b;
+if(a instanceof L.Bounds)b=a.min,a=a.max;return b.x>=this.min.x&&a.x<=this.max.x&&b.y>=this.min.y&&a.y<=this.max.y}});L.Transformation=L.Class.extend({initialize:function(a,b,c,d){this._a=a;this._b=b;this._c=c;this._d=d},transform:function(a,b){return this._transform(a.clone(),b)},_transform:function(a,b){b=b||1;a.x=b*(this._a*a.x+this._b);a.y=b*(this._c*a.y+this._d);return a},untransform:function(a,b){b=b||1;return new L.Point((a.x/b-this._b)/this._a,(a.y/b-this._d)/this._c)}});L.LineUtil={simplify:function(a,b){if(!b)return a.slice();a=this.reducePoints(a,b);return a=this.simplifyDP(a,b)},pointToSegmentDistance:function(a,b,c){return Math.sqrt(this._sqPointToSegmentDist(a,b,c))},simplifyDP:function(a,b){for(var c=0,d=0,e=b*b,f=1,g=a.length,h;f<g-1;f++)h=this._sqPointToSegmentDist(a[f],a[0],a[g-1]),h>c&&(d=f,c=h);return c>=e?(c=a.slice(0,d),d=a.slice(d),g=this.simplifyDP(c,b).slice(0,g-2),d=this.simplifyDP(d,b),g.concat(d)):[a[0],a[g-1]]},reducePoints:function(a,b){for(var c=
+[a[0]],d=b*b,e=1,f=0,g=a.length;e<g;e++)this._sqDist(a[e],a[f])<d||(c.push(a[e]),f=e);f<g-1&&c.push(a[g-1]);return c},clipSegment:function(a,b,c,d){var d=d?this._lastCode:this._getBitCode(a,c),e=this._getBitCode(b,c);for(this._lastCode=e;;)if(d|e)if(d&e)return!1;else{var f=d||e,g=this._getEdgeIntersection(a,b,f,c),h=this._getBitCode(g,c);f==d?(a=g,d=h):(b=g,e=h)}else return[a,b]},_getEdgeIntersection:function(a,b,c,d){var e=b.x-a.x,b=b.y-a.y,f=d.min,d=d.max;if(c&8)return new L.Point(a.x+e*(d.y-a.y)/
+b,d.y);else if(c&4)return new L.Point(a.x+e*(f.y-a.y)/b,f.y);else if(c&2)return new L.Point(d.x,a.y+b*(d.x-a.x)/e);else if(c&1)return new L.Point(f.x,a.y+b*(f.x-a.x)/e)},_getBitCode:function(a,b){var c=0;a.x<b.min.x?c|=1:a.x>b.max.x&&(c|=2);a.y<b.min.y?c|=4:a.y>b.max.y&&(c|=8);return c},_sqDist:function(a,b){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d},_sqPointToSegmentDist:function(a,b,c){var d=c.x-b.x,e=c.y-b.y;if(!d&&!e)return this._sqDist(a,b);var f=((a.x-b.x)*d+(a.y-b.y)*e)/this._sqDist(b,c);if(f<
+0)return this._sqDist(a,b);if(f>1)return this._sqDist(a,c);b=new L.Point(b.x+d*f,b.y+e*f);return this._sqDist(a,b)}};L.PolyUtil={};L.PolyUtil.clipPolygon=function(a,b){var c,d=[1,4,2,8],e,f,g,h,j,k,l=L.LineUtil;e=0;for(j=a.length;e<j;e++)a[e]._code=l._getBitCode(a[e],b);for(g=0;g<4;g++){k=d[g];c=[];e=0;j=a.length;for(f=j-1;e<j;f=e++)if(h=a[e],f=a[f],h._code&k){if(!(f._code&k))f=l._getEdgeIntersection(f,h,k,b),f._code=l._getBitCode(f,b),c.push(f)}else{if(f._code&k)f=l._getEdgeIntersection(f,h,k,b),f._code=l._getBitCode(f,b),c.push(f);c.push(h)}a=c}return a};L.DomEvent={addListener:function(a,b,c,d){function e(b){return c.call(d||a,b||L.DomEvent._getEvent())}var f=L.Util.stamp(c);if(L.Browser.touch&&b=="dblclick"&&this.addDoubleTapListener)this.addDoubleTapListener(a,e,f);else if("addEventListener"in a)if(b=="mousewheel")a.addEventListener("DOMMouseScroll",e,!1),a.addEventListener(b,e,!1);else if(b=="mouseenter"||b=="mouseleave"){var g=e,e=function(b){if(L.DomEvent._checkMouse(a,b))return g(b)};a.addEventListener(b=="mouseenter"?"mouseover":"mouseout",
+e,!1)}else a.addEventListener(b,e,!1);else"attachEvent"in a&&a.attachEvent("on"+b,e);a["_leaflet_"+b+f]=e},removeListener:function(a,b,c){var c=L.Util.stamp(c),d="_leaflet_"+b+c;handler=a[d];L.Browser.mobileWebkit&&b=="dblclick"&&this.removeDoubleTapListener?this.removeDoubleTapListener(a,c):"removeEventListener"in a?b=="mousewheel"?(a.removeEventListener("DOMMouseScroll",handler,!1),a.removeEventListener(b,handler,!1)):b=="mouseenter"||b=="mouseleave"?a.removeEventListener(b=="mouseenter"?"mouseover":
+"mouseout",handler,!1):a.removeEventListener(b,handler,!1):"detachEvent"in a&&a.detachEvent("on"+b,handler);a[d]=null},_checkMouse:function(a,b){var c=b.relatedTarget;if(!c)return!0;try{for(;c&&c!=a;)c=c.parentNode}catch(d){return!1}return c!=a},_getEvent:function(){var a=window.event;if(!a)for(var b=arguments.callee.caller;b;){if((a=b.arguments[0])&&Event==a.constructor)break;b=b.caller}return a},stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},disableClickPropagation:function(a){L.DomEvent.addListener(a,
+"mousedown",L.DomEvent.stopPropagation);L.DomEvent.addListener(a,"click",L.DomEvent.stopPropagation);L.DomEvent.addListener(a,"dblclick",L.DomEvent.stopPropagation)},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},stop:function(a){L.DomEvent.preventDefault(a);L.DomEvent.stopPropagation(a)},getMousePosition:function(a,b){var c=new L.Point(a.pageX?a.pageX:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,a.pageY?a.pageY:a.clientY+document.body.scrollTop+
+document.documentElement.scrollTop);return b?c.subtract(L.DomUtil.getCumulativeOffset(b)):c},getWheelDelta:function(a){var b=0;a.wheelDelta&&(b=a.wheelDelta/120);a.detail&&(b=-a.detail/3);return b}};L.Util.extend(L.DomEvent,{addDoubleTapListener:function(a,b,c){function d(a){if(a.touches.length==1){var b=Date.now(),c=b-(f||b);j=a.touches[0];g=c>0&&c<=h;f=b}}function e(){if(g)j.type="dblclick",b(j),f=null}var f,g=!1,h=250,j;a["_leaflet_touchstart"+c]=d;a["_leaflet_touchend"+c]=e;a.addEventListener("touchstart",d,!1);a.addEventListener("touchend",e,!1)},removeDoubleTapListener:function(a,b){a.removeEventListener(a,a["_leaflet_touchstart"+b],!1);a.removeEventListener(a,a["_leaflet_touchend"+b],
+!1)}});L.DomUtil={get:function(a){return typeof a=="string"?document.getElementById(a):a},getStyle:function(a,b){var c=a.style[b];!c&&a.currentStyle&&(c=a.currentStyle[b]);if(!c||c=="auto")c=(c=document.defaultView.getComputedStyle(a,null))?c[b]:null;return c=="auto"?null:c},getCumulativeOffset:function(a){var b=0,c=0;do b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;while(a);return new L.Point(c,b)},create:function(a,b,c){a=document.createElement(a);a.className=b;c&&c.appendChild(a);return a},disableTextSelection:function(){document.selection&&
+document.selection.empty&&document.selection.empty();if(!this._onselectstart)this._onselectstart=document.onselectstart,document.onselectstart=L.Util.falseFn},enableTextSelection:function(){document.onselectstart=this._onselectstart;this._onselectstart=null},CLASS_RE:/(\\s|^)'+cls+'(\\s|$)/,hasClass:function(a,b){return a.className.length>0&&RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},addClass:function(a,b){L.DomUtil.hasClass(a,b)||(a.className+=(a.className?" ":"")+b)},setOpacity:function(a,
+b){L.Browser.ie?a.style.filter="alpha(opacity="+Math.round(b*100)+")":a.style.opacity=b},testProp:function(a){for(var b=document.documentElement.style,c=0;c<a.length;c++)if(a[c]in b)return a[c];return!1},getTranslateString:function(a){return L.DomUtil.TRANSLATE_OPEN+a.x+"px,"+a.y+"px"+L.DomUtil.TRANSLATE_CLOSE},getScaleString:function(a,b){return L.DomUtil.getTranslateString(b)+" scale("+a+") "+L.DomUtil.getTranslateString(b.multiplyBy(-1))},setPosition:function(a,b){a._leaflet_pos=b;L.Browser.webkit?
+a.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(b):(a.style.left=b.x+"px",a.style.top=b.y+"px")},getPosition:function(a){return a._leaflet_pos}};
+L.Util.extend(L.DomUtil,{TRANSITION:L.DomUtil.testProp(["transition","webkitTransition","OTransition","MozTransition","msTransition"]),TRANSFORM:L.DomUtil.testProp(["transformProperty","WebkitTransform","OTransform","MozTransform","msTransform"]),TRANSLATE_OPEN:"translate"+(L.Browser.webkit3d?"3d(":"("),TRANSLATE_CLOSE:L.Browser.webkit3d?",0)":")"});L.Draggable=L.Class.extend({includes:L.Mixin.Events,statics:{START:L.Browser.touch?"touchstart":"mousedown",END:L.Browser.touch?"touchend":"mouseup",MOVE:L.Browser.touch?"touchmove":"mousemove",TAP_TOLERANCE:15},initialize:function(a,b){this._element=a;this._dragStartTarget=b||a},enable:function(){if(!this._enabled)L.DomEvent.addListener(this._dragStartTarget,L.Draggable.START,this._onDown,this),this._enabled=!0},disable:function(){if(this._enabled)L.DomEvent.removeListener(this._dragStartTarget,
+L.Draggable.START,this._onDown),this._enabled=!1},_onDown:function(a){if(!(a.shiftKey||a.which!=1&&a.button!=1&&!a.touches)&&!(a.touches&&a.touches.length>1)){var b=a.touches&&a.touches.length==1?a.touches[0]:a;L.DomEvent.preventDefault(a);L.Browser.mobileWebkit&&(b.target.className+=" leaflet-active");this._moved=!1;L.DomUtil.disableTextSelection();this._setMovingCursor();this._startPos=this._newPos=L.DomUtil.getPosition(this._element);this._startPoint=new L.Point(b.clientX,b.clientY);L.DomEvent.addListener(document,
+L.Draggable.MOVE,this._onMove,this);L.DomEvent.addListener(document,L.Draggable.END,this._onUp,this)}},_onMove:function(a){if(!(a.touches&&a.touches.length>1)){L.DomEvent.preventDefault(a);a=a.touches&&a.touches.length==1?a.touches[0]:a;if(!this._moved)this.fire("dragstart"),this._moved=!0;this._newPos=this._startPos.add(new L.Point(a.clientX,a.clientY)).subtract(this._startPoint);L.Util.requestAnimFrame(this._updatePosition,this,!0);this.fire("drag")}},_updatePosition:function(){L.DomUtil.setPosition(this._element,
+this._newPos)},_onUp:function(a){if(a.changedTouches){var a=a.changedTouches[0],b=a.target,c=this._newPos&&this._newPos.distanceTo(this._startPos)||0;b.className=b.className.replace(" leaflet-active","");c<L.Draggable.TAP_TOLERANCE&&this._simulateEvent("click",a)}L.DomUtil.enableTextSelection();this._restoreCursor();L.DomEvent.removeListener(document,L.Draggable.MOVE,this._onMove);L.DomEvent.removeListener(document,L.Draggable.END,this._onUp);this._moved&&this.fire("dragend")},_removeActiveClass:function(){},
+_setMovingCursor:function(){this._bodyCursor=document.body.style.cursor;document.body.style.cursor="move"},_restoreCursor:function(){document.body.style.cursor=this._bodyCursor},_simulateEvent:function(a,b){var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null);b.target.dispatchEvent(c)}});L.Transition=L.Class.extend({includes:L.Mixin.Events,statics:{CUSTOM_PROPS_SETTERS:{position:L.DomUtil.setPosition},implemented:function(){return L.Transition.NATIVE||L.Transition.TIMER}},options:{easing:"ease",duration:0.5},_setProperty:function(a,b){var c=L.Transition.CUSTOM_PROPS_SETTERS;if(a in c)c[a](this._el,b);else this._el.style[a]=b}});L.Transition=L.Transition.extend({statics:function(){var a=L.DomUtil.TRANSITION;return{NATIVE:!!a,TRANSITION:a,PROPERTY:a+"Property",DURATION:a+"Duration",EASING:a+"TimingFunction",END:a=="webkitTransition"||a=="OTransition"?a+"End":"transitionend",CUSTOM_PROPS_PROPERTIES:{position:L.Browser.webkit?L.DomUtil.TRANSFORM:"top, left"}}}(),options:{fakeStepInterval:100},initialize:function(a,b){this._el=a;L.Util.setOptions(this,b);L.DomEvent.addListener(a,L.Transition.END,this._onTransitionEnd,this);this._onFakeStep=
+L.Util.bind(this._onFakeStep,this)},run:function(a){var b,c=[],d=L.Transition.CUSTOM_PROPS_PROPERTIES;for(b in a)a.hasOwnProperty(b)&&(b=d[b]?d[b]:b,b=b.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}),c.push(b));this._el.style[L.Transition.DURATION]=this.options.duration+"s";this._el.style[L.Transition.EASING]=this.options.easing;this._el.style[L.Transition.PROPERTY]=c.join(", ");for(b in a)a.hasOwnProperty(b)&&this._setProperty(b,a[b]);this._inProgress=!0;this.fire("start");L.Transition.NATIVE?
+this._timer=setInterval(this._onFakeStep,this.options.fakeStepInterval):this._onTransitionEnd()},_onFakeStep:function(){this.fire("step")},_onTransitionEnd:function(){if(this._inProgress)this._inProgress=!1,clearInterval(this._timer),this._el.style[L.Transition.PROPERTY]="none",this.fire("step"),this.fire("end")}});L.Transition=L.Transition.NATIVE?L.Transition:L.Transition.extend({statics:{getTime:Date.now||function(){return+new Date},TIMER:!0,EASINGS:{ease:[0.25,0.1,0.25,1],linear:[0,0,1,1],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},CUSTOM_PROPS_GETTERS:{position:L.DomUtil.getPosition},UNIT_RE:/^[\d\.]+(\D*)$/},options:{fps:50},initialize:function(a,b){this._el=a;L.Util.extend(this.options,b);var c=L.Transition.EASINGS[this.options.easing]||L.Transition.EASINGS.ease;this._p1=
+new L.Point(0,0);this._p2=new L.Point(c[0],c[1]);this._p3=new L.Point(c[2],c[3]);this._p4=new L.Point(1,1);this._step=L.Util.bind(this._step,this);this._interval=Math.round(1E3/this.options.fps)},run:function(a){this._props={};var b=L.Transition.CUSTOM_PROPS_GETTERS,c=L.Transition.UNIT_RE;this.fire("start");for(var d in a)if(a.hasOwnProperty(d)){var e={};if(d in b)e.from=b[d](this._el);else{var f=this._el.style[d].match(c);e.from=parseFloat(f[0]);e.unit=f[1]}e.to=a[d];this._props[d]=e}clearInterval(this._timer);
+this._timer=setInterval(this._step,this._interval);this._startTime=L.Transition.getTime()},_step:function(){var a=L.Transition.getTime()-this._startTime,b=this.options.duration*1E3;a<b?this._runFrame(this._cubicBezier(a/b)):(this._runFrame(1),this._complete())},_runFrame:function(a){var b=L.Transition.CUSTOM_PROPS_SETTERS,c,d;for(c in this._props)this._props.hasOwnProperty(c)&&(d=this._props[c],c in b?(d=d.to.subtract(d.from).multiplyBy(a).add(d.from),b[c](this._el,d)):this._el.style[c]=(d.to-d.from)*
+a+d.from+d.unit);this.fire("step")},_complete:function(){clearInterval(this._timer);this.fire("end")},_cubicBezier:function(a){var b=3*Math.pow(1-a,2)*a,c=3*(1-a)*Math.pow(a,2),d=Math.pow(a,3),a=this._p1.multiplyBy(Math.pow(1-a,3)),b=this._p2.multiplyBy(b),c=this._p3.multiplyBy(c),d=this._p4.multiplyBy(d);return a.add(b).add(c).add(d).y}});L.LatLng=function(a,b,c){c!==!0&&(a=Math.max(Math.min(a,90),-90),b=(b+180)%360+(b<-180?180:-180));this.lat=a;this.lng=b};L.Util.extend(L.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1.0E-9});L.LatLng.prototype={equals:function(a){if(!(a instanceof L.LatLng))return!1;return Math.max(Math.abs(this.lat-a.lat),Math.abs(this.lng-a.lng))<=L.LatLng.MAX_MARGIN},toString:function(){return"LatLng("+L.Util.formatNum(this.lat)+", "+L.Util.formatNum(this.lng)+")"}};L.LatLngBounds=L.Class.extend({initialize:function(a,b){if(a)for(var c=a instanceof Array?a:[a,b],d=0,e=c.length;d<e;d++)this.extend(c[d])},extend:function(a){!this._southWest&&!this._northEast?(this._southWest=new L.LatLng(a.lat,a.lng),this._northEast=new L.LatLng(a.lat,a.lng)):(this._southWest.lat=Math.min(a.lat,this._southWest.lat),this._southWest.lng=Math.min(a.lng,this._southWest.lng),this._northEast.lat=Math.max(a.lat,this._northEast.lat),this._northEast.lng=Math.max(a.lng,this._northEast.lng))},
+getCenter:function(){return new L.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new L.LatLng(this._northEast.lat,this._southWest.lng)},getSouthEast:function(){return new L.LatLng(this._southWest.lat,this._northEast.lng)},contains:function(a){var b=this._southWest,c=this._northEast,d;a instanceof L.LatLngBounds?(d=a.getSouthWest(),
+a=a.getNorthEast()):d=a;return d.lat>=b.lat&&a.lat<=c.lat&&d.lng>=b.lng&&a.lng<=c.lng}});L.Projection={};L.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(a){var b=L.LatLng.DEG_TO_RAD,c=this.MAX_LATITUDE,d=a.lng*b,a=Math.max(Math.min(c,a.lat),-c)*b,a=Math.log(Math.tan(Math.PI/4+a/2));return new L.Point(d,a)},unproject:function(a,b){var c=L.LatLng.RAD_TO_DEG;return new L.LatLng((2*Math.atan(Math.exp(a.y))-Math.PI/2)*c,a.x*c,b)}};L.Projection.LonLat={project:function(a){return new L.Point(a.lng,a.lat)},unproject:function(a,b){return new L.LatLng(a.y,a.x,b)}};L.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.3142,R_MAJOR:6378137,project:function(a){var b=L.LatLng.DEG_TO_RAD,c=this.MAX_LATITUDE,d=this.R_MAJOR,e=a.lng*b*d,a=Math.max(Math.min(c,a.lat),-c)*b,b=this.R_MINOR/d,b=Math.sqrt(1-b*b),c=b*Math.sin(a),c=Math.pow((1-c)/(1+c),b*0.5),a=-d*Math.log(Math.tan(0.5*(Math.PI*0.5-a))/c);return new L.Point(e,a)},unproject:function(a,b){for(var c=L.LatLng.RAD_TO_DEG,d=this.R_MAJOR,e=a.x*c/d,f=this.R_MINOR/d,f=Math.sqrt(1-f*f),d=Math.exp(-a.y/d),
+g=Math.PI/2-2*Math.atan(d),h=15,j=0.1;Math.abs(j)>1.0E-7&&--h>0;)j=f*Math.sin(g),j=Math.PI/2-2*Math.atan(d*Math.pow((1-j)/(1+j),0.5*f))-g,g+=j;return new L.LatLng(g*c,e,b)}};L.CRS={latLngToPoint:function(a,b){return this.transformation._transform(this.projection.project(a),b)},pointToLatLng:function(a,b,c){return this.projection.unproject(this.transformation.untransform(a,b),c)},project:function(a){return this.projection.project(a)}};L.CRS.EPSG3857=L.Util.extend({},L.CRS,{code:"EPSG:3857",projection:L.Projection.SphericalMercator,transformation:new L.Transformation(0.5/Math.PI,0.5,-0.5/Math.PI,0.5),project:function(a){return this.projection.project(a).multiplyBy(6378137)}});L.CRS.EPSG900913=L.Util.extend({},L.CRS.EPSG3857,{code:"EPSG:900913"});L.CRS.EPSG4326=L.Util.extend({},L.CRS,{code:"EPSG:4326",projection:L.Projection.LonLat,transformation:new L.Transformation(1/360,0.5,-1/360,0.5)});L.CRS.EPSG3395=L.Util.extend({},L.CRS,{code:"EPSG:3395",projection:L.Projection.Mercator,transformation:function(){var a=L.Projection.Mercator;return new L.Transformation(0.5/(Math.PI*a.R_MAJOR),0.5,-0.5/(Math.PI*a.R_MINOR),0.5)}()});L.LayerGroup=L.Class.extend({initialize:function(a){this._layers={};if(a)for(var b=0,c=a.length;b<c;b++)this.addLayer(a[b])},addLayer:function(a){this._layers[L.Util.stamp(a)]=a;this._map&&this._map.addLayer(a);return this},removeLayer:function(a){delete this._layers[L.Util.stamp(a)];this._map&&this._map.removeLayer(a);return this},clearLayers:function(){this._iterateLayers(this.removeLayer,this);return this},onAdd:function(a){this._map=a;this._iterateLayers(a.addLayer,a)},onRemove:function(a){this._iterateLayers(a.removeLayer,
+a);delete this._map},_iterateLayers:function(a,b){for(var c in this._layers)this._layers.hasOwnProperty(c)&&a.call(b,this._layers[c])}});L.FeatureGroup=L.LayerGroup.extend({includes:L.Mixin.Events,addLayer:function(a){this._initEvents(a);L.LayerGroup.prototype.addLayer.call(this,a);this._popupContent&&a.bindPopup&&a.bindPopup(this._popupContent)},bindPopup:function(a){this._popupContent=a;for(var b in this._layers)this._layers.hasOwnProperty(b)&&this._layers[b].bindPopup&&this._layers[b].bindPopup(a)},_events:["click","dblclick","mouseover","mouseout"],_initEvents:function(a){for(var b=0,c=this._events.length;b<c;b++)a.on(this._events[b],
+this._propagateEvent,this)},_propagateEvent:function(a){a.layer=a.target;a.target=this;this.fire(a.type,a)}});L.TileLayer=L.Class.extend({includes:L.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,scheme:"xyz",noWrap:!1,unloadInvisibleTiles:L.Browser.mobileWebkit,updateWhenIdle:L.Browser.mobileWebkit},initialize:function(a,b){L.Util.setOptions(this,b);this._url=a;if(typeof this.options.subdomains=="string")this.options.subdomains=this.options.subdomains.split("")},onAdd:function(a){this._map=a;this._initContainer();this._createTileProto();
+a.on("viewreset",this._reset,this);if(this.options.updateWhenIdle)a.on("moveend",this._update,this);else this._limitedUpdate=L.Util.limitExecByInterval(this._update,100,this),a.on("move",this._limitedUpdate,this);this._reset();this._update()},onRemove:function(){this._map.getPanes().tilePane.removeChild(this._container);this._container=null;this._map.off("viewreset",this._reset,this);this.options.updateWhenIdle?this._map.off("moveend",this._update,this):this._map.off("move",this._limitedUpdate,this)},
+getAttribution:function(){return this.options.attribution},setOpacity:function(a){this.options.opacity=a;this._setOpacity(a);if(L.Browser.webkit)for(i in this._tiles)this._tiles[i].style.webkitTransform+=" translate(0,0)"},_setOpacity:function(a){a<1&&L.DomUtil.setOpacity(this._container,a)},_initContainer:function(){var a=this._map.getPanes().tilePane;if(!this._container||a.empty)this._container=L.DomUtil.create("div","leaflet-layer",a),this._setOpacity(this.options.opacity)},_reset:function(){this._tiles=
+{};this._initContainer();this._container.innerHTML=""},_update:function(){var a=this._map.getPixelBounds(),b=this.options.tileSize,c=new L.Point(Math.floor(a.min.x/b),Math.floor(a.min.y/b)),a=new L.Point(Math.floor(a.max.x/b),Math.floor(a.max.y/b)),c=new L.Bounds(c,a);this._addTilesFromCenterOut(c);this.options.unloadInvisibleTiles&&this._removeOtherTiles(c)},_addTilesFromCenterOut:function(a){for(var b=[],c=a.getCenter(),d=a.min.y;d<=a.max.y;d++)for(var e=a.min.x;e<=a.max.x;e++)e+":"+d in this._tiles||
+b.push(new L.Point(e,d));b.sort(function(a,b){return a.distanceTo(c)-b.distanceTo(c)});this._tilesToLoad=b.length;a=0;for(d=this._tilesToLoad;a<d;a++)this._addTile(b[a])},_removeOtherTiles:function(a){var b,c,d;for(d in this._tiles)if(this._tiles.hasOwnProperty(d)&&(b=d.split(":"),c=parseInt(b[0],10),b=parseInt(b[1],10),c<a.min.x||c>a.max.x||b<a.min.y||b>a.max.y))this._tiles[d].src="",this._tiles[d].parentNode==this._container&&this._container.removeChild(this._tiles[d]),delete this._tiles[d]},_addTile:function(a){var b=
+this._getTilePos(a),c=this._map.getZoom(),d=a.x+":"+a.y,e=1<<c;if(!this.options.noWrap)a.x=(a.x%e+e)%e;if(!(a.y<0||a.y>=e)){var f=this._createTile();L.DomUtil.setPosition(f,b);this._tiles[d]=f;if(this.options.scheme=="tms")a.y=e-a.y-1;this._loadTile(f,a,c);this._container.appendChild(f)}},_getTilePos:function(a){var b=this._map.getPixelOrigin();return a.multiplyBy(this.options.tileSize).subtract(b)},getTileUrl:function(a,b){return this._url.replace("{s}",this.options.subdomains[(a.x+a.y)%this.options.subdomains.length]).replace("{z}",
+b).replace("{x}",a.x).replace("{y}",a.y)},_createTileProto:function(){this._tileImg=L.DomUtil.create("img","leaflet-tile");this._tileImg.galleryimg="no";var a=this.options.tileSize;this._tileImg.style.width=a+"px";this._tileImg.style.height=a+"px"},_createTile:function(){var a=this._tileImg.cloneNode(!1);a.onselectstart=a.onmousemove=L.Util.falseFn;return a},_loadTile:function(a,b,c){a._layer=this;a.onload=this._tileOnLoad;a.onerror=this._tileOnError;a.src=this.getTileUrl(b,c)},_tileOnLoad:function(){var a=
+this._layer;this.className+=" leaflet-tile-loaded";a.fire("tileload",{tile:this,url:this.src});a._tilesToLoad--;a._tilesToLoad||a.fire("load")},_tileOnError:function(){var a=this._layer;a.fire("tileerror",{tile:this,url:this.src});if(a=a.options.errorTileUrl)this.src=a}});L.TileLayer.WMS=L.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(a,b){this._url=a;this.wmsParams=L.Util.extend({},this.defaultWmsParams);this.wmsParams.width=this.wmsParams.height=this.options.tileSize;for(var c in b)this.options.hasOwnProperty(c)||(this.wmsParams[c]=b[c]);L.Util.setOptions(this,b)},onAdd:function(a){this.wmsParams[parseFloat(this.wmsParams.version)>=1.3?"crs":"srs"]=a.options.crs.code;
+L.TileLayer.prototype.onAdd.call(this,a)},getTileUrl:function(a){var b=this.options.tileSize,a=a.multiplyBy(b),b=a.add(new L.Point(b,b)),a=this._map.unproject(a,this._zoom,!0),b=this._map.unproject(b,this._zoom,!0),a=this._map.options.crs.project(a),b=this._map.options.crs.project(b),b=[a.x,b.y,b.x,a.y].join(",");return this._url+L.Util.getParamString(this.wmsParams)+"&bbox="+b}});L.TileLayer.Canvas=L.TileLayer.extend({options:{async:!1},initialize:function(a){L.Util.setOptions(this,a)},_createTileProto:function(){this._canvasProto=L.DomUtil.create("canvas","leaflet-tile");var a=this.options.tileSize;this._canvasProto.width=a;this._canvasProto.height=a},_createTile:function(){var a=this._canvasProto.cloneNode(!1);a.onselectstart=a.onmousemove=L.Util.falseFn;return a},_loadTile:function(a,b,c){a._layer=this;this.drawTile(a,b,c);this.options.async||this.tileDrawn(a)},drawTile:function(){},
+tileDrawn:function(a){this._tileOnLoad.call(a)}});L.ImageOverlay=L.Class.extend({includes:L.Mixin.Events,initialize:function(a,b){this._url=a;this._bounds=b},onAdd:function(a){this._map=a;this._image||this._initImage();a.getPanes().overlayPane.appendChild(this._image);a.on("viewreset",this._reset,this);this._reset()},onRemove:function(a){a.getPanes().overlayPane.removeChild(this._image);a.off("viewreset",this._reset,this)},_initImage:function(){this._image=L.DomUtil.create("img","leaflet-image-layer");this._image.style.visibility="hidden";L.Util.extend(this._image,
+{galleryimg:"no",onselectstart:L.Util.falseFn,onmousemove:L.Util.falseFn,onload:this._onImageLoad,src:this._url})},_reset:function(){var a=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),b=this._map.latLngToLayerPoint(this._bounds.getSouthEast()).subtract(a);L.DomUtil.setPosition(this._image,a);this._image.style.width=b.x+"px";this._image.style.height=b.y+"px"},_onImageLoad:function(){this.style.visibility=""}});L.Popup=L.Class.extend({includes:L.Mixin.Events,options:{maxWidth:300,autoPan:!0,closeButton:!0,offset:new L.Point(0,2),autoPanPadding:new L.Point(5,5)},initialize:function(a){L.Util.setOptions(this,a)},onAdd:function(a){this._map=a;this._container||this._initLayout();this._updateContent();this._container.style.opacity="0";this._map._panes.popupPane.appendChild(this._container);this._map.on("viewreset",this._updatePosition,this);if(this._map.options.closePopupOnClick)this._map.on("preclick",this._close,
+this);this._update();this._container.style.opacity="1";this._opened=!0},onRemove:function(a){a._panes.popupPane.removeChild(this._container);a.off("viewreset",this._updatePosition,this);a.off("click",this._close,this);this._container.style.opacity="0";this._opened=!1},setLatLng:function(a){this._latlng=a;this._opened&&this._update();return this},setContent:function(a){this._content=a;this._opened&&this._update();return this},_close:function(){this._opened&&this._map.removeLayer(this)},_initLayout:function(){this._container=
+L.DomUtil.create("div","leaflet-popup");this._closeButton=L.DomUtil.create("a","leaflet-popup-close-button",this._container);this._closeButton.href="#close";this._closeButton.onclick=L.Util.bind(this._onCloseButtonClick,this);this._wrapper=L.DomUtil.create("div","leaflet-popup-content-wrapper",this._container);L.DomEvent.disableClickPropagation(this._wrapper);this._contentNode=L.DomUtil.create("div","leaflet-popup-content",this._wrapper);this._tipContainer=L.DomUtil.create("div","leaflet-popup-tip-container",
+this._container);this._tip=L.DomUtil.create("div","leaflet-popup-tip",this._tipContainer)},_update:function(){this._container.style.visibility="hidden";this._updateContent();this._updateLayout();this._updatePosition();this._container.style.visibility="";this._adjustPan()},_updateContent:function(){if(this._content)typeof this._content=="string"?this._contentNode.innerHTML=this._content:(this._contentNode.innerHTML="",this._contentNode.appendChild(this._content))},_updateLayout:function(){this._container.style.width=
+"";this._container.style.whiteSpace="nowrap";var a=this._container.offsetWidth;this._container.style.width=(a>this.options.maxWidth?this.options.maxWidth:a)+"px";this._container.style.whiteSpace="";this._containerWidth=this._container.offsetWidth},_updatePosition:function(){var a=this._map.latLngToLayerPoint(this._latlng);this._containerBottom=-a.y-this.options.offset.y;this._containerLeft=a.x-Math.round(this._containerWidth/2)+this.options.offset.x;this._container.style.bottom=this._containerBottom+
+"px";this._container.style.left=this._containerLeft+"px"},_adjustPan:function(){if(this.options.autoPan){var a=this._container.offsetHeight,b=this._map.layerPointToContainerPoint(new L.Point(this._containerLeft,-a-this._containerBottom)),c=new L.Point(0,0),d=this.options.autoPanPadding,e=this._map.getSize();if(b.x<0)c.x=b.x-d.x;if(b.x+this._containerWidth>e.x)c.x=b.x+this._containerWidth-e.x+d.x;if(b.y<0)c.y=b.y-d.y;if(b.y+a>e.y)c.y=b.y+a-e.y+d.y;(c.x||c.y)&&this._map.panBy(c)}},_onCloseButtonClick:function(a){this._close();
+L.DomEvent.stop(a)}});L.Icon=L.Class.extend({iconUrl:L.ROOT_URL+"images/marker.png",shadowUrl:L.ROOT_URL+"images/marker-shadow.png",iconSize:new L.Point(25,41),shadowSize:new L.Point(41,41),iconAnchor:new L.Point(13,41),popupAnchor:new L.Point(0,-33),initialize:function(a){if(a)this.iconUrl=a},createIcon:function(){return this._createIcon("icon")},createShadow:function(){return this._createIcon("shadow")},_createIcon:function(a){var b=this[a+"Size"],c=this[a+"Url"],d=this._createImg(c);if(!c)return null;d.className="leaflet-marker-"+
+a;d.style.marginLeft=-this.iconAnchor.x+"px";d.style.marginTop=-this.iconAnchor.y+"px";if(b)d.style.width=b.x+"px",d.style.height=b.y+"px";return d},_createImg:function(a){var b;L.Browser.ie6?(b=document.createElement("div"),b.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+a+'")'):(b=document.createElement("img"),b.src=a);return b}});L.Marker=L.Class.extend({includes:L.Mixin.Events,options:{icon:new L.Icon,title:"",clickable:!0,draggable:!1},initialize:function(a,b){L.Util.setOptions(this,b);this._latlng=a},onAdd:function(a){this._map=a;this._initIcon();a.on("viewreset",this._reset,this);this._reset()},onRemove:function(a){this._removeIcon();a.off("viewreset",this._reset,this)},getLatLng:function(){return this._latlng},setLatLng:function(a){this._latlng=a;this._reset()},setIcon:function(a){this._removeIcon();this._icon=this._shadow=
+null;this.options.icon=a;this._initIcon()},_initIcon:function(){if(!this._icon){this._icon=this.options.icon.createIcon();if(this.options.title)this._icon.title=this.options.title;this._initInteraction()}if(!this._shadow)this._shadow=this.options.icon.createShadow();this._map._panes.markerPane.appendChild(this._icon);this._shadow&&this._map._panes.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this._map._panes.markerPane.removeChild(this._icon);this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow)},
+_reset:function(){var a=this._map.latLngToLayerPoint(this._latlng).round();L.DomUtil.setPosition(this._icon,a);this._shadow&&L.DomUtil.setPosition(this._shadow,a);this._icon.style.zIndex=a.y},_initInteraction:function(){if(this.options.clickable){this._icon.className+=" leaflet-clickable";L.DomEvent.addListener(this._icon,"click",this._onMouseClick,this);for(var a=["dblclick","mousedown","mouseover","mouseout"],b=0;b<a.length;b++)L.DomEvent.addListener(this._icon,a[b],this._fireMouseEvent,this)}if(L.Handler.MarkerDrag)this.dragging=
+new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable()},_onMouseClick:function(a){L.DomEvent.stopPropagation(a);(!this.dragging||!this.dragging.moved())&&this.fire(a.type)},_fireMouseEvent:function(a){this.fire(a.type);L.DomEvent.stopPropagation(a)}});L.Marker.include({openPopup:function(){this._popup.setLatLng(this._latlng);this._map.openPopup(this._popup);return this},closePopup:function(){this._popup&&this._popup._close()},bindPopup:function(a,b){b=L.Util.extend({offset:this.options.icon.popupAnchor},b);this._popup=new L.Popup(b);this._popup.setContent(a);this.on("click",this.openPopup,this);return this}});L.Path=L.Class.extend({includes:[L.Mixin.Events],statics:function(){return{SVG_NS:"http://www.w3.org/2000/svg",SVG:!(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),CLIP_PADDING:0.5}}(),options:{stroke:!0,color:"#0033ff",weight:5,opacity:0.5,fill:!1,fillColor:null,fillOpacity:0.2,clickable:!0,updateOnMoveEnd:!1},initialize:function(a){L.Util.setOptions(this,a)},onAdd:function(a){this._map=a;this._initElements();this._initEvents();this.projectLatlngs();
+this._updatePath();a.on("viewreset",this.projectLatlngs,this);this._updateTrigger=this.options.updateOnMoveEnd?"moveend":"viewreset";a.on(this._updateTrigger,this._updatePath,this)},onRemove:function(a){a._pathRoot.removeChild(this._container);a.off("viewreset",this._projectLatlngs,this);a.off(this._updateTrigger,this._updatePath,this)},projectLatlngs:function(){},getPathString:function(){},setStyle:function(a){L.Util.setOptions(this,a);this._path&&this._updateStyle()},_initElements:function(){this._initRoot();
+this._initPath();this._initStyle()},_initRoot:function(){if(!this._map._pathRoot)this._map._pathRoot=this._createElement("svg"),this._map._panes.overlayPane.appendChild(this._map._pathRoot),this._map.on("moveend",this._updateSvgViewport,this),this._updateSvgViewport()},_updateSvgViewport:function(){this._updateViewport();var a=this._map._pathViewport,b=a.min,c=a.max,a=c.x-b.x,c=c.y-b.y,d=this._map._pathRoot,e=this._map._panes.overlayPane;L.Browser.mobileWebkit&&e.removeChild(d);L.DomUtil.setPosition(d,
+b);d.setAttribute("width",a);d.setAttribute("height",c);d.setAttribute("viewBox",[b.x,b.y,a,c].join(" "));L.Browser.mobileWebkit&&e.appendChild(d)},_updateViewport:function(){var a=L.Path.CLIP_PADDING,b=this._map.getSize(),c=L.DomUtil.getPosition(this._map._mapPane).multiplyBy(-1).subtract(b.multiplyBy(a)),a=c.add(b.multiplyBy(1+a*2));this._map._pathViewport=new L.Bounds(c,a)},_initPath:function(){this._container=this._createElement("g");this._path=this._createElement("path");this._container.appendChild(this._path);
+this._map._pathRoot.appendChild(this._container)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round"));this.options.fill?this._path.setAttribute("fill-rule","evenodd"):this._path.setAttribute("fill","none");this._updateStyle()},_updateStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",
+this.options.weight));this.options.fill&&(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity))},_updatePath:function(){var a=this.getPathString();a||(a="M0 0");this._path.setAttribute("d",a)},_createElement:function(a){return document.createElementNS(L.Path.SVG_NS,a)},_initEvents:function(){if(this.options.clickable){L.Path.VML||this._path.setAttribute("class","leaflet-clickable");L.DomEvent.addListener(this._container,
+"click",this._onMouseClick,this);for(var a=["dblclick","mousedown","mouseover","mouseout"],b=0;b<a.length;b++)L.DomEvent.addListener(this._container,a[b],this._fireMouseEvent,this)}},_onMouseClick:function(a){(!this._map.dragging||!this._map.dragging.moved())&&this._fireMouseEvent(a)},_fireMouseEvent:function(a){this.hasEventListeners(a.type)&&(this.fire(a.type,{latlng:this._map.mouseEventToLatLng(a),layerPoint:this._map.mouseEventToLayerPoint(a)}),L.DomEvent.stopPropagation(a))},_redraw:function(){this.projectLatlngs();
+this._updatePath()}});L.Path.VML=function(){var a=document.createElement("div");a.innerHTML='<v:shape adj="1"/>';a=a.firstChild;a.style.behavior="url(#default#VML)";return a&&typeof a.adj=="object"}();
+L.Path=L.Path.SVG||!L.Path.VML?L.Path:L.Path.extend({statics:{CLIP_PADDING:0.02},_createElement:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(a){return document.createElement("<lvml:"+a+' class="lvml">')}}catch(a){return function(a){return document.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initRoot:function(){if(!this._map._pathRoot)this._map._pathRoot=document.createElement("div"),this._map._pathRoot.className=
+"leaflet-vml-container",this._map._panes.overlayPane.appendChild(this._map._pathRoot),this._map.on("moveend",this._updateViewport,this),this._updateViewport()},_initPath:function(){this._container=this._createElement("shape");this._container.className+=" leaflet-vml-shape"+(this.options.clickable?" leaflet-clickable":"");this._container.coordsize="1 1";this._path=this._createElement("path");this._container.appendChild(this._path);this._map._pathRoot.appendChild(this._container)},_initStyle:function(){this.options.stroke?
+(this._stroke=this._createElement("stroke"),this._stroke.endcap="round",this._container.appendChild(this._stroke)):this._container.stroked=!1;this.options.fill?(this._container.filled=!0,this._fill=this._createElement("fill"),this._container.appendChild(this._fill)):this._container.filled=!1;this._updateStyle()},_updateStyle:function(){if(this.options.stroke)this._stroke.weight=this.options.weight+"px",this._stroke.color=this.options.color,this._stroke.opacity=this.options.opacity;if(this.options.fill)this._fill.color=
+this.options.fillColor||this.options.color,this._fill.opacity=this.options.fillOpacity},_updatePath:function(){this._container.style.display="none";this._path.v=this.getPathString()+" ";this._container.style.display=""}});L.Path.include({bindPopup:function(a,b){if(!this._popup||this._popup.options!==b)this._popup=new L.Popup(b);this._popup.setContent(a);if(!this._openPopupAdded)this.on("click",this._openPopup,this),this._openPopupAdded=!0;return this},_openPopup:function(a){this._popup.setLatLng(a.latlng);this._map.openPopup(this._popup)}});L.Polyline=L.Path.extend({initialize:function(a,b){L.Path.prototype.initialize.call(this,b);this._latlngs=a},options:{smoothFactor:1,noClip:!1,updateOnMoveEnd:!0},projectLatlngs:function(){this._originalPoints=[];for(var a=0,b=this._latlngs.length;a<b;a++)this._originalPoints[a]=this._map.latLngToLayerPoint(this._latlngs[a])},getPathString:function(){for(var a=0,b=this._parts.length,c="";a<b;a++)c+=this._getPathPartStr(this._parts[a]);return c},getLatLngs:function(){return this._latlngs},setLatLngs:function(a){this._latlngs=
+a;this._redraw();return this},addLatLng:function(a){this._latlngs.push(a);this._redraw();return this},spliceLatLngs:function(){var a=[].splice.apply(this._latlngs,arguments);this._redraw();return a},_getPathPartStr:function(a){for(var b=L.Path.VML,c=0,d=a.length,e="",f;c<d;c++)f=a[c],b&&f._round(),e+=(c?"L":"M")+f.x+" "+f.y;return e},_clipPoints:function(){var a=this._originalPoints,b=a.length,c,d,e;if(this.options.noClip)this._parts=[a];else{var f=this._parts=[],g=this._map._pathViewport,h=L.LineUtil;
+for(d=c=0;c<b-1;c++)if(e=h.clipSegment(a[c],a[c+1],g,c))if(f[d]=f[d]||[],f[d].push(e[0]),e[1]!=a[c+1]||c==b-2)f[d].push(e[1]),d++}},_simplifyPoints:function(){for(var a=this._parts,b=L.LineUtil,c=0,d=a.length;c<d;c++)a[c]=b.simplify(a[c],this.options.smoothFactor)},_updatePath:function(){this._clipPoints();this._simplifyPoints();L.Path.prototype._updatePath.call(this)}});L.Polygon=L.Polyline.extend({options:{fill:!0},initialize:function(a,b){L.Polyline.prototype.initialize.call(this,a,b);if(a[0]instanceof Array)this._latlngs=a[0],this._holes=a.slice(1)},projectLatlngs:function(){L.Polyline.prototype.projectLatlngs.call(this);this._holePoints=[];if(this._holes)for(var a=0,b=this._holes.length;a<b;a++){this._holePoints[a]=[];for(var c=0,d=this._holes[a].length;c<d;c++)this._holePoints[a][c]=this._map.latLngToLayerPoint(this._holes[a][c])}},_clipPoints:function(){var a=
+[];this._parts=[this._originalPoints].concat(this._holePoints);if(!this.options.noClip){for(var b=0,c=this._parts.length;b<c;b++){var d=L.PolyUtil.clipPolygon(this._parts[b],this._map._pathViewport);d.length&&a.push(d)}this._parts=a}},_getPathPartStr:function(a){return L.Polyline.prototype._getPathPartStr.call(this,a)+(L.Path.SVG?"z":"x")}});(function(){function a(a){return L.FeatureGroup.extend({initialize:function(c,d){this._layers={};for(var e=0,f=c.length;e<f;e++)this.addLayer(new a(c[e],d))},setStyle:function(a){for(var b in this._layers)this._layers.hasOwnProperty(b)&&this._layers[b].setStyle&&this._layers[b].setStyle(a)}})}L.MultiPolyline=a(L.Polyline);L.MultiPolygon=a(L.Polygon)})();L.Circle=L.Path.extend({initialize:function(a,b,c){L.Path.prototype.initialize.call(this,c);this._latlng=a;this._mRadius=b},options:{fill:!0},setLatLng:function(a){this._latlng=a;this._redraw();return this},setRadius:function(a){this._mRadius=a;this._redraw();return this},projectLatlngs:function(){var a=this._map.options.scale(this._map._zoom);this._point=this._map.latLngToLayerPoint(this._latlng);this._radius=this._mRadius/40075017*a},getPathString:function(){var a=this._point,b=this._radius;return L.Path.SVG?
+"M"+a.x+","+(a.y-b)+"A"+b+","+b+",0,1,1,"+(a.x-0.1)+","+(a.y-b)+" z":(a._round(),b=Math.round(b),"AL "+a.x+","+a.y+" "+b+","+b+" 0,23592600")}});L.CircleMarker=L.Circle.extend({options:{radius:10,weight:2},initialize:function(a,b){L.Circle.prototype.initialize.call(this,a,null,b);this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},setRadius:function(a){this._radius=a;this._redraw();return this}});L.GeoJSON=L.LayerGroup.extend({includes:L.Mixin.Events,initialize:function(a,b){L.Util.setOptions(this,b);this._geojson=a;this._layers={};a&&this.addGeoJSON(a)},addGeoJSON:function(a){if(a.features)for(var b=0,c=a.features.length;b<c;b++)this.addGeoJSON(a.features[b]);else b=a.type=="Feature"?a.geometry:a,c=L.GeoJSON.geometryToLayer(b,this.options.pointToLayer),this.fire("featureparse",{layer:c,properties:a.properties,geometryType:b.type,bbox:a.bbox,id:a.id}),this.addLayer(c)}});
+L.Util.extend(L.GeoJSON,{geometryToLayer:function(a,b){var c=a.coordinates,d,e,f,g=[];switch(a.type){case "Point":return d=this.coordsToLatLng(c),b?b(d):new L.Marker(d);case "MultiPoint":e=0;for(f=c.length;e<f;e++)d=this.coordsToLatLng(c[e]),d=b?b(d):new L.Marker(d),g.push(d);return new L.FeatureGroup(g);case "LineString":return c=this.coordsToLatLngs(c),new L.Polyline(c);case "Polygon":return c=this.coordsToLatLngs(c,1),new L.Polygon(c);case "MultiLineString":return c=this.coordsToLatLngs(c,1),new L.MultiPolyline(c);
+case "MultiPolygon":return c=this.coordsToLatLngs(c,2),new L.MultiPolygon(c);case "GeometryCollection":e=0;for(f=a.geometries.length;e<f;e++)d=this.geometryToLayer(a.geometries[e]),g.push(d);return new L.FeatureGroup(g);default:throw Error("Invalid GeoJSON object.");}},coordsToLatLng:function(a,b){var c=parseFloat(a[b?0:1]),d=parseFloat(a[b?1:0]);return new L.LatLng(c,d)},coordsToLatLngs:function(a,b,c){var d,e=[],f,g=a.length;for(f=0;f<g;f++)d=b?this.coordsToLatLngs(a[f],b-1,c):this.coordsToLatLng(a[f],
+c),e.push(d);return e}});L.Handler=L.Class.extend({initialize:function(a){this._map=a},enabled:function(){return!!this._enabled}});L.Handler.MapDrag=L.Handler.extend({enable:function(){if(!this._enabled){if(!this._draggable)this._draggable=new L.Draggable(this._map._mapPane,this._map._container),this._draggable.on("dragstart",this._onDragStart,this),this._draggable.on("drag",this._onDrag,this),this._draggable.on("dragend",this._onDragEnd,this);this._draggable.enable();this._enabled=!0}},disable:function(){if(this._enabled)this._draggable.disable(),this._enabled=!1},moved:function(){return this._draggable._moved},_onDragStart:function(){this._map.fire("movestart");
+this._map.fire("dragstart")},_onDrag:function(){this._map.fire("move");this._map.fire("drag")},_onDragEnd:function(){this._map.fire("moveend");this._map.fire("dragend")}});L.Handler.TouchZoom=L.Handler.extend({enable:function(){if(L.Browser.mobileWebkit&&!this._enabled)L.DomEvent.addListener(this._map._container,"touchstart",this._onTouchStart,this),this._enabled=!0},disable:function(){if(this._enabled)L.DomEvent.removeListener(this._map._container,"touchstart",this._onTouchStart,this),this._enabled=!1},_onTouchStart:function(a){if(a.touches&&!(a.touches.length!=2||this._map._animatingZoom)){var b=this._map.mouseEventToLayerPoint(a.touches[0]),c=this._map.mouseEventToLayerPoint(a.touches[1]),
+d=this._map.containerPointToLayerPoint(this._map.getSize().divideBy(2));this._startCenter=b.add(c).divideBy(2,!0);this._startDist=b.distanceTo(c);this._moved=!1;this._zooming=!0;this._centerOffset=d.subtract(this._startCenter);L.DomEvent.addListener(document,"touchmove",this._onTouchMove,this);L.DomEvent.addListener(document,"touchend",this._onTouchEnd,this);L.DomEvent.preventDefault(a)}},_onTouchMove:function(a){if(a.touches&&a.touches.length==2){if(!this._moved)this._map._mapPane.className+=" leaflet-zoom-anim",
+this._map._prepareTileBg(),this._moved=!0;var b=this._map.mouseEventToLayerPoint(a.touches[0]),c=this._map.mouseEventToLayerPoint(a.touches[1]);this._scale=b.distanceTo(c)/this._startDist;this._delta=b.add(c).divideBy(2,!0).subtract(this._startCenter);this._map._tileBg.style.webkitTransform=[L.DomUtil.getTranslateString(this._delta),L.DomUtil.getScaleString(this._scale,this._startCenter)].join(" ");L.DomEvent.preventDefault(a)}},_onTouchEnd:function(){if(this._moved&&this._zooming){this._zooming=
+!1;var a=this._map.getZoom(),b=Math.log(this._scale)/Math.LN2,b=this._map._limitZoom(a+(b>0?Math.ceil(b):Math.floor(b))),a=b-a,c=this._centerOffset.subtract(this._delta).divideBy(this._scale),d=this._map.unproject(this._map.getPixelOrigin().add(this._startCenter).add(c));L.DomEvent.removeListener(document,"touchmove",this._onTouchMove);L.DomEvent.removeListener(document,"touchend",this._onTouchEnd);this._map._runAnimation(d,b,Math.pow(2,a)/this._scale,this._startCenter.add(c))}}});L.Handler.ScrollWheelZoom=L.Handler.extend({enable:function(){if(!this._enabled)L.DomEvent.addListener(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0,this._enabled=!0},disable:function(){if(this._enabled)L.DomEvent.removeListener(this._map._container,"mousewheel",this._onWheelScroll),this._enabled=!1},_onWheelScroll:function(a){this._delta+=L.DomEvent.getWheelDelta(a);this._lastMousePos=this._map.mouseEventToContainerPoint(a);clearTimeout(this._timer);this._timer=setTimeout(L.Util.bind(this._performZoom,
+this),50);L.DomEvent.preventDefault(a)},_performZoom:function(){var a=Math.round(this._delta);this._delta=0;if(a){var b=this._getCenterForScrollWheelZoom(this._lastMousePos,a),a=this._map.getZoom()+a;this._map._limitZoom(a)!=this._map._zoom&&this._map.setView(b,a)}},_getCenterForScrollWheelZoom:function(a,b){var c=this._map.getPixelBounds().getCenter(),d=this._map.getSize().divideBy(2),d=a.subtract(d).multiplyBy(1-Math.pow(2,-b));return this._map.unproject(c.add(d),this._map._zoom,!0)}});L.Handler.DoubleClickZoom=L.Handler.extend({enable:function(){if(!this._enabled)this._map.on("dblclick",this._onDoubleClick,this._map),this._enabled=!0},disable:function(){if(this._enabled)this._map.off("dblclick",this._onDoubleClick,this._map),this._enabled=!1},_onDoubleClick:function(a){this.setView(a.latlng,this._zoom+1)}});L.Handler.ShiftDragZoom=L.Handler.extend({initialize:function(a){this._map=a;this._container=a._container;this._pane=a._panes.overlayPane},enable:function(){if(!this._enabled)L.DomEvent.addListener(this._container,"mousedown",this._onMouseDown,this),this._enabled=!0},disable:function(){if(this._enabled)L.DomEvent.removeListener(this._container,"mousedown",this._onMouseDown),this._enabled=!1},_onMouseDown:function(a){if(!a.shiftKey||a.which!=1&&a.button!=1)return!1;L.DomUtil.disableTextSelection();
+this._startLayerPoint=this._map.mouseEventToLayerPoint(a);this._box=L.DomUtil.create("div","leaflet-zoom-box",this._pane);L.DomUtil.setPosition(this._box,this._startLayerPoint);this._container.style.cursor="crosshair";L.DomEvent.addListener(document,"mousemove",this._onMouseMove,this);L.DomEvent.addListener(document,"mouseup",this._onMouseUp,this);L.DomEvent.preventDefault(a)},_onMouseMove:function(a){var b=this._map.mouseEventToLayerPoint(a),a=b.x-this._startLayerPoint.x,c=b.y-this._startLayerPoint.y,
+b=new L.Point(Math.min(b.x,this._startLayerPoint.x),Math.min(b.y,this._startLayerPoint.y));L.DomUtil.setPosition(this._box,b);this._box.style.width=Math.abs(a)-4+"px";this._box.style.height=Math.abs(c)-4+"px"},_onMouseUp:function(a){this._pane.removeChild(this._box);this._container.style.cursor="";L.DomUtil.enableTextSelection();L.DomEvent.removeListener(document,"mousemove",this._onMouseMove);L.DomEvent.removeListener(document,"mouseup",this._onMouseUp);a=this._map.mouseEventToLayerPoint(a);this._map.fitBounds(new L.LatLngBounds(this._map.layerPointToLatLng(this._startLayerPoint),
+this._map.layerPointToLatLng(a)))}});L.Handler.MarkerDrag=L.Handler.extend({initialize:function(a){this._marker=a},enable:function(){if(!this._enabled){if(!this._draggable)this._draggable=new L.Draggable(this._marker._icon,this._marker._icon),this._draggable.on("dragstart",this._onDragStart,this),this._draggable.on("drag",this._onDrag,this),this._draggable.on("dragend",this._onDragEnd,this);this._draggable.enable();this._enabled=!0}},disable:function(){if(this._enabled)this._draggable.disable(),this._enabled=!1},moved:function(){return this._draggable&&
+this._draggable._moved},_onDragStart:function(){this._marker.closePopup();this._marker.fire("movestart");this._marker.fire("dragstart")},_onDrag:function(){var a=L.DomUtil.getPosition(this._marker._icon);L.DomUtil.setPosition(this._marker._shadow,a);this._marker._latlng=this._marker._map.layerPointToLatLng(a);this._marker.fire("move");this._marker.fire("drag")},_onDragEnd:function(){this._marker.fire("moveend");this._marker.fire("dragend")}});L.Control={};L.Control.Position={TOP_LEFT:"topLeft",TOP_RIGHT:"topRight",BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:"bottomRight"};L.Control.Zoom=L.Class.extend({onAdd:function(a){this._map=a;this._container=L.DomUtil.create("div","leaflet-control-zoom");this._zoomInButton=this._createButton("Zoom in","leaflet-control-zoom-in",this._map.zoomIn,this._map);this._zoomOutButton=this._createButton("Zoom out","leaflet-control-zoom-out",this._map.zoomOut,this._map);this._container.appendChild(this._zoomInButton);this._container.appendChild(this._zoomOutButton)},getContainer:function(){return this._container},getPosition:function(){return L.Control.Position.TOP_LEFT},
+_createButton:function(a,b,c,d){var e=document.createElement("a");e.href="#";e.title=a;e.className=b;L.DomEvent.disableClickPropagation(e);L.DomEvent.addListener(e,"click",L.DomEvent.preventDefault);L.DomEvent.addListener(e,"click",c,d);return e}});L.Control.Attribution=L.Class.extend({onAdd:function(a){this._container=L.DomUtil.create("div","leaflet-control-attribution");this._map=a;this._prefix='Powered by <a href="http://leaflet.cloudmade.com">Leaflet</a>';this._attributions={};this._update()},getPosition:function(){return L.Control.Position.BOTTOM_RIGHT},getContainer:function(){return this._container},setPrefix:function(a){this._prefix=a},addAttribution:function(a){a&&(this._attributions[a]=!0,this._update())},removeAttribution:function(a){a&&
+(delete this._attributions[a],this._update())},_update:function(){if(this._map){var a=[],b;for(b in this._attributions)this._attributions.hasOwnProperty(b)&&a.push(b);b=[];this._prefix&&b.push(this._prefix);a.length&&b.push(a.join(", "));this._container.innerHTML=b.join(" — ")}}});L.Map=L.Class.extend({includes:L.Mixin.Events,options:{crs:L.CRS.EPSG3857||L.CRS.EPSG4326,scale:function(a){return 256*(1<<a)},center:null,zoom:null,layers:[],dragging:!0,touchZoom:L.Browser.mobileWebkit&&!L.Browser.android,scrollWheelZoom:!L.Browser.mobileWebkit,doubleClickZoom:!0,shiftDragZoom:!0,zoomControl:!0,attributionControl:!0,fadeAnimation:L.DomUtil.TRANSITION&&!L.Browser.android,zoomAnimation:L.DomUtil.TRANSITION&&!L.Browser.android&&!L.Browser.mobileOpera,trackResize:!0,closePopupOnClick:!0},
+initialize:function(a,b){L.Util.setOptions(this,b);this._container=L.DomUtil.get(a);this._initLayout();L.DomEvent&&(this._initEvents(),L.Handler&&this._initInteraction(),L.Control&&this._initControls());var c=this.options.center,d=this.options.zoom;c!==null&&d!==null&&this.setView(c,d,!0);c=this.options.layers;c=c instanceof Array?c:[c];this._tileLayersNum=0;this._initLayers(c)},setView:function(a,b){this._resetView(a,this._limitZoom(b));return this},setZoom:function(a){return this.setView(this.getCenter(),
+a)},zoomIn:function(){return this.setZoom(this._zoom+1)},zoomOut:function(){return this.setZoom(this._zoom-1)},fitBounds:function(a){var b=this.getBoundsZoom(a);return this.setView(a.getCenter(),b)},fitWorld:function(){var a=new L.LatLng(-60,-170),b=new L.LatLng(85,179);return this.fitBounds(new L.LatLngBounds(a,b))},panTo:function(a){return this.setView(a,this._zoom)},panBy:function(a){this.fire("movestart");this._rawPanBy(a);this.fire("move");this.fire("moveend");return this},addLayer:function(a){var b=
+L.Util.stamp(a);if(this._layers[b])return this;this._layers[b]=a;if(a.options&&!isNaN(a.options.maxZoom))this._layersMaxZoom=Math.max(this._layersMaxZoom||0,a.options.maxZoom);if(a.options&&!isNaN(a.options.minZoom))this._layersMinZoom=Math.min(this._layersMinZoom||Infinity,a.options.minZoom);this.options.zoomAnimation&&L.TileLayer&&a instanceof L.TileLayer&&(this._tileLayersNum++,a.on("load",this._onTileLayerLoad,this));this.attributionControl&&a.getAttribution&&this.attributionControl.addAttribution(a.getAttribution());
+b=function(){a.onAdd(this);this.fire("layeradd",{layer:a})};if(this._loaded)b.call(this);else this.on("load",b,this);return this},removeLayer:function(a){var b=L.Util.stamp(a);this._layers[b]&&(a.onRemove(this),delete this._layers[b],this.options.zoomAnimation&&L.TileLayer&&a instanceof L.TileLayer&&(this._tileLayersNum--,a.off("load",this._onTileLayerLoad,this)),this.attributionControl&&a.getAttribution&&this.attributionControl.removeAttribution(a.getAttribution()),this.fire("layerremove",{layer:a}));
+return this},invalidateSize:function(){this._sizeChanged=!0;this.fire("move");clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(L.Util.bind(function(){this.fire("moveend")},this),200);return this},getCenter:function(a){var b=this.getSize().divideBy(2);return this.unproject(this._getTopLeftPoint().add(b),this._zoom,a)},getZoom:function(){return this._zoom},getBounds:function(){var a=this.getPixelBounds(),b=this.unproject(new L.Point(a.min.x,a.max.y)),a=this.unproject(new L.Point(a.max.x,a.min.y));
+return new L.LatLngBounds(b,a)},getMinZoom:function(){return isNaN(this.options.minZoom)?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return isNaN(this.options.maxZoom)?this._layersMaxZoom||Infinity:this.options.maxZoom},getBoundsZoom:function(a){var b=this.getSize(),c=this.getMinZoom(),d=this.getMaxZoom(),e=a.getNorthEast(),a=a.getSouthWest(),f,g;do c++,f=this.project(e,c),g=this.project(a,c),f=new L.Point(f.x-g.x,g.y-f.y);while(f.x<=b.x&&f.y<=b.y&&c<=d);return c-1},getSize:function(){if(!this._size||
+this._sizeChanged)this._size=new L.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1;return this._size},getPixelBounds:function(){var a=this._getTopLeftPoint(),b=this.getSize();return new L.Bounds(a,a.add(b))},getPixelOrigin:function(){return this._initialTopLeftPoint},getPanes:function(){return this._panes},mouseEventToContainerPoint:function(a){return L.DomEvent.getMousePosition(a,this._container)},mouseEventToLayerPoint:function(a){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(a))},
+mouseEventToLatLng:function(a){return this.layerPointToLatLng(this.mouseEventToLayerPoint(a))},containerPointToLayerPoint:function(a){return a.subtract(L.DomUtil.getPosition(this._mapPane))},layerPointToContainerPoint:function(a){return a.add(L.DomUtil.getPosition(this._mapPane))},layerPointToLatLng:function(a){return this.unproject(a.add(this._initialTopLeftPoint))},latLngToLayerPoint:function(a){return this.project(a)._subtract(this._initialTopLeftPoint)},project:function(a,b){b=typeof b=="undefined"?
+this._zoom:b;return this.options.crs.latLngToPoint(a,this.options.scale(b))},unproject:function(a,b,c){b=typeof b=="undefined"?this._zoom:b;return this.options.crs.pointToLatLng(a,this.options.scale(b),c)},_initLayout:function(){var a=this._container;a.className+=" leaflet-container";this.options.fadeAnimation&&(a.className+=" leaflet-fade-anim");var b=L.DomUtil.getStyle(a,"position");if(b!="absolute"&&b!="relative")a.style.position="relative";this._initPanes();this._initControlPos&&this._initControlPos()},
+_initPanes:function(){var a=this._panes={};this._mapPane=a.mapPane=this._createPane("leaflet-map-pane",this._container);this._tilePane=a.tilePane=this._createPane("leaflet-tile-pane",this._mapPane);this._objectsPane=a.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane);a.shadowPane=this._createPane("leaflet-shadow-pane");a.overlayPane=this._createPane("leaflet-overlay-pane");a.markerPane=this._createPane("leaflet-marker-pane");a.popupPane=this._createPane("leaflet-popup-pane")},_createPane:function(a,
+b){return L.DomUtil.create("div",a,b||this._objectsPane)},_resetView:function(a,b,c){var d=this._zoom!=b;this.fire("movestart");this._zoom=b;this._initialTopLeftPoint=this._getNewTopLeftPoint(a);c?this._initialTopLeftPoint._add(L.DomUtil.getPosition(this._mapPane)):L.DomUtil.setPosition(this._mapPane,new L.Point(0,0));this._tileLayersToLoad=this._tileLayersNum;this.fire("viewreset");this.fire("move");d&&this.fire("zoomend");this.fire("moveend");if(!this._loaded)this._loaded=!0,this.fire("load")},
+_initLayers:function(a){this._layers={};for(var b=0,c=a.length;b<c;b++)this.addLayer(a[b])},_initControls:function(){this.options.zoomControl&&this.addControl(new L.Control.Zoom);if(this.options.attributionControl)this.attributionControl=new L.Control.Attribution,this.addControl(this.attributionControl)},_rawPanBy:function(a){var b=L.DomUtil.getPosition(this._mapPane);L.DomUtil.setPosition(this._mapPane,b.subtract(a))},_initEvents:function(){L.DomEvent.addListener(this._container,"click",this._onMouseClick,
+this);for(var a=["dblclick","mousedown","mouseenter","mouseleave","mousemove"],b=0;b<a.length;b++)L.DomEvent.addListener(this._container,a[b],this._fireMouseEvent,this);this.options.trackResize&&L.DomEvent.addListener(window,"resize",this.invalidateSize,this)},_onMouseClick:function(a){if(!this.dragging||!this.dragging.moved())this.fire("pre"+a.type),this._fireMouseEvent(a)},_fireMouseEvent:function(a){var b=a.type,b=b=="mouseenter"?"mouseover":b=="mouseleave"?"mouseout":b;this.hasEventListeners(b)&&
+this.fire(b,{latlng:this.mouseEventToLatLng(a),layerPoint:this.mouseEventToLayerPoint(a)})},_initInteraction:function(){var a={dragging:L.Handler.MapDrag,touchZoom:L.Handler.TouchZoom,doubleClickZoom:L.Handler.DoubleClickZoom,scrollWheelZoom:L.Handler.ScrollWheelZoom,shiftDragZoom:L.Handler.ShiftDragZoom},b;for(b in a)a.hasOwnProperty(b)&&a[b]&&(this[b]=new a[b](this),this.options[b]&&this[b].enable())},_onTileLayerLoad:function(){this._tileLayersToLoad--;if(this._tileLayersNum&&!this._tileLayersToLoad&&
+this._tileBg)clearTimeout(this._clearTileBgTimer),this._clearTileBgTimer=setTimeout(L.Util.bind(this._clearTileBg,this),500)},_getTopLeftPoint:function(){if(!this._loaded)throw Error("Set map center and zoom first.");return this._initialTopLeftPoint.subtract(L.DomUtil.getPosition(this._mapPane))},_getNewTopLeftPoint:function(a){var b=this.getSize().divideBy(2);return this.project(a).subtract(b).round()},_limitZoom:function(a){var b=this.getMinZoom(),c=this.getMaxZoom();return Math.max(b,Math.min(c,
+a))}});L.Map.include({locate:function(a){var b={timeout:1E4};L.Util.extend(b,a);navigator.geolocation?navigator.geolocation.getCurrentPosition(L.Util.bind(this._handleGeolocationResponse,this),L.Util.bind(this._handleGeolocationError,this),b):this.fire("locationerror",{code:0,message:"Geolocation not supported."});return this},locateAndSetView:function(a,b){this._setViewOnLocate=!0;this._maxLocateZoom=a||Infinity;return this.locate(b)},_handleGeolocationError:function(a){var a=a.code,b=a==1?"permission denied":
+a==2?"position unavailable":"timeout";if(this._setViewOnLocate)this.fitWorld(),this._setViewOnLocate=!1;this.fire("locationerror",{code:a,message:"Geolocation error: "+b+"."})},_handleGeolocationResponse:function(a){var b=180*a.coords.accuracy/4E7,c=b*2,d=a.coords.latitude,e=a.coords.longitude,f=new L.LatLng(d-b,e-c),b=new L.LatLng(d+b,e+c),f=new L.LatLngBounds(f,b);if(this._setViewOnLocate)b=Math.min(this.getBoundsZoom(f),this._maxLocateZoom),this.setView(f.getCenter(),b),this._setViewOnLocate=!1;
+this.fire("locationfound",{latlng:new L.LatLng(d,e),bounds:f,accuracy:a.coords.accuracy})}});L.Map.include({openPopup:function(a){this.closePopup();this._popup=a;return this.addLayer(a)},closePopup:function(){this._popup&&this.removeLayer(this._popup);return this}});L.Map.include(!L.Transition||!L.Transition.implemented()?{}:{setView:function(a,b,c){var b=this._limitZoom(b),d=this._zoom!=b;if(this._loaded&&!c&&this._layers&&(c=this._getNewTopLeftPoint(a).subtract(this._getTopLeftPoint()),d?this._zoomToIfCenterInView&&this._zoomToIfCenterInView(a,b,c):this._panByIfClose(c)))return this;this._resetView(a,b);return this},panBy:function(a){if(!this._panTransition)this._panTransition=new L.Transition(this._mapPane,{duration:0.3}),this._panTransition.on("step",this._onPanTransitionStep,
+this),this._panTransition.on("end",this._onPanTransitionEnd,this);this.fire(this,"movestart");this._panTransition.run({position:L.DomUtil.getPosition(this._mapPane).subtract(a)});return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){this.fire("moveend")},_panByIfClose:function(a){if(this._offsetIsWithinView(a))return this.panBy(a),!0;return!1},_offsetIsWithinView:function(a,b){var c=b||1,d=this.getSize();return Math.abs(a.x)<=d.x*c&&Math.abs(a.y)<=d.y*c}});L.Map.include(!L.DomUtil.TRANSITION?{}:{_zoomToIfCenterInView:function(a,b,c){if(this._animatingZoom)return!0;if(!this.options.zoomAnimation)return!1;var d=Math.pow(2,b-this._zoom),c=c.divideBy(1-1/d);if(!this._offsetIsWithinView(c,1))return!1;this._mapPane.className+=" leaflet-zoom-anim";c=this.containerPointToLayerPoint(this.getSize().divideBy(2)).add(c);this._prepareTileBg();this._runAnimation(a,b,d,c);return!0},_runAnimation:function(a,b,c,d){this._animatingZoom=!0;this._animateToCenter=a;this._animateToZoom=
+b;a=L.DomUtil.TRANSFORM;if(L.Browser.gecko||window.opera)this._tileBg.style[a]+=" translate(0,0)";L.Browser.android?(this._tileBg.style[a+"Origin"]=d.x+"px "+d.y+"px",c="scale("+c+")"):c=L.DomUtil.getScaleString(c,d);L.Util.falseFn(this._tileBg.offsetWidth);d={};d[a]=this._tileBg.style[a]+" "+c;this._tileBg.transition.run(d)},_prepareTileBg:function(){if(!this._tileBg)this._tileBg=this._createPane("leaflet-tile-pane",this._mapPane),this._tileBg.style.zIndex=1;var a=this._tilePane,b=this._tileBg;b.style[L.DomUtil.TRANSFORM]=
+"";b.style.visibility="hidden";b.empty=!0;a.empty=!1;this._tilePane=this._panes.tilePane=b;this._tileBg=a;if(!this._tileBg.transition)this._tileBg.transition=new L.Transition(this._tileBg,{duration:0.3,easing:"cubic-bezier(0.25,0.1,0.25,0.75)"}),this._tileBg.transition.on("end",this._onZoomTransitionEnd,this);this._stopLoadingBgTiles()},_stopLoadingBgTiles:function(){for(var a=[].slice.call(this._tileBg.getElementsByTagName("img")),b=0,c=a.length;b<c;b++)if(!a[b].complete)a[b].src="",a[b].parentNode.removeChild(a[b])},
+_onZoomTransitionEnd:function(){this._restoreTileFront();L.Util.falseFn(this._tileBg.offsetWidth);this._resetView(this._animateToCenter,this._animateToZoom,!0);this._mapPane.className=this._mapPane.className.replace(" leaflet-zoom-anim","");this._animatingZoom=!1},_restoreTileFront:function(){this._tilePane.innerHTML="";this._tilePane.style.visibility="";this._tilePane.style.zIndex=2;this._tileBg.style.zIndex=1},_clearTileBg:function(){if(!this._animatingZoom&&!this.touchZoom._zooming)this._tileBg.innerHTML=
+""}});L.Map.include({addControl:function(a){a.onAdd(this);var b=a.getPosition(),c=this._controlCorners[b],a=a.getContainer();L.DomUtil.addClass(a,"leaflet-control");b.indexOf("bottom")!=-1?c.insertBefore(a,c.firstChild):c.appendChild(a);return this},removeControl:function(a){var b=this._controlCorners[a.getPosition()],c=a.getContainer();b.removeChild(c);if(a.onRemove)a.onRemove(this);return this},_initControlPos:function(){var a=this._controlCorners={},b=L.DomUtil.create("div","leaflet-control-container",
+this._container);L.Browser.mobileWebkit&&(b.className+=" leaflet-big-buttons");a.topLeft=L.DomUtil.create("div","leaflet-top leaflet-left",b);a.topRight=L.DomUtil.create("div","leaflet-top leaflet-right",b);a.bottomLeft=L.DomUtil.create("div","leaflet-bottom leaflet-left",b);a.bottomRight=L.DomUtil.create("div","leaflet-bottom leaflet-right",b)}});
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/javascripts/snorby.js
^
|
@@ -18,6 +18,33 @@
var selected_events = [];
var flash_message = [];
+var csrf = $('meta[name="csrf-token"]').attr('content');
+
+function HCloader(element) {
+ var $holder = $('div#' + element);
+ $holder.fadeTo('slow', 0.2);
+
+ var $el = $('<div class="cover-loader" />');
+
+ $el.css({
+ top: $holder.offset().top,
+ left: $holder.offset().left,
+ height: $holder.height(),
+ width: $holder.width(),
+ 'line-height': $holder.height() + 'px'
+ }).html('Loading...');
+
+ $el.appendTo('body');
+
+};
+
+function clippyCopiedCallback(a) {
+ var b = $('span#main_' + a);
+ b.length != 0 && (b.attr("title", "copied!").trigger('tipsy.reload'), setTimeout(function() {
+ b.attr("title", "copy to clipboard")
+ },
+ 500))
+};
function Queue() {
if ( !(this instanceof arguments.callee) ) {
@@ -65,7 +92,7 @@
$('div.content').fadeTo(500, 0.4);
Snorby.helpers.remove_click_events(true);
- $.post('/events/classify', {events: selected_events, classification: class_id}, function() {
+ $.post('/events/classify', {events: selected_events, classification: class_id, authenticity_token: csrf}, function() {
if (current_page == "index") {
clear_selected_events();
@@ -113,7 +140,7 @@
var template = '<span class="add_tipsy round notes-count" title="{{notes_count_in_words}}"><img alt="Notes" height="16" src="/images/icons/notes.png" width="16"></span>'
var event_html = Mustache.to_html(template, data);
-
+
if (data.notes_count == 0) {
notes_count.remove();
@@ -121,9 +148,9 @@
} else {
if (notes_count.length > 0) {
- notes_count.replaceWith(event_html).trigger('change');
+ notes_count.replaceWith(event_html).trigger('tipsy.reload');
} else {
- event_row.prepend(event_html).trigger('change');
+ event_row.prepend(event_html).trigger('tipsy.reload');
};
};
@@ -155,7 +182,7 @@
return retval;
},
submitdata : function() {
- return { id: $(this).attr('data-sensor-id') };
+ return { id: $(this).attr('data-sensor-id'), authenticity_token: csrf };
}
});
@@ -187,6 +214,15 @@
$('div#events-graph').show();
return false;
});
+
+ $('a.show_map_graph').live('click', function(e) {
+ e.preventDefault();
+ $('#box-menu li').removeClass('active');
+ $(this).parent('li').addClass('active');
+ $('div.dashboard-graph').hide();
+ $('div#geoip-graph').show();
+ return false;
+ });
$('a.show_severities_graph').live('click', function(e) {
e.preventDefault();
@@ -265,7 +301,6 @@
$.scrollTo('#header', 500);
} else {
if ($('input#email_subject').val() == '') {
- console.log($('input#email_subject'));
flash_message.push({type: 'error', message: "The email subject cannot be blank."});flash();
$.scrollTo('#header', 500);
} else {
@@ -289,11 +324,15 @@
$('a.has-event-menu').live('click', function(e) {
e.preventDefault();
- var menu = $(this).parent('li').find('dl#event-sub-menu');
- if (menu.is(':visible')) { menu.fadeOut('fast') } else { $('dl#event-sub-menu').hide(); menu.fadeIn('fast') };
+ var menu = $(this).parent().find('dl.event-sub-menu');
+ if (menu.is(':visible')) { menu.fadeOut('fast') } else { $('dl.event-sub-menu').hide(); menu.fadeIn('fast') };
return false;
});
-
+
+ $('dl.event-sub-menu dd a').live('click', function(event) {
+ $(this).parents('dl').fadeOut('fast');
+ });
+
$('button.mass-action').live('click', function(e) {
e.preventDefault();
var nform = $('form#mass-action-form');
@@ -341,7 +380,7 @@
if (selected_events) {
- $.post(this.href, { events: selected_events });
+ $.post(this.href, { events: selected_events, authenticity_token: csrf});
} else {
flash_message.push({type: 'error', message: "Please Select Events To Perform This Action"});
@@ -366,7 +405,7 @@
if ( confirm("Are you sure you want to delete this note?") ) {
$('div.notes').fadeTo(500, 0.4);
- $.post('/notes/destroy', { id: note_id, '_method': 'delete' }, null, 'script');
+ $.post('/notes/destroy', { id: note_id, authenticity_token: csrf, '_method': 'delete' }, null, 'script');
};
return false;
@@ -396,7 +435,7 @@
var current_width = $(this).width();
$(this).addClass('loading').css('width', current_width);
- $.get('/notes/new', { sid: event_sid, cid: event_cid }, null, 'script');
+ $.get('/notes/new', { sid: event_sid, cid: event_cid, authenticity_token: csrf}, null, 'script');
};
return false;
@@ -413,7 +452,7 @@
var current_width = $(this).width();
$(this).addClass('loading').css('width', current_width);
- $.post('/notes/create', { sid: event_sid, cid: event_cid, body: note_body }, null, 'script');
+ $.post('/notes/create', { sid: event_sid, cid: event_cid, body: note_body, authenticity_token: csrf}, null, 'script');
} else {
flash_message.push({type: "error", message: "The note body cannot be blank!"});
@@ -429,7 +468,33 @@
$('pre#' + $(this).attr('data-content-name')).show();
return false;
});
-
+
+ $('a.snorbybox-content').live('click', function(event) {
+ event.preventDefault();
+ $('dl.drop-down-menu').fadeOut('slow');
+ var content = $(this).attr('data-content');
+
+ $.fancybox({
+ padding: 0,
+ content: content,
+ centerOnScroll: true,
+ zoomSpeedIn: 300,
+ zoomSpeedOut: 300,
+ overlayShow: true,
+ overlayOpacity: 0.5,
+ overlayColor: '#000',
+ onStart: function() {
+ $(document).unbind('keydown', 'right');
+ $(document).unbind('keydown', 'esc');
+ $(document).unbind('keydown', 'shift+left');
+ $('dl#event-sub-menu').hide();
+ },
+ onClosed: function() {
+ Snorby.hotkeys();
+ }
+ });
+ });
+
$('a.snorbybox').live('click', function() {
$('dl.drop-down-menu').fadeOut('slow');
$.fancybox({
@@ -444,7 +509,7 @@
onStart: function() {
$(document).unbind('keydown', 'right');
$(document).unbind('keydown', 'esc');
- $(document).unbind('keydown', 'ctrl+left');
+ $(document).unbind('keydown', 'shift+left');
$('dl#event-sub-menu').hide();
},
onClosed: function() {
@@ -459,7 +524,7 @@
var cid = $(this).parents('li.event').attr('data-event-cid');
$(this).removeClass('create-favorite').addClass('destroy-favorite');
- $.post('/events/favorite', { sid: sid, cid: cid });
+ $.post('/events/favorite', { sid: sid, cid: cid, authenticity_token: csrf});
var count = new Queue();
count.up();
@@ -473,7 +538,7 @@
var action = $('div#events').attr('data-action');
$(this).removeClass('destroy-favorite').addClass('create-favorite');
- $.post('/events/favorite', { sid: sid, cid: cid });
+ $.post('/events/favorite', { sid: sid, cid: cid, authenticity_token: csrf});
var count = new Queue();
count.down();
@@ -518,14 +583,25 @@
if (current_row.attr('data') == 'true') {
Snorby.helpers.remove_click_events(false);
+
if (current_row.is(':visible')) {
+
current_row.slideUp('fast', function () {
$('li.event div.event-data').slideUp('fast');
});
+
+ Snorby.hotkeys();
+
} else {
$('li.event div.event-data').slideUp('fast');
current_row.slideDown('fast');
+
+ $(document).unbind('keydown', 'left');
+ $(document).unbind('keydown', 'right');
+ $(document).unbind('keydown', 'shift+left');
+ $(document).unbind('keydown', 'shift+right');
};
+
} else {
check_box.hide();
@@ -533,6 +609,13 @@
parent_row.find('div.select').append("<img alt='laoding' src='/images/icons/loading.gif' class='select-loading'>");
$.get('/events/show/'+sid+'/'+cid, function () {
+
+ $(document).unbind('keydown', 'left');
+ $(document).unbind('keydown', 'right');
+ $(document).unbind('keydown', 'shift+left');
+ $(document).unbind('keydown', 'shift+right');
+
+
Snorby.helpers.remove_click_events(false);
$('.select-loading').remove();
check_box.show();
@@ -563,18 +646,18 @@
$('#users input#enabled').live('click', function(e) {
var user_id = $(this).parent('td').attr('data-user');
if ($(this).attr('checked')) {
- $.post('/users/toggle_settings', { user_id: user_id, user: { enabled: true } });
+ $.post('/users/toggle_settings', { user_id: user_id, user: { enabled: true }, authenticity_token: csrf});
} else {
- $.post('/users/toggle_settings', { user_id: user_id, user: { enabled: false } });
+ $.post('/users/toggle_settings', { user_id: user_id, user: { enabled: false }, authenticity_token: csrf});
};
});
$('#users input#admin').live('click', function(e) {
var user_id = $(this).parent('td').attr('data-user');
if ($(this).attr('checked')) {
- $.post('/users/toggle_settings', { user_id: user_id, user: { admin: true } });
+ $.post('/users/toggle_settings', { user_id: user_id, user: { admin: true }, authenticity_token: csrf});
} else {
- $.post('/users/toggle_settings', { user_id: user_id, user: { admin: false } });
+ $.post('/users/toggle_settings', { user_id: user_id, user: { admin: false }, authenticity_token: csrf});
};
});
@@ -662,7 +745,7 @@
$('.add_tipsy').tipsy({
fade: true,
- html: true,
+ html: false,
gravity: 's',
live: true
});
@@ -770,7 +853,7 @@
});
});
};
-
+
$('input#selected_events[type="hidden"]').val(selected_events);
});
@@ -897,25 +980,35 @@
if ($('div.pager').is(':visible')) {
- $(document).bind('keydown', 'ctrl+down', function() {
- if ($('ul.table div.content li.event.currently-over').is(':visible')) {
- $('ul.table div.content li.event.currently-over').removeClass('currently-over').next().addClass('currently-over');
+ $(document).bind('keydown', 'shift+down', function() {
+ var item = $('ul.table div.content li.event.currently-over');
+ if (item.is(':visible')) {
+ if (item.next().length != 0) {
+ item.removeClass('currently-over').next().addClass('currently-over');
+ } else {
+ $('ul.table div.content li.event:first').addClass('currently-over');
+ };
} else {
$('ul.table div.content li.event:first').addClass('currently-over');
};
return false;
});
- $(document).bind('keydown', 'ctrl+up', function() {
- if ($('ul.table div.content li.event.currently-over').is(':visible')) {
- $('ul.table div.content li.event.currently-over').removeClass('currently-over').prev().addClass('currently-over');
+ $(document).bind('keydown', 'shift+up', function() {
+ var item = $('ul.table div.content li.event.currently-over');
+ if (item.is(':visible')) {
+ if (item.prev().length != 0) {
+ item.removeClass('currently-over').prev().addClass('currently-over');
+ } else {
+ $('ul.table div.content li.event:last').addClass('currently-over');
+ };
} else {
$('ul.table div.content li.event:last').addClass('currently-over');
};
return false;
});
- $(document).bind('keydown', 'ctrl+o', function() {
+ $(document).bind('keydown', 'shift+return', function() {
$('ul.table div.content li.event.currently-over div.row div.click').click();
return false;
});
@@ -945,30 +1038,30 @@
return false;
});
- $(document).bind('keydown', 'ctrl+right', function() {
+ $(document).bind('keydown', 'shift+right', function() {
$('div.pager.main ul.pager li.last a').click();
return false;
});
- $(document).bind('keydown', 'shift+right', function() {
- $('div.pager.notes-pager ul.pager li.next a').click();
- return false;
- });
+ $(document).bind('keydown', 'alt+right', function() {
+ $('div.pager.notes-pager ul.pager li.next a').click();
+ return false;
+ });
$(document).bind('keydown', 'right', function() {
$('div.pager.main ul.pager li.next a').click();
return false;
});
- $(document).bind('keydown', 'ctrl+left', function() {
+ $(document).bind('keydown', 'shift+left', function() {
$('div.pager.main ul.pager li.first a').click();
return false;
});
- $(document).bind('keydown', 'shift+left', function() {
- $('div.pager.notes-pager ul.pager li.previous a').click();
- return false;
- });
+ $(document).bind('keydown', 'alt+left', function() {
+ $('div.pager.notes-pager ul.pager li.previous a').click();
+ return false;
+ });
$(document).bind('keydown', 'left', function() {
$('div.pager.main ul.pager li.previous a').click();
@@ -1016,6 +1109,14 @@
var packet_capture_plugin = $('select#_settings_packet_capture_type').attr('packet_capture_plugin');
$('select#_settings_packet_capture_type option[value="'+packet_capture_plugin+'"]').attr('selected', 'selected');
+ if ($('input#_settings_autodrop:checked').length > 0) {
+ $('select#_settings_autodrop_count').attr('disabled', '');
+ } else {
+ $('select#_settings_autodrop_count').attr('disabled', 'disabled');
+ };
+
+ var autodrop_count = $('select#_settings_autodrop_count').attr('autodrop_count');
+ $('select#_settings_autodrop_count option[value="'+autodrop_count+'"]').attr('selected', 'selected');
};
$('input#_settings_packet_capture').live('click', function() {
@@ -1027,7 +1128,16 @@
$('p.pc-settings input[type="text"], p.pc-settings select').removeClass('required');
};
});
-
+
+ $('input#_settings_autodrop').live('click', function() {
+ console.log('w0ots!')
+ if ($(this).is(':checked')) {
+ $('select#_settings_autodrop_count').attr('disabled', '');
+ } else {
+ $('select#_settings_autodrop_count').attr('disabled', 'disabled');
+ };
+ });
+
$('input#_settings_packet_capture_auto_auth').live('click', function() {
if ($('input#_settings_packet_capture_auto_auth:checked').length > 0) {
$('input#_settings_packet_capture_user, input#_settings_packet_capture_password').addClass('required');
@@ -1061,7 +1171,80 @@
}
jQuery(document).ready(function($) {
-
+
+ $('#login form#user_new').submit(function(event) {
+ event.preventDefault();
+ var self = $('#login');
+ var that = this;
+
+ if ($('input#user_password', that).attr('value').length > 1) {
+ if ($('input#user_email', that).attr('value').length > 5) {
+
+ $.post(that.action, $(that).serialize(), function(data) {
+ if (data.success) {
+
+ flash_message.push({
+ type: 'success',
+ message: "Loading - Authentication Successful!"
+ });
+ flash();
+ $.get(data.redirect, function(data) {
+ self.fadeOut('slow', function() {
+ document.open();
+ document.write(data);
+ document.close();
+ history.pushState(null, 'Snorby - Dashboard', '/');
+ });
+ });
+ } else {
+ flash_message.push({
+ type: 'error',
+ message: "Fail - Authentication Failure!"
+ });
+ flash();
+ };
+ });
+
+ };
+ };
+ });
+
+ $('#login button.forgot-my-password').live('click', function(event) {
+ event.preventDefault();
+ $.get('/users/password/new', function(data) {
+ var content = $(data).find('#content').html();
+ $('#content').html(content);
+ history.pushState(null, 'Snorby - Password Reset', '/users/password/new');
+ });
+ });
+
+ $('#fancybox-wrap').draggable({
+ handle: 'div#box-title',
+ cursor: 'move'
+ });
+
+ $('li.administration a').live('click', function(event) {
+ var self = this;
+ event.preventDefault();
+ $('dl#admin-menu').toggle();
+ });
+
+ $('dl#admin-menu a').live('click', function(event) {
+ $(this).parents('dl').fadeOut('fast');
+ });
+
+ $('#wrapper').live('click', function() {
+ if ($('dl#admin-menu').is(':visible')) {
+ $('dl#admin-menu').fadeOut('fast');
+ };
+ });
+
+ $('td.search-by-signature').live('click', function(event) {
+ event.preventDefault();
+ var url = $(this).attr('data-url');
+ window.location = url;
+ });
+
Snorby.setup();
Snorby.admin();
Snorby.callbacks();
@@ -1079,5 +1262,7 @@
Snorby.pages.classifications();
Snorby.pages.dashboard();
Snorby.pages.events();
-
+
+ $('.add_chosen').chosen();
+
});
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/javascripts/tipsy.js
^
|
@@ -1,11 +1,20 @@
+// tipsy, facebook style tooltips for jquery
+// version 1.0.0a
+// (c) 2008-2010 jason frame [jason@onehackoranother.com]
+// released under the MIT license
+
(function($) {
+ function maybeCall(thing, ctx) {
+ return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
+ };
+
function Tipsy(element, options) {
this.$element = $(element);
this.options = options;
this.enabled = true;
this.fixTitle();
- }
+ };
Tipsy.prototype = {
show: function() {
@@ -14,18 +23,17 @@
var $tip = this.tip();
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
- $tip[0].className = 'tipsy';
- $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
+ $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
+ $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
var pos = $.extend({}, this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
});
- var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight;
- var gravity = (typeof this.options.gravity == 'function')
- ? this.options.gravity.call(this.$element[0])
- : this.options.gravity;
+ var actualWidth = $tip[0].offsetWidth,
+ actualHeight = $tip[0].offsetHeight,
+ gravity = maybeCall(this.options.gravity, this.$element[0]);
var tp;
switch (gravity.charAt(0)) {
@@ -52,6 +60,10 @@
}
$tip.css(tp).addClass('tipsy-' + gravity);
+ $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
+ if (this.options.className) {
+ $tip.addClass(maybeCall(this.options.className, this.$element[0]));
+ }
if (this.options.fade) {
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
@@ -126,7 +138,15 @@
if (!tipsy) {
tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
$.data(ele, 'tipsy', tipsy);
- }
+ };
+
+ $(ele).bind("tipsy.reload", function() {
+ tipsy.options.fade = false;
+ tipsy.show();
+ tipsy.options.fade = true;
+ return $(ele);
+ });
+
return tipsy;
}
@@ -158,13 +178,13 @@
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
this[binder](eventIn, enter)[binder](eventOut, leave);
- }
+ };
return this;
-
};
$.fn.tipsy.defaults = {
+ className: null,
delayIn: 0,
delayOut: 0,
fade: false,
@@ -177,7 +197,11 @@
title: 'title',
trigger: 'hover'
};
-
+
+ // Overwrite this method to provide options on a per-element basis.
+ // For example, you could store the gravity in a 'tipsy-gravity' attribute:
+ // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
+ // (remember - do not modify 'options' in place!)
$.fn.tipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
};
@@ -190,4 +214,34 @@
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
};
-})(jQuery);
\ No newline at end of file
+ /**
+ * yields a closure of the supplied parameters, producing a function that takes
+ * no arguments and is suitable for use as an autogravity function like so:
+ *
+ * @param margin (int) - distance from the viewable region edge that an
+ * element should be before setting its tooltip's gravity to be away
+ * from that edge.
+ * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
+ * if there are no viewable region edges effecting the tooltip's
+ * gravity. It will try to vary from this minimally, for example,
+ * if 'sw' is preferred and an element is near the right viewable
+ * region edge, but not the top edge, it will set the gravity for
+ * that element's tooltip to be 'se', preserving the southern
+ * component.
+ */
+ $.fn.tipsy.autoBounds = function(margin, prefer) {
+ return function() {
+ var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
+ boundTop = $(document).scrollTop() + margin,
+ boundLeft = $(document).scrollLeft() + margin,
+ $this = $(this);
+
+ if ($this.offset().top < boundTop) dir.ns = 'n';
+ if ($this.offset().left < boundLeft) dir.ew = 'w';
+ if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
+ if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
+
+ return dir.ns + (dir.ew ? dir.ew : '');
+ }
+ };
+})(jQuery);
|
|
Added |
Snorby-2.3.9.tar.bz2/public/stylesheets/chosen-sprite.png
^
|
[-]
[+]
|
Changed |
Snorby-2.3.9.tar.bz2/public/stylesheets/snorby.css
^
|
@@ -19,6 +19,7 @@
vertical-align: baseline;
background: transparent;
}
+
body {
line-height: 1;
}
@@ -43,27 +44,15 @@
text-decoration: line-through;
}
+.ui-state-default{
+ padding: 0 !important;
+ text-align: center !important;
+}
+
/* @end */
/* @group FancyBox */
-/*
- * FancyBox - jQuery Plugin
- * Simple and fancy lightbox alternative
- *
- * Examples and documentation at: http://fancybox.net
- *
- * Copyright (c) 2008 - 2010 Janis Skarnelis
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
- *
- * Version: 1.3.2 (20/10/2010)
- * Requires: jQuery v1.3+
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-
#fancybox-loading {
position: fixed;
top: 50%;
@@ -119,7 +108,7 @@
position: relative;
width: 100%;
height: 100%;
- background: #fff;
+ background: transparent;
}
#fancybox-content {
@@ -130,7 +119,7 @@
position: relative;
overflow: hidden;
z-index: 1102;
- border: 0px solid #fff;
+ background-color: transparent;
}
#fancybox-hide-sel-frame {
@@ -178,6 +167,7 @@
height: 100%;
border: none;
display: block;
+ background: transparent;
}
#fancybox-left, #fancybox-right {
@@ -250,6 +240,10 @@
left: 0;
width: 100%;
background-image: url('../images/fancybox/fancybox-x.png');
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-topleft: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
}
#fancybox-bg-ne {
@@ -280,6 +274,10 @@
width: 100%;
background-image: url('../images/fancybox/fancybox-x.png');
background-position: 0px -20px;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
}
#fancybox-bg-sw {
@@ -409,6 +407,23 @@
/* @end */
+div.rule-data pre{
+ white-space: pre-wrap; /* css-3 */
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ word-wrap: break-word;
+ background-color: #000;
+ color: #fff;
+ text-decoration: none;
+ padding: 10px;
+ margin: 5px 0;
+ height: auto;
+ width: auto;
+ border: 3px solid #666;
+ font: normal normal normal 1.1em "Courier New", Courier, mono;
+}
+
/* @group Main */
.boxit{
@@ -416,9 +431,9 @@
}
html,body{
- background-color: #ededed;
font-family: Helvetica, Arial;
font-size: 12px;
+ background: #ededed url(../images/page/body-bg.png) repeat;
}
a img {
@@ -442,10 +457,10 @@
/* @group Snorby-Box */
#snorby-box{
- border: 10px solid #242424;
+ border: 10px solid rgba(36,36,36,0.9);
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
}
#snorby-box #box-content{
@@ -454,7 +469,8 @@
position: relative;
padding: 10px;
height: 500px;
- width: 750px; !important
+ width: 750px;
+ background-color: #fff;
}
#snorby-box #box-content-small{
@@ -463,12 +479,13 @@
position: relative;
padding: 10px;
height: auto;
- width: 750px; !important
+ width: 750px;
+ background-color: #fff;
}
#snorby-box #box-title{
- padding: 20px 10px;
- background-color: #474747;
+ cursor: move;
+ padding: 17px 10px;
color: #fff;
font-weight: normal;
font-variant: normal;
@@ -477,14 +494,25 @@
letter-spacing: -1px;
text-shadow: #2a2a2a 0 1px 0;
font-style: normal;
+ background: #474747
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#545454',endColorstr='#474747');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#545454),to(#474747));
+ background: -moz-linear-gradient(-90deg,#545454,#474747);
}
#snorby-box #box-footer{
display: block;
position: relative;
- overflow: hidden;
- background-color: #ebebeb;
- padding: 10px;
+ overflow: visible;
+ background: #ededed
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));
+ background: -moz-linear-gradient(-90deg,#fff,#ededed);
+ border-top: 1px solid #dbdbdb;
+ margin-left: -10px;
+ margin-right: -10px;
+ margin-bottom: -10px;
+ padding: 10px 10px 12px;
}
/* @end */
@@ -515,20 +543,30 @@
#flash_message{
cursor: pointer;
position: absolute;
- height: 90px;
display: block;
overflow: hidden;
top: 0;
right: 0;
left: 0;
- background-color: rgba(24,31,34,0.79);
+ background-color: rgba(24,31,34,0.9);
z-index: 9999999;
+ height: 61px;
+}
+
+body.login #flash_message{
+ border-bottom: 1px solid #000;
+ background-color: rgba(117,29,5,0.8);
+}
+
+body.login #flash_message.success{
+ border-bottom: 1px solid #000;
+ background-color: rgba(15,113,12,0.8);
}
#flash_message div.message{
cursor: pointer;
text-shadow: #000 0 0 0;
- line-height: 90px;
+ line-height: 60px;
width: 960px;
margin: auto;
color: #fff;
@@ -552,16 +590,16 @@
#header{
display: block;
position: relative;
- overflow: hidden;
- background: #202325;
+ overflow: visible;
+ background: #202325 url(../images/header/header-bg.png) repeat;
border-bottom: 1px solid #000;
}
#header #header-inside{
display: block;
position: relative;
- overflow: hidden;
- height: 90px;
+ overflow: visible;
+ height: 92px;
border-bottom: 1px solid #5a5a5a;
}
@@ -569,14 +607,14 @@
height: 60px;
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
border-bottom: 1px solid #000;
}
#header #header-inside #header-content #header-top{
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
}
#header #header-inside #header-content #header-top #logo{
@@ -584,6 +622,12 @@
text-align: right;
background: url(../images/header/logo.png) no-repeat;
text-indent: -99999em;
+ position: absolute;
+ display: block;
+ overflow: visible;
+ top: 0;
+ left: -55px;
+ bottom: 0;
}
#header #header-inside #header-content #header-top #logo a{
@@ -634,22 +678,30 @@
#header #header-inside #menu{
border-top: 1px solid #5a5a5a;
- background: #41464a;
+ background: #41464a url(../images/header/menu-bg.png) repeat-x;
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
height: 30px;
}
#header #header-inside #menu ul{
-
+ overflow: visible;
+ width: 1020px;
+ margin: auto;
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
}
#header #header-inside #menu ul li{
height: 30px;
line-height: 30px;
float: left;
- overflow: hidden;
+ overflow: visible;
position: relative;
display: block;
text-align: center;
@@ -657,13 +709,20 @@
border-left: 1px solid #313131;
}
+#header #header-inside #menu ul li.menu-error.admin{
+ border-style: none;
+ color: #e3e7e7;
+ margin-right: 135px;
+}
+
#header #header-inside #menu ul li.menu-error{
border-style: none;
color: #e3e7e7;
+ margin-right: 5px
}
#header #header-inside #menu ul li.menu-error:hover{
- background-color: #41464a;
+ background: transparent none;
}
#header #header-inside #menu ul li.menu-error img{
@@ -674,25 +733,138 @@
#header #header-inside #menu ul li.administration{
- background: transparent url(../images/header/admin-button.png) no-repeat 0 top;
- color: #e3e3e3;
- width: 124px;
- border-style: none;
+ background: transparent url(../images/header/admin-button.png) no-repeat;
+ width: 127px;
margin-left: 10px;
+ position: absolute;
+ height: 32px;
+ right: -1px;
+ top: -1px;
+ bottom: 0;
+ text-shadow: #6f0a0b 0 1px 0;
+ border-style: none;
+ line-height: 32px;
}
+
#header #header-inside #menu ul li.administration:hover{
+ background: transparent url(../images/header/admin-button.png) no-repeat 0 -32px;
+}
+
+#header #header-inside #menu ul li.administration:active{
background: transparent url(../images/header/admin-button.png) no-repeat 0 bottom;
- border-style: none; !important
}
#header #header-inside #menu ul li.administration a{
- color: #e3e3e3;
+ color: #f0f0f0;
border-style: none; !important
}
+dl#admin-menu{
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 0px 1px 20px rgba(0,0,0,0.4);
+ -moz-box-shadow: 0px 1px 20px rgba(0,0,0,0.4);
+ box-shadow: 0px 1px 20px rgba(0,0,0,0.4);
+ min-width: 200px;
+ padding: 0;
+ opacity: 0.95;
+ display: block;
+ overflow: visible;
+ position: absolute;
+ background: #111;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#2b2b2b',endColorstr='#111');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#2b2b2b),to(#111));
+ background: -moz-linear-gradient(-90deg,#2b2b2b,#111);
+ z-index: 99999;
+ border: 1px solid #151515;
+ top: 40px;
+ right: -32.5px;
+ margin-right: 0;
+ margin-left: 0;
+ margin-bottom: 0;
+}
+dl#admin-menu dd{
+ margin: 0;
+ padding: 4px 15px;
+ height: 25px;
+ display: block;
+ position: relative;
+ overflow: hidden;
+ border: 1px solid #000;
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+dl#admin-menu div.admin-arrow{
+ background: url(../images/menu-arrow.png) no-repeat;
+ width: 23px;
+ height: 13px;
+ position: absolute;
+ display: block;
+ top: -10px;
+ right: 42%;
+}
+
+dl#admin-menu dd:first-child{
+ border-top: 1px solid #000;
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-topleft: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+}
+
+dl#admin-menu dd:last-child{
+ border-bottom: 1px solid #000;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+}
+
+dl#admin-menu dd span{
+ -webkit-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ -moz-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ float: right;
+ display: block;
+ background-color: #000;
+ padding: 0 5px;
+ line-height: 20px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ margin-top: 2px;
+ border: 1px solid #393939;
+ font-size: 0.9em;
+ font-weight: normal;
+ font-style: normal;
+ text-decoration: none;
+ font-variant: normal;
+ height: 20px;
+ margin-right: -10px;
+}
+
+dl#admin-menu dd:hover{
+ background-color: rgba(66,66,66,0.4);
+}
+
+dl#admin-menu dd a{
+ line-height: 25px;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ display: block;
+ overflow: visible;
+ color: #ececec;
+ text-decoration: none;
+ font-variant: normal;
+ font-weight: normal;
+ font-style: normal;
+}
#header #header-inside #menu ul li:hover{
- background: #464d4f;
+ background: transparent url(../images/header/menu-bg.png) repeat-x 0 bottom;
}
#header #header-inside #menu ul li.blank{
@@ -733,8 +905,7 @@
/* @group Body */
#wrapper{
- background-color: #ededed;
- padding-top: 20px;
+ padding-top: 15px;
clear: both;
display: block;
position: relative;
@@ -748,8 +919,11 @@
min-height: 100px;
position: relative;
display: block;
- border: 1px solid #cdcdcd;
+ border: 1px solid #bebebe;
padding-bottom: 5px;
+ -webkit-box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
+ -moz-box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
+ box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
}
#wrapper #content div.note{
@@ -768,6 +942,12 @@
font-size: 1.1em;
}
+#wrapper #content div.note.lookups{
+ display: block;
+ position: relative;
+ overflow: hidden;
+}
+
.page{
margin-top: 10px;
margin-bottom: 10px;
@@ -781,19 +961,30 @@
#wrapper #content #title{
height: 35px;
- background: #ededed url(../images/page/title-bg.png) repeat-x 0 bottom;
+ background: #ededed
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));
+ background: -moz-linear-gradient(-90deg,#fff,#ededed);
+ border-bottom: 1px solid #d5d5d5;
}
#wrapper #content #title #title-header{
height: 35px;
- line-height: 35px;
+ line-height: 37px;
font-weight: bold;
text-decoration: none;
font-variant: normal;
letter-spacing: -1px;
- font-size: 1.6em;
text-shadow: #fff 0 1px 0;
- color: #313131;
+ color: #4a4a4a;
+ font-size: 1.3em;
+}
+
+#title-header i{
+ font-weight: normal;
+ font-style: normal;
+ text-decoration: none;
+ font-variant: normal;
}
#wrapper #content #title #title-header-dashboard{
@@ -830,6 +1021,7 @@
line-height: 34px;
height: 35px;
float: right;
+ margin-right: 10px;
}
#wrapper #content #title #title-menu-holder ul#title-menu li{
@@ -845,6 +1037,7 @@
#wrapper #content #title #title-menu-holder ul#title-menu li:hover{
background-color: rgba(255,254,255,0.7);
+ border-bottom: 1px solid #fff;
}
#wrapper #content #title #title-menu-holder ul#title-menu li:first-child {
@@ -874,32 +1067,34 @@
display: block;
position: relative;
overflow: hidden;
+ margin-right: 2px;
+ top: 1px;
}
#wrapper #content #title #title-menu-holder ul#title-menu li a img{
vertical-align: middle;
margin-top: -5px;
- margin-right: 5px;
+ margin-right: 3px;
}
#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu{
clear: both;
- -webkit-box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
- -moz-box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
- box-shadow: 0px 1px 10px rgba(0,0,0,0.2);
+ -webkit-box-shadow: 0px 1px 10px rgba(0,0,0,0.3);
+ -moz-box-shadow: 0px 1px 10px rgba(0,0,0,0.3);
+ box-shadow: 0px 1px 10px rgba(0,0,0,0.3);
display: inline-block;
position: absolute;
- top: 35px;
+ top: 36px;
z-index: 999999;
background-color: #fff;
min-width: 230px;
- right: 0;
+ right: -1px;
padding: 5px;
visibility: visible;
overflow: visible;
- border-bottom: 1px solid #cdcdcd;
- border-left: 1px solid #cdcdcd;
- border-right: 1px solid #cdcdcd;
+ border-bottom: 1px solid #c6c6c6;
+ border-left: 1px solid #c6c6c6;
+ border-right: 1px solid #c6c6c6;
}
#wrapper #content #title #title-menu-holder ul#title-menu dl.drop-down-menu dd:first-child{
@@ -1004,6 +1199,30 @@
/* @group Helpers */
+.clearfix:after {
+ content: "\0020";
+ display: block;
+ height: 0;
+ clear: both;
+ overflow: hidden;
+ visibility: hidden;
+}
+
+div.cover-loader{
+ vertical-align: middle;
+ position: absolute;
+ overflow: hidden;
+ display: block;
+ z-index: 99999;
+ text-align: center;
+ font-weight: bold;
+ text-decoration: none;
+ font-variant: normal;
+ color: #222;
+ font-size: 2.0em;
+ text-shadow: #fff 0 1px 0;
+}
+
div.pad-left{
margin-left: 10px;
}
@@ -1069,26 +1288,26 @@
}
.round-with-tabs{
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
}
.round_top {
- -moz-border-radius-topright: 4px;
- -moz-border-radius-topleft: 4px;
- -webkit-border-top-right-radius: 4px;
- -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-topleft: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
}
.round_bottom {
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
}
.shadow {
@@ -1098,9 +1317,9 @@
}
.shadow-in {
- -webkit-box-shadow: inset 0px 1px 10px #b0b0b0;
- -moz-box-shadow: inset 0px 1px 10px #b0b0b0;
- box-shadow: inset 0px 1px 10px #b0b0b0;
+ -webkit-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ -moz-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
}
.shadow-light{
@@ -1216,6 +1435,10 @@
background: #fd2516;
}
+td.search-by-signature{
+ cursor: pointer;
+}
+
table td a{
padding: 3px 5px;
background-color: #e0e0e0;
@@ -1236,12 +1459,29 @@
table td a.ip-button{
height: 15px;
line-height: 17px;
- width: 100px;
+ /*width: 100px;*/
position: relative;
overflow: hidden;
display: block;
- text-align: center;
- top: 2px;
+ text-align: left;
+ top: 5px;
+ float: left;
+ padding-right: 25px;
+ text-shadow: #fff 0 1px 0;
+}
+
+span.ip-copy{
+ float: right;
+}
+
+span.clippy{
+ display: inline-block;
+ position: absolute;
+ right: 5px;
+ overflow: visible;
+ width: 14px;
+ height: 14px;
+ top: 4px;
}
table td a:hover{
@@ -1371,6 +1611,8 @@
background-color: #ddd;
text-shadow: #fff 0 1px 0;
font-size: 0.9em;
+ display: block;
+ position: relative;
}
ul.table li.header div{
@@ -1380,6 +1622,18 @@
float: left;
}
+ul.table li.header div.row{
+ width: 990px !important;
+ float: none !important;
+}
+
+ul.table li.header div.row a{
+ color: #474747;
+ font-weight: bold;
+ text-decoration: none;
+ font-variant: normal;
+}
+
ul.table div.content li .row{
min-height: 30px;
line-height: 30px;
@@ -1388,6 +1642,9 @@
background: #fff url(../images/page/table-bg.png) repeat-x 0 bottom;
border-left: 1px solid #cdcdcd;
border-right: 1px solid #cdcdcd;
+ position: relative;
+ display: block;
+ overflow: hidden;
}
ul.table div.content li .row .signature{
@@ -1413,6 +1670,9 @@
ul.table div.content li.event.highlight .row div.timestamp{
color: #fffeff;
text-shadow: #000 0 1px 0;
+ position: absolute;
+ top: 0;
+ right: 0;
}
ul.table div.content li.event .row div .create-favorite{
@@ -1674,9 +1934,10 @@
float: right;
display: block;
position: relative;
+ overflow: visible;
}
-ul.table div.content #event-menu dl#event-sub-menu{
+dl.event-sub-menu{
display: block;
position: absolute;
z-index: 99999;
@@ -1686,17 +1947,26 @@
background: -webkit-gradient(linear,0% 100%,0% 0,from(#000000),to(#363636));
background: -moz-linear-gradient(90deg,#000000,#363636);
+ -webkit-box-shadow: 0px 1px 10px rgba(0,0,0,0.5);
+ -moz-box-shadow: 0px 1px 10px rgba(0,0,0,0.5);
+ box-shadow: 0px 1px 10px rgba(0,0,0,0.5);
+
color: #fffeff;
width: 200px;
border: 1px solid #222;
padding: 5px;
+ overflow: visible;
+}
+
+dl.event-sub-menu.push-down{
+ top: 61px;
}
-ul.table div.content #event-menu dl#event-sub-menu dd{
+dl.event-sub-menu dd{
padding: 0 5px;
}
-ul.table div.content #event-menu dl#event-sub-menu dd a{
+dl.event-sub-menu dd a{
color: #fff;
text-shadow: #000 0 1px 0;
font-weight: normal;
@@ -1705,9 +1975,13 @@
font-variant: normal;
display: block;
position: relative;
+ background: transparent !important;
+ border: none !important;
+ margin: 0 !important;
+ padding: 0 !important;
}
-ul.table div.content #event-menu dl#event-sub-menu dd:hover{
+dl.event-sub-menu dd:hover{
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
@@ -1819,8 +2093,6 @@
/* @group Buttons */
-
-
.form-actions {
text-align: right;
padding-bottom: 2px;
@@ -1852,7 +2124,7 @@
}
button.default,a.button.default {
- height: 30px;
+ height: 27px;
padding: 0;
position: relative;
top: 1px;
@@ -1868,12 +2140,12 @@
background: -webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#e1e1e1));
background: -moz-linear-gradient(-90deg,#fff,#e1e1e1);
border-bottom: 1px solid #ebebeb;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.3);
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.3);
- box-shadow: 0 1px 2px rgba(0,0,0,0.3);
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: 0 1px 4px rgba(0,0,0,0.2);
+ -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.2);
+ box-shadow: 0 1px 4px rgba(0,0,0,0.2);
cursor: pointer;
-webkit-font-smoothing: subpixel-antialiased!important;
border: 1px solid #cbcbcb;
@@ -1909,23 +2181,21 @@
button.default.success,a.button.default.success{
color: #fff;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
- border: 1px solid #1fc021;
- border-bottom-color: #1aa31b;
- background: #23c926;
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');
- background: -webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#23c926));
- background: -moz-linear-gradient(-90deg,#1ef727,#23c926);
+ border: 1px solid #159117;
+ background: #1fb322;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#23c926',endColorstr='#1fb322');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#23c926),to(#1fb322));
+ background: -moz-linear-gradient(-90deg,#23c926,#1fb322);
}
button.default.success:hover,a.button.default.success:hover{
color: #fff;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
- border: 1px solid #1fc021;
- border-bottom-color: #1aa31b;
- background: #27de29;
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#27de29');
- background: -webkit-gradient(linear,0% 0,0% 100%,from(#1ef727),to(#27de29));
- background: -moz-linear-gradient(-90deg,#1ef727,#27de29);
+ background: #1fb322;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#08da10',endColorstr='#23c926');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#08da10),to(#23c926));
+ background: -moz-linear-gradient(-90deg,#08da10,#23c926);
+ border: 1px solid #159117;
}
button.default.success:active,a.button.default.success:active{
@@ -1933,10 +2203,11 @@
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
border: 1px solid #1ef727;
border-bottom-color: #1ef727;
- background: #23c926;
- filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ef727',endColorstr='#23c926');
- background: -webkit-gradient(linear,0% 100%,0% 0,from(#1ef727),to(#23c926));
- background: -moz-linear-gradient(90deg,#1ef727,#23c926);
+ background: #1fb322;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1fb322',endColorstr='#23c926');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#1fb322),to(#23c926));
+ background: -moz-linear-gradient(-90deg,#1fb322,#23c926);
+ border: 1px solid #159117;
}
button.default.warning:hover,a.button.default.warning:hover{
@@ -1963,9 +2234,9 @@
button.default span,a.button.default span {
display: block;
- height: 30px;
+ height: 27px;
padding: 0 10px;
- line-height: 30px;
+ line-height: 27px;
}
button.default:hover,a.button.default:hover {
@@ -1979,6 +2250,17 @@
border: 1px solid #515151;
}
+#new_note button.add_new_note:hover,
+#new_note button.submit_new_note:hover {
+ color: #fff;
+ text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
+ background: #575757;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8a8a8a',endColorstr='#575757');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#8a8a8a),to(#575757));
+ background: -moz-linear-gradient(-90deg,#8a8a8a,#575757);
+ border: 1px solid #808080;
+}
+
button.default:active,a.button.default:active {
color: #fff;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
@@ -2075,6 +2357,9 @@
}
.notes ul.pager{
+ -webkit-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ -moz-box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
+ box-shadow: inset 0px 1px 10px rgba(0,0,0,0.2);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
display: block;
@@ -2087,7 +2372,7 @@
padding-top: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #fff;
- border: 1px solid #000;
+ border: 1px solid #0d0d0d;
text-align: center;
}
@@ -2289,8 +2574,6 @@
background-color: transparent;
border: 1px solid transparent;
position: absolute;
- font-size: 10px;
- font-family: Arial, Helvetica, sans-serif;
color: #898989;
top: 4px;
right: 11px;
@@ -2298,6 +2581,8 @@
margin: 0;
padding: 0;
height: 11px;
+ font: normal normal 10px Arial, Helvetica, sans-serif;
+ text-decoration: none;
}
.colorpicker_hex {
position: absolute;
@@ -2450,11 +2735,32 @@
/* @group Input */
label{
- text-transform: capitalize;
+ text-transform: none;
}
input.error{
- border: 2px solid #fd2e3f;
+ border: 2px solid #fd2e3f !important;
+}
+
+#lookup-form{
+ position: relative;
+ display: block;
+ overflow: visible;
+ padding-top: 5px;
+}
+
+p.form-order{
+ position: relative;
+ display: inline-block;
+ overflow: hidden;
+ width: 500px;
+ float: left;
+ height: 50px;
+}
+
+input.large{
+ width: 430px;
+ margin-bottom: 10px;
}
input[disabled]{
@@ -2499,20 +2805,41 @@
}
#form-actions{
- margin-bottom: 10px;
display: block;
- margin-top: 10px;
+ background: #ededed
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fff',endColorstr='#ededed');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));
+ background: -moz-linear-gradient(-90deg,#fff,#ededed);
+ margin: 10px -10px -15px;
+ border-top: 1px solid #e7e7e7;
+ padding: 7px 10px 9px;
+}
+
+#box-footer #form-actions{
+ background: none;
+ margin: 0;
+ border-style: none;
+ padding: 0;
+}
+
+div.note-body #form-actions{
+ margin-left: 45px !important;
+}
+
+div.notes #form-actions{
+ background: none;
+ margin: 0;
+ border-style: none;
}
input[type='password'],
input[type='text']{
+ -webkit-font-smoothing: antialiased;
margin-bottom: 10px;
- font-size: 1.3em;
- font-weight: bold;
- text-decoration: none;
- font-variant: normal;
- letter-spacing: -1px;
padding: 5px;
+ font: bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
+ letter-spacing: -1px;
+ color: #383838;
}
/* @end */
@@ -2572,7 +2899,9 @@
div#new_note{
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
+ padding: 0;
+ margin: 0;
}
div.notes div#new_note textarea#body{
@@ -2643,7 +2972,8 @@
.event-note .note-body{
color: #fff;
line-height: 17px;
- margin-bottom: 20px;
+ margin-bottom: 5px;
+ word-wrap: break-word;
}
.event-note .note-body strong{
@@ -2755,8 +3085,8 @@
display: block;
position: relative;
overflow: hidden;
+ margin-bottom: 10px;
border: 1px solid #d1d1d1;
- margin-bottom: 15px;
}
#general-settings div.pc-settings p{
@@ -2834,6 +3164,8 @@
}
#settings .user-show-avatar img{
+ min-height: 100px;
+ min-width: 100px;
float: left;
margin-right: 10px;
}
@@ -2989,12 +3321,20 @@
font-style: normal;
text-decoration: none;
font-variant: normal;
+ position: relative;
+ display: block;
+ overflow: visible;
}
-#dashboard .secondary ul.box-list li span{
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
+#dashboard .secondary ul.box-list li.has-image a{
+ margin-left: 30px;
+}
+
+#dashboard .secondary ul.box-list li span{
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+
line-height: 1.4em; !important
display: block;
float: right;
@@ -3002,11 +3342,12 @@
padding: 3px 5px;
top: 5px;
display: block;
- position: relative;
+ position: absolute;
font-size: 0.9em;
text-align: left;
- color: #575757;
- text-shadow: #fff 0 1px 0;
+ color: #868686;
+ text-shadow: #fffeff 0 1px 0;
+ right: 0;
}
#dashboard .secondary ul.box-list li:hover span{
@@ -3019,6 +3360,12 @@
vertical-align: middle;
margin-top: -2px;
margin-right: 5px;
+ position: absolute;
+ display: block;
+ overflow: hidden;
+ bottom: 0;
+ left: 0;
+ top: 5px;
}
#dashboard .main .dashboard-menu{
@@ -3201,7 +3548,8 @@
#search-box{
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
+ height: 195px;
}
#search-box input{
@@ -3222,10 +3570,16 @@
#snorbybox-content{
display: block;
- overflow: hidden;
+ overflow: visible;
position: relative;
}
+#snorbybox-content form{
+ display: block;
+ overflow: hidden;
+ position: relative;
+}
+
#snorbybox-content #snorbybox-form-holder{
display: block;
position: relative;
@@ -3249,7 +3603,7 @@
#snorbybox-content #snorbybox-form-full{
display: block;
position: relative;
- overflow: hidden;
+ overflow: visible;
}
#snorbybox-content #snorbybox-form-full textarea{
@@ -3297,7 +3651,10 @@
-moz-border-radius: 3px;
border-radius: 3px;
padding: 5px;
- background-color: #2774fb;
+ background: #2774fb;
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#5994fc',endColorstr='#2774fb');
+ background: -webkit-gradient(linear,0% 0,0% 100%,from(#5994fc),to(#2774fb));
+ background: -moz-linear-gradient(-90deg,#5994fc,#2774fb);
color: #fff;
font-weight: bold;
text-decoration: none;
@@ -3332,8 +3689,511 @@
margin-bottom: 5px;
}
+input#classification_name{
+ width: 448px;
+}
+
form#new_classification textarea{
width: 450px;
+ font-size: 1.1em;
+}
+
+/* @end */
+
+/* @group Login */
+
+html.login,body.login{
+ font-family: Helvetica, Arial;
+ font-size: 12px;
+ background: #202325 url(../images/header/header-bg.png) repeat;
+}
+
+#login{
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+}
+
+#login #wrapper{
+ width: 960px;
+ display: block;
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ border-style: none;
+ top: 0;
+ margin: auto;
+}
+
+#login #login-logo{
+ width: 960px;
+ height: 600px;
+ background: url(../images/login.png) no-repeat 130px 30px;
+ overflow: hidden;
+ position: absolute;
+ display: block;
+ margin-right: auto;
+ margin-left: auto;
+ margin-bottom: auto;
+}
+
+#login #wrapper #content{
+ -webkit-box-shadow: 0px 1px 20px rgba(0,0,0,0.5);
+ -moz-box-shadow: 0px 1px 20px rgba(0,0,0,0.5);
+ box-shadow: 0px 1px 20px rgba(0,0,0,0.5);
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ width: 555px;
+ border: 1px solid #000;
+ background-color: #181718;
+ position: relative;
+ display: block;
+ overflow: hidden;
+ height: 225px;
+ margin-top: 240px;
+ margin-left: 176px;
}
+#login #wrapper #content #title{
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-topleft: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+}
+
+#login #content form p{
+ margin-bottom: 2px;
+}
+
+#login #content form input[type='text'],
+#login #content form input[type='password']{
+ width: 515px;
+ padding: 9px;
+ color: #000;
+ margin-left: -1px;
+}
+
+#login #wrapper #content #signin,
+#login #wrapper #content #password{
+ width: 555px;
+ background-color: #fff;
+ margin: 0;
+ padding: 0;
+}
+
+#login #wrapper #content form{
+ margin: 0;
+ padding: 11px 10px 10px;
+ height: 149px;
+ display: block;
+ position: relative;
+ overflow: visible;
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+}
+
+#login #wrapper #content #form-actions{
+ -moz-border-radius-bottomright: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ width: 535px;
+ display: block;
+ position: absolute;
+ overflow: hidden;
+ bottom: -9px;
+ right: 0;
+ left: 10px;
+}
+
+#login #wrapper #content #note{
+ cursor: default;
+}
+
+#login #wrapper #content #password input,
+#login #wrapper #content #password .field_with_errors input{
+ margin-top: 5px;
+ margin-bottom: 69px !important;
+ position: relative;
+ display: block;
+ overflow: visible;
+}
+
+#login #wrapper #content #password br {
+ display:none;
+}
+
+#login #wrapper #content #password p lable{
+ margin-top: 5px;
+}
+
+#login #wrapper #content #form-actions p{
+ position: absolute;
+ display: block;
+ overflow: hidden;
+ bottom: 0;
+ margin: 0;
+ padding: 0;
+ top: 13px;
+ right: 20px;
+}
+
+/* @end */
+
+/* @group Geoip */
+
+div.map{
+ display: block;
+ position: relative;
+ overflow: hidden;
+}
+
+/* @end */
+
+/* @group Chosen */
+
+/* @group Base */
+.chzn-container {
+ font-size: 13px;
+ position: relative;
+ display: inline-block;
+ zoom: 1;
+ *display: inline;
+}
+.chzn-container .chzn-drop {
+ background: #fff;
+ border: 1px solid #aaa;
+ border-top: 0;
+ position: absolute;
+ top: 29px;
+ left: 0;
+ -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
+ -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
+ -o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
+ box-shadow : 0 4px 5px rgba(0,0,0,.15);
+ z-index: 999;
+}
+/* @end */
+
+/* @group Single Chosen */
+.chzn-container-single .chzn-single {
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
+ background-image: -o-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
+ background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
+ background-image: linear-gradient(top, #eeeeee 0%,#ffffff 50%);
+ -webkit-border-radius: 4px;
+ -moz-border-radius : 4px;
+ border-radius : 4px;
+ -moz-background-clip : padding;
+ -webkit-background-clip: padding-box;
+ background-clip : padding-box;
+ border: 1px solid #aaa;
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ position: relative;
+ height: 26px;
+ line-height: 26px;
+ padding: 0 0 0 8px;
+ color: #444;
+ text-decoration: none;
+}
+.chzn-container-single .chzn-single span {
+ margin-right: 26px;
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ -o-text-overflow: ellipsis;
+ -ms-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+}
+.chzn-container-single .chzn-single div {
+ -webkit-border-radius: 0 4px 4px 0;
+ -moz-border-radius : 0 4px 4px 0;
+ border-radius : 0 4px 4px 0;
+ -moz-background-clip : padding;
+ -webkit-background-clip: padding-box;
+ background-clip : padding-box;
+ background: #ccc;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
+ background-image: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 60%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 );
+ background-image: linear-gradient(top, #cccccc 0%,#eeeeee 60%);
+ border-left: 1px solid #aaa;
+ position: absolute;
+ right: 0;
+ top: 0;
+ display: block;
+ height: 100%;
+ width: 18px;
+}
+.chzn-container-single .chzn-single div b {
+ background: url('chosen-sprite.png') no-repeat 0 1px;
+ display: block;
+ width: 100%;
+ height: 100%;
+}
+.chzn-container-single .chzn-search {
+ padding: 3px 4px;
+ margin: 0;
+ white-space: nowrap;
+}
+.chzn-container-single .chzn-search input {
+ background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ margin: 1px 0;
+ padding: 4px 20px 4px 5px;
+ outline: 0;
+ border: 1px solid #aaa;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+.chzn-container-single .chzn-drop {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius : 0 0 4px 4px;
+ border-radius : 0 0 4px 4px;
+ -moz-background-clip : padding;
+ -webkit-background-clip: padding-box;
+ background-clip : padding-box;
+}
+/* @end */
+
+/* @group Multi Chosen */
+.chzn-container-multi .chzn-choices {
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
+ background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
+ background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
+ background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ border: 1px solid #aaa;
+ margin: 0;
+ padding: 0;
+ cursor: text;
+ overflow: hidden;
+ height: auto !important;
+ height: 1%;
+ position: relative;
+}
+.chzn-container-multi .chzn-choices li {
+ float: left;
+ list-style: none;
+}
+.chzn-container-multi .chzn-choices .search-field {
+ white-space: nowrap;
+ margin: 0;
+ padding: 0;
+}
+.chzn-container-multi .chzn-choices .search-field input {
+ color: #666;
+ background: transparent !important;
+ border: 0 !important;
+ padding: 5px;
+ margin: 1px 0;
+ outline: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow : none;
+ -o-box-shadow : none;
+ box-shadow : none;
+}
+.chzn-container-multi .chzn-choices .search-field .default {
+ color: #999;
+}
+.chzn-container-multi .chzn-choices .search-choice {
+ -webkit-border-radius: 3px;
+ -moz-border-radius : 3px;
+ border-radius : 3px;
+ -moz-background-clip : padding;
+ -webkit-background-clip: padding-box;
+ background-clip : padding-box;
+ background-color: #e4e4e4;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee));
+ background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
+ background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
+ background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%);
+ background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 );
+ background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
+ color: #333;
+ border: 1px solid #b4b4b4;
+ line-height: 13px;
+ padding: 3px 19px 3px 6px;
+ margin: 3px 0 3px 5px;
+ position: relative;
+}
+.chzn-container-multi .chzn-choices .search-choice span {
+ cursor: default;
+}
+.chzn-container-multi .chzn-choices .search-choice-focus {
+ background: #d4d4d4;
+}
+.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
+ display: block;
+ position: absolute;
+ right: 5px;
+ top: 6px;
+ width: 8px;
+ height: 9px;
+ font-size: 1px;
+ background: url(chosen-sprite.png) right top no-repeat;
+}
+.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
+ background-position: right -9px;
+}
+.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
+ background-position: right -9px;
+}
+/* @end */
+
+/* @group Results */
+.chzn-container .chzn-results {
+ margin: 0 4px 4px 0;
+ max-height: 190px;
+ padding: 0 0 0 4px;
+ position: relative;
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+.chzn-container-multi .chzn-results {
+ margin: -1px 0 0;
+ padding: 0;
+}
+.chzn-container .chzn-results li {
+ line-height: 80%;
+ padding: 7px 7px 8px;
+ margin: 0;
+ list-style: none;
+}
+.chzn-container .chzn-results .active-result {
+ cursor: pointer;
+}
+.chzn-container .chzn-results .highlighted {
+ background: #3875d7;
+ color: #fff;
+}
+.chzn-container .chzn-results li em {
+ background: #feffde;
+ font-style: normal;
+}
+.chzn-container .chzn-results .highlighted em {
+ background: transparent;
+}
+.chzn-container .chzn-results .no-results {
+ background: #f4f4f4;
+}
+.chzn-container .chzn-results .group-result {
+ cursor: default;
+ color: #999;
+ font-weight: bold;
+}
+.chzn-container .chzn-results .group-option {
+ padding-left: 20px;
+}
+.chzn-container-multi .chzn-drop .result-selected {
+ display: none;
+}
+/* @end */
+
+/* @group Active */
+.chzn-container-active .chzn-single {
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
+ border: 1px solid #5897fb;
+}
+.chzn-container-active .chzn-single-with-drop {
+ border: 1px solid #aaa;
+ -webkit-box-shadow: 0 1px 0 #fff inset;
+ -moz-box-shadow : 0 1px 0 #fff inset;
+ -o-box-shadow : 0 1px 0 #fff inset;
+ box-shadow : 0 1px 0 #fff inset;
+ background-color: #eee;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
+ background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
+ background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
+ -webkit-border-bottom-left-radius : 0;
+ -webkit-border-bottom-right-radius: 0;
+ -moz-border-radius-bottomleft : 0;
+ -moz-border-radius-bottomright: 0;
+ border-bottom-left-radius : 0;
+ border-bottom-right-radius: 0;
+}
+.chzn-container-active .chzn-single-with-drop div {
+ background: transparent;
+ border-left: none;
+}
+.chzn-container-active .chzn-single-with-drop div b {
+ background-position: -18px 1px;
+}
+.chzn-container-active .chzn-choices {
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
+ border: 1px solid #5897fb;
+}
+.chzn-container-active .chzn-choices .search-field input {
+ color: #111 !important;
+}
+/* @end */
+
+/* @group Right to Left */
+.chzn-rtl { direction:rtl;text-align: right; }
+.chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; }
+.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; }
+.chzn-rtl .chzn-single div {
+ left: 0; right: auto;
+ border-left: none; border-right: 1px solid #aaaaaa;
+ -webkit-border-radius: 4px 0 0 4px;
+ -moz-border-radius : 4px 0 0 4px;
+ border-radius : 4px 0 0 4px;
+}
+.chzn-rtl .chzn-choices li { float: right; }
+.chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; }
+.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;}
+.chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; }
+.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
+.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
+.chzn-rtl .chzn-search input {
+ background: url('chosen-sprite.png') no-repeat -38px -20px, #ffffff;
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat -38px -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ padding: 4px 5px 4px 20px;
+}
+/* @end */
+
/* @end */
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/controllers/lookups_controller_spec.rb
^
|
@@ -0,0 +1,127 @@
+require 'spec_helper'
+
+describe LookupsController do
+
+ def mock_lookup(stubs={})
+ (@mock_lookup ||= mock_model(Lookup).as_null_object).tap do |lookup|
+ lookup.stub(stubs) unless stubs.empty?
+ end
+ end
+
+ describe "GET index" do
+ it "assigns all lookups as @lookups" do
+ Lookup.stub(:all) { [mock_lookup] }
+ get :index
+ assigns(:lookups).should eq([mock_lookup])
+ end
+ end
+
+ describe "GET show" do
+ it "assigns the requested lookup as @lookup" do
+ Lookup.stub(:get).with("37") { mock_lookup }
+ get :show, :id => "37"
+ assigns(:lookup).should be(mock_lookup)
+ end
+ end
+
+ describe "GET new" do
+ it "assigns a new lookup as @lookup" do
+ Lookup.stub(:new) { mock_lookup }
+ get :new
+ assigns(:lookup).should be(mock_lookup)
+ end
+ end
+
+ describe "GET edit" do
+ it "assigns the requested lookup as @lookup" do
+ Lookup.stub(:get).with("37") { mock_lookup }
+ get :edit, :id => "37"
+ assigns(:lookup).should be(mock_lookup)
+ end
+ end
+
+ describe "POST create" do
+
+ describe "with valid params" do
+ it "assigns a newly created lookup as @lookup" do
+ Lookup.stub(:new).with({'these' => 'params'}) { mock_lookup(:save => true) }
+ post :create, :lookup => {'these' => 'params'}
+ assigns(:lookup).should be(mock_lookup)
+ end
+
+ it "redirects to the created lookup" do
+ Lookup.stub(:new) { mock_lookup(:save => true) }
+ post :create, :lookup => {}
+ response.should redirect_to(lookup_url(mock_lookup))
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns a newly created but unsaved lookup as @lookup" do
+ Lookup.stub(:new).with({'these' => 'params'}) { mock_lookup(:save => false) }
+ post :create, :lookup => {'these' => 'params'}
+ assigns(:lookup).should be(mock_lookup)
+ end
+
+ it "re-renders the 'new' template" do
+ Lookup.stub(:new) { mock_lookup(:save => false) }
+ post :create, :lookup => {}
+ response.should render_template("new")
+ end
+ end
+
+ end
+
+ describe "PUT update" do
+
+ describe "with valid params" do
+ it "updates the requested lookup" do
+ Lookup.should_receive(:get).with("37") { mock_lookup }
+ mock_lookup.should_receive(:update).with({'these' => 'params'})
+ put :update, :id => "37", :lookup => {'these' => 'params'}
+ end
+
+ it "assigns the requested lookup as @lookup" do
+ Lookup.stub(:get) { mock_lookup(:update => true) }
+ put :update, :id => "1"
+ assigns(:lookup).should be(mock_lookup)
+ end
+
+ it "redirects to the lookup" do
+ Lookup.stub(:get) { mock_lookup(:update => true) }
+ put :update, :id => "1"
+ response.should redirect_to(lookup_url(mock_lookup))
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns the lookup as @lookup" do
+ Lookup.stub(:get) { mock_lookup(:update => false) }
+ put :update, :id => "1"
+ assigns(:lookup).should be(mock_lookup)
+ end
+
+ it "re-renders the 'edit' template" do
+ Lookup.stub(:get) { mock_lookup(:update => false) }
+ put :update, :id => "1"
+ response.should render_template("edit")
+ end
+ end
+
+ end
+
+ describe "DELETE destroy" do
+ it "destroys the requested lookup" do
+ Lookup.should_receive(:get).with("37") { mock_lookup }
+ mock_lookup.should_receive(:destroy)
+ delete :destroy, :id => "37"
+ end
+
+ it "redirects to the lookups list" do
+ Lookup.stub(:get) { mock_lookup }
+ delete :destroy, :id => "1"
+ response.should redirect_to(lookups_url)
+ end
+ end
+
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/helpers/lookups_helper_spec.rb
^
|
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the LookupsHelper. For example:
+#
+# describe LookupsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe LookupsHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/models/lookup_spec.rb
^
|
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Lookup do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/routing/lookups_routing_spec.rb
^
|
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe LookupsController do
+ describe "routing" do
+
+ it "recognizes and generates #index" do
+ { :get => "/lookups" }.should route_to(:controller => "lookups", :action => "index")
+ end
+
+ it "recognizes and generates #new" do
+ { :get => "/lookups/new" }.should route_to(:controller => "lookups", :action => "new")
+ end
+
+ it "recognizes and generates #show" do
+ { :get => "/lookups/1" }.should route_to(:controller => "lookups", :action => "show", :id => "1")
+ end
+
+ it "recognizes and generates #edit" do
+ { :get => "/lookups/1/edit" }.should route_to(:controller => "lookups", :action => "edit", :id => "1")
+ end
+
+ it "recognizes and generates #create" do
+ { :post => "/lookups" }.should route_to(:controller => "lookups", :action => "create")
+ end
+
+ it "recognizes and generates #update" do
+ { :put => "/lookups/1" }.should route_to(:controller => "lookups", :action => "update", :id => "1")
+ end
+
+ it "recognizes and generates #destroy" do
+ { :delete => "/lookups/1" }.should route_to(:controller => "lookups", :action => "destroy", :id => "1")
+ end
+
+ end
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/views/lookups
^
|
+(directory)
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/views/lookups/edit.html.erb_spec.rb
^
|
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe "lookups/edit.html.erb" do
+ before(:each) do
+ @lookup = assign(:lookup, stub_model(Lookup,
+ :new_record? => false
+ ))
+ end
+
+ it "renders the edit lookup form" do
+ render
+
+ # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
+ assert_select "form", :action => lookup_path(@lookup), :method => "post" do
+ end
+ end
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/views/lookups/index.html.erb_spec.rb
^
|
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe "lookups/index.html.erb" do
+ before(:each) do
+ assign(:lookups, [
+ stub_model(Lookup),
+ stub_model(Lookup)
+ ])
+ end
+
+ it "renders a list of lookups" do
+ render
+ end
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/views/lookups/new.html.erb_spec.rb
^
|
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe "lookups/new.html.erb" do
+ before(:each) do
+ assign(:lookup, stub_model(Lookup).as_new_record)
+ end
+
+ it "renders new lookup form" do
+ render
+
+ # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
+ assert_select "form", :action => lookups_path, :method => "post" do
+ end
+ end
+end
|
[-]
[+]
|
Added |
Snorby-2.3.9.tar.bz2/spec/views/lookups/show.html.erb_spec.rb
^
|
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "lookups/show.html.erb" do
+ before(:each) do
+ @lookup = assign(:lookup, stub_model(Lookup))
+ end
+
+ it "renders attributes in <p>" do
+ render
+ end
+end
|