/* * jQuery UI 0.6.6 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"0.6.6",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}for(var i=0;i0){return true;}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}return($.inArray(method,methods)!=-1);}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}options={};options[key]=value;}$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element [value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.extend($.expr[':'],{icontains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}});$.iterators={getText:function(){return $(this).text();},parseInt:function(v){return parseInt(v,10);}};$.extend({range:function(){if(!arguments.length){return[];}var min,max,step;if(arguments.length==1){min=0;max=arguments[0]-1;step=1;}else{min=arguments[0];max=arguments[1]-1;step=arguments[2]||1;}if(step<0&&min>=max){step*=-1;var tmp=min;min=max;max=tmp;min+=((max-min)%step);}var a=[];for(var i=min;i<=max;i+=step){a.push(i);}return a;},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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},keyIs:function(k,e){return parseInt($.keyCode[k.toUpperCase()],10)==parseInt((typeof(e)=='number')?e:e.keyCode,10);},redirect:function(url){window.location.href=url;return url;},stop:function(e,preventDefault,stopPropagation){if(preventDefault){e.preventDefault();}if(stopPropagation){e.stopPropagation();}return preventDefault&&false||true;},basename:function(path){var t=path.split('/');return t[t.length]===''&&s||t.slice(0,t.length).join('/');},filename:function(path){return path.split('/').pop();},filesizeformat:function(bytes,suffixes){var b=parseInt(bytes,10);var s=suffixes||['byte','bytes','KB','MB','GB'];if(isNaN(b)||b===0){return'0 '+s[0];}if(b==1){return'1 '+s[0];}if(b<1024){return b.toFixed(2)+' '+s[1];}if(b<1048576){return(b/1024).toFixed(2)+' '+s[2];}if(b<1073741824){return(b/1048576).toFixed(2)+' '+s[3];}else{return(b/1073741824).toFixed(2)+' '+s[4];}},fileExtension:function(s){var tokens=s.split('.');return tokens[tokens.length-1]||false;},isString:function(o){return typeof(o)=='string'&&true||false;},isRegExp:function(o){return o&&o.constructor.toString().indexOf('RegExp()')!=-1||false;},isArray:function(o){if(!o){return false;}return o.constructor&&Object.prototype.toString.apply(o.constructor.prototype)==='[object Array]';},isObject:function(o){return(typeof(o)=='object');},toCurrency:function(i){i=parseFloat(i,10).toFixed(2);return(i=='NaN')?'0.00':i;},pxToEm:function(i,settings){settings=jQuery.extend({scope:'body',reverse:false},settings);var pxVal=(i==='')?0:parseFloat(i);var scopeVal;var getWindowWidth=function(){var de=document.documentElement;return self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;};if(settings.scope=='body'&&$.browser.msie&&(parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(1)>0.0){var calcFontSize=function(){return(parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(3)*16;};scopeVal=calcFontSize();}else{scopeVal=parseFloat(jQuery(settings.scope).css("font-size"));}var result=(settings.reverse===true)?(pxVal*scopeVal).toFixed(2)+'px':(pxVal/scopeVal).toFixed(2)+'em';return result;}});$.extend($.fn,{selectRange:function(start,end){if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',start);range.select();}else if($(this).get(0).setSelectionRange){$(this).bind('focus',function(e){e.preventDefault();}).get(0).setSelectionRange(start,end);}return $(this);},equalHeights:function(px){$(this).each(function(){var currentTallest=0;$(this).children().each(function(i){if($(this).height()>currentTallest){currentTallest=$(this).height();}});if(!px||!$.pxToEm){currentTallest=$.pxToEm(currentTallest);}if($.browser.msie&&$.browser.version==6.0){$(this).children().css({'height':currentTallest});}$(this).children().css({'min-height':currentTallest});});return this;},delay:function(time,callback){jQuery.fx.step.delay=function(){};return this.animate({delay:1},time,callback);}});})(jQuery);(function($){var strings={strConversion:{__repr:function(i){switch(this.__getType(i)){case'array':case'date':case'number':return i.toString();case'object':var o=[];for(x=0;x0){o=new Array(Math.ceil(l/p.length)).join(p).substr(0,t=!t?l:t==1?0:Math.ceil(l/2))+str+p.substr(0,l-t);}return o;},__getInput:function(arg,args){var key=arg.getKey();switch(this.__getType(args)){case'object':var keys=key.split('.');var obj=args;for(var subkey=0;subkey6)?Math.round(o.toExponential(arg.getPrecision())):o;},G:function(input,args){return this.g(input,args);},c:function(input,args){var match=input.match(/\w|\d/);return match&&match[0]||'';},r:function(input,args){return this.__repr(input);},s:function(input,args){return input.toString&&input.toString()||''+input;}},format:function(str,args){var end=0;var start=0;var match=false;var buffer=[];var token='';var tmp=(str||'').split('');for(start=0;startend||buffer.length<1){buffer.push(tmp[start]);}}return(buffer.length>1)?buffer.join(''):buffer[0];},calc:function(str,args){return eval(format(str,args));},repeat:function(s,n){return new Array(n+1).join(s);},UTF8encode:function(s){return unescape(encodeURIComponent(s));},UTF8decode:function(s){return decodeURIComponent(escape(s));},tpl:function(){var out='',render=true;if(arguments.length==2&&$.isArray(arguments[1])){this[arguments[0]]=arguments[1].join('');return jQuery;}if(arguments.length==2&&$.isString(arguments[1])){this[arguments[0]]=arguments[1];return jQuery;}if(arguments.length==1){return $(this[arguments[0]]);}if(arguments.length==2&&arguments[1]==false){return this[arguments[0]];}if(arguments.length==2&&$.isObject(arguments[1])){return $($.format(this[arguments[0]],arguments[1]));}if(arguments.length==3&&$.isObject(arguments[1])){return(arguments[2]==true)?$.format(this[arguments[0]],arguments[1]):$($.format(this[arguments[0]],arguments[1]));}}};var Argument=function(arg,args){this.__arg=arg;this.__args=args;this.__max_precision=parseFloat('1.'+(new Array(32)).join('1'),10).toString().length-3;this.__def_precision=6;this.getString=function(){return this.__arg;};this.getKey=function(){return this.__arg.split(':')[0];};this.getFormat=function(){var match=this.getString().split(':');return(match&&match[1])?match[1]:'s';};this.getPrecision=function(){var match=this.getFormat().match(/\.(\d+|\*)/g);if(!match){return this.__def_precision;}else{match=match[0].slice(1);if(match!='*'){return parseInt(match,10);}else if(strings.strConversion.__getType(this.__args)=='array'){return this.__args[1]&&this.__args[0]||this.__def_precision;}else if(strings.strConversion.__getType(this.__args)=='object'){return this.__args[this.getKey()]&&this.__args[this.getKey()][0]||this.__def_precision;}else{return this.__def_precision;}}};this.getPaddingLength=function(){var match=false;if(this.isAlternate()){match=this.getString().match(/0?#0?(\d+)/);if(match&&match[1]){return parseInt(match[1],10);}}match=this.getString().match(/(0|\.)(\d+|\*)/g);return match&&parseInt(match[0].slice(1),10)||0;};this.getPaddingString=function(){var o='';if(this.isAlternate()){o=' ';}if(this.getFormat().match(/#0|0#|^0|\.\d+/)){o='0';}return o;};this.getFlags=function(){var match=this.getString().matc(/^(0|\#|\-|\+|\s)+/);return match&&match[0].split('')||[];};this.isAlternate=function(){return!!this.getFormat().match(/^0?#/);};};var arguments2Array=function(args,shift){var o=[];for(l=args.length,x=(shift||0)-1;x');$.tpl('timepickr.row','
    ');$.tpl('timepickr.button','
  1. {label:s}
  2. ');$.widget('ui.timepickr',{_init:function(){var ui=this;var menu=ui._buildMenu();var element=ui.element;element.data('timepickr.initialValue',element.val());menu.insertAfter(ui.element);element.addClass('ui-timepickr').dropslide(ui.options.dropslide).bind('select',ui.select);element.blur(function(e){$(this).dropslide('hide');if(ui.options.resetOnBlur){$(this).val($(this).data('timepickr.initialValue'));}});if(ui.options.val){element.val(this.options.val);}if(ui.options.handle){$(this.options.handle).click(function(){$(element).dropslide('show');});}if(ui.options.resetOnBlur){menu.find('li > span').bind('mousedown.timepickr',function(){$(element).data('timepickr.initialValue',$(element).val());});}if(ui.options.updateLive){menu.find('li').bind('mouseover.timepickr',function(){$(element).timepickr('update');});}var hrs=menu.find('ol:eq(1)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();var min=menu.find('ol:eq(2)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();var sec=menu.find('ol:eq(3)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();if(this.options.convention===24){var day=menu.find('ol:eq(0) li:eq(0)');var night=menu.find('ol:eq(0) li:eq(1)');var dayHours=hrs.find('li').slice(0,12);var nightHours=hrs.find('li').slice(12,24);var index=0;var selectHr=function(id){hrs.find('li').removeClass('hover');hrs.find('span').removeClass('ui-state-hover');hrs.find('li').eq(id).addClass('hover').find('span').addClass('ui-state-hover')};day.mouseover(function(){nightHours.hide();dayHours.show(0);index=hrs.find('li.hover').data('id')||hrs.find('li:first').data('id');selectHr(index>11&&index-12||index);element.dropslide('redraw');});night.mouseover(function(){dayHours.hide();nightHours.show(0);index=hrs.find('li.hover').data('id')||hrs.find('li:first').data('id');selectHr(index<12&&index+12||index);element.dropslide('redraw');});}element.dropslide('redraw');element.data('timepickr',this);},update:function(){var frmt=this.options.convention===24&&'format24'||'format12';var val={h:this.getValue('hour'),m:this.getValue('minute'),s:this.getValue('second'),prefix:this.getValue('prefix'),suffix:this.getValue('suffix')};var o=$.format(this.options[frmt],val);$(this.element).val(o);},select:function(e){var dropslide=$(this).data('dropslide');$(dropslide.element).timepickr('update');e.stopPropagation();},getHour:function(){return this.getValue('hour');},getMinute:function(){return this.getValue('minute');},getSecond:function(){return this.getValue('second');},getValue:function(type){return $('.ui-timepickr.'+type+'.hover',this.element.next()).text();},activate:function(){this.element.dropslide('activate');},destroy:function(){this.element.dropslide('destroy');},_createButton:function(i,format,className){var o=format&&$.format(format,i)||i;var cn=className&&'ui-timepickr '+className||'ui-timepickr';return $.tpl('timepickr.button',{className:cn,label:o}).data('id',i);},_createRow:function(range,format,className){var row=$.tpl('timepickr.row');var button=this._createButton;$.each(range,function(idx,val){row.append(button(val,format||false,className||false));});return row;},_getRanges12:function(){var o=[],opt=this.options;if(opt.hours){o.push(this._createRow($.range(1,13),'{0:0.2d}','hour'));}if(opt.minutes){o.push(this._createRow(opt.rangeMin,'{0:0.2d}','minute'));}if(opt.seconds){o.push(this._createRow(opt.rangeSec,'{0:0.2d}','second'));}if(opt.suffix){o.push(this._createRow(opt.suffix,false,'suffix'));}return o;},_getRanges24:function(){var o=[],opt=this.options;o.push(this._createRow(opt.prefix,false,'prefix'));if(opt.hours){o.push(this._createRow($.range(0,24),'{0:0.2d}','hour'));}if(opt.minutes){o.push(this._createRow(opt.rangeMin,'{0:0.2d}','minute'));}if(opt.seconds){o.push(this._createRow(opt.rangeSec,'{0:0.2d}','second'));}return o;},_buildMenu:function(){var menu=$.tpl('timepickr.menu');var ranges=this.options.convention===24&&this._getRanges24()||this._getRanges12();$.each(ranges,function(idx,val){menu.append(val);});return menu;}});$.extend($.ui.timepickr,{version:'0.6.6',eventPrefix:'',getter:'',defaults:{convention:24,dropslide:{trigger:'focus'},format12:'{h:02.d}:{m:02.d} {suffix:s}',format24:'{h:02.d}:{m:02.d}',handle:false,hours:true,minutes:true,seconds:false,prefix:['am','pm'],suffix:['am','pm'],rangeMin:$.range(0,60,15),rangeSec:$.range(0,60,15),updateLive:true,resetOnBlur:true,val:false}});})(jQuery);