/* * jQuery UI Effects 1.5.2 * * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Effects/ */ ;(function($){$.ui={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){return}for(var i=0;i').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0))}catch(e){}return $.ui.cssCache[name]},disableSelection:function(el){$(el).attr('unselectable','on').css('MozUserSelect','none')},enableSelection:function(el){$(el).attr('unselectable','off').css('MozUserSelect','')},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments)};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);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&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args)}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options))}})};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value)}).bind('getData.'+name,function(e,key){return self.getData(key)}).bind('remove',function(){return self.destroy()});this.init()};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype)};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},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')}},enable:function(){this.setData('disabled',false)},disable:function(){this.setData('disabled',true)}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e)});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(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(e){return self.mouseMove(e)};this._mouseUpDelegate=function(e){return self.mouseUp(e)};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e)}if(this._mouseStarted){this.mouseDrag(e);return false}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e))}return!this._mouseStarted},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e)}return false},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance)},mouseDelayMet:function(e){return this._mouseDelayMet},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function($){$.fn.unwrap=$.fn.unwrap||function(expr){return this.each(function(){$(this).parents(expr).eq(0).after(this).remove()})};$.widget("ui.slider",{plugins:{},ui:function(e){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(n,e){$.ui.plugin.call(this,n,[e,this.ui()]);this.element.triggerHandler(n=="slide"?n:"slide"+n,[e,this.ui()],this.options[n])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){$(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(key,value){$.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(key)){this.initBoundaries()}if(key=="range"){value?this.handle.length==2&&this.createRange():this.removeRange()}},init:function(){var self=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=$(this.options.handle,this.element);if(!this.handle.length){self.handle=self.generated=$(self.options.handles||[0]).map(function(){var handle=$("
").addClass("ui-slider-handle").appendTo(self.element);if(this.id)handle.attr("id",this.id);return handle[0]})}var handleclass=function(el){this.element=$(el);this.element.data("mouse",this);this.options=self.options;this.element.bind("mousedown",function(){if(self.currentHandle)this.blur(self.currentHandle);self.focus(this,1)});this.mouseInit()};$.extend(handleclass.prototype,$.ui.mouse,{mouseStart:function(e){return self.start.call(self,e,this.element[0])},mouseStop:function(e){return self.stop.call(self,e,this.element[0])},mouseDrag:function(e){return self.drag.call(self,e,this.element[0])},mouseCapture:function(){return true},trigger:function(e){this.mouseDown(e)}});$(this.handle).each(function(){new handleclass(this)}).wrap('').parent().bind('focus',function(e){self.focus(this.firstChild)}).bind('blur',function(e){self.blur(this.firstChild)}).bind('keydown',function(e){if(!self.options.noKeyboard)self.keydown(e.keyCode,this.firstChild)});this.element.bind('mousedown.slider',function(e){self.click.apply(self,[e]);self.currentHandle.data("mouse").trigger(e);self.firstValue=self.firstValue+1});$.each(this.options.handles||[],function(index,handle){self.moveTo(handle.start,index,true)});if(!isNaN(this.options.startValue))this.moveTo(this.options.startValue,0,true);this.previousHandle=$(this.handle[0]);if(this.handle.length==2&&this.options.range)this.createRange()},initBoundaries:function(){var element=this.element[0],o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};$.extend(o,{axis:o.axis||(element.offsetWidth
').addClass('ui-slider-range').css({position:'absolute'}).appendTo(this.element);this.updateRange()},removeRange:function(){this.rangeElement.remove();this.rangeElement=null},updateRange:function(){var prop=this.options.axis=="vertical"?"top":"left";var size=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(prop,(parseInt($(this.handle[0]).css(prop),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(size,(parseInt($(this.handle[1]).css(prop),10)||0)-(parseInt($(this.handle[0]).css(prop),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(handle,axis){if(this.handle.length==1)this.currentHandle=this.handle;if(!axis)axis=this.options.axis=="vertical"?"y":"x";var curHandle=$(handle!=undefined&&handle!==null?this.handle[handle]||handle:this.currentHandle);if(curHandle.data("mouse").sliderValue){return parseInt(curHandle.data("mouse").sliderValue[axis],10)}else{return parseInt(((parseInt(curHandle.css(axis=="x"?"left":"top"),10)/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(handle,axis)))*this.options.realMax[axis])+this.options.min[axis],10)}},convertValue:function(value,axis){return this.options.min[axis]+(value/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)))*this.options.realMax[axis]},translateValue:function(value,axis){return((value-this.options.min[axis])/this.options.realMax[axis])*(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis))},translateRange:function(value,axis){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&value>=this.translateValue(this.value(1),axis))value=this.translateValue(this.value(1,axis)-this.oneStep(axis),axis);if(this.currentHandle[0]==this.handle[1]&&value<=this.translateValue(this.value(0),axis))value=this.translateValue(this.value(0,axis)+this.oneStep(axis),axis)}if(this.options.handles){var handle=this.options.handles[this.handleIndex()];if(valuethis.translateValue(handle.max,axis)){value=this.translateValue(handle.max,axis)}}return value},translateLimits:function(value,axis){if(value>=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis))value=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis);if(value<=0)value=0;return value},handleSize:function(handle,axis){return $(handle!=undefined&&handle!==null?this.handle[handle]:this.currentHandle)[0]["offset"+(axis=="x"?"Width":"Height")]},oneStep:function(axis){return this.options.stepping[axis]||1},start:function(e,handle){var o=this.options;if(o.disabled)return false;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle)this.focus(this.previousHandle,true);this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:e.pageY-this.handleOffset.top,left:e.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate('start',e);this.drag(e,handle);return true},stop:function(e){this.propagate('stop',e);if(this.firstValue!=this.value())this.propagate('change',e);this.focus(this.currentHandle,true);return false},drag:function(e,handle){var o=this.options;var position={top:e.pageY-this.offset.top-this.clickOffset.top,left:e.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle)this.focus(this.previousHandle,true);position.left=this.translateLimits(position.left,"x");position.top=this.translateLimits(position.top,"y");if(o.stepping.x){var value=this.convertValue(position.left,"x");value=Math.round(value/o.stepping.x)*o.stepping.x;position.left=this.translateValue(value,"x")}if(o.stepping.y){var value=this.convertValue(position.top,"y");value=Math.round(value/o.stepping.y)*o.stepping.y;position.top=this.translateValue(value,"y")}position.left=this.translateRange(position.left,"x");position.top=this.translateRange(position.top,"y");if(o.axis!="vertical")this.currentHandle.css({left:position.left});if(o.axis!="horizontal")this.currentHandle.css({top:position.top});this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(position.left,"x"))||0,y:Math.round(this.convertValue(position.top,"y"))||0};if(this.rangeElement)this.updateRange();this.propagate('slide',e);return false},moveTo:function(value,handle,noPropagation){var o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(handle==undefined&&!this.currentHandle&&this.handle.length!=1)return false;if(handle==undefined&&!this.currentHandle)handle=0;if(handle!=undefined)this.currentHandle=this.previousHandle=$(this.handle[handle]||handle);if(value.x!==undefined&&value.y!==undefined){var x=value.x,y=value.y}else{var x=value,y=value}if(x!==undefined&&x.constructor!=Number){var me=/^\-\=/.test(x),pe=/^\+\=/.test(x);if(me||pe){x=this.value(null,"x")+parseInt(x.replace(me?'=':'+=',''),10)}else{x=isNaN(parseInt(x,10))?undefined:parseInt(x,10)}}if(y!==undefined&&y.constructor!=Number){var me=/^\-\=/.test(y),pe=/^\+\=/.test(y);if(me||pe){y=this.value(null,"y")+parseInt(y.replace(me?'=':'+=',''),10)}else{y=isNaN(parseInt(y,10))?undefined:parseInt(y,10)}}if(o.axis!="vertical"&&x!==undefined){if(o.stepping.x)x=Math.round(x/o.stepping.x)*o.stepping.x;x=this.translateValue(x,"x");x=this.translateLimits(x,"x");x=this.translateRange(x,"x");o.animate?this.currentHandle.stop().animate({left:x},(Math.abs(parseInt(this.currentHandle.css("left"))-x))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({left:x})}if(o.axis!="horizontal"&&y!==undefined){if(o.stepping.y)y=Math.round(y/o.stepping.y)*o.stepping.y;y=this.translateValue(y,"y");y=this.translateLimits(y,"y");y=this.translateRange(y,"y");o.animate?this.currentHandle.stop().animate({top:y},(Math.abs(parseInt(this.currentHandle.css("top"))-y))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({top:y})}if(this.rangeElement)this.updateRange();this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(x,"x"))||0,y:Math.round(this.convertValue(y,"y"))||0};if(!noPropagation){this.propagate('start',null);this.propagate('stop',null);this.propagate('change',null);this.propagate("slide",null)}}});$.ui.slider.getter="value";$.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery); /* Copyright (c) 2007 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Version: 1.0.2 * Requires jQuery 1.1.3+ * Docs: http://docs.jquery.com/Plugins/livequery */ (function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))return(q=query)&&false});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;$.livequery.run(q.id);return this},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)$.livequery.stop(query.id)});return this}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this};$.livequery.prototype={stop:function(){var query=this;if(this.type)this.elements.unbind(this.type,this.fn);else if(this.fn2)this.elements.each(function(i,el){query.fn2.apply(el)});this.elements=[];this.stopped=true},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)$.event.remove(el,query.type,query.fn)})}else{nEls.each(function(){query.fn.apply(this)});if(this.fn2&&oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)query.fn2.apply(el)})}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)$.livequery.queries[$.livequery.queue.shift()].run()}},pause:function(){$.livequery.running=false},play:function(){$.livequery.running=true;$.livequery.run()},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r}})},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id)}else $.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id)});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20)},stop:function(id){if(id!=undefined)$.livequery.queries[id].stop();else $.each($.livequery.queries,function(id){$.livequery.queries[id].stop()})}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play()});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)r.context=a.context,r.selector=a.selector;if(typeof a=='string')r.context=c||document,r.selector=a;return r};$.prototype.init.prototype=$.prototype})(jQuery); /* * jQuery Form Plugin * version: 2.12 (06/07/2008) * @requires jQuery v1.2.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id$ */ (function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof options=='function')options={success:options};options=$.extend({url:this.attr('action')||window.location.toString(),type:this.attr('method')||'GET'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data)a.push({name:n,value:options.data[n]})}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null}else options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm()});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i');var io=$io[0];if($.browser.msie||$.browser.opera)io.src='javascript:false;document.write("");';$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y}}}setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');$form.attr({target:id,encoding:'multipart/form-data',enctype:'multipart/form-data',method:'POST',action:opts.url});if(opts.timeout)setTimeout(function(){timedOut=true;cb()},opts.timeout);var extraInputs=[];try{if(options.extraData)for(var n in options.extraData)extraInputs.push($('').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit()}finally{$form.attr('action',a);t?$form.attr('target',t):$form.removeAttr('target');$(extraInputs).remove()}},10);function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var operaHack=0;var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(doc.body==null&&!operaHack&&$.browser.opera){operaHack=1;cbInvoked--;setTimeout(cb,100);return}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header]};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];xhr.responseText=ta?ta.value:xhr.responseText}else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText)}data=$.httpData(xhr,opts.dataType)}catch(e){ok=false;$.handleError(opts,xhr,'error',e)}if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts])}if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null},100)};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s)}else doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var $form=this.form;$form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){$form.clk_x=e.offsetX;$form.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();$form.clk_x=e.pageX-offset.left;$form.clk_y=e.pageY-offset.top}else{$form.clk_x=e.pageX-this.offsetLeft;$form.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null},10)})})};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin')})};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i=/)) {comparison_rule="greater_than_or_equal";rule_string=lengthRequirements.replace("length>=","");} else if(lengthRequirements.match(/length>/)) {comparison_rule="greater_than";rule_string=lengthRequirements.replace("length>","");} else if(lengthRequirements.match(/length<=/)) {comparison_rule="less_than_or_equal";rule_string=lengthRequirements.replace("length<=","");} else if(lengthRequirements.match(/length=parseInt(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"greater_than":if(!(form[fieldName].value.length>parseInt(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"less_than_or_equal":if(!(form[fieldName].value.length<=parseInt(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"less_than":if(!(form[fieldName].value.lengthfieldCount[1]) {if(!processError(form[fieldName],errorMessage)) return false;}} else {if(form[fieldName].value.length!=fieldCount[0]) {if(!processError(form[fieldName],errorMessage)) return false;}} break;} break;case"valid_email":if(form[fieldName].value&&!isValidEmail(form[fieldName].value)) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"valid_date":var isLaterDate=false;if(date_flag=="later_date") isLaterDate=true;else if(date_flag=="any_date") isLaterDate=false;if(!isValidDate(form[fieldName].value,form[fieldName2].value,form[fieldName3].value,isLaterDate)) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"same_as":if(form[fieldName].value!=form[fieldName2].value) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"range":comparison_rule="";rule_string="";if(rangeRequirements.match(/range=/)) {comparison_rule="equal";rule_string=rangeRequirements.replace("range=","");} else if(rangeRequirements.match(/range>=/)) {comparison_rule="greater_than_or_equal";rule_string=rangeRequirements.replace("range>=","");} else if(rangeRequirements.match(/range>/)) {comparison_rule="greater_than";rule_string=rangeRequirements.replace("range>","");} else if(rangeRequirements.match(/range<=/)) {comparison_rule="less_than_or_equal";rule_string=rangeRequirements.replace("range<=","");} else if(rangeRequirements.match(/range=Number(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"greater_than":if(!(form[fieldName].value>Number(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"less_than_or_equal":if(!(form[fieldName].value<=Number(rule_string))) {if(!processError(form[fieldName],errorMessage)) return false;} break;case"less_than":if(!(form[fieldName].valueNumber(rangeValues[1]))) {if(!processError(form[fieldName],errorMessage)) return false;} break;} break;case"function":custom_function=fieldName;eval("var result = "+custom_function+"()");if(result.constructor.toString().indexOf("Array")!=-1) {for(var j=0;j0) {alert(errorStr);return false;}} else if(options.displayType=="display-html") {var success=displayHTMLErrors(form,returnHash);if(!success) return false;} if(typeof options.onCompleteHandler=='function') return options.onCompleteHandler();else return true;} function processError(obj,message) {message=message.replace(/%%C%%/ig,",");var continueProcessing=true;switch(options.displayType) {case"alert-one":alert(message);styleField(obj,true);continueProcessing=false;break;case"alert-all":case"display-html":returnHash.push([obj,message]);break;} return continueProcessing;} function displayHTMLErrors(f,errorInfo) {var errorHTML=options.errorTextIntro+"

";for(var i=0;i";styleField(errorInfo[i][0],i==0);} if(errorInfo.length>0) {$("#"+options.errorTargetElementId).css("display","block");$("#"+options.errorTargetElementId).html(errorHTML);return false;} return true;} function styleField(field,focus) {if(field.type==undefined) {if(focus) field[0].focus();for(var i=0;imonth||month>12)return false;if(year<0)return false;if(1>day||day>daysInMonth[month-1])return false;if(isLaterDate) {var today=new Date();var currMonth=today.getMonth()+1;var currDay=today.getDate();var currYear=today.getFullYear();if(String(currMonth).length==1)currMonth="0"+currMonth;if(String(currDay).length==1)currDay="0"+currDay;var currDate=String(currYear)+String(currMonth)+String(currDay);if(String(month).length==1)month="0"+month;if(String(day).length==1)day="0"+day;incomingDate=String(year)+String(month)+String(day);if(Number(currDate)>Number(incomingDate)) return false;} return true;}})(jQuery); /* http://keith-wood.name/countdown.html * Countdown for jQuery v1.4.0. * Written by Keith Wood (kbwood@virginbroadband.com.au) January 2008. * Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and * MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. * Please attribute the author if you use it. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(t($){t 13(){r.1m=[];r.1m[\'\']={1B:[\'2j\',\'36\',\'2V\',\'2O\',\'2E\',\'2u\',\'2p\'],1z:[\'2b\',\'35\',\'34\',\'2U\',\'2Q\',\'2N\',\'2J\'],1H:[\'y\',\'m\',\'w\',\'d\'],1A:[\'y\',\'m\',\'w\',\'d\'],1y:\':\'};r.1f={1i:\'28\',24:\'\',22:1q,1Z:\'\',1X:v,1U:1q,1S:v,1P:v,1N:v};$.1d(r.1f,r.1m[\'\'])}8 q=\'L\';8 Y=0;8 O=1;8 W=2;8 D=3;8 H=4;8 M=5;8 S=6;$.1d(13.1w,{16:\'27\',25:t(a){1r(r.1f,a||{})},21:t(a,b){a=$(a);u(a.20(\'.\'+r.16)){x}a.2W(r.16);u(!a[0].1p){a[0].1p=\'2R\'+I K().z()}8 c={};c.1h=$.1d({},b);c.A=[0,0,0,0,0,0,0];r.1n(c);$.N(a[0],q,c);r.14(a,c)},14:t(a,b){8 c=$(a);b=b||$.N(c[0],q);u(!b){x}c.2K(r.1J(b));8 d=r.B(b,\'1P\');u(d){d.1c(c[0],[b.J!=\'1G\'?b.A:r.1g(b,b.F,I K())])}8 e=b.J!=\'11\'&&(b.E?b.T.z()<=b.E.z():b.T.z()>=b.17.z());u(e){u(b.Z||r.B(b,\'1U\')){8 f=r.B(b,\'1S\');u(f){f.1c(c[0],[])}8 g=r.B(b,\'1X\');u(g){2s.2r=g}}b.Z=v}V u(b.J==\'11\'){b.2q=v}V{8 h=r.B(b,\'1i\');b.Z=2o(\'$.L.14("#\'+c[0].1p+\'")\',(h.C(\'s|S\')?1:(h.C(\'m|M\')?30:2n))*2m)}$.N(c[0],q,b)},2l:t(a,b){8 c=$.N(a,q);u(c){1r(c.1h,b||{});r.1n(c);$.N(a,q,c);r.14(a,c)}},2k:t(a){a=$(a);u(!a.20(\'.\'+r.16)){x}a.2i(r.16).2h();8 b=$.N(a[0],q);u(b.Z){2g(b.Z)}$.2f(a[0],q)},2e:t(a){r.J(a,\'11\')},2d:t(a){r.J(a,\'1G\')},2c:t(a){r.J(a,v)},J:t(a,b){8 c=$.N(a,q);u(c){u(c.J==\'11\'&&!b){c.A=c.1x;8 d=(c.E?\'-\':\'+\');c[c.E?\'E\':\'17\']=r.1e(d+c.A[0]+\'Y\'+d+c.A[1]+\'O\'+d+c.A[2]+\'W\'+d+c.A[3]+\'D\'+d+c.A[4]+\'H\'+d+c.A[5]+\'M\'+d+c.A[6]+\'S\')}c.J=b;c.1x=(b==\'11\'?c.A:v);$.N(a,q,c);r.14(a,c)}},2a:t(a){8 b=$.N(a,q);x(!b?v:(!b.J?b.A:r.1g(b,b.F,I K())))},B:t(a,b){x(a.1h[b]!=v?a.1h[b]:$.L.1f[b])},1n:t(a){8 b=I K();8 c=r.B(a,\'1N\');a.1v=(c?c.z()-b.z():0);a.E=r.B(a,\'29\');u(a.E){a.E=r.1e(a.E,v)}a.17=r.1e(r.B(a,\'26\'),b);a.F=r.1u(a)},1e:t(k,l){8 m=t(a){8 b=I K();b.1s(b.z()+a*23);x b};8 n=t(a,b){x 32-I K(a,b,32).1b()};8 o=t(a){8 b=I K();8 c=b.19();8 d=b.18();8 e=b.1b();8 f=b.33();8 g=b.2Z();8 h=b.2Y();8 i=/([+-]?[0-9]+)\\s*(s|S|m|M|h|H|d|D|w|W|o|O|y|Y)?/g;8 j=i.1j(a);1Y(j){2S(j[2]||\'s\'){G\'s\':G\'S\':h+=U(j[1]);Q;G\'m\':G\'M\':g+=U(j[1]);Q;G\'h\':G\'H\':f+=U(j[1]);Q;G\'d\':G\'D\':e+=U(j[1]);Q;G\'w\':G\'W\':e+=U(j[1])*7;Q;G\'o\':G\'O\':d+=U(j[1]);e=X.1W(e,n(c,d));Q;G\'y\':G\'Y\':c+=U(j[1]);e=X.1W(e,n(c,d));Q}j=i.1j(a)}b=I K(c,d,e,f,g,h,0);x b};8 p=(k==v?l:(1o k==\'1V\'?o(k):(1o k==\'2P\'?m(k):k)));u(p)p.1T(0);x p},1J:t(b){b.A=P=(b.J?b.A:r.1g(b,b.F,I K()));8 c=1q;8 d=0;1R(8 e=0;e0);b.F[e]=(b.F[e]==\'?\'&&!c?v:b.F[e]);d+=(b.F[e]?1:0)}8 f=r.B(b,\'22\');8 g=r.B(b,\'24\');8 h=(f?r.B(b,\'1H\'):r.B(b,\'1B\'));8 i=(f?r.B(b,\'1A\'):r.B(b,\'1z\'))||h;8 j=r.B(b,\'1y\');8 k=r.B(b,\'1Z\')||\'\';8 l=t(a){x(a<10?\'0\':\'\')+a};8 m=t(a){x(b.F[a]?P[a]+(P[a]==1?i[a]:h[a])+\' \':\'\')};8 n=t(a){x(b.F[a]?\'<1O 15="1M">\'+P[a]+\'<2L/>\'+(P[a]==1?i[a]:h[a])+\'\':\'\')};x(g?r.1L(b,g,h,i):((f?\'\'+m(Y)+m(O)+m(W)+m(D)+l(P[H])+j+l(P[M])+(b.F[S]?j+l(P[S]):\'\'):\'\'+n(Y)+n(O)+n(W)+n(D)+n(H)+n(M)+n(S))+\'\'+(k?\'\'+k+\'\':\'\')))},1L:t(f,g,h,i){8 j=g;8 k=t(a,b){8 c=I 1I(\'%\'+a+\'.*%\'+a);8 d=I 1I(\'%\'+a+\'.*\');1Y(2G){8 e=c.1j(j);u(!e){Q}e[0]=e[0].1l(0,2)+e[0].1l(2).1a(d,\'%\'+a);j=j.1a(e[0],f.F[b]?l(e[0],a,b):\'\')}};8 l=t(a,b,c){x a.1l(2,a.1Q-4).1a(/%2F/g,(f.A[c]<10?\'0\':\'\')+f.A[c]).1a(/%n/g,f.A[c]).1a(/%l/g,f.A[c]==1?i[c]:h[c])};k(\'Y\',Y);k(\'O\',O);k(\'W\',W);k(\'D\',D);k(\'H\',H);k(\'M\',M);k(\'S\',S);x j},1u:t(a){8 b=r.B(a,\'1i\');8 c=[];c[Y]=(b.C(\'y\')?\'?\':(b.C(\'Y\')?\'!\':v));c[O]=(b.C(\'o\')?\'?\':(b.C(\'O\')?\'!\':v));c[W]=(b.C(\'w\')?\'?\':(b.C(\'W\')?\'!\':v));c[D]=(b.C(\'d\')?\'?\':(b.C(\'D\')?\'!\':v));c[H]=(b.C(\'h\')?\'?\':(b.C(\'H\')?\'!\':v));c[M]=(b.C(\'m\')?\'?\':(b.C(\'M\')?\'!\':v));c[S]=(b.C(\'s\')?\'?\':(b.C(\'S\')?\'!\':v));x c},1g:t(c,d,e){c.T=e;c.T.1T(0);8 f=I K(c.T.z());u(c.E&&e.z()c.17.z()){c.T=e=f}}f.1s(f.z()-c.1v);8 g=[0,0,0,0,0,0,0];u(d[Y]||d[O]){8 h=X.2D(0,(f.19()-e.19())*12+f.18()-e.18()+(f.1b()