From c7d5365f81552cae16bbb91696ca3e67b4a0a2e9 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 15 May 2011 18:33:00 -0400 Subject: major refactoring, improved file watching, changed site to public to support rack via pow (http://pow.cx) also implemented the basics of a 320 and up design refresh on the classic theme. This should make it great for mobile reading --- .../javascripts/libs/DOMAssistantCompressed-2.8.js | 4 ++++ .../javascripts/libs/ios-viewport-scaling-bug-fix.js | 20 ++++++++++++++++++++ public/javascripts/libs/modernizr-1.7.min.js | 2 ++ public/javascripts/libs/respond.js | 8 ++++++++ public/javascripts/libs/selectivizr-min.js | 5 +++++ 5 files changed, 39 insertions(+) create mode 100644 public/javascripts/libs/DOMAssistantCompressed-2.8.js create mode 100644 public/javascripts/libs/ios-viewport-scaling-bug-fix.js create mode 100644 public/javascripts/libs/modernizr-1.7.min.js create mode 100644 public/javascripts/libs/respond.js create mode 100644 public/javascripts/libs/selectivizr-min.js (limited to 'public/javascripts/libs') diff --git a/public/javascripts/libs/DOMAssistantCompressed-2.8.js b/public/javascripts/libs/DOMAssistantCompressed-2.8.js new file mode 100644 index 00000000..ff9ef9e0 --- /dev/null +++ b/public/javascripts/libs/DOMAssistantCompressed-2.8.js @@ -0,0 +1,4 @@ +// Developed by Robert Nyman/DOMAssistant team, code/licensing: http://domassistant.googlecode.com/, documentation: http://www.domassistant.com/documentation, version 2.8 +var DOMAssistant=function(){var j=function(){},o=window,g=o.$,k=o.$$,d=/*@cc_on!@*/false,i=d&&parseFloat(navigator.appVersion)<6,h,c={},q={},a=true,n=Array.prototype.slice,p={accesskey:"accessKey","class":"className",colspan:"colSpan","for":"htmlFor",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding"},m={rules:/\s*,\s*/g,selector:/^(\w+|\*)?(#[\w\u00C0-\uFFFF\-=$]+)?((\.[\w\u00C0-\uFFFF\-]+)*)?((\[\w+\s*([~^$*|])?(=\s*([-\w\u00C0-\uFFFF\s.]+|"[^"]*"|'[^']*'))?\]+)*)?((:\w[-\w]*(\((odd|even|\-?\d*n?([-+]\d+)?|[:#]?[-\w\u00C0-\uFFFF.]+|"[^"]*"|'[^']*'|((\w*\.[-\w\u00C0-\uFFFF]+)*)?|(\[#?\w+([~^$*|])?=?[-\w\u00C0-\uFFFF\s.'"]+\]+)|(:\w[-\w]*\(.+\)))\))?)*)?([+>~])?/,selectorSplit:/(?:\[.*\]|\(.*\)|[^\s+>~[(])+|[+>~]/g,id:/^#([-\w\u00C0-\uFFFF=$]+)$/,tag:/^\w+/,relation:/^[+>~]$/,pseudo:/^:(\w[-\w]*)(\((.+)\))?$/,pseudos:/:(\w[-\w]*)(\((([^(]+)|([^(]+\([^(]+)\))\))?/g,attribs:/\[(\w+)\s*([~^$*|])?(=)?\s*([^\[\]]*|"[^"]*"|'[^']*')?\](?=$|\[|:|\s)/g,classes:/\.([-\w\u00C0-\uFFFF]+)/g,quoted:/^["'](.*)["']$/,nth:/^((odd|even)|([1-9]\d*)|((([1-9]\d*)?)n([-+]\d+)?)|(-(([1-9]\d*)?)n\+(\d+)))$/,special:/(:check|:enabl|\bselect)ed\b/},f=function(t,u,r){var s=t.tagName;while((t=t[u+"Sibling"])&&(t.nodeType!==1||(r?t.tagName!==s:t.tagName==="!"))){}return t},b=function(r){return typeof r!=="undefined"},l=function(r){return(l=r[0].compareDocumentPosition?function(s){return s.sort(function(u,t){return 3-(u.compareDocumentPosition(t)&6)})}:d?function(s){return s.sort(function(u,t){return u.sourceIndex-t.sourceIndex})}:function(s){return s.sort(function(w,u){var v=document.createRange(),t=document.createRange();v.setStart(w,0);v.setEnd(w,0);t.setStart(u,0);t.setEnd(u,0);return v.compareBoundaryPoints(Range.START_TO_END,t)})})(r)};var e=function(s,r){s.push.apply(s,n.apply(r));return s};if(d){e=function(t,s){if(s.slice){return t.concat(s)}var r=0,u;while((u=s[r++])){t[t.length]=u}return t}}return{isIE:d,camel:p,def:b,allMethods:[],publicMethods:["prev","next","hasChild","cssSelect","elmsByClass","elmsByAttribute","elmsByTag"],harmonize:function(){o.$=g;o.$$=k;return this},initCore:function(){this.applyMethod.call(o,"$",this.$);this.applyMethod.call(o,"$$",this.$$);o.DOMAssistant=this;if(d){j=Array}j.prototype=[];(function(r){r.each=function(v,u){for(var t=0,s=this.length;t=u)?(w-u)%u:w}else{if(t[8]){u=t[10]?parseInt(t[10],10):1;w=s=parseInt(t[11],10);while(w>u){w-=u}r=(s>=u)?(s-u)%u:s}}}}return{start:w,add:u,max:s,modVal:r}},cssByDOM:function(v){var aU,I,D,N,av,x,ah,A,K,w,aq,aN,y,aI,at,aB=new j(),aR=aB.indexOf,ap=[],aG=[],aK=v.replace(m.rules,",").split(","),aF={};function aQ(s){s=s||ap;for(var r=s.length;r--;){s[r].added=null;s[r].removeAttribute("added")}}function C(){for(var r=aU.length;r--;){aU[r].childElms=null}}function am(t,r){for(var u=0,aX;(aX=t[u]);u++){var aW=false;for(var s=0,aV;(aV=r[s]);s++){if(aV===aX){aW=true;r.splice(s,1);break}}if(aW){t.splice(u--,1)}}return t}function E(s,r){return(d||m.special.test(r))?s[p[r.toLowerCase()]||r]:s.getAttribute(r,2)}function P(r,s){r=r?r.replace(m.quoted,"$1").replace(/(\.|\[|\])/g,"\\$1"):null;return{"^":"^"+r,"$":r+"$","*":r,"|":"^"+r+"(\\-\\w+)*$","~":"\\b"+r+"\\b"}[s]||(r!==null?"^"+r+"$":r)}function W(r){return(r||this).tagName!=="!"}function S(r,s){return i?(r==="*"?s.all:s.all.tags(r)):s.getElementsByTagName(r)}function aL(r,s){r=r||"*";s=s||document;return(s===document||s.lastModified)?c[r]||(c[r]=S(r,document)):S(r,s)}function ar(aX,bf,u){aU=[];var aV=bf.split("-"),a0=[],a5=0,be=/\-of\-type$/.test(bf),a4,aZ={first:function(bg){return !f(bg,"previous",be)},last:function(bg){return !f(bg,"next",be)},empty:function(bg){return !bg.firstChild},enabled:function(bg){return !bg.disabled&&bg.type!=="hidden"},disabled:function(bg){return bg.disabled},checked:function(bg){return bg.checked},contains:function(bg){return(bg.innerText||bg.textContent||"").indexOf(u.replace(m.quoted,"$1"))>-1},other:function(bg){return E(bg,bf)===u}};function t(bg){while((A=aX[a5++])){if(W(A)&&aZ[bg](A)){a0[a0.length]=A}}return a0}var bb=aV[0]||null;if(bb&&aZ[bb]){return t(bb)}switch(bb){case"only":var a1,aW;while((A=aX[a5++])){K=A.parentNode;var a6=A.nodeName;if(K!==a1||a6!==aW){if(aZ.first(A)&&aZ.last(A)){a0[a0.length]=A}a1=K;aW=a6}}break;case"nth":if(u==="n"){a0=aX}else{var bd=(aV[1]==="last")?["lastChild","previousSibling"]:["firstChild","nextSibling"];aI=DOMAssistant.getSequence(u);if(aI){while((A=aX[a5++])){K=A.parentNode;K.childElms=K.childElms||{};var a7=A.nodeName;if(!K.childElms[a7]){var ba=0;aN=aI.start;y=K[bd[0]];while(y&&(aI.max<0||aN<=aI.max)){var bc=y.nodeName;if((be&&bc===a7)||(!be&&y.nodeType===1&&bc!=="!")){if(++ba===aN){if(bc===a7){a0[a0.length]=y}aN+=aI.add}}y=y[bd[1]]}if(at){h++}K.childElms[a7]=true;aU[aU.length]=K}}C()}}break;case"target":var s=document.location.hash.slice(1);if(s){while((A=aX[a5++])){if(E(A,"name")===s||E(A,"id")===s){a0[a0.length]=A;break}}}break;case"not":if((a4=m.pseudo.exec(u))){a0=am(aX,ar(aX,a4[1]?a4[1].toLowerCase():null,a4[3]||null))}else{for(var a8 in m){if(m[a8].lastIndex){m[a8].lastIndex=0}}u=u.replace(m.id,"[id=$1]");var a3=m.tag.exec(u);var aY=m.classes.exec(u);var a2=m.attribs.exec(u);var r=new RegExp(a2?P(a2[4],a2[2]):"(^|\\s)"+(a3?a3[0]:aY?aY[1]:"")+"(\\s|$)","i");while((w=aX[a5++])){aq=null;if(a3&&!r.test(w.nodeName)||aY&&!r.test(w.className)){aq=w}else{if(a2){var a9=E(w,a2[1]);if(!b(a9)||a9===false||typeof a9==="string"&&!r.test(a9)){aq=w}}}if(aq&&!aq.added){aq.added=true;a0[a0.length]=aq}}}break;default:return t("other")}return a0}function Z(aV,t){var r=0,u=aV,aW;while((aW=t[r++])){if(!u.length||u.indexOf(aW)<0){aV.push(aW)}}return aV}h=-1;for(var ak=0,aJ=[];(I=aK[ak]);ak++){if(!(D=I.match(m.selectorSplit))||ak&&aR.call(aK.slice(0,ak),I)>-1){continue}ap=[this];for(var ai=0,G;(G=D[ai]);ai++){aG=[];if((N=m.relation.exec(G))){var an=null,aS=D[ai+1];if((av=m.tag.exec(aS))){av=av[0];x=new RegExp("(^|\\s)"+av+"(\\s|$)","i")}else{if(m.id.test(aS)){an=DOMAssistant.$(aS)||null}}for(var ag=0,M;(M=ap[ag]);ag++){switch(N[0]){case">":var aD=an||aL(av,M);for(var ae=0,ay;(ay=aD[ae]);ae++){if(ay.parentNode===M){aG[aG.length]=ay}}break;case"+":if((M=f(M,"next"))){if((an&&an[0]===M)||(!an&&(!av||x.test(M.nodeName)))){aG[aG.length]=M}}break;case"~":while((M=M.nextSibling)&&!M.added){if((an&&an[0]===M)||(!an&&(!av||x.test(M.nodeName)))){M.added=true;aG[aG.length]=M}}break}}ap=aG;aQ();G=D[++ai];if(/^\w+$/.test(G)||m.id.test(G)){continue}ap.skipTag=true}var au=m.selector.exec(G);aF={tag:au[1]?au[1]:"*",id:au[2],allClasses:au[3],allAttr:au[5],allPseudos:au[10]};at=(aF.tag==="*");if(aF.id){var O=0,al=document.getElementById(aF.id.slice(1));if(al){while(ap[O]&&!DOMAssistant.hasChild.call(ap[O],al)){O++}aG=(O=0||aR.call(aJ,"*")>=0))?Z:e)(aB,ap);aJ.push(aF.tag);if(d&&at){aB=aB.filter(W)}}return((aB.length>1&&aK.length>1)||h>0)?l(aB):aB},cssByXpath:function(s){var t={xhtml:"http://www.w3.org/1999/xhtml"},u=(document.documentElement.namespaceURI===t.xhtml)?"xhtml:":"",r=function v(w){return t[w]||null};DOMAssistant.cssByXpath=function(N){var R,T,J,z,A,E,B=new j(),C=N.replace(m.rules,",").split(",");function M(W){var X=W?"[":"",V=W?"]":"";return function(Y,ac,ab,aa,Z){Z=(Z||"").replace(m.quoted,"$1");if(ac===Z&&ac==="readonly"){aa=null}return X+({"^":"starts-with(@"+ac+', "'+Z+'")',"$":"substring(@"+ac+", (string-length(@"+ac+") - "+(Z.length-1)+"), "+Z.length+') = "'+Z+'"',"*":'contains(concat(" ", @'+ac+', " "), "'+Z+'")',"|":"@"+ac+'="'+Z+'" or starts-with(@'+ac+', "'+Z+'-")',"~":'contains(concat(" ", @'+ac+', " "), " '+Z+' ")'}[ab]||("@"+ac+(aa?'="'+Z+'"':"")))+V}}function P(W,Y,X){W=/\-child$/.test(Y)?"*":W;var aa=Y.split("-"),V=((aa[1]==="last")?"(count(following-sibling::":"(count(preceding-sibling::")+W+") + 1)",Z,ab;switch(aa[0]){case"nth":return(X!=="n"&&(E=DOMAssistant.getSequence(X)))?((E.start===E.max)?V+" = "+E.start:V+" mod "+E.add+" = "+E.modVal+((E.start>1)?" and "+V+" >= "+E.start:"")+((E.max>0)?" and "+V+" <= "+E.max:"")):"";case"not":return"not("+((Z=m.pseudo.exec(X))?P(W,Z[1]?Z[1].toLowerCase():null,Z[3]||null):X.replace(m.id,"[id=$1]").replace(m.tag,"self::$0").replace(m.classes,'contains(concat(" ", @class, " "), " $1 ")').replace(m.attribs,M()))+")";case"first":return"not(preceding-sibling::"+W+")";case"last":return"not(following-sibling::"+W+")";case"only":return"not(preceding-sibling::"+W+" or following-sibling::"+W+")";case"empty":return"not(child::*) and not(text())";case"contains":return'contains(., "'+X.replace(m.quoted,"$1")+'")';case"enabled":return'not(@disabled) and not(@type="hidden")';case"disabled":return"@disabled";case"target":return'@name="'+(ab=document.location.hash.slice(1))+'" or @id="'+ab+'"';default:return"@"+Y+'="'+X+'"'}}for(var O=0;(R=C[O]);O++){if(!(T=R.match(m.selectorSplit))||O&&B.indexOf.call(C.slice(0,O),R)>-1){continue}J=J?J+" | .":".";for(var L=0,Q=T.length;L":"/","+":"/following-sibling::*[1]/self::","~":"/following-sibling::"}[A.tagRelation]||""):((L>0&&m.relation.test(T[L-1]))?A.tag:("//"+A.tag)))+(A.id||"").replace(m.id,'[@id = "$1"]')+(A.allClasses||"").replace(m.classes,'[contains(concat(" ", @class, " "), " $1 ")]')+(A.allAttr||"").replace(m.attribs,M(true));if(A.allPseudos){var D=A.allPseudos.match(m.pseudos);for(var K=0,x=D.length;K0&&ajaxObj.params)?("&"+ajaxObj.params):"")}return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},get:function(url,callback,addToContent){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"GET",callback,addToContent))},post:function(url,callback){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"POST",callback))},load:function(url,addToContent){this.get(url,DOMAssistant.AJAX.replaceWithAJAXContent,addToContent)},makeCall:function(ajaxObj){var XMLHttp=DOMAssistant.AJAX.initRequest();if(XMLHttp){globalXMLHttp=XMLHttp;(function(elm){var url=ajaxObj.url,method=ajaxObj.method||"GET",callback=ajaxObj.callback,params=ajaxObj.params,headers=ajaxObj.headers,responseType=ajaxObj.responseType||"text",addToContent=ajaxObj.addToContent,timeout=ajaxObj.timeout||null,ex=ajaxObj.exception,timeoutId=null,done=false;XMLHttp.open(method,url,true);XMLHttp.setRequestHeader("AJAX","true");XMLHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");if(method==="POST"){XMLHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-length",params?params.length:0);if(XMLHttp.overrideMimeType){XMLHttp.setRequestHeader("Connection","close")}}if(responseType==="json"){XMLHttp.setRequestHeader("Accept","application/json, text/javascript, */*")}for(var i in headers){if(typeof i==="string"){XMLHttp.setRequestHeader(i,headers[i])}}if(typeof callback==="function"){XMLHttp.onreadystatechange=function(){try{if(XMLHttp.readyState===4&&!done){window.clearTimeout(timeoutId);done=true;status=XMLHttp.status;statusText=XMLHttp.statusText;readyState=4;if((status||location.protocol!=="file:")&&(status<200||status>=300)){throw new Error(statusText)}var response=/xml/i.test(responseType)?XMLHttp.responseXML:XMLHttp.responseText;if(/json/i.test(responseType)&&!!response){response=(typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(response):eval("("+response+")")}globalXMLHttp=null;XMLHttp.onreadystatechange=function(){};requestPool.push(XMLHttp);callback.call(elm,response,addToContent)}}catch(e){globalXMLHttp=XMLHttp=null;if(typeof ex==="function"){ex.call(elm,e);ex=null}}}}XMLHttp.send(params);if(timeout){timeoutId=window.setTimeout(function(){if(!done){XMLHttp.abort();done=true;if(typeof ex==="function"){readyState=0;status=408;statusText="Request timeout";globalXMLHttp=XMLHttp=null;ex.call(elm,new Error(statusText));ex=null}}},timeout)}})(this)}return this},replaceWithAJAXContent:function(content,add){if(add){this.innerHTML+=content}else{DOMAssistant.cleanUp(this);this.innerHTML=content}},getReadyState:function(){return(globalXMLHttp&&DOMAssistant.def(globalXMLHttp.readyState))?globalXMLHttp.readyState:readyState},getStatus:function(){return status},getStatusText:function(){return statusText}}}();DOMAssistant.attach(DOMAssistant.AJAX);DOMAssistant.CSS=function(){var a=DOMAssistant.def,b={display:true};return{addClass:function(d){if(!this.hasClass(d)){var c=this.className;this.className=c+(c.length?" ":"")+d}return this},removeClass:function(c){return this.replaceClass(c)},replaceClass:function(d,e){var c=new RegExp(("(^|\\s)"+d+"(\\s|$)"),"i");this.className=this.className.replace(c,function(f,h,g){return e?(h+e+g):" "}).replace(/^\s+|\s+$/g,"");return this},hasClass:function(c){return(" "+this.className+" ").indexOf(" "+c+" ")>-1},setStyle:function(f,g){var e=this.style;if("filters" in this&&(typeof f==="string"?/opacity/i.test(f):a(f.opacity))){e.zoom=1;e.filter=(e.filter||"").replace(/alpha\([^)]*\)/,"")+"alpha(opacity="+(a(f.opacity)?f.opacity:g)*100+")"}if(a(e.cssText)){var c=e.cssText;if(typeof f==="object"){for(var d in f){if(typeof d==="string"){if(b[d]){e[d]=f[d]}c+=";"+d+":"+f[d]}}}else{if(b[f]){e[f]=g}c+=";"+f+":"+g}e.cssText=c}return this},getStyle:function(c){var e="",d;c=c.toLowerCase();if(document.defaultView&&document.defaultView.getComputedStyle){e=document.defaultView.getComputedStyle(this,"").getPropertyValue(c)}else{if(this.currentStyle){if("filters" in this&&c==="opacity"){e=(d=this.style.filter||this.currentStyle.filter)&&d.indexOf("opacity=")>=0?parseFloat(d.match(/opacity=([^)]*)/)[1])/100:1}else{c=c.replace(/^float$/,"styleFloat").replace(/\-(\w)/g,function(f,g){return g.toUpperCase()});e=this.currentStyle[c]}if(e==="auto"&&/^(width|height)$/.test(c)&&this.currentStyle.display!=="none"){e=this["offset"+c.charAt(0).toUpperCase()+c.substr(1)]+"px"}}}return e}}}();DOMAssistant.attach(DOMAssistant.CSS);DOMAssistant.Content=function(){var a=DOMAssistant.$$;return{init:function(){DOMAssistant.setCache(false)},create:function(d,c,b,e){var f=a(document.createElement(d));if(c){f=f.setAttributes(c)}if(DOMAssistant.def(e)){f.addContent(e)}if(b){this.appendChild(f)}return f},setAttributes:function(b){if(DOMAssistant.isIE){var c=function(g,e,f){var d=e.toLowerCase();switch(d){case"name":case"type":case"multiple":return a(document.createElement(g.outerHTML.replace(new RegExp(d+"(=[a-zA-Z]+)?")," ").replace(">"," "+d+"="+f+">")));case"style":g.style.cssText=f;return g;default:g[DOMAssistant.camel[d]||e]=f;return g}};DOMAssistant.Content.setAttributes=function(d){var h=this;var g=this.parentNode;for(var f in d){if(typeof d[f]==="string"||typeof d[f]==="number"){var e=c(h,f,d[f]);if(g&&/(name|type)/i.test(f)){if(h.innerHTML){e.innerHTML=h.innerHTML}g.replaceChild(e,h)}h=e}}return h}}else{DOMAssistant.Content.setAttributes=function(d){for(var e in d){if(/class/i.test(e)){this.className=d[e]}else{this.setAttribute(e,d[e])}}return this}}return DOMAssistant.Content.setAttributes.call(this,b)},addContent:function(f){var d=typeof f;if(d==="string"||d==="number"){if(!this.firstChild){this.innerHTML=f}else{var c=document.createElement("div");c.innerHTML=f;for(var b=c.childNodes.length-1,e=null;b>=0;b--){e=this.insertBefore(c.childNodes[b],e)}}}else{if(d==="object"||(d==="function"&&!!f.nodeName)){this.appendChild(f)}}return this},replaceContent:function(b){DOMAssistant.cleanUp(this);return this.addContent(b)},replace:function(g,b){var f=typeof g;if(f==="string"||f==="number"){var e=this.parentNode;var d=DOMAssistant.Content.create.call(e,"div",null,false,g);for(var c=d.childNodes.length;c--;){e.insertBefore(d.childNodes[c],this.nextSibling)}g=this.nextSibling;e.removeChild(this)}else{if(f==="object"||(f==="function"&&!!g.nodeName)){this.parentNode.replaceChild(g,this)}}return b?g:this},remove:function(){DOMAssistant.cleanUp(this);if(this.hasData()){if(this.removeEvent){this.removeEvent()}this.unstore()}this.parentNode.removeChild(this);return null}}}();DOMAssistant.attach(DOMAssistant.Content);DOMAssistant.Events=function(){var i,g="_events",c=!!document.addEventListener,a={focus:true,blur:true},b=DOMAssistant.isIE?{focus:"activate",blur:"deactivate",mouseenter:"mouseover",mouseleave:"mouseout"}:{mouseenter:"mouseover",mouseleave:"mouseout"},f={special:/^submit|reset|change|select$/i,mouseenterleave:/^mouse(enter|leave)$/i,dom:/^DOM/,on:/^on/i},e=function(j){return DOMAssistant.isIE&&f.special.test(j)},d=function(j){return b[j]||j},h=function(n,k,m){n=n||window.event||{};if(n.event){return n}var l={event:n,type:k||n.type,bubbles:n.bubbles||true,cancelable:n.cancelable||false,target:m||n.target||n.srcElement,clientX:n.clientX||0,clientY:n.clientY||0,altKey:n.altKey||false,ctrlKey:n.ctrlKey||false,shiftKey:n.shiftKey||false,button:n.button||null,timeStamp:+new Date(),preventDefault:function(){if(n.preventDefault){n.preventDefault()}this.returnValue=n.returnValue=false},stopPropagation:function(){if(n.stopPropagation){n.stopPropagation()}this.cancelBubble=n.cancelBubble=true}};if(l.target&&3===l.target.nodeType){l.target=l.target.parentNode}l.currentTarget=l.target;l.relatedTarget=n.relatedTarget||(n.fromElement===l.target?n.toElement:n.fromElement)||null;var o=document.documentElement,j=document.body;l.pageX=DOMAssistant.def(n.pageX)?n.pageX:(l.clientX+(o.scrollLeft||j.scrollLeft)-(o.clientLeft||0));l.pageY=DOMAssistant.def(n.pageY)?n.pageY:(l.clientY+(o.scrollTop||j.scrollTop)-(o.clientTop||0));if("number"===typeof n.which){l.keyCode=n.keyCode;l.charCode=l.which=n.which}else{if(n.keyCode){l.keyCode=l.charCode=n.keyCode}}return l};return{publicMethods:["triggerEvent","addEvent","removeEvent","relayEvent","unrelayEvent","preventDefault","cancelBubble"],init:function(){DOMAssistant.preventDefault=this.preventDefault;DOMAssistant.cancelBubble=this.cancelBubble;i=this.handleEvent},triggerEvent:function(r,o,q){var m=d(r),s=this.retrieve(g),j=q||h(q,m,o||this);j.currentTarget=this;if(s&&s[m]){for(var n=0,l=s[m].length;n<\/script>");document.getElementById("ieScriptLoad").onreadystatechange=function(){if(this.readyState==="complete"){e()}}@end@*/ +if(document.addEventListener){document.addEventListener("DOMContentLoaded",e,false)}if(/KHTML|WebKit|iCab/i.test(navigator.userAgent)){a=setInterval(function(){if(/loaded|complete/i.test(document.readyState)){e();clearInterval(a)}},10)}window.onload=e;return{DOMReady:function(){for(var j=0,h=arguments.length,k;j";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); + diff --git a/public/javascripts/libs/selectivizr-min.js b/public/javascripts/libs/selectivizr-min.js new file mode 100644 index 00000000..5adda2fa --- /dev/null +++ b/public/javascripts/libs/selectivizr-min.js @@ -0,0 +1,5 @@ +/*! + * selectivizr v1.0.2 - (c) Keith Clark, freely distributable under the terms of the MIT license. + * selectivizr.com + */ +(function(j){function A(a){return a.replace(B,h).replace(C,function(a,d,b){for(var a=b.split(","),b=0,e=a.length;b0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b0&&setInterval(function(){for(var a=0,c=q.length;a8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this); \ No newline at end of file -- cgit v1.2.1