/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery-1.3.2.js */
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector);}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else{return jQuery(context).find(selector);}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector);}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")";}}return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name);}else{options={};options[name]=value;}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));}});},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined;}return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);}});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild;}return elem;}).append(this);}return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else{return this.cloneNode(true);}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return;}var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}i++;});}return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);}else{selector=jQuery.multiFilter(selector,this);}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return !!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value;}values.push(value);}}return values;}return(elem.value||"").replace(/\r/g,"");}return undefined;}if(typeof value==="number"){value+="";}return this.each(function(){if(this.nodeType!=1){return;}if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length){this.selectedIndex=-1;}}else{this.value=value;}}});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment);}}if(scripts){jQuery.each(scripts,evalScript);}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}if(elem.parentNode){elem.parentNode.removeChild(elem);}}function now(){return +new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}if(length==i){target=this;--i;}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue;}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);}else{if(copy!==undefined){target[name]=copy;}}}}}return target;};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;}return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;}head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i);}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className;}});},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className);}).join(" "):"";}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options){elem.style[name]=old[name];}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}if(elem.offsetWidth!==0){getWH();}else{jQuery.swap(elem,props,getWH);}return Math.max(0,Math.round(val));}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(name.match(/float/i)){name=styleFloat;}if(!force&&style&&style[name]){ret=style[name];}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float";}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name);}if(name=="opacity"&&ret==""){ret="1";}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}}}return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])];}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+="";}if(!elem){return;}if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild;}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.nodeType){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){var scriptChildren=jQuery.makeArray(ret[i].getElementsByTagName("script"));for(var j=0;j<scriptChildren.length;j++){if(scriptChildren[j].type&&scriptChildren[j].type.toLowerCase()!=="text/javascript"){scriptChildren.splice(j,1);j--;}}ret.splice.apply(ret,[i+1,0].concat(scriptChildren));}fragment.appendChild(ret[i]);}}return scripts;}return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex;}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed";}elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}return elem[name];}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value);}if(set){elem.setAttribute(name,""+value);}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set){elem[name]=value;}return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array;}else{while(i){ret[--i]=array[i];}}}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}return -1;},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem;}}}else{while((elem=second[i++])!=null){first[pos++]=elem;}}return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i]);}}return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value;}}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret);}return this.pushStack(jQuery.unique(ret),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name);}},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames);}jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid;}if(name&&!jQuery.cache[id]){jQuery.cache[id]={};}if(data!==undefined){jQuery.cache[id][name]=data;}return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break;}if(!name){jQuery.removeData(elem);}}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando);}}delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));}else{if(data){q.push(data);}}}return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0];}if(fn!==undefined){fn.call(elem);}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);}return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}if(data===undefined){return jQuery.queue(this[0],type);}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}if(!selector||typeof selector!=="string"){return results;}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}if(pop==null){pop=context;}Expr.relative[cur](checkSet,pop,isXML(context));}}if(!checkSet){checkSet=set;}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}}else{makeArray(checkSet,results);}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}if(!set){set=context.getElementsByTagName("*");}return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else{if(match===true){continue;}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else{if(pass){result.push(item);anyFound=true;}}}}}if(found!==undefined){if(!inplace){curLoop=result;}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}break;}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}old=expr;}return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else{if(inplace){curLoop[i]=false;}}}}return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}if(match[2]==="~="){match[4]=" "+match[4]+" ";}return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}return false;}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}}return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return !!elem.firstChild;},empty:function(elem){return !elem.firstChild;},has:function(elem,i,match){return !!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}return true;}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false;}}if(type=="first"){return true;}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false;}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true;}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}parent.sizcache=doneName;}var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}return ret;};}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}return ret;};}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}return ret;};}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}return ret;};}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}results=tmp;}return results;};}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return;}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;}Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}if(elem.nodeName===cur){match=elem;break;}elem=elem[dir];}checkSet[i]=match;}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}}elem=elem[dir];}checkSet[i]=match;}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur);}cur=cur[dir];}return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break;}}return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n);}}return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return;}if(elem.setInterval&&elem!=window){elem=window;}if(!handler.guid){handler.guid=this.guid++;}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces);}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false);}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle);}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return;}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""));}}else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid];}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle];}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces);}for(ret in events[type]){break;}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false);}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}}}ret=null;delete events[type];}}});}for(ret in events){break;}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null;}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true);}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}if(event.isImmediatePropagationStopped()){break;}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event;}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}if(!event.target){event.target=event.srcElement||document;}if(event.target.nodeType==3){event.target=event.target.parentNode;}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++;}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler);}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);}if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}function returnTrue(){return true;}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.preventDefault){e.preventDefault();}e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.stopPropagation){e.stopPropagation();}e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode;}catch(e){parent=this;}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++]);}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else{jQuery.readyList.push(fn);}return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn});}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false);}});return stop;}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound){return;}readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return;}try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}}}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem);}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none";});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url);}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else{if(typeof params==="object"){params=jQuery.param(params);type="POST";}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);}if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data);}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}}s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head){head.removeChild(script);}};}if(s.dataType=="script"&&s.cache==null){s.cache=false;}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType);}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}xhr.abort();return false;}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s]);}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes;}if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status);}complete();if(isTimeout){xhr.abort();}if(s.async){xhr=null;}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);}}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async){onreadystatechange();}function success(){if(s.success){s.success(data,status);}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s]);}}function complete(){if(s.complete){s.complete(xhr,status);}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s]);}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e);}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror";}if(s&&s.dataFilter){data=s.dataFilter(data,type);}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data);}if(type=="json"){data=window["eval"]("("+data+")");}}return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this);});}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j]);}}}return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block";}elem.remove();elemdisplay[tagName]=display;}jQuery.data(this[i],"olddisplay",display);}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this);}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null){this.style.overflow="hidden";}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop);}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start;}e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true);}timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}if(!timers.length){clearInterval(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){jQuery(this.elem).hide();}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p]);}}this.options.complete.call(this.elem);}return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(document.documentElement["getBoundingClientRect"]){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0]);}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0]);}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;}prevComputedStyle=computedStyle;}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft;}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);}return{top:top,left:left};};}jQuery.offset={initialize:function(){if(this.initialized){return;}var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop];}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0;}return{top:top,left:left};}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return jQuery(offsetParent);}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null;}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery-ui-1.7.1.custom.js */
jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.1",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;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false;}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){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($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative";}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit();},destroy:function(){if(!this.element.data("draggable")){return;}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false;}this.handle=this._getHandle(event);if(!this.handle){return false;}return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this;}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt);}if(o.containment){this._setContainment();}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position;}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px";}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px";}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event);}if(this.dropped){dropped=this.dropped;this.dropped=false;}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear();});}else{this._trigger("stop",event);this._clear();}return false;},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true;}});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo));}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute");}return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left;}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top;}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0};}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode;}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return;}var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}else{if(o.containment.constructor==Array){this.containment=o.containment;}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left;}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top;}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left;}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top;}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove();}this.helper=null;this.cancelHelperRemoval=false;},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute");}return $.widget.prototype._trigger.call(this,type,event,ui);},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs};}}));$.extend($.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable);}});},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true;}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"});}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable);}});},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth);};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst;}if(this.instance.currentItem){this.instance._mouseDrag(event);}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove();}inst._trigger("fromSortable",event);inst.dropped=false;}}});}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor");}t.css("cursor",o.cursor);},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor);}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity");}t.css("opacity",o.opacity);},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity);}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset();}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed;}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed;}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event);}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});}});},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}inst.snapElements[i].snapping=false;continue;}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top;}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top;}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left;}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left;}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top;}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top;}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left;}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left;}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}inst.snapElements[i].snapping=(ts||bs||ls||rs||first);}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min);});$(group).each(function(i){this.style.zIndex=o.stack.min+i;});this[0].style.zIndex=o.stack.min+group.length;}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex");}t.css("zIndex",o.zIndex);},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex);}}});})(jQuery);(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit();},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData("sortable-item");}},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false;}if(this.options.disabled||this.options.type=="static"){return false;}this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,"sortable-item")==self){currentItem=$(this);return false;}});if($.data(event.target,"sortable-item")==self){currentItem=$(event.target);}if(!currentItem){return false;}if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target){validHandle=true;}});if(!validHandle){return false;}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt);}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide();}this._createPlaceholder();if(o.containment){this._setContainment();}if(o.cursor){if($("body").css("cursor")){this._storedCursor=$("body").css("cursor");}$("body").css("cursor",o.cursor);}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity");}this.helper.css("opacity",o.opacity);}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex");}this.helper.css("zIndex",o.zIndex);}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset();}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions();}if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this));}}if($.ui.ddmanager){$.ui.ddmanager.current=this;}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;}else{if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;}else{if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed;}}}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}}if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px";}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px";}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection){continue;}if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=="semi-dynamic"?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;}this._trigger("change",event,this._uiHash());break;}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event){return;}if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event);}if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event);});}else{this._clear(event,noPropagation);}return false;},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0;}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0]);}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove();}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}return true;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]));}});return str.join("&");},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"");});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement;}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement){return false;}return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1));},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf));}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this.refreshPositions();},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst]);}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this);});}return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0]){this.items.splice(i,1);}}}},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}}}}for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data("sortable-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0});}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0]){continue;}var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();}var p=t.offset();item.left=p.left;item.top=p.top;}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();}}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className){el.style.visibility="hidden";}return el;},update:function(container,p){if(className&&!o.forcePlaceholderSize){return;}if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css("paddingTop")||0,10)-parseInt(self.currentItem.css("paddingBottom")||0,10));}if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css("paddingLeft")||0,10)-parseInt(self.currentItem.css("paddingRight")||0,10));}}};}self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder);},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?"left":"top"];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0])){continue;}var cur=this.items[j][this.containers[i].floating?"left":"top"];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty){continue;}this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);}this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1;}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}}},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);}if(helper[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};}if(helper[0].style.width==""||o.forceHelperSize){helper.width(this.currentItem.width());}if(helper[0].style.height==""||o.forceHelperSize){helper.height(this.currentItem.height());}return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left;}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top;}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0};}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode;}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];}if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left;}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top;}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left;}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top;}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter){self.refreshPositions(!hardRefresh);}},0);},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem);}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static"){this._storedCSS[i]="";}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside));});}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash());});}if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash());});}for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this));};}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this));};}).call(this,this.containers[i]));}}}for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this));};}).call(this,this.containers[i]));}if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this));};}).call(this,this.containers[i]));this.containers[i].containerCache.over=0;}}if(this._storedCursor){$("body").css("cursor",this._storedCursor);}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity);}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);}this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);}this._trigger("stop",event,this._uiHash());}return false;}if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove();}this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);}this._trigger("stop",event,this._uiHash());}this.fromOutside=false;return true;},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null};}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7.1",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}});})(jQuery);(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen;}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current;}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active");}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix");}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover");}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover");}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus");}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus");});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1");}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event);}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0");}else{this.active.attr("aria-expanded","true").attr("tabIndex","0");}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1");}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this);});}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","");}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value;}$.widget.prototype._setData.apply(this,arguments);},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return;}var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target);}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false;}return true;},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden");}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow);}this.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto");}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active);},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)");},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false;}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false;}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false;}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active");}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false;},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return;}return self._completed.apply(self,arguments);};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace};}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace};}if(!o.proxied){o.proxied=o.animated;}if(!o.proxiedDuration){o.proxiedDuration=o.duration;}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700});};}animations[easing](animOptions);}else{if(o.collapsible&&clickedIsActive){toShow.toggle();}else{toHide.hide();toShow.show();}complete(true);}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus();},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return;}if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""});}this._trigger("change",null,this.data);}});$.extend($.ui.accordion,{version:"1.7.1",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return;}var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"};});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start);}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit;},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","");}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700});}}});})(jQuery);(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()];}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]];}}else{this.range=$("<div></div>");}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range);}this.range.addClass("ui-widget-header");}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault();}).hover(function(){$(this).addClass("ui-state-hover");},function(){$(this).removeClass("ui-state-hover");}).focus(function(){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus");}).blur(function(){$(this).removeClass("ui-state-focus");});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i);});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return;}switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index);}break;}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index);}else{curVal=newVal=self.value();}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return;}newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return;}newVal=curVal-step;break;}self._slide(event,index,newVal);return ret;}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active");}});this._refreshValue();},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false;}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i;}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index]);}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true;},_mouseStart:function(event){return true;},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false;},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false;},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal";},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1;}if(percentMouse<0){percentMouse=0;}if("vertical"==this.orientation){percentMouse=1-percentMouse;}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step;}return parseFloat(normValue.toFixed(5));},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}this._trigger("start",event,uiHash);},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal)){newVal=otherVal;}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true);}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate));}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}this._trigger("stop",event,uiHash);},_change:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}this._trigger("change",event,uiHash);},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0);}return this._value();},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index);}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index);}else{return this.value();}}else{return this._values();}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break;}},_step:function(){var step=this.options.step;return step;},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin();}if(val>this._valueMax()){val=this._valueMax();}return val;},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin();}if(val>this._valueMax()){val=this._valueMax();}return val;}else{return this.options.values;}},_valueMin:function(){var valueMin=this.options.min;return valueMin;},_valueMax:function(){var valueMax=this.options.max;return valueMax;},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}}lastValPercent=valPercent;});}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate});}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7.1",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}});})(jQuery);(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable;}this._tabify(true);},_setData:function(key,value){if(key=="selected"){if(this.options.collapsible&&value==this.options.selected){return;}this.select(value);}else{this.options[key]=value;if(key=="deselectable"){this.options.collapsible=value;}this._tabify();}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+$.data(a);},_sanitizeSelector:function(hash){return hash.replace(/:/g,"\\:");},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)));},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)};},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var el=$(this);el.html(el.data("label.tabs")).removeData("label.tabs");});},_tabify:function(init){this.list=this.element.children("ul:first");this.lis=$("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return $("a",this)[0];});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr("href");var hrefBase=href.split("#")[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split("#")[0]||(baseEl=$("base")[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href;}if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href));}else{if(href!="#"){$.data(a,"href.tabs",href);$.data(a,"load.tabs",href.replace(/#.*$/,""));var id=self._tabId(a);a.href="#"+id;var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(self.panels[i-1]||self.list);$panel.data("destroy.tabs",true);}self.panels=self.panels.add($panel);}else{o.disabled.push(i);}}});if(init){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false;}});}if(typeof o.selected!="number"&&o.cookie){o.selected=parseInt(self._cookie(),10);}if(typeof o.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));}o.selected=o.selected||0;}else{if(o.selected===null){o.selected=-1;}}o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter(".ui-state-disabled"),function(n,i){return self.lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1);}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass("ui-tabs-hide");this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active");self.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[o.selected],self.panels[o.selected]));});this.load(o.selected);}$(window).bind("unload",function(){self.lis.add(self.anchors).unbind(".tabs");self.lis=self.anchors=self.panels=null;});}else{o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));}this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(o.cookie){this._cookie(o.selected,o.cookie);}for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");}if(o.cache===false){this.anchors.removeData("cache.tabs");}this.lis.add(this.anchors).unbind(".tabs");if(o.event!="mouseover"){var addState=function(state,el){if(el.is(":not(.ui-state-disabled)")){el.addClass("ui-state-"+state);}};var removeState=function(state,el){el.removeClass("ui-state-"+state);};this.lis.bind("mouseover.tabs",function(){addState("hover",$(this));});this.lis.bind("mouseout.tabs",function(){removeState("hover",$(this));});this.anchors.bind("focus.tabs",function(){addState("focus",$(this).closest("li"));});this.anchors.bind("blur.tabs",function(){removeState("focus",$(this).closest("li"));});}var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1];}else{hideFx=showFx=o.fx;}}function resetStyle($el,fx){$el.css({display:""});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute("filter");}}var showTab=showFx?function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.hide().removeClass("ui-tabs-hide").animate(showFx,showFx.duration||"normal",function(){resetStyle($show,showFx);self._trigger("show",null,self._ui(clicked,$show[0]));});}:function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.removeClass("ui-tabs-hide");self._trigger("show",null,self._ui(clicked,$show[0]));};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||"normal",function(){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");resetStyle($hide,hideFx);self.element.dequeue("tabs");});}:function(clicked,$hide,$show){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");self.element.dequeue("tabs");};this.anchors.bind(o.event+".tabs",function(){var el=this,$li=$(this).closest("li"),$hide=self.panels.filter(":not(.ui-tabs-hide)"),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass("ui-tabs-selected")&&!o.collapsible)||$li.hasClass("ui-state-disabled")||$li.hasClass("ui-state-processing")||self._trigger("select",null,self._ui(this,$show[0]))===false){this.blur();return false;}o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass("ui-tabs-selected")){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie);}self.element.queue("tabs",function(){hideTab(el,$hide);}).dequeue("tabs");this.blur();return false;}else{if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie);}self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));this.blur();return false;}}}if(o.cookie){self._cookie(o.selected,o.cookie);}if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide);});}self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));}else{throw"jQuery UI Tabs: Mismatching fragment identifier.";}if($.browser.msie){this.blur();}});this.anchors.bind("click.tabs",function(){return false;});},destroy:function(){var o=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var href=$.data(this,"href.tabs");if(href){this.href=href;}var $this=$(this).unbind(".tabs");$.each(["href","load","cache"],function(i,prefix){$this.removeData(prefix+".tabs");});});this.lis.unbind(".tabs").add(this.panels).each(function(){if($.data(this,"destroy.tabs")){$(this).remove();}else{$(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "));}});if(o.cookie){this._cookie(null,o.cookie);}},add:function(url,label,index){if(index===undefined){index=this.anchors.length;}var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf("#")?url.replace("#",""):this._tabId($("a",$li)[0]);$li.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).data("destroy.tabs",true);}$panel.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode);}else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index]);}o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n;});this._tabify();if(this.anchors.length==1){$li.addClass("ui-tabs-selected ui-state-active");$panel.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[0],self.panels[0]));});this.load(0);}this._trigger("add",null,this._ui(this.anchors[index],this.panels[index]));},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1));}o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n;});this._tabify();this._trigger("remove",null,this._ui($li.find("a")[0],$panel[0]));},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return;}this.lis.eq(index).removeClass("ui-state-disabled");o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this._trigger("enable",null,this._ui(this.anchors[index],this.panels[index]));},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass("ui-state-disabled");o.disabled.push(index);o.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[index],this.panels[index]));}},select:function(index){if(typeof index=="string"){index=this.anchors.index(this.anchors.filter("[href$="+index+"]"));}else{if(index===null){index=-1;}}if(index==-1&&this.options.collapsible){index=this.options.selected;}this.anchors.eq(index).trigger(this.options.event+".tabs");},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,"load.tabs");this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,"cache.tabs")){this.element.dequeue("tabs");return;}this.lis.eq(index).addClass("ui-state-processing");if(o.spinner){var span=$("span",a);span.data("label.tabs",span.html()).html(o.spinner);}this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,"cache.tabs",true);}self._trigger("load",null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s);}catch(e){}self.element.dequeue("tabs");}}));},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr;}this._cleanup();},url:function(index,url){this.anchors.eq(index).removeData("cache.tabs").data("load.tabs",url);},length:function(){return this.anchors.length;}});$.extend($.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0);},ms);if(e){e.stopPropagation();}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null);}}:function(e){t=o.selected;rotate();});if(ms){this.element.bind("tabsshow",rotate);this.anchors.bind(o.event+".tabs",stop);rotate();}else{clearTimeout(self.rotation);this.element.unbind("tabsshow",rotate);this.anchors.unbind(o.event+".tabs",stop);delete this._rotate;delete this._unrotate;}}});})(jQuery);jQuery.effects||(function($){$.effects={version:"1.7.1",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data("ec.storage."+set[i],element[0].style[set[i]]);}}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.css(set[i],element.data("ec.storage."+set[i]));}}},setMode:function(el,mode){if(mode=="toggle"){mode=el.is(":hidden")?"show":"hide";}return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height;}switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width;}return{x:x,y:y};},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent();}var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css("position")=="static"){wrapper.css({position:"relative"});element.css({position:"relative"});}else{var top=element.css("top");if(isNaN(parseInt(top,10))){top="auto";}var left=element.css("left");if(isNaN(parseInt(left,10))){left="auto";}wrapper.css({position:element.css("position"),top:top,left:left,zIndex:element.css("z-index")}).show();element.css({position:"relative",top:0,left:0});}wrapper.css(props);return wrapper;},removeWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent().replaceWith(element);}return element;},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1];}});return value;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||"";if(typeof oldStyleAttr=="object"){oldStyleAttr=oldStyleAttr["cssText"];}if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;}var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.addClass(value.add);}if(value.remove){that.removeClass(value.remove);}var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.removeClass(value.add);}if(value.remove){that.addClass(value.remove);}for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/)))){offset[n]=newStyle[n];}}that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=="object"){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else{$(this).attr("style",oldStyleAttr);}if(value.add){$(this).addClass(value.add);}if(value.remove){$(this).removeClass(value.remove);}if(cb){cb.apply(this,arguments);}});});}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m){o.mode=m;}var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback];}$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments);}else{return this.effect.apply(this,_normalizeArguments(arguments,"show"));}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments);}else{return this.effect.apply(this,_normalizeArguments(arguments,"hide"));}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments);}else{return this.effect.apply(this,_normalizeArguments(arguments,"toggle"));}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed);},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit];}});return val;}});$.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")";};});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color;}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)];}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];}if(result=/rgba\(0, 0, 0, 0\)/.exec(color)){return colors["transparent"];}return colors[$.trim(color).toLowerCase()];}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=""&&color!="transparent"||$.nodeName(elem,"body")){break;}attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);}var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}return -c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b;}return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}return -c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b;}return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b;}if(t==d){return b+c;}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b;}return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b;}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b;}if((t/=d)==1){return b+c;}if(!p){p=d*0.3;}if(a<Math.abs(c)){a=c;var s=p/4;}else{var s=p/(2*Math.PI)*Math.asin(c/a);}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b;}if((t/=d)==1){return b+c;}if(!p){p=d*0.3;}if(a<Math.abs(c)){a=c;var s=p/4;}else{var s=p/(2*Math.PI)*Math.asin(c/a);}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b;}if((t/=d/2)==2){return b+c;}if(!p){p=d*(0.3*1.5);}if(a<Math.abs(c)){a=c;var s=p/4;}else{var s=p/(2*Math.PI)*Math.asin(c/a);}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158;}return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158;}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158;}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b;}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b;}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return $.easing.easeInBounce(x,t*2,0,c,d)*0.5+b;}return $.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b;}});})(jQuery);(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="vertical")?"height":"width";var distance=(direction=="vertical")?wrapper.height():wrapper.width();if(mode=="show"){wrapper.css(ref,0);}var animation={};animation[ref]=mode=="show"?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=="hide"){el.hide();}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments);}el.dequeue();});});};})(jQuery);(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"up";var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode)){props.push("opacity");}$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance);}if(mode=="hide"){distance=distance/(times*2);}if(mode!="hide"){times--;}if(mode=="show"){var animation={opacity:1};animation[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--;}for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=="hide")?distance*2:distance/2;}if(mode=="hide"){var animation={opacity:0};animation[ref]=(motion=="pos"?"-=":"+=")+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments);}});}else{var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments);}});}el.queue("fx",function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=["backgroundImage","backgroundColor","opacity"];var mode=$.effects.setMode(el,o.options.mode||"show");var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:"none",backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide"){animation["opacity"]=0;}el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide();}$.effects.restore(el,props);if(mode=="show"&&$.browser.msie){this.style.removeAttribute("filter");}if(o.callback){o.callback.apply(this,arguments);}el.dequeue();}});});};})(jQuery);(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"show");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=="show"){el.css(ref,motion=="pos"?-distance:distance);}var animation={};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide();}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments);}el.dequeue();}});});};})(jQuery);(function($){$.effects.transfer=function(o){return this.queue(function(){var elem=$(this),target=$(o.options.to),endPosition=target.offset(),animation={top:endPosition.top,left:endPosition.left,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(o.options.className).css({top:startPosition.top,left:startPosition.left,height:elem.innerHeight(),width:elem.innerWidth(),position:"absolute"}).animate(animation,o.duration,o.options.easing,function(){transfer.remove();(o.callback&&o.callback.apply(elem[0],arguments));elem.dequeue();});});};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.metadata.js */
(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata";}var data=$.data(elem,settings.single);if(data){return data;}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1];}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return;}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML);}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr;}}}}if(data.indexOf("{")<0){data="{"+data+"}";}data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.ba-hashchange.js */
/*
 * jQuery hashchange event - v1.2 - 2/11/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,window,undefined){var fake_onhashchange,jq_event_special=$.event.special,str_location="location",str_hashchange="hashchange",str_href="href",browser=$.browser,mode=document.documentMode,is_old_ie=browser.msie&&(mode===undefined||mode<8),supports_onhashchange="on"+str_hashchange in window&&!is_old_ie;function get_fragment(url){url=url||window[str_location][str_href];return url.replace(/^[^#]*#?(.*)$/,"$1");}$[str_hashchange+"Delay"]=100;jq_event_special[str_hashchange]=$.extend(jq_event_special[str_hashchange],{setup:function(){if(supports_onhashchange){return false;}$(fake_onhashchange.start);},teardown:function(){if(supports_onhashchange){return false;}$(fake_onhashchange.stop);}});fake_onhashchange=(function(){var self={},timeout_id,iframe,set_history,get_history;function init(){set_history=get_history=function(val){return val;};if(is_old_ie){iframe=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;get_history=function(){return get_fragment(iframe.document[str_location][str_href]);};set_history=function(hash,history_hash){if(hash!==history_hash){var doc=iframe.document;doc.open().close();doc[str_location].hash="#"+hash;}};set_history(get_fragment());}}self.start=function(){if(timeout_id){return;}var last_hash=get_fragment();set_history||init();(function loopy(){var hash=get_fragment(),history_hash=get_history(last_hash);if(hash!==last_hash){set_history(last_hash=hash,history_hash);$(window).trigger(str_hashchange);}else{if(history_hash!==last_hash){window[str_location][str_href]=window[str_location][str_href].replace(/#.*/,"")+"#"+history_hash;}}timeout_id=setTimeout(loopy,$[str_hashchange+"Delay"]);})();};self.stop=function(){if(!iframe){timeout_id&&clearTimeout(timeout_id);timeout_id=0;}};return self;})();})(jQuery,this);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.tablesorter.min.js */
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:".",debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else{if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;}if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;}function getElementText(config,node){if(!node){return"";}var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date();}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);}function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;}$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true;}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;}function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;}return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;}return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}}function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$("<colgroup>");$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($("<col>").css("width",$(this).width()));});$(table).prepend(colgroup);}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;}function sortText(a,b){return((a<b)?-1:((a>b)?1:0));}function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));}function sortNumeric(a,b){return a-b;}function sortNumericDesc(a,b){return b-a;}function getCachedSortType(parsers,i){return parsers[i].type;}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return;}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false;};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);}};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL="\\"+config.decimal;var exp="/(^[+]?0("+DECIMAL+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+DECIMAL+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+DECIMAL+"0+$)/";return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild);}}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),""));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else{if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else{if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}}}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(":even").removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(":odd").removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.autocomplete.js */
(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function"){fn(result);}else{$input.trigger("result",result&&[result.data,result.value]);}}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data" in arguments[1]){cache.populate();}}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected){return false;}var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue){return;}previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase){currentValue=currentValue.toLowerCase();}request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}}function trimWords(value){if(!value){return[""];}var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value)){result[i]=$.trim(value);}});return result;}function lastWord(value){if(!options.multiple){return value;}var words=trimWords(value);return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}}function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);}function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");}}});}if(wasVisible){$.Autocompleter.Selection(input,input.value.length,input.value.length);}}function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}}function request(term,success,failure){if(!options.matchCase){term=term.toLowerCase();}var data=cache.load(term);if(data&&data.length){success(term,data);}else{if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,type:options.requestType,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}}}function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;}function stopLoading(){$input.removeClass(options.loadingClass);}};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180,requestType:"get"};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase){s=s.toLowerCase();}var i=s.indexOf(sub);if(i==-1){return false;}return i==0||options.matchContains;}function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data){return false;}var stMatchSets={},nullData=0;if(!options.url){options.cacheLength=1;}stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false){continue;}var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar]){stMatchSets[firstChar]=[];}var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}}$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length){return null;}if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else{if(data[q]){return data[q];}else{if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit){return;}element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=="LI"){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0){element.css("width",options.width);}needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI"){element=element.parentNode;}if(!element){return[];}return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else{if(offset<list.scrollTop()){list.scrollTop(offset);}}}}function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else{if(active>=listItems.size()){active=0;}}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i]){continue;}var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false){continue;}if(data[i].data.Label&&true){$("<div />").html(data[i].data.AutocompleteValue).addClass("label").appendTo(list)[0];}else{var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe){list.bgiframe();}}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:"auto"});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css("height",scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else{if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}}field.focus();};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.oneslides.js */

