// OverlayMe v0.13.0 // http://github.com/frontfoot/overlay_me // // Copyright (c) 2012 Joseph Boiteau, FrontFoot Media Solutions // OverlayMe is freely distributable under the MIT license. // // Includes: // - jQuery - http://jquery.com/ - Copyright 2011, John Resig // - Backbone.js - http://documentcloud.github.com/backbone - (c) 2010 Jeremy Ashkenas, DocumentCloud Inc. // - Underscore.js - http://documentcloud.github.com/underscore - (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. // - html5slider - https://github.com/fryn/html5slider - Copyright (c) 2010-2011 Frank Yan (function(window,undefined){var document=window.document,navigator=window.navigator,location=window.location;var OMjQuery=(function(){var OMjQuery=function(selector,context){return new OMjQuery.fn.init(selector,context,rootOMjQuery);},_OMjQuery=window.OMjQuery,_$=window.$o,rootOMjQuery,quickExpr=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rnotwhite=/\S/,trimLeft=/^\s+/,trimRight=/\s+$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,rdashAlpha=/-([a-z]|[0-9])/ig,rmsPrefix=/^-ms-/,fcamelCase=function(all,letter){return(letter+"").toUpperCase();},userAgent=navigator.userAgent,browserMatch,readyList,DOMContentLoaded,toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,class2type={};OMjQuery.fn=OMjQuery.prototype={constructor:OMjQuery,init:function(selector,context,rootOMjQuery){var match,elem,ret,doc;if(!selector){return this;} if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;} if(selector==="body"&&!context&&document.body){this.context=document;this[0]=document.body;this.selector=selector;this.length=1;return this;} if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null];}else{match=quickExpr.exec(selector);} if(match&&(match[1]||!context)){if(match[1]){context=context instanceof OMjQuery?context[0]:context;doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(OMjQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];OMjQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=OMjQuery.buildFragment([match[1]],[doc]);selector=(ret.cacheable?OMjQuery.clone(ret.fragment):ret.fragment).childNodes;} return OMjQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootOMjQuery.find(selector);} this.length=1;this[0]=elem;} this.context=document;this.selector=selector;return this;}}else if(!context||context.jquery){return(context||rootOMjQuery).find(selector);}else{return this.constructor(context).find(selector);}}else if(OMjQuery.isFunction(selector)){return rootOMjQuery.ready(selector);} if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;} return OMjQuery.makeArray(selector,this);},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this[this.length+num]:this[num]);},pushStack:function(elems,name,selector){var ret=this.constructor();if(OMjQuery.isArray(elems)){push.apply(ret,elems);}else{OMjQuery.merge(ret,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;},each:function(callback,args){return OMjQuery.each(this,callback,args);},ready:function(fn){OMjQuery.bindReady();readyList.add(fn);return this;},eq:function(i){i=+i;return i===-1?this.slice(i):this.slice(i,i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(OMjQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||this.constructor(null);},push:push,sort:[].sort,splice:[].splice};OMjQuery.fn.init.prototype=OMjQuery.fn;OMjQuery.extend=OMjQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;} if(typeof target!=="object"&&!OMjQuery.isFunction(target)){target={};} if(length===i){target=this;--i;} for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;} if(deep&©&&(OMjQuery.isPlainObject(copy)||(copyIsArray=OMjQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&OMjQuery.isArray(src)?src:[];}else{clone=src&&OMjQuery.isPlainObject(src)?src:{};} target[name]=OMjQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}} return target;};OMjQuery.extend({noConflict:function(deep){if(window.$o===OMjQuery){window.$o=_$;} if(deep&&window.OMjQuery===OMjQuery){window.OMjQuery=_OMjQuery;} return OMjQuery;},isReady:false,readyWait:1,holdReady:function(hold){if(hold){OMjQuery.readyWait++;}else{OMjQuery.ready(true);}},ready:function(wait){if((wait===true&&!--OMjQuery.readyWait)||(wait!==true&&!OMjQuery.isReady)){if(!document.body){return setTimeout(OMjQuery.ready,1);} OMjQuery.isReady=true;if(wait!==true&&--OMjQuery.readyWait>0){return;} readyList.fireWith(document,[OMjQuery]);if(OMjQuery.fn.trigger){OMjQuery(document).trigger("ready").off("ready");}}},bindReady:function(){if(readyList){return;} readyList=OMjQuery.Callbacks("once memory");if(document.readyState==="complete"){return setTimeout(OMjQuery.ready,1);} if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",OMjQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",OMjQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){} if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return OMjQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return OMjQuery.type(obj)==="array";},isWindow:function(obj){return obj!=null&&obj==obj.window;},isNumeric:function(obj){return!isNaN(parseFloat(obj))&&isFinite(obj);},type:function(obj){return obj==null?String(obj):class2type[toString.call(obj)]||"object";},isPlainObject:function(obj){if(!obj||OMjQuery.type(obj)!=="object"||obj.nodeType||OMjQuery.isWindow(obj)){return false;} try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false;}}catch(e){return false;} var key;for(key in obj){} return key===undefined||hasOwn.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;} return true;},error:function(msg){throw new Error(msg);},parseJSON:function(data){if(typeof data!=="string"||!data){return null;} data=OMjQuery.trim(data);if(window.JSON&&window.JSON.parse){return window.JSON.parse(data);} if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){return(new Function("return "+data))();} OMjQuery.error("Invalid JSON: "+data);},parseXML:function(data){if(typeof data!=="string"||!data){return null;} var xml,tmp;try{if(window.DOMParser){tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml");}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data);}}catch(e){xml=undefined;} if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){OMjQuery.error("Invalid XML: "+data);} return xml;},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){(window.execScript||function(data){window["eval"].call(window,data);})(data);}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||OMjQuery.isFunction(object);if(args){if(isObj){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(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(;i<length;){if(callback.call(object[i],i,object[i++])===false){break;}}}} return object;},trim:trim?function(text){return text==null?"":trim.call(text);}:function(text){return text==null?"":text.toString().replace(trimLeft,"").replace(trimRight,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){var type=OMjQuery.type(array);if(array.length==null||type==="string"||type==="function"||type==="regexp"||OMjQuery.isWindow(array)){push.call(ret,array);}else{OMjQuery.merge(ret,array);}} return ret;},inArray:function(elem,array,i){var len;if(array){if(indexOf){return indexOf.call(array,elem,i);} len=array.length;i=i?i<0?Math.max(0,len+i):i:0;for(;i<len;i++){if(i in array&&array[i]===elem){return i;}}} return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}} first.length=i;return first;},grep:function(elems,callback,inv){var ret=[],retVal;inv=!!inv;for(var i=0,length=elems.length;i<length;i++){retVal=!!callback(elems[i],i);if(inv!==retVal){ret.push(elems[i]);}} return ret;},map:function(elems,callback,arg){var value,key,ret=[],i=0,length=elems.length,isArray=elems instanceof OMjQuery||length!==undefined&&typeof length==="number"&&((length>0&&elems[0]&&elems[length-1])||length===0||OMjQuery.isArray(elems));if(isArray){for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}}else{for(key in elems){value=callback(elems[key],key,arg);if(value!=null){ret[ret.length]=value;}}} return ret.concat.apply([],ret);},guid:1,proxy:function(fn,context){if(typeof context==="string"){var tmp=fn[context];context=fn;fn=tmp;} if(!OMjQuery.isFunction(fn)){return undefined;} var args=slice.call(arguments,2),proxy=function(){return fn.apply(context,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||proxy.guid||OMjQuery.guid++;return proxy;},access:function(elems,fn,key,value,chainable,emptyGet,pass){var exec,bulk=key==null,i=0,length=elems.length;if(key&&typeof key==="object"){for(i in key){OMjQuery.access(elems,fn,i,key[i],1,emptyGet,value);} chainable=1;}else if(value!==undefined){exec=pass===undefined&&OMjQuery.isFunction(value);if(bulk){if(exec){exec=fn;fn=function(elem,key,value){return exec.call(OMjQuery(elem),value);};}else{fn.call(elems,value);fn=null;}} if(fn){for(;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);}} chainable=1;} return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet;},now:function(){return(new Date()).getTime();},uaMatch:function(ua){ua=ua.toLowerCase();var match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},sub:function(){function OMjQuerySub(selector,context){return new OMjQuerySub.fn.init(selector,context);} OMjQuery.extend(true,OMjQuerySub,this);OMjQuerySub.superclass=this;OMjQuerySub.fn=OMjQuerySub.prototype=this();OMjQuerySub.fn.constructor=OMjQuerySub;OMjQuerySub.sub=this.sub;OMjQuerySub.fn.init=function init(selector,context){if(context&&context instanceof OMjQuery&&!(context instanceof OMjQuerySub)){context=OMjQuerySub(context);} return OMjQuery.fn.init.call(this,selector,context,rootOMjQuerySub);};OMjQuerySub.fn.init.prototype=OMjQuerySub.fn;var rootOMjQuerySub=OMjQuerySub(document);return OMjQuerySub;},browser:{}});OMjQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});browserMatch=OMjQuery.uaMatch(userAgent);if(browserMatch.browser){OMjQuery.browser[browserMatch.browser]=true;OMjQuery.browser.version=browserMatch.version;} if(OMjQuery.browser.webkit){OMjQuery.browser.safari=true;} if(rnotwhite.test("\xA0")){trimLeft=/^[\s\xA0]+/;trimRight=/[\s\xA0]+$/;} rootOMjQuery=OMjQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);OMjQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);OMjQuery.ready();}};} function doScrollCheck(){if(OMjQuery.isReady){return;} try{document.documentElement.doScroll("left");}catch(e){setTimeout(doScrollCheck,1);return;} OMjQuery.ready();} return OMjQuery;})();var flagsCache={};function createFlags(flags){var object=flagsCache[flags]={},i,length;flags=flags.split(/\s+/);for(i=0,length=flags.length;i<length;i++){object[flags[i]]=true;} return object;} OMjQuery.Callbacks=function(flags){flags=flags?(flagsCache[flags]||createFlags(flags)):{};var list=[],stack=[],memory,fired,firing,firingStart,firingLength,firingIndex,add=function(args){var i,length,elem,type,actual;for(i=0,length=args.length;i<length;i++){elem=args[i];type=OMjQuery.type(elem);if(type==="array"){add(elem);}else if(type==="function"){if(!flags.unique||!self.has(elem)){list.push(elem);}}}},fire=function(context,args){args=args||[];memory=!flags.memory||[context,args];fired=true;firing=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(context,args)===false&&flags.stopOnFalse){memory=true;break;}} firing=false;if(list){if(!flags.once){if(stack&&stack.length){memory=stack.shift();self.fireWith(memory[0],memory[1]);}}else if(memory===true){self.disable();}else{list=[];}}},self={add:function(){if(list){var length=list.length;add(arguments);if(firing){firingLength=list.length;}else if(memory&&memory!==true){firingStart=length;fire(memory[0],memory[1]);}} return this;},remove:function(){if(list){var args=arguments,argIndex=0,argLength=args.length;for(;argIndex<argLength;argIndex++){for(var i=0;i<list.length;i++){if(args[argIndex]===list[i]){if(firing){if(i<=firingLength){firingLength--;if(i<=firingIndex){firingIndex--;}}} list.splice(i--,1);if(flags.unique){break;}}}}} return this;},has:function(fn){if(list){var i=0,length=list.length;for(;i<length;i++){if(fn===list[i]){return true;}}} return false;},empty:function(){list=[];return this;},disable:function(){list=stack=memory=undefined;return this;},disabled:function(){return!list;},lock:function(){stack=undefined;if(!memory||memory===true){self.disable();} return this;},locked:function(){return!stack;},fireWith:function(context,args){if(stack){if(firing){if(!flags.once){stack.push([context,args]);}}else if(!(flags.once&&memory)){fire(context,args);}} return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};var sliceDeferred=[].slice;OMjQuery.extend({Deferred:function(func){var doneList=OMjQuery.Callbacks("once memory"),failList=OMjQuery.Callbacks("once memory"),progressList=OMjQuery.Callbacks("memory"),state="pending",lists={resolve:doneList,reject:failList,notify:progressList},promise={done:doneList.add,fail:failList.add,progress:progressList.add,state:function(){return state;},isResolved:doneList.fired,isRejected:failList.fired,then:function(doneCallbacks,failCallbacks,progressCallbacks){deferred.done(doneCallbacks).fail(failCallbacks).progress(progressCallbacks);return this;},always:function(){deferred.done.apply(deferred,arguments).fail.apply(deferred,arguments);return this;},pipe:function(fnDone,fnFail,fnProgress){return OMjQuery.Deferred(function(newDefer){OMjQuery.each({done:[fnDone,"resolve"],fail:[fnFail,"reject"],progress:[fnProgress,"notify"]},function(handler,data){var fn=data[0],action=data[1],returned;if(OMjQuery.isFunction(fn)){deferred[handler](function(){returned=fn.apply(this,arguments);if(returned&&OMjQuery.isFunction(returned.promise)){returned.promise().then(newDefer.resolve,newDefer.reject,newDefer.notify);}else{newDefer[action+"With"](this===deferred?newDefer:this,[returned]);}});}else{deferred[handler](newDefer[action]);}});}).promise();},promise:function(obj){if(obj==null){obj=promise;}else{for(var key in promise){obj[key]=promise[key];}} return obj;}},deferred=promise.promise({}),key;for(key in lists){deferred[key]=lists[key].fire;deferred[key+"With"]=lists[key].fireWith;} deferred.done(function(){state="resolved";},failList.disable,progressList.lock).fail(function(){state="rejected";},doneList.disable,progressList.lock);if(func){func.call(deferred,deferred);} return deferred;},when:function(firstParam){var args=sliceDeferred.call(arguments,0),i=0,length=args.length,pValues=new Array(length),count=length,pCount=length,deferred=length<=1&&firstParam&&OMjQuery.isFunction(firstParam.promise)?firstParam:OMjQuery.Deferred(),promise=deferred.promise();function resolveFunc(i){return function(value){args[i]=arguments.length>1?sliceDeferred.call(arguments,0):value;if(!(--count)){deferred.resolveWith(deferred,args);}};} function progressFunc(i){return function(value){pValues[i]=arguments.length>1?sliceDeferred.call(arguments,0):value;deferred.notifyWith(promise,pValues);};} if(length>1){for(;i<length;i++){if(args[i]&&args[i].promise&&OMjQuery.isFunction(args[i].promise)){args[i].promise().then(resolveFunc(i),deferred.reject,progressFunc(i));}else{--count;}} if(!count){deferred.resolveWith(deferred,args);}}else if(deferred!==firstParam){deferred.resolveWith(deferred,length?[firstParam]:[]);} return promise;}});OMjQuery.support=(function(){var support,all,a,select,opt,input,fragment,tds,events,eventName,i,isSupported,div=document.createElement("div"),documentElement=document.documentElement;div.setAttribute("className","t");div.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";all=div.getElementsByTagName("*");a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return{};} select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];support={leadingWhitespace:(div.firstChild.nodeType===3),tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:(a.getAttribute("href")==="/a"),opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:(input.value==="on"),optSelected:opt.selected,getSetAttribute:div.className!=="t",enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};OMjQuery.boxModel=support.boxModel=(document.compatMode==="CSS1Compat");input.checked=true;support.noCloneChecked=input.cloneNode(true).checked;select.disabled=true;support.optDisabled=!opt.disabled;try{delete div.test;}catch(e){support.deleteExpando=false;} if(!div.addEventListener&&div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){support.noCloneEvent=false;});div.cloneNode(true).fireEvent("onclick");} input=document.createElement("input");input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t";input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);fragment=document.createDocumentFragment();fragment.appendChild(div.lastChild);support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;support.appendChecked=input.checked;fragment.removeChild(input);fragment.appendChild(div);if(div.attachEvent){for(i in{submit:1,change:1,focusin:1}){eventName="on"+i;isSupported=(eventName in div);if(!isSupported){div.setAttribute(eventName,"return;");isSupported=(typeof div[eventName]==="function");} support[i+"Bubbles"]=isSupported;}} fragment.removeChild(div);fragment=select=opt=div=input=null;OMjQuery(function(){var container,outer,inner,table,td,offsetSupport,marginDiv,conMarginTop,style,html,positionTopLeftWidthHeight,paddingMarginBorderVisibility,paddingMarginBorder,body=document.getElementsByTagName("body")[0];if(!body){return;} conMarginTop=1;paddingMarginBorder="padding:0;margin:0;border:";positionTopLeftWidthHeight="position:absolute;top:0;left:0;width:1px;height:1px;";paddingMarginBorderVisibility=paddingMarginBorder+"0;visibility:hidden;";style="style='"+positionTopLeftWidthHeight+paddingMarginBorder+"5px solid #000;";html="<div "+style+"display:block;'><div style='"+paddingMarginBorder+"0;display:block;overflow:hidden;'></div></div>"+"<table "+style+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";container=document.createElement("div");container.style.cssText=paddingMarginBorderVisibility+"width:0;height:0;position:static;top:0;margin-top:"+conMarginTop+"px";body.insertBefore(container,body.firstChild);div=document.createElement("div");container.appendChild(div);div.innerHTML="<table><tr><td style='"+paddingMarginBorder+"0;display:none'></td><td>t</td></tr></table>";tds=div.getElementsByTagName("td");isSupported=(tds[0].offsetHeight===0);tds[0].style.display="";tds[1].style.display="none";support.reliableHiddenOffsets=isSupported&&(tds[0].offsetHeight===0);if(window.getComputedStyle){div.innerHTML="";marginDiv=document.createElement("div");marginDiv.style.width="0";marginDiv.style.marginRight="0";div.style.width="2px";div.appendChild(marginDiv);support.reliableMarginRight=(parseInt((window.getComputedStyle(marginDiv,null)||{marginRight:0}).marginRight,10)||0)===0;} if(typeof div.style.zoom!=="undefined"){div.innerHTML="";div.style.width=div.style.padding="1px";div.style.border=0;div.style.overflow="hidden";div.style.display="inline";div.style.zoom=1;support.inlineBlockNeedsLayout=(div.offsetWidth===3);div.style.display="block";div.style.overflow="visible";div.innerHTML="<div style='width:5px;'></div>";support.shrinkWrapBlocks=(div.offsetWidth!==3);} div.style.cssText=positionTopLeftWidthHeight+paddingMarginBorderVisibility;div.innerHTML=html;outer=div.firstChild;inner=outer.firstChild;td=outer.nextSibling.firstChild.firstChild;offsetSupport={doesNotAddBorder:(inner.offsetTop!==5),doesAddBorderForTableAndCells:(td.offsetTop===5)};inner.style.position="fixed";inner.style.top="20px";offsetSupport.fixedPosition=(inner.offsetTop===20||inner.offsetTop===15);inner.style.position=inner.style.top="";outer.style.overflow="hidden";outer.style.position="relative";offsetSupport.subtractsBorderForOverflowNotVisible=(inner.offsetTop===-5);offsetSupport.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==conMarginTop);if(window.getComputedStyle){div.style.marginTop="1%";support.pixelMargin=(window.getComputedStyle(div,null)||{marginTop:0}).marginTop!=="1%";} if(typeof container.style.zoom!=="undefined"){container.style.zoom=1;} body.removeChild(container);marginDiv=div=container=null;OMjQuery.extend(support,offsetSupport);});return support;})();var rbrace=/^(?:\{.*\}|\[.*\])$/,rmultiDash=/([A-Z])/g;OMjQuery.extend({cache:{},uuid:0,expando:"OMjQuery"+(OMjQuery.fn.jquery+Math.random()).replace(/\D/g,""),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},hasData:function(elem){elem=elem.nodeType?OMjQuery.cache[elem[OMjQuery.expando]]:elem[OMjQuery.expando];return!!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data,pvt){if(!OMjQuery.acceptData(elem)){return;} var privateCache,thisCache,ret,internalKey=OMjQuery.expando,getByName=typeof name==="string",isNode=elem.nodeType,cache=isNode?OMjQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey,isEvents=name==="events";if((!id||!cache[id]||(!isEvents&&!pvt&&!cache[id].data))&&getByName&&data===undefined){return;} if(!id){if(isNode){elem[internalKey]=id=++OMjQuery.uuid;}else{id=internalKey;}} if(!cache[id]){cache[id]={};if(!isNode){cache[id].toJSON=OMjQuery.noop;}} if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=OMjQuery.extend(cache[id],name);}else{cache[id].data=OMjQuery.extend(cache[id].data,name);}} privateCache=thisCache=cache[id];if(!pvt){if(!thisCache.data){thisCache.data={};} thisCache=thisCache.data;} if(data!==undefined){thisCache[OMjQuery.camelCase(name)]=data;} if(isEvents&&!thisCache[name]){return privateCache.events;} if(getByName){ret=thisCache[name];if(ret==null){ret=thisCache[OMjQuery.camelCase(name)];}}else{ret=thisCache;} return ret;},removeData:function(elem,name,pvt){if(!OMjQuery.acceptData(elem)){return;} var thisCache,i,l,internalKey=OMjQuery.expando,isNode=elem.nodeType,cache=isNode?OMjQuery.cache:elem,id=isNode?elem[internalKey]:internalKey;if(!cache[id]){return;} if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!OMjQuery.isArray(name)){if(name in thisCache){name=[name];}else{name=OMjQuery.camelCase(name);if(name in thisCache){name=[name];}else{name=name.split(" ");}}} for(i=0,l=name.length;i<l;i++){delete thisCache[name[i]];} if(!(pvt?isEmptyDataObject:OMjQuery.isEmptyObject)(thisCache)){return;}}} if(!pvt){delete cache[id].data;if(!isEmptyDataObject(cache[id])){return;}} if(OMjQuery.support.deleteExpando||!cache.setInterval){delete cache[id];}else{cache[id]=null;} if(isNode){if(OMjQuery.support.deleteExpando){delete elem[internalKey];}else if(elem.removeAttribute){elem.removeAttribute(internalKey);}else{elem[internalKey]=null;}}},_data:function(elem,name,data){return OMjQuery.data(elem,name,data,true);},acceptData:function(elem){if(elem.nodeName){var match=OMjQuery.noData[elem.nodeName.toLowerCase()];if(match){return!(match===true||elem.getAttribute("classid")!==match);}} return true;}});OMjQuery.fn.extend({data:function(key,value){var parts,part,attr,name,l,elem=this[0],i=0,data=null;if(key===undefined){if(this.length){data=OMjQuery.data(elem);if(elem.nodeType===1&&!OMjQuery._data(elem,"parsedAttrs")){attr=elem.attributes;for(l=attr.length;i<l;i++){name=attr[i].name;if(name.indexOf("data-")===0){name=OMjQuery.camelCase(name.substring(5));dataAttr(elem,name,data[name]);}} OMjQuery._data(elem,"parsedAttrs",true);}} return data;} if(typeof key==="object"){return this.each(function(){OMjQuery.data(this,key);});} parts=key.split(".",2);parts[1]=parts[1]?"."+parts[1]:"";part=parts[1]+"!";return OMjQuery.access(this,function(value){if(value===undefined){data=this.triggerHandler("getData"+part,[parts[0]]);if(data===undefined&&elem){data=OMjQuery.data(elem,key);data=dataAttr(elem,key,data);} return data===undefined&&parts[1]?this.data(parts[0]):data;} parts[1]=value;this.each(function(){var self=OMjQuery(this);self.triggerHandler("setData"+part,parts);OMjQuery.data(this,key,value);self.triggerHandler("changeData"+part,parts);});},null,value,arguments.length>1,null,false);},removeData:function(key){return this.each(function(){OMjQuery.removeData(this,key);});}});function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:OMjQuery.isNumeric(data)?+data:rbrace.test(data)?OMjQuery.parseJSON(data):data;}catch(e){} OMjQuery.data(elem,key,data);}else{data=undefined;}} return data;} function isEmptyDataObject(obj){for(var name in obj){if(name==="data"&&OMjQuery.isEmptyObject(obj[name])){continue;} if(name!=="toJSON"){return false;}} return true;} function handleQueueMarkDefer(elem,type,src){var deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",defer=OMjQuery._data(elem,deferDataKey);if(defer&&(src==="queue"||!OMjQuery._data(elem,queueDataKey))&&(src==="mark"||!OMjQuery._data(elem,markDataKey))){setTimeout(function(){if(!OMjQuery._data(elem,queueDataKey)&&!OMjQuery._data(elem,markDataKey)){OMjQuery.removeData(elem,deferDataKey,true);defer.fire();}},0);}} OMjQuery.extend({_mark:function(elem,type){if(elem){type=(type||"fx")+"mark";OMjQuery._data(elem,type,(OMjQuery._data(elem,type)||0)+1);}},_unmark:function(force,elem,type){if(force!==true){type=elem;elem=force;force=false;} if(elem){type=type||"fx";var key=type+"mark",count=force?0:((OMjQuery._data(elem,key)||1)-1);if(count){OMjQuery._data(elem,key,count);}else{OMjQuery.removeData(elem,key,true);handleQueueMarkDefer(elem,type,"mark");}}},queue:function(elem,type,data){var q;if(elem){type=(type||"fx")+"queue";q=OMjQuery._data(elem,type);if(data){if(!q||OMjQuery.isArray(data)){q=OMjQuery._data(elem,type,OMjQuery.makeArray(data));}else{q.push(data);}} return q||[];}},dequeue:function(elem,type){type=type||"fx";var queue=OMjQuery.queue(elem,type),fn=queue.shift(),hooks={};if(fn==="inprogress"){fn=queue.shift();} if(fn){if(type==="fx"){queue.unshift("inprogress");} OMjQuery._data(elem,type+".run",hooks);fn.call(elem,function(){OMjQuery.dequeue(elem,type);},hooks);} if(!queue.length){OMjQuery.removeData(elem,type+"queue "+type+".run",true);handleQueueMarkDefer(elem,type,"queue");}}});OMjQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;} if(arguments.length<setter){return OMjQuery.queue(this[0],type);} return data===undefined?this:this.each(function(){var queue=OMjQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){OMjQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){OMjQuery.dequeue(this,type);});},delay:function(time,type){time=OMjQuery.fx?OMjQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout);};});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,object){if(typeof type!=="string"){object=type;type=undefined;} type=type||"fx";var defer=OMjQuery.Deferred(),elements=this,i=elements.length,count=1,deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",tmp;function resolve(){if(!(--count)){defer.resolveWith(elements,[elements]);}} while(i--){if((tmp=OMjQuery.data(elements[i],deferDataKey,undefined,true)||(OMjQuery.data(elements[i],queueDataKey,undefined,true)||OMjQuery.data(elements[i],markDataKey,undefined,true))&&OMjQuery.data(elements[i],deferDataKey,OMjQuery.Callbacks("once memory"),true))){count++;tmp.add(resolve);}} resolve();return defer.promise(object);}});var rclass=/[\n\t\r]/g,rspace=/\s+/,rreturn=/\r/g,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,rclickable=/^a(?:rea)?$/i,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,getSetAttribute=OMjQuery.support.getSetAttribute,nodeHook,boolHook,fixSpecified;OMjQuery.fn.extend({attr:function(name,value){return OMjQuery.access(this,OMjQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){OMjQuery.removeAttr(this,name);});},prop:function(name,value){return OMjQuery.access(this,OMjQuery.prop,name,value,arguments.length>1);},removeProp:function(name){name=OMjQuery.propFix[name]||name;return this.each(function(){try{this[name]=undefined;delete this[name];}catch(e){}});},addClass:function(value){var classNames,i,l,elem,setClass,c,cl;if(OMjQuery.isFunction(value)){return this.each(function(j){OMjQuery(this).addClass(value.call(this,j,this.className));});} if(value&&typeof value==="string"){classNames=value.split(rspace);for(i=0,l=this.length;i<l;i++){elem=this[i];if(elem.nodeType===1){if(!elem.className&&classNames.length===1){elem.className=value;}else{setClass=" "+elem.className+" ";for(c=0,cl=classNames.length;c<cl;c++){if(!~setClass.indexOf(" "+classNames[c]+" ")){setClass+=classNames[c]+" ";}} elem.className=OMjQuery.trim(setClass);}}}} return this;},removeClass:function(value){var classNames,i,l,elem,className,c,cl;if(OMjQuery.isFunction(value)){return this.each(function(j){OMjQuery(this).removeClass(value.call(this,j,this.className));});} if((value&&typeof value==="string")||value===undefined){classNames=(value||"").split(rspace);for(i=0,l=this.length;i<l;i++){elem=this[i];if(elem.nodeType===1&&elem.className){if(value){className=(" "+elem.className+" ").replace(rclass," ");for(c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");} elem.className=OMjQuery.trim(className);}else{elem.className="";}}}} return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(OMjQuery.isFunction(value)){return this.each(function(i){OMjQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal);});} return this.each(function(){if(type==="string"){var className,i=0,self=OMjQuery(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){OMjQuery._data(this,"__className__",this.className);} this.className=this.className||value===false?"":OMjQuery._data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i<l;i++){if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}} return false;},val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=OMjQuery.valHooks[elem.type]||OMjQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;} ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret;} return;} isFunction=OMjQuery.isFunction(value);return this.each(function(i){var self=OMjQuery(this),val;if(this.nodeType!==1){return;} if(isFunction){val=value.call(this,i,self.val());}else{val=value;} if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(OMjQuery.isArray(val)){val=OMjQuery.map(val,function(value){return value==null?"":value+"";});} hooks=OMjQuery.valHooks[this.type]||OMjQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});OMjQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text;}},select:{get:function(elem){var value,i,max,option,index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;} i=one?index:0;max=one?index+1:options.length;for(;i<max;i++){option=options[i];if(option.selected&&(OMjQuery.support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!OMjQuery.nodeName(option.parentNode,"optgroup"))){value=OMjQuery(option).val();if(one){return value;} values.push(value);}} if(one&&!values.length&&options.length){return OMjQuery(options[index]).val();} return values;},set:function(elem,value){var values=OMjQuery.makeArray(value);OMjQuery(elem).find("option").each(function(){this.selected=OMjQuery.inArray(OMjQuery(this).val(),values)>=0;});if(!values.length){elem.selectedIndex=-1;} return values;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;} if(pass&&name in OMjQuery.attrFn){return OMjQuery(elem)[name](value);} if(typeof elem.getAttribute==="undefined"){return OMjQuery.prop(elem,name,value);} notxml=nType!==1||!OMjQuery.isXMLDoc(elem);if(notxml){name=name.toLowerCase();hooks=OMjQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook);} if(value!==undefined){if(value===null){OMjQuery.removeAttr(elem,name);return;}else if(hooks&&"set"in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,""+value);return value;}}else if(hooks&&"get"in hooks&¬xml&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=elem.getAttribute(name);return ret===null?undefined:ret;}},removeAttr:function(elem,value){var propName,attrNames,name,l,isBool,i=0;if(value&&elem.nodeType===1){attrNames=value.toLowerCase().split(rspace);l=attrNames.length;for(;i<l;i++){name=attrNames[i];if(name){propName=OMjQuery.propFix[name]||name;isBool=rboolean.test(name);if(!isBool){OMjQuery.attr(elem,name,"");} elem.removeAttribute(getSetAttribute?name:propName);if(isBool&&propName in elem){elem[propName]=false;}}}}},attrHooks:{type:{set:function(elem,value){if(rtype.test(elem.nodeName)&&elem.parentNode){OMjQuery.error("type property can't be changed");}else if(!OMjQuery.support.radioValue&&value==="radio"&&OMjQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;} return value;}}},value:{get:function(elem,name){if(nodeHook&&OMjQuery.nodeName(elem,"button")){return nodeHook.get(elem,name);} return name in elem?elem.value:null;},set:function(elem,value,name){if(nodeHook&&OMjQuery.nodeName(elem,"button")){return nodeHook.set(elem,value,name);} elem.value=value;}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;} notxml=nType!==1||!OMjQuery.isXMLDoc(elem);if(notxml){name=OMjQuery.propFix[name]||name;hooks=OMjQuery.propHooks[name];} if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{return(elem[name]=value);}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}else{return elem[name];}}},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}}}});OMjQuery.attrHooks.tabindex=OMjQuery.propHooks.tabIndex;boolHook={get:function(elem,name){var attrNode,property=OMjQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){OMjQuery.removeAttr(elem,name);}else{propName=OMjQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;} elem.setAttribute(name,name.toLowerCase());} return name;}};if(!getSetAttribute){fixSpecified={name:true,id:true,coords:true};nodeHook=OMjQuery.valHooks.button={get:function(elem,name){var ret;ret=elem.getAttributeNode(name);return ret&&(fixSpecified[name]?ret.nodeValue!=="":ret.specified)?ret.nodeValue:undefined;},set:function(elem,value,name){var ret=elem.getAttributeNode(name);if(!ret){ret=document.createAttribute(name);elem.setAttributeNode(ret);} return(ret.nodeValue=value+"");}};OMjQuery.attrHooks.tabindex.set=nodeHook.set;OMjQuery.each(["width","height"],function(i,name){OMjQuery.attrHooks[name]=OMjQuery.extend(OMjQuery.attrHooks[name],{set:function(elem,value){if(value===""){elem.setAttribute(name,"auto");return value;}}});});OMjQuery.attrHooks.contenteditable={get:nodeHook.get,set:function(elem,value,name){if(value===""){value="false";} nodeHook.set(elem,value,name);}};} if(!OMjQuery.support.hrefNormalized){OMjQuery.each(["href","src","width","height"],function(i,name){OMjQuery.attrHooks[name]=OMjQuery.extend(OMjQuery.attrHooks[name],{get:function(elem){var ret=elem.getAttribute(name,2);return ret===null?undefined:ret;}});});} if(!OMjQuery.support.style){OMjQuery.attrHooks.style={get:function(elem){return elem.style.cssText.toLowerCase()||undefined;},set:function(elem,value){return(elem.style.cssText=""+value);}};} if(!OMjQuery.support.optSelected){OMjQuery.propHooks.selected=OMjQuery.extend(OMjQuery.propHooks.selected,{get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}} return null;}});} if(!OMjQuery.support.enctype){OMjQuery.propFix.enctype="encoding";} if(!OMjQuery.support.checkOn){OMjQuery.each(["radio","checkbox"],function(){OMjQuery.valHooks[this]={get:function(elem){return elem.getAttribute("value")===null?"on":elem.value;}};});} OMjQuery.each(["radio","checkbox"],function(){OMjQuery.valHooks[this]=OMjQuery.extend(OMjQuery.valHooks[this],{set:function(elem,value){if(OMjQuery.isArray(value)){return(elem.checked=OMjQuery.inArray(OMjQuery(elem).val(),value)>=0);}}});});var rformElems=/^(?:textarea|input|select)$/i,rtypenamespace=/^([^\.]*)?(?:\.(.+))?$/,rhoverHack=/(?:^|\s)hover(\.\S+)?\b/,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rquickIs=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,quickParse=function(selector){var quick=rquickIs.exec(selector);if(quick){quick[1]=(quick[1]||"").toLowerCase();quick[3]=quick[3]&&new RegExp("(?:^|\\s)"+quick[3]+"(?:\\s|$)");} return quick;},quickIs=function(elem,m){var attrs=elem.attributes||{};return((!m[1]||elem.nodeName.toLowerCase()===m[1])&&(!m[2]||(attrs.id||{}).value===m[2])&&(!m[3]||m[3].test((attrs["class"]||{}).value)));},hoverHack=function(events){return OMjQuery.event.special.hover?events:events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};OMjQuery.event={add:function(elem,types,handler,data,selector){var elemData,eventHandle,events,t,tns,type,namespaces,handleObj,handleObjIn,quick,handlers,special;if(elem.nodeType===3||elem.nodeType===8||!types||!handler||!(elemData=OMjQuery._data(elem))){return;} if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;} if(!handler.guid){handler.guid=OMjQuery.guid++;} events=elemData.events;if(!events){elemData.events=events={};} eventHandle=elemData.handle;if(!eventHandle){elemData.handle=eventHandle=function(e){return typeof OMjQuery!=="undefined"&&(!e||OMjQuery.event.triggered!==e.type)?OMjQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined;};eventHandle.elem=elem;} types=OMjQuery.trim(hoverHack(types)).split(" ");for(t=0;t<types.length;t++){tns=rtypenamespace.exec(types[t])||[];type=tns[1];namespaces=(tns[2]||"").split(".").sort();special=OMjQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=OMjQuery.event.special[type]||{};handleObj=OMjQuery.extend({type:type,origType:tns[1],data:data,handler:handler,guid:handler.guid,selector:selector,quick:selector&&quickParse(selector),namespace:namespaces.join(".")},handleObjIn);handlers=events[type];if(!handlers){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}} if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}} if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);} OMjQuery.event.global[type]=true;} elem=null;},global:{},remove:function(elem,types,handler,selector,mappedTypes){var elemData=OMjQuery.hasData(elem)&&OMjQuery._data(elem),t,tns,type,origType,namespaces,origCount,j,events,special,handle,eventType,handleObj;if(!elemData||!(events=elemData.events)){return;} types=OMjQuery.trim(hoverHack(types||"")).split(" ");for(t=0;t<types.length;t++){tns=rtypenamespace.exec(types[t])||[];type=origType=tns[1];namespaces=tns[2];if(!type){for(type in events){OMjQuery.event.remove(elem,type+types[t],handler,selector,true);} continue;} special=OMjQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;eventType=events[type]||[];origCount=eventType.length;namespaces=namespaces?new RegExp("(^|\\.)"+namespaces.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(j=0;j<eventType.length;j++){handleObj=eventType[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!namespaces||namespaces.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){eventType.splice(j--,1);if(handleObj.selector){eventType.delegateCount--;} if(special.remove){special.remove.call(elem,handleObj);}}} if(eventType.length===0&&origCount!==eventType.length){if(!special.teardown||special.teardown.call(elem,namespaces)===false){OMjQuery.removeEvent(elem,type,elemData.handle);} delete events[type];}} if(OMjQuery.isEmptyObject(events)){handle=elemData.handle;if(handle){handle.elem=null;} OMjQuery.removeData(elem,["events","handle"],true);}},customEvent:{"getData":true,"setData":true,"changeData":true},trigger:function(event,data,elem,onlyHandlers){if(elem&&(elem.nodeType===3||elem.nodeType===8)){return;} var type=event.type||event,namespaces=[],cache,exclusive,i,cur,old,ontype,special,handle,eventPath,bubbleType;if(rfocusMorph.test(type+OMjQuery.event.triggered)){return;} if(type.indexOf("!")>=0){type=type.slice(0,-1);exclusive=true;} if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();} if((!elem||OMjQuery.event.customEvent[type])&&!OMjQuery.event.global[type]){return;} event=typeof event==="object"?event[OMjQuery.expando]?event:new OMjQuery.Event(type,event):new OMjQuery.Event(type);event.type=type;event.isTrigger=true;event.exclusive=exclusive;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;ontype=type.indexOf(":")<0?"on"+type:"";if(!elem){cache=OMjQuery.cache;for(i in cache){if(cache[i].events&&cache[i].events[type]){OMjQuery.event.trigger(event,data,cache[i].handle.elem,true);}} return;} event.result=undefined;if(!event.target){event.target=elem;} data=data!=null?OMjQuery.makeArray(data):[];data.unshift(event);special=OMjQuery.event.special[type]||{};if(special.trigger&&special.trigger.apply(elem,data)===false){return;} eventPath=[[elem,special.bindType||type]];if(!onlyHandlers&&!special.noBubble&&!OMjQuery.isWindow(elem)){bubbleType=special.delegateType||type;cur=rfocusMorph.test(bubbleType+type)?elem:elem.parentNode;old=null;for(;cur;cur=cur.parentNode){eventPath.push([cur,bubbleType]);old=cur;} if(old&&old===elem.ownerDocument){eventPath.push([old.defaultView||old.parentWindow||window,bubbleType]);}} for(i=0;i<eventPath.length&&!event.isPropagationStopped();i++){cur=eventPath[i][0];event.type=eventPath[i][1];handle=(OMjQuery._data(cur,"events")||{})[event.type]&&OMjQuery._data(cur,"handle");if(handle){handle.apply(cur,data);} handle=ontype&&cur[ontype];if(handle&&OMjQuery.acceptData(cur)&&handle.apply(cur,data)===false){event.preventDefault();}} event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(elem.ownerDocument,data)===false)&&!(type==="click"&&OMjQuery.nodeName(elem,"a"))&&OMjQuery.acceptData(elem)){if(ontype&&elem[type]&&((type!=="focus"&&type!=="blur")||event.target.offsetWidth!==0)&&!OMjQuery.isWindow(elem)){old=elem[ontype];if(old){elem[ontype]=null;} OMjQuery.event.triggered=type;elem[type]();OMjQuery.event.triggered=undefined;if(old){elem[ontype]=old;}}}} return event.result;},dispatch:function(event){event=OMjQuery.event.fix(event||window.event);var handlers=((OMjQuery._data(this,"events")||{})[event.type]||[]),delegateCount=handlers.delegateCount,args=[].slice.call(arguments,0),run_all=!event.exclusive&&!event.namespace,special=OMjQuery.event.special[event.type]||{},handlerQueue=[],i,j,cur,jqcur,ret,selMatch,matched,matches,handleObj,sel,related;args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;} if(delegateCount&&!(event.button&&event.type==="click")){jqcur=OMjQuery(this);jqcur.context=this.ownerDocument||this;for(cur=event.target;cur!=this;cur=cur.parentNode||this){if(cur.disabled!==true){selMatch={};matches=[];jqcur[0]=cur;for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector;if(selMatch[sel]===undefined){selMatch[sel]=(handleObj.quick?quickIs(cur,handleObj.quick):jqcur.is(sel));} if(selMatch[sel]){matches.push(handleObj);}} if(matches.length){handlerQueue.push({elem:cur,matches:matches});}}}} if(handlers.length>delegateCount){handlerQueue.push({elem:this,matches:handlers.slice(delegateCount)});} for(i=0;i<handlerQueue.length&&!event.isPropagationStopped();i++){matched=handlerQueue[i];event.currentTarget=matched.elem;for(j=0;j<matched.matches.length&&!event.isImmediatePropagationStopped();j++){handleObj=matched.matches[j];if(run_all||(!event.namespace&&!handleObj.namespace)||event.namespace_re&&event.namespace_re.test(handleObj.namespace)){event.data=handleObj.data;event.handleObj=handleObj;ret=((OMjQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}}} if(special.postDispatch){special.postDispatch.call(this,event);} return event.result;},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode;} return event;}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button,fromElement=original.fromElement;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);} if(!event.relatedTarget&&fromElement){event.relatedTarget=fromElement===event.target?original.toElement:fromElement;} if(!event.which&&button!==undefined){event.which=(button&1?1:(button&2?3:(button&4?2:0)));} return event;}},fix:function(event){if(event[OMjQuery.expando]){return event;} var i,prop,originalEvent=event,fixHook=OMjQuery.event.fixHooks[event.type]||{},copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=OMjQuery.Event(originalEvent);for(i=copy.length;i;){prop=copy[--i];event[prop]=originalEvent[prop];} if(!event.target){event.target=originalEvent.srcElement||document;} if(event.target.nodeType===3){event.target=event.target.parentNode;} if(event.metaKey===undefined){event.metaKey=event.ctrlKey;} return fixHook.filter?fixHook.filter(event,originalEvent):event;},special:{ready:{setup:OMjQuery.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(data,namespaces,eventHandle){if(OMjQuery.isWindow(this)){this.onbeforeunload=eventHandle;}},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}},simulate:function(type,elem,event,bubble){var e=OMjQuery.extend(new OMjQuery.Event(),event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){OMjQuery.event.trigger(e,null,elem);}else{OMjQuery.event.dispatch.call(elem,e);} if(e.isDefaultPrevented()){event.preventDefault();}}};OMjQuery.event.handle=OMjQuery.event.dispatch;OMjQuery.removeEvent=document.removeEventListener?function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false);}}:function(elem,type,handle){if(elem.detachEvent){elem.detachEvent("on"+type,handle);}};OMjQuery.Event=function(src,props){if(!(this instanceof OMjQuery.Event)){return new OMjQuery.Event(src,props);} if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=(src.defaultPrevented||src.returnValue===false||src.getPreventDefault&&src.getPreventDefault())?returnTrue:returnFalse;}else{this.type=src;} if(props){OMjQuery.extend(this,props);} this.timeStamp=src&&src.timeStamp||OMjQuery.now();this[OMjQuery.expando]=true;};function returnFalse(){return false;} function returnTrue(){return true;} OMjQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;} if(e.preventDefault){e.preventDefault();}else{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};OMjQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){OMjQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var target=this,related=event.relatedTarget,handleObj=event.handleObj,selector=handleObj.selector,ret;if(!related||(related!==target&&!OMjQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;} return ret;}};});if(!OMjQuery.support.submitBubbles){OMjQuery.event.special.submit={setup:function(){if(OMjQuery.nodeName(this,"form")){return false;} OMjQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=OMjQuery.nodeName(elem,"input")||OMjQuery.nodeName(elem,"button")?elem.form:undefined;if(form&&!form._submit_attached){OMjQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=true;});form._submit_attached=true;}});},postDispatch:function(event){if(event._submit_bubble){delete event._submit_bubble;if(this.parentNode&&!event.isTrigger){OMjQuery.event.simulate("submit",this.parentNode,event,true);}}},teardown:function(){if(OMjQuery.nodeName(this,"form")){return false;} OMjQuery.event.remove(this,"._submit");}};} if(!OMjQuery.support.changeBubbles){OMjQuery.event.special.change={setup:function(){if(rformElems.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){OMjQuery.event.add(this,"propertychange._change",function(event){if(event.originalEvent.propertyName==="checked"){this._just_changed=true;}});OMjQuery.event.add(this,"click._change",function(event){if(this._just_changed&&!event.isTrigger){this._just_changed=false;OMjQuery.event.simulate("change",this,event,true);}});} return false;} OMjQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;if(rformElems.test(elem.nodeName)&&!elem._change_attached){OMjQuery.event.add(elem,"change._change",function(event){if(this.parentNode&&!event.isSimulated&&!event.isTrigger){OMjQuery.event.simulate("change",this.parentNode,event,true);}});elem._change_attached=true;}});},handle:function(event){var elem=event.target;if(this!==elem||event.isSimulated||event.isTrigger||(elem.type!=="radio"&&elem.type!=="checkbox")){return event.handleObj.handler.apply(this,arguments);}},teardown:function(){OMjQuery.event.remove(this,"._change");return rformElems.test(this.nodeName);}};} if(!OMjQuery.support.focusinBubbles){OMjQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var attaches=0,handler=function(event){OMjQuery.event.simulate(fix,event.target,OMjQuery.event.fix(event),true);};OMjQuery.event.special[fix]={setup:function(){if(attaches++===0){document.addEventListener(orig,handler,true);}},teardown:function(){if(--attaches===0){document.removeEventListener(orig,handler,true);}}};});} OMjQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;} for(type in types){this.on(type,selector,data,types[type],one);} return this;} if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}} if(fn===false){fn=returnFalse;}else if(!fn){return this;} if(one===1){origFn=fn;fn=function(event){OMjQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=OMjQuery.guid++);} return this.each(function(){OMjQuery.event.add(this,types,fn,data,selector);});},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1);},off:function(types,selector,fn){if(types&&types.preventDefault&&types.handleObj){var handleObj=types.handleObj;OMjQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;} if(typeof types==="object"){for(var type in types){this.off(type,selector,types[type]);} return this;} if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;} if(fn===false){fn=returnFalse;} return this.each(function(){OMjQuery.event.remove(this,types,fn,selector);});},bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},live:function(types,data,fn){OMjQuery(this.context).on(types,this.selector,data,fn);return this;},die:function(types,fn){OMjQuery(this.context).off(types,this.selector||"**",fn);return this;},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length==1?this.off(selector,"**"):this.off(types,selector,fn);},trigger:function(type,data){return this.each(function(){OMjQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){return OMjQuery.event.trigger(type,data,this[0],true);}},toggle:function(fn){var args=arguments,guid=fn.guid||OMjQuery.guid++,i=0,toggler=function(event){var lastToggle=(OMjQuery._data(this,"lastToggle"+fn.guid)||0)%i;OMjQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;} return this.click(toggler);},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});OMjQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){OMjQuery.fn[name]=function(data,fn){if(fn==null){fn=data;data=null;} return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};if(OMjQuery.attrFn){OMjQuery.attrFn[name]=true;} if(rkeyEvent.test(name)){OMjQuery.event.fixHooks[name]=OMjQuery.event.keyHooks;} if(rmouseEvent.test(name)){OMjQuery.event.fixHooks[name]=OMjQuery.event.mouseHooks;}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,expando="sizcache"+(Math.random()+'').replace('.',''),done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true,rBackslash=/\\/g,rReturn=/\r\n/g,rNonWord=/\W/;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;var origContext=context;if(context.nodeType!==1&&context.nodeType!==9){return[];} if(!selector||typeof selector!=="string"){return results;} var m,set,checkSet,extra,ret,cur,pop,i,prune=true,contextXML=Sizzle.isXML(context),parts=[],soFar=selector;do{chunker.exec("");m=chunker.exec(soFar);if(m){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}}while(m);if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context,seed);}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,seed);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];} if(context){ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;} while(parts.length){cur=parts.pop();pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();} if(pop==null){pop=context;} Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}} if(!checkSet){checkSet=set;} if(!checkSet){Sizzle.error(cur||selector);} if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(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,origContext,results,seed);Sizzle.uniqueSort(results);} return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;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.matchesSelector=function(node,expr){return Sizzle(expr,null,null,[node]).length>0;};Sizzle.find=function(expr,context,isXML){var set,i,len,match,type,left;if(!expr){return[];} for(i=0,len=Expr.order.length;i<len;i++){type=Expr.order[i];if((match=Expr.leftMatch[type].exec(expr))){left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(rBackslash,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}} if(!set){set=typeof context.getElementsByTagName!=="undefined"?context.getElementsByTagName("*"):[];} return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var match,anyFound,type,found,item,filter,left,i,pass,old=expr,result=[],curLoop=set,isXMLFilter=set&&set[0]&&Sizzle.isXML(set[0]);while(expr&&set.length){for(type in Expr.filter){if((match=Expr.leftMatch[type].exec(expr))!=null&&match[2]){filter=Expr.filter[type];left=match[1];anyFound=false;match.splice(1,1);if(left.substr(left.length-1)==="\\"){continue;} 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(i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);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){Sizzle.error(expr);}else{break;}} old=expr;} return curLoop;};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};var getText=Sizzle.getText=function(elem){var i,node,nodeType=elem.nodeType,ret="";if(nodeType){if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==='string'){return elem.textContent;}else if(typeof elem.innerText==='string'){return elem.innerText.replace(rReturn,'');}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;}}else{for(i=0;(node=elem[i]);i++){if(node.nodeType!==8){ret+=getText(node);}}} return ret;};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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");},type:function(elem){return elem.getAttribute("type");}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!rNonWord.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase();} 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.toLowerCase()===part?elem||false:elem===part;}} if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part){var elem,isPartStr=typeof part==="string",i=0,l=checkSet.length;if(isPartStr&&!rNonWord.test(part)){part=part.toLowerCase();for(;i<l;i++){elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false;}}}else{for(;i<l;i++){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 nodeCheck,doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!rNonWord.test(part)){part=part.toLowerCase();nodeCheck=part;checkFn=dirNodeCheck;} checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var nodeCheck,doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!rNonWord.test(part)){part=part.toLowerCase();nodeCheck=part;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.parentNode?[m]:[];}},NAME:function(match,context){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){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(match[1]);}}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(rBackslash,"")+" ";if(isXML){return match;} for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n\r]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}} return false;},ID:function(match){return match[1].replace(rBackslash,"");},TAG:function(match,curLoop){return match[1].replace(rBackslash,"").toLowerCase();},CHILD:function(match){if(match[1]==="nth"){if(!match[2]){Sizzle.error(match[0]);} match[2]=match[2].replace(/^\+|\s*/g,'');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;} else if(match[2]){Sizzle.error(match[0]);} match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1]=match[1].replace(rBackslash,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];} match[4]=(match[4]||match[5]||"").replace(rBackslash,"");if(match[2]==="~="){match[4]=" "+match[4]+" ";} return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").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){if(elem.parentNode){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){var attr=elem.getAttribute("type"),type=elem.type;return elem.nodeName.toLowerCase()==="input"&&"text"===type&&(attr===type||attr===null);},radio:function(elem){return elem.nodeName.toLowerCase()==="input"&&"radio"===elem.type;},checkbox:function(elem){return elem.nodeName.toLowerCase()==="input"&&"checkbox"===elem.type;},file:function(elem){return elem.nodeName.toLowerCase()==="input"&&"file"===elem.type;},password:function(elem){return elem.nodeName.toLowerCase()==="input"&&"password"===elem.type;},submit:function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&"submit"===elem.type;},image:function(elem){return elem.nodeName.toLowerCase()==="input"&&"image"===elem.type;},reset:function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&"reset"===elem.type;},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&"button"===elem.type||name==="button";},input:function(elem){return(/input|select|textarea|button/i).test(elem.nodeName);},focus:function(elem){return elem===elem.ownerDocument.activeElement;}},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||getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var j=0,l=not.length;j<l;j++){if(not[j]===elem){return false;}} return true;}else{Sizzle.error(name);}},CHILD:function(elem,match){var first,last,doneName,parent,cache,count,diff,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":first=match[2];last=match[3];if(first===1&&last===0){return true;} doneName=match[0];parent=elem.parentNode;if(parent&&(parent[expando]!==doneName||!elem.nodeIndex)){count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}} parent[expando]=doneName;} 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&&elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Sizzle.attr?Sizzle.attr(elem,name):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&&Sizzle.attr?result!=null: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,fescape=function(all,num){return"\\"+(num-0+1);};for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));} Expr.match.globalPOS=origPOS;var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;} return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var i=0,ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var l=array.length;i<l;i++){ret.push(array[i]);}}else{for(;array[i];i++){ret.push(array[i]);}}} return ret;};} var sortOrder,siblingCheck;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0;} if(!a.compareDocumentPosition||!b.compareDocumentPosition){return a.compareDocumentPosition?-1:1;} return a.compareDocumentPosition(b)&4?-1:1;};}else{sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0;}else if(a.sourceIndex&&b.sourceIndex){return a.sourceIndex-b.sourceIndex;} var al,bl,ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup;if(aup===bup){return siblingCheck(a,b);}else if(!aup){return-1;}else if(!bup){return 1;} while(cur){ap.unshift(cur);cur=cur.parentNode;} cur=bup;while(cur){bp.unshift(cur);cur=cur.parentNode;} al=ap.length;bl=bp.length;for(var i=0;i<al&&i<bl;i++){if(ap[i]!==bp[i]){return siblingCheck(ap[i],bp[i]);}} return i===al?siblingCheck(a,bp[i],-1):siblingCheck(ap[i],b,1);};siblingCheck=function(a,b,ret){if(a===b){return ret;} var cur=a.nextSibling;while(cur){if(cur===b){return-1;} cur=cur.nextSibling;} return 1;};} (function(){var form=document.createElement("div"),id="script"+(new Date()).getTime(),root=document.documentElement;form.innerHTML="<a name='"+id+"'/>";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);root=form=null;})();(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);};} div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div"),id="__sizzle__";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&&!Sizzle.isXML(context)){var match=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query);if(match&&(context.nodeType===1||context.nodeType===9)){if(match[1]){return makeArray(context.getElementsByTagName(query),extra);}else if(match[2]&&Expr.find.CLASS&&context.getElementsByClassName){return makeArray(context.getElementsByClassName(match[2]),extra);}} if(context.nodeType===9){if(query==="body"&&context.body){return makeArray([context.body],extra);}else if(match&&match[3]){var elem=context.getElementById(match[3]);if(elem&&elem.parentNode){if(elem.id===match[3]){return makeArray([elem],extra);}}else{return makeArray([],extra);}} try{return makeArray(context.querySelectorAll(query),extra);}catch(qsaError){}}else if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){var oldContext=context,old=context.getAttribute("id"),nid=old||id,hasParent=context.parentNode,relativeHierarchySelector=/^\s*[+~]/.test(query);if(!old){context.setAttribute("id",nid);}else{nid=nid.replace(/'/g,"\\$&");} if(relativeHierarchySelector&&hasParent){context=context.parentNode;} try{if(!relativeHierarchySelector||hasParent){return makeArray(context.querySelectorAll("[id='"+nid+"'] "+query),extra);}}catch(pseudoError){}finally{if(!old){oldContext.removeAttribute("id");}}}} return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];} div=null;})();} (function(){var html=document.documentElement,matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector;if(matches){var disconnectedMatch=!matches.call(document.createElement("div"),"div"),pseudoWorks=false;try{matches.call(document.documentElement,"[test!='']:sizzle");}catch(pseudoError){pseudoWorks=true;} Sizzle.matchesSelector=function(node,expr){expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!Sizzle.isXML(node)){try{if(pseudoWorks||!Expr.match.PSEUDO.test(expr)&&!/!=/.test(expr)){var ret=matches.call(node,expr);if(ret||!disconnectedMatch||node.document&&node.document.nodeType!==11){return ret;}}}catch(e){}} return Sizzle(expr,null,null,[node]).length>0;};}})();(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||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]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var match=false;elem=elem[dir];while(elem){if(elem[expando]===doneName){match=checkSet[elem.sizset];break;} if(elem.nodeType===1&&!isXML){elem[expando]=doneName;elem.sizset=i;} if(elem.nodeName.toLowerCase()===cur){match=elem;break;} elem=elem[dir];} checkSet[i]=match;}}} function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var match=false;elem=elem[dir];while(elem){if(elem[expando]===doneName){match=checkSet[elem.sizset];break;} if(elem.nodeType===1){if(!isXML){elem[expando]=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;}}} if(document.documentElement.contains){Sizzle.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true);};}else if(document.documentElement.compareDocumentPosition){Sizzle.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16);};}else{Sizzle.contains=function(){return false;};} Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context,seed){var match,tmpSet=[],later="",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,seed);} return Sizzle.filter(later,tmpSet);};Sizzle.attr=OMjQuery.attr;Sizzle.selectors.attrMap={};OMjQuery.find=Sizzle;OMjQuery.expr=Sizzle.selectors;OMjQuery.expr[":"]=OMjQuery.expr.filters;OMjQuery.unique=Sizzle.uniqueSort;OMjQuery.text=Sizzle.getText;OMjQuery.isXMLDoc=Sizzle.isXML;OMjQuery.contains=Sizzle.contains;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,isSimple=/^.[^:#\[\.,]*$/,slice=Array.prototype.slice,POS=OMjQuery.expr.match.globalPOS,guaranteedUnique={children:true,contents:true,next:true,prev:true};OMjQuery.fn.extend({find:function(selector){var self=this,i,l;if(typeof selector!=="string"){return OMjQuery(selector).filter(function(){for(i=0,l=self.length;i<l;i++){if(OMjQuery.contains(self[i],this)){return true;}}});} var ret=this.pushStack("","find",selector),length,n,r;for(i=0,l=this.length;i<l;i++){length=ret.length;OMjQuery.find(selector,this[i],ret);if(i>0){for(n=length;n<ret.length;n++){for(r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}} return ret;},has:function(target){var targets=OMjQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(OMjQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&(typeof selector==="string"?POS.test(selector)?OMjQuery(selector,this.context).index(this[0])>=0:OMjQuery.filter(selector,this).length>0:this.filter(selector).length>0);},closest:function(selectors,context){var ret=[],i,l,cur=this[0];if(OMjQuery.isArray(selectors)){var level=1;while(cur&&cur.ownerDocument&&cur!==context){for(i=0;i<selectors.length;i++){if(OMjQuery(cur).is(selectors[i])){ret.push({selector:selectors[i],elem:cur,level:level});}} cur=cur.parentNode;level++;} return ret;} var pos=POS.test(selectors)||typeof selectors!=="string"?OMjQuery(selectors,context||this.context):0;for(i=0,l=this.length;i<l;i++){cur=this[i];while(cur){if(pos?pos.index(cur)>-1:OMjQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break;}else{cur=cur.parentNode;if(!cur||!cur.ownerDocument||cur===context||cur.nodeType===11){break;}}}} ret=ret.length>1?OMjQuery.unique(ret):ret;return this.pushStack(ret,"closest",selectors);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1;} if(typeof elem==="string"){return OMjQuery.inArray(this[0],OMjQuery(elem));} return OMjQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?OMjQuery(selector,context):OMjQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=OMjQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:OMjQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;} OMjQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return OMjQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return OMjQuery.dir(elem,"parentNode",until);},next:function(elem){return OMjQuery.nth(elem,2,"nextSibling");},prev:function(elem){return OMjQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return OMjQuery.dir(elem,"nextSibling");},prevAll:function(elem){return OMjQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return OMjQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return OMjQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return OMjQuery.sibling((elem.parentNode||{}).firstChild,elem);},children:function(elem){return OMjQuery.sibling(elem.firstChild);},contents:function(elem){return OMjQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:OMjQuery.makeArray(elem.childNodes);}},function(name,fn){OMjQuery.fn[name]=function(until,selector){var ret=OMjQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;} if(selector&&typeof selector==="string"){ret=OMjQuery.filter(selector,ret);} ret=this.length>1&&!guaranteedUnique[name]?OMjQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();} return this.pushStack(ret,name,slice.call(arguments).join(","));};});OMjQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";} return elems.length===1?OMjQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:OMjQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!OMjQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);} cur=cur[dir];} return matched;},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;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}} return r;}});function winnow(elements,qualifier,keep){qualifier=qualifier||0;if(OMjQuery.isFunction(qualifier)){return OMjQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep;});}else if(qualifier.nodeType){return OMjQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=OMjQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return OMjQuery.filter(qualifier,filtered,!keep);}else{qualifier=OMjQuery.filter(qualifier,filtered);}} return OMjQuery.grep(elements,function(elem,i){return(OMjQuery.inArray(elem,qualifier)>=0)===keep;});} function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement){while(list.length){safeFrag.createElement(list.pop());}} return safeFrag;} var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlineOMjQuery=/ OMjQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style)/i,rnocache=/<(?:script|object|embed|option|style)/i,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/\/(java|ecma)script/i,rcleanScript=/^\s*<!(?:\[CDATA\[|\-\-)/,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},safeFragment=createSafeFragment(document);wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!OMjQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];} OMjQuery.fn.extend({text:function(value){return OMjQuery.access(this,function(value){return value===undefined?OMjQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value));},null,value,arguments.length);},wrapAll:function(html){if(OMjQuery.isFunction(html)){return this.each(function(i){OMjQuery(this).wrapAll(html.call(this,i));});} if(this[0]){var wrap=OMjQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);} wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;} return elem;}).append(this);} return this;},wrapInner:function(html){if(OMjQuery.isFunction(html)){return this.each(function(i){OMjQuery(this).wrapInner(html.call(this,i));});} return this.each(function(){var self=OMjQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var isFunction=OMjQuery.isFunction(html);return this.each(function(i){OMjQuery(this).wrapAll(isFunction?html.call(this,i):html);});},unwrap:function(){return this.parent().each(function(){if(!OMjQuery.nodeName(this,"body")){OMjQuery(this).replaceWith(this.childNodes);}}).end();},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(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=OMjQuery.clean(arguments);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,OMjQuery.clean(arguments));return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||OMjQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));OMjQuery.cleanData([elem]);} if(elem.parentNode){elem.parentNode.removeChild(elem);}}} return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));} while(elem.firstChild){elem.removeChild(elem.firstChild);}} return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return OMjQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return OMjQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined){return elem.nodeType===1?elem.innerHTML.replace(rinlineOMjQuery,""):null;} if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(OMjQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));elem.innerHTML=value;}} elem=0;}catch(e){}} if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(OMjQuery.isFunction(value)){return this.each(function(i){var self=OMjQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});} if(typeof value!=="string"){value=OMjQuery(value).detach();} return this.each(function(){var next=this.nextSibling,parent=this.parentNode;OMjQuery(this).remove();if(next){OMjQuery(next).before(value);}else{OMjQuery(parent).append(value);}});}else{return this.length?this.pushStack(OMjQuery(OMjQuery.isFunction(value)?value():value),"replaceWith",value):this;}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,fragment,parent,value=args[0],scripts=[];if(!OMjQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){OMjQuery(this).domManip(args,table,callback,true);});} if(OMjQuery.isFunction(value)){return this.each(function(i){var self=OMjQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});} if(this[0]){parent=value&&value.parentNode;if(OMjQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=OMjQuery.buildFragment(args,this,scripts);} fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;} if(first){table=table&&OMjQuery.nodeName(first,"tr");for(var i=0,l=this.length,lastIndex=l-1;i<l;i++){callback.call(table?root(this[i],first):this[i],results.cacheable||(l>1&&i<lastIndex)?OMjQuery.clone(fragment,true,true):fragment);}} if(scripts.length){OMjQuery.each(scripts,function(i,elem){if(elem.src){OMjQuery.ajax({type:"GET",global:false,url:elem.src,async:false,dataType:"script"});}else{OMjQuery.globalEval((elem.text||elem.textContent||elem.innerHTML||"").replace(rcleanScript,"/*$0*/"));} if(elem.parentNode){elem.parentNode.removeChild(elem);}});}} return this;}});function root(elem,cur){return OMjQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;} function cloneCopyEvent(src,dest){if(dest.nodeType!==1||!OMjQuery.hasData(src)){return;} var type,i,l,oldData=OMjQuery._data(src),curData=OMjQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle;curData.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){OMjQuery.event.add(dest,type,events[type][i]);}}} if(curData.data){curData.data=OMjQuery.extend({},curData.data);}} function cloneFixAttributes(src,dest){var nodeName;if(dest.nodeType!==1){return;} if(dest.clearAttributes){dest.clearAttributes();} if(dest.mergeAttributes){dest.mergeAttributes(src);} nodeName=dest.nodeName.toLowerCase();if(nodeName==="object"){dest.outerHTML=src.outerHTML;}else if(nodeName==="input"&&(src.type==="checkbox"||src.type==="radio")){if(src.checked){dest.defaultChecked=dest.checked=src.checked;} if(dest.value!==src.value){dest.value=src.value;}}else if(nodeName==="option"){dest.selected=src.defaultSelected;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}else if(nodeName==="script"&&dest.text!==src.text){dest.text=src.text;} dest.removeAttribute(OMjQuery.expando);dest.removeAttribute("_submit_attached");dest.removeAttribute("_change_attached");} OMjQuery.buildFragment=function(args,nodes,scripts){var fragment,cacheable,cacheresults,doc,first=args[0];if(nodes&&nodes[0]){doc=nodes[0].ownerDocument||nodes[0];} if(!doc.createDocumentFragment){doc=document;} if(args.length===1&&typeof first==="string"&&first.length<512&&doc===document&&first.charAt(0)==="<"&&!rnocache.test(first)&&(OMjQuery.support.checkClone||!rchecked.test(first))&&(OMjQuery.support.html5Clone||!rnoshimcache.test(first))){cacheable=true;cacheresults=OMjQuery.fragments[first];if(cacheresults&&cacheresults!==1){fragment=cacheresults;}} if(!fragment){fragment=doc.createDocumentFragment();OMjQuery.clean(args,doc,fragment,scripts);} if(cacheable){OMjQuery.fragments[first]=cacheresults?fragment:1;} return{fragment:fragment,cacheable:cacheable};};OMjQuery.fragments={};OMjQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){OMjQuery.fn[name]=function(selector){var ret=[],insert=OMjQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();OMjQuery(insert[i])[original](elems);ret=ret.concat(elems);} return this.pushStack(ret,name,insert.selector);}};});function getAll(elem){if(typeof elem.getElementsByTagName!=="undefined"){return elem.getElementsByTagName("*");}else if(typeof elem.querySelectorAll!=="undefined"){return elem.querySelectorAll("*");}else{return[];}} function fixDefaultChecked(elem){if(elem.type==="checkbox"||elem.type==="radio"){elem.defaultChecked=elem.checked;}} function findInputs(elem){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="input"){fixDefaultChecked(elem);}else if(nodeName!=="script"&&typeof elem.getElementsByTagName!=="undefined"){OMjQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);}} function shimCloneNode(elem){var div=document.createElement("div");safeFragment.appendChild(div);div.innerHTML=elem.outerHTML;return div.firstChild;} OMjQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var srcElements,destElements,i,clone=OMjQuery.support.html5Clone||OMjQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?elem.cloneNode(true):shimCloneNode(elem);if((!OMjQuery.support.noCloneEvent||!OMjQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!OMjQuery.isXMLDoc(elem)){cloneFixAttributes(elem,clone);srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){if(destElements[i]){cloneFixAttributes(srcElements[i],destElements[i]);}}} if(dataAndEvents){cloneCopyEvent(elem,clone);if(deepDataAndEvents){srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){cloneCopyEvent(srcElements[i],destElements[i]);}}} srcElements=destElements=null;return clone;},clean:function(elems,context,fragment,scripts){var checkScriptType,script,j,ret=[];context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;} for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";} if(!elem){continue;} if(typeof elem==="string"){if(!rhtml.test(elem)){elem=context.createTextNode(elem);}else{elem=elem.replace(rxhtmlTag,"<$1></$2>");var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div"),safeChildNodes=safeFragment.childNodes,remove;if(context===document){safeFragment.appendChild(div);}else{createSafeFragment(context).appendChild(div);} div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;} if(!OMjQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[];for(j=tbody.length-1;j>=0;--j){if(OMjQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}} if(!OMjQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);} elem=div.childNodes;if(div){div.parentNode.removeChild(div);if(safeChildNodes.length>0){remove=safeChildNodes[safeChildNodes.length-1];if(remove&&remove.parentNode){remove.parentNode.removeChild(remove);}}}}} var len;if(!OMjQuery.support.appendChecked){if(elem[0]&&typeof(len=elem.length)==="number"){for(j=0;j<len;j++){findInputs(elem[j]);}}else{findInputs(elem);}} if(elem.nodeType){ret.push(elem);}else{ret=OMjQuery.merge(ret,elem);}} if(fragment){checkScriptType=function(elem){return!elem.type||rscriptType.test(elem.type);};for(i=0;ret[i];i++){script=ret[i];if(scripts&&OMjQuery.nodeName(script,"script")&&(!script.type||rscriptType.test(script.type))){scripts.push(script.parentNode?script.parentNode.removeChild(script):script);}else{if(script.nodeType===1){var jsTags=OMjQuery.grep(script.getElementsByTagName("script"),checkScriptType);ret.splice.apply(ret,[i+1,0].concat(jsTags));} fragment.appendChild(script);}}} return ret;},cleanData:function(elems){var data,id,cache=OMjQuery.cache,special=OMjQuery.event.special,deleteExpando=OMjQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){if(elem.nodeName&&OMjQuery.noData[elem.nodeName.toLowerCase()]){continue;} id=elem[OMjQuery.expando];if(id){data=cache[id];if(data&&data.events){for(var type in data.events){if(special[type]){OMjQuery.event.remove(elem,type);}else{OMjQuery.removeEvent(elem,type,data.handle);}} if(data.handle){data.handle.elem=null;}} if(deleteExpando){delete elem[OMjQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(OMjQuery.expando);} delete cache[id];}}}});var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rupper=/([A-Z]|^ms)/g,rnum=/^[\-+]?(?:\d*\.)?\d+$/i,rnumnonpx=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,rrelNum=/^([\-+])=([\-+.\de]+)/,rmargin=/^margin/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssExpand=["Top","Right","Bottom","Left"],curCSS,getComputedStyle,currentStyle;OMjQuery.fn.css=function(name,value){return OMjQuery.access(this,function(elem,name,value){return value!==undefined?OMjQuery.style(elem,name,value):OMjQuery.css(elem,name);},name,value,arguments.length>1);};OMjQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}else{return elem.style.opacity;}}}},cssNumber:{"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":OMjQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;} var ret,type,origName=OMjQuery.camelCase(name),style=elem.style,hooks=OMjQuery.cssHooks[origName];name=OMjQuery.cssProps[origName]||origName;if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(+(ret[1]+1)*+ret[2])+parseFloat(OMjQuery.css(elem,name));type="number";} if(value==null||type==="number"&&isNaN(value)){return;} if(type==="number"&&!OMjQuery.cssNumber[origName]){value+="px";} if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value))!==undefined){try{style[name]=value;}catch(e){}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;} return style[name];}},css:function(elem,name,extra){var ret,hooks;name=OMjQuery.camelCase(name);hooks=OMjQuery.cssHooks[name];name=OMjQuery.cssProps[name]||name;if(name==="cssFloat"){name="float";} if(hooks&&"get"in hooks&&(ret=hooks.get(elem,true,extra))!==undefined){return ret;}else if(curCSS){return curCSS(elem,name);}},swap:function(elem,options,callback){var old={},ret,name;for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];} ret=callback.call(elem);for(name in options){elem.style[name]=old[name];} return ret;}});OMjQuery.curCSS=OMjQuery.css;if(document.defaultView&&document.defaultView.getComputedStyle){getComputedStyle=function(elem,name){var ret,defaultView,computedStyle,width,style=elem.style;name=name.replace(rupper,"-$1").toLowerCase();if((defaultView=elem.ownerDocument.defaultView)&&(computedStyle=defaultView.getComputedStyle(elem,null))){ret=computedStyle.getPropertyValue(name);if(ret===""&&!OMjQuery.contains(elem.ownerDocument.documentElement,elem)){ret=OMjQuery.style(elem,name);}} if(!OMjQuery.support.pixelMargin&&computedStyle&&rmargin.test(name)&&rnumnonpx.test(ret)){width=style.width;style.width=ret;ret=computedStyle.width;style.width=width;} return ret;};} if(document.documentElement.currentStyle){currentStyle=function(elem,name){var left,rsLeft,uncomputed,ret=elem.currentStyle&&elem.currentStyle[name],style=elem.style;if(ret==null&&style&&(uncomputed=style[name])){ret=uncomputed;} if(rnumnonpx.test(ret)){left=style.left;rsLeft=elem.runtimeStyle&&elem.runtimeStyle.left;if(rsLeft){elem.runtimeStyle.left=elem.currentStyle.left;} style.left=name==="fontSize"?"1em":ret;ret=style.pixelLeft+"px";style.left=left;if(rsLeft){elem.runtimeStyle.left=rsLeft;}} return ret===""?"auto":ret;};} curCSS=getComputedStyle||currentStyle;function getWidthOrHeight(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,i=name==="width"?1:0,len=4;if(val>0){if(extra!=="border"){for(;i<len;i+=2){if(!extra){val-=parseFloat(OMjQuery.css(elem,"padding"+cssExpand[i]))||0;} if(extra==="margin"){val+=parseFloat(OMjQuery.css(elem,extra+cssExpand[i]))||0;}else{val-=parseFloat(OMjQuery.css(elem,"border"+cssExpand[i]+"Width"))||0;}}} return val+"px";} val=curCSS(elem,name);if(val<0||val==null){val=elem.style[name];} if(rnumnonpx.test(val)){return val;} val=parseFloat(val)||0;if(extra){for(;i<len;i+=2){val+=parseFloat(OMjQuery.css(elem,"padding"+cssExpand[i]))||0;if(extra!=="padding"){val+=parseFloat(OMjQuery.css(elem,"border"+cssExpand[i]+"Width"))||0;} if(extra==="margin"){val+=parseFloat(OMjQuery.css(elem,extra+cssExpand[i]))||0;}}} return val+"px";} OMjQuery.each(["height","width"],function(i,name){OMjQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){if(elem.offsetWidth!==0){return getWidthOrHeight(elem,name,extra);}else{return OMjQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra);});}}},set:function(elem,value){return rnum.test(value)?value+"px":value;}};});if(!OMjQuery.support.opacity){OMjQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":computed?"1":"";},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=OMjQuery.isNumeric(value)?"alpha(opacity="+value*100+")":"",filter=currentStyle&¤tStyle.filter||style.filter||"";style.zoom=1;if(value>=1&&OMjQuery.trim(filter.replace(ralpha,""))===""){style.removeAttribute("filter");if(currentStyle&&!currentStyle.filter){return;}} style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity;}};} OMjQuery(function(){if(!OMjQuery.support.reliableMarginRight){OMjQuery.cssHooks.marginRight={get:function(elem,computed){return OMjQuery.swap(elem,{"display":"inline-block"},function(){if(computed){return curCSS(elem,"margin-right");}else{return elem.style.marginRight;}});}};}});if(OMjQuery.expr&&OMjQuery.expr.filters){OMjQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight;return(width===0&&height===0)||(!OMjQuery.support.reliableHiddenOffsets&&((elem.style&&elem.style.display)||OMjQuery.css(elem,"display"))==="none");};OMjQuery.expr.filters.visible=function(elem){return!OMjQuery.expr.filters.hidden(elem);};} OMjQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){OMjQuery.cssHooks[prefix+suffix]={expand:function(value){var i,parts=typeof value==="string"?value.split(" "):[value],expanded={};for(i=0;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];} return expanded;}};});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rspacesAjax=/\s+/,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,_load=OMjQuery.fn.load,prefilters={},transports={},ajaxLocation,ajaxLocParts,allTypes=["*/"]+["*"];try{ajaxLocation=location.href;}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";} if(OMjQuery.isFunction(func)){var dataTypes=dataTypeExpression.toLowerCase().split(rspacesAjax),i=0,length=dataTypes.length,dataType,list,placeBefore;for(;i<length;i++){dataType=dataTypes[i];placeBefore=/^\+/.test(dataType);if(placeBefore){dataType=dataType.substr(1)||"*";} list=structure[dataType]=structure[dataType]||[];list[placeBefore?"unshift":"push"](func);}}};} function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,dataType,inspected){dataType=dataType||options.dataTypes[0];inspected=inspected||{};inspected[dataType]=true;var list=structure[dataType],i=0,length=list?list.length:0,executeOnly=(structure===prefilters),selection;for(;i<length&&(executeOnly||!selection);i++){selection=list[i](options,originalOptions,jqXHR);if(typeof selection==="string"){if(!executeOnly||inspected[selection]){selection=undefined;}else{options.dataTypes.unshift(selection);selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,selection,inspected);}}} if((executeOnly||!selection)&&!inspected["*"]){selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,"*",inspected);} return selection;} function ajaxExtend(target,src){var key,deep,flatOptions=OMjQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}} if(deep){OMjQuery.extend(true,target,deep);}} OMjQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments);}else if(!this.length){return this;} 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(OMjQuery.isFunction(params)){callback=params;params=undefined;}else if(typeof params==="object"){params=OMjQuery.param(params,OMjQuery.ajaxSettings.traditional);type="POST";}} var self=this;OMjQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(jqXHR,status,responseText){responseText=jqXHR.responseText;if(jqXHR.isResolved()){jqXHR.done(function(r){responseText=r;});self.html(selector?OMjQuery("<div>").append(responseText.replace(rscript,"")).find(selector):responseText);} if(callback){self.each(callback,[responseText,status,jqXHR]);}}});return this;},serialize:function(){return OMjQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?OMjQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=OMjQuery(this).val();return val==null?null:OMjQuery.isArray(val)?OMjQuery.map(val,function(val,i){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}):{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});OMjQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){OMjQuery.fn[o]=function(f){return this.on(o,f);};});OMjQuery.each(["get","post"],function(i,method){OMjQuery[method]=function(url,data,callback,type){if(OMjQuery.isFunction(data)){type=type||callback;callback=data;data=undefined;} return OMjQuery.ajax({type:method,url:url,data:data,success:callback,dataType:type});};});OMjQuery.extend({getScript:function(url,callback){return OMjQuery.get(url,undefined,callback,"script");},getJSON:function(url,data,callback){return OMjQuery.get(url,data,callback,"json");},ajaxSetup:function(target,settings){if(settings){ajaxExtend(target,OMjQuery.ajaxSettings);}else{settings=target;target=OMjQuery.ajaxSettings;} ajaxExtend(target,settings);return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":allTypes},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":OMjQuery.parseJSON,"text xml":OMjQuery.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;} options=options||{};var s=OMjQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=callbackContext!==s&&(callbackContext.nodeType||callbackContext instanceof OMjQuery)?OMjQuery(callbackContext):OMjQuery.event,deferred=OMjQuery.Deferred(),completeDeferred=OMjQuery.Callbacks("once memory"),statusCode=s.statusCode||{},ifModifiedKey,requestHeaders={},requestHeadersNames={},responseHeadersString,responseHeaders,transport,timeoutTimer,parts,state=0,fireGlobals,i,jqXHR={readyState:0,setRequestHeader:function(name,value){if(!state){var lname=name.toLowerCase();name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value;} return this;},getAllResponseHeaders:function(){return state===2?responseHeadersString:null;},getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}} match=responseHeaders[key.toLowerCase()];} return match===undefined?null:match;},overrideMimeType:function(type){if(!state){s.mimeType=type;} return this;},abort:function(statusText){statusText=statusText||"abort";if(transport){transport.abort(statusText);} done(0,statusText);return this;}};function done(status,nativeStatusText,responses,headers){if(state===2){return;} state=2;if(timeoutTimer){clearTimeout(timeoutTimer);} transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;var isSuccess,success,error,statusText=nativeStatusText,response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined,lastModified,etag;if(status>=200&&status<300||status===304){if(s.ifModified){if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){OMjQuery.lastModified[ifModifiedKey]=lastModified;} if((etag=jqXHR.getResponseHeader("Etag"))){OMjQuery.etag[ifModifiedKey]=etag;}} if(status===304){statusText="notmodified";isSuccess=true;}else{try{success=ajaxConvert(s,response);statusText="success";isSuccess=true;}catch(e){statusText="parsererror";error=e;}}}else{error=statusText;if(!statusText||status){statusText="error";if(status<0){status=0;}}} jqXHR.status=status;jqXHR.statusText=""+(nativeStatusText||statusText);if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);} jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"),[jqXHR,s,isSuccess?success:error]);} completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--OMjQuery.active)){OMjQuery.event.trigger("ajaxStop");}}} deferred.promise(jqXHR);jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;jqXHR.complete=completeDeferred.add;jqXHR.statusCode=function(map){if(map){var tmp;if(state<2){for(tmp in map){statusCode[tmp]=[statusCode[tmp],map[tmp]];}}else{tmp=map[jqXHR.status];jqXHR.then(tmp,tmp);}} return this;};s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.dataTypes=OMjQuery.trim(s.dataType||"*").toLowerCase().split(rspacesAjax);if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!=ajaxLocParts[1]||parts[2]!=ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?80:443))!=(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));} if(s.data&&s.processData&&typeof s.data!=="string"){s.data=OMjQuery.param(s.data,s.traditional);} inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return false;} fireGlobals=s.global;s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);if(fireGlobals&&OMjQuery.active++===0){OMjQuery.event.trigger("ajaxStart");} if(!s.hasContent){if(s.data){s.url+=(rquery.test(s.url)?"&":"?")+s.data;delete s.data;} ifModifiedKey=s.url;if(s.cache===false){var ts=OMjQuery.now(),ret=s.url.replace(rts,"$1_="+ts);s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}} if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);} if(s.ifModified){ifModifiedKey=ifModifiedKey||s.url;if(OMjQuery.lastModified[ifModifiedKey]){jqXHR.setRequestHeader("If-Modified-Since",OMjQuery.lastModified[ifModifiedKey]);} if(OMjQuery.etag[ifModifiedKey]){jqXHR.setRequestHeader("If-None-Match",OMjQuery.etag[ifModifiedKey]);}} jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);} if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){jqXHR.abort();return false;} for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i]);} transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);} if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout");},s.timeout);} try{state=1;transport.send(requestHeaders,done);}catch(e){if(state<2){done(-1,e);}else{throw e;}}} return jqXHR;},param:function(a,traditional){var s=[],add=function(key,value){value=OMjQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=OMjQuery.ajaxSettings.traditional;} if(OMjQuery.isArray(a)||(a.jquery&&!OMjQuery.isPlainObject(a))){OMjQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix],traditional,add);}} return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(OMjQuery.isArray(obj)){OMjQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add);}});}else if(!traditional&&OMjQuery.type(obj)==="object"){for(var name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}} OMjQuery.extend({active:0,lastModified:{},etag:{}});function ajaxHandleResponses(s,jqXHR,responses){var contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields,ct,type,finalDataType,firstDataType;for(type in responseFields){if(type in responses){jqXHR[responseFields[type]]=responses[type];}} while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("content-type");}} if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;} if(!firstDataType){firstDataType=type;}} finalDataType=finalDataType||firstDataType;} if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);} return responses[finalDataType];}} function ajaxConvert(s,response){if(s.dataFilter){response=s.dataFilter(response,s.dataType);} var dataTypes=s.dataTypes,converters={},i,key,length=dataTypes.length,tmp,current=dataTypes[0],prev,conversion,conv,conv1,conv2;for(i=1;i<length;i++){if(i===1){for(key in s.converters){if(typeof key==="string"){converters[key.toLowerCase()]=s.converters[key];}}} prev=current;current=dataTypes[i];if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conversion=prev+" "+current;conv=converters[conversion]||converters["* "+current];if(!conv){conv2=undefined;for(conv1 in converters){tmp=conv1.split(" ");if(tmp[0]===prev||tmp[0]==="*"){conv2=converters[tmp[1]+" "+current];if(conv2){conv1=converters[conv1];if(conv1===true){conv=conv2;}else if(conv2===true){conv=conv1;} break;}}}} if(!(conv||conv2)){OMjQuery.error("No conversion from "+conversion.replace(" "," to "));} if(conv!==true){response=conv?conv(response):conv2(conv1(response));}}} return response;} var jsc=OMjQuery.now(),jsre=/(\=)\?(&|$)|\?\?/i;OMjQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return OMjQuery.expando+"_"+(jsc++);}});OMjQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var inspectData=(typeof s.data==="string")&&/^application\/x\-www\-form\-urlencoded/.test(s.contentType);if(s.dataTypes[0]==="jsonp"||s.jsonp!==false&&(jsre.test(s.url)||inspectData&&jsre.test(s.data))){var responseContainer,jsonpCallback=s.jsonpCallback=OMjQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,previous=window[jsonpCallback],url=s.url,data=s.data,replace="$1"+jsonpCallback+"$2";if(s.jsonp!==false){url=url.replace(jsre,replace);if(s.url===url){if(inspectData){data=data.replace(jsre,replace);} if(s.data===data){url+=(/\?/.test(url)?"&":"?")+s.jsonp+"="+jsonpCallback;}}} s.url=url;s.data=data;window[jsonpCallback]=function(response){responseContainer=[response];};jqXHR.always(function(){window[jsonpCallback]=previous;if(responseContainer&&OMjQuery.isFunction(previous)){window[jsonpCallback](responseContainer[0]);}});s.converters["script json"]=function(){if(!responseContainer){OMjQuery.error(jsonpCallback+" was not called");} return responseContainer[0];};s.dataTypes[0]="json";return"script";}});OMjQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(text){OMjQuery.globalEval(text);return text;}}});OMjQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;} if(s.crossDomain){s.type="GET";s.global=false;}});OMjQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script");script.async="async";if(s.scriptCharset){script.charset=s.scriptCharset;} script.src=s.url;script.onload=script.onreadystatechange=function(_,isAbort){if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);} script=undefined;if(!isAbort){callback(200,"success");}}};head.insertBefore(script,head.firstChild);},abort:function(){if(script){script.onload(0,1);}}};}});var xhrOnUnloadAbort=window.ActiveXObject?function(){for(var key in xhrCallbacks){xhrCallbacks[key](0,1);}}:false,xhrId=0,xhrCallbacks;function createStandardXHR(){try{return new window.XMLHttpRequest();}catch(e){}} function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}} OMjQuery.ajaxSettings.xhr=window.ActiveXObject?function(){return!this.isLocal&&createStandardXHR()||createActiveXHR();}:createStandardXHR;(function(xhr){OMjQuery.extend(OMjQuery.support,{ajax:!!xhr,cors:!!xhr&&("withCredentials"in xhr)});})(OMjQuery.ajaxSettings.xhr());if(OMjQuery.support.ajax){OMjQuery.ajaxTransport(function(s){if(!s.crossDomain||OMjQuery.support.cors){var callback;return{send:function(headers,complete){var xhr=s.xhr(),handle,i;if(s.username){xhr.open(s.type,s.url,s.async,s.username,s.password);}else{xhr.open(s.type,s.url,s.async);} if(s.xhrFields){for(i in s.xhrFields){xhr[i]=s.xhrFields[i];}} if(s.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(s.mimeType);} if(!s.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";} try{for(i in headers){xhr.setRequestHeader(i,headers[i]);}}catch(_){} xhr.send((s.hasContent&&s.data)||null);callback=function(_,isAbort){var status,statusText,responseHeaders,responses,xml;try{if(callback&&(isAbort||xhr.readyState===4)){callback=undefined;if(handle){xhr.onreadystatechange=OMjQuery.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[handle];}} if(isAbort){if(xhr.readyState!==4){xhr.abort();}}else{status=xhr.status;responseHeaders=xhr.getAllResponseHeaders();responses={};xml=xhr.responseXML;if(xml&&xml.documentElement){responses.xml=xml;} try{responses.text=xhr.responseText;}catch(_){} try{statusText=xhr.statusText;}catch(e){statusText="";} if(!status&&s.isLocal&&!s.crossDomain){status=responses.text?200:404;}else if(status===1223){status=204;}}}}catch(firefoxAccessException){if(!isAbort){complete(-1,firefoxAccessException);}} if(responses){complete(status,statusText,responses,responseHeaders);}};if(!s.async||xhr.readyState===4){callback();}else{handle=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};OMjQuery(window).unload(xhrOnUnloadAbort);} xhrCallbacks[handle]=callback;} xhr.onreadystatechange=callback;}},abort:function(){if(callback){callback(0,1);}}};}});} var elemdisplay={},iframe,iframeDoc,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],fxNow;OMjQuery.fn.extend({show:function(speed,easing,callback){var elem,display;if(speed||speed===0){return this.animate(genFx("show",3),speed,easing,callback);}else{for(var i=0,j=this.length;i<j;i++){elem=this[i];if(elem.style){display=elem.style.display;if(!OMjQuery._data(elem,"olddisplay")&&display==="none"){display=elem.style.display="";} if((display===""&&OMjQuery.css(elem,"display")==="none")||!OMjQuery.contains(elem.ownerDocument.documentElement,elem)){OMjQuery._data(elem,"olddisplay",defaultDisplay(elem.nodeName));}}} for(i=0;i<j;i++){elem=this[i];if(elem.style){display=elem.style.display;if(display===""||display==="none"){elem.style.display=OMjQuery._data(elem,"olddisplay")||"";}}} return this;}},hide:function(speed,easing,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,easing,callback);}else{var elem,display,i=0,j=this.length;for(;i<j;i++){elem=this[i];if(elem.style){display=OMjQuery.css(elem,"display");if(display!=="none"&&!OMjQuery._data(elem,"olddisplay")){OMjQuery._data(elem,"olddisplay",display);}}} for(i=0;i<j;i++){if(this[i].style){this[i].style.display="none";}} return this;}},_toggle:OMjQuery.fn.toggle,toggle:function(fn,fn2,callback){var bool=typeof fn==="boolean";if(OMjQuery.isFunction(fn)&&OMjQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:OMjQuery(this).is(":hidden");OMjQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2,callback);} return this;},fadeTo:function(speed,to,easing,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var optall=OMjQuery.speed(speed,easing,callback);if(OMjQuery.isEmptyObject(prop)){return this.each(optall.complete,[false]);} prop=OMjQuery.extend({},prop);function doAnimation(){if(optall.queue===false){OMjQuery._mark(this);} var opt=OMjQuery.extend({},optall),isElement=this.nodeType===1,hidden=isElement&&OMjQuery(this).is(":hidden"),name,val,p,e,hooks,replace,parts,start,end,unit,method;opt.animatedProperties={};for(p in prop){name=OMjQuery.camelCase(p);if(p!==name){prop[name]=prop[p];delete prop[p];} if((hooks=OMjQuery.cssHooks[name])&&"expand"in hooks){replace=hooks.expand(prop[name]);delete prop[name];for(p in replace){if(!(p in prop)){prop[p]=replace[p];}}}} for(name in prop){val=prop[name];if(OMjQuery.isArray(val)){opt.animatedProperties[name]=val[1];val=prop[name]=val[0];}else{opt.animatedProperties[name]=opt.specialEasing&&opt.specialEasing[name]||opt.easing||'swing';} if(val==="hide"&&hidden||val==="show"&&!hidden){return opt.complete.call(this);} if(isElement&&(name==="height"||name==="width")){opt.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(OMjQuery.css(this,"display")==="inline"&&OMjQuery.css(this,"float")==="none"){if(!OMjQuery.support.inlineBlockNeedsLayout||defaultDisplay(this.nodeName)==="inline"){this.style.display="inline-block";}else{this.style.zoom=1;}}}} if(opt.overflow!=null){this.style.overflow="hidden";} for(p in prop){e=new OMjQuery.fx(this,opt,p);val=prop[p];if(rfxtypes.test(val)){method=OMjQuery._data(this,"toggle"+p)||(val==="toggle"?hidden?"show":"hide":0);if(method){OMjQuery._data(this,"toggle"+p,method==="show"?"hide":"show");e[method]();}else{e[val]();}}else{parts=rfxnum.exec(val);start=e.cur();if(parts){end=parseFloat(parts[2]);unit=parts[3]||(OMjQuery.cssNumber[p]?"":"px");if(unit!=="px"){OMjQuery.style(this,p,(end||1)+unit);start=((end||1)/e.cur())*start;OMjQuery.style(this,p,start+unit);} if(parts[1]){end=((parts[1]==="-="?-1:1)*end)+start;} e.custom(start,end,unit);}else{e.custom(start,val,"");}}} return true;} return optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;} if(clearQueue&&type!==false){this.queue(type||"fx",[]);} return this.each(function(){var index,hadTimers=false,timers=OMjQuery.timers,data=OMjQuery._data(this);if(!gotoEnd){OMjQuery._unmark(true,this);} function stopQueue(elem,data,index){var hooks=data[index];OMjQuery.removeData(elem,index,true);hooks.stop(gotoEnd);} if(type==null){for(index in data){if(data[index]&&data[index].stop&&index.indexOf(".run")===index.length-4){stopQueue(this,data,index);}}}else if(data[index=type+".run"]&&data[index].stop){stopQueue(this,data,index);} for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){if(gotoEnd){timers[index](true);}else{timers[index].saveState();} hadTimers=true;timers.splice(index,1);}} if(!(gotoEnd&&hadTimers)){OMjQuery.dequeue(this,type);}});}});function createFxNow(){setTimeout(clearFxNow,0);return(fxNow=OMjQuery.now());} function clearFxNow(){fxNow=undefined;} function genFx(type,num){var obj={};OMjQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;} OMjQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){OMjQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});OMjQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?OMjQuery.extend({},speed):{complete:fn||!fn&&easing||OMjQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!OMjQuery.isFunction(easing)&&easing};opt.duration=OMjQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in OMjQuery.fx.speeds?OMjQuery.fx.speeds[opt.duration]:OMjQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx";} opt.old=opt.complete;opt.complete=function(noUnmark){if(OMjQuery.isFunction(opt.old)){opt.old.call(this);} if(opt.queue){OMjQuery.dequeue(this,opt.queue);}else if(noUnmark!==false){OMjQuery._unmark(this);}};return opt;},easing:{linear:function(p){return p;},swing:function(p){return(-Math.cos(p*Math.PI)/2)+0.5;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;options.orig=options.orig||{};}});OMjQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);} (OMjQuery.fx.step[this.prop]||OMjQuery.fx.step._default)(this);},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} var parsed,r=OMjQuery.css(this.elem,this.prop);return isNaN(parsed=parseFloat(r))?!r||r==="auto"?0:r:parsed;},custom:function(from,to,unit){var self=this,fx=OMjQuery.fx;this.startTime=fxNow||createFxNow();this.end=to;this.now=this.start=from;this.pos=this.state=0;this.unit=unit||this.unit||(OMjQuery.cssNumber[this.prop]?"":"px");function t(gotoEnd){return self.step(gotoEnd);} t.queue=this.options.queue;t.elem=this.elem;t.saveState=function(){if(OMjQuery._data(self.elem,"fxshow"+self.prop)===undefined){if(self.options.hide){OMjQuery._data(self.elem,"fxshow"+self.prop,self.start);}else if(self.options.show){OMjQuery._data(self.elem,"fxshow"+self.prop,self.end);}}};if(t()&&OMjQuery.timers.push(t)&&!timerId){timerId=setInterval(fx.tick,fx.interval);}},show:function(){var dataShow=OMjQuery._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=dataShow||OMjQuery.style(this.elem,this.prop);this.options.show=true;if(dataShow!==undefined){this.custom(this.cur(),dataShow);}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());} OMjQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=OMjQuery._data(this.elem,"fxshow"+this.prop)||OMjQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var p,n,complete,t=fxNow||createFxNow(),done=true,elem=this.elem,options=this.options;if(gotoEnd||t>=options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();options.animatedProperties[this.prop]=true;for(p in options.animatedProperties){if(options.animatedProperties[p]!==true){done=false;}} if(done){if(options.overflow!=null&&!OMjQuery.support.shrinkWrapBlocks){OMjQuery.each(["","X","Y"],function(index,value){elem.style["overflow"+value]=options.overflow[index];});} if(options.hide){OMjQuery(elem).hide();} if(options.hide||options.show){for(p in options.animatedProperties){OMjQuery.style(elem,p,options.orig[p]);OMjQuery.removeData(elem,"fxshow"+p,true);OMjQuery.removeData(elem,"toggle"+p,true);}} complete=options.complete;if(complete){options.complete=false;complete.call(elem);}} return false;}else{if(options.duration==Infinity){this.now=t;}else{n=t-this.startTime;this.state=n/options.duration;this.pos=OMjQuery.easing[options.animatedProperties[this.prop]](this.state,n,0,1,options.duration);this.now=this.start+((this.end-this.start)*this.pos);} this.update();} return true;}};OMjQuery.extend(OMjQuery.fx,{tick:function(){var timer,timers=OMjQuery.timers,i=0;for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}} if(!timers.length){OMjQuery.fx.stop();}},interval:13,stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){OMjQuery.style(fx.elem,"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;}}}});OMjQuery.each(fxAttrs.concat.apply([],fxAttrs),function(i,prop){if(prop.indexOf("margin")){OMjQuery.fx.step[prop]=function(fx){OMjQuery.style(fx.elem,prop,Math.max(0,fx.now)+fx.unit);};}});if(OMjQuery.expr&&OMjQuery.expr.filters){OMjQuery.expr.filters.animated=function(elem){return OMjQuery.grep(OMjQuery.timers,function(fn){return elem===fn.elem;}).length;};} function defaultDisplay(nodeName){if(!elemdisplay[nodeName]){var body=document.body,elem=OMjQuery("<"+nodeName+">").appendTo(body),display=elem.css("display");elem.remove();if(display==="none"||display===""){if(!iframe){iframe=document.createElement("iframe");iframe.frameBorder=iframe.width=iframe.height=0;} body.appendChild(iframe);if(!iframeDoc||!iframe.createElement){iframeDoc=(iframe.contentWindow||iframe.contentDocument).document;iframeDoc.write((OMjQuery.support.boxModel?"<!doctype html>":"")+"<html><body>");iframeDoc.close();} elem=iframeDoc.createElement(nodeName);iframeDoc.body.appendChild(elem);display=OMjQuery.css(elem,"display");body.removeChild(iframe);} elemdisplay[nodeName]=display;} return elemdisplay[nodeName];} var getOffset,rtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;if("getBoundingClientRect"in document.documentElement){getOffset=function(elem,doc,docElem,box){try{box=elem.getBoundingClientRect();}catch(e){} if(!box||!OMjQuery.contains(docElem,elem)){return box?{top:box.top,left:box.left}:{top:0,left:0};} var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||OMjQuery.support.boxModel&&docElem.scrollTop||body.scrollTop,scrollLeft=win.pageXOffset||OMjQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft,top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;return{top:top,left:left};};}else{getOffset=function(elem,doc,docElem){var computedStyle,offsetParent=elem.offsetParent,prevOffsetParent=elem,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(OMjQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){break;} computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(OMjQuery.support.doesNotAddBorder&&!(OMjQuery.support.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;} if(OMjQuery.support.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} prevComputedStyle=computedStyle;} if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;} if(OMjQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);} return{top:top,left:left};};} OMjQuery.fn.offset=function(options){if(arguments.length){return options===undefined?this:this.each(function(i){OMjQuery.offset.setOffset(this,options,i);});} var elem=this[0],doc=elem&&elem.ownerDocument;if(!doc){return null;} if(elem===doc.body){return OMjQuery.offset.bodyOffset(elem);} return getOffset(elem,doc,doc.documentElement);};OMjQuery.offset={bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;if(OMjQuery.support.doesNotIncludeMarginInBodyOffset){top+=parseFloat(OMjQuery.css(body,"marginTop"))||0;left+=parseFloat(OMjQuery.css(body,"marginLeft"))||0;} return{top:top,left:left};},setOffset:function(elem,options,i){var position=OMjQuery.css(elem,"position");if(position==="static"){elem.style.position="relative";} var curElem=OMjQuery(elem),curOffset=curElem.offset(),curCSSTop=OMjQuery.css(elem,"top"),curCSSLeft=OMjQuery.css(elem,"left"),calculatePosition=(position==="absolute"||position==="fixed")&&OMjQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;} if(OMjQuery.isFunction(options)){options=options.call(elem,i,curOffset);} if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;} if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;} if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};OMjQuery.fn.extend({position:function(){if(!this[0]){return null;} var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(OMjQuery.css(elem,"marginTop"))||0;offset.left-=parseFloat(OMjQuery.css(elem,"marginLeft"))||0;parentOffset.top+=parseFloat(OMjQuery.css(offsetParent[0],"borderTopWidth"))||0;parentOffset.left+=parseFloat(OMjQuery.css(offsetParent[0],"borderLeftWidth"))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&OMjQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;} return offsetParent;});}});OMjQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);OMjQuery.fn[method]=function(val){return OMjQuery.access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?(prop in win)?win[prop]:OMjQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];} if(win){win.scrollTo(!top?val:OMjQuery(win).scrollLeft(),top?val:OMjQuery(win).scrollTop());}else{elem[method]=val;}},method,val,arguments.length,null);};});function getWindow(elem){return OMjQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;} OMjQuery.each({Height:"height",Width:"width"},function(name,type){var clientProp="client"+name,scrollProp="scroll"+name,offsetProp="offset"+name;OMjQuery.fn["inner"+name]=function(){var elem=this[0];return elem?elem.style?parseFloat(OMjQuery.css(elem,type,"padding")):this[type]():null;};OMjQuery.fn["outer"+name]=function(margin){var elem=this[0];return elem?elem.style?parseFloat(OMjQuery.css(elem,type,margin?"margin":"border")):this[type]():null;};OMjQuery.fn[type]=function(value){return OMjQuery.access(this,function(elem,type,value){var doc,docElemProp,orig,ret;if(OMjQuery.isWindow(elem)){doc=elem.document;docElemProp=doc.documentElement[clientProp];return OMjQuery.support.boxModel&&docElemProp||doc.body&&doc.body[clientProp]||docElemProp;} if(elem.nodeType===9){doc=elem.documentElement;if(doc[clientProp]>=doc[scrollProp]){return doc[clientProp];} return Math.max(elem.body[scrollProp],doc[scrollProp],elem.body[offsetProp],doc[offsetProp]);} if(value===undefined){orig=OMjQuery.css(elem,type);ret=parseFloat(orig);return OMjQuery.isNumeric(ret)?ret:orig;} OMjQuery(elem).css(type,value);},type,value,arguments.length,null);};});window.OMjQuery=window.$o=OMjQuery;if(typeof define==="function"&&define.amd&&define.amd.OMjQuery){define("jquery",[],function(){return OMjQuery;});}})(window);(function(){var root=this;var previousUnderscore=root._;var breaker={};var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var slice=ArrayProto.slice,unshift=ArrayProto.unshift,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var _=function(obj){return new wrapper(obj);};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=_;} exports._=_;}else{root['_']=_;} _.VERSION='1.3.3';var each=_.each=_.forEach=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach){obj.forEach(iterator,context);}else if(obj.length===+obj.length){for(var i=0,l=obj.length;i<l;i++){if(i in obj&&iterator.call(context,obj[i],i,obj)===breaker)return;}}else{for(var key in obj){if(_.has(obj,key)){if(iterator.call(context,obj[key],key,obj)===breaker)return;}}}};_.map=_.collect=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list);});if(obj.length===+obj.length)results.length=obj.length;return results;};_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=arguments.length>2;if(obj==null)obj=[];if(nativeReduce&&obj.reduce===nativeReduce){if(context)iterator=_.bind(iterator,context);return initial?obj.reduce(iterator,memo):obj.reduce(iterator);} each(obj,function(value,index,list){if(!initial){memo=value;initial=true;}else{memo=iterator.call(context,memo,value,index,list);}});if(!initial)throw new TypeError('Reduce of empty array with no initial value');return memo;};_.reduceRight=_.foldr=function(obj,iterator,memo,context){var initial=arguments.length>2;if(obj==null)obj=[];if(nativeReduceRight&&obj.reduceRight===nativeReduceRight){if(context)iterator=_.bind(iterator,context);return initial?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);} var reversed=_.toArray(obj).reverse();if(context&&!initial)iterator=_.bind(iterator,context);return initial?_.reduce(reversed,iterator,memo,context):_.reduce(reversed,iterator);};_.find=_.detect=function(obj,iterator,context){var result;any(obj,function(value,index,list){if(iterator.call(context,value,index,list)){result=value;return true;}});return result;};_.filter=_.select=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeFilter&&obj.filter===nativeFilter)return obj.filter(iterator,context);each(obj,function(value,index,list){if(iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.reject=function(obj,iterator,context){var results=[];if(obj==null)return results;each(obj,function(value,index,list){if(!iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.every=_.all=function(obj,iterator,context){var result=true;if(obj==null)return result;if(nativeEvery&&obj.every===nativeEvery)return obj.every(iterator,context);each(obj,function(value,index,list){if(!(result=result&&iterator.call(context,value,index,list)))return breaker;});return!!result;};var any=_.some=_.any=function(obj,iterator,context){iterator||(iterator=_.identity);var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);each(obj,function(value,index,list){if(result||(result=iterator.call(context,value,index,list)))return breaker;});return!!result;};_.include=_.contains=function(obj,target){var found=false;if(obj==null)return found;if(nativeIndexOf&&obj.indexOf===nativeIndexOf)return obj.indexOf(target)!=-1;found=any(obj,function(value){return value===target;});return found;};_.invoke=function(obj,method){var args=slice.call(arguments,2);return _.map(obj,function(value){return(_.isFunction(method)?method||value:value[method]).apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,function(value){return value[key];});};_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0])return Math.max.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return-Infinity;var result={computed:-Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed});});return result.value;};_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0])return Math.min.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return Infinity;var result={computed:Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed<result.computed&&(result={value:value,computed:computed});});return result.value;};_.shuffle=function(obj){var shuffled=[],rand;each(obj,function(value,index,list){rand=Math.floor(Math.random()*(index+1));shuffled[index]=shuffled[rand];shuffled[rand]=value;});return shuffled;};_.sortBy=function(obj,val,context){var iterator=_.isFunction(val)?val:function(obj){return obj[val];};return _.pluck(_.map(obj,function(value,index,list){return{value:value,criteria:iterator.call(context,value,index,list)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;if(a===void 0)return 1;if(b===void 0)return-1;return a<b?-1:a>b?1:0;}),'value');};_.groupBy=function(obj,val){var result={};var iterator=_.isFunction(val)?val:function(obj){return obj[val];};each(obj,function(value,index){var key=iterator(value,index);(result[key]||(result[key]=[])).push(value);});return result;};_.sortedIndex=function(array,obj,iterator){iterator||(iterator=_.identity);var low=0,high=array.length;while(low<high){var mid=(low+high)>>1;iterator(array[mid])<iterator(obj)?low=mid+1:high=mid;} return low;};_.toArray=function(obj){if(!obj)return[];if(_.isArray(obj))return slice.call(obj);if(_.isArguments(obj))return slice.call(obj);if(obj.toArray&&_.isFunction(obj.toArray))return obj.toArray();return _.values(obj);};_.size=function(obj){return _.isArray(obj)?obj.length:_.keys(obj).length;};_.first=_.head=_.take=function(array,n,guard){return(n!=null)&&!guard?slice.call(array,0,n):array[0];};_.initial=function(array,n,guard){return slice.call(array,0,array.length-((n==null)||guard?1:n));};_.last=function(array,n,guard){if((n!=null)&&!guard){return slice.call(array,Math.max(array.length-n,0));}else{return array[array.length-1];}};_.rest=_.tail=function(array,index,guard){return slice.call(array,(index==null)||guard?1:index);};_.compact=function(array){return _.filter(array,function(value){return!!value;});};_.flatten=function(array,shallow){return _.reduce(array,function(memo,value){if(_.isArray(value))return memo.concat(shallow?value:_.flatten(value));memo[memo.length]=value;return memo;},[]);};_.without=function(array){return _.difference(array,slice.call(arguments,1));};_.uniq=_.unique=function(array,isSorted,iterator){var initial=iterator?_.map(array,iterator):array;var results=[];if(array.length<3)isSorted=true;_.reduce(initial,function(memo,value,index){if(isSorted?_.last(memo)!==value||!memo.length:!_.include(memo,value)){memo.push(value);results.push(array[index]);} return memo;},[]);return results;};_.union=function(){return _.uniq(_.flatten(arguments,true));};_.intersection=_.intersect=function(array){var rest=slice.call(arguments,1);return _.filter(_.uniq(array),function(item){return _.every(rest,function(other){return _.indexOf(other,item)>=0;});});};_.difference=function(array){var rest=_.flatten(slice.call(arguments,1),true);return _.filter(array,function(value){return!_.include(rest,value);});};_.zip=function(){var args=slice.call(arguments);var length=_.max(_.pluck(args,'length'));var results=new Array(length);for(var i=0;i<length;i++)results[i]=_.pluck(args,""+i);return results;};_.indexOf=function(array,item,isSorted){if(array==null)return-1;var i,l;if(isSorted){i=_.sortedIndex(array,item);return array[i]===item?i:-1;} if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item);for(i=0,l=array.length;i<l;i++)if(i in array&&array[i]===item)return i;return-1;};_.lastIndexOf=function(array,item){if(array==null)return-1;if(nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return array.lastIndexOf(item);var i=array.length;while(i--)if(i in array&&array[i]===item)return i;return-1;};_.range=function(start,stop,step){if(arguments.length<=1){stop=start||0;start=0;} step=arguments[2]||1;var len=Math.max(Math.ceil((stop-start)/step),0);var idx=0;var range=new Array(len);while(idx<len){range[idx++]=start;start+=step;} return range;};var ctor=function(){};_.bind=function bind(func,context){var bound,args;if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));if(!_.isFunction(func))throw new TypeError;args=slice.call(arguments,2);return bound=function(){if(!(this instanceof bound))return func.apply(context,args.concat(slice.call(arguments)));ctor.prototype=func.prototype;var self=new ctor;var result=func.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result)return result;return self;};};_.bindAll=function(obj){var funcs=slice.call(arguments,1);if(funcs.length==0)funcs=_.functions(obj);each(funcs,function(f){obj[f]=_.bind(obj[f],obj);});return obj;};_.memoize=function(func,hasher){var memo={};hasher||(hasher=_.identity);return function(){var key=hasher.apply(this,arguments);return _.has(memo,key)?memo[key]:(memo[key]=func.apply(this,arguments));};};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args);},wait);};_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)));};_.throttle=function(func,wait){var context,args,timeout,throttling,more,result;var whenDone=_.debounce(function(){more=throttling=false;},wait);return function(){context=this;args=arguments;var later=function(){timeout=null;if(more)func.apply(context,args);whenDone();};if(!timeout)timeout=setTimeout(later,wait);if(throttling){more=true;}else{result=func.apply(context,args);} whenDone();throttling=true;return result;};};_.debounce=function(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args);};if(immediate&&!timeout)func.apply(context,args);clearTimeout(timeout);timeout=setTimeout(later,wait);};};_.once=function(func){var ran=false,memo;return function(){if(ran)return memo;ran=true;return memo=func.apply(this,arguments);};};_.wrap=function(func,wrapper){return function(){var args=[func].concat(slice.call(arguments,0));return wrapper.apply(this,args);};};_.compose=function(){var funcs=arguments;return function(){var args=arguments;for(var i=funcs.length-1;i>=0;i--){args=[funcs[i].apply(this,args)];} return args[0];};};_.after=function(times,func){if(times<=0)return func();return function(){if(--times<1){return func.apply(this,arguments);}};};_.keys=nativeKeys||function(obj){if(obj!==Object(obj))throw new TypeError('Invalid object');var keys=[];for(var key in obj)if(_.has(obj,key))keys[keys.length]=key;return keys;};_.values=function(obj){return _.map(obj,_.identity);};_.functions=_.methods=function(obj){var names=[];for(var key in obj){if(_.isFunction(obj[key]))names.push(key);} return names.sort();};_.extend=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){obj[prop]=source[prop];}});return obj;};_.pick=function(obj){var result={};each(_.flatten(slice.call(arguments,1)),function(key){if(key in obj)result[key]=obj[key];});return result;};_.defaults=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(obj[prop]==null)obj[prop]=source[prop];}});return obj;};_.clone=function(obj){if(!_.isObject(obj))return obj;return _.isArray(obj)?obj.slice():_.extend({},obj);};_.tap=function(obj,interceptor){interceptor(obj);return obj;};function eq(a,b,stack){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual&&_.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&_.isFunction(b.isEqual))return b.isEqual(a);var className=toString.call(a);if(className!=toString.call(b))return false;switch(className){case'[object String]':return a==String(b);case'[object Number]':return a!=+a?b!=+b:(a==0?1/a==1/b:a==+b);case'[object Date]':case'[object Boolean]':return+a==+b;case'[object RegExp]':return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase;} if(typeof a!='object'||typeof b!='object')return false;var length=stack.length;while(length--){if(stack[length]==a)return true;} stack.push(a);var size=0,result=true;if(className=='[object Array]'){size=a.length;result=size==b.length;if(result){while(size--){if(!(result=size in a==size in b&&eq(a[size],b[size],stack)))break;}}}else{if('constructor'in a!='constructor'in b||a.constructor!=b.constructor)return false;for(var key in a){if(_.has(a,key)){size++;if(!(result=_.has(b,key)&&eq(a[key],b[key],stack)))break;}} if(result){for(key in b){if(_.has(b,key)&&!(size--))break;} result=!size;}} stack.pop();return result;} _.isEqual=function(a,b){return eq(a,b,[]);};_.isEmpty=function(obj){if(obj==null)return true;if(_.isArray(obj)||_.isString(obj))return obj.length===0;for(var key in obj)if(_.has(obj,key))return false;return true;};_.isElement=function(obj){return!!(obj&&obj.nodeType==1);};_.isArray=nativeIsArray||function(obj){return toString.call(obj)=='[object Array]';};_.isObject=function(obj){return obj===Object(obj);};_.isArguments=function(obj){return toString.call(obj)=='[object Arguments]';};if(!_.isArguments(arguments)){_.isArguments=function(obj){return!!(obj&&_.has(obj,'callee'));};} _.isFunction=function(obj){return toString.call(obj)=='[object Function]';};_.isString=function(obj){return toString.call(obj)=='[object String]';};_.isNumber=function(obj){return toString.call(obj)=='[object Number]';};_.isFinite=function(obj){return _.isNumber(obj)&&isFinite(obj);};_.isNaN=function(obj){return obj!==obj;};_.isBoolean=function(obj){return obj===true||obj===false||toString.call(obj)=='[object Boolean]';};_.isDate=function(obj){return toString.call(obj)=='[object Date]';};_.isRegExp=function(obj){return toString.call(obj)=='[object RegExp]';};_.isNull=function(obj){return obj===null;};_.isUndefined=function(obj){return obj===void 0;};_.has=function(obj,key){return hasOwnProperty.call(obj,key);};_.noConflict=function(){root._=previousUnderscore;return this;};_.identity=function(value){return value;};_.times=function(n,iterator,context){for(var i=0;i<n;i++)iterator.call(context,i);};_.escape=function(string){return(''+string).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/\//g,'/');};_.result=function(object,property){if(object==null)return null;var value=object[property];return _.isFunction(value)?value.call(object):value;};_.mixin=function(obj){each(_.functions(obj),function(name){addToWrapper(name,_[name]=obj[name]);});};var idCounter=0;_.uniqueId=function(prefix){var id=idCounter++;return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/.^/;var escapes={'\\':'\\',"'":"'",'r':'\r','n':'\n','t':'\t','u2028':'\u2028','u2029':'\u2029'};for(var p in escapes)escapes[escapes[p]]=p;var escaper=/\\|'|\r|\n|\t|\u2028|\u2029/g;var unescaper=/\\(\\|'|r|n|t|u2028|u2029)/g;var unescape=function(code){return code.replace(unescaper,function(match,escape){return escapes[escape];});};_.template=function(text,data,settings){settings=_.defaults(settings||{},_.templateSettings);var source="__p+='"+text.replace(escaper,function(match){return'\\'+escapes[match];}).replace(settings.escape||noMatch,function(match,code){return"'+\n_.escape("+unescape(code)+")+\n'";}).replace(settings.interpolate||noMatch,function(match,code){return"'+\n("+unescape(code)+")+\n'";}).replace(settings.evaluate||noMatch,function(match,code){return"';\n"+unescape(code)+"\n;__p+='";})+"';\n";if(!settings.variable)source='with(obj||{}){\n'+source+'}\n';source="var __p='';"+"var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+ source+"return __p;\n";var render=new Function(settings.variable||'obj','_',source);if(data)return render(data,_);var template=function(data){return render.call(this,data,_);};template.source='function('+(settings.variable||'obj')+'){\n'+ source+'}';return template;};_.chain=function(obj){return _(obj).chain();};var wrapper=function(obj){this._wrapped=obj;};_.prototype=wrapper.prototype;var result=function(obj,chain){return chain?_(obj).chain():obj;};var addToWrapper=function(name,func){wrapper.prototype[name]=function(){var args=slice.call(arguments);unshift.call(args,this._wrapped);return result(func.apply(_,args),this._chain);};};_.mixin(_);each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){var wrapped=this._wrapped;method.apply(wrapped,arguments);var length=wrapped.length;if((name=='shift'||name=='splice')&&length===0)delete wrapped[0];return result(wrapped,this._chain);};});each(['concat','join','slice'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){return result(method.apply(this._wrapped,arguments),this._chain);};});wrapper.prototype.chain=function(){this._chain=true;return this;};wrapper.prototype.value=function(){return this._wrapped;};}).call(this);(function(){var root=this;var previousBackbone=root.Backbone;var Backbone;if(typeof exports!=='undefined'){Backbone=exports;}else{Backbone=root.Backbone={};} Backbone.VERSION='0.5.2';var _=root._;if(!_&&(typeof require!=='undefined'))_=require('underscore')._;var $=root.jQuery||root.Zepto;Backbone.noConflict=function(){root.Backbone=previousBackbone;return this;};Backbone.emulateHTTP=false;Backbone.emulateJSON=false;Backbone.Events={bind:function(ev,callback,context){var calls=this._callbacks||(this._callbacks={});var list=calls[ev]||(calls[ev]=[]);list.push([callback,context]);return this;},unbind:function(ev,callback){var calls;if(!ev){this._callbacks={};}else if(calls=this._callbacks){if(!callback){calls[ev]=[];}else{var list=calls[ev];if(!list)return this;for(var i=0,l=list.length;i<l;i++){if(list[i]&&callback===list[i][0]){list[i]=null;break;}}}} return this;},trigger:function(eventName){var list,calls,ev,callback,args;var both=2;if(!(calls=this._callbacks))return this;while(both--){ev=both?eventName:'all';if(list=calls[ev]){for(var i=0,l=list.length;i<l;i++){if(!(callback=list[i])){list.splice(i,1);i--;l--;}else{args=both?Array.prototype.slice.call(arguments,1):arguments;callback[0].apply(callback[1]||this,args);}}}} return this;}};Backbone.Model=function(attributes,options){var defaults;attributes||(attributes={});if(defaults=this.defaults){if(_.isFunction(defaults))defaults=defaults.call(this);attributes=_.extend({},defaults,attributes);} this.attributes={};this._escapedAttributes={};this.cid=_.uniqueId('c');this.set(attributes,{silent:true});this._changed=false;this._previousAttributes=_.clone(this.attributes);if(options&&options.collection)this.collection=options.collection;this.initialize(attributes,options);};_.extend(Backbone.Model.prototype,Backbone.Events,{_previousAttributes:null,_changed:false,idAttribute:'id',initialize:function(){},toJSON:function(){return _.clone(this.attributes);},get:function(attr){return this.attributes[attr];},escape:function(attr){var html;if(html=this._escapedAttributes[attr])return html;var val=this.attributes[attr];return this._escapedAttributes[attr]=escapeHTML(val==null?'':''+val);},has:function(attr){return this.attributes[attr]!=null;},set:function(attrs,options){options||(options={});if(!attrs)return this;if(attrs.attributes)attrs=attrs.attributes;var now=this.attributes,escaped=this._escapedAttributes;if(!options.silent&&this.validate&&!this._performValidation(attrs,options))return false;if(this.idAttribute in attrs)this.id=attrs[this.idAttribute];var alreadyChanging=this._changing;this._changing=true;for(var attr in attrs){var val=attrs[attr];if(!_.isEqual(now[attr],val)){now[attr]=val;delete escaped[attr];this._changed=true;if(!options.silent)this.trigger('change:'+attr,this,val,options);}} if(!alreadyChanging&&!options.silent&&this._changed)this.change(options);this._changing=false;return this;},unset:function(attr,options){if(!(attr in this.attributes))return this;options||(options={});var value=this.attributes[attr];var validObj={};validObj[attr]=void 0;if(!options.silent&&this.validate&&!this._performValidation(validObj,options))return false;delete this.attributes[attr];delete this._escapedAttributes[attr];if(attr==this.idAttribute)delete this.id;this._changed=true;if(!options.silent){this.trigger('change:'+attr,this,void 0,options);this.change(options);} return this;},clear:function(options){options||(options={});var attr;var old=this.attributes;var validObj={};for(attr in old)validObj[attr]=void 0;if(!options.silent&&this.validate&&!this._performValidation(validObj,options))return false;this.attributes={};this._escapedAttributes={};this._changed=true;if(!options.silent){for(attr in old){this.trigger('change:'+attr,this,void 0,options);} this.change(options);} return this;},fetch:function(options){options||(options={});var model=this;var success=options.success;options.success=function(resp,status,xhr){if(!model.set(model.parse(resp,xhr),options))return false;if(success)success(model,resp);};options.error=wrapError(options.error,model,options);return(this.sync||Backbone.sync).call(this,'read',this,options);},save:function(attrs,options){options||(options={});if(attrs&&!this.set(attrs,options))return false;var model=this;var success=options.success;options.success=function(resp,status,xhr){if(!model.set(model.parse(resp,xhr),options))return false;if(success)success(model,resp,xhr);};options.error=wrapError(options.error,model,options);var method=this.isNew()?'create':'update';return(this.sync||Backbone.sync).call(this,method,this,options);},destroy:function(options){options||(options={});if(this.isNew())return this.trigger('destroy',this,this.collection,options);var model=this;var success=options.success;options.success=function(resp){model.trigger('destroy',model,model.collection,options);if(success)success(model,resp);};options.error=wrapError(options.error,model,options);return(this.sync||Backbone.sync).call(this,'delete',this,options);},url:function(){var base=getUrl(this.collection)||this.urlRoot||urlError();if(this.isNew())return base;return base+(base.charAt(base.length-1)=='/'?'':'/')+encodeURIComponent(this.id);},parse:function(resp,xhr){return resp;},clone:function(){return new this.constructor(this);},isNew:function(){return this.id==null;},change:function(options){this.trigger('change',this,options);this._previousAttributes=_.clone(this.attributes);this._changed=false;},hasChanged:function(attr){if(attr)return this._previousAttributes[attr]!=this.attributes[attr];return this._changed;},changedAttributes:function(now){now||(now=this.attributes);var old=this._previousAttributes;var changed=false;for(var attr in now){if(!_.isEqual(old[attr],now[attr])){changed=changed||{};changed[attr]=now[attr];}} return changed;},previous:function(attr){if(!attr||!this._previousAttributes)return null;return this._previousAttributes[attr];},previousAttributes:function(){return _.clone(this._previousAttributes);},_performValidation:function(attrs,options){var error=this.validate(attrs);if(error){if(options.error){options.error(this,error,options);}else{this.trigger('error',this,error,options);} return false;} return true;}});Backbone.Collection=function(models,options){options||(options={});if(options.comparator)this.comparator=options.comparator;_.bindAll(this,'_onModelEvent','_removeReference');this._reset();if(models)this.reset(models,{silent:true});this.initialize.apply(this,arguments);};_.extend(Backbone.Collection.prototype,Backbone.Events,{model:Backbone.Model,initialize:function(){},toJSON:function(){return this.map(function(model){return model.toJSON();});},add:function(models,options){if(_.isArray(models)){for(var i=0,l=models.length;i<l;i++){this._add(models[i],options);}}else{this._add(models,options);} return this;},remove:function(models,options){if(_.isArray(models)){for(var i=0,l=models.length;i<l;i++){this._remove(models[i],options);}}else{this._remove(models,options);} return this;},get:function(id){if(id==null)return null;return this._byId[id.id!=null?id.id:id];},getByCid:function(cid){return cid&&this._byCid[cid.cid||cid];},at:function(index){return this.models[index];},sort:function(options){options||(options={});if(!this.comparator)throw new Error('Cannot sort a set without a comparator');this.models=this.sortBy(this.comparator);if(!options.silent)this.trigger('reset',this,options);return this;},pluck:function(attr){return _.map(this.models,function(model){return model.get(attr);});},reset:function(models,options){models||(models=[]);options||(options={});this.each(this._removeReference);this._reset();this.add(models,{silent:true});if(!options.silent)this.trigger('reset',this,options);return this;},fetch:function(options){options||(options={});var collection=this;var success=options.success;options.success=function(resp,status,xhr){collection[options.add?'add':'reset'](collection.parse(resp,xhr),options);if(success)success(collection,resp);};options.error=wrapError(options.error,collection,options);return(this.sync||Backbone.sync).call(this,'read',this,options);},create:function(model,options){var coll=this;options||(options={});model=this._prepareModel(model,options);if(!model)return false;var success=options.success;options.success=function(nextModel,resp,xhr){coll.add(nextModel,options);if(success)success(nextModel,resp,xhr);};model.save(null,options);return model;},parse:function(resp,xhr){return resp;},chain:function(){return _(this.models).chain();},_reset:function(options){this.length=0;this.models=[];this._byId={};this._byCid={};},_prepareModel:function(model,options){if(!(model instanceof Backbone.Model)){var attrs=model;model=new this.model(attrs,{collection:this});if(model.validate&&!model._performValidation(attrs,options))model=false;}else if(!model.collection){model.collection=this;} return model;},_add:function(model,options){options||(options={});model=this._prepareModel(model,options);if(!model)return false;var already=this.getByCid(model);if(already)throw new Error(["Can't add the same model to a set twice",already.id]);this._byId[model.id]=model;this._byCid[model.cid]=model;var index=options.at!=null?options.at:this.comparator?this.sortedIndex(model,this.comparator):this.length;this.models.splice(index,0,model);model.bind('all',this._onModelEvent);this.length++;if(!options.silent)model.trigger('add',model,this,options);return model;},_remove:function(model,options){options||(options={});model=this.getByCid(model)||this.get(model);if(!model)return null;delete this._byId[model.id];delete this._byCid[model.cid];this.models.splice(this.indexOf(model),1);this.length--;if(!options.silent)model.trigger('remove',model,this,options);this._removeReference(model);return model;},_removeReference:function(model){if(this==model.collection){delete model.collection;} model.unbind('all',this._onModelEvent);},_onModelEvent:function(ev,model,collection,options){if((ev=='add'||ev=='remove')&&collection!=this)return;if(ev=='destroy'){this._remove(model,options);} if(model&&ev==='change:'+model.idAttribute){delete this._byId[model.previous(model.idAttribute)];this._byId[model.id]=model;} this.trigger.apply(this,arguments);}});var methods=['forEach','each','map','reduce','reduceRight','find','detect','filter','select','reject','every','all','some','any','include','contains','invoke','max','min','sortBy','sortedIndex','toArray','size','first','rest','last','without','indexOf','lastIndexOf','isEmpty'];_.each(methods,function(method){Backbone.Collection.prototype[method]=function(){return _[method].apply(_,[this.models].concat(_.toArray(arguments)));};});Backbone.Router=function(options){options||(options={});if(options.routes)this.routes=options.routes;this._bindRoutes();this.initialize.apply(this,arguments);};var namedParam=/:([\w\d]+)/g;var splatParam=/\*([\w\d]+)/g;var escapeRegExp=/[-[\]{}()+?.,\\^$|#\s]/g;_.extend(Backbone.Router.prototype,Backbone.Events,{initialize:function(){},route:function(route,name,callback){Backbone.history||(Backbone.history=new Backbone.History);if(!_.isRegExp(route))route=this._routeToRegExp(route);Backbone.history.route(route,_.bind(function(fragment){var args=this._extractParameters(route,fragment);callback.apply(this,args);this.trigger.apply(this,['route:'+name].concat(args));},this));},navigate:function(fragment,triggerRoute){Backbone.history.navigate(fragment,triggerRoute);},_bindRoutes:function(){if(!this.routes)return;var routes=[];for(var route in this.routes){routes.unshift([route,this.routes[route]]);} for(var i=0,l=routes.length;i<l;i++){this.route(routes[i][0],routes[i][1],this[routes[i][1]]);}},_routeToRegExp:function(route){route=route.replace(escapeRegExp,"\\$&").replace(namedParam,"([^\/]*)").replace(splatParam,"(.*?)");return new RegExp('^'+route+'$');},_extractParameters:function(route,fragment){return route.exec(fragment).slice(1);}});Backbone.History=function(){this.handlers=[];_.bindAll(this,'checkUrl');};var hashStrip=/^#*/;var isExplorer=/msie [\w.]+/;var historyStarted=false;_.extend(Backbone.History.prototype,{interval:50,getFragment:function(fragment,forcePushState){if(fragment==null){if(this._hasPushState||forcePushState){fragment=window.location.pathname;var search=window.location.search;if(search)fragment+=search;if(fragment.indexOf(this.options.root)==0)fragment=fragment.substr(this.options.root.length);}else{fragment=window.location.hash;}} return fragment.replace(hashStrip,'');},start:function(options){if(historyStarted)throw new Error("Backbone.history has already been started");this.options=_.extend({},{root:'/'},this.options,options);this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var fragment=this.getFragment();var docMode=document.documentMode;var oldIE=(isExplorer.exec(navigator.userAgent.toLowerCase())&&(!docMode||docMode<=7));if(oldIE){this.iframe=$o('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;this.navigate(fragment);} if(this._hasPushState){$o(window).bind('popstate',this.checkUrl);}else if('onhashchange'in window&&!oldIE){$o(window).bind('hashchange',this.checkUrl);}else{setInterval(this.checkUrl,this.interval);} this.fragment=fragment;historyStarted=true;var loc=window.location;var atRoot=loc.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!atRoot){this.fragment=this.getFragment(null,true);window.location.replace(this.options.root+'#'+this.fragment);return true;}else if(this._wantsPushState&&this._hasPushState&&atRoot&&loc.hash){this.fragment=loc.hash.replace(hashStrip,'');window.history.replaceState({},document.title,loc.protocol+'//'+loc.host+this.options.root+this.fragment);} return this.loadUrl();},route:function(route,callback){this.handlers.unshift({route:route,callback:callback});},checkUrl:function(e){var current=this.getFragment();if(current==this.fragment&&this.iframe)current=this.getFragment(this.iframe.location.hash);if(current==this.fragment||current==decodeURIComponent(this.fragment))return false;if(this.iframe)this.navigate(current);this.loadUrl()||this.loadUrl(window.location.hash);},loadUrl:function(fragmentOverride){var fragment=this.fragment=this.getFragment(fragmentOverride);var matched=_.any(this.handlers,function(handler){if(handler.route.test(fragment)){handler.callback(fragment);return true;}});return matched;},navigate:function(fragment,triggerRoute){var frag=(fragment||'').replace(hashStrip,'');if(this.fragment==frag||this.fragment==decodeURIComponent(frag))return;if(this._hasPushState){var loc=window.location;if(frag.indexOf(this.options.root)!=0)frag=this.options.root+frag;this.fragment=frag;window.history.pushState({},document.title,loc.protocol+'//'+loc.host+frag);}else{window.location.hash=this.fragment=frag;if(this.iframe&&(frag!=this.getFragment(this.iframe.location.hash))){this.iframe.document.open().close();this.iframe.location.hash=frag;}} if(triggerRoute)this.loadUrl(fragment);}});Backbone.View=function(options){this.cid=_.uniqueId('view');this._configure(options||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments);};var selectorDelegate=function(selector){return $o(selector,this.el);};var eventSplitter=/^(\S+)\s*(.*)$/;var viewOptions=['model','collection','el','id','attributes','className','tagName'];_.extend(Backbone.View.prototype,Backbone.Events,{tagName:'div',$:selectorDelegate,initialize:function(){},render:function(){return this;},remove:function(){$o(this.el).remove();return this;},make:function(tagName,attributes,content){var el=document.createElement(tagName);if(attributes)$o(el).attr(attributes);if(content)$o(el).html(content);return el;},delegateEvents:function(events){if(!(events||(events=this.events)))return;$o(this.el).unbind('.delegateEvents'+this.cid);for(var key in events){var method=this[events[key]];if(!method)throw new Error('Event "'+events[key]+'" does not exist');var match=key.match(eventSplitter);var eventName=match[1],selector=match[2];method=_.bind(method,this);eventName+='.delegateEvents'+this.cid;if(selector===''){$o(this.el).bind(eventName,method);}else{$o(this.el).delegate(selector,eventName,method);}}},_configure:function(options){if(this.options)options=_.extend({},this.options,options);for(var i=0,l=viewOptions.length;i<l;i++){var attr=viewOptions[i];if(options[attr])this[attr]=options[attr];} this.options=options;},_ensureElement:function(){if(!this.el){var attrs=this.attributes||{};if(this.id)attrs.id=this.id;if(this.className)attrs['class']=this.className;this.el=this.make(this.tagName,attrs);}else if(_.isString(this.el)){this.el=$o(this.el).get(0);}}});var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child;};Backbone.Model.extend=Backbone.Collection.extend=Backbone.Router.extend=Backbone.View.extend=extend;var methodMap={'create':'POST','update':'PUT','delete':'DELETE','read':'GET'};Backbone.sync=function(method,model,options){var type=methodMap[method];var params=_.extend({type:type,dataType:'json'},options);if(!params.url){params.url=getUrl(model)||urlError();} if(!params.data&&model&&(method=='create'||method=='update')){params.contentType='application/json';params.data=JSON.stringify(model.toJSON());} if(Backbone.emulateJSON){params.contentType='application/x-www-form-urlencoded';params.data=params.data?{model:params.data}:{};} if(Backbone.emulateHTTP){if(type==='PUT'||type==='DELETE'){if(Backbone.emulateJSON)params.data._method=type;params.type='POST';params.beforeSend=function(xhr){xhr.setRequestHeader('X-HTTP-Method-Override',type);};}} if(params.type!=='GET'){params.processData=false;} return $o.ajax(params);};var ctor=function(){};var inherits=function(parent,protoProps,staticProps){var child;if(protoProps&&protoProps.hasOwnProperty('constructor')){child=protoProps.constructor;}else{child=function(){return parent.apply(this,arguments);};} _.extend(child,parent);ctor.prototype=parent.prototype;child.prototype=new ctor();if(protoProps)_.extend(child.prototype,protoProps);if(staticProps)_.extend(child,staticProps);child.prototype.constructor=child;child.__super__=parent.prototype;return child;};var getUrl=function(object){if(!(object&&object.url))return null;return _.isFunction(object.url)?object.url():object.url;};var urlError=function(){throw new Error('A "url" property or function must be specified');};var wrapError=function(onError,model,options){return function(resp){if(onError){onError(model,resp,options);}else{model.trigger('error',model,resp,options);}};};var escapeHTML=function(string){return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/\//g,'/');};}).call(this);(function(){var test=document.createElement('input');try{test.type='range';if(test.type=='range') return;}catch(e){return;} if(!document.mozSetImageElement||!('MozAppearance'in test.style)) return;var scale;var isMac=navigator.platform=='MacIntel';var thumb={radius:isMac?9:6,width:isMac?22:12,height:isMac?16:20};var track='-moz-linear-gradient(top, transparent '+(isMac?'6px, #999 6px, #999 7px, #ccc 9px, #bbb 11px, #bbb 12px, transparent 12px':'9px, #999 9px, #bbb 10px, #fff 11px, transparent 11px')+', transparent)';var styles={'min-width':thumb.width+'px','min-height':thumb.height+'px','max-height':thumb.height+'px',padding:0,border:0,'border-radius':0,cursor:'default','text-indent':'-999999px'};var onChange=document.createEvent('HTMLEvents');onChange.initEvent('change',true,false);if(document.readyState=='loading') document.addEventListener('DOMContentLoaded',initialize,true);else initialize();function initialize(){Array.forEach(document.querySelectorAll('input[type=range]'),transform);document.addEventListener('DOMNodeInserted',onNodeInserted,true);} function onNodeInserted(e){check(e.target);if(e.target.querySelectorAll) Array.forEach(e.target.querySelectorAll('input'),check);} function check(input,async){if(input.localName!='input'||input.type=='range');else if(input.getAttribute('type')=='range') transform(input);else if(!async) setTimeout(check,0,input,true);} function transform(slider){var isValueSet,areAttrsSet,isChanged,isClick,prevValue,rawValue,prevX;var min,max,step,range,value=slider.value;if(!scale){scale=document.body.appendChild(document.createElement('hr'));style(scale,{'-moz-appearance':isMac?'scale-horizontal':'scalethumb-horizontal',display:'block',visibility:'visible',opacity:1,position:'fixed',top:'-999999px'});document.mozSetImageElement('__sliderthumb__',scale);} var getValue=function(){return''+value;};var setValue=function setValue(val){value=''+val;isValueSet=true;draw();delete slider.value;slider.value=value;slider.__defineGetter__('value',getValue);slider.__defineSetter__('value',setValue);};slider.__defineGetter__('value',getValue);slider.__defineSetter__('value',setValue);slider.__defineGetter__('type',function(){return'range';});['min','max','step'].forEach(function(prop){if(slider.hasAttribute(prop)) areAttrsSet=true;slider.__defineGetter__(prop,function(){return this.hasAttribute(prop)?this.getAttribute(prop):'';});slider.__defineSetter__(prop,function(val){val===null?this.removeAttribute(prop):this.setAttribute(prop,val);});});slider.readOnly=true;style(slider,styles);update();slider.addEventListener('DOMAttrModified',function(e){if(e.attrName=='value'&&!isValueSet){value=e.newValue;draw();} else if(~['min','max','step'].indexOf(e.attrName)){update();areAttrsSet=true;}},true);slider.addEventListener('mousedown',onDragStart,true);slider.addEventListener('keydown',onKeyDown,true);slider.addEventListener('focus',onFocus,true);slider.addEventListener('blur',onBlur,true);function onDragStart(e){isClick=true;setTimeout(function(){isClick=false;},0);if(e.button||!range) return;var width=parseFloat(getComputedStyle(this,0).width);var multiplier=(width-thumb.width)/range;if(!multiplier) return;var dev=e.clientX-this.getBoundingClientRect().left-thumb.width/2- (value-min)*multiplier;if(Math.abs(dev)>thumb.radius){isChanged=true;this.value-=-dev/multiplier;} rawValue=value;prevX=e.clientX;this.addEventListener('mousemove',onDrag,true);this.addEventListener('mouseup',onDragEnd,true);} function onDrag(e){var width=parseFloat(getComputedStyle(this,0).width);var multiplier=(width-thumb.width)/range;if(!multiplier) return;rawValue+=(e.clientX-prevX)/multiplier;prevX=e.clientX;isChanged=true;this.value=rawValue;} function onDragEnd(){this.removeEventListener('mousemove',onDrag,true);this.removeEventListener('mouseup',onDragEnd,true);} function onKeyDown(e){if(e.keyCode>36&&e.keyCode<41){onFocus.call(this);isChanged=true;this.value=value+(e.keyCode==38||e.keyCode==39?step:-step);}} function onFocus(){if(!isClick) this.style.boxShadow=!isMac?'0 0 0 2px #fb0':'0 0 2px 1px -moz-mac-focusring, inset 0 0 1px -moz-mac-focusring';} function onBlur(){this.style.boxShadow='';} function isAttrNum(value){return!isNaN(value)&&+value==parseFloat(value);} function update(){min=isAttrNum(slider.min)?+slider.min:0;max=isAttrNum(slider.max)?+slider.max:100;if(max<min) max=min>100?min:100;step=isAttrNum(slider.step)&&slider.step>0?+slider.step:1;range=max-min;draw(true);} function calc(){if(!isValueSet&&!areAttrsSet) value=slider.getAttribute('value');if(!isAttrNum(value)) value=(min+max)/2;;value=Math.round((value-min)/step)*step+min;if(value<min) value=min;else if(value>max) value=min+~~(range/step)*step;} function draw(attrsModified){calc();if(isChanged&&value!=prevValue) slider.dispatchEvent(onChange);isChanged=false;if(!attrsModified&&value==prevValue) return;prevValue=value;var position=range?(value-min)/range*100:0;var bg='-moz-element(#__sliderthumb__) '+position+'% no-repeat, ';style(slider,{background:bg+track});}} function style(element,styles){for(var prop in styles) element.style.setProperty(prop,styles[prop],'important');}})();(function(){$o('head').append('<style rel="stylesheet" type="text/css">button{font-size:9px;margin:0 3px;padding:0 3px}#overlay_me_page_container{position:relative}#overlay_me_menu{position:fixed;right:0;z-index:990}#overlay_me_menu *{line-height:14px}#overlay_me_menu .drag-me{line-height:100%;display:block;color:black;font-size:.7em;text-align:center;background-image:-webkit-gradient(linear,0deg,0deg,color-stop(0%,#999),color-stop(30%,#ddd),color-stop(70%,#ddd),color-stop(100%,#999));background-image:-webkit-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-moz-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-o-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-ms-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);padding:1px}#overlay_me_menu .drag-me:hover{cursor:move}#overlay_me_menu ul{list-style:none;margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.menu-item{text-align:left;background-color:#CCC;border:1px solid rgba(255,255,255,0.2);width:200px}.menu-item a.collaps-button{cursor:pointer;position:absolute;padding-top:9px;padding-left:5px;width:13px;height:9px;border:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px}.menu-item a.collaps-button span{display:none;color:yellow}.menu-item a.collaps-button span:hover{color:yellow}.menu-item label.title{padding-left:20px;color:white;cursor:pointer;width:187px;line-height:1.1em;font-size:14px;background:none}.menu-item.collapsed .item-content{display:none}.menu-item.collapsed a.collaps-button{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top}#overlay_panel .content-mgnt-block{position:relative;line-height:10px}#overlay_panel .content-mgnt-block .unicorns{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAklJREFUeNqEks1u00AQx3d27V3HdezY+SBpkKBFoBZxQEKIOwfegBs3rtwoPABvw3sgceKAuFWtUBBSaT6ctvHXer2zOElTVaoKI/2lWWl/O//ZGZi8jgSPxFv3JX93+CJvfJ4/09++vzH6S/SVH59+IohH5JagxBilC4zNHHigSLvtTCPRnLYxtB4b29ojGglBc1PG1PAyLfUxzszIX7B86MwLP/iVkS566DWeEgo+gfrWdV1VJoZgpUdqon84p1a+wxI1CA+l3Z+yqu89N5a9v65EVgK8TOpgH/edZS6JAZ97/AkfKjF3pTpRkUrlfQFnoGlaHNc2F0sAzPIFWIl9WMEGTYUZJfyB12ED2l9UE6bkDAcoy+0QznXJ8nIEBosNuIb3xLoBNIlRhNlc7Ho9dDA6l1OC8gKGUGEnhAyBFmpSu8zqf9jAzqZ/RIUxFDR0G2LQ6ueIwUzGFIuE95livS4p2RaUVQYas/p+xQ4eiavPqO2nKPUcCrvlCR50uqlirXGeiUWeua4uva6vebNDwHIJErq2fW0Mdfcxpjqmqe37Nnd73US64Ummt8a5bCpZhh5UrZanfS9gBw/5tcorGSz1TJ/rCTljoomOGDTLsh+NUz8Ypdz/ndBwlpFeIdn7Hevm9miD9QNxdVGNSQzGSR3ao6Duekm23fqT3Al/Ju3waAEnr1xyayxnymhgNcU9Z7sx5LtWA+6bquxXaeLr5J+wMZebRQwDiwW2x0O7I1y7ZxOrS+X/4Y0DXJ0pANhgM4sKRv4KMACD6UDbVgTzkgAAAABJRU5ErkJggg==) no-repeat center center;width:15px;height:15px;position:absolute;right:0;top:6px}#overlay_panel label{margin:0;font-size:14px}#overlay_panel .content-mgnt-block,#overlay_panel #images_mgnt{text-align:left;padding:3px 4px;margin:2px;border:1px #777 solid;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}#overlay_panel .content-mgnt-block legend,#overlay_panel #images_mgnt legend{font-size:10px;padding:0 3px;margin-left:10px}#overlay_panel .slider-block{display:block}#overlay_panel .slider-block label{font-size:60%;margin:0 5px 0 0;vertical-align:top}#overlay_panel .slider-block input[type=range]{margin:0;height:14px;width:120px}#overlay_panel #images_mgnt{width:186px}#overlay_panel #images_mgnt .controls{padding-bottom:2px}#overlay_panel #images_mgnt .controls label{margin-right:5px}#overlay_panel #images_mgnt .overlay-image-block,#overlay_panel #images_mgnt .images_dir{border:1px solid rgba(255,255,255,0.2);border-right:none;border-left:none;padding-top:2px}#overlay_panel #images_mgnt .overlay-image-block:first-child,#overlay_panel #images_mgnt .images_dir:first-child{border-top:none;padding-top:0}#overlay_panel #images_mgnt .overlay-image-block{text-align:left;position:relative;width:186px}#overlay_panel #images_mgnt .overlay-image-block.hovered{background-color:rgba(255,255,0,0.5)}#overlay_panel #images_mgnt .overlay-image-block .del-button{position:absolute;right:0;top:0;margin:1px;cursor:pointer;border:1px #AAA solid;font-size:10px;line-height:13px;background-color:#444;color:white;font-weight:bold;padding:0 3px}#overlay_panel #images_mgnt .images_dir{line-height:18px}#overlay_panel #images_mgnt .images_dir .sub-block{border-left:2px white solid;padding-left:2px;margin-left:5px}#overlay_panel #images_mgnt .images_dir>input[type=checkbox]{-webkit-appearance:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center center;display:inline-block;width:13px;height:13px}#overlay_panel #images_mgnt .images_dir>input[type=checkbox]:checked{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center center;width:13px;height:13px;margin:-2px 5px 0 0}#overlay_panel #images_mgnt .dynamic-adds{padding-top:4px}#overlay_panel #images_mgnt .dynamic-adds label{font-size:75%}#overlay_panel #images_mgnt .dynamic-adds input{width:95px;font-size:10px;margin-left:2px}#overlay_panel #images_mgnt .dynamic-adds button{font-size:10px}#overlay_panel input[type=checkbox],#overlay_panel label,#overlay_panel #contentSlider,#overlay_panel .zindex-switch{display:inline}#overlay_panel input[type=checkbox]{vertical-align:middle;margin:-3px 5px 0 0}#overlay_me_images_container{position:absolute;z-index:4;top:0;left:0}#overlay_me_images_container div{position:absolute}#overlay_me_images_container div.highlight{border:2px solid red;margin-top:-2px;margin-left:-2px}#overlay_me_images_container div:hover{cursor:move}#overlay_me_images_container img{position:absolute;top:0;left:0}#overlay_me_menu.collapsed .drag-me,#overlay_me_menu.collapsed .menu-item{width:25px}#overlay_me_menu.collapsed .drag-me{height:10px;overflow:hidden}#overlay_me_menu.collapsed button{height:10px;overflow:hidden}#overlay_me_menu.collapsed .overlay-image-block{height:14px;margin-top:3px}#overlay_me_menu.collapsed .overlay-image-block label,#overlay_me_menu.collapsed #content_div_management_block,#overlay_me_menu.collapsed .controls,#overlay_me_menu.collapsed input[type=range],#overlay_me_menu.collapsed #overlay_panel #contentSlider,#overlay_me_menu.collapsed legend,#overlay_me_menu.collapsed .dynamic-adds,#overlay_me_menu.collapsed .unicorns,#overlay_me_menu.collapsed button.reset,#overlay_me_menu.collapsed button.hide,#overlay_me_menu.collapsed button.del-button{display:none}</style>');window.OverlayMe={};window.OverlayMe.Mixin={};OverlayMe.isLoaded=function(){return window.overlay_me_loaded;};OverlayMe.isMobile=function(){return navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/);};OverlayMe.mustLoad=function(){return!OverlayMe.isLoaded()&&!OverlayMe.isMobile();};OverlayMe.clearAndReload=function(){localStorage.clear();return window.location.reload();};}).call(this);(function(){OverlayMe.Mixin.Storable={loadCss:function(element,default_css){var cssData;if(element==null){element=this.el;} if(!this.id){return;} if((cssData=localStorage.getItem(this.id))){return $o(element).css(JSON.parse(cssData));}else{if(default_css!==void 0){return $o(element).css(default_css);}}},saveCss:function(element){var cssData,css_attribute,_i,_len,_ref;if(element==null){element=this.el;} if(!this.id){return;} if(!this.css_attributes_to_save){this.css_attributes_to_save=['top','left','display','opacity'];} cssData={};_ref=this.css_attributes_to_save;for(_i=0,_len=_ref.length;_i<_len;_i++){css_attribute=_ref[_i];cssData[css_attribute]=$o(element).css(css_attribute);} return localStorage.setItem(this.id,JSON.stringify(cssData));}};}).call(this);(function(){OverlayMe.Mixin.Hideable={isDisplayed:function(){var element;element=this.el||this;return $o(element).css('display')!=='none';},toggleDisplay:function(default_display_type){if(default_display_type==null){default_display_type='block';} if(this.isDisplayed()){return this.hide();}else{return this.show(default_display_type);}},show:function(default_display_type){var element;if(default_display_type==null){default_display_type='block';} element=this.el||this;$o(element).css({display:default_display_type});return this.saveState();},hide:function(){var element;element=this.el||this;$o(element).css({display:'none'});return this.saveState();},saveState:function(){var element;element=this.el||this;if(this.saveCss){return this.saveCss(element);}}};}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Draggable=(function(_super){__extends(Draggable,_super);Draggable.name='Draggable';function Draggable(){return Draggable.__super__.constructor.apply(this,arguments);} Draggable.prototype.tagName='div';Draggable.prototype.css_attributes_to_save=['top','left','display','opacity'];Draggable.prototype.initialize=function(attributes,options){Draggable.__super__.initialize.call(this,attributes,options);return this.loadCss(this.el,options.default_css);};Draggable.prototype.engageMove=function(event){var _this=this;event.preventDefault();this.moving=true;this.lastX=event.clientX;this.lastY=event.clientY;$o(window).bind('mymousemove',function(event,mouseEvent){_this.updateOverlay(mouseEvent.clientX-_this.lastX,mouseEvent.clientY-_this.lastY);_this.lastX=mouseEvent.clientX;return _this.lastY=mouseEvent.clientY;});return $o(this.el).addClass('on-move');};Draggable.prototype.endMove=function(event){this.moving=false;$o(window).unbind('mymousemove');return $o(this.el).removeClass('on-move');};Draggable.prototype.toggleMove=function(event){if(this.moving){return this.endMove(event);}else{return this.engageMove(event);}};Draggable.prototype.updateOverlay=function(x,y){var newX,newY;newX=parseInt($o(this.el).css('left'))+x;newY=parseInt($o(this.el).css('top'))+y;$o(this.el).css({top:""+newY+"px",left:""+newX+"px"});return this.saveCss();};Draggable.prototype.render=function(){return this.el;};return Draggable;})(Backbone.View);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Hideable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuClass=(function(_super){__extends(MenuClass,_super);MenuClass.name='MenuClass';function MenuClass(){return MenuClass.__super__.constructor.apply(this,arguments);} MenuClass.prototype.id='overlay_me_menu';MenuClass.prototype.initialize=function(attributes){var drag_me_line,_this=this;MenuClass.__super__.initialize.call(this,attributes,{default_css:{top:'50px'}});drag_me_line=(new Backbone.View).make('div',{"class":'drag-me'},'Drag me up and down');this.menu_list=(new Backbone.View).make('ul');$o(this.el).append(drag_me_line);$o(this.el).append(this.menu_list);$o('body').append(this.render());$o(drag_me_line).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};MenuClass.prototype.append=function(element){return this.menu_list.appendChild(element);};MenuClass.prototype.toggleCollapse=function(){if($o(this.el).hasClass('collapsed')){return $o(this.el).removeClass('collapsed');}else{return $o(this.el).addClass('collapsed');}};return MenuClass;})(OverlayMe.Draggable);if(OverlayMe.mustLoad()){if(!OverlayMe.menu_box){OverlayMe.menu=new OverlayMe.MenuClass();}}}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuItem=(function(_super){__extends(MenuItem,_super);MenuItem.name='MenuItem';function MenuItem(){return MenuItem.__super__.constructor.apply(this,arguments);} MenuItem.prototype.tagName='li';MenuItem.prototype.className='menu-item';MenuItem.prototype.initialize=function(attributes,options){var _this=this;this.id=attributes.id;this.el.appendChild(this.collapseButton());this.title=this.make('label',{"class":'title'},attributes.title);$o(this.title).bind('click',function(){return _this.toggleCollapse();});this.el.appendChild(this.title);this.content=this.make('div',{"class":'item-content'});this.el.appendChild(this.content);this.collapsed=(localStorage.getItem(""+this.id+"-collapsed")===''?false:true);return this.setCollapse(this.collapsed);};MenuItem.prototype.collapseButton=function(){var _this=this;this.collapseButton=this.make('a',{"class":'collaps-button'},'<span>o</span>');$o(this.collapseButton).bind('click',function(){return _this.toggleCollapse();});return this.collapseButton;};MenuItem.prototype.toggleCollapse=function(){this.collapsed=!this.collapsed;this.setCollapse(this.collapsed);return this.saveState();};MenuItem.prototype.setCollapse=function(toCollapse){if(toCollapse){return $o(this.el).addClass('collapsed');}else{return $o(this.el).removeClass('collapsed');}};MenuItem.prototype.append=function(childElemt){return this.content.appendChild(childElemt);};MenuItem.prototype.render=function(){return this.el;};MenuItem.prototype.saveState=function(){return localStorage.setItem(""+this.id+"-collapsed",(this.collapsed?1:''));};return MenuItem;})(Backbone.View);}).call(this);(function(){var basics_panel,clear_all_button,collapse_button,hide_button,toggle_all_display,_this=this;if(OverlayMe.mustLoad()){basics_panel=new OverlayMe.MenuItem({id:"bacis-options",title:"Basics"});collapse_button=(new Backbone.View).make('button',{"class":'collapse'},'Collapse (c)');$o(collapse_button).bind('click',function(event){return OverlayMe.menu.toggleCollapse();});basics_panel.append(collapse_button);clear_all_button=(new Backbone.View).make('button',{"class":'reset',onClick:"javascript: OverlayMe.clearAndReload()"},'Reset All (r)');basics_panel.append(clear_all_button);toggle_all_display=function(){$o(window).trigger('overlay_me:toggle_all_display');return $o(window).trigger('overlay_me:toggle_overlay_me_images_container_display');};hide_button=(new Backbone.View).make('button',{"class":'hide'},'Hide (h)');$o(hide_button).bind('click',function(event){return toggle_all_display();});basics_panel.append(hide_button);OverlayMe.menu.append(basics_panel.render());$o(window).bind('keypress',function(event){if(event.charCode===104){toggle_all_display();} if(event.charCode===99){OverlayMe.menu.toggleCollapse();} if(event.charCode===114){return OverlayMe.clearAndReload();}});}}).call(this);(function(){OverlayMe.Overlays={};OverlayMe.Overlays.urlToId=function(url){return url.replace(/[.:\/]/g,'_').replace(/[^a-zA-Z0-9_\-]/g,'');};OverlayMe.unicorns=["http://fc07.deviantart.net/fs49/f/2009/200/b/3/Fat_Unicorn_and_the_Rainbow_by_la_ratta.jpg","http://www.deviantart.com/download/126388773/Unicorn_Pukes_Rainbow_by_Angel35W.jpg","http://macmcrae.com/wp-content/uploads/2010/02/unicorn.jpg","http://4.bp.blogspot.com/-uPLiez-m9vY/TacC_Bmsn3I/AAAAAAAAAyg/jusQIA8aAME/s1600/Behold_A_Rainbow_Unicorn_Ninja_by_Jess4921.jpg","http://www.everquestdragon.com/everquestdragon/main/image.axd?picture=2009%2F9%2FPaperPaperNewrainbow.png"];}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ContainerItself=(function(_super){__extends(ContainerItself,_super);ContainerItself.name='ContainerItself';function ContainerItself(){return ContainerItself.__super__.constructor.apply(this,arguments);} ContainerItself.prototype.tagName='div';ContainerItself.prototype.css_attributes_to_save=['display'];ContainerItself.prototype.initialize=function(attributes,options){var _this=this;ContainerItself.__super__.initialize.call(this,attributes,options);this.loadCss();return $o(window).bind("overlay_me:toggle_"+this.id+"_display",function(event,options){if(options){if(options.show){return _this.show();}else{return _this.hide();}}else{return _this.toggleDisplay();}});};return ContainerItself;})(Backbone.View);_.extend(OverlayMe.Overlays.ContainerItself.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Overlays.ContainerItself.prototype,OverlayMe.Mixin.Hideable);OverlayMe.Overlays.ImagesContainer=(function(_super){__extends(ImagesContainer,_super);ImagesContainer.name='ImagesContainer';function ImagesContainer(){return ImagesContainer.__super__.constructor.apply(this,arguments);} ImagesContainer.prototype.initialize=function(options){var container;if(!OverlayMe.images_container){OverlayMe.images_container=new OverlayMe.Overlays.ContainerItself({id:'overlay_me_images_container'});$o('body').append(OverlayMe.images_container.el);} if(options.parent_path){container=this.subDirContainer(options.parent_path);}else{container=OverlayMe.images_container;} return this.el=container.el||container;};ImagesContainer.prototype.subDirContainer=function(path,done_bits){var path_bits,sub_container,sub_container_parent_post_string,the_dir;if(done_bits==null){done_bits=[];} path_bits=_.difference(path.split('/'),_.union(done_bits,''));the_dir=path_bits.slice(0,1).toString();if(done_bits.length>0){sub_container_parent_post_string=done_bits.join(' ').replace(/\ ?(\w+)/g,' #$1_container');}else{sub_container_parent_post_string='';} sub_container=$o("#overlay_me_images_container "+sub_container_parent_post_string+" #"+(the_dir+'_container'));if(sub_container.length<1){sub_container=new OverlayMe.Overlays.ContainerItself({id:the_dir+'_container'});$o("#overlay_me_images_container "+sub_container_parent_post_string).append(sub_container.el);} if(path_bits.length>1){done_bits.push(the_dir);return this.subDirContainer(path,done_bits);}else{return sub_container;}};return ImagesContainer;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DraggableImage=(function(_super){__extends(DraggableImage,_super);DraggableImage.name='DraggableImage';function DraggableImage(){return DraggableImage.__super__.constructor.apply(this,arguments);} DraggableImage.prototype.initialize=function(attributes,options){var _this=this;DraggableImage.__super__.initialize.call(this,attributes,options);this.image=new Image();$o(this.image).load(function(){return _this.fitDivToImage();});$o(this.image).attr('src',options.image_src);$o(this.el).append(this.image);if($o(this.el).css('left')==='auto'||$o(this.el).css('left')===''){$o(this.el).css('left','0px');} if($o(this.el).css('top')==='auto'||$o(this.el).css('top')===''){$o(this.el).css('top','0px');} $o(this.el).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});$o(this.el).bind('mouseover',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").addClass('hovered');});return $o(this.el).bind('mouseout',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").removeClass('hovered');});};DraggableImage.prototype.fitDivToImage=function(){if(this.image.width>0){$o(this.el).css('width',this.image.width);return $o(this.el).css('height',this.image.height);}};DraggableImage.prototype.render=function(){return this.el;};return DraggableImage;})(OverlayMe.Draggable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.Image=(function(_super){__extends(Image,_super);Image.name='Image';function Image(){return Image.__super__.constructor.apply(this,arguments);} Image.prototype.tagName='div';Image.prototype.className='overlay-image-block';Image.prototype.initialize=function(image_src,options){var images_container,slider_block,_this=this;$o.extend({destroyable:false},options);this.image_src=image_src;this.image_id=OverlayMe.Overlays.urlToId(image_src);$o(this.el).attr('data-img-id',this.image_id);images_container=new OverlayMe.Overlays.ImagesContainer({parent_path:options.parent_path});this.default_css=$o.extend({display:'none',opacity:0.5},options.default_css);if(!($o("#"+this.image_id,images_container.el).length>0)){$o(images_container.el).append(this.image());} $o(this.el).append(this.checkbox());$o(this.el).append(this.label());slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.slider());if(options.destroyable){$o(this.el).append(this.delButton());} $o(this.el).bind('click',function(e){e.stopPropagation();return _this.flickCheckbox();});$o(this.el).bind('mouseover',function(event){$o(_this.image.el).addClass('highlight');return $o(_this.el).addClass('hovered');});return $o(this.el).bind('mouseout',function(event){$o(_this.image.el).removeClass('highlight');return $o(_this.el).removeClass('hovered');});};Image.prototype.image=function(){this.image=new OverlayMe.Overlays.DraggableImage({id:this.image_id},{image_src:this.image_src,default_css:this.default_css});return this.image.render();};Image.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.image.isDisplayed()){this.checkbox.checked=true;} $o(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});$o(this.checkbox).bind('change',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};Image.prototype.delButton=function(){var _this=this;this.delButton=this.make('button',{"class":'del-button',title:'Delete'},'x');$o(this.delButton).bind('click',function(e){return OverlayMe.dyn_manager.delImage(_this.image_id);});return this.delButton;};Image.prototype.flickCheckbox=function(){this.checkbox.checked=!this.checkbox.checked;return this.flickVisibility();};Image.prototype.flickVisibility=function(){if(this.checkbox.checked){$o(this.image.el).css('display','block');}else{$o(this.image.el).css('display','none');} return this.image.saveCss();};Image.prototype.label=function(){return this.label=this.make('label',{},this.image_src.replace(/.*\//,'').slice(-22));};Image.prototype.slider=function(){var _this=this;this.slider=this.make('input',{type:"range",value:$o(this.image.el).css('opacity')*100});$o(this.slider).bind('click',function(e){return e.stopPropagation();});$o(this.slider).bind('change',function(e){$o(_this.image.el).css('opacity',$o(_this.slider)[0].value/100);return _this.image.saveCss();});$o(this.slider).bind('mouseover',function(e){e.stopPropagation();return $o(_this.el).addClass('hovered');});$o(this.slider).bind('mouseout',function(e){e.stopPropagation();return $o(_this.el).removeClass('hovered');});return this.slider;};Image.prototype.render=function(){return this.el;};return Image;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesDirectory=(function(_super){__extends(ImagesDirectory,_super);ImagesDirectory.name='ImagesDirectory';function ImagesDirectory(){return ImagesDirectory.__super__.constructor.apply(this,arguments);} ImagesDirectory.prototype.tagName='div';ImagesDirectory.prototype.className='images_dir';ImagesDirectory.prototype.initialize=function(dirname){var _this=this;this.dirname=dirname;this.contentBlock=this.make('div',{id:this.dirname,"class":'sub-block'});_.extend(this.contentBlock,OverlayMe.Mixin.Hideable);_.extend(this.contentBlock,OverlayMe.Mixin.Storable);this.contentBlock.css_attributes_to_save=['display'];this.contentBlock.loadCss(this.contentBlock);$o(this.el).append(this.checkbox());$o(this.el).append(this.label());$o(this.el).append(this.contentBlock);return $o(this.el).bind('click',function(e){e.stopPropagation();return _this.checkbox.click();});};ImagesDirectory.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.contentBlock.isDisplayed()){this.checkbox.checked=true;} $o(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};ImagesDirectory.prototype.flickVisibility=function(){if(this.checkbox.checked){this.contentBlock.show();}else{this.contentBlock.hide();} return $o(window).trigger("overlay_me:toggle_"+this.dirname+"_container_display",{show:this.checkbox.checked});};ImagesDirectory.prototype.label=function(){return this.label=this.make('label',{},'/'+this.dirname+'/');};ImagesDirectory.prototype.append=function(block){return this.contentBlock.appendChild(block);};ImagesDirectory.prototype.render=function(){return this.el;};return ImagesDirectory;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DynamicManager=(function(_super){__extends(DynamicManager,_super);DynamicManager.name='DynamicManager';function DynamicManager(){return DynamicManager.__super__.constructor.apply(this,arguments);} DynamicManager.prototype.initialize=function(){var listJSON;if((listJSON=localStorage.getItem('dyn_image_list'))){return this.list=JSON.parse(listJSON);}else{return this.list=[];}};DynamicManager.prototype.isPresent=function(image_id){var saved,_i,_len,_ref;_ref=this.list;for(_i=0,_len=_ref.length;_i<_len;_i++){saved=_ref[_i];if(saved.id===image_id){return true;}} return false;};DynamicManager.prototype.isEmpty=function(){return this.list.length===0;};DynamicManager.prototype.addImage=function(src,options){var new_image;if(options==null){options={};} new_image=this.loadImage(src,options);if(new_image&&!this.isPresent(new_image.image_id)){this.list.push({id:new_image.image_id,src:new_image.image_src});this.saveList();} return new_image;};DynamicManager.prototype.loadImage=function(src,options){var image,image_id,_default_css;if(options==null){options={};} image_id=OverlayMe.Overlays.urlToId(src);if(!($o("#overlay_me_images_container #"+image_id).length>0)){_default_css=$o.extend({display:'block'},options.default_css);image=new OverlayMe.Overlays.Image(src,{destroyable:true,default_css:_default_css});OverlayMe.images_management_div.append(image.render());} return image;};DynamicManager.prototype.delImage=function(image_id){var image,_i,_len,_ref;_ref=this.list;for(_i=0,_len=_ref.length;_i<_len;_i++){image=_ref[_i];if(image.id===image_id){this.list.splice(this.list.indexOf(image),1);this.saveList();break;}} return OverlayMe.images_management_div.del(image_id);};DynamicManager.prototype.loadAll=function(){var image,_i,_len,_ref,_results;_ref=this.list;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){image=_ref[_i];_results.push(this.addImage(image.src));} return _results;};DynamicManager.prototype.saveList=function(){return localStorage.setItem('dyn_image_list',JSON.stringify(this.list));};return DynamicManager;})(Backbone.Model);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ContentDivManagementBlock=(function(_super){__extends(ContentDivManagementBlock,_super);ContentDivManagementBlock.name='ContentDivManagementBlock';function ContentDivManagementBlock(){return ContentDivManagementBlock.__super__.constructor.apply(this,arguments);} ContentDivManagementBlock.prototype.tagName='fieldset';ContentDivManagementBlock.prototype.className='content-mgnt-block';ContentDivManagementBlock.prototype.id='content_div_management_block';ContentDivManagementBlock.prototype.css_attributes_to_save=['z-index','opacity'];ContentDivManagementBlock.prototype.normal_zindex='0';ContentDivManagementBlock.prototype.over_zindex='5';ContentDivManagementBlock.prototype.initialize=function(){var slider_block,unicorn_button,_this=this;this.page_container_div=this.make('div',{id:'overlay_me_page_container'});$o('body').append(this.page_container_div);$o('body > *').each(function(index,thing){if(!(thing.id.match(/^overlay_me/)||thing.tagName==='SCRIPT')){return $o(_this.page_container_div).append(thing);}});this.loadCss(this.page_container_div,{'z-index':this.normal_zindex});unicorn_button=this.make('div',{"class":'unicorns',title:'Feeling corny?'});$o(unicorn_button).bind('click',function(){return OverlayMe.dyn_manager.addImage(OverlayMe.unicorns[Math.floor(Math.random()*OverlayMe.unicorns.length)],{default_css:{opacity:1}});});$o(this.el).append(unicorn_button);$o(this.el).append(this.make('legend',{},'Page content'));slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.contentSlider());$o(this.el).append(this.zIndexSwitch());return this.bindEvents();};ContentDivManagementBlock.prototype.zIndexSwitch=function(){var block,label,_this=this;block=this.make('div',{"class":'zindex-switch'});this.zIndexSwitch=this.make('input',{type:"checkbox"});$o(block).append(this.zIndexSwitch);setTimeout(function(){if($o("#overlay_me_page_container").css('z-index')===_this.over_zindex){return _this.zIndexSwitch.checked=true;}},500);label=this.make('label',{},'Content on top (t)');$o(label).bind('click',function(){return $o(_this.zIndexSwitch).trigger('click');});return $o(block).append(label);};ContentDivManagementBlock.prototype.contentSlider=function(){return this.contentSlider=this.make('input',{id:"contentSlider",type:"range",value:$o("#overlay_me_page_container").css('opacity')*100});};ContentDivManagementBlock.prototype.bindEvents=function(){var _this=this;$o(this.contentSlider).bind('change',function(){$o("#overlay_me_page_container").css('opacity',$o(_this.contentSlider)[0].value/100);return _this.saveCss(_this.page_container_div);});$o(this.zIndexSwitch).bind('change',function(event){if(_this.zIndexSwitch.checked){$o("#overlay_me_page_container").css({'z-index':_this.over_zindex});}else{$o("#overlay_me_page_container").css({'z-index':_this.normal_zindex});} return _this.saveCss(_this.page_container_div);});return $o(window).bind('keypress',function(event){if(event.charCode===116){return $o(_this.zIndexSwitch).trigger('click');}});};ContentDivManagementBlock.prototype.render=function(){return this.el;};return ContentDivManagementBlock;})(Backbone.View);_.extend(OverlayMe.Overlays.ContentDivManagementBlock.prototype,OverlayMe.Mixin.Storable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesManagementDiv=(function(_super){__extends(ImagesManagementDiv,_super);ImagesManagementDiv.name='ImagesManagementDiv';function ImagesManagementDiv(){return ImagesManagementDiv.__super__.constructor.apply(this,arguments);} ImagesManagementDiv.prototype.tagName='fieldset';ImagesManagementDiv.prototype.id='images_mgnt';ImagesManagementDiv.prototype.initialize=function(){$o(this.el).append(this.make('legend',{},'Overlaying images'));this.overlaysListBlock=this.make('div',{"class":'overlays-list'});$o(this.el).append(this.overlaysListBlock);return $o(this.el).append(this.dynamicAddsBlock());};ImagesManagementDiv.prototype.append=function(block){return this.overlaysListBlock.appendChild(block);};ImagesManagementDiv.prototype.del=function(image_id){$o(".overlay-image-block[data-img-id="+image_id+"]",this.el).remove();return $o("#overlay_me_images_container #"+image_id).remove();};ImagesManagementDiv.prototype.dynamicAddsBlock=function(){var dynamicAddsBlock,push_image_button,_this=this;dynamicAddsBlock=this.make('div',{"class":'dynamic-adds'});dynamicAddsBlock.appendChild(this.make('label',{},'Add image'));this.image_url_input=this.make('input',{type:'text',placeholder:"http://"});dynamicAddsBlock.appendChild(this.image_url_input);push_image_button=this.make('button',{},'+');dynamicAddsBlock.appendChild(push_image_button);$o(this.image_url_input).bind('keypress',function(e){if(e.keyCode===13){return _this.pushImage();}});$o(push_image_button).bind('click',function(e){return _this.pushImage();});return dynamicAddsBlock;};ImagesManagementDiv.prototype.pushImage=function(){OverlayMe.dyn_manager.addImage(this.image_url_input.value);return this.image_url_input.value='';};ImagesManagementDiv.prototype.render=function(){return this.el;};return ImagesManagementDiv;})(Backbone.View);}).call(this);(function(){var buildTree,displayTree,files_tree,overlay_panel,shiftTofiles;if(OverlayMe.mustLoad()){overlay_panel=new OverlayMe.MenuItem({id:"overlay_panel",title:"Overlays"});overlay_panel.append(new OverlayMe.Overlays.ContentDivManagementBlock().render());OverlayMe.images_management_div=new OverlayMe.Overlays.ImagesManagementDiv();overlay_panel.append(OverlayMe.images_management_div.render());OverlayMe.menu.append(overlay_panel.render());$o(window).bind('mousemove',function(event){return $o(window).trigger('mymousemove',event);});OverlayMe.dyn_manager=new OverlayMe.Overlays.DynamicManager();OverlayMe.dyn_manager.loadAll();OverlayMe.loadDefaultImage=function(){if(OverlayMe.dyn_manager.isEmpty()){return OverlayMe.dyn_manager.addImage('https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png');}};$o.ajax({url:'/overlay_images',dataType:'json',success:function(data){if(data.length===0){return OverlayMe.loadDefaultImage();}else{return buildTree(data);}},error:function(){return OverlayMe.loadDefaultImage();}});files_tree={};buildTree=function(data){$o.each(data,function(index,img_path){var bit,bits,parent_path,position,_results;bits=img_path.split('/');position=files_tree;parent_path='/';_results=[];while(bits.length>0){bit=bits[0];bits=bits.slice(1);if(bit===""){continue;} parent_path+=bit+'/';if(position[bit]===void 0){if(bits.length>0){position[bit]={parent_path:parent_path};}else{if(position['files']===void 0){position['files']=[];} position['files'].push(bit);}} _results.push(position=position[bit]);} return _results;});files_tree=shiftTofiles(files_tree);return displayTree(OverlayMe.images_management_div,files_tree);};shiftTofiles=function(tree){var keys;if(tree.files){return tree;} keys=Object.keys(tree);if(keys.length>2){return tree;} keys=_.without(keys,'parent_path');return shiftTofiles(tree[keys[0]]);};displayTree=function(parent,tree){var dir,img,sub_dir,_i,_j,_len,_len1,_ref,_ref1,_results;_ref=Object.keys(tree);for(_i=0,_len=_ref.length;_i<_len;_i++){dir=_ref[_i];if(dir==='files'||dir==='parent_path'){continue;} sub_dir=new OverlayMe.Overlays.ImagesDirectory(dir);parent.append(sub_dir.render());displayTree(sub_dir,tree[dir]);} if(tree.files){_ref1=tree.files;_results=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){img=_ref1[_j];_results.push(parent.append(new OverlayMe.Overlays.Image(tree.parent_path+img,{parent_path:tree.parent_path}).render()));} return _results;}};}}).call(this);(function(){window.overlay_me_loaded=true;}).call(this);