--- /dev/null
+/*
+ * jQuery timepicker addon
+ * By: Trent Richardson [http://trentrichardson.com]
+ * Version 1.2.2
+ * Last Modified: 04/13/2013
+ *
+ * Copyright 2013 Trent Richardson
+ * You may use this project under MIT or GPL licenses.
+ * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
+ * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
+ */
+(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.2.2"}});var u=function(){this.regional=[];this.regional['']={currentText:'Now',closeText:'Done',amNames:['AM','A'],pmNames:['PM','P'],timeFormat:'HH:mm',timeSuffix:'',timeOnlyTitle:'Choose Time',timeText:'Time',hourText:'Hour',minuteText:'Minute',secondText:'Second',millisecText:'Millisecond',timezoneText:'Time Zone',isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,showHour:true,showMinute:true,showSecond:false,showMillisec:false,showTimezone:false,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,hour:0,minute:0,second:0,millisec:0,timezone:null,useLocalTimezone:false,defaultTimezone:"+0000",hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,alwaysSetTime:true,separator:' ',altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneIso8601:false,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:'slider',defaultValue:null,parse:'strict'};$.extend(this._defaults,this.regional[''])};$.extend(u.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,timezone:null,defaultTimezone:"+0000",hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,ampm:'',formattedDate:'',formattedTime:'',formattedDateTime:'',timezoneList:null,units:['hour','minute','second','millisec'],control:null,setDefaults:function(a){w(this._defaults,a||{});return this},_newInst:function(d,o){var e=new u(),inlineSettings={},fns={},overrides,i;for(var f in this._defaults){if(this._defaults.hasOwnProperty(f)){var g=d.attr('time:'+f);if(g){try{inlineSettings[f]=eval(g)}catch(err){inlineSettings[f]=g}}}}overrides={beforeShow:function(a,b){if($.isFunction(e._defaults.evnts.beforeShow)){return e._defaults.evnts.beforeShow.call(d[0],a,b,e)}},onChangeMonthYear:function(a,b,c){e._updateDateTime(c);if($.isFunction(e._defaults.evnts.onChangeMonthYear)){e._defaults.evnts.onChangeMonthYear.call(d[0],a,b,c,e)}},onClose:function(a,b){if(e.timeDefined===true&&d.val()!==''){e._updateDateTime(b)}if($.isFunction(e._defaults.evnts.onClose)){e._defaults.evnts.onClose.call(d[0],a,b,e)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=o[i]||null}}e._defaults=$.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:e});e.amNames=$.map(e._defaults.amNames,function(a){return a.toUpperCase()});e.pmNames=$.map(e._defaults.pmNames,function(a){return a.toUpperCase()});if(typeof(e._defaults.controlType)==='string'){if($.fn[e._defaults.controlType]===undefined){e._defaults.controlType='select'}e.control=e._controls[e._defaults.controlType]}else{e.control=e._defaults.controlType}if(e._defaults.timezoneList===null){var h=['-1200','-1100','-1000','-0930','-0900','-0800','-0700','-0600','-0500','-0430','-0400','-0330','-0300','-0200','-0100','+0000','+0100','+0200','+0300','+0330','+0400','+0430','+0500','+0530','+0545','+0600','+0630','+0700','+0800','+0845','+0900','+0930','+1000','+1030','+1100','+1130','+1200','+1245','+1300','+1400'];if(e._defaults.timezoneIso8601){h=$.map(h,function(a){return a=='+0000'?'Z':(a.substring(0,3)+':'+a.substring(3))})}e._defaults.timezoneList=h}e.timezone=e._defaults.timezone;e.hour=e._defaults.hour<e._defaults.hourMin?e._defaults.hourMin:e._defaults.hour>e._defaults.hourMax?e._defaults.hourMax:e._defaults.hour;e.minute=e._defaults.minute<e._defaults.minuteMin?e._defaults.minuteMin:e._defaults.minute>e._defaults.minuteMax?e._defaults.minuteMax:e._defaults.minute;e.second=e._defaults.second<e._defaults.secondMin?e._defaults.secondMin:e._defaults.second>e._defaults.secondMax?e._defaults.secondMax:e._defaults.second;e.millisec=e._defaults.millisec<e._defaults.millisecMin?e._defaults.millisecMin:e._defaults.millisec>e._defaults.millisecMax?e._defaults.millisecMax:e._defaults.millisec;e.ampm='';e.$input=d;if(o.altField){e.$altInput=$(o.altField).css({cursor:'pointer'}).focus(function(){d.trigger("focus")})}if(e._defaults.minDate===0||e._defaults.minDateTime===0){e._defaults.minDate=new Date()}if(e._defaults.maxDate===0||e._defaults.maxDateTime===0){e._defaults.maxDate=new Date()}if(e._defaults.minDate!==undefined&&e._defaults.minDate instanceof Date){e._defaults.minDateTime=new Date(e._defaults.minDate.getTime())}if(e._defaults.minDateTime!==undefined&&e._defaults.minDateTime instanceof Date){e._defaults.minDate=new Date(e._defaults.minDateTime.getTime())}if(e._defaults.maxDate!==undefined&&e._defaults.maxDate instanceof Date){e._defaults.maxDateTime=new Date(e._defaults.maxDate.getTime())}if(e._defaults.maxDateTime!==undefined&&e._defaults.maxDateTime instanceof Date){e._defaults.maxDate=new Date(e._defaults.maxDateTime.getTime())}e.$input.bind('focus',function(){e._onFocus()});return e},_addTimePicker:function(a){var b=(this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+' '+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(b);this._limitMinMaxDateTime(a,false);this._injectTimePicker()},_parseTime:function(a,b){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(b||!this._defaults.timeOnly){var c=$.datepicker._get(this.inst,'dateFormat');try{var d=A(c,this._defaults.timeFormat,a,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!d.timeObj){return false}$.extend(this,d.timeObj)}catch(err){$.timepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+a+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+c);return false}return true}else{var e=$.datepicker.parseTime(this._defaults.timeFormat,a,this._defaults);if(!e){return false}$.extend(this,e);return true}},_injectTimePicker:function(){var c=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem='',uitem='',max={},gridSize={},size=null,i=0,l=0;if(c.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var d=' style="display:none;"',html='<div class="ui-timepicker-div'+(o.isRTL?' ui-timepicker-rtl':'')+'"><dl>'+'<dt class="ui_tpicker_time_label"'+((o.showTime)?'':d)+'>'+o.timeText+'</dt>'+'<dd class="ui_tpicker_time"'+((o.showTime)?'':d)+'></dd>';for(i=0,l=this.units.length;i<l;i++){litem=this.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);max[litem]=parseInt((o[litem+'Max']-((o[litem+'Max']-o[litem+'Min'])%o['step'+uitem])),10);gridSize[litem]=0;html+='<dt class="ui_tpicker_'+litem+'_label"'+((o['show'+uitem])?'':d)+'>'+o[litem+'Text']+'</dt>'+'<dd class="ui_tpicker_'+litem+'"><div class="ui_tpicker_'+litem+'_slider"'+((o['show'+uitem])?'':d)+'></div>';if(o['show'+uitem]&&o[litem+'Grid']>0){html+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';if(litem=='hour'){for(var h=o[litem+'Min'];h<=max[litem];h+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;var g=$.datepicker.formatTime(x(o.pickerTimeFormat||o.timeFormat)?'hht':'HH',{hour:h},o);html+='<td data-for="'+litem+'">'+g+'</td>'}}else{for(var m=o[litem+'Min'];m<=max[litem];m+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;html+='<td data-for="'+litem+'">'+((m<10)?'0':'')+m+'</td>'}}html+='</tr></table></div>'}html+='</dd>'}html+='<dt class="ui_tpicker_timezone_label"'+((o.showTimezone)?'':d)+'>'+o.timezoneText+'</dt>';html+='<dd class="ui_tpicker_timezone" '+((o.showTimezone)?'':d)+'></dd>';html+='</dl></div>';var j=$(html);if(o.timeOnly===true){j.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">'+'<div class="ui-datepicker-title">'+o.timeOnlyTitle+'</div>'+'</div>');c.find('.ui-datepicker-header, .ui-datepicker-calendar').hide()}for(i=0,l=tp_inst.units.length;i<l;i++){litem=tp_inst.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);tp_inst[litem+'_slider']=tp_inst.control.create(tp_inst,j.find('.ui_tpicker_'+litem+'_slider'),litem,tp_inst[litem],o[litem+'Min'],max[litem],o['step'+uitem]);if(o['show'+uitem]&&o[litem+'Grid']>0){size=100*gridSize[litem]*o[litem+'Grid']/(max[litem]-o[litem+'Min']);j.find('.ui_tpicker_'+litem+' table').css({width:size+"%",marginLeft:o.isRTL?'0':((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):'0',borderCollapse:'collapse'}).find("td").click(function(e){var a=$(this),h=a.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=a.data('for');if(f=='hour'){if(ap.indexOf('p')!==-1&&n<12){n+=12}else{if(ap.indexOf('a')!==-1&&n===12){n=0}}}tp_inst.control.value(tp_inst,tp_inst[f+'_slider'],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:'pointer',width:(100/gridSize[litem])+'%',textAlign:'center',overflow:'hidden'})}}this.timezone_select=j.find('.ui_tpicker_timezone').append('<select></select>').find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(a,b){return $("<option />").val(typeof a=="object"?a.value:a).text(typeof a=="object"?a.label:a)}));if(typeof(this.timezone)!="undefined"&&this.timezone!==null&&this.timezone!==""){var k=new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12);var p=$.timepicker.timeZoneOffsetString(k);if(p==this.timezone){B(tp_inst)}else{this.timezone_select.val(this.timezone)}}else{if(typeof(this.hour)!="undefined"&&this.hour!==null&&this.hour!==""){this.timezone_select.val(o.defaultTimezone)}else{B(tp_inst)}}this.timezone_select.change(function(){tp_inst._defaults.useLocalTimezone=false;tp_inst._onTimeChange();tp_inst._onSelectHandler()});var q=c.find('.ui-datepicker-buttonpane');if(q.length){q.before(j)}else{c.append(j)}this.$timeObj=j.find('.ui_tpicker_time');if(this.inst!==null){var r=this.timeDefined;this._onTimeChange();this.timeDefined=r}if(this._defaults.addSliderAccess){var s=this._defaults.sliderAccessArgs,rtl=this._defaults.isRTL;s.isRTL=rtl;setTimeout(function(){if(j.find('.ui-slider-access').length===0){j.find('.ui-slider:visible').sliderAccess(s);var b=j.find('.ui-slider-access:eq(0)').outerWidth(true);if(b){j.find('table:visible').each(function(){var a=$(this),oldWidth=a.outerWidth(),oldMarginLeft=a.css(rtl?'marginRight':'marginLeft').toString().replace('%',''),newWidth=oldWidth-b,newMarginLeft=((oldMarginLeft*newWidth)/oldWidth)+'%',css={width:newWidth,marginRight:0,marginLeft:0};css[rtl?'marginRight':'marginLeft']=newMarginLeft;a.css(css)})}}},10)}}},_limitMinMaxDateTime:function(a,b){var o=this._defaults,dp_date=new Date(a.selectedYear,a.selectedMonth,a.selectedDay);if(!this._defaults.showTimepicker){return}if($.datepicker._get(a,'minDateTime')!==null&&$.datepicker._get(a,'minDateTime')!==undefined&&dp_date){var c=$.datepicker._get(a,'minDateTime'),minDateTimeDate=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null||this.millisecMinOriginal===null){this.hourMinOriginal=o.hourMin;this.minuteMinOriginal=o.minuteMin;this.secondMinOriginal=o.secondMin;this.millisecMinOriginal=o.millisecMin}if(a.settings.timeOnly||minDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMin=c.getHours();if(this.hour<=this._defaults.hourMin){this.hour=this._defaults.hourMin;this._defaults.minuteMin=c.getMinutes();if(this.minute<=this._defaults.minuteMin){this.minute=this._defaults.minuteMin;this._defaults.secondMin=c.getSeconds();if(this.second<=this._defaults.secondMin){this.second=this._defaults.secondMin;this._defaults.millisecMin=c.getMilliseconds()}else{if(this.millisec<this._defaults.millisecMin){this.millisec=this._defaults.millisecMin}this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.hourMin=this.hourMinOriginal;this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}if($.datepicker._get(a,'maxDateTime')!==null&&$.datepicker._get(a,'maxDateTime')!==undefined&&dp_date){var d=$.datepicker._get(a,'maxDateTime'),maxDateTimeDate=new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null){this.hourMaxOriginal=o.hourMax;this.minuteMaxOriginal=o.minuteMax;this.secondMaxOriginal=o.secondMax;this.millisecMaxOriginal=o.millisecMax}if(a.settings.timeOnly||maxDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMax=d.getHours();if(this.hour>=this._defaults.hourMax){this.hour=this._defaults.hourMax;this._defaults.minuteMax=d.getMinutes();if(this.minute>=this._defaults.minuteMax){this.minute=this._defaults.minuteMax;this._defaults.secondMax=d.getSeconds();if(this.second>=this._defaults.secondMax){this.second=this._defaults.secondMax;this._defaults.millisecMax=d.getMilliseconds()}else{if(this.millisec>this._defaults.millisecMax){this.millisec=this._defaults.millisecMax}this._defaults.millisecMax=this.millisecMaxOriginal}}else{this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal}}else{this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal}}else{this._defaults.hourMax=this.hourMaxOriginal;this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal}}if(b!==undefined&&b===true){var e=parseInt((this._defaults.hourMax-((this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour)),10),minMax=parseInt((this._defaults.minuteMax-((this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute)),10),secMax=parseInt((this._defaults.secondMax-((this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond)),10),millisecMax=parseInt((this._defaults.millisecMax-((this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec)),10);if(this.hour_slider){this.control.options(this,this.hour_slider,'hour',{min:this._defaults.hourMin,max:e});this.control.value(this,this.hour_slider,'hour',this.hour-(this.hour%this._defaults.stepHour))}if(this.minute_slider){this.control.options(this,this.minute_slider,'minute',{min:this._defaults.minuteMin,max:minMax});this.control.value(this,this.minute_slider,'minute',this.minute-(this.minute%this._defaults.stepMinute))}if(this.second_slider){this.control.options(this,this.second_slider,'second',{min:this._defaults.secondMin,max:secMax});this.control.value(this,this.second_slider,'second',this.second-(this.second%this._defaults.stepSecond))}if(this.millisec_slider){this.control.options(this,this.millisec_slider,'millisec',{min:this._defaults.millisecMin,max:millisecMax});this.control.value(this,this.millisec_slider,'millisec',this.millisec-(this.millisec%this._defaults.stepMillisec))}}},_onTimeChange:function(){var a=(this.hour_slider)?this.control.value(this,this.hour_slider,'hour'):false,minute=(this.minute_slider)?this.control.value(this,this.minute_slider,'minute'):false,second=(this.second_slider)?this.control.value(this,this.second_slider,'second'):false,millisec=(this.millisec_slider)?this.control.value(this,this.millisec_slider,'millisec'):false,timezone=(this.timezone_select)?this.timezone_select.val():false,o=this._defaults,pickerTimeFormat=o.pickerTimeFormat||o.timeFormat,pickerTimeSuffix=o.pickerTimeSuffix||o.timeSuffix;if(typeof(a)=='object'){a=false}if(typeof(minute)=='object'){minute=false}if(typeof(second)=='object'){second=false}if(typeof(millisec)=='object'){millisec=false}if(typeof(timezone)=='object'){timezone=false}if(a!==false){a=parseInt(a,10)}if(minute!==false){minute=parseInt(minute,10)}if(second!==false){second=parseInt(second,10)}if(millisec!==false){millisec=parseInt(millisec,10)}var b=o[a<12?'amNames':'pmNames'][0];var c=(a!=this.hour||minute!=this.minute||second!=this.second||millisec!=this.millisec||(this.ampm.length>0&&(a<12)!=($.inArray(this.ampm.toUpperCase(),this.amNames)!==-1))||((this.timezone===null&&timezone!=this.defaultTimezone)||(this.timezone!==null&&timezone!=this.timezone)));if(c){if(a!==false){this.hour=a}if(minute!==false){this.minute=minute}if(second!==false){this.second=second}if(millisec!==false){this.millisec=millisec}if(timezone!==false){this.timezone=timezone}if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}this._limitMinMaxDateTime(this.inst,true)}if(x(o.timeFormat)){this.ampm=b}this.formattedTime=$.datepicker.formatTime(o.timeFormat,this,o);if(this.$timeObj){if(pickerTimeFormat===o.timeFormat){this.$timeObj.text(this.formattedTime+pickerTimeSuffix)}else{this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat,this,o)+pickerTimeSuffix)}}this.timeDefined=true;if(c){this._updateDateTime()}},_onSelectHandler:function(){var a=this._defaults.onSelect||this.inst.settings.onSelect;var b=this.$input?this.$input[0]:null;if(a&&b){a.apply(b,[this.formattedDateTime,this])}},_updateDateTime:function(a){a=this.inst||a;var b=$.datepicker._daylightSavingAdjust(new Date(a.selectedYear,a.selectedMonth,a.selectedDay)),dateFmt=$.datepicker._get(a,'dateFormat'),formatCfg=$.datepicker._getFormatConfig(a),timeAvailable=b!==null&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(dateFmt,(b===null?new Date():b),formatCfg);var c=this.formattedDate;if(a.lastVal===""){a.currentYear=a.selectedYear;a.currentMonth=a.selectedMonth;a.currentDay=a.selectedDay}if(this._defaults.timeOnly===true){c=this.formattedTime}else if(this._defaults.timeOnly!==true&&(this._defaults.alwaysSetTime||timeAvailable)){c+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix}this.formattedDateTime=c;if(!this._defaults.showTimepicker){this.$input.val(this.formattedDate)}else if(this.$altInput&&this._defaults.altFieldTimeOnly===true){this.$altInput.val(this.formattedTime);this.$input.val(this.formattedDate)}else if(this.$altInput){this.$input.val(c);var d='',altSeparator=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,altTimeSuffix=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;if(this._defaults.altFormat){d=$.datepicker.formatDate(this._defaults.altFormat,(b===null?new Date():b),formatCfg)}else{d=this.formattedDate}if(d){d+=altSeparator}if(this._defaults.altTimeFormat){d+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+altTimeSuffix}else{d+=this.formattedTime+altTimeSuffix}this.$altInput.val(d)}else{this.$input.val(c)}this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var a=$.datepicker._getInst(this.$input.get(0)),tp_inst=$.datepicker._get(a,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(a.input.val()!=a.lastVal)){try{$.datepicker._updateDatepicker(a)}catch(err){$.timepicker.log(err)}}}}},_controls:{slider:{create:function(c,d,e,f,g,h,i){var j=c._defaults.isRTL;return d.prop('slide',null).slider({orientation:"horizontal",value:j?f*-1:f,min:j?h*-1:g,max:j?g*-1:h,step:i,slide:function(a,b){c.control.value(c,$(this),e,j?b.value*-1:b.value);c._onTimeChange()},stop:function(a,b){c._onSelectHandler()}})},options:function(a,b,c,d,e){if(a._defaults.isRTL){if(typeof(d)=='string'){if(d=='min'||d=='max'){if(e!==undefined){return b.slider(d,e*-1)}return Math.abs(b.slider(d))}return b.slider(d)}var f=d.min,max=d.max;d.min=d.max=null;if(f!==undefined){d.max=f*-1}if(max!==undefined){d.min=max*-1}return b.slider(d)}if(typeof(d)=='string'&&e!==undefined){return b.slider(d,e)}return b.slider(d)},value:function(a,b,c,d){if(a._defaults.isRTL){if(d!==undefined){return b.slider('value',d*-1)}return Math.abs(b.slider('value'))}if(d!==undefined){return b.slider('value',d)}return b.slider('value')}},select:{create:function(a,b,c,d,f,g,h){var j='<select class="ui-timepicker-select" data-unit="'+c+'" data-min="'+f+'" data-max="'+g+'" data-step="'+h+'">',format=a._defaults.pickerTimeFormat||a._defaults.timeFormat;for(var i=f;i<=g;i+=h){j+='<option value="'+i+'"'+(i==d?' selected':'')+'>';if(c=='hour'){j+=$.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,'')),{hour:i},a._defaults)}else if(c=='millisec'||i>=10){j+=i}else{j+='0'+i.toString()}j+='</option>'}j+='</select>';b.children('select').remove();$(j).appendTo(b).change(function(e){a._onTimeChange();a._onSelectHandler()});return b},options:function(a,b,c,d,e){var o={},$t=b.children('select');if(typeof(d)=='string'){if(e===undefined){return $t.data(d)}o[d]=e}else{o=d}return a.control.create(a,b,$t.data('unit'),$t.val(),o.min||$t.data('min'),o.max||$t.data('max'),o.step||$t.data('step'))},value:function(a,b,c,d){var e=b.children('select');if(d!==undefined){return e.val(d)}return e.val()}}}});$.fn.extend({timepicker:function(o){o=o||{};var a=Array.prototype.slice.call(arguments);if(typeof o=='object'){a[0]=$.extend(o,{timeOnly:true})}return $(this).each(function(){$.fn.datetimepicker.apply($(this),a)})},datetimepicker:function(o){o=o||{};var b=arguments;if(typeof(o)=='string'){if(o=='getDate'){return $.fn.datepicker.apply($(this[0]),b)}else{return this.each(function(){var a=$(this);a.datepicker.apply(a,b)})}}else{return this.each(function(){var a=$(this);a.datepicker($.timepicker._newInst(a,o)._defaults)})}}});$.datepicker.parseDateTime=function(a,b,c,d,e){var f=A(a,b,c,d,e);if(f.timeObj){var t=f.timeObj;f.date.setHours(t.hour,t.minute,t.second,t.millisec)}return f.date};$.datepicker.parseTime=function(l,n,p){var o=w(w({},$.timepicker._defaults),p||{});var q=function(f,s,o){var e=function(b,c){var d=[];if(b){$.merge(d,b)}if(c){$.merge(d,c)}d=$.map(d,function(a){return a.replace(/[.*+?|()\[\]{}\\]/g,'\\$&')});return'('+d.join('|')+')?'};var g=function(a){var b=a.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z|'.*?')/g),orders={h:-1,m:-1,s:-1,l:-1,t:-1,z:-1};if(b){for(var i=0;i<b.length;i++){if(orders[b[i].toString().charAt(0)]==-1){orders[b[i].toString().charAt(0)]=i+1}}}return orders};var h='^'+f.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[lz]|'.*?')/g,function(a){var b=a.length;switch(a.charAt(0).toLowerCase()){case'h':return b===1?'(\\d?\\d)':'(\\d{'+b+'})';case'm':return b===1?'(\\d?\\d)':'(\\d{'+b+'})';case's':return b===1?'(\\d?\\d)':'(\\d{'+b+'})';case'l':return'(\\d?\\d?\\d)';case'z':return'(z|[-+]\\d\\d:?\\d\\d|\\S+)?';case't':return e(o.amNames,o.pmNames);default:return'('+a.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(m){return"\\"+m})+')?'}}).replace(/\s/g,'\\s?')+o.timeSuffix+'$',order=g(f),ampm='',treg;treg=s.match(new RegExp(h,'i'));var j={hour:0,minute:0,second:0,millisec:0};if(treg){if(order.t!==-1){if(treg[order.t]===undefined||treg[order.t].length===0){ampm='';j.ampm=''}else{ampm=$.inArray(treg[order.t].toUpperCase(),o.amNames)!==-1?'AM':'PM';j.ampm=o[ampm=='AM'?'amNames':'pmNames'][0]}}if(order.h!==-1){if(ampm=='AM'&&treg[order.h]=='12'){j.hour=0}else{if(ampm=='PM'&&treg[order.h]!='12'){j.hour=parseInt(treg[order.h],10)+12}else{j.hour=Number(treg[order.h])}}}if(order.m!==-1){j.minute=Number(treg[order.m])}if(order.s!==-1){j.second=Number(treg[order.s])}if(order.l!==-1){j.millisec=Number(treg[order.l])}if(order.z!==-1&&treg[order.z]!==undefined){var k=treg[order.z].toUpperCase();switch(k.length){case 1:k=o.timezoneIso8601?'Z':'+0000';break;case 5:if(o.timezoneIso8601){k=k.substring(1)=='0000'?'Z':k.substring(0,3)+':'+k.substring(3)}break;case 6:if(!o.timezoneIso8601){k=k=='Z'||k.substring(1)=='00:00'?'+0000':k.replace(/:/,'')}else{if(k.substring(1)=='00:00'){k='Z'}}break}j.timezone=k}return j}return false};var r=function(f,s,o){try{var d=new Date('2012-01-01 '+s);if(isNaN(d.getTime())){d=new Date('2012-01-01T'+s);if(isNaN(d.getTime())){d=new Date('01/01/2012 '+s);if(isNaN(d.getTime())){throw"Unable to parse time with native Date: "+s;}}}return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),timezone:$.timepicker.timeZoneOffsetString(d)}}catch(err){try{return q(f,s,o)}catch(err2){$.timepicker.log("Unable to parse \ntimeString: "+s+"\ntimeFormat: "+f)}}return false};if(typeof o.parse==="function"){return o.parse(l,n,o)}if(o.parse==='loose'){return r(l,n,o)}return q(l,n,o)};$.datepicker.formatTime=function(b,c,d){d=d||{};d=$.extend({},$.timepicker._defaults,d);c=$.extend({hour:0,minute:0,second:0,millisec:0,timezone:'+0000'},c);var e=b,ampmName=d.amNames[0],hour=parseInt(c.hour,10);if(hour>11){ampmName=d.pmNames[0]}e=e.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[lz]|('.*?'|".*?"))/g,function(a){switch(a){case'HH':return('0'+hour).slice(-2);case'H':return hour;case'hh':return('0'+y(hour)).slice(-2);case'h':return y(hour);case'mm':return('0'+c.minute).slice(-2);case'm':return c.minute;case'ss':return('0'+c.second).slice(-2);case's':return c.second;case'l':return('00'+c.millisec).slice(-3);case'z':return c.timezone===null?d.defaultTimezone:c.timezone;case'T':return ampmName.charAt(0).toUpperCase();case'TT':return ampmName.toUpperCase();case't':return ampmName.charAt(0).toLowerCase();case'tt':return ampmName.toLowerCase();default:return a.replace(/\'/g,"")||"'"}});e=$.trim(e);return e};$.datepicker._base_selectDate=$.datepicker._selectDate;$.datepicker._selectDate=function(a,b){var c=this._getInst($(a)[0]),tp_inst=this._get(c,'timepicker');if(tp_inst){tp_inst._limitMinMaxDateTime(c,true);c.inline=c.stay_open=true;this._base_selectDate(a,b);c.inline=c.stay_open=false;this._notifyChange(c);this._updateDatepicker(c)}else{this._base_selectDate(a,b)}};$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(a){var b=a.input[0];if($.datepicker._curInst&&$.datepicker._curInst!=a&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!=b){return}if(typeof(a.stay_open)!=='boolean'||a.stay_open===false){this._base_updateDatepicker(a);var c=this._get(a,'timepicker');if(c){c._addTimePicker(a)}}};$.datepicker._base_doKeyPress=$.datepicker._doKeyPress;$.datepicker._doKeyPress=function(a){var b=$.datepicker._getInst(a.target),tp_inst=$.datepicker._get(b,'timepicker');if(tp_inst){if($.datepicker._get(b,'constrainInput')){var c=x(tp_inst._defaults.timeFormat),dateChars=$.datepicker._possibleChars($.datepicker._get(b,'dateFormat')),datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,'').replace(/TT/g,c?'APM':'').replace(/Tt/g,c?'AaPpMm':'').replace(/tT/g,c?'AaPpMm':'').replace(/T/g,c?'AP':'').replace(/tt/g,c?'apm':'').replace(/t/g,c?'ap':'')+" "+tp_inst._defaults.separator+tp_inst._defaults.timeSuffix+(tp_inst._defaults.showTimezone?tp_inst._defaults.timezoneList.join(''):'')+(tp_inst._defaults.amNames.join(''))+(tp_inst._defaults.pmNames.join(''))+dateChars,chr=String.fromCharCode(a.charCode===undefined?a.keyCode:a.charCode);return a.ctrlKey||(chr<' '||!dateChars||datetimeChars.indexOf(chr)>-1)}}return $.datepicker._base_doKeyPress(a)};$.datepicker._base_updateAlternate=$.datepicker._updateAlternate;$.datepicker._updateAlternate=function(a){var b=this._get(a,'timepicker');if(b){var c=b._defaults.altField;if(c){var d=b._defaults.altFormat||b._defaults.dateFormat,date=this._getDate(a),formatCfg=$.datepicker._getFormatConfig(a),altFormattedDateTime='',altSeparator=b._defaults.altSeparator?b._defaults.altSeparator:b._defaults.separator,altTimeSuffix=b._defaults.altTimeSuffix?b._defaults.altTimeSuffix:b._defaults.timeSuffix,altTimeFormat=b._defaults.altTimeFormat!==null?b._defaults.altTimeFormat:b._defaults.timeFormat;altFormattedDateTime+=$.datepicker.formatTime(altTimeFormat,b,b._defaults)+altTimeSuffix;if(!b._defaults.timeOnly&&!b._defaults.altFieldTimeOnly&&date!==null){if(b._defaults.altFormat){altFormattedDateTime=$.datepicker.formatDate(b._defaults.altFormat,date,formatCfg)+altSeparator+altFormattedDateTime}else{altFormattedDateTime=b.formattedDate+altSeparator+altFormattedDateTime}}$(c).val(altFormattedDateTime)}}else{$.datepicker._base_updateAlternate(a)}};$.datepicker._base_doKeyUp=$.datepicker._doKeyUp;$.datepicker._doKeyUp=function(a){var b=$.datepicker._getInst(a.target),tp_inst=$.datepicker._get(b,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(b.input.val()!=b.lastVal)){try{$.datepicker._updateDatepicker(b)}catch(err){$.timepicker.log(err)}}}return $.datepicker._base_doKeyUp(a)};$.datepicker._base_gotoToday=$.datepicker._gotoToday;$.datepicker._gotoToday=function(a){var b=this._getInst($(a)[0]),$dp=b.dpDiv;this._base_gotoToday(a);var c=this._get(b,'timepicker');B(c);var d=new Date();this._setTime(b,d);$('.ui-datepicker-today',$dp).click()};$.datepicker._disableTimepickerDatepicker=function(a){var b=this._getInst(a);if(!b){return}var c=this._get(b,'timepicker');$(a).datepicker('getDate');if(c){c._defaults.showTimepicker=false;c._updateDateTime(b)}};$.datepicker._enableTimepickerDatepicker=function(a){var b=this._getInst(a);if(!b){return}var c=this._get(b,'timepicker');$(a).datepicker('getDate');if(c){c._defaults.showTimepicker=true;c._addTimePicker(b);c._updateDateTime(b)}};$.datepicker._setTime=function(a,b){var c=this._get(a,'timepicker');if(c){var d=c._defaults;c.hour=b?b.getHours():d.hour;c.minute=b?b.getMinutes():d.minute;c.second=b?b.getSeconds():d.second;c.millisec=b?b.getMilliseconds():d.millisec;c._limitMinMaxDateTime(a,true);c._onTimeChange();c._updateDateTime(a)}};$.datepicker._setTimeDatepicker=function(a,b,c){var d=this._getInst(a);if(!d){return}var e=this._get(d,'timepicker');if(e){this._setDateFromField(d);var f;if(b){if(typeof b=="string"){e._parseTime(b,c);f=new Date();f.setHours(e.hour,e.minute,e.second,e.millisec)}else{f=new Date(b.getTime())}if(f.toString()=='Invalid Date'){f=undefined}this._setTime(d,f)}}};$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker;$.datepicker._setDateDatepicker=function(a,b){var c=this._getInst(a);if(!c){return}var d=(b instanceof Date)?new Date(b.getTime()):b;this._updateDatepicker(c);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(a,d,true)};$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker;$.datepicker._getDateDatepicker=function(a,b){var c=this._getInst(a);if(!c){return}var d=this._get(c,'timepicker');if(d){if(c.lastVal===undefined){this._setDateFromField(c,b)}var e=this._getDate(c);if(e&&d._parseTime($(a).val(),d.timeOnly)){e.setHours(d.hour,d.minute,d.second,d.millisec)}return e}return this._base_getDateDatepicker(a,b)};$.datepicker._base_parseDate=$.datepicker.parseDate;$.datepicker.parseDate=function(a,b,c){var d;try{d=this._base_parseDate(a,b,c)}catch(err){if(err.indexOf(":")>=0){d=this._base_parseDate(a,b.substring(0,b.length-(err.length-err.indexOf(':')-2)),c);$.timepicker.log("Error parsing the date string: "+err+"\ndate string = "+b+"\ndate format = "+a)}else{throw err;}}return d};$.datepicker._base_formatDate=$.datepicker._formatDate;$.datepicker._formatDate=function(a,b,c,d){var e=this._get(a,'timepicker');if(e){e._updateDateTime(a);return e.$input.val()}return this._base_formatDate(a)};$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker;$.datepicker._optionDatepicker=function(a,b,c){var d=this._getInst(a),name_clone;if(!d){return null}var e=this._get(d,'timepicker');if(e){var f=null,max=null,onselect=null,overrides=e._defaults.evnts,fns={},prop;if(typeof b=='string'){if(b==='minDate'||b==='minDateTime'){f=c}else if(b==='maxDate'||b==='maxDateTime'){max=c}else if(b==='onSelect'){onselect=c}else if(overrides.hasOwnProperty(b)){if(typeof(c)==='undefined'){return overrides[b]}fns[b]=c;name_clone={}}}else if(typeof b=='object'){if(b.minDate){f=b.minDate}else if(b.minDateTime){f=b.minDateTime}else if(b.maxDate){max=b.maxDate}else if(b.maxDateTime){max=b.maxDateTime}for(prop in overrides){if(overrides.hasOwnProperty(prop)&&b[prop]){fns[prop]=b[prop]}}}for(prop in fns){if(fns.hasOwnProperty(prop)){overrides[prop]=fns[prop];if(!name_clone){name_clone=$.extend({},b)}delete name_clone[prop]}}if(name_clone&&v(name_clone)){return}if(f){if(f===0){f=new Date()}else{f=new Date(f)}e._defaults.minDate=f;e._defaults.minDateTime=f}else if(max){if(max===0){max=new Date()}else{max=new Date(max)}e._defaults.maxDate=max;e._defaults.maxDateTime=max}else if(onselect){e._defaults.onSelect=onselect}}if(c===undefined){return this._base_optionDatepicker.call($.datepicker,a,b)}return this._base_optionDatepicker.call($.datepicker,a,name_clone||b,c)};var v=function(a){var b;for(b in a){if(a.hasOwnProperty(a)){return false}}return true};var w=function(a,b){$.extend(a,b);for(var c in b){if(b[c]===null||b[c]===undefined){a[c]=b[c]}}return a};var x=function(a){return((a.indexOf('t')!==-1||a.indexOf('T')!==-1)&&a.indexOf('h')!==-1)};var y=function(a){if(a>12){a=a-12}if(a===0){a=12}return String(a)};var z=function(a,b,c,d){try{var e=d&&d.separator?d.separator:$.timepicker._defaults.separator,format=d&&d.timeFormat?d.timeFormat:$.timepicker._defaults.timeFormat,timeParts=format.split(e),timePartsLen=timeParts.length,allParts=b.split(e),allPartsLen=allParts.length;if(allPartsLen>1){return[allParts.splice(0,allPartsLen-timePartsLen).join(e),allParts.splice(0,timePartsLen).join(e)]}}catch(err){$.timepicker.log('Could not split the date from the time. Please check the following datetimepicker options'+"\nthrown error: "+err+"\ndateTimeString"+b+"\ndateFormat = "+a+"\nseparator = "+d.separator+"\ntimeFormat = "+d.timeFormat);if(err.indexOf(":")>=0){var f=b.length-(err.length-err.indexOf(':')-2),timeString=b.substring(f);return[$.trim(b.substring(0,f)),$.trim(b.substring(f))]}else{throw err;}}return[b,'']};var A=function(a,b,c,d,e){var f;var g=z(a,c,d,e);f=$.datepicker._base_parseDate(a,g[0],d);if(g[1]!==''){var h=g[1],parsedTime=$.datepicker.parseTime(b,h,e);if(parsedTime===null){throw'Wrong time format';}return{date:f,timeObj:parsedTime}}else{return{date:f}}};var B=function(a,b){if(a&&a.timezone_select){a._defaults.useLocalTimezone=true;var c=typeof b!=='undefined'?b:new Date();var d=$.timepicker.timeZoneOffsetString(c);if(a._defaults.timezoneIso8601){d=d.substring(0,3)+':'+d.substring(3)}a.timezone_select.val(d)}};$.timepicker=new u();$.timepicker.timeZoneOffsetString=function(a){var b=a.getTimezoneOffset()*-1,minutes=b%60,hours=(b-minutes)/60;return(b>=0?'+':'-')+('0'+(hours*101).toString()).slice(-2)+('0'+(minutes*101).toString()).slice(-2)};$.timepicker.timeRange=function(a,b,c){return $.timepicker.handleRange('timepicker',a,b,c)};$.timepicker.dateTimeRange=function(a,b,c){$.timepicker.dateRange(a,b,c,'datetimepicker')};$.timepicker.dateRange=function(a,b,c,d){d=d||'datepicker';$.timepicker.handleRange(d,a,b,c)};$.timepicker.handleRange=function(e,f,g,h){$.fn[e].call(f,$.extend({onClose:function(a,b){checkDates(this,g,a)},onSelect:function(a){selected(this,g,'minDate')}},h,h.start));$.fn[e].call(g,$.extend({onClose:function(a,b){checkDates(this,f,a)},onSelect:function(a){selected(this,f,'maxDate')}},h,h.end));if(e!='timepicker'&&h.reformat){$([f,g]).each(function(){var a=$(this)[e].call($(this),'option','dateFormat'),date=new Date($(this).val());if($(this).val()&&date){$(this).val($.datepicker.formatDate(a,date))}})}checkDates(f,g,f.val());function checkDates(a,b,c){if(b.val()&&(new Date(f.val())>new Date(g.val()))){b.val(c)}}selected(f,g,'minDate');selected(g,f,'maxDate');function selected(a,b,c){if(!$(a).val()){return}var d=$(a)[e].call($(a),'getDate');if(d.getTime){$(b)[e].call($(b),'option',c,d)}}return $([f.get(0),g.get(0)])};$.timepicker.log=function(a){if(window.console){console.log(a)}};$.timepicker.version="1.2.2"})(jQuery);
\ No newline at end of file
+++ /dev/null
-/*!
- * jQuery Tools v1.2.7 - The missing UI library for the Web
- *
- * dateinput/dateinput.js
- * overlay/overlay.js
- * overlay/overlay.apple.js
- * rangeinput/rangeinput.js
- * scrollable/scrollable.js
- * scrollable/scrollable.autoscroll.js
- * scrollable/scrollable.navigator.js
- * tabs/tabs.js
- * tabs/tabs.slideshow.js
- * toolbox/toolbox.expose.js
- * toolbox/toolbox.flashembed.js
- * toolbox/toolbox.history.js
- * toolbox/toolbox.mousewheel.js
- * tooltip/tooltip.js
- * tooltip/tooltip.dynamic.js
- * tooltip/tooltip.slide.js
- * validator/validator.js
- *
- * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
- *
- * http://flowplayer.org/tools/
- *
- * jquery.event.wheel.js - rev 1
- * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
- * Liscensed under the MIT License (MIT-LICENSE.txt)
- * http://www.opensource.org/licenses/mit-license.php
- * Created: 2008-07-01 | Updated: 2008-07-14
- *
- * -----
- *
- */
-(function(d,D){function M(b,a){b=""+b;for(a=a||2;b.length<a;)b="0"+b;return b}function N(b,a,d,g){var f=a.getDate(),l=a.getDay(),k=a.getMonth(),c=a.getFullYear(),f={d:f,dd:M(f),ddd:r[g].shortDays[l],dddd:r[g].days[l],m:k+1,mm:M(k+1),mmm:r[g].shortMonths[k],mmmm:r[g].months[k],yy:(""+c).slice(2),yyyy:c},b=O[b](d,a,f,g);return S.html(b).html()}function l(b){return parseInt(b,10)}function P(b,a){return b.getFullYear()===a.getFullYear()&&b.getMonth()==a.getMonth()&&b.getDate()==a.getDate()}function w(b){if(b!==
-D){if(b.constructor==Date)return b;if("string"==typeof b){var a=b.split("-");if(3==a.length)return new Date(l(a[0]),l(a[1])-1,l(a[2]));if(!/^-?\d+$/.test(b))return;b=l(b)}a=new Date;a.setDate(a.getDate()+b);return a}}function T(b,a){function j(a,t,c){o=a;z=a.getFullYear();B=a.getMonth();A=a.getDate();c||(c=d.Event("api"));"click"==c.type&&!d.browser.msie&&b.focus();c.type="beforeChange";C.trigger(c,[a]);c.isDefaultPrevented()||(b.val(N(t.formatter,a,t.format,t.lang)),c.type="change",C.trigger(c),
-b.data("date",a),f.hide(c))}function g(a){a.type="onShow";C.trigger(a);d(document).on("keydown.d",function(a){if(a.ctrlKey)return!0;var e=a.keyCode;if(8==e||46==e)return b.val(""),f.hide(a);if(27==e||9==e)return f.hide(a);if(0<=d(Q).index(e)){if(!u)return f.show(a),a.preventDefault();var h=d("#"+c.weeks+" a"),j=d("."+c.focus),g=h.index(j);j.removeClass(c.focus);if(74==e||40==e)g+=7;else if(75==e||38==e)g-=7;else if(76==e||39==e)g+=1;else if(72==e||37==e)g-=1;41<g?(f.addMonth(),j=d("#"+c.weeks+" a:eq("+
-(g-42)+")")):0>g?(f.addMonth(-1),j=d("#"+c.weeks+" a:eq("+(g+42)+")")):j=h.eq(g);j.addClass(c.focus);return a.preventDefault()}if(34==e)return f.addMonth();if(33==e)return f.addMonth(-1);if(36==e)return f.today();13==e&&(d(a.target).is("select")||d("."+c.focus).click());return 0<=d([16,17,18,9]).index(e)});d(document).on("click.d",function(a){var e=a.target;!d(e).parents("#"+c.root).length&&e!=b[0]&&(!E||e!=E[0])&&f.hide(a)})}var f=this,q=new Date,k=q.getFullYear(),c=a.css,F=r[a.lang],i=d("#"+c.root),
-K=i.find("#"+c.title),E,G,H,z,B,A,o=b.attr("data-value")||a.value||b.val(),n=b.attr("min")||a.min,p=b.attr("max")||a.max,u,I;0===n&&(n="0");o=w(o)||q;n=w(n||new Date(k+a.yearRange[0],1,1));p=w(p||new Date(k+a.yearRange[1]+1,1,-1));if(!F)throw"Dateinput: invalid language: "+a.lang;"date"==b.attr("type")&&(I=b.clone(),k=I.wrap("<div/>").parent().html(),k=d(k.replace(/type/i,"type=text data-orig-type")),a.value&&k.val(a.value),b.replaceWith(k),b=k);b.addClass(c.input);var C=b.add(f);if(!i.length){i=
-d("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",c.root);i.children().eq(0).attr("id",c.head).end().eq(1).attr("id",c.body).children().eq(0).attr("id",c.days).end().eq(1).attr("id",c.weeks).end().end().end().find("a").eq(0).attr("id",c.prev).end().eq(1).attr("id",c.next);K=i.find("#"+c.head).find("div").attr("id",c.title);if(a.selectors){var x=d("<select/>").attr("id",c.month),y=d("<select/>").attr("id",c.year);K.html(x.add(y))}for(var k=
-i.find("#"+c.days),L=0;7>L;L++)k.append(d("<span/>").text(F.shortDays[(L+a.firstDay)%7]));d("body").append(i)}a.trigger&&(E=d("<a/>").attr("href","#").addClass(c.trigger).click(function(e){a.toggle?f.toggle():f.show();return e.preventDefault()}).insertAfter(b));var J=i.find("#"+c.weeks),y=i.find("#"+c.year),x=i.find("#"+c.month);d.extend(f,{show:function(e){if(!b.attr("readonly")&&!b.attr("disabled")&&!u){e=e||d.Event();e.type="onBeforeShow";C.trigger(e);if(!e.isDefaultPrevented()){d.each(R,function(){this.hide()});
-u=true;x.off("change").change(function(){f.setValue(l(y.val()),l(d(this).val()))});y.off("change").change(function(){f.setValue(l(d(this).val()),l(x.val()))});G=i.find("#"+c.prev).off("click").click(function(){G.hasClass(c.disabled)||f.addMonth(-1);return false});H=i.find("#"+c.next).off("click").click(function(){H.hasClass(c.disabled)||f.addMonth();return false});f.setValue(o);var t=b.offset();if(/iPad/i.test(navigator.userAgent))t.top=t.top-d(window).scrollTop();i.css({top:t.top+b.outerHeight({margins:true})+
-a.offset[0],left:t.left+a.offset[1]});if(a.speed)i.show(a.speed,function(){g(e)});else{i.show();g(e)}return f}}},setValue:function(e,b,g){var h=l(b)>=-1?new Date(l(e),l(b),l(g==D||isNaN(g)?1:g)):e||o;h<n?h=n:h>p&&(h=p);typeof e=="string"&&(h=w(e));e=h.getFullYear();b=h.getMonth();g=h.getDate();if(b==-1){b=11;e--}else if(b==12){b=0;e++}if(!u){j(h,a);return f}B=b;z=e;A=g;var g=(new Date(e,b,1-a.firstDay)).getDay(),i=(new Date(e,b+1,0)).getDate(),k=(new Date(e,b-1+1,0)).getDate(),r;if(a.selectors){x.empty();
-d.each(F.months,function(a,b){n<new Date(e,a+1,1)&&p>new Date(e,a,0)&&x.append(d("<option/>").html(b).attr("value",a))});y.empty();for(var h=q.getFullYear(),m=h+a.yearRange[0];m<h+a.yearRange[1];m++)n<new Date(m+1,0,1)&&p>new Date(m,0,0)&&y.append(d("<option/>").text(m));x.val(b);y.val(e)}else K.html(F.months[b]+" "+e);J.empty();G.add(H).removeClass(c.disabled);for(var m=!g?-7:0,s,v;m<(!g?35:42);m++){s=d("<a/>");if(m%7===0){r=d("<div/>").addClass(c.week);J.append(r)}if(m<g){s.addClass(c.off);v=k-
-g+m+1;h=new Date(e,b-1,v)}else if(m>=g+i){s.addClass(c.off);v=m-i-g+1;h=new Date(e,b+1,v)}else{v=m-g+1;h=new Date(e,b,v);P(o,h)?s.attr("id",c.current).addClass(c.focus):P(q,h)&&s.attr("id",c.today)}n&&h<n&&s.add(G).addClass(c.disabled);p&&h>p&&s.add(H).addClass(c.disabled);s.attr("href","#"+v).text(v).data("date",h);r.append(s)}J.find("a").click(function(b){var e=d(this);if(!e.hasClass(c.disabled)){d("#"+c.current).removeAttr("id");e.attr("id",c.current);j(e.data("date"),a,b)}return false});c.sunday&&
-J.find("."+c.week).each(function(){var b=a.firstDay?7-a.firstDay:0;d(this).children().slice(b,b+1).addClass(c.sunday)});return f},setMin:function(a,b){n=w(a);b&&o<n&&f.setValue(n);return f},setMax:function(a,b){p=w(a);b&&o>p&&f.setValue(p);return f},today:function(){return f.setValue(q)},addDay:function(a){return this.setValue(z,B,A+(a||1))},addMonth:function(a){var a=B+(a||1),b=(new Date(z,a+1,0)).getDate();return this.setValue(z,a,A<=b?A:b)},addYear:function(a){return this.setValue(z+(a||1),B,A)},
-destroy:function(){b.add(document).off("click.d keydown.d");i.add(E).remove();b.removeData("dateinput").removeClass(c.input);I&&b.replaceWith(I)},hide:function(a){if(u){a=d.Event();a.type="onHide";C.trigger(a);if(a.isDefaultPrevented())return;d(document).off("click.d keydown.d");i.hide();u=false}return f},toggle:function(){return f.isOpen()?f.hide():f.show()},getConf:function(){return a},getInput:function(){return b},getCalendar:function(){return i},getValue:function(b){return b?N(a.formatter,o,b,
-a.lang):o},isOpen:function(){return u}});d.each(["onBeforeShow","onShow","change","onHide"],function(b,c){if(d.isFunction(a[c]))d(f).on(c,a[c]);f[c]=function(a){if(a)d(f).on(c,a);return f}});a.editable||b.on("focus.d click.d",f.show).keydown(function(a){var c=a.keyCode;if(!u&&d(Q).index(c)>=0){f.show(a);return a.preventDefault()}(c==8||c==46)&&b.val("");return a.shiftKey||a.ctrlKey||a.altKey||c==9?true:a.preventDefault()});w(b.val())&&j(o,a)}d.tools=d.tools||{version:"@VERSION"};var R=[],O={},q,Q=
-[75,76,38,39,74,72,40,37],r={};q=d.tools.dateinput={conf:{format:"mm/dd/yy",formatter:"default",selectors:!1,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:D,max:D,trigger:0,toggle:0,editable:0,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},addFormatter:function(b,a){O[b]=a},localize:function(b,a){d.each(a,function(b,d){a[b]=d.split(",")});r[b]=a}};q.localize("en",
-{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var S=d("<a/>");q.addFormatter("default",function(b,a,d){return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,function(a){return a in d?d[a]:a})});q.addFormatter("prefixed",function(b,a,d){return b.replace(/%(d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*')/g,
-function(a,b){return b in d?d[b]:a})});d.expr[":"].date=function(b){var a=b.getAttribute("type");return a&&"date"==a||!!d(b).data("dateinput")};d.fn.dateinput=function(b){if(this.data("dateinput"))return this;b=d.extend(!0,{},q.conf,b);d.each(b.css,function(a,d){!d&&"prefix"!=a&&(b.css[a]=(b.css.prefix||"")+(d||a))});var a;this.each(function(){var j=new T(d(this),b);R.push(j);j=j.getInput().data("dateinput",j);a=a?a.add(j):j});return a?a:this}})(jQuery);(function(b){function m(a,c){var d=this,h=a.add(d),n=b(window),e,f,k,g=b.tools.expose&&(c.mask||c.expose),l=Math.random().toString().slice(10);g&&("string"==typeof g&&(g={color:g}),g.closeOnClick=g.closeOnEsc=!1);var i=c.target||a.attr("rel");f=i?b(i):a;if(!f.length)throw"Could not find Overlay: "+i;a&&-1==a.index(f)&&a.click(function(b){d.load(b);return b.preventDefault()});b.extend(d,{load:function(a){if(d.isOpened())return d;var p=o[c.effect];if(!p)throw'Overlay: cannot find effect : "'+c.effect+
-'"';c.oneInstance&&b.each(q,function(){this.close(a)});a=a||b.Event();a.type="onBeforeLoad";h.trigger(a);if(a.isDefaultPrevented())return d;k=true;g&&b(f).expose(g);var j=c.top,e=c.left,i=f.outerWidth({margin:true}),m=f.outerHeight({margin:true});typeof j=="string"&&(j=j=="center"?Math.max((n.height()-m)/2,0):parseInt(j,10)/100*n.height());e=="center"&&(e=Math.max((n.width()-i)/2,0));p[0].call(d,{top:j,left:e},function(){if(k){a.type="onLoad";h.trigger(a)}});if(g&&c.closeOnClick)b.mask.getMask().one("click",
-d.close);if(c.closeOnClick)b(document).on("click."+l,function(a){b(a.target).parents(f).length||d.close(a)});if(c.closeOnEsc)b(document).on("keydown."+l,function(a){a.keyCode==27&&d.close(a)});return d},close:function(a){if(!d.isOpened())return d;a=a||b.Event();a.type="onBeforeClose";h.trigger(a);if(!a.isDefaultPrevented()){k=false;o[c.effect][1].call(d,function(){a.type="onClose";h.trigger(a)});b(document).off("click."+l+" keydown."+l);g&&b.mask.close();return d}},getOverlay:function(){return f},
-getTrigger:function(){return a},getClosers:function(){return e},isOpened:function(){return k},getConf:function(){return c}});b.each(["onBeforeLoad","onStart","onLoad","onBeforeClose","onClose"],function(a,e){if(b.isFunction(c[e]))b(d).on(e,c[e]);d[e]=function(a){if(a)b(d).on(e,a);return d}});e=f.find(c.close||".close");!e.length&&!c.close&&(e=b('<a class="close"></a>'),f.prepend(e));e.click(function(a){d.close(a)});c.load&&d.load()}b.tools=b.tools||{version:"@VERSION"};b.tools.overlay={addEffect:function(a,
-b,d){o[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!b.browser.msie||6<b.browser.version,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var q=[],o={};b.tools.overlay.addEffect("default",function(a,c){var d=this.getConf(),h=b(window);d.fixed||(a.top+=h.scrollTop(),a.left+=h.scrollLeft());a.position=d.fixed?"fixed":"absolute";this.getOverlay().css(a).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,
-a)});b.fn.overlay=function(a){var c=this.data("overlay");if(c)return c;b.isFunction(a)&&(a={onBeforeLoad:a});a=b.extend(!0,{},b.tools.overlay.conf,a);this.each(function(){c=new m(b(this),a);q.push(c);b(this).data("overlay",c)});return a.api?c:this}})(jQuery);(function(h){function l(a){var e=a.offset();return{top:e.top+a.height()/2,left:e.left+a.width()/2}}var i=h.tools.overlay,f=h(window);h.extend(i.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});i.addEffect("apple",function(a,e){var b=this.getOverlay(),d=this.getConf(),g=this.getTrigger(),i=this,m=b.outerWidth({margin:!0}),c=b.data("img"),n=d.fixed?"fixed":"absolute";if(!c){c=b.css("backgroundImage");if(!c)throw"background-image CSS property not set for overlay";c=c.slice(c.indexOf("(")+
-1,c.indexOf(")")).replace(/\"/g,"");b.css("backgroundImage","none");c=h('<img src="'+c+'"/>');c.css({border:0,display:"none"}).width(m);h("body").append(c);b.data("img",c)}var j=d.start.top||Math.round(f.height()/2),k=d.start.left||Math.round(f.width()/2);g&&(g=l(g),j=g.top,k=g.left);d.fixed?(j-=f.scrollTop(),k-=f.scrollLeft()):(a.top+=f.scrollTop(),a.left+=f.scrollLeft());c.css({position:"absolute",top:j,left:k,width:0,zIndex:d.zIndex}).show();a.position=n;b.css(a);c.animate({top:a.top,left:a.left,
-width:m},d.speed,function(){b.css("zIndex",d.zIndex+1).fadeIn(d.fadeInSpeed,function(){i.isOpened()&&!h(this).index(b)?e.call():b.hide()})}).css("position",n)},function(a){var e=this.getOverlay().hide(),b=this.getConf(),d=this.getTrigger(),e=e.data("img"),g={top:b.start.top,left:b.start.left,width:0};d&&h.extend(g,l(d));b.fixed&&e.css({position:"absolute"}).animate({top:"+="+f.scrollTop(),left:"+="+f.scrollLeft()},0);e.animate(g,b.closeSpeed,a)})})(jQuery);(function(a){function z(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a}function m(c,b){var a=parseInt(c.css(b),10);return a?a:(a=c[0].currentStyle)&&a.width&&parseInt(a.width,10)}function y(a){return(a=a.data("events"))&&a.onSlide}function A(c,b){function e(a,d,f,e){void 0===f?f=d/i*v:e&&(f-=b.min);s&&(f=Math.round(f/s)*s);if(void 0===d||s)d=f*i/v;if(isNaN(f))return g;d=Math.max(0,Math.min(d,i));f=d/i*v;if(e||!n)f+=b.min;n&&(e?d=i-d:f=b.max-f);var f=z(f,r),h="click"==a.type;if(u&&void 0!==k&&
-!h&&(a.type="onSlide",w.trigger(a,[f,d]),a.isDefaultPrevented()))return g;e=h?b.speed:0;h=h?function(){a.type="change";w.trigger(a,[f])}:null;n?(j.animate({top:d},e,h),b.progress&&x.animate({height:i-d+j.height()/2},e)):(j.animate({left:d},e,h),b.progress&&x.animate({width:d+j.width()/2},e));k=f;c.val(f);return g}function o(){(n=b.vertical||m(h,"height")>m(h,"width"))?(i=m(h,"height")-m(j,"height"),l=h.offset().top+i):(i=m(h,"width")-m(j,"width"),l=h.offset().left)}function q(){o();g.setValue(void 0!==
-b.value?b.value:b.min)}var g=this,p=b.css,h=a("<div><div/><a href='#'/></div>").data("rangeinput",g),n,k,l,i;c.before(h);var j=h.addClass(p.slider).find("a").addClass(p.handle),x=h.find("div").addClass(p.progress);a.each(["min","max","step","value"],function(a,d){var f=c.attr(d);parseFloat(f)&&(b[d]=parseFloat(f,10))});var v=b.max-b.min,s="any"==b.step?0:b.step,r=b.precision;void 0===r&&(r=s.toString().split("."),r=2===r.length?r[1].length:0);if("range"==c.attr("type")){var t=c.clone().wrap("<div/>").parent().html(),
-t=a(t.replace(/type/i,"type=text data-orig-type"));t.val(b.value);c.replaceWith(t);c=t}c.addClass(p.input);var w=a(g).add(c),u=!0;a.extend(g,{getValue:function(){return k},setValue:function(b,d){o();return e(d||a.Event("api"),void 0,b,true)},getConf:function(){return b},getProgress:function(){return x},getHandle:function(){return j},getInput:function(){return c},step:function(c,d){d=d||a.Event();g.setValue(k+(b.step=="any"?1:b.step)*(c||1),d)},stepUp:function(a){return g.step(a||1)},stepDown:function(a){return g.step(-a||
--1)}});a.each(["onSlide","change"],function(c,d){if(a.isFunction(b[d]))a(g).on(d,b[d]);g[d]=function(b){if(b)a(g).on(d,b);return g}});j.drag({drag:!1}).on("dragStart",function(){o();u=y(a(g))||y(c)}).on("drag",function(a,b,f){if(c.is(":disabled"))return false;e(a,n?b:f)}).on("dragEnd",function(a){if(!a.isDefaultPrevented()){a.type="change";w.trigger(a,[k])}}).click(function(a){return a.preventDefault()});h.click(function(a){if(c.is(":disabled")||a.target==j[0])return a.preventDefault();o();var b=
-n?j.height()/2:j.width()/2;e(a,n?i-l-b+a.pageY:a.pageX-l-b)});b.keyboard&&c.keydown(function(b){if(!c.attr("readonly")){var d=b.keyCode,f=a([75,76,38,33,39]).index(d)!=-1,e=a([74,72,40,34,37]).index(d)!=-1;if((f||e)&&!b.shiftKey&&!b.altKey&&!b.ctrlKey){f?g.step(d==33?10:1,b):e&&g.step(d==34?-10:-1,b);return b.preventDefault()}}});c.blur(function(b){var c=a(this).val();c!==k&&g.setValue(c,b)});a.extend(c[0],{stepUp:g.stepUp,stepDown:g.stepDown});q();i||a(window).load(q)}a.tools=a.tools||{version:"@VERSION"};
-var u;u=a.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:void 0,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var q,l;a.fn.drag=function(c){document.ondragstart=function(){return!1};c=a.extend({x:!0,y:!0,drag:!0},c);q=q||a(document).on("mousedown mouseup",function(b){var e=a(b.target);if("mousedown"==b.type&&e.data("drag")){var o=e.position(),m=b.pageX-o.left,g=b.pageY-o.top,p=!0;q.on("mousemove.drag",
-function(a){var b=a.pageX-m,a=a.pageY-g,k={};c.x&&(k.left=b);c.y&&(k.top=a);p&&(e.trigger("dragStart"),p=!1);c.drag&&e.css(k);e.trigger("drag",[a,b]);l=e});b.preventDefault()}else try{l&&l.trigger("dragEnd")}finally{q.off("mousemove.drag"),l=null}});return this.data("drag",!0)};a.expr[":"].range=function(c){var b=c.getAttribute("type");return b&&"range"==b||!!a(c).filter("input").data("rangeinput")};a.fn.rangeinput=function(c){if(this.data("rangeinput"))return this;var c=a.extend(!0,{},u.conf,c),
-b;this.each(function(){var e=new A(a(this),a.extend(!0,{},c)),e=e.getInput().data("rangeinput",e);b=b?b.add(e):e});return b?b:this}})(jQuery);(function(d){function p(f,b){var c=d(b);return 2>c.length?c:f.parent().find(b)}function u(f,b){var c=this,n=f.add(c),g=f.children(),l=0,j=b.vertical;k||(k=c);1<g.length&&(g=d(b.items,f));1<b.size&&(b.circular=!1);d.extend(c,{getConf:function(){return b},getIndex:function(){return l},getSize:function(){return c.getItems().size()},getNaviButtons:function(){return h.add(m)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.find(b.item).not("."+b.clonedClass)},
-move:function(a,b){return c.seekTo(l+a,b)},next:function(a){return c.move(b.size,a)},prev:function(a){return c.move(-b.size,a)},begin:function(a){return c.seekTo(0,a)},end:function(a){return c.seekTo(c.getSize()-1,a)},focus:function(){return k=c},addItem:function(a){a=d(a);if(b.circular){g.children().last().before(a);g.children().first().replaceWith(a.clone().addClass(b.clonedClass))}else{g.append(a);m.removeClass("disabled")}n.trigger("onAddItem",[a]);return c},seekTo:function(a,e,f){a.jquery||(a=
-a*1);if(b.circular&&a===0&&l==-1&&e!==0||!b.circular&&a<0||a>c.getSize()||a<-1)return c;var i=a;a.jquery?a=c.getItems().index(a):i=c.getItems().eq(a);var h=d.Event("onBeforeSeek");if(!f){n.trigger(h,[a,e]);if(h.isDefaultPrevented()||!i.length)return c}i=j?{top:-i.position().top}:{left:-i.position().left};l=a;k=c;if(e===void 0)e=b.speed;g.animate(i,e,b.easing,f||function(){n.trigger("onSeek",[a])});return c}});d.each(["onBeforeSeek","onSeek","onAddItem"],function(a,e){if(d.isFunction(b[e]))d(c).on(e,
-b[e]);c[e]=function(a){if(a)d(c).on(e,a);return c}});if(b.circular){var q=c.getItems().slice(-1).clone().prependTo(g),r=c.getItems().eq(1).clone().appendTo(g);q.add(r).addClass(b.clonedClass);c.onBeforeSeek(function(a,b,d){if(!a.isDefaultPrevented()){if(b==-1){c.seekTo(q,d,function(){c.end(0)});return a.preventDefault()}b==c.getSize()&&c.seekTo(r,d,function(){c.begin(0)})}});var o=f.parents().add(f).filter(function(){if(d(this).css("display")==="none")return true});o.length?(o.show(),c.seekTo(0,0,
-function(){}),o.hide()):c.seekTo(0,0,function(){})}var h=p(f,b.prev).click(function(a){a.stopPropagation();c.prev()}),m=p(f,b.next).click(function(a){a.stopPropagation();c.next()});b.circular||(c.onBeforeSeek(function(a,e){setTimeout(function(){if(!a.isDefaultPrevented()){h.toggleClass(b.disabledClass,e<=0);m.toggleClass(b.disabledClass,e>=c.getSize()-1)}},1)}),b.initialIndex||h.addClass(b.disabledClass));2>c.getSize()&&h.add(m).addClass(b.disabledClass);b.mousewheel&&d.fn.mousewheel&&f.mousewheel(function(a,
-e){if(b.mousewheel){c.move(e<0?1:-1,b.wheelSpeed||50);return false}});if(b.touch){var s,t;g[0].ontouchstart=function(a){a=a.touches[0];s=a.clientX;t=a.clientY};g[0].ontouchmove=function(a){if(a.touches.length==1&&!g.is(":animated")){var b=a.touches[0],d=s-b.clientX,b=t-b.clientY;c[j&&b>0||!j&&d>0?"next":"prev"]();a.preventDefault()}}}if(b.keyboard)d(document).on("keydown.scrollable",function(a){if(b.keyboard&&!a.altKey&&!a.ctrlKey&&!a.metaKey&&!d(a.target).is(":input")&&!(b.keyboard!="static"&&k!=
-c)){var e=a.keyCode;if(j&&(e==38||e==40)){c.move(e==38?-1:1);return a.preventDefault()}if(!j&&(e==37||e==39)){c.move(e==37?-1:1);return a.preventDefault()}}});b.initialIndex&&c.seekTo(b.initialIndex,0,function(){})}d.tools=d.tools||{version:"@VERSION"};d.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,
-wheelSpeed:0}};var k;d.fn.scrollable=function(f){var b=this.data("scrollable");if(b)return b;f=d.extend({},d.tools.scrollable.conf,f);this.each(function(){b=new u(d(this),f);d(this).data("scrollable",b)});return f.api?b:this}})(jQuery);(function(d){var h=d.tools.scrollable;h.autoscroll={conf:{autoplay:!0,interval:3E3,autopause:!0}};d.fn.autoscroll=function(b){"number"==typeof b&&(b={interval:b});var e=d.extend({},h.autoscroll.conf,b),i;this.each(function(){function b(){c&&clearTimeout(c);c=setTimeout(function(){a.next()},e.interval)}var a=d(this).data("scrollable"),f=a.getRoot(),c,g=!1;a&&(i=a);a.play=function(){c||(g=!1,f.on("onSeek",b),b())};a.pause=function(){c=clearTimeout(c);f.off("onSeek",b)};a.resume=function(){g||a.play()};
-a.stop=function(){g=!0;a.pause()};e.autopause&&f.add(a.getNaviButtons()).hover(a.pause,a.resume);e.autoplay&&a.play()});return e.api?i:this}})(jQuery);(function(b){function m(a,f){var d=b(f);return 2>d.length?d:a.parent().find(f)}var g=b.tools.scrollable;g.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};b.fn.navigator=function(a){"string"==typeof a&&(a={navi:a});var a=b.extend({},g.navigator.conf,a),f;this.each(function(){function d(){return i.find(a.naviItem||"> *")}function g(h){var e=b("<"+(a.naviItem||"a")+"/>").click(function(a){b(this);c.seekTo(h);a.preventDefault();j&&history.pushState({i:h},
-"")});0===h&&e.addClass(k);a.indexed&&e.text(h+1);a.idPrefix&&e.attr("id",a.idPrefix+h);return e.appendTo(i)}var c=b(this).data("scrollable"),i=a.navi.jquery?a.navi:m(c.getRoot(),a.navi),n=c.getNaviButtons(),k=a.activeClass,j=a.history&&!!history.pushState,l=c.getConf().size;c&&(f=c);c.getNaviButtons=function(){return n.add(i)};j&&(history.pushState({i:0},""),b(window).on("popstate",function(a){(a=a.originalEvent.state)&&c.seekTo(a.i)}));d().length?d().each(function(a){b(this).click(function(e){b(this);
-c.seekTo(a);e.preventDefault();j&&history.pushState({i:a},"")})}):b.each(c.getItems(),function(a){a%l==0&&g(a)});c.onBeforeSeek(function(a,c){setTimeout(function(){if(!a.isDefaultPrevented()){var b=c/l;d().eq(b).length&&d().removeClass(k).eq(b).addClass(k)}},1)});c.onAddItem(function(a,b){var d=c.getItems().index(b);d%l==0&&g(d)})});return a.api?f:this}})(jQuery);(function(d){function n(c,a,b){var e=this,l=c.add(this),g=c.find(b.tabs),f=a.jquery?a:c.children(a),i;g.length||(g=c.children());f.length||(f=c.parent().find(a));f.length||(f=d(a));d.extend(this,{click:function(a,h){var f=g.eq(a),j=!c.data("tabs");"string"==typeof a&&a.replace("#","")&&(f=g.filter('[href*="'+a.replace("#","")+'"]'),a=Math.max(g.index(f),0));if(b.rotate){var k=g.length-1;if(0>a)return e.click(k,h);if(a>k)return e.click(0,h)}if(!f.length){if(0<=i)return e;a=b.initialIndex;f=g.eq(a)}if(a===
-i)return e;h=h||d.Event();h.type="onBeforeClick";l.trigger(h,[a]);if(!h.isDefaultPrevented())return m[j?b.initialEffect&&b.effect||"default":b.effect].call(e,a,function(){i=a;h.type="onClick";l.trigger(h,[a])}),g.removeClass(b.current),f.addClass(b.current),e},getConf:function(){return b},getTabs:function(){return g},getPanes:function(){return f},getCurrentPane:function(){return f.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-
-1)},destroy:function(){g.off(b.event).removeClass(b.current);f.find('a[href^="#"]').off("click.T");return e}});d.each(["onBeforeClick","onClick"],function(a,c){if(d.isFunction(b[c]))d(e).on(c,b[c]);e[c]=function(a){if(a)d(e).on(c,a);return e}});b.history&&d.fn.history&&(d.tools.history.init(g),b.event="history");g.each(function(a){d(this).on(b.event,function(b){e.click(a,b);return b.preventDefault()})});f.find('a[href^="#"]').on("click.T",function(a){e.click(d(this).attr("href"),a)});location.hash&&
-"a"==b.tabs&&c.find('[href="'+location.hash+'"]').length?e.click(location.hash):(0===b.initialIndex||0<b.initialIndex)&&e.click(b.initialIndex)}d.tools=d.tools||{version:"@VERSION"};d.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialEffect:!1,initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(c,a){m[c]=a}};var m={"default":function(c,a){this.getPanes().hide().eq(c).show();a.call()},fade:function(c,
-a){var b=this.getConf(),e=b.fadeOutSpeed,d=this.getPanes();e?d.fadeOut(e):d.hide();d.eq(c).fadeIn(b.fadeInSpeed,a)},slide:function(c,a){var b=this.getConf();this.getPanes().slideUp(b.slideUpSpeed);this.getPanes().eq(c).slideDown(b.slideDownSpeed,a)},ajax:function(c,a){this.getPanes().eq(0).load(this.getTabs().eq(c).attr("href"),a)}},j,k;d.tools.tabs.addEffect("horizontal",function(c,a){if(!j){var b=this.getPanes().eq(c),e=this.getCurrentPane();k||(k=this.getPanes().eq(0).width());j=!0;b.show();e.animate({width:0},
-{step:function(a){b.css("width",k-a)},complete:function(){d(this).hide();a.call();j=!1}});e.length||(a.call(),j=!1)}});d.fn.tabs=function(c,a){var b=this.data("tabs");b&&(b.destroy(),this.removeData("tabs"));d.isFunction(a)&&(a={onBeforeClick:a});a=d.extend({},d.tools.tabs.conf,a);this.each(function(){b=new n(d(this),c,a);d(this).data("tabs",b)});return a.api?b:this}})(jQuery);(function(d){function n(c,a){function h(a){var b=d(a);return 2>b.length?b:c.parent().find(a)}function i(){g=setTimeout(function(){e.next()},a.interval)}var b=this,f=c.add(this),e=c.data("tabs"),g,j=!0,m=h(a.next).click(function(){e.next()}),k=h(a.prev).click(function(){e.prev()});d.extend(b,{getTabs:function(){return e},getConf:function(){return a},play:function(){if(g)return b;var a=d.Event("onBeforePlay");f.trigger(a);if(a.isDefaultPrevented())return b;j=!1;f.trigger("onPlay");f.on("onClick",i);
-i();return b},pause:function(){if(!g)return b;var a=d.Event("onBeforePause");f.trigger(a);if(a.isDefaultPrevented())return b;g=clearTimeout(g);f.trigger("onPause");f.off("onClick",i);return b},resume:function(){j||b.play()},stop:function(){b.pause();j=!0}});d.each(["onBeforePlay","onPlay","onBeforePause","onPause"],function(e,c){if(d.isFunction(a[c]))d(b).on(c,a[c]);b[c]=function(a){return d(b).on(c,a)}});a.autopause&&e.getTabs().add(m).add(k).add(e.getPanes()).hover(b.pause,b.resume);a.autoplay&&
-b.play();a.clickable&&e.getPanes().click(function(){e.next()});if(!e.getConf().rotate){var l=a.disabledClass;e.getIndex()||k.addClass(l);e.onBeforeClick(function(a,b){k.toggleClass(l,!b);m.toggleClass(l,b==e.getTabs().length-1)})}}var h;h=d.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3E3,clickable:!0,api:!1}};d.fn.slideshow=function(c){var a=this.data("slideshow");if(a)return a;c=d.extend({},h.conf,c);this.each(function(){a=
-new n(d(this),c);d(this).data("slideshow",a)});return c.api?a:this}})(jQuery);(function(b){function j(){if(b.browser.msie){var a=b(document).height(),c=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,20>a-c?c:a]}return[b(document).width(),b(document).height()]}function g(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"@VERSION"};var k;k=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
-onClose:null}};var c,h,d,e,i;b.mask={load:function(a,f){if(d)return this;"string"==typeof a&&(a={color:a});a=a||e;e=a=b.extend(b.extend({},k.conf),a);c=b("#"+a.maskId);c.length||(c=b("<div/>").attr("id",a.maskId),b("body").append(c));var l=j();c.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(!1===g(a.onBeforeLoad))return this;if(a.closeOnEsc)b(document).on("keydown.mask",function(a){a.keyCode==
-27&&b.mask.close(a)});if(a.closeOnClick)c.on("click.mask",function(a){b.mask.close(a)});b(window).on("resize.mask",function(){b.mask.fit()});f&&f.length&&(i=f.eq(0).css("zIndex"),b.each(f,function(){var a=b(this);/relative|absolute|fixed/i.test(a.css("position"))||a.css("position","relative")}),h=f.css({zIndex:Math.max(a.zIndex+1,"auto"==i?0:i)}));c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();g(a.onLoad);d="full"});d=!0;return this},close:function(){if(d){if(!1===g(e.onBeforeClose))return this;
-c.fadeOut(e.closeSpeed,function(){g(e.onClose);h&&h.css({zIndex:i});d=!1});b(document).off("keydown.mask");c.off("click.mask");b(window).off("resize.mask")}return this},fit:function(){if(d){var a=j();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?"full"==d:d},getConf:function(){return e},getExposed:function(){return h}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);(function(){function h(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function k(a,b){var c=[],d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d]));return c}function l(a,b,c){if(e.isSupported(b.version))a.innerHTML=e.getHTML(b,c);else if(b.expressInstall&&e.isSupported([6,65]))a.innerHTML=e.getHTML(h(b,{src:b.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else if(a.innerHTML.replace(/\s/g,"")||(a.innerHTML="<h2>Flash version "+b.version+
-" or greater is required</h2><h3>"+(0<f[0]?"Your version is "+f:"You have no flash plugin installed")+"</h3>"+("A"==a.tagName?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>"),"A"==a.tagName&&(a.onclick=function(){location.href=j})),b.onFail){var d=b.onFail.call(this);"string"==typeof d&&(a.innerHTML=d)}i&&(window[b.id]=document.getElementById(b.id));h(this,{getRoot:function(){return a},getOptions:function(){return b},getConf:function(){return c},
-getApi:function(){return a.firstChild}})}var i=document.all,j="http://www.adobe.com/go/getflashplayer",m="function"==typeof jQuery,n=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,g={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});
-window.flashembed=function(a,b,c){"string"==typeof a&&(a=document.getElementById(a.replace("#","")));if(a)return"string"==typeof b&&(b={src:b}),new l(a,h(h({},g),b),c)};var e=h(window.flashembed,{conf:g,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(d){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(e){}}}return(b=
-n.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(null===a||void 0===a)return null;var b=typeof a;"object"==b&&a.push&&(b="array");switch(b){case "string":return a=a.replace(RegExp('(["\\\\])',"g"),"\\$1"),a=a.replace(/^\s?(\d+\.?\d*)%/,"$1pct"),'"'+a+'"';case "array":return"["+k(a,function(a){return e.asString(a)}).join(",")+"]";case "function":return'"function()"';case "object":var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push('"'+c+'":'+e.asString(a[c]));return"{"+b.join(",")+"}"}return(""+
-a).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(a,b){var a=h({},a),c='<object width="'+a.width+'" height="'+a.height+'" id="'+a.id+'" name="'+a.id+'"';a.cachebusting&&(a.src+=(-1!=a.src.indexOf("?")?"&":"?")+Math.random());c=a.w3c||!i?c+(' data="'+a.src+'" type="application/x-shockwave-flash"'):c+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';c+=">";if(a.w3c||i)c+='<param name="movie" value="'+a.src+'" />';a.width=a.height=a.id=a.w3c=a.src=null;a.onFail=a.version=a.expressInstall=
-null;for(var d in a)a[d]&&(c+='<param name="'+d+'" value="'+a[d]+'" />');d="";if(b){for(var f in b)if(b[f]){var g=b[f];d+=f+"="+encodeURIComponent(/function|object/.test(typeof g)?e.asString(g):g)+"&"}d=d.slice(0,-1);c+='<param name="flashvars" value=\''+d+"' />"}return c+"</object>"},isSupported:function(a){return f[0]>a[0]||f[0]==a[0]&&f[1]>=a[1]}}),f=e.getVersion();m&&(jQuery.tools=jQuery.tools||{version:"@VERSION"},jQuery.tools.flashembed={conf:g},jQuery.fn.flashembed=function(a,b){return this.each(function(){jQuery(this).data("flashembed",
-flashembed(this,a,b))})})})();(function(a){function g(a){if(a){var b=d.contentWindow.document;b.open().close();b.location.hash=a}}var f,d,e,h;a.tools=a.tools||{version:"@VERSION"};a.tools.history={init:function(c){h||(a.browser.msie&&"8">a.browser.version?d||(d=a("<iframe/>").attr("src","javascript:false;").hide().get(0),a("body").append(d),setInterval(function(){var b=d.contentWindow.document.location.hash;f!==b&&a(window).trigger("hash",b)},100),g(location.hash||"#")):setInterval(function(){var b=location.hash;b!==f&&a(window).trigger("hash",
-b)},100),e=!e?c:e.add(c),c.click(function(b){var c=a(this).attr("href");d&&g(c);if(c.slice(0,1)!="#"){location.href="#"+c;return b.preventDefault()}}),h=!0)}};a(window).on("hash",function(c,b){b?e.filter(function(){var c=a(this).attr("href");return c==b||c==b.replace("#","")}).trigger("history",[b]):e.eq(0).trigger("history",[b]);f=b});a.fn.history=function(c){a.tools.history.init(this);return this.on("history",c)}})(jQuery);(function(b){function c(a){switch(a.type){case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case "DOMMouseScroll":b.extend(a,a.data);a.delta=-a.detail/3;break;case "mousewheel":a.delta=a.wheelDelta/120}a.type="wheel";return b.event.handle.call(this,a,a.delta)}b.fn.mousewheel=function(a){return this[a?"on":"trigger"]("wheel",a)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};var d=
-!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+("1.9">b.browser.version?" mousemove":"")})(jQuery);(function(e){function p(a,b,d){var f=d.relative?a.position().top:a.offset().top,c=d.relative?a.position().left:a.offset().left,h=d.position[0],f=f-(b.outerHeight()-d.offset[0]),c=c+(a.outerWidth()+d.offset[1]);/iPad/i.test(navigator.userAgent)&&(f-=e(window).scrollTop());var i=b.outerHeight()+a.outerHeight();"center"==h&&(f+=i/2);"bottom"==h&&(f+=i);h=d.position[1];a=b.outerWidth()+a.outerWidth();"center"==h&&(c-=a/2);"left"==h&&(c-=a);return{top:f,left:c}}function n(a,b){var d=this,f=a.add(d),c,
-h=0,i=0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),n=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),j=b.events[t]||b.events[s?n?"widget":"input":"def"];if(!r)throw'Nonexistent effect "'+b.effect+'"';j=j.split(/,\s*/);if(2!=j.length)throw"Tooltip: bad events configuration for "+t;a.on(j[0],function(a){clearTimeout(h);b.predelay?i=setTimeout(function(){d.show(a)},b.predelay):d.show(a)}).on(j[1],function(a){clearTimeout(i);b.delay?h=setTimeout(function(){d.hide(a)},
-b.delay):d.hide(a)});m&&b.cancelDefault&&(a.removeAttr("title"),a.data("title",m));e.extend(d,{show:function(k){if(!c){if(q)c=e(q);else if(b.tip)c=e(b.tip).eq(0);else if(m)c=e(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);else{c=a.next();c.length||(c=a.parent().next())}if(!c.length)throw"Cannot find tooltip for "+a;}if(d.isShown())return d;c.stop(true,true);var g=p(a,c,b);b.tip&&c.html(a.data("title"));k=e.Event();k.type="onBeforeShow";f.trigger(k,[g]);if(k.isDefaultPrevented())return d;
-g=p(a,c,b);c.css({position:"absolute",top:g.top,left:g.left});l=true;r[0].call(d,function(){k.type="onShow";l="full";f.trigger(k)});g=b.events.tooltip.split(/,\s*/);if(!c.data("__set")){c.off(g[0]).on(g[0],function(){clearTimeout(h);clearTimeout(i)});if(g[1]&&!a.is("input:not(:checkbox, :radio), textarea"))c.off(g[1]).on(g[1],function(b){b.relatedTarget!=a[0]&&a.trigger(j[1].split(" ")[0])});b.tip||c.data("__set",true)}return d},hide:function(a){if(!c||!d.isShown())return d;a=e.Event();a.type="onBeforeHide";
-f.trigger(a);if(!a.isDefaultPrevented()){l=false;o[b.effect][1].call(d,function(){a.type="onHide";f.trigger(a)});return d}},isShown:function(a){return a?l=="full":l},getConf:function(){return b},getTip:function(){return c},getTrigger:function(){return a}});e.each(["onHide","onBeforeShow","onShow","onBeforeHide"],function(a,c){if(e.isFunction(b[c]))e(d).on(c,b[c]);d[c]=function(a){if(a)e(d).on(c,a);return d}})}e.tools=e.tools||{version:"@VERSION"};e.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",
-predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,d){o[a]=[b,d]}};var o={toggle:[function(a){var b=this.getConf(),d=this.getTip(),b=b.opacity;1>b&&d.css({opacity:b});d.show();a.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){var b=
-this.getConf();!e.browser.msie||b.fadeIE?this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a):(this.getTip().show(),a())},function(a){var b=this.getConf();!e.browser.msie||b.fadeIE?this.getTip().fadeOut(b.fadeOutSpeed,a):(this.getTip().hide(),a())}]};e.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=e.extend(!0,{},e.tools.tooltip.conf,a);"string"==typeof a.position&&(a.position=a.position.split(/,?\s/));this.each(function(){b=new n(e(this),a);e(this).data("tooltip",b)});return a.api?
-b:this}})(jQuery);(function(c){var i=c.tools.tooltip;i.dynamic={conf:{classNames:"top right bottom left"}};c.fn.dynamic=function(f){"number"==typeof f&&(f={speed:f});var f=c.extend({},i.dynamic.conf,f),l=c.extend(!0,{},f),j=f.classNames.split(/\s/),e;this.each(function(){var h=c(this).tooltip().onBeforeShow(function(f,h){var d=this.getTip(),a=this.getConf();e||(e=[a.position[0],a.position[1],a.offset[0],a.offset[1],c.extend({},a)]);c.extend(a,e[4]);a.position=[e[0],e[1]];a.offset=[e[2],e[3]];d.css({visibility:"hidden",
-position:"absolute",top:h.top,left:h.left}).show();var k=c.extend(!0,{},l),b;b=c(window);var g=b.width()+b.scrollLeft(),i=b.height()+b.scrollTop();b=[d.offset().top<=b.scrollTop(),g<=d.offset().left+d.width(),i<=d.offset().top+d.height(),b.scrollLeft()>=d.offset().left];a:{for(g=b.length;g--;)if(b[g]){g=!1;break a}g=!0}if(!g){b[2]&&(c.extend(a,k.top),a.position[0]="top",d.addClass(j[0]));b[3]&&(c.extend(a,k.right),a.position[1]="right",d.addClass(j[1]));b[0]&&(c.extend(a,k.bottom),a.position[0]="bottom",
-d.addClass(j[2]));b[1]&&(c.extend(a,k.left),a.position[1]="left",d.addClass(j[3]));if(b[0]||b[2])a.offset[0]*=-1;if(b[1]||b[3])a.offset[1]*=-1}d.css({visibility:"visible"}).hide()});h.onBeforeShow(function(){var c=this.getConf();this.getTip();setTimeout(function(){c.position=[e[0],e[1]];c.offset=[e[2],e[3]]},0)});h.onHide(function(){this.getTip().removeClass(f.classNames)});ret=h});return f.api?ret:this}})(jQuery);(function(b){var e=b.tools.tooltip;b.extend(e.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!b.browser.msie});var f={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};e.addEffect("slide",function(b){var a=this.getConf(),g=this.getTip(),c=a.slideFade?{opacity:a.opacity}:{},d=f[a.direction]||f.up;c[d[1]]=d[0]+"="+a.slideOffset;a.slideFade&&g.css({opacity:0});g.show().animate(c,a.slideInSpeed,b)},function(e){var a=this.getConf(),g=a.slideOffset,
-c=a.slideFade?{opacity:0}:{},d=f[a.direction]||f.up,h=""+d[0];a.bounce&&(h="+"==h?"-":"+");c[d[1]]=h+"="+g;this.getTip().animate(c,a.slideOutSpeed,function(){b(this).hide();e.call()})})})(jQuery);(function(c){function i(b,a,f){var a=c(a).first()||a,d=b.offset().top,e=b.offset().left,g=f.position.split(/,?\s+/),j=g[0],g=g[1],d=d-(a.outerHeight()-f.offset[0]),e=e+(b.outerWidth()+f.offset[1]);/iPad/i.test(navigator.userAgent)&&(d-=c(window).scrollTop());f=a.outerHeight()+b.outerHeight();"center"==j&&(d+=f/2);"bottom"==j&&(d+=f);b=b.outerWidth();"center"==g&&(e-=(b+a.outerWidth())/2);"left"==g&&(e-=b);return{top:d,left:e}}function q(b){function a(){return this.getAttribute("type")==b}a.key='[type="'+
-b+'"]';return a}function n(b,a,f){function p(a,b,e){if(f.grouped||!a.length){var g;!1===e||c.isArray(e)?(g=d.messages[b.key||b]||d.messages["*"],g=g[f.lang]||d.messages["*"].en,(b=g.match(/\$\d/g))&&c.isArray(e)&&c.each(b,function(a){g=g.replace(this,e[a])})):g=e[f.lang]||e;a.push(g)}}var e=this,g=a.add(e),b=b.not(":button, :image, :reset, :submit");a.attr("novalidate","novalidate");c.extend(e,{getConf:function(){return f},getForm:function(){return a},getInputs:function(){return b},reflow:function(){b.each(function(){var a=
-c(this),b=a.data("msg.el");b&&(a=i(a,b,f),b.css({top:a.top,left:a.left}))});return e},invalidate:function(a,h){if(!h){var d=[];c.each(a,function(a,f){var c=b.filter("[name='"+a+"']");c.length&&(c.trigger("OI",[f]),d.push({input:c,messages:[f]}))});a=d;h=c.Event()}h.type="onFail";g.trigger(h,[a]);h.isDefaultPrevented()||l[f.effect][0].call(e,a,h);return e},reset:function(a){a=a||b;a.removeClass(f.errorClass).each(function(){var a=c(this).data("msg.el");a&&(a.remove(),c(this).data("msg.el",null))}).off(f.errorInputEvent+
-".v"||"");return e},destroy:function(){a.off(f.formEvent+".V reset.V");b.off(f.inputEvent+".V change.V");return e.reset()},checkValidity:function(a,h){var a=a||b,a=a.not(":disabled"),d={},a=a.filter(function(){var a=c(this).attr("name");if(!d[a])return d[a]=!0,c(this)});if(!a.length)return!0;h=h||c.Event();h.type="onBeforeValidate";g.trigger(h,[a]);if(h.isDefaultPrevented())return h.result;var k=[];a.each(function(){var a=[],b=c(this).data("messages",a),d=m&&b.is(":date")?"onHide.v":f.errorInputEvent+
-".v";b.off(d);c.each(o,function(){var c=this[0];if(b.filter(c).length){var d=this[1].call(e,b,b.val());if(!0!==d){h.type="onBeforeFail";g.trigger(h,[b,c]);if(h.isDefaultPrevented())return!1;var j=b.attr(f.messageAttr);if(j)return a=[j],!1;p(a,c,d)}}});if(a.length&&(k.push({input:b,messages:a}),b.trigger("OI",[a]),f.errorInputEvent))b.on(d,function(a){e.checkValidity(b,a)});if(f.singleError&&k.length)return!1});var i=l[f.effect];if(!i)throw'Validator: cannot find effect "'+f.effect+'"';if(k.length)return e.invalidate(k,
-h),!1;i[1].call(e,a,h);h.type="onSuccess";g.trigger(h,[a]);a.off(f.errorInputEvent+".v");return!0}});c.each(["onBeforeValidate","onBeforeFail","onFail","onSuccess"],function(a,b){if(c.isFunction(f[b]))c(e).on(b,f[b]);e[b]=function(a){if(a)c(e).on(b,a);return e}});if(f.formEvent)a.on(f.formEvent+".V",function(b){if(!e.checkValidity(null,b))return b.preventDefault();b.target=a;b.type=f.formEvent});a.on("reset.V",function(){e.reset()});b[0]&&b[0].validity&&b.each(function(){this.oninvalid=function(){return!1}});
-a[0]&&(a[0].checkValidity=e.checkValidity);if(f.inputEvent)b.on(f.inputEvent+".V",function(a){e.checkValidity(c(this),a)});b.filter(":checkbox, select").filter("[required]").on("change.V",function(a){var b=c(this);(this.checked||b.is("select")&&c(this).val())&&l[f.effect][1].call(e,b,a)});b.filter(":radio[required]").on("change.V",function(a){var b=c("[name='"+c(a.srcElement).attr("name")+"']");b!=null&&b.length!=0&&e.checkValidity(b,a)});c(window).resize(function(){e.reflow()})}c.tools=c.tools||
-{version:"@VERSION"};var r=/\[type=([a-z]+)\]/,s=/^-?[0-9]*(\.[0-9]+)?$/,m=c.tools.dateinput,t=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,u=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,d;d=c.tools.validator={conf:{grouped:!1,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:!1,speed:"normal"},messages:{"*":{en:"Please correct this value"}},
-localize:function(b,a){c.each(a,function(a,c){d.messages[a]=d.messages[a]||{};d.messages[a][b]=c})},localizeFn:function(b,a){d.messages[b]=d.messages[b]||{};c.extend(d.messages[b],a)},fn:function(b,a,f){c.isFunction(a)?f=a:("string"==typeof a&&(a={en:a}),this.messages[b.key||b]=a);(a=r.exec(b))&&(b=q(a[1]));o.push([b,f])},addEffect:function(b,a,f){l[b]=[a,f]}};var o=[],l={"default":[function(b){var a=this.getConf();c.each(b,function(b,d){var e=d.input;e.addClass(a.errorClass);var g=e.data("msg.el");
-g||(g=c(a.message).addClass(a.messageClass).appendTo(document.body),e.data("msg.el",g));g.css({visibility:"hidden"}).find("p").remove();c.each(d.messages,function(a,b){c("<p/>").html(b).appendTo(g)});g.outerWidth()==g.parent().width()&&g.add(g.find("p")).css({display:"inline"});e=i(e,g,a);g.css({visibility:"visible",position:"absolute",top:e.top,left:e.left}).fadeIn(a.speed)})},function(b){var a=this.getConf();b.removeClass(a.errorClass).each(function(){var a=c(this).data("msg.el");a&&a.css({visibility:"hidden"})})}]};
-c.each(["email","url","number"],function(b,a){c.expr[":"][a]=function(b){return b.getAttribute("type")===a}});c.fn.oninvalid=function(b){return this[b?"on":"trigger"]("OI",b)};d.fn(":email","Please enter a valid email address",function(b,a){return!a||t.test(a)});d.fn(":url","Please enter a valid URL",function(b,a){return!a||u.test(a)});d.fn(":number","Please enter a numeric value.",function(b,a){return s.test(a)});d.fn("[max]","Please enter a value no larger than $1",function(b,a){if(""===a||m&&b.is(":date"))return!0;
-var c=b.attr("max");return parseFloat(a)<=parseFloat(c)?!0:[c]});d.fn("[min]","Please enter a value of at least $1",function(b,a){if(""===a||m&&b.is(":date"))return!0;var c=b.attr("min");return parseFloat(a)>=parseFloat(c)?!0:[c]});d.fn("[required]","Please complete this mandatory field.",function(b,a){return b.is(":checkbox")?b.is(":checked"):!!a});d.fn("[pattern]",function(b,a){return""===a||RegExp("^"+b.attr("pattern")+"$").test(a)});d.fn(":radio","Please select an option.",function(b){var a=!1;
-c("[name='"+b.attr("name")+"']").each(function(b,d){c(d).is(":checked")&&(a=!0)});return a?!0:!1});c.fn.validator=function(b){var a=this.data("validator");a&&(a.destroy(),this.removeData("validator"));b=c.extend(!0,{},d.conf,b);if(this.is("form"))return this.each(function(){var d=c(this);a=new n(d.find(":input"),d,b);d.data("validator",a)});a=new n(this,this.eq(0).closest("form"),b);return this.data("validator",a)}})(jQuery);