/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.cookie.js */
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1;}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires="; expires="+date.toUTCString();}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("");}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.center.js */
jQuery.fn.center=function(){return this.each(function(){var t=jQuery(this);var leftPos=(jQuery(window).width()-jQuery(this).outerWidth())/2+jQuery(window).scrollLeft(),topPos=(jQuery(window).height()-jQuery(this).outerHeight())/2+jQuery(window).scrollTop();leftPos=(leftPos<0)?0:leftPos;topPos=(topPos<0)?0:topPos;jQuery(this).css({left:leftPos+"px",top:topPos+"px",zIndex:"1000"});});};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.json.js */
(function($){function toIntegersAtLease(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(date){return this.getUTCFullYear()+"-"+toIntegersAtLease(this.getUTCMonth())+"-"+toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};$.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c;}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}return'"'+string+'"';};$.toJSON=function(o,compact){var type=typeof(o);if(type=="undefined"){return"undefined";}else{if(type=="number"||type=="boolean"){return o+"";}else{if(o===null){return"null";}}}if(type=="string"){return $.quoteString(o);}if(type=="object"&&typeof o.toJSON=="function"){return o.toJSON(compact);}if(type!="function"&&typeof(o.length)=="number"){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));}if(compact){return"["+ret.join(",")+"]";}else{return"["+ret.join(", ")+"]";}}if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number"){name='"'+k+'"';}else{if(type=="string"){name=$.quoteString(k);}else{continue;}}var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}if(compact){ret.push(name+":"+val);}else{ret.push(name+": "+val);}}return"{"+ret.join(", ")+"}";};$.compactJSON=function(o){return $.toJSON(o,true);};$.evalJSON=function(src){return eval("("+src+")");};$.secureEvalJSON=function(src){var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,"@");filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+src+")");}else{throw new SyntaxError("Error parsing JSON, source is not valid.");}};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.hint.js */
(function($){$.fn.hint=function(blurClass){if(!blurClass){blurClass="blur";}return this.each(function(){var $input=$(this),title=$input.attr("title"),$form=$(this.form),$win=$(window);function remove(){if($input.val()===title&&$input.hasClass(blurClass)){$input.val("").removeClass(blurClass);}}if(title){$input.blur(function(){if(this.value===""){$input.val(title).addClass(blurClass);}}).focus(remove).blur();$form.submit(remove);$win.unload(remove);}});};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.history.js */

/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.blockUI.js */
(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+$.fn.jquery);return;}$.fn._fadeIn=$.fn.fadeIn;var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title){$m.append("<h1>"+title+"</h1>");}if(message){$m.append("<h2>"+message+"</h2>");}if(timeout==undefined){timeout=3000;}$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,"position")=="static"){this.style.position="relative";}if($.browser.msie){this.style.zoom=1;}install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.23;$.blockUI.defaults={message:"<h1>Please wait...</h1>",css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"default"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"default"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock){remove(window,{fadeOut:0});}if(msg&&typeof msg!="string"&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data("blockUI.history",data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent){data.parent.removeChild(node);}}var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3=full?$('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>'):$('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');if(msg){lyr3.css(css);}if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform))){lyr2.css(opts.overlayCSS);}lyr2.css("position",full?"fixed":"absolute");if($.browser.msie||opts.forceIframe){lyr1.css("opacity",0);}$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full?"body":el);var expr=setExpr&&(!$.boxModel||$("object,embed",full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel){$("html,body").css("height","100%");}if((ie6||!$.boxModel)&&!full){var t=sz(el,"borderTopWidth"),l=sz(el,"borderLeftWidth");var fixT=t?"(0 - "+t+")":0;var fixL=l?"(0 - "+l+")":0;}$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position="absolute";if(i<2){full?s.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression("height",'this.parentNode.offsetHeight + "px"');full?s.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression("width",'this.parentNode.offsetWidth + "px"');if(fixL){s.setExpression("left",fixL);}if(fixT){s.setExpression("top",fixT);}}else{if(opts.centerY){if(full){s.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');}s.marginTop=0;}else{if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+top+') + "px"';s.setExpression("top",expression);}}}});}if(msg){lyr3.append(msg);if(msg.jquery||msg.nodeType){$(msg).show();}}if(($.browser.msie||opts.forceIframe)&&opts.showOverlay){lyr1.show();}if(opts.fadeIn){if(opts.showOverlay){lyr2._fadeIn(opts.fadeIn);}if(msg){lyr3.fadeIn(opts.fadeIn);}}else{if(opts.showOverlay){lyr2.show();}if(msg){lyr3.show();}}if(full){pageBlock=lyr3[0];pageBlockEls=$(":input:enabled:visible",pageBlock);if(opts.focusInput){setTimeout(focus,20);}}else{center(lyr3[0],opts.centerX,opts.centerY);}if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data("blockUI.timeout",to);}}function remove(el,opts){var full=el==window;var $el=$(el);var data=$el.data("blockUI.history");var to=$el.data("blockUI.timeout");if(to){clearTimeout(to);$el.removeData("blockUI.timeout");}opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els=full?$("body").children().filter(".blockUI"):$(".blockUI",el);if(full){pageBlock=pageBlockEls=null;}if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}else{reset(els,data,opts,el);}}function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode){this.parentNode.removeChild(this);}});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent){data.parent.appendChild(data.el);}$(data.el).removeData("blockUI.history");}if(typeof opts.onUnblock=="function"){opts.onUnblock(el,opts);}}function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data("blockUI.isBlocked"))){return;}if(!full){$el.data("blockUI.isBlocked",b);}if(!opts.bindEvents||(b&&!opts.showOverlay)){return;}var events="mousedown mouseup keydown keypress";b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);}function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back);},10);return false;}}}if($(e.target).parents("div.blockMsg").length>0){return true;}return $(e.target).parents().children().filter("div.blockUI").length==0;}function focus(back){if(!pageBlockEls){return;}var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e){e.focus();}}function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,"borderLeftWidth");var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,"borderTopWidth");if(x){s.left=l>0?(l+"px"):"0";}if(y){s.top=t>0?(t+"px"):"0";}}function sz(el,p){return parseInt($.css(el,p))||0;}})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.bgiframe.js */
/* Copyright (c) 2008 Brandon Aaron (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 2.1.2-pre
 */
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if("\v"=="v"&&/6.0/.test(navigator.userAgent)){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild);}});}return this;};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.tooltip.js */
(function($){var helper={},current,title,tID,IE="\v"=="v"&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({"backgroundImage":"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative");}});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({"filter":"",backgroundImage:""});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr("href")||this.attr("src");}});function createHelper(settings){if(helper.parent){return;}helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe();}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay);}else{show();}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return;}current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent);}else{helper.body.html(bodyContent);}helper.body.show();}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0){helper.body.append("<br/>");}helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show();}else{helper.url.hide();}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG();}handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated")){helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);}else{helper.parent.is(":visible")?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked){return;}if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update);}if(current==null){$(document.body).unbind("mousemove",update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right="auto";if(settings(current).positionLeft){right=$(window).width()-left;left="auto";}if(settings(current).positionBottom){top=top-helper.parent.height();}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked){return;}if(tID){clearTimeout(tID);}current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(":animated")){helper.parent.stop().fadeTo(tsettings.fade,0,complete);}else{helper.parent.stop().fadeOut(tsettings.fade,complete);}}else{complete();}if(settings(this).fixPNG){helper.parent.unfixPNG();}}})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.onegallery.js */
(function($){function log(){if(window.console&&window.console.log){window.console.log("[oneGallery] "+Array.prototype.join.call(arguments,""));}}$.fn.oneGallery=function(options){var $cont=$(this);var opts=$.extend({},$.fn.oneGallery.defaults,options);var $clone,imgW,imgNum,src,href,title,thumbWidth,controls={},currentSlide=0,carouselOffset=0,carouselW=4,slideshow=false,slideshowFirst=0,tSlideshow,tBounce;var openSlide=function(){var $el=controls.thumbs.eq(currentSlide);var $a=$el.parent("a");var $li=$a.parent("li");$li.addClass(opts.selectedThumbClass).siblings().removeClass(opts.selectedThumbClass);clearTimeout(tBounce);clearInterval(tBounce);tBounce=setTimeout(function(){tBounce=setInterval(function(){$li.effect("bounce",{distance:10,times:1,duration:600});},800);},800);src=$a.attr("href");href=$el.attr("longdesc");title=$el.attr("alt");var img=new Image();img=$(img);img.load(function(){clearTimeout(tBounce);clearInterval(tBounce);var oldimg=$(".img-wrapper img",$clone);oldimg.animate({opacity:0},{duration:opts.slideTransDur,queue:false,complete:function(){$(this).remove();updateControls();}});$("<img />").attr({"src":src,"width":oldimg.attr("width"),"height":oldimg.attr("height")}).css({opacity:0}).prependTo($(".img-wrapper",$clone)).animate({opacity:1},{duration:opts.slideTransDur});$("p.title",$clone).find("span").html(title).end().find("a").each(function(){if(href==""){$(this).hide();}else{$(this).show().attr("href",href);}});if(slideshow){tSlideshow=setTimeout(advanceSlideshow,opts.slideshowDelay);}}).attr("src",src);if(currentSlide<carouselOffset||currentSlide+1>carouselOffset+carouselW){carouselOffset=currentSlide;updateCarousel();}log("current slide:"+currentSlide);};var updateControls=function(){if(currentSlide+1<imgNum){controls.nextSlideBtn.removeClass(opts.btnDisabledClass);}else{controls.nextSlideBtn.addClass(opts.btnDisabledClass);}if(currentSlide>0){controls.prevSlideBtn.removeClass(opts.btnDisabledClass);}else{controls.prevSlideBtn.addClass(opts.btnDisabledClass);}if(carouselOffset+carouselW<imgNum){controls.nextSetBtn.removeClass(opts.btnDisabledClass);}else{controls.nextSetBtn.addClass(opts.btnDisabledClass);}if(carouselOffset>0){controls.prevSetBtn.removeClass(opts.btnDisabledClass);}else{controls.prevSetBtn.addClass(opts.btnDisabledClass);}};var updateCarousel=function(){if(carouselOffset+carouselW>=imgNum){carouselOffset=imgNum-carouselW;}if(carouselOffset<1){carouselOffset=0;}var left=0-carouselOffset*thumbWidth;$("ul",$clone).stop().animate({left:left+"px"},{duration:opts.carSlideDur,easing:opts.easing});updateControls();};var nextSet=function(){carouselOffset+=carouselW;updateCarousel();};var prevSet=function(){carouselOffset-=carouselW;updateCarousel();};var nextSlide=function(){currentSlide=currentSlide+1<imgNum?currentSlide+1:currentSlide;stopSlideshow();openSlide(currentSlide);};var prevSlide=function(){currentSlide=currentSlide-1<1?0:currentSlide-1;stopSlideshow();openSlide(currentSlide);};var toggleSlideshow=function(){if(slideshow){stopSlideshow();}else{startSlideshow();}};var startSlideshow=function(){slideshowFirst=currentSlide;controls.playBtn.addClass("slideshow-pause");tSlideshow=setTimeout(advanceSlideshow,opts.slideshowDelay-opts.slideTransDur);slideshow=true;};var stopSlideshow=function(){controls.playBtn.removeClass("slideshow-pause");clearTimeout(tSlideshow);slideshow=false;};var advanceSlideshow=function(){currentSlide=currentSlide+1<imgNum?currentSlide+1:0;carouselOffset=currentSlide-Math.floor(carouselW/2);updateCarousel();openSlide(currentSlide);if(slideshowFirst==currentSlide){stopSlideshow();}};function enable_keyboard(){$(document).keydown(function(e){keyboard_action(e);});}function disable_keyboard(){$(document).unbind("keydown");}function keyboard_action(e){escapeKey=27;if(e==null){keycode=event.keyCode;}else{keycode=e.keyCode;}key=String.fromCharCode(keycode).toLowerCase();log(e.DOM_VK_ESCAPE);if((key==opts.keyToClose)||(key=="x")||(keycode==escapeKey)){close();}if((key==opts.keyToPrev)||(keycode==37)){prevSlide();}if((key==opts.keyToNext)||(keycode==39)){nextSlide();}if(key==opts.toggleSlideshow){toggleSlideshow();}}var create=function(i){currentSlide=i;$clone=$cont.clone().prependTo("body").removeClass("image-gallery").addClass("image-gallery-popup").css({opacity:0}).center();$("li a:eq("+i+")",$cont).effect("transfer",{to:".image-gallery-popup div.img-wrapper img"},250);setTimeout(function(){$clone.animate({opacity:1},{duration:800,complete:function(){$clone.css({filter:"none"});}});$.blockUI({message:null,baseZ:90,fadeIn:400,fadeOut:800,css:{cursor:"default"},overlayCSS:{opacity:"0.40"}});},200);controls.nextSlideBtn=$("."+opts.nextSlideBtnClass,$clone);controls.prevSlideBtn=$("."+opts.prevSlideBtnClass,$clone);controls.nextSetBtn=$("."+opts.nextSetBtnClass,$clone);controls.prevSetBtn=$("."+opts.prevSetBtnClass,$clone);controls.thumbs=$("ul img",$clone);controls.playBtn=$(".slideshow-control",$clone);$(".image-gallery-popup").bind("click",function(e){var $el=$(e.target);if($el.hasClass("real-link")){return;}e.preventDefault();if($el.hasClass(opts.btnDisabledClass)||$el.parent().hasClass(opts.btnDisabledClass)){return;}else{if($el.hasClass(opts.nextSetBtnClass)){nextSet();}else{if($el.hasClass(opts.prevSetBtnClass)){prevSet();}else{if($el.parent().hasClass(opts.nextSlideBtnClass)){nextSlide();}else{if($el.parent().hasClass(opts.prevSlideBtnClass)){prevSlide();}else{if($el.hasClass("slideshow-control")){toggleSlideshow();}else{if($el.hasClass("close")){close();}else{if(controls.thumbs.index($el)!=-1){currentSlide=controls.thumbs.index($el);stopSlideshow();openSlide();}}}}}}}}});imgNum=controls.thumbs.length;thumbWidth=$(controls.thumbs[0]).parents("li").outerWidth();openSlide();enable_keyboard();updateControls();};var close=function(){disable_keyboard();stopSlideshow();$clone.animate({opacity:0},{duration:1000,complete:function(){$clone.remove();}});$.unblockUI();};var init=function(){$("li a",$cont).bind("click",function(e){e.preventDefault();$el=$(this);var i=$("li a",$cont).index($el);create(i);});log("inited");};return init();};$.fn.oneGallery.defaults={pagerSelector:"ul",pagerBtnClass:"pager",nextSlideBtnClass:"arrow-right",prevSlideBtnClass:"arrow-left",nextSetBtnClass:"carousel-right",prevSetBtnClass:"carousel-left",btnDisabledClass:"disabled",imgContainerSelector:"",selectedThumbClass:"selected",currentImgClass:"current",carSlideDur:850,slideTransDur:700,slideshowDelay:3000,easing:"swing",keyToClose:"c",keyToPrev:"k",keyToNext:"l",toggleSlideshow:"p"};})(jQuery);$(window).load(function(){$(".image-gallery").oneGallery();});
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.getUrlParam.js */
jQuery.fn.extend({getUrlParam:function(strParamName){strParamName=escape(unescape(strParamName));var returnVal=new Array();var qString=null;if($(this).attr("nodeName")=="#document"){if(window.location.search.search(strParamName)>-1){qString=window.location.search.substr(1,window.location.search.length).split("&");}}else{if($(this).attr("src")!="undefined"){var strHref=$(this).attr("src");if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else{if($(this).attr("href")!="undefined"){var strHref=$(this).attr("href");if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else{return null;}}}if(qString==null){return null;}for(var i=0;i<qString.length;i++){if(escape(unescape(qString[i].split("=")[0]))==strParamName){returnVal.push(qString[i].split("=")[1]);}}if(returnVal.length==0){return null;}else{if(returnVal.length==1){return returnVal[0];}else{return returnVal;}}}});
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/swfobject.js */
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0;}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7");}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always";}catch(t){if(AC[0]==6){AB=true;}}if(!AB){try{y=new ActiveXObject(p);}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)];}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w};}();var L=function(){if(!h.w3cdom){return;}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:></script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S);}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E();}},10);}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null);}R(E);}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E();}}function E(){if(e){return;}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u);}catch(w){return;}}e=true;if(Z){clearInterval(Z);Z=null;}var q=o.length;for(var r=0;r<q;r++){o[r]();}}function f(q){if(e){q();}else{o[o.length]=q;}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false);}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false);}else{if(typeof j.attachEvent!=b){I(j,"onload",r);}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r();};}else{j.onload=r;}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r);}W(u,true);}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q]);}else{O(r);}}}}else{W(u,true);}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue);}else{w.setAttribute(y[u].nodeName,y[u].nodeValue);}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"));}}}t.parentNode.replaceChild(w,t);}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId;}}else{M=G(u);}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310";}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137";}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u);};I(j,"onload",v);}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x);}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t);};I(j,"onload",q);}else{t.parentNode.replaceChild(G(t),t);}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML;}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true));}}}}}return u;}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t;}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB];}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"';}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"';}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />';}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id);}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z]);}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z]);}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z]);}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y]);}}}v.parentNode.replaceChild(AC,v);q=AC;}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x]);}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x]);}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w]);}}v.parentNode.replaceChild(u,v);q=u;}}}return q;}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u);}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r);}else{j.attachEvent("onload",function(){B(r);});}}else{q.parentNode.removeChild(q);}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null;}}r.parentNode.removeChild(r);}}function C(t){var q=null;try{q=K.getElementById(t);}catch(r){}return q;}function a(q){return K.createElement(q);}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r];}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false;}function V(v,r){if(h.ie&&h.mac){return;}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"));}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r);}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r;}else{V("#"+t,"visibility:"+r);}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s;}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2]);}var t=i.length;for(var u=0;u<t;u++){X(i[u]);}for(var r in h){h[r]=null;}h=null;for(var q in swfobject){swfobject[q]=null;}swfobject=null;});}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return;}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false);},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t;}else{if(typeof u.SetVariable!=b){q=u;}}}}return q;},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return;}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v];}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u];}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t];}else{y.flashvars=t+"="+r[t];}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true);}});}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF);});}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]};},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q);}else{return undefined;}},removeSWF:function(q){if(h.w3cdom){X(q);}},createCSS:function(r,q){if(h.w3cdom){V(r,q);}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u);}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)));}}}return"";},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block";}}M=null;l=null;A=false;}}}};}();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/disablescroll.js */
function hookMouseWheel(){if(window.addEventListener){window.addEventListener("DOMMouseScroll",onMouseWheel,false);}window.onmousewheel=document.onmousewheel=onMouseWheel;}function isOverSwf(mEvent){var elem;if(mEvent.srcElement){elem=mEvent.srcElement.nodeName;}else{if(mEvent.target){elem=mEvent.target.nodeName;}}if(elem.toLowerCase()=="object"||elem.toLowerCase()=="embed"){return true;}return false;}function onMouseWheel(event){var delta=0;if(!event){event=window.event;}if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta;}}else{if(event.detail){delta=-event.detail/3;}}if(isOverSwf(event)){return cancelEvent(event);}return true;}function cancelEvent(e){e=e?e:window.event;if(e.stopPropagation){e.stopPropagation();}if(e.preventDefault){e.preventDefault();}e.cancelBubble=true;e.cancel=true;e.returnValue=false;return false;}hookMouseWheel();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/valtech.namespace.js */
window.Valtech=window.Valtech||{};Valtech.Namespace={create:function(name){var chunks=name.split(".");var node=window;for(var i=0;i<chunks.length;i++){node=node[chunks[i]]=node[chunks[i]]||{};}return node;}};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.js */
var Kuoni=Kuoni||{};(function(){jQuery.extend(Kuoni,{personalized:false,cmpId:null,productType:null,init:function(){this.personalized=($("#kuoni-personalized").val()||"").toLowerCase()=="true";this.cmpId=$("#cmp-id").val()||null;this.productType=$("#product-type").val()||null;}});})();$(document).ready(function(){Kuoni.init();});
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.user.js */
var Kuoni=Kuoni||{};Kuoni.User={init:function(){try{this.id=window.userContext.UserContext.UserID||"";this.authenticated=(window.userContext.UserContext.IsUserLoggedIn||"").toLowerCase()=="true";this.language=window.userContext.UserContext.Language||"";}catch(e){console.error("userContext object not available!");}}};$(document).ready(function(){Kuoni.User.init();});
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.js */
var Kuoni=Kuoni||{};Kuoni.Style=Kuoni.Style||{};(function(){jQuery.extend(Kuoni.Style,{init:function(){this.makeConsole();this.switchColor();this.initPlugins();this.linkHandler();this.spotHandler();this.smoothScroll();this.printPage();this.bookingFormUK();},makeConsole:function(){if(typeof console!="object"){window.console={log:function(){}};}},switchColor:function(hexcolor){var colorElements=$("#head .head-background, #content .newsletter-btn");var duration=10;hexcolor=hexcolor||colorElements.css("backgroundColor").replace("#","");if($("body.frontpage").length>0){$.cookie("themeColor",hexcolor,{expires:7,path:"/"});var duration=400;}else{if($.cookie("themeColor")){hexcolor=$.cookie("themeColor");}}colorElements.animate({backgroundColor:"#"+hexcolor},{duration:duration});},initPlugins:function(){var elms=null;if(elms=$("#site-search .search-field")){elms.attr({title:elms.attr("value"),value:""});elms.hint();}$("#content .kuoni-tooltip").tooltip({positionBottom:true,top:20,left:5,track:true,fade:("\v"=="v")?false:200,fixPNG:true,bodyHandler:function(){var content=$(this).find(".kuoni-tooltip-content").html();content=$('<div class="tooltip-top"/><div class="tooltip-content"><p>'+content+'</p></div><div class="tooltip-bottom"/>');return content;}});},linkHandler:function(){$("a[rel~='external']").click(function(){window.open($(this).attr("href"));return false;});},spotHandler:function(){},smoothScroll:function(){function filterPath(string){return string.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"");}$("a[href*=#].smooth-scroll:not([href=#])").click(function(){if(filterPath(location.pathname)==filterPath(this.pathname)&&location.hostname==this.hostname){var target=$(this.hash);target=target.length&&target||$("[name="+this.hash.slice(1)+"]");if(target.length){var targetOffset=target.offset().top-20;$("html,body").animate({scrollTop:targetOffset},1000);return false;}}});},printPage:function(){var elm=null;if((elm=$("#page-tools .print-page")).length>0){if(!window.print){return;}elm.attr("href","javascript:void(0);");elm.click(function(){window.print();return false;});}},bookingFormUK:function(){$("#roomHolder > div").hide();$(".multipleLabel").hide();$("#room1").show();$("#selectNumberOfRooms").change(function(){$("#room"+this.value).show().siblings().hide().end().prevAll().show().end().nextAll().find(":input").val("");roomMatrix(parseInt($(this).val()));});$('select[name^="children"]').change(function(){if(this.value==0){$(this).parents("fieldset").nextAll('div[id^="ageOfChildren"]').hide();}else{$(this).parents("fieldset").nextAll('div[id^="ageOfChildren"]').show().find("label").hide().eq(this.value-1).show().prevAll().show().end().nextAll().find(":input").val("");}});$('div[id^="ageOfChildren"]').hide();$('select[name^="infants"]').change(function(){if(this.value==0){$(this).parents("fieldset").nextAll('div[id^="ageOfInfants"]').hide();}else{$(this).parents("fieldset").nextAll('div[id^="ageOfInfants"]').show().find("label").hide().eq(this.value-1).show().prevAll().show().end().nextAll().find(":input").val("");}});$('div[id^="ageOfInfants"]').hide();function roomMatrix(numOfRooms){var matrix=[[7,4,2],[5,4,2],[3,4,2],[2,2,2]];for(var i=0;i<(numOfRooms||1);i++){$("#room"+(i+1)+" > fieldset > label > select").each(function(val,el){var oldVal=$(el).val();var sel=$(el).html("");for(var z=0;z<=matrix[i][val];z++){if(i=="0"&&val=="0"&&z=="0"){continue;}else{if(z=="2"&&i=="0"&&val=="0"&&typeof(numOfRooms)=="undefined"){var opt=$("<option>").val(z).text(z);sel.append(opt);oldVal=2;}else{var opt=$("<option>").val(z).text(z);sel.append(opt);}}}$(el).val(oldVal);});}}roomMatrix();}});})();String.prototype.interpolate=function(params){var str=this;for(var key in params){str=str.replace(new RegExp("\\{"+key+"\\}","g"),params[key]);}return str;};String.prototype.template=function(o){return this.replace(/{([^{}]*)}/g,function(a,b){var r=o[b];return typeof r==="string"||typeof r==="number"?r:a;});};String.prototype.fixurl=function(){return"/"+Kuoni.User.language+this+(window.location.host=="localhost:81"?".xml":"");};$(document).ready(function(){Kuoni.Style.init();});$(window).load(function(){$("#fp-booking, #tab-container").bind("tabsselect",function(event,ui){var tabID=ui.panel.id;var tabIndex=ui.index;var pageUrl=document.location.pathname;var pageTrackerData="/CE"+pageUrl+"/"+tabID;pageTrackerData=pageTrackerData.replace(/#/,"-");$.cookie("tabIndex",tabIndex);try{pageTracker._trackPageview(pageTrackerData);}catch(err){}});$(document).bind("layer:activate",function(e){var pageTrackerData="/CE"+document.location.pathname+document.location.search+"/"+document.location.hash;pageTrackerData=pageTrackerData.replace(/#/,"-");try{pageTracker._trackPageview(pageTrackerData);}catch(err){}});});function tryVal(name,cont){cont=cont||document;var obj=$("*[name='"+name+"']",cont);var tempVal="";try{tempVal=obj.val().toString();}catch(e){}return tempVal;}function GetVacationLink(url,language,el,tealeafCookieValue){var cont=el?el.parent():document;var parameters={"0":language.toString(),"1":tryVal("selectAirport",cont),"2":tryVal("selectDestination",cont),"3":tryVal("day",cont),"4":tryVal("month",cont),"5":tryVal("year",cont),"6":tryVal("tolerance",cont),"7":tryVal("duration",cont)};parameters=url.interpolate(parameters);parameters=AppendTealeafCookie(parameters,tealeafCookieValue);return parameters.replace(/&amp\;/g,"&");}function GetVacationLinkCountryUK(url,code,el,tealeafCookieValue){var cont=el?el.parent():document;var destinationsVal=tryVal("selectDestination",cont);var cntrsd=((destinationsVal==null||destinationsVal=="")?code:destinationsVal);var parameters={"0":cntrsd,"1":tryVal("selectAirport",cont),"2":tryVal("selectDuration",cont),"3":getDateStop(),"4":tryVal("departure-date",cont).replace(/\//g,"%2F"),"5":tryVal("selectNumberOfRooms",cont),"6":tryVal("adults1",cont),"7":tryVal("children1",cont),"8":tryVal("infants1",cont),"9":tryVal("adults2",cont),"10":tryVal("children2",cont),"11":tryVal("infants2",cont),"12":tryVal("adults3",cont),"13":tryVal("children3",cont),"14":tryVal("infants3",cont),"15":tryVal("adults4",cont),"16":tryVal("children4",cont),"17":tryVal("infants4",cont),"18":tryVal("selectHotelGrade",cont),"19":tryVal("selectAirClass",cont),"20":$("input[name='centerType']",cont).is(":checked")?"M":"S"};var params=CreateChilAndInfantAgeParams();parameters=url.interpolate(parameters);if(params!=""||params!="undefined"){parameters+="&"+params;}parameters=AppendTealeafCookie(parameters,tealeafCookieValue);if(validateBookingForm(cont)){document.location=parameters.replace(/&amp\;/g,"&");}}function GetVacationLinkAccommodationUK(url,destination,el,tealeafCookieValue){var cont=el?el.parent():document;var parameters={"0":destination,"1":tryVal("selectAirport",cont),"2":tryVal("selectDuration",cont),"3":getDateStop(),"4":tryVal("departure-date",cont).replace(/\//g,"%2F"),"5":tryVal("selectNumberOfRooms",cont),"6":tryVal("adults1",cont),"7":tryVal("children1",cont),"8":tryVal("infants1",cont),"9":tryVal("adults2",cont),"10":tryVal("children2",cont),"11":tryVal("infants2",cont),"12":tryVal("adults3",cont),"13":tryVal("children3",cont),"14":tryVal("infants3",cont),"15":tryVal("adults4",cont),"16":tryVal("children4",cont),"17":tryVal("infants4",cont),"18":tryVal("selectHotelGrade",cont),"19":tryVal("selectAirClass",cont),"20":$("input[name='centerType']",cont).is(":checked")?"M":"S"};var params=CreateChilAndInfantAgeParams();parameters=url.interpolate(parameters);if(params!=""||params!="undefined"){parameters+="&"+params;}parameters=AppendTealeafCookie(parameters,tealeafCookieValue);if(validateBookingForm(cont)){document.location=parameters.replace(/&amp\;/g,"&");}}function GetVacationLinkTourUK(url,tourCode,el,tealeafCookieValue){var cont=el?el.parent():document;var parameters={"0":tourCode,"1":tryVal("selectAirport",cont),"2":tryVal("selectDuration",cont),"3":getDateStop(),"4":tryVal("departure-date",cont).replace(/\//g,"%2F"),"5":tryVal("selectNumberOfRooms",cont),"6":tryVal("adults1",cont),"7":tryVal("children1",cont),"8":tryVal("infants1",cont),"9":tryVal("adults2",cont),"10":tryVal("children2",cont),"11":tryVal("infants2",cont),"12":tryVal("adults3",cont),"13":tryVal("children3",cont),"14":tryVal("infants3",cont),"15":tryVal("adults4",cont),"16":tryVal("children4",cont),"17":tryVal("infants4",cont),"18":tryVal("selectHotelGrade",cont),"19":tryVal("selectAirClass",cont),"20":$("input[name='centerType']",cont).is(":checked")?"M":"S"};var params=CreateChilAndInfantAgeParams();parameters=url.interpolate(parameters);if(params!=""||params!="undefined"){parameters+="&"+params;}parameters=AppendTealeafCookie(parameters,tealeafCookieValue);if(validateBookingForm(cont)){document.location=parameters.replace(/&amp\;/g,"&");}}function CreateChilAndInfantAgeParams(){var numOfRooms=$('select[id="selectNumberOfRooms"]').val();var childAgeParams="";var infantAgeParams="";var counter=parseInt($('select[id="adults1"]').val());for(var i=0;i<(numOfRooms||1);i++){$('select[id^="ageOfChild'+(i+1)+'"]:visible').each(function(){counter++;childAgeParams+="PAGE"+counter+"D="+$(this).val()+"&";});$('select[id^="ageOfInfant'+(i+1)+'"]:visible').each(function(){counter++;infantAgeParams+="PAGE"+counter+"D="+$(this).val()+"&";});if(numOfRooms>1){var nextVal=parseInt($('select[id="adults'+(i+2)+'"]:visible').val());if(nextVal!=Number.NaN&&nextVal>0){counter=counter+nextVal;}}}var params=childAgeParams+infantAgeParams;params=params.slice(0,-1);return params;}function getDateStop(){var currentDate=new Date();var month=currentDate.getMonth();if(month>=1&&month<5){var value=(currentDate.getFullYear()+1)+"0331";console.log(value);return value;}else{var value=(currentDate.getFullYear()+1)+"1231";console.log(value);return value;}}function AppendTealeafCookie(url,tealeafCookieValue){if(tealeafCookieValue!=""&&tealeafCookieValue.length>0){var prefix=(!url.match(/\?/))?"?":"&";url+=prefix+"cmssid="+tealeafCookieValue;}return url;}function DisableSubmitOnEnter(fieldsChangeFocus,fieldTypesNoFocus){inputFields=$(fieldsChangeFocus).not(fieldTypesNoFocus);var current;if($.browser.mozilla){$(inputFields).keypress(checkForEnter);}else{$(inputFields).keydown(checkForEnter);}}function checkForEnter(event){if(event.keyCode==13){current=($("*:focus").attr("id"));$(document.getElementById(current)).focusNextInputField();event.preventDefault();return false;}}$.fn.focusNextInputField=function(){return this.each(function(){var fields=$(this).parents("form:eq(0),body").find("button,input,textarea,select").not(":hidden");var index=fields.index(this);if(index>-1&&(index+1)<fields.length){fields.eq(index+1).focus();}return false;});};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.preloader.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.Preloader=(function(){var smallSWF="/ProfileUIResources/SWF/preloader30x30.swf",bigSWF="/ProfileUIResources/SWF/preloader60x60.swf",containerID="preloader";var _template='<div id="{containerID}"><div class="flash-loader"><div id="{containerID}-flash"/></div><p/></div>';var $cont;var init=function(){var el=_template.template({containerID:containerID});if(typeof $.blockUI!="function"){console.log("[Kuoni.Style.Preloader] missing blockUI plugin!!");$.fn.block=$.fn.unblock=$.blockUI=function(){};}$cont=$(el).appendTo(document.body).hide();swfobject.embedSWF("/ProfileUIResources/SWF/preloader60x60.swf",containerID+"-flash","60","60","9.0.0",null,null,{wmode:"transparent"});$(document).bind("preloader:show",show);$(document).bind("preloader:hide",hide);};var show=function(e,o){var opts=o||{};opts.target=opts.target||document.body;opts.block=opts.block||false;opts.size=opts.size||"big";opts.msg=opts.msg||"";$cont.find("p").text(opts.msg);position(opts);if(opts.block){$(opts.target).block({message:null,baseZ:950,overlayCSS:{backgroundColor:"#fff",opacity:0.8}});}$cont.show();};var position=function(opts){var target=opts.target;$(target).append($cont);var leftPos=($(target).outerWidth()-$cont.outerWidth())/2+$(target).scrollLeft(),topPos=($(target).outerHeight()-$cont.outerHeight())/2+$(target).scrollTop();leftPos=(leftPos<0)?0:leftPos;topPos=(topPos<0)?0:topPos;$cont.css({position:"absolute",width:opts.size=="big"?"60px":"30px",left:leftPos+"px",top:topPos+"px",zIndex:"1000"});};var hide=function(e,o){var opts=o||{};opts.target=opts.target||document.body;$cont.hide();$(opts.target).unblock();};return{init:init,show:show};})();$(document).ready(Kuoni.Style.Preloader.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.call-webservice.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.callWebservice=function(o){if(!o||!o.url){return;}o.data=o.data||{};o.complete=o.complete||function(){};o.success=o.success||function(){};o.async=o.async&&true;try{o.data.language=Kuoni.User.language;}catch(e){throw"Kuoni.User.language value undefined!";}$.ajax({url:o.url.fixurl(),data:o.data,type:"POST",error:function(XMLHttpRequest,textStatus,errorThrown){console.log("Ajax request error!");},complete:function(){o.complete();},success:function(respText){var respText=$(respText).find("string").text();if(respText==""){return;}try{var respObj=eval("("+respText+")");o.success(respObj);}catch(e){console.log("Kuoni.Style.callWebservice: "+e);}}});};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.content-tools.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.ContentTools=(function(){var $cont,data;var init=function(){$cont=$("#content-tools");if($cont.length<1){return;}data=$cont.metadata({type:"elem",name:"script"});if(!Kuoni.User.authenticated){this.uid="-1";}else{this.uid=Kuoni.User.id;}if($(".addtowishlist",$cont).length>0){addToWishList.init();}};var feedback=function(cont,msg){msg=unescape(msg)||"";$("p",cont).html(msg).hide().slideDown("fast").effect("highlight",{},500);};var addToWishList={$modcont:{},PostUrl:"/_layouts/kbfrontend.asmx/AddToWishList",ItemStatusUrl:"/_layouts/kbfrontend.asmx/GetWishListItemStatus",RemoveUrl:"/_layouts/kbfrontend.asmx/RemoveFromWishList",init:function(){if(!data.wishlistItem){return;}addToWishList.$modcont=$(".addtowishlist",$cont);if(Kuoni.User.authenticated){addToWishList.getStatus();}$("a[href='#addtowishlist']").click(addToWishList.add);$("a[href='#removefromwishlist']").click(addToWishList.remove);},getStatus:function(){Kuoni.Style.callWebservice({url:addToWishList.ItemStatusUrl,data:{userId:Kuoni.User.id,wishListItemAsJson:$.compactJSON(data.wishlistItem)},success:function(response){if(response.Data=="True"){addToWishList.toggle();}}});},add:function(e){e.preventDefault();if(addToWishList.$modcont.hasClass("disabled")){return;}if(addToWishList.$modcont.find("p:visible").length>0){addToWishList.$modcont.find("p").slideUp("fast");}else{addToWishList.$modcont.addClass("disabled");Kuoni.Style.callWebservice({url:addToWishList.PostUrl,data:{userId:Kuoni.User.id,data:$.compactJSON(data.wishlistItem)},success:function(response){if(Kuoni.User.authenticated){addToWishList.toggle();}else{feedback(addToWishList.$modcont,response.Message);}},complete:function(){addToWishList.$modcont.removeClass("disabled");}});}},remove:function(e){e.preventDefault();if(addToWishList.$modcont.hasClass("disabled")){return;}addToWishList.$modcont.addClass("disabled");Kuoni.Style.callWebservice({url:addToWishList.RemoveUrl,data:{userId:Kuoni.User.id,data:$.compactJSON(data.wishlistItem)},success:function(response){addToWishList.toggle();},complete:function(){addToWishList.$modcont.removeClass("disabled");}});},toggle:function(){$("a",addToWishList.$modcont).toggle("blind");}};var sendToFriend=function(){TemplateUrl="/_layouts/kbfrontend.asmx/GetLightBoxHtml",snippetParam="SendToFriend",PostUrl="/_layouts/kbfrontend.asmx/SendToFriend";var init=function(){console.log("sef");};var send=function(){};};return{init:init};})();$(window).load(Kuoni.Style.ContentTools.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.give-feedback.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.giveFeedback=function(o){var $cont=$(o.cont);var $feedback=$(".feedback",$cont);var msg=o.msg||"";if($feedback.length<1){return;}$feedback.hide().children("div").removeClass().addClass(o.positive?"positive":"negative").html(msg).end().fadeIn("fast");};
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.login.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.Login=(function(){var loginContainerSel="#mykuoni-login",forgotContainerSel="#mykuoni-forgot",postLoginUrl="/_layouts/kbfrontend.asmx/ValidateUser",postForgotUrl="/_layouts/kbfrontend.asmx/ResetPassword",postLogoutUrl="/_layouts/kbfrontend.asmx/LogoutUser";var $container;var init=function(){if(typeof $.cookie!="function"){console.log("[Kuoni.Style.Login] requires jquery.cookie.js!");return;}$loginCont=$(loginContainerSel).find("a[href*='forgot']").click(function(e){e.preventDefault();forgotpass.activate();}).end();$forgotCont=$(forgotContainerSel).hide().find("a[href*='login']").click(function(e){e.preventDefault();login.activate();}).end();$(".kuoni-tooltip",$loginCont).tooltip({positionBottom:true,top:20,left:5,track:true,fade:("\v"=="v")?false:200,fixPNG:true,bodyHandler:function(){var content=$(this).find(".kuoni-tooltip-content").html();content=$('<div class="tooltip-top"/><div class="tooltip-content"><p>'+content+'</p></div><div class="tooltip-bottom"/>');return content;}});login.init();rememberme.init();forgotpass.init();console.log("[Kuoni.Style.Login] inited");$(document).ready(function(){if(Kuoni.User.authenticated){logout.init();}});};var login={init:function(){$loginCont.find("a.process-button").click(function(){login.submit();return false;}).end().submit(function(){login.submit();return false;}).end().find("input[type=text], input[type=password]").keyup(function(e){if(e.keyCode==13){login.submit();return false;}});},activate:function(){$loginCont.show();$forgotCont.hide();},submit:function(){if($("a.process-button",$loginCont).hasClass("disabled")){return;}$("a.process-button",$loginCont).addClass("disabled");rememberme.save();Kuoni.Style.callWebservice({url:postLoginUrl,data:{pUserName:$loginCont.find("input[type=text]").val(),pPassword:$loginCont.find("input[type=password]").val(),pRememberMe:$loginCont.find("input[type=checkbox]").attr("checked")},success:function(response){Kuoni.Style.giveFeedback({cont:$loginCont,msg:response.Message,positive:(response.Success=="True")});login.callback(response);},complete:function(){$("a.process-button",$loginCont).removeClass("disabled");}});},callback:function(data){if(data.Success=="True"){location.href=data.Url;}}};var rememberme={init:function(){var username=$.cookie("mykuoni-remembered")||false;$loginCont.find("input[type=checkbox]").attr("checked",(!!username));if(username){$loginCont.find("input[type=text]").val(username);}},save:function(){var username=$loginCont.find("input[type=checkbox]").attr("checked")?$loginCont.find("input[type=text]").val():false;$.cookie("mykuoni-remembered",username?username:"",{expires:username?365:-1,path:"/"});}};var forgotpass={init:function(){$forgotCont.find("a[href*='send']").click(function(e){e.preventDefault();forgotpass.submit();}).end().submit(function(){return false;}).end().find("input[type=text]").keyup(function(e){if(e.keyCode==13){forgotpass.submit();}});},activate:function(){$loginCont.hide();$forgotCont.show();},submit:function(){Kuoni.Style.callWebservice({url:postForgotUrl,data:{username:$forgotCont.find("input[type=text]").val()},success:function(response){Kuoni.Style.giveFeedback({cont:$forgotCont,msg:response.Message,positive:(response.Success=="True")});}});}};var logout={init:function(){$("#service-nav .logout").find(".name").html(window.userContext.UserContext.FirstName+" "+window.userContext.UserContext.LastName).end().find("a").click(function(e){e.preventDefault();Kuoni.Style.callWebservice({url:postLogoutUrl,success:function(response){if(response.Success=="True"){window.location=response.Url;}else{alert(response.Message);}}});}).end().show();}};return{init:init};})();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.tripadvisor.js */
Valtech.Namespace.create("Kuoni.Style.TripAdvisor");Kuoni.Style.TripAdvisor=(function(){var postUrl="/_layouts/kbfrontend.asmx/GetHotelTripAdvisorData",containerSelector="#content .result-list",itemSelector="li.result",setSize=10;var $cont,$items,start=0,prioLoaded=false,itemsArray=[];var init=function(){$cont=$(containerSelector);if($cont.lenght<1){return;}$items=$(itemSelector,$cont);setup();};var setup=function(){var postData=[];$.each($items,function(i,el){var $el=$(el);var taid=$el.metadata().TripAdvisorId||false;if(!taid){taid=$el.metadata({type:"elem",name:"script"}).TripAdvisorId||false;}if(!taid){return;}postData.push({TripAdvisorId:taid});itemsArray.push({taid:taid,el:$el});});if(postData.length<1){return;}load(postData);};var load=function(postData){var postDataSet=[];for(i=start;i<start+setSize&&i<postData.length;i++){postDataSet.push(postData[i]);}Kuoni.Style.callWebservice({url:postUrl,data:{taidsAsJson:$.compactJSON(postDataSet),language:Kuoni.User.language},complete:function(){},success:function(respObj){render(respObj);if(!prioLoaded&&postData.length>setSize){prioLoaded=true;for(j=1;j<Math.ceil(postData.length/setSize);j++){start=j*setSize;load(postData);}}}});};var render=function(respObj){$.each(respObj,function(i,resultItem){if(!resultItem){return;}var $el;var taid=resultItem.TripAdvisorId.toString();$.each(itemsArray,function(){if(this.taid.toUpperCase()==taid.toUpperCase()){$el=$(this.el);}});if(!$el||$el.find(".ta-guest-rating-snippet").length>0){return;}var templ=$("#templates").metadata({type:"elem",name:"script"}).TripAdvisorTempl;var href=$("h2 a",$el).attr("href")+"#fragment-5";var html=templ.template({MedianUserRating:resultItem.MedianUserRating,TotalUserReviewCount:resultItem.TotalUserReviewCount,HotelDetailUrl:href,RatingImage:resultItem.RatingImage});$el.find(".price").after(html).fadeIn(500);});};return{init:init};})();$(window).load(Kuoni.Style.TripAdvisor.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.mykuoni.js */
Valtech.Namespace.create("Kuoni.Style.MyKuoni");Kuoni.Style.MyKuoni.Toolbox=(function(){var containerSel="#toolbox-items",toolboxItemSel=".toolbox",toolboxControlSel='#toolbox-controls .tc-content input[type="checkbox"]',postUrl="/_layouts/kbfrontend.asmx/SetToolBox";var $container;var init=function(){$container=$(containerSel);if($container.length<1){return;}$container.sortable({handle:".handle",items:"li.toolbox",opacity:"\v"=="v"?0:0.5,revert:true,containment:"#wrapper",update:function(e,ui){var pos=1;$.each($container.sortable("toArray"),function(i,val){if(!val){return true;}var name=val.match(/\w+-(\w+)/)[1];controls.elements.each(function(){if($(this).metadata().Name==name){$(this).data("SortOrder",pos);}});pos++;});save();}});boxes.init();controls.init();};var save=function(){var results=[];$.each(controls.elements,function(i,el){var $el=$(el);var result=$el.metadata();result.SortOrder=$el.data("SortOrder");result.Value=$el.attr("checked");results.push(result);});Kuoni.Style.callWebservice({url:postUrl,data:{userId:Kuoni.User.id,toolBoxItemsAsJson:$.compactJSON(results)}});};var boxes={elements:[],init:function(){boxes.elements=$(toolboxItemSel,$container);$.each(boxes.elements,function(i,el){var $el=$(el);var id=$el.find(".toolbox-inner").attr("id");$el.find(".toolbox-inner").removeAttr("id").end().attr("id",id);});boxes.elements.bind("click",function(e){var $el=$(e.target);if($el.hasClass("close")){e.preventDefault();var id=$(this).attr("id");boxes.hide(id);controls.elements.each(function(){if("toolbox-"+$(this).metadata().Name==id){$(this).attr("checked",false);}});save();}});},show:function(id){if("\v"=="v"){$("#"+id,$container).show();}else{$("#"+id,$container).fadeIn("slow");}},hide:function(id){if("\v"=="v"){$("#"+id,$container).hide();}else{$("#"+id,$container).fadeOut("slow");}},sort:function(order){$.each(order,function(i,val){$("#"+val).appendTo($container);});}};var controls={elements:[],init:function(){controls.elements=$(toolboxControlSel);var boxArr=[];$.each(controls.elements,function(i,el){var $inp=$(el);var id="toolbox-"+$inp.metadata().Name;var order=$inp.metadata().SortOrder;boxArr[order]=id;$inp.data("SortOrder",order);if(!$inp.attr("checked")){$("#"+id).hide();}});boxes.sort(boxArr);controls.elements.click(function(){controls.update(this);});},update:function(el){var $inp=$(el);var id="toolbox-"+$inp.metadata().Name;if($inp.attr("checked")){boxes.show(id);}else{boxes.hide(id);}save();}};return{init:init};})();Kuoni.Style.MyKuoni.Messages=(function(){var postUrl="/_layouts/kbfrontend.asmx/SetUserMessagesAsRead",contSel="#message-box",msgItemSel=".messages a",expandCtrlSel=".control a[href='#expand']",collapseCtrlSel=".control a[href='#collapse']";var $cont;var init=function(){$cont=$(contSel);var controls=$(collapseCtrlSel+","+expandCtrlSel,$cont);controls.click(function(e){e.preventDefault();if($(this).hasClass("disabled")){return;}controls.toggle().addClass("disabled");msgItems.filter(".collapsible")[$(collapseCtrlSel+":visible",$cont).length>0?"slideDown":"slideUp"]("fast",function(){controls.removeClass("disabled");});});var msgItems=$(msgItemSel,$cont);$.each(msgItems,function(i,el){var $el=$(el);if(i>1){$el.addClass("collapsible").hide();}});msgItems.click(function(){read(this);return true;});if(msgItems.length<3){controls.hide();}$(collapseCtrlSel,$cont).hide();};var read=function(el){var msgId=$(el).addClass("disabled").metadata().id;data={messageId:msgId};Kuoni.Style.callWebservice({url:postUrl,data:data,async:true});};return{init:init};})();Kuoni.Style.MyKuoni.Scroller=(function(){var containerSelector=".scrollable",contentSelector=".scroller-content",itemSelector=".scroller-content li",prevBtnSelector=".pager-controls .prev",nextBtnSelector=".pager-controls .next",totalPagesSelector=".info .total",currentPageSelector=".info .current",pagenumContSelector=".goto-page",disabledClass="disabled",scrollDuration=500;var _templates={pager_numlink:'<span>|</span><a class="page-num" href="#.#">{num}</a>'};var init=function(){$.each($(containerSelector),function(i,cont){var $cont=$(cont);var $items=$(itemSelector,$cont);$cont.data("total",$items.length);$cont.data("current",1);$cont.data("w",$items.width());if($(pagenumContSelector,$cont).length>0){$(pagenumContSelector+" a",$cont).addClass(disabledClass);for(i=2;i<$items.length+1;i++){var link=_templates.pager_numlink.template({num:i});$(pagenumContSelector,$cont).append(link);}$(pagenumContSelector+" a",$cont).click(function(e){e.preventDefault();if(!$(this).hasClass(disabledClass)){scrollTo($cont,$(this).text());}});}else{$(totalPagesSelector,$cont).html($items.length);$(prevBtnSelector,$cont).addClass(disabledClass).click(function(){if(!$(this).hasClass(disabledClass)){scroll($cont,-1);}});$(nextBtnSelector,$cont).addClass($items.length>1?"":disabledClass).click(function(){if(!$(this).hasClass(disabledClass)){scroll($cont,1);}});}});};var scroll=function(cont,n){$cont=$(cont);var current=$cont.data("current");var total=$cont.data("total");var w=$cont.data("w");current+=n;current=current<1?1:current;current=current>total?total:current;$(nextBtnSelector,$cont)[current==total?"addClass":"removeClass"](disabledClass);$(prevBtnSelector,$cont)[current==1?"addClass":"removeClass"](disabledClass);$(currentPageSelector,$cont).html(current);$cont.data("current",current);var $el=$(contentSelector,$cont);left=0-w*(current-1);slide($el,left);};var scrollTo=function(cont,n){$cont=$(cont);var total=$cont.data("total");var w=$cont.data("w");var $el=$(contentSelector,$cont);left=0-w*(n-1);$(pagenumContSelector+" a",$cont).eq(n-1).addClass(disabledClass).siblings().removeClass(disabledClass);slide($el,left);};var slide=function(el,x){$(el).stop().animate({left:x+"px"},{duration:scrollDuration,easing:"swing"});};return{init:init};})();Kuoni.Style.MyKuoni.Preferences=(function(){var contSelector="#content .kuoni-preferences",imgsContSelector=".preferences-gallery .container",itemSelector="input[type=checkbox]",submitSelector="a",postUrl="/_layouts/kbfrontend.asmx/SetUserPreferences";var saved=true,$cont;var _templates={pref_img:'<div class="wrapper"><img src="{url}" alt="{alt}" title="{alt}" /></div>'};var init=function(){$cont=$(contSelector);if($cont.length<1){return;}setup();};var setup=function(){$(".accordion",$cont).accordion({header:".head",event:"click",autoHeight:false});$.each($(itemSelector,$cont),function(i,el){var $el=$(el);var data=$el.metadata();var alt=$.trim($el.next().text());var frag=_templates.pref_img.template({url:data.imgUrl,alt:alt});frag=$(frag).appendTo($(imgsContSelector,$cont))[data.Status==1?"show":"hide"]();$el.data("Status",data.Status).attr("checked",data.Status==1).click(update);$el[0].img=frag;});$(submitSelector,$cont).click(function(e){e.preventDefault();save();});};var update=function(){saved=false;var $el=$(this);$el.data("Status",$el.attr("checked")?"1":"0");$el[0].img[$el.attr("checked")?"fadeIn":"fadeOut"]("fast");};var save=function(lock){lock=lock||false;$(submitSelector,$cont).addClass("disabled");var res=[];$.each($(itemSelector,$cont),function(i,el){var $el=$(el);var item={Key:$el.metadata().Key,Status:$el.data("Status")};res.push(item);});Kuoni.Style.callWebservice({url:postUrl,data:{UserID:Kuoni.User.id,preferencesAsJson:$.compactJSON(res)},async:!lock,cont:$cont,success:function(response){if(response.Success=="True"){saved=true;}Kuoni.Style.giveFeedback({cont:$cont,positive:response.Success=="True",msg:response.Message});},complete:function(){$(submitSelector,$cont).removeClass("disabled");}});};return{init:init,save:save};})();Kuoni.Style.MyKuoni.Profile=(function(){var contSelector="#my-profile-register",fetchUrl="/_layouts/kbfrontend.asmx/GetUserDataById",postUrl="/_layouts/kbfrontend.asmx/SetUserData";var $cont,accepted=false;function log(){window.console.log("[Kuoni.Style.MyKuoni.Profile] "+Array.prototype.join.call(arguments,""));}var init=function(){$cont=$(contSelector);if($cont.length<1){return;}$(".save-button a",$cont).click(function(e){e.preventDefault();if(!$(this).hasClass("disabled")){save();}});load();};var load=function(){$(document).trigger("preloader:show",{block:true,target:$cont,msg:"Loading user data"});Kuoni.Style.callWebservice({url:fetchUrl,data:{userId:Kuoni.User.id},cont:$cont,success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});prefill(response.Data);},complete:function(){$(document).trigger("preloader:hide",{target:$cont});}});};var getValue=function(obj,string){var chunks=string.split(".");var node=obj;for(var i=0;i<chunks.length;i++){node=node[chunks[i]]=node[chunks[i]]||false;}return node;};var prefill=function(data){$(":input",$cont).each(function(){$el=$(this);var attr=$el.metadata().name;if(!attr){return;}var val=getValue(data,attr);if($el.attr("type")=="radio"){$el.each(function(){if(this.value==val){this.checked=true;}});}else{if($el.attr("type")=="select-one"){$el.val(val);}else{if($el.attr("type")=="checkbox"){if($el.val()==val){$el.attr("checked",true);}}else{$el.val(val?val:"");}}}});};var save=function(){$(".save-button a",$cont).addClass("disabled");if(validate()){var data={};$(":input",$cont).each(function(){$el=$(this);var attr=$(this).metadata().name;if($el.attr("type")=="checkbox"||$el.attr("type")=="radio"){if($el.attr("checked")){var val=$el.val();}else{return;}}else{var val=$el.val();}var obj={};if(!attr){return;}if(attr.indexOf(".")>0){var attrs=attr.split(".");if(typeof data[attrs[0]]!="object"){eval("data."+attrs[0]+"={}");}eval("data."+attr+'="'+val+'"');}else{eval("data."+attr+'="'+val+'"');}});Kuoni.Style.callWebservice({url:postUrl,data:{userId:Kuoni.User.id,userDataAsJson:$.compactJSON(data)},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});try{Kuoni.Style.Ga.gaFormHandler("FormSubmit","myKuoni-profile");}catch(e){}},complete:function(){$(".save-button a",$cont).removeClass("disabled");}});}else{$(".save-button a",$cont).removeClass("disabled");}};var validate=function(){var pass=true;var $overview=$(".validation-overview",$cont);$overview.hide().children("div").empty();$(":input.required",$cont).each(function(){var $inp=$(this);if($inp.val()==""){pass=false;$inp.focus(function(){$(this).parent(".wrapper").removeClass("invalid");}).parent(".wrapper").addClass("invalid");var label=$inp.siblings("label").text();var frag=$('<div class="linklike">{fieldname}</div>'.template({fieldname:label})).click(function(){$inp.focus();});$overview.children("div").append(frag);try{Kuoni.Style.Ga.gaFormHandler("FormFieldError","myKuoni-profile",label);}catch(e){}}});if(!pass){$overview.show();}return pass;};return{init:init};})();Kuoni.Style.MyKuoni.ChangePass=(function(){var contSelector="#my-profile-change-pass",postUrl="/_layouts/kbfrontend.asmx/ChangePassword",currentPassSel="input[name*='CurrentPassword']",newPassSel="input[name*='NewPassword']",confirmPassSel="input[name*='ConfirmPassword']";var $cont;function log(){window.console.log("[Kuoni.Style.MyKuoni.ChangePass] "+Array.prototype.join.call(arguments,""));}var init=function(){$cont=$(contSelector);if($cont.length<1){return;}$(".save-button a",$cont).click(function(e){e.preventDefault();save();});};var save=function(){if(validate()){var data={};$(":input",$cont).each(function(){$el=$(this);var attr=$(this).metadata().name;if($el.attr("type")=="checkbox"||$el.attr("type")=="radio"){if($el.attr("checked")){var val=$el.val();}else{return;}}else{var val=$el.val();}var obj={};if(!attr){return;}if(attr.indexOf(".")>0){var attrs=attr.split(".");if(typeof data[attrs[0]]!="object"){eval("data."+attrs[0]+"={}");}eval("data."+attr+'="'+val+'"');}else{eval("data."+attr+'="'+val+'"');}});Kuoni.Style.callWebservice({url:postUrl,data:{userId:Kuoni.User.id,currentPassword:$(currentPassSel,$cont).val(),newPassword:$(newPassSel,$cont).val()},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});try{Kuoni.Style.Ga.gaFormHandler("FormSubmit","myKuoni-changepass");}catch(e){}}});}};var validate=function(){if($(currentPassSel,$cont).val()==""){$(currentPassSel,$cont).parent("div").addClass("invalid");}if($(newPassSel,$cont).val()!=$(confirmPassSel,$cont).val()||$(newPassSel,$cont).val()==""){$(newPassSel+", "+confirmPassSel,$cont).parent("div").addClass("invalid");}if($(".invalid",$cont).length>0){$(".invalid",$cont).children("input").focus(function(){$(this).parent("div").removeClass("invalid");});try{Kuoni.Style.Ga.gaFormHandler("FormFieldError","myKuoni-changepass","Password");}catch(e){}return false;}return true;};return{init:init};})();Kuoni.Style.MyKuoni.Newsletters=(function(){var contSelector="#newsletter",fetchUrl="/_layouts/kbfrontend.asmx/GetUserPermissions",postUrl="/_layouts/kbfrontend.asmx/SetUserPermissions";var $cont;var init=function(){$cont=$(contSelector);if($cont.length<1){return;}$(".save-button a",$cont).click(function(e){e.preventDefault();if(!$(this).hasClass("disabled")){save();}});$("input[type=radio][value=false]",$cont).attr("checked",true);load();};var load=function(){$(document).trigger("preloader:show",{block:true,target:$cont});Kuoni.Style.callWebservice({url:fetchUrl,data:{userId:Kuoni.User.id},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});prefill(response);},complete:function(){$(document).trigger("preloader:hide",{target:$cont});}});};var prefill=function(response){var data=response.Data;$("input[type=radio]",$cont).each(function(){$inp=$(this);var newsl=$inp.parent("span").metadata().NewsLetter;$.each(data,function(i,val){if(newsl==val.NewsLetter&&String(val.IsAllowed)===($inp[0].defaultValue)){$inp.attr("checked",true);}});});};var save=function(){if(validate()){$(".save-button a",$cont).addClass("disabled");var data=[];$.each($("input[type=radio]:checked",$cont),function(i,el){$inp=$(el);data[i]=$inp.parent("span").metadata();data[i].IsAllowed=$inp[0].defaultValue;});Kuoni.Style.callWebservice({url:postUrl,data:{userId:Kuoni.User.id,permissionsAsJson:$.compactJSON(data)},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});try{Kuoni.Style.Ga.gaFormHandler("FormSubmit","myKuoni-newsletter");}catch(e){}},complete:function(){$(".save-button a",$cont).removeClass("disabled");}});}};var validate=function(){if(!$('input[type="checkbox"]',$cont).attr("checked")&&$("input[type=radio][value=true]:checked").length>0){$('input[type="checkbox"]',$cont).closest("div").addClass("invalid").siblings(".validation-overview").show().end().click(function(){$(this).closest("div").removeClass("invalid").siblings(".validation-overview").hide();});return false;}else{return true;}};return{init:init};})();Kuoni.Style.MyKuoni.Wishlist=(function(){var contSelector="#my-wishlist",removeUrl="/_layouts/kbfrontend.asmx/RemoveFromWishListById";var $cont;var init=function(){$cont=$(contSelector);$sendToBtn=$("a[href*='sendtofriend']",$cont);if($cont.length<1){return;}var li;$.each($(".offer-item",$cont),function(i,val){$el=$(val);$el.find(".remove").click(function(){remove($(this).parents(".offer-item"));});$el.find(".offer-item-border").click(function(){$(this).parents(".offer-item").toggleClass("item-selected");updateControls();});if("\v"=="v"){$el.hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});}});};var updateControls=function(){if($(".item-selected",$cont).length>0){$sendToBtn.removeClass("disabled");$(".selection",$cont).show().find(".num").html($(".item-selected",$cont).length);}else{$sendToBtn.addClass("disabled");$(".selection",$cont).hide();}};var remove=function(el){var $el=$(el);var cmpid=$el.find(".offer-image img").metadata().CmpId;Kuoni.Style.callWebservice({url:removeUrl,data:{userId:Kuoni.User.id,CmpId:cmpid},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});if(response.Success=="True"){$el.fadeOut();}}});};return{init:init};})();Kuoni.Style.MyKuoni.Offers=(function(){var contSelector="#my-offers",removeUrl="/_layouts/kbfrontend.asmx/RemoveUserOffer";var $cont;var init=function(){$cont=$(contSelector);if($cont.length<1){return;}var li;$.each($(".offer-item",$cont),function(i,val){$(val).find(".remove").click(function(){remove($(this).parents(".offer-item"));});});};var remove=function(el){var offerid=$(el).find(".offer-image img").metadata().Id;$(el).fadeOut();Kuoni.Style.callWebservice({url:removeUrl,data:{userId:Kuoni.User.id,offerGuid:offerid},success:function(response){Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});}});};return{init:init};})();$(document).ready(Kuoni.Style.MyKuoni.Wishlist.init);$(document).ready(Kuoni.Style.MyKuoni.Offers.init);$(document).ready(Kuoni.Style.MyKuoni.Scroller.init);$(document).ready(Kuoni.Style.MyKuoni.Toolbox.init);$(document).ready(Kuoni.Style.MyKuoni.Profile.init);$(document).ready(Kuoni.Style.MyKuoni.ChangePass.init);$(document).ready(Kuoni.Style.MyKuoni.Newsletters.init);$(document).ready(Kuoni.Style.MyKuoni.Preferences.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.navigation.js */
Valtech.Namespace.create("Kuoni.Style.Navigation");Kuoni.Style.Navigation.settings=(function(){return{layersID:"layer-navigation",layerClass:"layer"};})();Kuoni.Style.Navigation.Menubar=(function(){var $menuitems,$layersRoot,hash,timer;var init=function(){$(document).bind("layer:activate",activate);$(document).bind("layer:deactivate",deactivate);$(document).bind("layer:deactivateAll",deactivateAll);if(Kuoni.User.authenticated){$menuitems.filter("a[href*='mykuoni']").click(function(e){e.preventDefault();window.location=this.rev;});}};var activate=function(e,hashArray){if(hashArray){$menuitems.parent().removeClass("active").end().filter("a[href^='#"+hashArray[0]+"']").parent().addClass("active");}if(hashArray&&hashArray[1]){$(".layer .menu li").removeClass("selected").find("a[href$='"+hashArray[0]+"/"+hashArray[1]+"']").parent("li").addClass("selected");}};var deactivate=function(e,layer){};var deactivateAll=function(){$menuitems.parent().removeClass("active");};return{init:function(){$menuitems=$("#global-menu li a");$layersRoot=$("#layer-navigation");init();}};})();$(document).ready(Kuoni.Style.Navigation.Menubar.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.navigation.breadcrumb.js */
Valtech.Namespace.create("Kuoni.Style.Navigation");Kuoni.Style.Navigation.Breadcrumb=(function(){var $cont,crumbs,crumbPath="userContext.UserContext.Breadcrumb.CrumbsList.Crumb";function log(){if(window.console&&window.console.log){window.console.log("[Kuoni.Style.Navigation.Breadcrumb] "+Array.prototype.join.call(arguments,""));}}var getValue=function(obj,string){var chunks=string.split(".");var node=obj;for(var i=0;i<chunks.length;i++){node=node[chunks[i]]=node[chunks[i]]||false;}return node;};var init=function(){$cont=$("#breadcrumb ul");$("li:not(.ignore)",$cont).remove();crumbs=getValue(window,crumbPath);if(typeof userContext=="undefined"||!crumbs){log("No crumbs found... the birds must have eaten them up");return;}addCrumbs();log("inited");};var addCrumbs=function(){$.each(crumbs,function(i,val){if(!val.RelativeUrl){return;}var el=(i==0&&$("li.ignore",$cont).length<1)?$("<li>"+val.Title+"</li>"):$('<li><a href="'+val.RelativeUrl.toLowerCase()+'">'+val.Title+"</a>> </li>");$cont.prepend(el);});};var updateCrumbs=function(url,hash){var base=$($("a",$cont)[0]).attr("href");$("a",$cont).each(function(){var crumb=$(this);if(crumb.attr("href").toUpperCase()==url.toUpperCase()){crumb.attr("href",base+"#"+hash);}});};return{init:init,update:updateCrumbs};})();$(document).ready(Kuoni.Style.Navigation.Breadcrumb.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.ajax-queue.js */
Valtech.Namespace.create("Kuoni.Style.AjaxQueue");Kuoni.Style.AjaxQueue=(function(){var queue=[],currentPosition=-1;loadingTrigger="loading",loadedTrigger="loaded";function log(){if(window.console&&window.console.log){window.console.log("[Kuoni.Style.AjaxQueue] "+Array.prototype.join.call(arguments,""));}}function trigger(){var item=queue.shift();if(!(item&&item.url)){return false;}log("loading '"+item.id+"'");$(document).trigger(item.listener+":"+loadingTrigger,[item.id]);$.post(item.url,item.params,function(data){item.rawdata=data;$(document).trigger(item.listener+":"+loadedTrigger,[item]);});return !!item;}var add=function(id,url,listener,params,data){log("'"+id+"' added to queue");if(!id||!url||!listener){return;}queue.push({id:id,url:url,listener:listener,params:params||{},data:data||{}});};return{play:function(){trigger()&&Kuoni.Style.AjaxQueue.play();},add:add,bump:function(id){var oldqueue=queue;queue=[];$.each(oldqueue,function(i,item){if(item.id==id){queue.unshift(item);}else{queue.push(item);}});}};})();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.slidinglist.js */
Kuoni.Style.SlidingList=(function(){var contSel="#page-navigation .sliding-list";var $cont,$slider;var init=function(){$cont=$(contSel);if($cont.height()<$cont.find("ul").height()){setup();}};var setup=function(){$cont.addClass("slider-active");$sliderCont=$(".slider-content",$cont);$slider=$(".slider-content ul",$cont);$(".slide-up",$cont).click(slideUp);$(".slide-down",$cont).click(slideDown);};var slideUp=function(){var m=parseInt($slider.css("top"))-$sliderCont.height();m=m<0-$slider.height()+$sliderCont.height()?0-$slider.height()+$sliderCont.height():m;$slider.stop().animate({top:m+"px"},{duration:500,easing:"swing"});};var slideDown=function(){var m=parseInt($slider.css("top"))+$sliderCont.height();m=m>0?0:m;$slider.stop().animate({top:m+"px"},{duration:500,easing:"swing"});};return{init:init};})();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.snippetbox.js */
Valtech.Namespace.create("Kuoni.Style");Kuoni.Style.SnippetBox=(function(){var defaultContentUrl="/_layouts/kbfrontend.asmx/GetContent",boxShadowStyle="0px 0px 15px #666";var _templates={preload:'<div style="height: 60px; margin-bottom: 40px; "></div>'};var $cont,snippetData,ctData,mode,template,cssClass;var getValue=function(obj,string){var chunks=string.split(".");var node=obj;for(var i=0;i<chunks.length;i++){node=node[chunks[i]]=node[chunks[i]]||false;}return node;};var init=function(){if(typeof Kuoni.Style.callWebservice!="function"){$(".snippetbox").hide();console.error("Kuoni.Style.SnippetBox requires Kuoni.Style.callWebservice to fetch contents!");return;}if($("#templates").length<1){$(".snippetbox").hide();console.error("Kuoni.Style.SnippetBox is missing div#templates containing template definitions!");return;}template=$("#templates").metadata({type:"elem",name:"script"}).SnippetboxTemplate||false;if(!template){$(".snippetbox").hide();console.error("Kuoni.Style.Snippetbox is missing snippet lightbox template definition in div#templates!");return;}$(document).bind("activate.snippetbox",activate);};var activate=function(e,val){mode=val||false;if(!mode){console.error("Kuoni.Style.Snippetbox missing mode parameter!");return;}if(mode.match(/\W+/)){console.error("Kuoni.Style.Snippetbox found illegal character in mode parameter: "+escape(mode.match(/\W+/)));return;}snippetData=$("#snippetbox-config").metadata({type:"elem",name:"script"})[mode]||false;if(!snippetData){snippetData={xmlURLs:"<urls><url>/"+Kuoni.User.language+"/pages/"+mode+".aspx</url></urls>",fetchUrl:defaultContentUrl};}if(mode=="lightboxmap"){snippetData.contcode=location.hash.split("/")[1];if(!snippetData){console.error("Kuoni.Style.Snippetbox in flashmap mode missing continent parameter");return;}}ctData=$("#content-tools").length>0?$("#content-tools").metadata({type:"elem",name:"script"}):{};$cont=$("#snippetbox").length<1?$(template).prependTo(document.body):$("#snippetbox");$cont.attr("className",snippetData.cssClass||"");var $content=$cont.find(".content-wrapper");$content.css({"-webkit-box-shadow":boxShadowStyle,"-khtml-box-shadow":boxShadowStyle,"-moz-box-shadow":boxShadowStyle,"box-shadow":boxShadowStyle});if(!$.support.style?true:!($content.css("-webkit-box-shadow")||$content.css("-khtml-box-shadow")||$content.css("-moz-box-shadow")||$content.css("box-shadow"))){var shadow=$cont.find(".shadow");shadow.show();}$(document).bind("close.snippetbox",close);load();};var load=function(){$cont.find(".content").html(_templates.preload).end().center().show();$cont.css({opacity:0}).stop().animate({opacity:1},{duration:"\v"=="v"?1:800,complete:function(){if("\v"=="v"){$cont.css({filter:"none"});}}});$(document).trigger("preloader:show",{target:$cont.find(".content-wrapper")});var param=snippetData.reusableHtmlEntry?{reusableHtmlEntry:snippetData.reusableHtmlEntry}:{xmlURLs:snippetData.xmlURLs};$.ajax({url:(snippetData.fetchUrl).fixurl(),type:"POST",data:param,success:function(resp){var html=snippetData.xmlURLs?$(resp).find("snippet").text():$(resp).find("string").text();render(html);}});};var render=function(html){if(html.replace(/\s/g,"")==""){$(document).trigger("close.snippetbox");$(document).trigger("hide.blockUI");console.error("Kuoni.Style.Snippetbox could not get content for "+mode+"!");}if(mode=="lightboxmap"){html=html.template({contcode:snippetData.contcode});}$cont.find(".content").html(html).end().center();if(Kuoni.User.authenticated&&snippetData.dataUrl){Kuoni.Style.callWebservice({url:snippetData.dataUrl,data:{userId:Kuoni.User.id},success:function(response){prefill(response.Data);},complete:function(){$(document).trigger("preloader:hide",{target:$cont.find(".content-wrapper")});}});}else{$(document).trigger("preloader:hide",{target:$cont.find(".content-wrapper")});}if(typeof $.tooltip=="object"){$(".kuoni-tooltip",$cont).tooltip({positionBottom:true,top:20,left:5,track:true,fade:("\v"=="v")?false:200,fixPNG:true,bodyHandler:function(){var content=$(this).find(".kuoni-tooltip-content").html();content=$('<div class="tooltip-top"/><div class="tooltip-content"><p>'+content+'</p></div><div class="tooltip-bottom"/>');return content;}});}$(".process-button",$cont).click(save);$(".alternate-control",$cont).click(function(){var id=this.value;$("#"+id).show().siblings(".alternate-content").hide();});};var prefill=function(userdata){$(":input",$cont).each(function(){$el=$(this);var attr=$el.metadata().name;if(!attr){return;}attr=attr.replace(/UserAccount\./,"");var val=getValue(userdata,attr);if($el.attr("type")=="radio"){$el.each(function(){if(this.value==val){this.checked=true;}});}else{if($el.attr("type")=="select-one"){$el.val(val);}else{if($el.attr("type")=="checkbox"){if($el.val()==val){$el.attr("checked",true);}}else{$el.val(val?val:"");}}}});};var save=function(e){e.preventDefault();if(validate()){$(".process-button",$cont).addClass("disabled");var dataObj={};if(mode=="getoffer"){var dataObj=ctData.offerItem;dataObj.UserAccount={UserId:Kuoni.User.id};}var $inputs=$(":input:visible",$cont);if(mode=="newsletter"){$inputs=$(':input:visible, .alternate-content:visible>input[type="hidden"]',$cont);}$inputs.each(function(){$el=$(this);var attr=$(this).metadata().name;if($el.attr("type")=="checkbox"||$el.attr("type")=="radio"){if($el.attr("checked")){var val=$el.val();}else{return;}}else{var val=escape($el.val());}var obj={};if(!attr){return;}if(mode=="newsletter"&&$el.hasClass("newsletter")&&$el.attr("checked")){if(typeof dataObj.Newsletters=="undefined"){dataObj.Newsletters=[];}dataObj.Newsletters.push($(this).metadata());}else{if(attr.indexOf(".")>0){var attrs=attr.split(".");if(typeof dataObj[attrs[0]]!="object"){eval("dataObj."+attrs[0]+"={}");}if(typeof attrs[2]!="undefined"&&typeof dataObj[attrs[0]][attrs[1]]!="object"){eval("dataObj."+attrs[0]+"."+attrs[1]+"={}");}eval("dataObj."+attr+'="'+val+'"');}else{eval("dataObj."+attr+'="'+val+'"');}}});if(mode=="sendtofriend"){dataObj.Links=[];if($("#my-wishlist").length>0){$("#my-wishlist .item-selected .item-url").each(function(){dataObj.Links.push($(this).attr("href"));});}else{dataObj.Links.push(window.location.toString());}}if(mode=="feedback"){dataObj.Links=[];dataObj.Links.push(window.location.toString());}if(mode=="getoffer"){var data={offerAsJson:$.compactJSON(dataObj)};}else{if(mode=="newsletter"){var attrname=$(".alternate-content:visible",$cont).attr("id")+"postUrl";snippetData.postUrl=snippetData[attrname];var data={dataAsJson:$.compactJSON(dataObj)};}else{var data={dataAsJson:$.compactJSON(dataObj)};}}Kuoni.Style.callWebservice({url:snippetData.postUrl,data:data,complete:function(){$(".process-button",$cont).removeClass("disabled");},success:function(response){if(response.Success=="True"){snippetData={};var html='<div class="feedback" style="width: 350px; height: auto; text-align: left;"><div class="positive">'+response.Message+"</div></div>";render(html);try{Kuoni.Style.Ga.gaFormHandler("FormSubmit",mode);}catch(e){}setTimeout(function(){location.hash="/";},3000);}else{Kuoni.Style.giveFeedback({cont:$cont,msg:response.Message,positive:(response.Success=="True")});}}});}};var validate=function(){var pass=true;var $overview=$(".validation-overview",$cont);$overview.hide().children("div").empty();$(":input:visible.required",$cont).each(function(){var $inp=$(this);if($inp.val()==""){pass=false;$inp.focus(function(){$(this).parent(".wrapper").removeClass("invalid");}).parent(".wrapper").addClass("invalid");var label=$inp.siblings("label").text();var frag=$('<div class="linklike">{fieldname}</div>'.template({fieldname:label})).click(function(){$inp.focus();});$overview.children("div").append(frag);try{Kuoni.Style.Ga.gaFormHandler("FormFieldError",mode,label);}catch(e){}}});if(!pass){$overview.show();}return pass;};var close=function(){$cont.stop().animate({opacity:0},{duration:1000,complete:function(){$cont.hide();$(document).unbind("close.snippetbox");}});};return{init:init};})();$(document).ready(Kuoni.Style.SnippetBox.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.autocomplete.js */
$(window).load(function(){$("#ctl00_txtSearch").autocomplete("/_layouts/KBFrontend.asmx/GetAutocompleteValues",{minChars:3,max:12,autoFill:false,mustMatch:false,selectFirst:false,matchContains:false,scrollHeight:245,scroll:false,requestType:"POST",formatItem:function(item){return item.AutocompleteValue;},parse:function(data){var data=$(data).find("string").text();data=eval("("+data+")");data=data.ResultList;return $.map(data,function(row){return{data:row,value:row.AutocompleteValue,result:row.AutocompleteValue};});}}).result(function(event,item){location.href=item.Url;});});
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery-valtech-select-hierarchy.js */
(function($){if(!String.prototype.interpolate){String.prototype.interpolate=function(hash){var s=this+"";for(var i in hash){s=s.replace(new RegExp("\\{"+i+"\\}","g"),hash[i]);}return s;};}$.fn.select_hierarchy=function(url,options){var templates={select:'<div id="select-hierarchy-wrapper-{id}" class="select-hierarchy-wrapper"><label for="select-hierarchy-select-{id}">{label_text}</label><select id="select-hierarchy-select-{id}" class="select-hierarchy-select" /></div>',option:'<option value="{value}">{text}</option>',button:'<a href="#" title="" class="{button_class}"><span class="arrow">{text}</span></a>'};function updateSelect(sel,items,headline_option){if(sel[0]){sel[0].options.length=0;if(headline_option){addOption(sel[0],headline_option,"");}for(var i in items){addOption(sel[0],items[i].text,items[i].value);}}}function addOption(sel,text,val){var o=document.createElement("option");o.setAttribute("value",val);var textNode=document.createTextNode(text);o.appendChild(textNode);o.className+=(val&&text&&!text.indexOf("- ")==0)?" continent":"";sel.appendChild(o);}function flattenData(data){for(var i in data){flat_data[data[i].value]=data[i];flattenData(data[i].items);}}function itemAlphaSorter(a,b){if(a.text<b.text){return -1;}if(a.text>b.text){return 1;}return 0;}function sortIfNeeded(items,sort){if(!sort){return items;}var f=sort;if(sort=="alpha"){f=itemAlphaSorter;}return items.sort(f);}var selects=[];var flat_data=[];var options=$.extend({},options);var containers=this;$.getJSON(url,function(data){flattenData(data);var o1=$(templates.select.interpolate({id:options.id+"-1",label_text:options&&options.label_text1?options.label_text1:"Select"}));var o2=$(templates.select.interpolate({id:options.id+"-2",label_text:options&&options.label_text2?options.label_text2:"Select"}));var button=$(templates.button.interpolate({button_class:options.button_class||"select-hierarchy-button",text:options&&options.button_text?options.button_text:"Select"}));containers.append(o1).append(o2).append(button);selects.push(o1.find("select"));selects.push(o2.find("select"));selects[0].bind("change",function(){var val=$(this).val();if(flat_data[val]&&flat_data[val].items.length>0){o2.show();}else{o2.hide();}var items=val?flat_data[val].items:[];updateSelect(selects[1],sortIfNeeded(items,options.sort),options.headline_option2);});updateSelect(selects[0],sortIfNeeded(data,options.sort),options.headline_option1);selects[0].trigger("change");if(options.continent_name){$("#select-hierarchy-select-"+options.id+"-1").selectOptionsByText(options.continent_name);$("#select-hierarchy-select-"+options.id+"-1").trigger("change");}if(options.country_name){$("#select-hierarchy-select-"+options.id+"-1").selectOptionsByText(options.country_name);$("#select-hierarchy-select-"+options.id+"-1").trigger("change");}if(options.travelarea_name){$("#select-hierarchy-select-"+options.id+"-2").selectOptionsByText(options.travelarea_name);}button.bind("click",function(){var url1=selects[0].val();var url2=selects[1].val();document.location=url2||url1;});});return this;};$.fn.selectOptionsByText=function(value,clear){var v=value;var vT=typeof(value);if(vT=="object"&&v.constructor==Array){var $this=this;$.each(v,function(){$this.selectOptionsByText(this,clear);});}var c=clear||false;if(vT!="string"&&vT!="function"&&vT!="object"){return this;}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this;}var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].text.match(v)){o[i].selected=true;}else{if(c){o[i].selected=false;}}}else{if(o[i].text==v){o[i].selected=true;}else{if(c){o[i].selected=false;}}}}});return this;};$.fn.selectOptionsByValue=function(value,clear){var v=value;var vT=typeof(value);if(vT=="object"&&v.constructor==Array){var $this=this;$.each(v,function(){$this.selectOptionsByValue(this,clear);});}var c=clear||false;if(vT!="string"&&vT!="function"&&vT!="object"){return this;}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this;}var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].value.match(v)){o[i].selected=true;}else{if(c){o[i].selected=false;}}}else{if(o[i].value==v){o[i].selected=true;}else{if(c){o[i].selected=false;}}}}});return this;};})(jQuery);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.blockUI.js */
Valtech.Namespace.create("Kuoni.Style.BlockUI");Kuoni.Style.BlockUI=(function(){var init=function(){if(typeof $.blockUI!="function"){console.error("Kuoni.Style.BlockUI is missing jquery.blockUI");return;}$(document).bind("show.blockUI",show);$(document).bind("hide.blockUI",hide);};var show=function(){if($(".blockUI.blockOverlay").length<1){$.blockUI({message:null,baseZ:50,fadeIn:300,fadeOut:300,css:{cursor:"default"},overlayCSS:{opacity:"0.40",cursor:"default"}});}};var hide=function(){$.unblockUI();};return{init:init};})();$(document).ready(Kuoni.Style.BlockUI.init);
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/kuoni.style.navigation.hash.js */
Valtech.Namespace.create("Kuoni.Style.Navigation");Kuoni.Style.Navigation.Hash=(function(){$(window).bind("hashchange",function(){Kuoni.Style.Navigation.Hash.parse(location.hash);}).bind("load",function(){$(window).trigger("hashchange");});var parse=function(hash){hash=hash.replace("#","");if(hash&&hash!="/"){var hashArray=hash.split("/");hashArray[1]=hashArray[1]?hashArray[1]:$("#"+Kuoni.Style.Navigation.mainlayerPrefix+hashArray[0]+" .sublayer").eq(0).attr("id");el=$("#"+Kuoni.Style.Navigation.mainlayerPrefix+hashArray[0]);if(el.length>0){if(el.parents("#layer-navigation").length>0){openLayer(hashArray);}else{closeAll();return;}}else{openSnippet(hashArray);}enable_keyboard();}else{closeAll();disable_keyboard();}};var openLayer=function(hashArray){$(document).trigger("layer:activate",[hashArray]);$(document).trigger("close.snippetbox");var block=($("#layer-navigation.dropdown").length>0)?"hide":"show";$(document).trigger(block+".blockUI");};var openSnippet=function(hashArray){$(document).trigger("layer:deactivateAll");$(document).trigger("show.blockUI");(function(){var hash=hashArray[0];$(document).trigger("activate.snippetbox",[hash]);})();};var closeAll=function(){$(document).trigger("close.snippetbox");$(document).trigger("layer:deactivateAll");$(document).trigger("hide.blockUI");};var enable_keyboard=function(){$(document).bind("keydown.navigation",function(e){keyboard_action(e);});};var disable_keyboard=function(){$(document).unbind("keydown.navigation");};var keyboard_action=function(e){if((e.keyCode||e.keyCode)==27){closeAll();location.hash="/";}};return{parse:parse};})();
/* http://www.cvtravel.co.uk/ProfileUIResources/JS/jquery/jquery.cycle.all.pack.js */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?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;}("(4($){8 m='2.22';8 n=$.20.21&&/2U 6.0/.1r(2V.2W);4 1B(){7(23.24&&23.24.1B)23.24.1B('[D] '+2X.2Y.2Z.30(31,''))};$.F.D=4(l){P B.1k(4(){l=l||{};7(l.2r==2s){32(l){25'33':7(B.12)1H(B.12);B.12=0;P;25'26':B.1j=1;P;25'34':B.1j=0;P;35:l={1l:l}}}7(B.12)1H(B.12);B.12=0;B.1j=0;8 c=$(B);8 d=l.27?$(l.27,B):c.36();8 e=d.37();7(e.M<2){1B('38; 39 3a 3b: '+e.M);P}8 f=$.3c({},$.F.D.2t,l||{},$.2u?c.2u():$.3d?c.3e():{});7(f.28)f.29=f.2a||e.M;f.H=f.H?[f.H]:[];f.1g=f.1g?[f.1g]:[];f.1g.2v(4(){f.2b=0});7(f.1s)f.1g.J(4(){1m(e,f,0,!f.1n)});7(n&&f.1I&&!f.2w)2c(d);8 g=B.3f;f.C=V((g.1C(/w:(\\d+)/)||[])[1])||f.C;f.A=V((g.1C(/h:(\\d+)/)||[])[1])||f.A;f.W=V((g.1C(/t:(\\d+)/)||[])[1])||f.W;7(c.u('1J')=='3g')c.u('1J','3h');7(f.C)c.C(f.C);7(f.A&&f.A!='1K')c.A(f.A);7(f.1o){f.1t=[];1D(8 i=0;i<e.M;i++)f.1t.J(i);f.1t.3i(4(a,b){P 3j.1o()-0.5});f.1p=0;f.1d=f.1t[0]}R 7(f.1d>=e.M)f.1d=0;8 h=f.1d||0;d.u({1J:'2x',x:0,9:0}).T().1k(4(i){8 z=h?i>=h?e.M-(i-h):h-i:e.M-i;$(B).u('z-1L',z)});$(e[h]).u('1e',1).S();7($.20.21)e[h].2y.2z('2d');7(f.1h&&f.C)d.C(f.C);7(f.1h&&f.A&&f.A!='1K')d.A(f.A);7(f.26)c.3k(4(){B.1j=1},4(){B.1j=0});8 j=$.F.D.L[f.1l];7($.2A(j))j(c,d,f);R 7(f.1l!='2e')1B('3l 3m: '+f.1l);d.1k(4(){8 a=$(B);B.X=(f.1h&&f.A)?f.A:a.A();B.Y=(f.1h&&f.C)?f.C:a.C()});f.y=f.y||{};f.I=f.I||{};f.G=f.G||{};d.1M(':2f('+h+')').u(f.y);7(f.1c)$(d[h]).u(f.1c);7(f.W){7(f.18.2r==2s)f.18={3n:3o,3p:3q}[f.18]||3r;7(!f.1N)f.18=f.18/2;3s((f.W-f.18)<3t)f.W+=f.18}7(f.2g)f.1O=f.1P=f.2g;7(!f.1u)f.1u=f.18;7(!f.1E)f.1E=f.18;f.2B=e.M;f.1i=h;7(f.1o){f.O=f.1i;7(++f.1p==e.M)f.1p=0;f.O=f.1t[f.1p]}R f.O=f.1d>=(e.M-1)?0:f.1d+1;8 k=d[h];7(f.H.M)f.H[0].1Q(k,[k,k,f,2C]);7(f.1g.M>1)f.1g[1].1Q(k,[k,k,f,2C]);7(f.1F&&!f.17)f.17=f.1F;7(f.17)$(f.17).2h('1F',4(){P 2i(e,f,f.1n?-1:1)});7(f.2j)$(f.2j).2h('1F',4(){P 2i(e,f,f.1n?1:-1)});7(f.1v)2D(e,f);f.3u=4(a){8 b=$(a),s=b[0];7(!f.2a)f.29++;e.J(s);7(f.19)f.19.J(s);f.2B=e.M;b.u('1J','2x').2E(c);7(n&&f.1I&&!f.2w)2c(b);7(f.1h&&f.C)b.C(f.C);7(f.1h&&f.A&&f.A!='1K')d.A(f.A);s.X=(f.1h&&f.A)?f.A:b.A();s.Y=(f.1h&&f.C)?f.C:b.C();b.u(f.y);7(1R f.Z=='4')f.Z(b)};7(f.W||f.1s)B.12=1S(4(){1m(e,f,0,!f.1n)},f.1s?10:f.W+(f.2F||0))})};4 1m(a,b,c,d){7(b.2b)P;8 p=a[0].1T,1w=a[b.1i],17=a[b.O];7(p.12===0&&!c)P;7(!c&&!p.1j&&((b.28&&(--b.29<=0))||(b.1U&&!b.1o&&b.O<b.1i))){7(b.2k)b.2k(b);P}7(c||!p.1j){7(b.H.M)$.1k(b.H,4(i,o){o.1Q(17,[1w,17,b,d])});8 e=4(){7($.20.21&&b.1I)B.2y.2z('2d');$.1k(b.1g,4(i,o){o.1Q(17,[1w,17,b,d])})};7(b.O!=b.1i){b.2b=1;7(b.1V)b.1V(1w,17,b,e,d);R 7($.2A($.F.D[b.1l]))$.F.D[b.1l](1w,17,b,e);R $.F.D.2e(1w,17,b,e)}7(b.1o){b.1i=b.O;7(++b.1p==a.M)b.1p=0;b.O=b.1t[b.1p]}R{8 f=(b.O+1)==a.M;b.O=f?0:b.O+1;b.1i=f?a.M-1:b.O-1}7(b.1v)$.F.D.2l(b.1v,b.1i)}7(b.W&&!b.1s)p.12=1S(4(){1m(a,b,0,!b.1n)},b.W);R 7(b.1s&&p.1j)p.12=1S(4(){1m(a,b,0,!b.1n)},10)};$.F.D.2l=4(a,b){$(a).3v('a').3w('2G').2d('a:2f('+b+')').3x('2G')};4 2i(a,b,c){8 p=a[0].1T,W=p.12;7(W){1H(W);p.12=0}b.O=b.1i+c;7(b.O<0){7(b.1U)P 1W;b.O=a.M-1}R 7(b.O>=a.M){7(b.1U)P 1W;b.O=0}7(b.1X&&1R b.1X=='4')b.1X(c>0,b.O,a[b.O]);1m(a,b,1,c>=0);P 1W};4 2D(b,c){8 d=$(c.1v);$.1k(b,4(i,o){8 a=(1R c.2m=='4')?$(c.2m(i,o)):$('<a 3y=\"#\">'+(i+1)+'</a>');7(a.3z('3A').M==0)a.2E(d);a.2h(c.2H,4(){c.O=i;8 p=b[0].1T,W=p.12;7(W){1H(W);p.12=0}7(1R c.2n=='4')c.2n(c.O,b[c.O]);1m(b,c,1,!c.1n);P 1W})});$.F.D.2l(c.1v,c.1d)};4 2c(b){4 1Y(s){8 s=V(s).3B(16);P s.M<2?'0'+s:s};4 2I(e){1D(;e&&e.3C.3D()!='3E';e=e.1T){8 v=$.u(e,'2J-2K');7(v.3F('3G')>=0){8 a=v.1C(/\\d+/g);P'#'+1Y(a[0])+1Y(a[1])+1Y(a[2])}7(v&&v!='3H')P v}P'#3I'};b.1k(4(){$(B).u('2J-2K',2I(B))})};$.F.D.2e=4(a,b,c,d){8 e=$(a),$n=$(b);$n.u(c.y);8 f=4(){$n.1Z(c.I,c.1u,c.1O,d)};e.1Z(c.G,c.1E,c.1P,4(){7(c.K)e.u(c.K);7(!c.1N)f()});7(c.1N)f()};$.F.D.L={2L:4(a,b,c){b.1M(':2f('+c.1d+')').u('1e',0);c.H.J(4(){$(B).S()});c.I={1e:1};c.G={1e:0};c.y={1e:0};c.K={N:'U'}}};$.F.D.3J=4(){P m};$.F.D.2t={1l:'2L',W:3K,1s:0,18:3L,1u:Q,1E:Q,17:Q,2j:Q,1X:Q,1v:Q,2n:Q,2H:'1F',2m:Q,H:Q,1g:Q,2k:Q,2g:Q,1O:Q,1P:Q,1G:Q,I:Q,G:Q,y:Q,K:Q,1V:Q,A:'1K',1d:0,1N:1,1o:0,1h:0,26:0,28:0,2a:0,2F:0,27:Q,1I:0,1U:0}})(2M);(4($){$.F.D.L.3M=4(d,e,f){d.u('14','1a');f.H.J(4(a,b,c){$(B).S();c.y.x=b.1x;c.G.x=0-a.1x});f.1c={x:0};f.I={x:0};f.K={N:'U'}};$.F.D.L.3N=4(d,e,f){d.u('14','1a');f.H.J(4(a,b,c){$(B).S();c.y.x=0-b.1x;c.G.x=a.1x});f.1c={x:0};f.I={x:0};f.K={N:'U'}};$.F.D.L.3O=4(d,e,f){d.u('14','1a');f.H.J(4(a,b,c){$(B).S();c.y.9=b.1y;c.G.9=0-a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3P=4(d,e,f){d.u('14','1a');f.H.J(4(a,b,c){$(B).S();c.y.9=0-b.1y;c.G.9=a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3Q=4(f,g,h){f.u('14','1a').C();h.H.J(4(a,b,c,d){$(B).S();8 e=a.1y,2o=b.1y;c.y=d?{9:2o}:{9:-2o};c.I.9=0;c.G.9=d?-e:e;g.1M(a).u(c.y)});h.1c={9:0};h.K={N:'U'}};$.F.D.L.3R=4(f,g,h){f.u('14','1a');h.H.J(4(a,b,c,d){$(B).S();8 e=a.1x,2p=b.1x;c.y=d?{x:-2p}:{x:2p};c.I.x=0;c.G.x=d?e:-e;g.1M(a).u(c.y)});h.1c={x:0};h.K={N:'U'}};$.F.D.L.3S=4(d,e,f){f.H.J(4(a,b,c){$(a).u('E',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={C:'S'};f.G={C:'T'}};$.F.D.L.3T=4(d,e,f){f.H.J(4(a,b,c){$(a).u('E',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={A:'S'};f.G={A:'T'}};$.F.D.L.1G=4(g,h,j){8 w=g.u('14','2N').C();h.u({9:0,x:0});j.H.J(4(){$(B).S()});j.18=j.18/2;j.1o=0;j.1G=j.1G||{9:-w,x:15};j.19=[];1D(8 i=0;i<h.M;i++)j.19.J(h[i]);1D(8 i=0;i<j.1d;i++)j.19.J(j.19.2O());j.1V=4(a,b,c,d,e){8 f=e?$(a):$(b);f.1Z(c.1G,c.1u,c.1O,4(){e?c.19.J(c.19.2O()):c.19.2v(c.19.3U());7(e)1D(8 i=0,2q=c.19.M;i<2q;i++)$(c.19[i]).u('z-1L',2q-i);R{8 z=$(a).u('z-1L');f.u('z-1L',V(z)+1)}f.1Z({9:0,x:0},c.1E,c.1P,4(){$(e?B:a).T();7(d)d()})})};j.Z=4(a){a.T()}};$.F.D.L.3V=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.y.x=b.X;c.I.A=b.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={A:0};f.I={x:0};f.G={A:0};f.K={N:'U'}};$.F.D.L.3W=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.I.A=b.X;c.G.x=a.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={x:0,A:0};f.G={A:0};f.K={N:'U'}};$.F.D.L.3X=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.y.9=b.Y;c.I.C=b.Y});f.Z=4(a){a.T()};f.y={C:0};f.I={9:0};f.G={C:0};f.K={N:'U'}};$.F.D.L.3Y=4(d,e,f){f.H.J(4(a,b,c){$(B).S();c.I.C=b.Y;c.G.9=a.Y});f.Z=4(a){a.T()};f.y={9:0,C:0};f.I={9:0};f.G={C:0};f.K={N:'U'}};$.F.D.L.2P=4(d,e,f){f.1c={x:0,9:0};f.K={N:'U'};f.H.J(4(a,b,c){$(B).S();c.y={C:0,A:0,x:b.X/2,9:b.Y/2};c.K={N:'U'};c.I={x:0,9:0,C:b.Y,A:b.X};c.G={C:0,A:0,x:a.X/2,9:a.Y/2};$(a).u('E',2);$(b).u('E',1)});f.Z=4(a){a.T()}};$.F.D.L.3Z=4(d,e,f){f.H.J(4(a,b,c){c.y={C:0,A:0,1e:1,9:b.Y/2,x:b.X/2,E:1};c.I={x:0,9:0,C:b.Y,A:b.X}});f.G={1e:0};f.K={E:0}};$.F.D.L.40=4(d,e,f){8 w=d.u('14','1a').C();e.S();f.H.J(4(a,b,c){$(a).u('E',1)});f.y={9:w,E:2};f.K={E:1};f.I={9:0};f.G={9:w}};$.F.D.L.41=4(d,e,f){8 h=d.u('14','1a').A();e.S();f.H.J(4(a,b,c){$(a).u('E',1)});f.y={x:h,E:2};f.K={E:1};f.I={x:0};f.G={x:h}};$.F.D.L.42=4(d,e,f){8 h=d.u('14','1a').A();8 w=d.C();e.S();f.H.J(4(a,b,c){$(a).u('E',1)});f.y={x:h,9:w,E:2};f.K={E:1};f.I={x:0,9:0};f.G={x:h,9:w}};$.F.D.L.43=4(d,e,f){f.H.J(4(a,b,c){c.y={9:B.Y/2,C:0,E:2};c.I={9:0,C:B.Y};c.G={9:0};$(a).u('E',1)});f.Z=4(a){a.T().u('E',1)}};$.F.D.L.44=4(d,e,f){f.H.J(4(a,b,c){c.y={x:B.X/2,A:0,E:2};c.I={x:0,A:B.X};c.G={x:0};$(a).u('E',1)});f.Z=4(a){a.T().u('E',1)}};$.F.D.L.45=4(d,e,f){f.H.J(4(a,b,c){c.y={9:b.Y/2,C:0,E:1,N:'1z'};c.I={9:0,C:B.Y};c.G={9:a.Y/2,C:0};$(a).u('E',2)});f.Z=4(a){a.T()};f.K={E:1,N:'U'}};$.F.D.L.46=4(d,e,f){f.H.J(4(a,b,c){c.y={x:b.X/2,A:0,E:1,N:'1z'};c.I={x:0,A:B.X};c.G={x:a.X/2,A:0};$(a).u('E',2)});f.Z=4(a){a.T()};f.K={E:1,N:'U'}};$.F.D.L.47=4(e,f,g){8 d=g.2Q||'9';8 w=e.u('14','1a').C();8 h=e.A();g.H.J(4(a,b,c){c.y=c.y||{};c.y.E=2;c.y.N='1z';7(d=='2R')c.y.9=-w;R 7(d=='2S')c.y.x=h;R 7(d=='2T')c.y.x=-h;R c.y.9=w;$(a).u('E',1)});7(!g.I)g.I={9:0,x:0};7(!g.G)g.G={9:0,x:0};g.K=g.K||{};g.K.E=2;g.K.N='U'};$.F.D.L.48=4(e,f,g){8 d=g.2Q||'9';8 w=e.u('14','1a').C();8 h=e.A();g.H.J(4(a,b,c){c.y.N='1z';7(d=='2R')c.G.9=w;R 7(d=='2S')c.G.x=-h;R 7(d=='2T')c.G.x=h;R c.G.9=-w;$(a).u('E',2);$(b).u('E',1)});g.Z=4(a){a.T()};7(!g.I)g.I={9:0,x:0};g.y=g.y||{};g.y.x=0;g.y.9=0;g.K=g.K||{};g.K.E=1;g.K.N='U'};$.F.D.L.49=4(d,e,f){8 w=d.u('14','2N').C();8 h=d.A();f.H.J(4(a,b,c){$(a).u('E',2);c.y.N='1z';7(!c.G.9&&!c.G.x)c.G={9:w*2,x:-h/2,1e:0};R c.G.1e=0});f.Z=4(a){a.T()};f.y={9:0,x:0,E:1,1e:1};f.I={9:0};f.K={E:2,N:'U'}};$.F.D.L.4a=4(o,p,q){8 w=o.u('14','1a').C();8 h=o.A();q.y=q.y||{};8 s;7(q.1f){7(/4b/.1r(q.1f))s='1q(1b 1b '+h+'11 1b)';R 7(/4c/.1r(q.1f))s='1q(1b '+w+'11 '+h+'11 '+w+'11)';R 7(/4d/.1r(q.1f))s='1q(1b '+w+'11 1b 1b)';R 7(/4e/.1r(q.1f))s='1q('+h+'11 '+w+'11 '+h+'11 1b)';R 7(/2P/.1r(q.1f)){8 t=V(h/2);8 l=V(w/2);s='1q('+t+'11 '+l+'11 '+t+'11 '+l+'11)'}}q.y.1f=q.y.1f||s||'1q(1b 1b 1b 1b)';8 d=q.y.1f.1C(/(\\d+)/g);8 t=V(d[0]),r=V(d[1]),b=V(d[2]),l=V(d[3]);q.H.J(4(g,i,j){7(g==i)P;8 k=$(g).u('E',2);8 m=$(i).u({E:3,N:'1z'});8 n=1,1A=V((j.1u/13))-1;4 f(){8 a=t?t-V(n*(t/1A)):0;8 c=l?l-V(n*(l/1A)):0;8 d=b<h?b+V(n*((h-b)/1A||1)):h;8 e=r<w?r+V(n*((w-r)/1A||1)):w;m.u({1f:'1q('+a+'11 '+e+'11 '+d+'11 '+c+'11)'});(n++<=1A)?1S(f,13):k.u('N','U')}f()});q.K={};q.I={9:0};q.G={9:0}}})(2M);",62,263,"||||function|||if|var|left|||||||||||||||||||||css|||top|cssBefore||height|this|width|cycle|zIndex|fn|animOut|before|animIn|push|cssAfter|transitions|length|display|nextSlide|return|null|else|show|hide|none|parseInt|timeout|cycleH|cycleW|onAddSlide||px|cycleTimeout||overflow|||next|speed|els|hidden|0px|cssFirst|startingSlide|opacity|clip|after|fit|currSlide|cyclePause|each|fx|go|rev|random|randomIndex|rect|test|continuous|randomMap|speedIn|pager|curr|offsetHeight|offsetWidth|block|count|log|match|for|speedOut|click|shuffle|clearTimeout|cleartype|position|auto|index|not|sync|easeIn|easeOut|apply|typeof|setTimeout|parentNode|nowrap|fxFn|false|prevNextClick|hex|animate|browser|msie||window|console|case|pause|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|advance|prev|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|constructor|String|defaults|metadata|unshift|cleartypeNoBg|absolute|style|removeAttribute|isFunction|slideCount|true|buildPager|appendTo|delay|activeSlide|pagerEvent|getBg|background|color|fade|jQuery|visible|shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|arguments|switch|stop|resume|default|children|get|terminating|too|few|slides|extend|meta|data|className|static|relative|sort|Math|hover|unknown|transition|slow|600|fast|200|400|while|250|addSlide|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t".split("|"),0,{}));
