Merge lp:~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme-linaro-refresh into lp:~linaro-connect-theme-devs/ubuntu-community-webthemes/light-django-linaro-theme
- light-django-theme-linaro-refresh
- Merge into light-django-linaro-theme
Proposed by
Chris Johnston
Status: | Merged |
---|---|
Merged at revision: | 43 |
Proposed branch: | lp:~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme-linaro-refresh |
Merge into: | lp:~linaro-connect-theme-devs/ubuntu-community-webthemes/light-django-linaro-theme |
Diff against target: |
3704 lines (+3364/-143) 15 files modified
media/css/extra_styles.css (+45/-42) media/js/ga.js (+5/-0) media/js/jquery-1.7.2.min.js (+4/-0) media/js/loader.js (+19/-0) media/js/main.js (+0/-43) media/js/modernizr.min.js (+4/-0) media/js/pngFix.js (+0/-13) media/js/polyfills/IE9/IE9.js (+118/-0) media/js/polyfills/IE9/LICENSE (+21/-0) media/js/polyfills/IE9/squish.js (+1/-0) media/js/polyfills/IE9/src/IE9.src.js (+2901/-0) media/js/polyfills/IE9/src/squish.src.js (+35/-0) media/js/polyfills/pie.js (+140/-0) media/js/site.js (+26/-0) templates/website_base.html (+45/-45) |
To merge this branch: | bzr merge lp:~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme-linaro-refresh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Infrastructure | Pending | ||
Review via email: mp+99413@code.launchpad.net |
Commit message
Description of the change
Cleans up the layout of the theme.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'media/css/extra_styles.css' |
2 | --- media/css/extra_styles.css 2012-03-25 00:36:30 +0000 |
3 | +++ media/css/extra_styles.css 2012-03-26 20:23:22 +0000 |
4 | @@ -9,50 +9,50 @@ |
5 | */ |
6 | |
7 | |
8 | -#top-nav { |
9 | - font-size:11px; |
10 | - margin:0 auto; |
11 | - line-height: 2em; |
12 | +#top-nav { |
13 | + font-size:11px; |
14 | + margin:0 auto; |
15 | + line-height: 2em; |
16 | height: 22px; |
17 | } |
18 | |
19 | |
20 | -.top-nav-item { |
21 | - display:inline-block; |
22 | - margin-right: 14px; |
23 | - line-height:2em; |
24 | +.top-nav-item { |
25 | + display:inline-block; |
26 | + margin-right: 14px; |
27 | + line-height:2em; |
28 | } |
29 | |
30 | -#top-login { |
31 | - display:inline-block; |
32 | - margin-right:15px; |
33 | +#top-login { |
34 | + display:inline-block; |
35 | + margin-right:15px; |
36 | float:right; |
37 | } |
38 | |
39 | -.top-login-item { |
40 | - display:inline-block; |
41 | - padding:0 8px; |
42 | - line-height:2em; |
43 | -} |
44 | - |
45 | -#top-nav { |
46 | - background-color:#ffffff; |
47 | -} |
48 | - |
49 | -.top-nav-item, .top-nav-item:visited { |
50 | - color:#333333; |
51 | -} |
52 | - |
53 | -.top-nav-item:hover { |
54 | - text-decoration: underline; |
55 | -} |
56 | - |
57 | -.top-login-item { |
58 | - color:#dd4814; |
59 | -} |
60 | - |
61 | -.top-login-item:hover { |
62 | - text-decoration: underline; |
63 | +.top-login-item { |
64 | + display:inline-block; |
65 | + padding:0 8px; |
66 | + line-height:2em; |
67 | +} |
68 | + |
69 | +#top-nav { |
70 | + background-color:#ffffff; |
71 | +} |
72 | + |
73 | +.top-nav-item, .top-nav-item:visited { |
74 | + color:#333333; |
75 | +} |
76 | + |
77 | +.top-nav-item:hover { |
78 | + text-decoration: underline; |
79 | +} |
80 | + |
81 | +.top-login-item { |
82 | + color:#dd4814; |
83 | +} |
84 | + |
85 | +.top-login-item:hover { |
86 | + text-decoration: underline; |
87 | } |
88 | |
89 | header .logo-ubuntu { |
90 | @@ -66,10 +66,10 @@ |
91 | } |
92 | |
93 | .alone, .leading, .aggregator /* progressive */ { |
94 | - -webkit-border-radius: 8px; |
95 | - -moz-border-radius: 8px; |
96 | + -webkit-border-radius: 4px; |
97 | + -moz-border-radius: 4px; |
98 | } |
99 | - |
100 | + |
101 | table.basic thead th, table.basic thead a { |
102 | font-weight:bold; |
103 | } |
104 | @@ -93,7 +93,7 @@ |
105 | padding:4px 8px; |
106 | } |
107 | |
108 | -table.basic thead { |
109 | +table.basic thead { |
110 | background-color:#aea79f; |
111 | } |
112 | |
113 | @@ -172,7 +172,7 @@ |
114 | |
115 | /* Form Layout */ |
116 | |
117 | -form ul.errorlist { |
118 | +form ul.errorlist { |
119 | display: inline-block; |
120 | line-height: 1em; |
121 | vertical-align: top; |
122 | @@ -294,7 +294,7 @@ |
123 | background-color: #962d0c; |
124 | } |
125 | |
126 | -input[type="submit"][disabled="disabled"], input[type="submit"][disabled="disabled"]:hover { |
127 | +input[type="submit"][disabled="disabled"], input[type="submit"][disabled="disabled"]:hover { |
128 | background-color:#AEA79F; |
129 | text-shadow: none; |
130 | } |
131 | @@ -312,7 +312,7 @@ |
132 | |
133 | /* |
134 | * |
135 | -* For Linaro |
136 | +* For Linaro |
137 | * |
138 | */ |
139 | a:link { |
140 | @@ -352,3 +352,6 @@ |
141 | .nav-secondary li.active a, .nav-secondary a:hover { |
142 | color: #79A519; |
143 | } |
144 | + |
145 | +span.skype_pnh_container {display:none !important;} |
146 | +span.skype_pnh_print_container {display:inline !important;} |
147 | |
148 | === added directory 'media/css/old' |
149 | === renamed file 'media/css/960.css' => 'media/css/old/960.css' |
150 | === renamed file 'media/css/default.css' => 'media/css/old/default.css' |
151 | === renamed file 'media/css/django_extras.css' => 'media/css/old/django_extras.css' |
152 | === renamed file 'media/css/ie.css' => 'media/css/old/ie.css' |
153 | === renamed file 'media/css/ie6.css' => 'media/css/old/ie6.css' |
154 | === added file 'media/js/ga.js' |
155 | --- media/js/ga.js 1970-01-01 00:00:00 +0000 |
156 | +++ media/js/ga.js 2012-03-26 20:23:22 +0000 |
157 | @@ -0,0 +1,5 @@ |
158 | +$(document).ready(function() { |
159 | +var _gaq = _gaq || []; |
160 | + _gaq.push(['_setAccount', 'UA-30315860-1']); |
161 | + _gaq.push(['_trackPageview']); |
162 | +}); |
163 | |
164 | === added file 'media/js/jquery-1.7.2.min.js' |
165 | --- media/js/jquery-1.7.2.min.js 1970-01-01 00:00:00 +0000 |
166 | +++ media/js/jquery-1.7.2.min.js 2012-03-26 20:23:22 +0000 |
167 | @@ -0,0 +1,4 @@ |
168 | +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ |
169 | +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},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(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( |
170 | +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.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(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.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(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={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,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f |
171 | +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.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 a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); |
172 | |
173 | === added file 'media/js/loader.js' |
174 | --- media/js/loader.js 1970-01-01 00:00:00 +0000 |
175 | +++ media/js/loader.js 2012-03-26 20:23:22 +0000 |
176 | @@ -0,0 +1,19 @@ |
177 | +Modernizr.load([ |
178 | + { |
179 | + load: website_assets + '/js/twidenash/jquery-twidenash.js' |
180 | + }, |
181 | + { |
182 | + load: website_assets + '/js/site.js' |
183 | + }, |
184 | + { |
185 | + test: Modernizr.borderradius && Modernizr.boxshadow, |
186 | + nope: website_assets + "/js/polyfills/pie.js", |
187 | + complete: function() { |
188 | + window.PIE && $("*").each(function() { |
189 | + ($(this).css("box-shadow") || $(this).css("border-radius")) && PIE.attach(this) |
190 | + }) |
191 | + } |
192 | + }, |
193 | + website_assets + '/js/ga.js' |
194 | +]); |
195 | + |
196 | |
197 | === removed file 'media/js/main.js' |
198 | --- media/js/main.js 2010-06-14 14:48:41 +0000 |
199 | +++ media/js/main.js 1970-01-01 00:00:00 +0000 |
200 | @@ -1,43 +0,0 @@ |
201 | -$(function(){ |
202 | - |
203 | - var $header = $('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>HEADER</h3></div>'), |
204 | - $aside = $('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>ASIDE</h3></div>'), |
205 | - $content = $('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>CONTENT</h3></div>'), |
206 | - $footer = $('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>FOOTER</h3></div>'); |
207 | - |
208 | - |
209 | - $('#wireframe .container').mouseenter(function(){ |
210 | - var $el = $(this); |
211 | - |
212 | - $el.css( { border : "1px dashed #555", padding : "0px 9px" }) |
213 | - |
214 | - if($el.parent().is('header')) { |
215 | - $el.append($header); |
216 | - } |
217 | - |
218 | - if($el.parent().is('aside')) { |
219 | - $el.append($aside); |
220 | - } |
221 | - |
222 | - if($el.parent().is('section')) { |
223 | - $el.append($content); |
224 | - } |
225 | - |
226 | - if($el.parent().is('footer')) { |
227 | - $el.append($footer); |
228 | - } |
229 | - |
230 | - |
231 | - }); |
232 | - |
233 | - |
234 | - $('#wireframe .container').mouseleave(function(){ |
235 | - $('.label').remove(); |
236 | - $(this).css( { border : "0px dashed #555", padding : "0px 10px" }) |
237 | - |
238 | - }); |
239 | - |
240 | - |
241 | - |
242 | - |
243 | -}); |
244 | |
245 | === added file 'media/js/modernizr.min.js' |
246 | --- media/js/modernizr.min.js 1970-01-01 00:00:00 +0000 |
247 | +++ media/js/modernizr.min.js 2012-03-26 20:23:22 +0000 |
248 | @@ -0,0 +1,4 @@ |
249 | +/* Modernizr 2.5.3 (Custom Build) | MIT & BSD |
250 | + * Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-rgba-textshadow-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-canvas-hashchange-audio-video-inputtypes-shiv-cssclasses-addtest-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-json-url_data_uri-window_framed-load |
251 | + */ |
252 | +;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}function J(){e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(k),g.offsetWidth,e=k.value!=l,g.removeChild(k)):e=k.value!=l)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["­","<style>",a,"</style>"].join(""),k.id=h,m.innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e});var I=function(a,c){var d=a.join(""),f=c.length;x(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.csstransforms3d=(i.csstransforms3d&&i.csstransforms3d.offsetLeft)===9&&i.csstransforms3d.offsetHeight===3,e.fontface=/src/i.test(g)&&g.indexOf(c.split(" ")[0])===0},f,c)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",n.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join("")],["fontface","csstransforms3d"]);r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.hashchange=function(){return y("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},r.backgroundsize=function(){return H("backgroundSize")},r.borderimage=function(){return H("borderImage")},r.borderradius=function(){return H("borderRadius")},r.boxshadow=function(){return H("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")},r.cssreflections=function(){return H("boxReflect")},r.csstransforms=function(){return!!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a},r.csstransitions=function(){return H("transition")},r.fontface=function(){return e.fontface},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c};for(var K in r)A(r,K)&&(w=K.toLowerCase(),e[w]=r[K](),u.push((e[w]?"":"no-")+w));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("json",!!window.JSON&&!!JSON.parse),function(){var a=new Image;a.onerror=function(){Modernizr.addTest("datauri",function(){return!1})},a.onload=function(){Modernizr.addTest("datauri",function(){return a.width==1&&a.height==1})},a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}(),Modernizr.addTest("framed",function(){return window.location!=top.location}); |
253 | |
254 | === removed file 'media/js/pngFix.js' |
255 | --- media/js/pngFix.js 2010-06-14 14:48:41 +0000 |
256 | +++ media/js/pngFix.js 1970-01-01 00:00:00 +0000 |
257 | @@ -1,13 +0,0 @@ |
258 | -/** |
259 | -* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>. |
260 | -* Author: Drew Diller |
261 | -* Email: drew.diller@gmail.com |
262 | -* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/ |
263 | -* Version: 0.0.8a |
264 | -* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license |
265 | -* |
266 | -* Example usage: |
267 | -* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector |
268 | -* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement |
269 | -**/ |
270 | -var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet(); |
271 | |
272 | === added directory 'media/js/polyfills' |
273 | === added directory 'media/js/polyfills/IE9' |
274 | === added file 'media/js/polyfills/IE9/IE9.js' |
275 | --- media/js/polyfills/IE9/IE9.js 1970-01-01 00:00:00 +0000 |
276 | +++ media/js/polyfills/IE9/IE9.js 2012-03-26 20:23:22 +0000 |
277 | @@ -0,0 +1,118 @@ |
278 | +(function(window,document){var IE7=window.IE7={version:"2.1(beta4)",toString:K("[IE7]")};IE7.compat=9;var appVersion=IE7.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||appVersion<5.5||appVersion>=IE7.compat)return;var MSIE5=appVersion<6;var Undefined=K();var documentElement=document.documentElement,body,viewport;var ANON="!";var HEADER=":link{ie7-link:link}:visited{ie7-link:visited}";var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href= |
279 | +(path||"")+href;return href}function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)}var script=document.scripts[document.scripts.length-1];var path=getPath(script.src);try{var httpRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}var fileCache={};function loadFile(href,path){try{href=makePath(href,path);if(!fileCache[href]){httpRequest.open("GET",href,false);httpRequest.send();if(httpRequest.status==0||httpRequest.status==200)fileCache[href]=httpRequest.responseText}}catch(ex){}return fileCache[href]|| |
280 | +""}var _slice=Array.prototype.slice;var _FORMAT=/%([1-9])/g;var _LTRIM=/^\s\s*/;var _RTRIM=/\s\s*$/;var _RESCAPE=/([\/()[\]{}|*+-.,^$?\\])/g;var _BASE=/\bbase\b/;var _HIDDEN=["constructor","toString"];var prototyping;function Base(){}Base.extend=function(_instance,_static){prototyping=true;var _prototype=new this;extend(_prototype,_instance);prototyping=false;var _constructor=_prototype.constructor;function klass(){if(!prototyping)_constructor.apply(this,arguments)}_prototype.constructor=klass;klass.extend= |
281 | +arguments.callee;extend(klass,_static);klass.prototype=_prototype;return klass};Base.prototype.extend=function(source){return extend(this,source)};var HASH="#";var ITEMS="#";var KEYS=".";var COMPILED="/";var REGGRP_BACK_REF=/\\(\d+)/g,REGGRP_ESCAPE_COUNT=/\[(\\.|[^\]\\])+\]|\\.|\(\?/g,REGGRP_PAREN=/\(/g,REGGRP_LOOKUP=/\$(\d+)/,REGGRP_LOOKUP_SIMPLE=/^\$\d+$/,REGGRP_LOOKUPS=/(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,REGGRP_DICT_ENTRY=/^<#\w+>$/,REGGRP_DICT_ENTRIES=/<#(\w+)>/g;var RegGrp=Base.extend({constructor:function(values){this[KEYS]= |
282 | +[];this[ITEMS]={};this.merge(values)},add:function(expression,replacement){delete this[COMPILED];if(expression instanceof RegExp)expression=expression.source;if(!this[HASH+expression])this[KEYS].push(String(expression));return this[ITEMS][HASH+expression]=new RegGrp.Item(expression,replacement,this)},compile:function(recompile){if(recompile||!this[COMPILED])this[COMPILED]=new RegExp(this,this.ignoreCase?"gi":"g");return this[COMPILED]},merge:function(values){for(var i in values)this.add(i,values[i])}, |
283 | +exec:function(string){var group=this,patterns=group[KEYS],items=group[ITEMS],item;var result=this.compile(true).exec(string);if(result){var i=0,offset=1;while(item=items[HASH+patterns[i++]]){var next=offset+item.length+1;if(result[offset])if(item.replacement===0)return group.exec(string);else{var args=result.slice(offset,next),j=args.length;while(--j)args[j]=args[j]||"";args[0]={match:args[0],item:item};return args}offset=next}}return null},parse:function(string){string+="";var group=this,patterns= |
284 | +group[KEYS],items=group[ITEMS];return string.replace(this.compile(),function(match){var args=[],item,offset=1,i=arguments.length;while(--i)args[i]=arguments[i]||"";while(item=items[HASH+patterns[i++]]){var next=offset+item.length+1;if(args[offset]){var replacement=item.replacement;switch(typeof replacement){case "function":return replacement.apply(group,args.slice(offset,next));case "number":return args[offset+replacement];default:return replacement}}offset=next}return match})},toString:function(){var strings= |
285 | +[],keys=this[KEYS],items=this[ITEMS],item;for(var i=0;item=items[HASH+keys[i]];i++)strings[i]=item.source;return"("+strings.join(")|(")+")"}},{IGNORE:null,Item:Base.extend({constructor:function(source,replacement,owner){var length=source.indexOf("(")===-1?0:RegGrp.count(source);var dictionary=owner.dictionary;if(dictionary&&source.indexOf("<#")!==-1)if(REGGRP_DICT_ENTRY.test(source)){var entry=dictionary[ITEMS][HASH+source.slice(2,-1)];source=entry.replacement;length=entry._length}else source=dictionary.parse(source); |
286 | +if(typeof replacement=="number")replacement=String(replacement);else if(replacement==null)replacement=0;if(typeof replacement=="string"&®GRP_LOOKUP.test(replacement))if(REGGRP_LOOKUP_SIMPLE.test(replacement)){var index=replacement.slice(1)-0;if(index&&index<=length)replacement=index}else{var lookup=replacement,regexp;replacement=function(match){if(!regexp)regexp=new RegExp(source,"g"+(this.ignoreCase?"i":""));return match.replace(regexp,lookup)}}this.length=length;this.source=String(source);this.replacement= |
287 | +replacement}}),count:function(expression){return(String(expression).replace(REGGRP_ESCAPE_COUNT,"").match(REGGRP_PAREN)||"").length}});var Dictionary=RegGrp.extend({parse:function(phrase){var entries=this[ITEMS];return phrase.replace(REGGRP_DICT_ENTRIES,function(match,entry){entry=entries[HASH+entry];return entry?entry._nonCapturing:match})},add:function(expression,replacement){if(replacement instanceof RegExp)replacement=replacement.source;var nonCapturing=replacement.replace(REGGRP_LOOKUPS,_nonCapture); |
288 | +if(replacement.indexOf("(")!==-1)var realLength=RegGrp.count(replacement);if(replacement.indexOf("<#")!==-1){replacement=this.parse(replacement);nonCapturing=this.parse(nonCapturing)}var item=this.base(expression,replacement);item._nonCapturing=nonCapturing;item._length=realLength||item.length;return item},toString:function(){return"(<#"+this[PATTERNS].join(">)|(<#")+">)"}});function _nonCapture(match,escaped){return escaped||"(?:"}function extend(object,source){if(object&&source){var proto=(typeof source== |
289 | +"function"?Function:Object).prototype;var i=_HIDDEN.length,key;if(prototyping)while(key=_HIDDEN[--i]){var value=source[key];if(value!=proto[key])if(_BASE.test(value))_override(object,key,value);else object[key]=value}for(key in source)if(typeof proto[key]=="undefined"){var value=source[key];if(object[key]&&typeof value=="function"&&_BASE.test(value))_override(object,key,value);else object[key]=value}}return object}function _override(object,name,method){var ancestor=object[name];object[name]=function(){var previous= |
290 | +this.base;this.base=ancestor;var returnValue=method.apply(this,arguments);this.base=previous;return returnValue}}function combine(keys,values){if(!values)values=keys;var hash={};for(var i in keys)hash[i]=values[i];return hash}function format(string){var args=arguments;var _FORMAT=new RegExp("%([1-"+arguments.length+"])","g");return String(string).replace(_FORMAT,function(match,index){return index<args.length?args[index]:match})}function match(string,expression){return String(string).match(expression)|| |
291 | +[]}function rescape(string){return String(string).replace(_RESCAPE,"\\$1")}function trim(string){return String(string).replace(_LTRIM,"").replace(_RTRIM,"")}function K(k){return function(){return k}}var Parser=RegGrp.extend({ignoreCase:true});var SINGLE_QUOTES=/'/g,ESCAPED=/'(\d+)'/g,ESCAPE=/\\/g,UNESCAPE=/\\([nrtf'"])/g;var strings=[];var encoder=new Parser({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":encodeString,'"(\\\\.|[^"\\\\])*"':encodeString, |
292 | +"\\s+":" "});function encode(selector){return encoder.parse(selector).replace(UNESCAPE,"$1")}function decode(query){return query.replace(ESCAPED,decodeString)}function encodeString(string){var index=strings.length;strings[index]=string.slice(1,-1).replace(UNESCAPE,"$1").replace(SINGLE_QUOTES,"\\'");return"'"+index+"'"}function decodeString(match,index){var string=strings[index];if(string==null)return match;return"'"+strings[index]+"'"}function getString(value){return value.indexOf("'")===0?strings[value.slice(1, |
293 | +-1)]:value}var rotater=new RegGrp({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function rotate(fn){return rotater.parse(fn)}var eventHandlers=[];function addResize(handler){addRecalc(handler);addEventHandler(window,"onresize",handler)}function addEventHandler(element,type,handler){element.attachEvent(type,handler);eventHandlers.push(arguments)}function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ex){}}addEventHandler(window, |
294 | +"onunload",function(){var handler;while(handler=eventHandlers.pop())removeEventHandler(handler[0],handler[1],handler[2])});function register(handler,element,condition){if(!handler.elements)handler.elements={};if(condition)handler.elements[element.uniqueID]=element;else delete handler.elements[element.uniqueID];return condition}addEventHandler(window,"onbeforeprint",function(){if(!IE7.CSS.print)new StyleSheet("print");IE7.CSS.print.recalc()});var PIXEL=/^\d+(px)?$/i;var PERCENT=/^\d+%$/;var getPixelValue= |
295 | +function(element,value){if(PIXEL.test(value))return parseInt(value);var style=element.style.left;var runtimeStyle=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=style;element.runtimeStyle.left=runtimeStyle;return value};var $IE7="ie7-";var Fix=Base.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:Undefined});var recalcs=[];function addRecalc(recalc){recalcs.push(recalc)}IE7.recalc= |
296 | +function(){IE7.HTML.recalc();IE7.CSS.recalc();for(var i=0;i<recalcs.length;i++)recalcs[i]()};function isFixed(element){return element.currentStyle["ie7-position"]=="fixed"}function getDefinedStyle(element,propertyName){return element.currentStyle[$IE7+propertyName]||element.currentStyle[propertyName]}function setOverrideStyle(element,propertyName,value){if(element.currentStyle[$IE7+propertyName]==null)element.runtimeStyle[$IE7+propertyName]=element.currentStyle[propertyName];element.runtimeStyle[propertyName]= |
297 | +value}function createTempElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";element.ie7_anon=true;return element}var NEXT_SIBLING="(e.nextSibling&&IE7._getElementSibling(e,'next'))",PREVIOUS_SIBLING=NEXT_SIBLING.replace(/next/g,"previous"),IS_ELEMENT="e.nodeName>'@'",IF_ELEMENT="if("+IS_ELEMENT+"){";var ID_ATTRIBUTE="(e.nodeName==='FORM'?IE7._getAttribute(e,'id'):e.id)"; |
298 | +var HYPERLINK=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var FIRST_LINE_LETTER=/(.*)(:first-(line|letter))/;var SPACE=/\s/;var RULE=/((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g;var SELECTOR=/(?:\\.|[^,\\])+/g;var styleSheets=document.styleSheets;var inheritedProperties=[];IE7.CSS=new (Fix.extend({parser:new Parser,screen:"",print:"",styles:[],rules:[],pseudoClasses:appVersion<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var strings=[];for(var pseudoClass in this)strings.push(pseudoClass); |
299 | +return strings.join("|")}},init:function(){var NONE="^\u0001$";var CLASS="\\[class=?[^\\]]*\\]";var pseudoClasses=[];if(this.pseudoClasses)pseudoClasses.push(this.pseudoClasses);var dynamicPseudoClasses=this.dynamicPseudoClasses.toString();if(dynamicPseudoClasses)pseudoClasses.push(dynamicPseudoClasses);pseudoClasses=pseudoClasses.join("|");var unknown=appVersion<7?["[>+~\\[(]|([:.])[\\w-]+\\1"]:[CLASS];if(pseudoClasses)unknown.push(":("+pseudoClasses+")");this.UNKNOWN=new RegExp(unknown.join("|")|| |
300 | +NONE,"i");var complex=appVersion<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[CLASS];var complexRule=complex.concat();if(pseudoClasses)complexRule.push(":("+pseudoClasses+")");Rule.COMPLEX=new RegExp(complexRule.join("|")||NONE,"ig");if(this.pseudoClasses)complex.push(":("+this.pseudoClasses+")");DynamicRule.COMPLEX=new RegExp(complex.join("|")||NONE,"i");dynamicPseudoClasses="not\\(:"+dynamicPseudoClasses.split("|").join("\\)|not\\(:")+"\\)|"+dynamicPseudoClasses;DynamicRule.MATCH=new RegExp(dynamicPseudoClasses? |
301 | +"(.*?):("+dynamicPseudoClasses+")(.*)":NONE,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){addEventHandler.apply(null,arguments)},addFix:function(expression,replacement){this.parser.add(expression,replacement)},addRecalc:function(propertyName,test,handler,replacement){propertyName=propertyName.source||propertyName;test=new RegExp("([{;\\s])"+propertyName+"\\s*:\\s*"+test+"[^;}]*");var id=this.recalcs.length;if(typeof replacement=="string")replacement=propertyName+":"+replacement; |
302 | +this.addFix(test,function(match){if(typeof replacement=="function")replacement=replacement(match);return(replacement?replacement:match)+";ie7-"+match.slice(1)+";ie7_recalc"+id+":1"});this.recalcs.push(arguments);return id},apply:function(){this.getInlineCSS();new StyleSheet("screen");this.trash()},createStyleSheet:function(){document.getElementsByTagName("head")[0].appendChild(document.createElement("style"));this.styleSheet=styleSheets[styleSheets.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7= |
303 | +true;this.styleSheet.cssText=HEADER},getInlineCSS:function(){var styleSheets=document.getElementsByTagName("style"),styleSheet;for(var i=styleSheets.length-1;styleSheet=styleSheets[i];i--)if(!styleSheet.disabled&&!styleSheet.ie7)styleSheet._cssText=styleSheet.innerHTML},getText:function(styleSheet,path){try{var cssText=styleSheet.cssText}catch(e){cssText=""}if(httpRequest)cssText=loadFile(styleSheet.href,path)||cssText;return cssText},recalc:function(){this.screen.recalc();var RECALCS=/ie7_recalc\d+/g; |
304 | +var start=HEADER.match(/[{,]/g).length;var rules=this.styleSheet.rules,rule;var calcs,calc,elements,element,i,j,k,id;for(i=start;rule=rules[i];i++){var cssText=rule.style.cssText;if(calcs=cssText.match(RECALCS)){elements=cssQuery(rule.selectorText);if(elements.length)for(j=0;j<calcs.length;j++){id=calcs[j];calc=IE7.CSS.recalcs[id.slice(10)][2];for(k=0;element=elements[k];k++)if(element.currentStyle[id])calc(element,cssText)}}}},refresh:function(){this.styleSheet.cssText=HEADER+this.screen+this.print}, |
305 | +trash:function(){for(var i=0;i<styleSheets.length;i++)if(!styleSheets[i].ie7){try{var cssText=styleSheets[i].cssText}catch(e){cssText=""}if(cssText)styleSheets[i].cssText=""}}}));var StyleSheet=Base.extend({constructor:function(media){this.media=media;this.load();IE7.CSS[media]=this;IE7.CSS.refresh()},createRule:function(selector,cssText){var match;if(PseudoElement&&(match=selector.match(PseudoElement.MATCH)))return new PseudoElement(match[1],match[2],cssText);else if(match=selector.match(DynamicRule.MATCH)){if(!HYPERLINK.test(match[0])|| |
306 | +DynamicRule.COMPLEX.test(match[0]))return new DynamicRule(selector,match[1],match[2],match[3],cssText)}else return new Rule(selector,cssText);return selector+" {"+cssText+"}"},getText:function(){var MEDIA=/@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi;var IMPORTS=/@import[^;\n]+/gi;var TRIM_IMPORTS=/@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi;var URL=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;var self=this;var fileCache={};function getCSSText(styleSheet,path,media,level){var cssText="";if(!level){media= |
307 | +toSimpleMedia(styleSheet.media);level=0}if(media==="none"){styleSheet.disabled=true;return""}if(media==="all"||media===self.media){try{var canAcess=!!styleSheet.cssText}catch(exe){}if(level<3&&canAcess){var hrefs=styleSheet.cssText.match(IMPORTS);for(var i=0,imported;i<styleSheet.imports.length;i++){var imported=styleSheet.imports[i];var href=styleSheet._href||styleSheet.href;imported._href=hrefs[i].replace(TRIM_IMPORTS,"");cssText+=getCSSText(imported,getPath(href,path),media,level+1)}}cssText+= |
308 | +encode(styleSheet.href?loadStyleSheet(styleSheet,path):styleSheet.owningElement._cssText);cssText=parseMedia(cssText,self.media)}return cssText}for(var i=0;i<styleSheets.length;i++){var styleSheet=styleSheets[i];if(!styleSheet.disabled&&!styleSheet.ie7)this.cssText+=getCSSText(styleSheet)}function parseMedia(cssText,media){filterMedia.value=media;return cssText.replace(MEDIA,filterMedia)}function filterMedia(match,media,cssText){media=toSimpleMedia(media);switch(media){case "screen":case "print":if(media!== |
309 | +filterMedia.value)return"";case "all":return cssText}return""}function toSimpleMedia(media){if(!media)return"all";var split=media.toLowerCase().split(/\s*,\s*/);media="none";for(var i=0;i<split.length;i++){if(split[i]==="all")return"all";if(split[i]==="screen"){if(media==="print")return"all";media="screen"}else if(split[i]==="print"){if(media==="screen")return"all";media="print"}}return media}function loadStyleSheet(styleSheet,path){var href=styleSheet._href||styleSheet.href;var url=makePath(href, |
310 | +path);if(fileCache[url])return"";fileCache[url]=styleSheet.disabled?"":fixUrls(IE7.CSS.getText(styleSheet,path),getPath(href,path));return fileCache[url]}function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")}},load:function(){this.cssText="";this.getText();this.parse();if(inheritedProperties.length)this.cssText=parseInherited(this.cssText);this.cssText=decode(this.cssText);fileCache={}},parse:function(){var cssText=IE7.CSS.parser.parse(this.cssText); |
311 | +var declarations="";this.cssText=cssText.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g,function(match){declarations+=match+"\n";return""});this.declarations=decode(declarations);var offset=IE7.CSS.rules.length;var rules=[],rule;while(rule=RULE.exec(this.cssText)){var cssText=rule[2];if(cssText){var fixDescendants=appVersion<7&&cssText.indexOf("AlphaImageLoader")!==-1;var selectors=rule[1].match(SELECTOR),selector;for(var i=0;selector=selectors[i];i++){selector=trim(selector);var isUnknown=IE7.CSS.UNKNOWN.test(selector); |
312 | +selectors[i]=isUnknown?this.createRule(selector,cssText):selector+"{"+cssText+"}";if(fixDescendants)selectors[i]+=this.createRule(selector+">*","position:relative")}rules.push(selectors.join("\n"))}}this.cssText=rules.join("\n");this.rules=IE7.CSS.rules.slice(offset)},recalc:function(){var rule,i;for(i=0;rule=this.rules[i];i++)rule.recalc()},toString:function(){return this.declarations+"@media "+this.media+"{"+this.cssText+"}"}});var PseudoElement;var Rule=IE7.Rule=Base.extend({constructor:function(selector, |
313 | +cssText){this.id=IE7.CSS.rules.length;this.className=Rule.PREFIX+this.id;var pseudoElement=selector.match(FIRST_LINE_LETTER);this.selector=(pseudoElement?pseudoElement[1]:selector)||"*";this.selectorText=this.parse(this.selector)+(pseudoElement?pseudoElement[2]:"");this.cssText=cssText;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");IE7.CSS.rules.push(this);this.init()},init:Undefined,add:function(element){element.className+=" "+this.className},recalc:function(){var match=cssQuery(this.selector); |
314 | +for(var i=0;i<match.length;i++)this.add(match[i])},parse:function(selector){var simple=selector.replace(Rule.CHILD," ").replace(Rule.COMPLEX,"");if(appVersion<7)simple=simple.replace(Rule.MULTI,"");var tags=match(simple,Rule.TAGS).length-match(selector,Rule.TAGS).length;var classes=match(simple,Rule.CLASSES).length-match(selector,Rule.CLASSES).length+1;while(classes>0&&Rule.CLASS.test(simple)){simple=simple.replace(Rule.CLASS,"");classes--}while(tags>0&&Rule.TAG.test(simple)){simple=simple.replace(Rule.TAG, |
315 | +"$1*");tags--}simple+="."+this.className;classes=Math.min(classes,2);tags=Math.min(tags,2);var score=-10*classes-tags;if(score>0)simple=simple+","+Rule.MAP[score]+" "+simple;return simple},remove:function(element){element.className=element.className.replace(this.MATCH,"$1")},toString:function(){return format("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{1:"html", |
316 | +2:"html body",10:".ie7_html",11:"html.ie7_html",12:"html.ie7_html body",20:".ie7_html .ie7_body",21:"html.ie7_html .ie7_body",22:"html.ie7_html body.ie7_body"}});var DynamicRule=Rule.extend({constructor:function(selector,attach,dynamicPseudoClass,target,cssText){this.negated=dynamicPseudoClass.indexOf("not")===0;if(this.negated)dynamicPseudoClass=dynamicPseudoClass.slice(5,-1);this.attach=attach||"*";this.dynamicPseudoClass=IE7.CSS.dynamicPseudoClasses[dynamicPseudoClass];this.target=target;this.base(selector, |
317 | +cssText)},recalc:function(){var attaches=cssQuery(this.attach),attach;for(var i=0;attach=attaches[i];i++){var target=this.target?cssQuery(this.target,attach):[attach];if(target.length)this.dynamicPseudoClass.apply(attach,target,this)}}});var DynamicPseudoClass=Base.extend({constructor:function(name,apply){this.name=name;this.apply=apply;this.instances={};IE7.CSS.dynamicPseudoClasses[name]=this},register:function(instance,negated){var _class=instance[2];if(!negated&&_class.negated)this.unregister(instance, |
318 | +true);else{instance.id=_class.id+instance[0].uniqueID;if(!this.instances[instance.id]){var target=instance[1],j;for(j=0;j<target.length;j++)_class.add(target[j]);this.instances[instance.id]=instance}}},unregister:function(instance,negated){var _class=instance[2];if(!negated&&_class.negated)this.register(instance,true);else if(this.instances[instance.id]){var target=instance[1],j;for(j=0;j<target.length;j++)_class.remove(target[j]);delete this.instances[instance.id]}}});var Hover=new DynamicPseudoClass("hover", |
319 | +function(element){var instance=arguments;IE7.CSS.addEventHandler(element,"onmouseenter",function(){Hover.register(instance)});IE7.CSS.addEventHandler(element,"onmouseleave",function(){Hover.unregister(instance)})});addEventHandler(document,"onmouseup",function(){var instances=Hover.instances;for(var i in instances)if(!instances[i][0].contains(event.srcElement))Hover.unregister(instances[i])});var ATTR={"=":"%1==='%2'","~=":"(' '+%1+' ').indexOf(' %2 ')!==-1","|=":"%1==='%2'||%1.indexOf('%2-')===0", |
320 | +"^=":"%1.indexOf('%2')===0","$=":"%1.slice(-'%2'.length)==='%2'","*=":"%1.indexOf('%2')!==-1"};ATTR[""]="%1!=null";var FILTER={"<#attr>":function(match,name,operator,value){var attr="IE7._getAttribute(e,'"+name+"')";value=getString(value);if(operator.length>1){if(!value||operator==="~="&&SPACE.test(value))return"false&&";attr="("+attr+"||'')"}return"("+format(ATTR[operator],attr,value)+")&&"},"<#id>":ID_ATTRIBUTE+"==='$1'&&","<#class>":"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",":first-child":"!"+ |
321 | +PREVIOUS_SIBLING+"&&",":link":"e.currentStyle['ie7-link']=='link'&&",":visited":"e.currentStyle['ie7-link']=='visited'&&"};IE7.HTML=new (Fix.extend({fixed:{},init:Undefined,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var i=0;i<this.fixes.length;i++){var match=cssQuery(this.fixes[i][0]);var fix=this.fixes[i][1];for(var j=0;j<match.length;j++)fix(match[j])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var match=cssQuery(this.recalcs[i][0]); |
322 | +var recalc=this.recalcs[i][1],element;var key=Math.pow(2,i);for(var j=0;element=match[j];j++){var uniqueID=element.uniqueID;if((this.fixed[uniqueID]&key)===0){element=recalc(element)||element;this.fixed[uniqueID]|=key}}}}}));if(appVersion<7){document.createElement("abbr");IE7.HTML.addRecalc("label",function(label){if(!label.htmlFor){var firstChildControl=cssQuery("input,textarea",label,true);if(firstChildControl)addEventHandler(label,"onclick",function(){firstChildControl.click()})}})}var NUMERIC= |
323 | +"[.\\d]";(function(){var layout=IE7.Layout={};HEADER+="*{boxSizing:content-box}";layout.boxSizing=function(element){if(!element.currentStyle.hasLayout){element.style.height="0cm";if(element.currentStyle.verticalAlign==="auto")element.runtimeStyle.verticalAlign="top";collapseMargins(element)}};function collapseMargins(element){if(element!=viewport&&element.currentStyle.position!=="absolute"){collapseMargin(element,"marginTop");collapseMargin(element,"marginBottom")}}function collapseMargin(element, |
324 | +type){if(!element.runtimeStyle[type]){var parentElement=element.parentElement;var isTopMargin=type==="marginTop";if(parentElement&&parentElement.currentStyle.hasLayout&&!IE7._getElementSibling(element,isTopMargin?"previous":"next"))return;var child=element[isTopMargin?"firstChild":"lastChild"];if(child&&child.nodeName<"@")child=IE7._getElementSibling(child,isTopMargin?"next":"previous");if(child&&child.currentStyle.styleFloat==="none"&&child.currentStyle.hasLayout){collapseMargin(child,type);margin= |
325 | +_getMargin(element,element.currentStyle[type]);childMargin=_getMargin(child,child.currentStyle[type]);if(margin<0||childMargin<0)element.runtimeStyle[type]=margin+childMargin;else element.runtimeStyle[type]=Math.max(childMargin,margin);child.runtimeStyle[type]="0px"}}}function _getMargin(element,value){return value==="auto"?0:getPixelValue(element,value)}var UNIT=/^[.\d][\w]*$/,AUTO=/^(auto|0cm)$/;var apply={};layout.borderBox=function(element){apply.Width(element);apply.Height(element)};var _fixWidth= |
326 | +function(HEIGHT){apply.Width=function(element){if(!PERCENT.test(element.currentStyle.width))_fixWidth(element);if(HEIGHT)collapseMargins(element)};function _fixWidth(element,value){if(!element.runtimeStyle.fixedWidth){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=UNIT.test(value)?Math.max(0,getFixedWidth(element,value))+"px":value;setOverrideStyle(element,"width",element.runtimeStyle.fixedWidth)}}function layoutWidth(element){if(!isFixed(element)){var layoutParent=element.offsetParent; |
327 | +while(layoutParent&&!layoutParent.currentStyle.hasLayout)layoutParent=layoutParent.offsetParent}return(layoutParent||viewport).clientWidth}function getPixelWidth(element,value){if(PERCENT.test(value))return parseInt(parseFloat(value)/100*layoutWidth(element));return getPixelValue(element,value)}var getFixedWidth=function(element,value){var borderBox=element.currentStyle["ie7-box-sizing"]==="border-box";var adjustment=0;if(MSIE5&&!borderBox)adjustment+=getBorderWidth(element)+getWidth(element,"padding"); |
328 | +else if(!MSIE5&&borderBox)adjustment-=getBorderWidth(element)+getWidth(element,"padding");return getPixelWidth(element,value)+adjustment};function getBorderWidth(element){return element.offsetWidth-element.clientWidth}function getWidth(element,type){return getPixelWidth(element,element.currentStyle[type+"Left"])+getPixelWidth(element,element.currentStyle[type+"Right"])}HEADER+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";layout.minWidth=function(element){if(element.currentStyle["min-width"]!= |
329 | +null)element.style.minWidth=element.currentStyle["min-width"];if(register(arguments.callee,element,element.currentStyle.minWidth!=="none")){layout.boxSizing(element);_fixWidth(element);resizeWidth(element)}};eval("IE7.Layout.maxWidth="+String(layout.minWidth).replace(/min/g,"max"));function resizeWidth(element){if(element==document.body)var width=element.clientWidth;else{var rect=element.getBoundingClientRect();width=rect.right-rect.left}if(element.currentStyle.minWidth!=="none"&&width<getFixedWidth(element, |
330 | +element.currentStyle.minWidth))element.runtimeStyle.width=element.currentStyle.minWidth;else if(element.currentStyle.maxWidth!=="none"&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=element.currentStyle.maxWidth;else element.runtimeStyle.width=element.runtimeStyle.fixedWidth}function fixRight(element){if(register(fixRight,element,/^(fixed|absolute)$/.test(element.currentStyle.position)&&getDefinedStyle(element,"left")!=="auto"&&getDefinedStyle(element,"right")!== |
331 | +"auto"&&AUTO.test(getDefinedStyle(element,"width")))){resizeRight(element);layout.boxSizing(element)}}layout.fixRight=fixRight;function resizeRight(element){var left=getPixelWidth(element,element.runtimeStyle._left||element.currentStyle.left);var width=layoutWidth(element)-getPixelWidth(element,element.currentStyle.right)-left-getWidth(element,"margin");if(parseInt(element.runtimeStyle.width)===width)return;element.runtimeStyle.width="";if(isFixed(element)||HEIGHT||element.offsetWidth<width){if(!MSIE5)width-= |
332 | +getBorderWidth(element)+getWidth(element,"padding");if(width<0)width=0;element.runtimeStyle.fixedWidth=width;setOverrideStyle(element,"width",width)}}var clientWidth=0;addResize(function(){if(!viewport)return;var i,wider=clientWidth<viewport.clientWidth;clientWidth=viewport.clientWidth;var elements=layout.minWidth.elements;for(i in elements){var element=elements[i];var fixedWidth=parseInt(element.runtimeStyle.width)===getFixedWidth(element,element.currentStyle.minWidth);if(wider&&fixedWidth)element.runtimeStyle.width= |
333 | +"";if(wider==fixedWidth)resizeWidth(element)}var elements=layout.maxWidth.elements;for(i in elements){var element=elements[i];var fixedWidth=parseInt(element.runtimeStyle.width)===getFixedWidth(element,element.currentStyle.maxWidth);if(!wider&&fixedWidth)element.runtimeStyle.width="";if(wider!==fixedWidth)resizeWidth(element)}for(i in fixRight.elements)resizeRight(fixRight.elements[i])});if(MSIE5)IE7.CSS.addRecalc("width",NUMERIC,apply.Width);if(appVersion<7){IE7.CSS.addRecalc("max-width",NUMERIC, |
334 | +layout.maxWidth);IE7.CSS.addRecalc("right",NUMERIC,fixRight)}else if(appVersion==7)if(HEIGHT)IE7.CSS.addRecalc("height","[\\d.]+%",function(element){element.runtimeStyle.pixelHeight=parseInt(layoutWidth(element)*element.currentStyle["ie7-height"].slice(0,-1)/100)})};eval("var _fixHeight="+rotate(_fixWidth));_fixWidth();_fixHeight(true);if(appVersion<7){IE7.CSS.addRecalc("min-width",NUMERIC,layout.minWidth);IE7.CSS.addFix(/\bmin-height\s*/,"height")}})();var BLANK_GIF=makePath("blank.gif",path);var ALPHA_IMAGE_LOADER= |
335 | +"DXImageTransform.Microsoft.AlphaImageLoader";var PNG_FILTER="progid:"+ALPHA_IMAGE_LOADER+"(src='%1',sizingMethod='%2')";var PNG;var filtered=[];function fixImage(element){if(PNG.test(element.src)){var image=new Image(element.width,element.height);image.onload=function(){element.width=image.width;element.height=image.height;image=null};image.src=element.src;element.pngSrc=element.src;addFilter(element)}}if(appVersion<7){IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/, |
336 | +function(match,$1,$2,url,$4){url=getString(url);return PNG.test(url)?"filter:"+format(PNG_FILTER,url,$4.indexOf("no-repeat")===-1?"scale":"crop")+";zoom:1;background"+($1||"")+":"+($2||"")+"none"+($4||""):match});IE7.CSS.addRecalc(/list\-style(\-image)?/,"[^};]*url",function(element){var url=element.currentStyle.listStyleImage.slice(5,-2);if(PNG.test(url))if(element.nodeName==="LI")fixListStyleImage(element,url);else if(element.nodeName==="UL")for(var i=0,li;li=element.childNodes[i];i++)if(li.nodeName=== |
337 | +"LI")fixListStyleImage(li,url)});function fixListStyleImage(element,src){var style=element.runtimeStyle;var originalHeight=element.offsetHeight;var image=new Image;image.onload=function(){var paddingLeft=element.currentStyle.paddingLeft;paddingLeft=paddingLeft==="0px"?0:getPixelValue(element,paddingLeft);style.paddingLeft=paddingLeft+this.width+"px";style.marginLeft=-this.width+"px";style.listStyleType="none";style.listStyleImage="none";style.paddingTop=Math.max(originalHeight-element.offsetHeight, |
338 | +0)+"px";addFilter(element,"crop",src);element.style.zoom="100%"};image.src=src}IE7.HTML.addRecalc("img,input",function(element){if(element.nodeName==="INPUT"&&element.type!=="image")return;fixImage(element);addEventHandler(element,"onpropertychange",function(){if(!printing&&event.propertyName==="src"&&element.src.indexOf(BLANK_GIF)===-1)fixImage(element)})});var printing=false;addEventHandler(window,"onbeforeprint",function(){printing=true;for(var i=0;i<filtered.length;i++)removeFilter(filtered[i])}); |
339 | +addEventHandler(window,"onafterprint",function(){for(var i=0;i<filtered.length;i++)addFilter(filtered[i]);printing=false})}function addFilter(element,sizingMethod,src){var filter=element.filters[ALPHA_IMAGE_LOADER];if(filter){filter.src=src||element.src;filter.enabled=true}else{element.runtimeStyle.filter=format(PNG_FILTER,src||element.src,sizingMethod||"scale");filtered.push(element)}element.src=BLANK_GIF}function removeFilter(element){element.src=element.pngSrc;element.filters[ALPHA_IMAGE_LOADER].enabled= |
340 | +false}(function(){if(appVersion>=7)return;IE7.CSS.addRecalc("position","fixed",_positionFixed,"absolute");IE7.CSS.addRecalc("background(-attachment)?","[^};]*fixed",_backgroundFixed);var $viewport=MSIE5?"body":"documentElement";function _fixBackground(){if(body.currentStyle.backgroundAttachment!=="fixed"){if(body.currentStyle.backgroundImage==="none"){body.runtimeStyle.backgroundRepeat="no-repeat";body.runtimeStyle.backgroundImage="url("+BLANK_GIF+")"}body.runtimeStyle.backgroundAttachment="fixed"}_fixBackground= |
341 | +Undefined}var _tmp=createTempElement("img");function _isFixed(element){return element?isFixed(element)||_isFixed(element.parentElement):false}function _setExpression(element,propertyName,expression){setTimeout("document.all."+element.uniqueID+".runtimeStyle.setExpression('"+propertyName+"','"+expression+"')",0)}function _backgroundFixed(element){if(register(_backgroundFixed,element,element.currentStyle.backgroundAttachment==="fixed"&&!element.contains(body))){_fixBackground();util.bgLeft(element); |
342 | +util.bgTop(element);_backgroundPosition(element)}}function _backgroundPosition(element){_tmp.src=element.currentStyle.backgroundImage.slice(5,-2);var parentElement=element.canHaveChildren?element:element.parentElement;parentElement.appendChild(_tmp);util.setOffsetLeft(element);util.setOffsetTop(element);parentElement.removeChild(_tmp)}function _positionFixed(element){if(register(_positionFixed,element,isFixed(element))){setOverrideStyle(element,"position","absolute");setOverrideStyle(element,"left", |
343 | +element.currentStyle.left);setOverrideStyle(element,"top",element.currentStyle.top);_fixBackground();IE7.Layout.fixRight(element);_foregroundPosition(element)}}function _foregroundPosition(element,recalc){document.body.getBoundingClientRect();util.positionTop(element,recalc);util.positionLeft(element,recalc,true);if(!element.runtimeStyle.autoLeft&&element.currentStyle.marginLeft==="auto"&&element.currentStyle.right!=="auto"){var left=viewport.clientWidth-util.getPixelWidth(element,element.currentStyle.right)- |
344 | +util.getPixelWidth(element,element.runtimeStyle._left)-element.clientWidth;if(element.currentStyle.marginRight==="auto")left=parseInt(left/2);if(_isFixed(element.offsetParent))element.runtimeStyle.pixelLeft+=left;else element.runtimeStyle.shiftLeft=left}if(!element.runtimeStyle.fixedWidth)util.clipWidth(element);if(!element.runtimeStyle.fixedHeight)util.clipHeight(element)}function _resize(){var elements=_backgroundFixed.elements;for(var i in elements)_backgroundPosition(elements[i]);elements=_positionFixed.elements; |
345 | +for(i in elements){_foregroundPosition(elements[i],true);_foregroundPosition(elements[i],true)}_timer=0}var _timer;addResize(function(){if(!_timer)_timer=setTimeout(_resize,100)});var util={};var _horizontal=function(util){util.bgLeft=function(element){element.style.backgroundPositionX=element.currentStyle.backgroundPositionX;if(!_isFixed(element))_setExpression(element,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+$viewport+".scrollLeft)||0")};util.setOffsetLeft=function(element){var propertyName= |
346 | +_isFixed(element)?"backgroundPositionX":"offsetLeft";element.runtimeStyle[propertyName]=util.getOffsetLeft(element,element.style.backgroundPositionX)-element.getBoundingClientRect().left-element.clientLeft+2};util.getOffsetLeft=function(element,position){switch(position){case "left":case "top":return 0;case "right":case "bottom":return viewport.clientWidth-_tmp.offsetWidth;case "center":return(viewport.clientWidth-_tmp.offsetWidth)/2;default:if(PERCENT.test(position))return parseInt((viewport.clientWidth- |
347 | +_tmp.offsetWidth)*parseFloat(position)/100);_tmp.style.left=position;return _tmp.offsetLeft}};util.clipWidth=function(element){var fixWidth=element.runtimeStyle.fixWidth;element.runtimeStyle.borderRightWidth="";element.runtimeStyle.width=fixWidth?util.getPixelWidth(element,fixWidth)+"px":"";if(element.currentStyle.width!=="auto"){var rect=element.getBoundingClientRect();var width=element.offsetWidth-viewport.clientWidth+rect.left-2;if(width>=0){element.runtimeStyle.borderRightWidth="0px";width=Math.max(getPixelValue(element, |
348 | +element.currentStyle.width)-width,0);setOverrideStyle(element,"width",width);return width}}};util.positionLeft=function(element,recalc){if(!recalc&&PERCENT.test(element.currentStyle.width))element.runtimeStyle.fixWidth=element.currentStyle.width;if(element.runtimeStyle.fixWidth)element.runtimeStyle.width=util.getPixelWidth(element,element.runtimeStyle.fixWidth);element.runtimeStyle.shiftLeft=0;element.runtimeStyle._left=element.currentStyle.left;element.runtimeStyle.autoLeft=element.currentStyle.right!== |
349 | +"auto"&&element.currentStyle.left==="auto";element.runtimeStyle.left="";element.runtimeStyle.screenLeft=util.getScreenLeft(element);element.runtimeStyle.pixelLeft=element.runtimeStyle.screenLeft;if(!recalc&&!_isFixed(element.offsetParent))_setExpression(element,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+$viewport+".scrollLeft")};util.getScreenLeft=function(element){var screenLeft=element.offsetLeft,nested=1;if(element.runtimeStyle.autoLeft)screenLeft=viewport.clientWidth- |
350 | +element.offsetWidth-util.getPixelWidth(element,element.currentStyle.right);if(element.currentStyle.marginLeft!=="auto")screenLeft-=util.getPixelWidth(element,element.currentStyle.marginLeft);while(element=element.offsetParent){if(element.currentStyle.position!=="static")nested=-1;screenLeft+=element.offsetLeft*nested}return screenLeft};util.getPixelWidth=function(element,value){return PERCENT.test(value)?parseInt(parseFloat(value)/100*viewport.clientWidth):getPixelValue(element,value)}};eval("var _vertical="+ |
351 | +rotate(_horizontal));_horizontal(util);_vertical(util)})();if(appVersion<7){var WRAPPER_STYLE={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,borderLeftColor:"#000",borderTopColor:"#000",borderRightColor:"#000",borderBottomColor:"#000",height:null,marginTop:0, |
352 | +marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};IE7.CSS.addRecalc("overflow","visible",function(element){if(element.currentStyle.position==="absolute")return;if(element.parentNode.ie7_wrapped)return;if(IE7.Layout&&element.currentStyle["max-height"]!=="auto")IE7.Layout.maxHeight(element);if(element.currentStyle.marginLeft==="auto")element.style.marginLeft=0;if(element.currentStyle.marginRight==="auto")element.style.marginRight=0;var wrapper=document.createElement(ANON);wrapper.ie7_wrapped= |
353 | +element;for(var propertyName in WRAPPER_STYLE){wrapper.style[propertyName]=element.currentStyle[propertyName];if(WRAPPER_STYLE[propertyName]!=null)element.runtimeStyle[propertyName]=WRAPPER_STYLE[propertyName]}wrapper.style.display="block";wrapper.style.position="relative";element.runtimeStyle.position="absolute";element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(element)})}function ie7Quirks(){var FONT_SIZES="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var i= |
354 | +0;i<FONT_SIZES.length;i++)FONT_SIZES[FONT_SIZES[i]]=FONT_SIZES[i-1]||"0.67em";IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(match,label,size,value){return label+(FONT_SIZES[value]||value)});var NEGATIVE=/^\-/,LENGTH=/(em|ex)$/i;var EM=/em$/i,EX=/ex$/i;getPixelValue=function(element,value){if(PIXEL.test(value))return parseInt(value)||0;var scale=NEGATIVE.test(value)?-1:1;if(LENGTH.test(value))scale*=getFontScale(element);temp.style.width=scale<0?value.slice(1):value;body.appendChild(temp); |
355 | +value=scale*temp.offsetWidth;temp.removeNode();return parseInt(value)};var temp=createTempElement();function getFontScale(element){var scale=1;temp.style.fontFamily=element.currentStyle.fontFamily;temp.style.lineHeight=element.currentStyle.lineHeight;while(element!=body){var fontSize=element.currentStyle["ie7-font-size"];if(fontSize)if(EM.test(fontSize))scale*=parseFloat(fontSize);else if(PERCENT.test(fontSize))scale*=parseFloat(fontSize)/100;else if(EX.test(fontSize))scale*=parseFloat(fontSize)/ |
356 | +2;else{temp.style.fontSize=fontSize;return 1}element=element.parentElement}return scale}IE7.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");IE7.CSS.addFix(/display\s*:\s*list-item/,"display:block");function fixMargin(element){var parent=element.parentElement;var margin=parent.offsetWidth-element.offsetWidth-getPaddingWidth(parent);var autoRight=element.currentStyle["ie7-margin"]&&element.currentStyle.marginRight==="auto"||element.currentStyle["ie7-margin-right"]==="auto";switch(parent.currentStyle.textAlign){case "right":margin= |
357 | +autoRight?parseInt(margin/2):0;element.runtimeStyle.marginRight=margin+"px";break;case "center":if(autoRight)margin=0;default:if(autoRight)margin/=2;element.runtimeStyle.marginLeft=parseInt(margin)+"px"}}function getPaddingWidth(element){return getPixelValue(element,element.currentStyle.paddingLeft)+getPixelValue(element,element.currentStyle.paddingRight)}IE7.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(element){if(register(fixMargin,element,element.parentElement&&element.currentStyle.display=== |
358 | +"block"&&element.currentStyle.marginLeft==="auto"&&element.currentStyle.position!=="absolute"))fixMargin(element)});addResize(function(){for(var i in fixMargin.elements){var element=fixMargin.elements[i];element.runtimeStyle.marginLeft=element.runtimeStyle.marginRight="";fixMargin(element)}})}var BRACKETS="\\([^)]+\\)";encoder.add(/::(before|after)/,":$1");if(appVersion<8){if(IE7.CSS.pseudoClasses)IE7.CSS.pseudoClasses+="|";IE7.CSS.pseudoClasses+="before|after|lang"+BRACKETS;function parseInherited(cssText){return cssText.replace(new RegExp("([{;\\s])("+ |
359 | +inheritedProperties.join("|")+")\\s*:\\s*([^;}]+)","g"),"$1$2:$3;ie7-$2:$3")}var INHERITED=/[\w-]+\s*:\s*inherit/g;var STRIP_IE7_FLAGS=/ie7\-|\s*:\s*inherit/g;var DASH_LOWER=/\-([a-z])/g;function toUpper(match,chr){return chr.toUpperCase()}IE7.CSS.addRecalc("[\\w-]+","inherit",function(element,cssText){if(element.parentElement){var inherited=cssText.match(INHERITED);for(var i=0;i<inherited.length;i++){var propertyName=inherited[i].replace(STRIP_IE7_FLAGS,"");if(element.currentStyle["ie7-"+propertyName]=== |
360 | +"inherit"){propertyName=propertyName.replace(DASH_LOWER,toUpper);element.runtimeStyle[propertyName]=element.parentElement.currentStyle[propertyName]}}}},function(match){inheritedProperties.push(rescape(match.slice(1).split(":")[0]));return match});var Focus=new DynamicPseudoClass("focus",function(element){var instance=arguments;IE7.CSS.addEventHandler(element,"onfocus",function(){Focus.unregister(instance);Focus.register(instance)});IE7.CSS.addEventHandler(element,"onblur",function(){Focus.unregister(instance)}); |
361 | +if(element==document.activeElement)Focus.register(instance)});var Active=new DynamicPseudoClass("active",function(element){var instance=arguments;IE7.CSS.addEventHandler(element,"onmousedown",function(){Active.register(instance)})});addEventHandler(document,"onmouseup",function(){var instances=Active.instances;for(var i in instances)Active.unregister(instances[i])});var URL=/^url\s*\(\s*([^)]*)\)$/;var POSITION_MAP={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"}; |
362 | +var PseudoElement=IE7.PseudoElement=Rule.extend({constructor:function(selector,position,cssText){this.position=position;var content=cssText.match(PseudoElement.CONTENT),match,entity;if(content){content=content[1];match=content.split(/\s+/);for(var i=0;entity=match[i];i++)match[i]=/^attr/.test(entity)?{attr:entity.slice(5,-1)}:entity.charAt(0)==="'"?getString(entity):decode(entity);content=match}this.content=content;this.base(selector,decode(cssText))},init:function(){this.match=cssQuery(this.selector); |
363 | +for(var i=0;i<this.match.length;i++){var runtimeStyle=this.match[i].runtimeStyle;if(!runtimeStyle[this.position])runtimeStyle[this.position]={cssText:""};runtimeStyle[this.position].cssText+=";"+this.cssText;if(this.content!=null)runtimeStyle[this.position].content=this.content}},create:function(target){var generated=target.runtimeStyle[this.position];if(generated){var content=[].concat(generated.content||"");for(var j=0;j<content.length;j++)if(typeof content[j]=="object")content[j]=target.getAttribute(content[j].attr); |
364 | +content=content.join("");var url=content.match(URL);var cssText="overflow:hidden;"+generated.cssText.replace(/'/g,'"');var position=POSITION_MAP[this.position+Number(target.canHaveChildren)];var id="ie7_pseudo"+PseudoElement.count++;target.insertAdjacentHTML(position,format(PseudoElement.ANON,this.className,id,cssText,url?"":content));if(url){var src=getString(url[1]);var pseudoElement=document.getElementById(id);pseudoElement.src=src;addFilter(pseudoElement,"crop");var targetIsFloated=target.currentStyle.styleFloat!== |
365 | +"none";if(pseudoElement.currentStyle.display==="inline"||targetIsFloated){if(appVersion<7&&targetIsFloated&&target.canHaveChildren){target.runtimeStyle.display="inline";target.runtimeStyle.position="relative";pseudoElement.runtimeStyle.position="absolute"}pseudoElement.style.display="inline-block";if(target.currentStyle.styleFloat!=="none")pseudoElement.style.pixelWidth=target.offsetWidth;var image=new Image;image.onload=function(){pseudoElement.style.pixelWidth=this.width;pseudoElement.style.pixelHeight= |
366 | +Math.max(this.height,pseudoElement.offsetHeight)};image.src=src}}target.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var i=0;i<this.match.length;i++)this.create(this.match[i])},toString:function(){return"."+this.className+"{display:inline}"}},{CONTENT:/content\s*:\s*([^;]*)(;|$)/,ANON:"<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>",MATCH:/(.*):(before|after).*/,count:0});IE7._getLang=function(element){var lang="";while(element&&element.nodeType=== |
367 | +1){lang=element.lang||element.getAttribute("lang")||"";if(lang)break;element=element.parentNode}return lang};FILTER=extend(FILTER,{":lang\\(([^)]+)\\)":"((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&"})}var UNSUCCESSFUL=/^(submit|reset|button)$/;IE7.HTML.addRecalc("button,input",function(button){if(button.nodeName==="BUTTON"){var match=button.outerHTML.match(/ value="([^"]*)"/i);button.runtimeStyle.value=match?match[1]:""}if(button.type==="submit")addEventHandler(button,"onclick",function(){button.runtimeStyle.clicked= |
368 | +true;setTimeout("document.all."+button.uniqueID+".runtimeStyle.clicked=false",1)})});IE7.HTML.addRecalc("form",function(form){addEventHandler(form,"onsubmit",function(){for(var element,i=0;element=form[i];i++)if(UNSUCCESSFUL.test(element.type)&&!element.disabled&&!element.runtimeStyle.clicked){element.disabled=true;setTimeout("document.all."+element.uniqueID+".disabled=false",1)}else if(element.nodeName==="BUTTON"&&element.type==="submit"){setTimeout("document.all."+element.uniqueID+".value='"+element.value+ |
369 | +"'",1);element.value=element.runtimeStyle.value}})});IE7.HTML.addRecalc("img",function(img){if(img.alt&&!img.title)img.title=""});if(appVersion<8){IE7.CSS.addRecalc("border-spacing",NUMERIC,function(element){if(element.currentStyle.borderCollapse!=="collapse")element.cellSpacing=getPixelValue(element,element.currentStyle["ie7-border-spacing"].split(" ")[0])});IE7.CSS.addRecalc("box-sizing","content-box",IE7.Layout.boxSizing);IE7.CSS.addRecalc("box-sizing","border-box",IE7.Layout.borderBox)}if(appVersion< |
370 | +8){var IMAGE=/^image/i;IE7.HTML.addRecalc("object",function(element){if(IMAGE.test(element.type)){element.body.style.cssText="margin:0;padding:0;border:none;overflow:hidden";return element}})}var NOT_NEXT_BY_TYPE="!IE7._getElementSiblingByType(e,'next')&&",NOT_PREVIOUS_BY_TYPE=NOT_NEXT_BY_TYPE.replace("next","previous");if(IE7.CSS.pseudoClasses)IE7.CSS.pseudoClasses+="|";IE7.CSS.pseudoClasses+="(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|"+("not|nth\\-child|nth\\-last\\-child|nth\\-of\\-type|nth\\-last\\-of\\-type".split("|").join(BRACKETS+ |
371 | +"|")+BRACKETS);var Checked=new DynamicPseudoClass("checked",function(element){if(typeof element.checked!=="boolean")return;var instance=arguments;IE7.CSS.addEventHandler(element,"onpropertychange",function(){if(event.propertyName==="checked")if(element.checked===true)Checked.register(instance);else Checked.unregister(instance)});if(element.checked===true)Checked.register(instance)});var Enabled=new DynamicPseudoClass("enabled",function(element){if(typeof element.disabled!=="boolean")return;var instance= |
372 | +arguments;IE7.CSS.addEventHandler(element,"onpropertychange",function(){if(event.propertyName==="disabled")if(element.disabled===false)Enabled.register(instance);else Enabled.unregister(instance)});if(element.disabled===false)Enabled.register(instance)});var Disabled=new DynamicPseudoClass("disabled",function(element){if(typeof element.disabled!=="boolean")return;var instance=arguments;IE7.CSS.addEventHandler(element,"onpropertychange",function(){if(event.propertyName==="disabled")if(element.disabled=== |
373 | +true)Disabled.register(instance);else Disabled.unregister(instance)});if(element.disabled===true)Disabled.register(instance)});var Indeterminate=new DynamicPseudoClass("indeterminate",function(element){if(typeof element.indeterminate!=="boolean")return;var instance=arguments;IE7.CSS.addEventHandler(element,"onpropertychange",function(){if(event.propertyName==="indeterminate")if(element.indeterminate===true)Indeterminate.register(instance);else Indeterminate.unregister(instance)});IE7.CSS.addEventHandler(element, |
374 | +"onclick",function(){Indeterminate.unregister(instance)})});var Target=new DynamicPseudoClass("target",function(element){var instance=arguments;if(!element.tabIndex)element.tabIndex=0;IE7.CSS.addEventHandler(document,"onpropertychange",function(){if(event.propertyName==="activeElement")if(element.id&&element.id===location.hash.slice(1))Target.register(instance);else Target.unregister(instance)});if(element.id&&element.id===location.hash.slice(1))Target.register(instance)});var _currentIndex=1,allIndexes= |
375 | +{_currentIndex:1};IE7._indexOf=function(element,last,ofType){var parent=element.parentNode;if(!parent||parent.nodeType!==1)return NaN;var tagName=ofType?element.nodeName:"";if(tagName==="TR"&&element.sectionRowIndex>=0){var index=element.sectionRowIndex;return last?element.parentNode.rows.length-index+1:index}if((tagName==="TD"||tagName==="TH")&&element.cellIndex>=0){index=element.cellIndex;return last?element.parentNode.cells.length-index+1:index}if(allIndexes._currentIndex!==_currentIndex)allIndexes= |
376 | +{_currentIndex:_currentIndex};var id=parent.uniqueID+"-"+tagName,indexes=allIndexes[id];if(!indexes){indexes={};var index=0,child=parent.firstChild;while(child){if(ofType?child.nodeName===tagName:child.nodeName>"@")indexes[child.uniqueID]=++index;child=child.nextSibling}indexes.length=index;allIndexes[id]=indexes}index=indexes[element.uniqueID];return last?indexes.length-index+1:index};IE7._isEmpty=function(node){node=node.firstChild;while(node){if(node.nodeType===3||node.nodeName>"@")return false; |
377 | +node=node.nextSibling}return true};IE7._getElementSiblingByType=function(node,direction){var tagName=node.nodeName;direction+="Sibling";do{node=node[direction];if(node&&node.nodeName===tagName)break}while(node);return node};var ONE={"+":1,"-":-1},SPACES=/ /g;FILTER=extend(extend({":nth(-last)?-(?:child|(of-type))\\((<#nth_arg>)\\)(<#filter>)?":function(match,last,ofType,args,filters){args=args.replace(SPACES,"");var index="IE7._indexOf(e,"+!!last+","+!!ofType+")";if(args==="even")args="2n";else if(args=== |
378 | +"odd")args="2n+1";else if(!isNaN(args))args="0n"+~~args;args=args.split("n");var a=~~(ONE[args[0]]||args[0]||1),b=~~args[1];if(a===0)var expr=index+"==="+b;else expr="((ii="+index+")-("+b+"))%"+a+"===0&&ii"+(a<0?"<":">")+"="+b;return this.parse(filters)+expr+"&&"},"<#negation>":function(match,simple){if(/:not/i.test(simple))throwSelectorError();if(/^[#.:\[]/.test(simple))simple="*"+simple;return"!("+MATCHER.parse(simple).slice(3,-2)+")&&"}},FILTER),{":checked":"e.checked===true&&",":disabled":"e.disabled===true&&", |
379 | +":enabled":"e.disabled===false&&",":last-child":"!"+NEXT_SIBLING+"&&",":only-child":"!"+PREVIOUS_SIBLING+"&&!"+NEXT_SIBLING+"&&",":first-of-type":NOT_PREVIOUS_BY_TYPE,":last-of-type":NOT_NEXT_BY_TYPE,":only-of-type":NOT_PREVIOUS_BY_TYPE+NOT_NEXT_BY_TYPE,":empty":"IE7._isEmpty(e)&&",":root":"e==R&&",":target":"H&&"+ID_ATTRIBUTE+"===H&&"});var HTML5="article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(",");for(var i= |
380 | +0,tagName;tagName=HTML5[i];i++)document.createElement(tagName);HEADER+="datalist{display:none}details{padding-left:40px;display:block;margin:1em 0}meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}progress{width:10em;}article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}figure{margin:1em 40px;display:block}mark{background:yellow}";IE7.CSS.addFix(/\bopacity\s*:\s*([\d.]+)/,function(match,value){return"zoom:1;filter:Alpha(opacity="+ |
381 | +(value*100||1)+")"});var MATCHER;var cssQuery=function(){var CONTEXT=/^[>+~]/;var useContext=false;function cssQuery(selector,context,single){selector=trim(selector);if(!context)context=document;var ref=context;useContext=CONTEXT.test(selector);if(useContext){context=context.parentNode;selector="*"+selector}try{return selectQuery.create(selector,useContext)(context,single?null:[],ref)}catch(ex){return single?null:[]}}var VALID_SELECTOR=/^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/;var _EVALUATED= |
382 | +/^(href|src)$/;var _ATTRIBUTES={"class":"className","for":"htmlFor"};var IE7_CLASS_NAMES=/\sie7_\w+/g;var USE_IFLAG=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;IE7._getAttribute=function(element,name){if(element.getAttributeNode)var attribute=element.getAttributeNode(name);name=_ATTRIBUTES[name.toLowerCase()]||name;if(!attribute)attribute=element.attributes[name];var specified=attribute&&attribute.specified;if(element[name]&&typeof element[name]=="boolean")return name.toLowerCase(); |
383 | +if(specified&&USE_IFLAG.test(name)||!attribute&&MSIE5||name==="value"||name==="type")return element.getAttribute(name,2);if(name==="style")return element.style.cssText.toLowerCase()||null;return specified?String(attribute.nodeValue):null};var names="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";extend(_ATTRIBUTES,combine(names.toLowerCase().split(","),names.split(",")));IE7._getElementSibling=function(node,direction){direction+="Sibling";do{node=node[direction]; |
384 | +if(node&&node.nodeName>"@")break}while(node);return node};var IMPLIED_ASTERISK=/(^|[, >+~])([#.:\[])/g,BLOCKS=/\)\{/g,COMMA=/,/,QUOTED=/^['"]/,HEX_ESCAPE=/\\([\da-f]{2,2})/gi,LAST_CHILD=/last/i;IE7._byId=function(document,id){var result=document.all[id]||null;if(!result||result.nodeType&&IE7._getAttribute(result,"id")===id)return result;for(var i=0;i<result.length;i++)if(IE7._getAttribute(result[i],"id")===id)return result[i];return null};var CSSSelectorParser=RegGrp.extend({dictionary:new Dictionary({ident:/\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/, |
385 | +combinator:/[\s>+~]/,operator:/[\^~|$*]?=/,nth_arg:/[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,tag:/\*|<#ident>/,id:/#(<#ident>)/,"class":/\.(<#ident>)/,pseudo:/\:([\w-]+)(?:\(([^)]+)\))?/,attr:/\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,negation:/:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,sequence:/(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,filter:/[#.:\[]<#sequence>/,selector:/[^>+~](\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true});var normalizer= |
386 | +new CSSSelectorParser({"\\\\.|[~*]\\s+=|\\+\\s+\\d":RegGrp.IGNORE,"\\[\\s+":"[","\\(\\s+":"(","\\s+\\)":")","\\s+\\]":"]","\\s*([,>+~]|<#operator>)\\s*":"$1","\\s+$":"","\\s+":" "});function normalize(selector){selector=normalizer.parse(selector.replace(HEX_ESCAPE,"\\x$1")).replace(UNESCAPE,"$1").replace(IMPLIED_ASTERISK,"$1*$2");if(!VALID_SELECTOR.test(selector))throwSelectorError();return selector}function unescape(query){return query.replace(ESCAPED,unescapeString)}function unescapeString(match, |
387 | +index){return strings[index]}var BRACES=/\{/g,BRACES_ESCAPED=/\\{/g;function closeBlock(group){return Array((group.replace(BRACES_ESCAPED,"").match(BRACES)||"").length+1).join("}")}FILTER=new CSSSelectorParser(FILTER);var TARGET=/:target/i,ROOT=/:root/i;function getConstants(selector){var constants="";if(ROOT.test(selector))constants+=",R=d.documentElement";if(TARGET.test(selector))constants+=",H=d.location;H=H&&H.hash.replace('#','')";if(constants||selector.indexOf("#")!==-1)constants=",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document"+ |
388 | +constants;return"var ii"+constants+";"}var COMBINATOR={" ":";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",">":".parentElement;if(e){","+":";while((e=e.previousSibling)&&!("+IS_ELEMENT+"))continue;if(e){","~":";while((e=e.previousSibling)){"+IF_ELEMENT};var TOKEN=/\be\b/g;MATCHER=new CSSSelectorParser({"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$":function(match,before,combinator,tag,filters){var group="";if(tag!=="*"){var TAG=tag.toUpperCase();group+="if(e.nodeName==='"+TAG+(TAG===tag? |
389 | +"":"'||e.nodeName==='"+tag)+"'){"}if(filters)group+="if("+FILTER.parse(filters).slice(0,-2)+"){";group=group.replace(TOKEN,"e"+this.index);if(combinator){group+="var e=e"+this.index++ +COMBINATOR[combinator];group=group.replace(TOKEN,"e"+this.index)}if(before)group+=this.parse(before);return group}});var BY_ID="e0=IE7._byId(d,'%1');if(e0){",BY_TAG_NAME="var n=c.getElementsByTagName('%1');",STORE="if(r==null)return e0;r[k++]=e0;";var TAG_NAME=1;var SELECTOR=new CSSSelectorParser({"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$":true}); |
390 | +var cache={};var selectById=new CSSSelectorParser({"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$":function(match,tagName,id,filters,after){var block=format(BY_ID,id),endBlock="}";if(filters){block+=MATCHER.parse(tagName+filters);endBlock=closeBlock(block)}if(after)block+="s=c=e0;"+selectQuery.parse("*"+after);else block+=STORE;return block+endBlock},"^([^#,]+)#(<#ident>)(<#filter>)?$":function(match,before,id,filters){var block=format(BY_ID,id);if(before==="*")block+=STORE;else block+=MATCHER.parse(before+ |
391 | +filters)+STORE+"break";return block+closeBlock(block)},"^.*$":""});var selectQuery=new CSSSelectorParser({"<#grammar>":function(match,selector,remainingSelectors){if(!this.groups)this.groups=[];var group=SELECTOR.exec(" "+selector);if(!group)throwSelectorError();this.groups.push(group.slice(1));if(remainingSelectors)return this.parse(remainingSelectors.replace(COMMA,""));var groups=this.groups,tagName=groups[0][TAG_NAME];for(var i=1;group=groups[i];i++)if(tagName!==group[TAG_NAME]){tagName="*";break}var matcher= |
392 | +"",store=STORE+"continue filtering;";for(var i=0;group=groups[i];i++){MATCHER.index=0;if(tagName!=="*")group[TAG_NAME]="*";group=group.join("");if(group===" *"){matcher=store;break}else{group=MATCHER.parse(group);if(useContext)group+="if(e"+MATCHER.index+"==s){";matcher+=group+store+closeBlock(group)}}var isWild=tagName==="*";return(isWild?"var n=c.all;":format(BY_TAG_NAME,tagName))+"filtering:while((e0=n[i++]))"+(isWild?IF_ELEMENT.replace(TOKEN,"e0"):"{")+matcher+"}"},"^.*$":throwSelectorError}); |
393 | +var REDUNDANT_NODETYPE_CHECKS=/\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;selectQuery.create=function(selector){if(!cache[selector]){selector=normalize(selector);this.groups=null;MATCHER.index=0;var block=this.parse(selector);this.groups=null;MATCHER.index=0;if(selector.indexOf("#")!==-1){var byId=selectById.parse(selector);if(byId)block="if(t===1||t===11|!c.getElementById){"+block+"}else{"+byId+"}"}block=block.replace(REDUNDANT_NODETYPE_CHECKS,"$2");block=getConstants(selector)+decode(block); |
394 | +cache[selector]=(new Function("return function(c,r,s){var i=0,k=0,e0;"+block+"return r}"))()}return cache[selector]};return cssQuery}();function throwSelectorError(){throw new SyntaxError("Invalid selector.");}IE7.loaded=true;(function(){try{if(!document.body)throw"continue";documentElement.doScroll("left")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(script.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX=="object")PNG=IE7_PNG_SUFFIX;else PNG=new RegExp(rescape(window.IE7_PNG_SUFFIX||"-trans.png")+ |
395 | +"(\\?.*)?$","i");body=document.body;viewport=MSIE5?body:documentElement;body.className+=" ie7_body";documentElement.className+=" ie7_html";if(MSIE5)ie7Quirks();IE7.CSS.init();IE7.HTML.init();IE7.HTML.apply();IE7.CSS.apply();IE7.recalc()})()})(this,document); |
396 | \ No newline at end of file |
397 | |
398 | === added file 'media/js/polyfills/IE9/LICENSE' |
399 | --- media/js/polyfills/IE9/LICENSE 1970-01-01 00:00:00 +0000 |
400 | +++ media/js/polyfills/IE9/LICENSE 2012-03-26 20:23:22 +0000 |
401 | @@ -0,0 +1,21 @@ |
402 | +The MIT License |
403 | + |
404 | +Copyright (c) 2004-2010 Dean Edwards |
405 | + |
406 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
407 | +of this software and associated documentation files (the "Software"), to deal |
408 | +in the Software without restriction, including without limitation the rights |
409 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
410 | +copies of the Software, and to permit persons to whom the Software is |
411 | +furnished to do so, subject to the following conditions: |
412 | + |
413 | +The above copyright notice and this permission notice shall be included in |
414 | +all copies or substantial portions of the Software. |
415 | + |
416 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
417 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
418 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
419 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
420 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
421 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
422 | +THE SOFTWARE. |
423 | |
424 | === added file 'media/js/polyfills/IE9/blank.gif' |
425 | Binary files media/js/polyfills/IE9/blank.gif 1970-01-01 00:00:00 +0000 and media/js/polyfills/IE9/blank.gif 2012-03-26 20:23:22 +0000 differ |
426 | === added file 'media/js/polyfills/IE9/squish.js' |
427 | --- media/js/polyfills/IE9/squish.js 1970-01-01 00:00:00 +0000 |
428 | +++ media/js/polyfills/IE9/squish.js 2012-03-26 20:23:22 +0000 |
429 | @@ -0,0 +1,1 @@ |
430 | +if(IE7.loaded&&IE7.appVersion<7){IE7.CSS.addFix(/(float\s*:\s*(left|right))/,"display:inline;$1");if(IE7.appVersion>=6)IE7.CSS.addRecalc("float","(left|right)",function(element){IE7.Layout.boxSizing(element.parentElement);element.style.display="inline"});IE7.CSS.addRecalc("position","absolute|fixed",function(element){if(element.offsetParent&&element.offsetParent.currentStyle.position==="relative")IE7.Layout.boxSizing(element.offsetParent)})}; |
431 | \ No newline at end of file |
432 | |
433 | === added directory 'media/js/polyfills/IE9/src' |
434 | === added file 'media/js/polyfills/IE9/src/IE9.src.js' |
435 | --- media/js/polyfills/IE9/src/IE9.src.js 1970-01-01 00:00:00 +0000 |
436 | +++ media/js/polyfills/IE9/src/IE9.src.js 2012-03-26 20:23:22 +0000 |
437 | @@ -0,0 +1,2901 @@ |
438 | +/* |
439 | + IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards |
440 | + http://code.google.com/p/ie7-js/ |
441 | + http://www.opensource.org/licenses/mit-license.php |
442 | +*/ |
443 | + |
444 | +/* W3C compliance for Microsoft Internet Explorer */ |
445 | + |
446 | +/* credits/thanks: |
447 | + Shaggy, Martijn Wargers, Jimmy Cerra, Mark D Anderson, |
448 | + Lars Dieckow, Erik Arvidsson, Gellért Gyuris, James Denny, |
449 | + Unknown W Brackets, Benjamin Westfarer, Rob Eberhardt, |
450 | + Bill Edney, Kevin Newman, James Crompton, Matthew Mastracci, |
451 | + Doug Wright, Richard York, Kenneth Kolano, MegaZone, |
452 | + Thomas Verelst, Mark 'Tarquin' Wilton-Jones, Rainer Ã…hlfors, |
453 | + David Zulaica, Ken Kolano, Kevin Newman, Sjoerd Visscher, |
454 | + Ingo Chao |
455 | +*/ |
456 | + |
457 | +// timestamp: Fri, 30 Apr 2010 20:59:18 |
458 | + |
459 | +(function(window, document) { |
460 | + |
461 | +var IE7 = window.IE7 = { |
462 | + version: "2.1(beta4)", |
463 | + toString: K("[IE7]") |
464 | +}; |
465 | +IE7.compat = 9; |
466 | +var appVersion = IE7.appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1] - 0; |
467 | + |
468 | +if (/ie7_off/.test(top.location.search) || appVersion < 5.5 || appVersion >= IE7.compat) return; |
469 | + |
470 | +var MSIE5 = appVersion < 6; |
471 | + |
472 | +var Undefined = K(); |
473 | +var documentElement = document.documentElement, body, viewport; |
474 | +var ANON = "!"; |
475 | +var HEADER = ":link{ie7-link:link}:visited{ie7-link:visited}"; |
476 | + |
477 | +// ----------------------------------------------------------------------- |
478 | +// external |
479 | +// ----------------------------------------------------------------------- |
480 | + |
481 | +var RELATIVE = /^[\w\.]+[^:]*$/; |
482 | +function makePath(href, path) { |
483 | + if (RELATIVE.test(href)) href = (path || "") + href; |
484 | + return href; |
485 | +}; |
486 | + |
487 | +function getPath(href, path) { |
488 | + href = makePath(href, path); |
489 | + return href.slice(0, href.lastIndexOf("/") + 1); |
490 | +}; |
491 | + |
492 | +// Get the path to this script |
493 | +var script = document.scripts[document.scripts.length - 1]; |
494 | +var path = getPath(script.src); |
495 | + |
496 | +// Use microsoft's http request object to load external files |
497 | +try { |
498 | + var httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); |
499 | +} catch (ex) { |
500 | + // ActiveX disabled |
501 | +} |
502 | + |
503 | +var fileCache = {}; |
504 | +function loadFile(href, path) { |
505 | + try { |
506 | + href = makePath(href, path); |
507 | + if (!fileCache[href]) { |
508 | + httpRequest.open("GET", href, false); |
509 | + httpRequest.send(); |
510 | + if (httpRequest.status == 0 || httpRequest.status == 200) { |
511 | + fileCache[href] = httpRequest.responseText; |
512 | + } |
513 | + } |
514 | + } catch (ex) { |
515 | + // ignore errors |
516 | + } |
517 | + return fileCache[href] || ""; |
518 | +}; |
519 | + |
520 | +// ----------------------------------------------------------------------- |
521 | +// OO support |
522 | +// ----------------------------------------------------------------------- |
523 | + |
524 | + |
525 | +// This is a cut-down version of base2 (http://code.google.com/p/base2/) |
526 | + |
527 | +var _slice = Array.prototype.slice; |
528 | + |
529 | +// private |
530 | +var _FORMAT = /%([1-9])/g; |
531 | +var _LTRIM = /^\s\s*/; |
532 | +var _RTRIM = /\s\s*$/; |
533 | +var _RESCAPE = /([\/()[\]{}|*+-.,^$?\\])/g; // safe regular expressions |
534 | +var _BASE = /\bbase\b/; |
535 | +var _HIDDEN = ["constructor", "toString"]; // only override these when prototyping |
536 | + |
537 | +var prototyping; |
538 | + |
539 | +function Base(){}; |
540 | +Base.extend = function(_instance, _static) { |
541 | + // Build the prototype. |
542 | + prototyping = true; |
543 | + var _prototype = new this; |
544 | + extend(_prototype, _instance); |
545 | + prototyping = false; |
546 | + |
547 | + // Create the wrapper for the constructor function. |
548 | + var _constructor = _prototype.constructor; |
549 | + function klass() { |
550 | + // Don't call the constructor function when prototyping. |
551 | + if (!prototyping) _constructor.apply(this, arguments); |
552 | + }; |
553 | + _prototype.constructor = klass; |
554 | + |
555 | + // Build the static interface. |
556 | + klass.extend = arguments.callee; |
557 | + extend(klass, _static); |
558 | + klass.prototype = _prototype; |
559 | + return klass; |
560 | +}; |
561 | +Base.prototype.extend = function(source) { |
562 | + return extend(this, source); |
563 | +}; |
564 | + |
565 | + |
566 | +// A collection of regular expressions and their associated replacement values. |
567 | +// A Base class for creating parsers. |
568 | + |
569 | +var HASH = "#"; |
570 | +var ITEMS = "#"; |
571 | +var KEYS = "."; |
572 | +var COMPILED = "/"; |
573 | + |
574 | +var REGGRP_BACK_REF = /\\(\d+)/g, |
575 | + REGGRP_ESCAPE_COUNT = /\[(\\.|[^\]\\])+\]|\\.|\(\?/g, |
576 | + REGGRP_PAREN = /\(/g, |
577 | + REGGRP_LOOKUP = /\$(\d+)/, |
578 | + REGGRP_LOOKUP_SIMPLE = /^\$\d+$/, |
579 | + REGGRP_LOOKUPS = /(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g, |
580 | + REGGRP_DICT_ENTRY = /^<#\w+>$/, |
581 | + REGGRP_DICT_ENTRIES = /<#(\w+)>/g; |
582 | + |
583 | +var RegGrp = Base.extend({ |
584 | + constructor: function(values) { |
585 | + this[KEYS] = []; |
586 | + this[ITEMS] = {}; |
587 | + this.merge(values); |
588 | + }, |
589 | + |
590 | + //dictionary: null, |
591 | + //ignoreCase: false, |
592 | + |
593 | + add: function(expression, replacement) { |
594 | + delete this[COMPILED]; |
595 | + if (expression instanceof RegExp) { |
596 | + expression = expression.source; |
597 | + } |
598 | + if (!this[HASH + expression]) this[KEYS].push(String(expression)); |
599 | + return this[ITEMS][HASH + expression] = new RegGrp.Item(expression, replacement, this); |
600 | + }, |
601 | + |
602 | + compile: function(recompile) { |
603 | + if (recompile || !this[COMPILED]) { |
604 | + this[COMPILED] = new RegExp(this, this.ignoreCase ? "gi" : "g"); |
605 | + } |
606 | + return this[COMPILED]; |
607 | + }, |
608 | + |
609 | + merge: function(values) { |
610 | + for (var i in values) this.add(i, values[i]); |
611 | + }, |
612 | + |
613 | + exec: function(string) { |
614 | + var group = this, |
615 | + patterns = group[KEYS], |
616 | + items = group[ITEMS], item; |
617 | + var result = this.compile(true).exec(string); |
618 | + if (result) { |
619 | + // Loop through the RegGrp items. |
620 | + var i = 0, offset = 1; |
621 | + while ((item = items[HASH + patterns[i++]])) { |
622 | + var next = offset + item.length + 1; |
623 | + if (result[offset]) { // do we have a result? |
624 | + if (item.replacement === 0) { |
625 | + return group.exec(string); |
626 | + } else { |
627 | + var args = result.slice(offset, next), j = args.length; |
628 | + while (--j) args[j] = args[j] || ""; // some platforms return null/undefined for non-matching sub-expressions |
629 | + args[0] = {match: args[0], item: item}; |
630 | + return args; |
631 | + } |
632 | + } |
633 | + offset = next; |
634 | + } |
635 | + } |
636 | + return null; |
637 | + }, |
638 | + |
639 | + parse: function(string) { |
640 | + string += ""; // type safe |
641 | + var group = this, |
642 | + patterns = group[KEYS], |
643 | + items = group[ITEMS]; |
644 | + return string.replace(this.compile(), function(match) { |
645 | + var args = [], item, offset = 1, i = arguments.length; |
646 | + while (--i) args[i] = arguments[i] || ""; // some platforms return null/undefined for non-matching sub-expressions |
647 | + // Loop through the RegGrp items. |
648 | + while ((item = items[HASH + patterns[i++]])) { |
649 | + var next = offset + item.length + 1; |
650 | + if (args[offset]) { // do we have a result? |
651 | + var replacement = item.replacement; |
652 | + switch (typeof replacement) { |
653 | + case "function": |
654 | + return replacement.apply(group, args.slice(offset, next)); |
655 | + case "number": |
656 | + return args[offset + replacement]; |
657 | + default: |
658 | + return replacement; |
659 | + } |
660 | + } |
661 | + offset = next; |
662 | + } |
663 | + return match; |
664 | + }); |
665 | + }, |
666 | + |
667 | + toString: function() { |
668 | + var strings = [], |
669 | + keys = this[KEYS], |
670 | + items = this[ITEMS], item; |
671 | + for (var i = 0; item = items[HASH + keys[i]]; i++) { |
672 | + strings[i] = item.source; |
673 | + } |
674 | + return "(" + strings.join(")|(") + ")"; |
675 | + } |
676 | +}, { |
677 | + IGNORE: null, // a null replacement value means that there is no replacement. |
678 | + |
679 | + Item: Base.extend({ |
680 | + constructor: function(source, replacement, owner) { |
681 | + var length = source.indexOf("(") === -1 ? 0 : RegGrp.count(source); |
682 | + |
683 | + var dictionary = owner.dictionary; |
684 | + if (dictionary && source.indexOf("<#") !== -1) { |
685 | + if (REGGRP_DICT_ENTRY.test(source)) { |
686 | + var entry = dictionary[ITEMS][HASH + source.slice(2, -1)]; |
687 | + source = entry.replacement; |
688 | + length = entry._length; |
689 | + } else { |
690 | + source = dictionary.parse(source); |
691 | + } |
692 | + } |
693 | + |
694 | + if (typeof replacement == "number") replacement = String(replacement); |
695 | + else if (replacement == null) replacement = 0; |
696 | + |
697 | + // Does the expression use sub-expression lookups? |
698 | + if (typeof replacement == "string" && REGGRP_LOOKUP.test(replacement)) { |
699 | + if (REGGRP_LOOKUP_SIMPLE.test(replacement)) { // A simple lookup? (e.g. "$2"). |
700 | + // Store the index (used for fast retrieval of matched strings). |
701 | + var index = replacement.slice(1) - 0; |
702 | + if (index && index <= length) replacement = index; |
703 | + } else { |
704 | + // A complicated lookup (e.g. "Hello $2 $1."). |
705 | + var lookup = replacement, regexp; |
706 | + replacement = function(match) { |
707 | + if (!regexp) { |
708 | + regexp = new RegExp(source, "g" + (this.ignoreCase ? "i": "")); |
709 | + } |
710 | + return match.replace(regexp, lookup); |
711 | + }; |
712 | + } |
713 | + } |
714 | + |
715 | + this.length = length; |
716 | + this.source = String(source); |
717 | + this.replacement = replacement; |
718 | + } |
719 | + }), |
720 | + |
721 | + count: function(expression) { |
722 | + return (String(expression).replace(REGGRP_ESCAPE_COUNT, "").match(REGGRP_PAREN) || "").length; |
723 | + } |
724 | +}); |
725 | + |
726 | +var Dictionary = RegGrp.extend({ |
727 | + parse: function(phrase) { |
728 | + // Prevent sub-expressions in dictionary entries from capturing. |
729 | + var entries = this[ITEMS]; |
730 | + return phrase.replace(REGGRP_DICT_ENTRIES, function(match, entry) { |
731 | + entry = entries[HASH + entry]; |
732 | + return entry ? entry._nonCapturing : match; |
733 | + }); |
734 | + }, |
735 | + |
736 | + add: function(expression, replacement) { |
737 | + // Get the underlying replacement value. |
738 | + if (replacement instanceof RegExp) { |
739 | + replacement = replacement.source; |
740 | + } |
741 | + // Translate the replacement. |
742 | + // The result is the original replacement recursively parsed by this dictionary. |
743 | + var nonCapturing = replacement.replace(REGGRP_LOOKUPS, _nonCapture); |
744 | + if (replacement.indexOf("(") !== -1) { |
745 | + var realLength = RegGrp.count(replacement); |
746 | + } |
747 | + if (replacement.indexOf("<#") !== -1) { |
748 | + replacement = this.parse(replacement); |
749 | + nonCapturing = this.parse(nonCapturing); |
750 | + } |
751 | + var item = this.base(expression, replacement); |
752 | + item._nonCapturing = nonCapturing; |
753 | + item._length = realLength || item.length; // underlying number of sub-groups |
754 | + return item; |
755 | + }, |
756 | + |
757 | + toString: function() { |
758 | + return "(<#" + this[PATTERNS].join(">)|(<#") + ">)"; |
759 | + } |
760 | +}); |
761 | + |
762 | +function _nonCapture(match, escaped) { |
763 | + return escaped || "(?:"; // non-capturing |
764 | +}; |
765 | + |
766 | +// ========================================================================= |
767 | +// lang/extend.js |
768 | +// ========================================================================= |
769 | + |
770 | +function extend(object, source) { // or extend(object, key, value) |
771 | + if (object && source) { |
772 | + var proto = (typeof source == "function" ? Function : Object).prototype; |
773 | + // Add constructor, toString etc |
774 | + var i = _HIDDEN.length, key; |
775 | + if (prototyping) while (key = _HIDDEN[--i]) { |
776 | + var value = source[key]; |
777 | + if (value != proto[key]) { |
778 | + if (_BASE.test(value)) { |
779 | + _override(object, key, value) |
780 | + } else { |
781 | + object[key] = value; |
782 | + } |
783 | + } |
784 | + } |
785 | + // Copy each of the source object's properties to the target object. |
786 | + for (key in source) if (typeof proto[key] == "undefined") { |
787 | + var value = source[key]; |
788 | + // Check for method overriding. |
789 | + if (object[key] && typeof value == "function" && _BASE.test(value)) { |
790 | + _override(object, key, value); |
791 | + } else { |
792 | + object[key] = value; |
793 | + } |
794 | + } |
795 | + } |
796 | + return object; |
797 | +}; |
798 | + |
799 | +function _override(object, name, method) { |
800 | + // Override an existing method. |
801 | + var ancestor = object[name]; |
802 | + object[name] = function() { |
803 | + var previous = this.base; |
804 | + this.base = ancestor; |
805 | + var returnValue = method.apply(this, arguments); |
806 | + this.base = previous; |
807 | + return returnValue; |
808 | + }; |
809 | +}; |
810 | + |
811 | +function combine(keys, values) { |
812 | + // Combine two arrays to make a hash. |
813 | + if (!values) values = keys; |
814 | + var hash = {}; |
815 | + for (var i in keys) hash[i] = values[i]; |
816 | + return hash; |
817 | +}; |
818 | + |
819 | +function format(string) { |
820 | + // Replace %n with arguments[n]. |
821 | + // e.g. format("%1 %2%3 %2a %1%3", "she", "se", "lls"); |
822 | + // ==> "she sells sea shells" |
823 | + // Only %1 - %9 supported. |
824 | + var args = arguments; |
825 | + var _FORMAT = new RegExp("%([1-" + arguments.length + "])", "g"); |
826 | + return String(string).replace(_FORMAT, function(match, index) { |
827 | + return index < args.length ? args[index] : match; |
828 | + }); |
829 | +}; |
830 | + |
831 | +function match(string, expression) { |
832 | + // Same as String.match() except that this function will return an empty |
833 | + // array if there is no match. |
834 | + return String(string).match(expression) || []; |
835 | +}; |
836 | + |
837 | +function rescape(string) { |
838 | + // Make a string safe for creating a RegExp. |
839 | + return String(string).replace(_RESCAPE, "\\$1"); |
840 | +}; |
841 | + |
842 | +// http://blog.stevenlevithan.com/archives/faster-trim-javascript |
843 | +function trim(string) { |
844 | + return String(string).replace(_LTRIM, "").replace(_RTRIM, ""); |
845 | +}; |
846 | + |
847 | +function K(k) { |
848 | + return function() { |
849 | + return k; |
850 | + }; |
851 | +}; |
852 | + |
853 | +// ----------------------------------------------------------------------- |
854 | +// parsing |
855 | +// ----------------------------------------------------------------------- |
856 | + |
857 | +var Parser = RegGrp.extend({ignoreCase: true}); |
858 | + |
859 | +var SINGLE_QUOTES = /'/g, |
860 | + ESCAPED = /'(\d+)'/g, |
861 | + ESCAPE = /\\/g, |
862 | + UNESCAPE = /\\([nrtf'"])/g; |
863 | + |
864 | +var strings = []; |
865 | + |
866 | +var encoder = new Parser({ |
867 | + // comments |
868 | + "<!\\-\\-|\\-\\->": "", |
869 | + "\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/": "", |
870 | + // get rid |
871 | + "@(namespace|import)[^;\\n]+[;\\n]": "", |
872 | + // strings |
873 | + "'(\\\\.|[^'\\\\])*'": encodeString, |
874 | + '"(\\\\.|[^"\\\\])*"': encodeString, |
875 | + // white space |
876 | + "\\s+": " " |
877 | +}); |
878 | + |
879 | +function encode(selector) { |
880 | + return encoder.parse(selector).replace(UNESCAPE, "$1"); |
881 | +}; |
882 | + |
883 | +function decode(query) { |
884 | + // put string values back |
885 | + return query.replace(ESCAPED, decodeString); |
886 | +}; |
887 | + |
888 | +function encodeString(string) { |
889 | + var index = strings.length; |
890 | + strings[index] = string.slice(1, -1) |
891 | + .replace(UNESCAPE, "$1") |
892 | + .replace(SINGLE_QUOTES, "\\'"); |
893 | + return "'" + index + "'"; |
894 | +}; |
895 | + |
896 | +function decodeString(match, index) { |
897 | + var string = strings[index]; |
898 | + if (string == null) return match; |
899 | + return "'" + strings[index] + "'"; |
900 | +}; |
901 | + |
902 | +function getString(value) { |
903 | + return value.indexOf("'") === 0 ? strings[value.slice(1, - 1)] : value; |
904 | +}; |
905 | + |
906 | +// clone a "width" function to create a "height" function |
907 | +var rotater = new RegGrp({ |
908 | + Width: "Height", |
909 | + width: "height", |
910 | + Left: "Top", |
911 | + left: "top", |
912 | + Right: "Bottom", |
913 | + right: "bottom", |
914 | + onX: "onY" |
915 | +}); |
916 | + |
917 | +function rotate(fn) { |
918 | + return rotater.parse(fn); |
919 | +}; |
920 | + |
921 | +// ----------------------------------------------------------------------- |
922 | +// event handling |
923 | +// ----------------------------------------------------------------------- |
924 | + |
925 | +var eventHandlers = []; |
926 | + |
927 | +function addResize(handler) { |
928 | + addRecalc(handler); |
929 | + addEventHandler(window, "onresize", handler); |
930 | +}; |
931 | + |
932 | +// add an event handler (function) to an element |
933 | +function addEventHandler(element, type, handler) { |
934 | + element.attachEvent(type, handler); |
935 | + // store the handler so it can be detached later |
936 | + eventHandlers.push(arguments); |
937 | +}; |
938 | + |
939 | +// remove an event handler assigned to an element by IE7 |
940 | +function removeEventHandler(element, type, handler) { |
941 | + try { |
942 | + element.detachEvent(type, handler); |
943 | + } catch (ex) { |
944 | + // write a letter of complaint to microsoft.. |
945 | + } |
946 | +}; |
947 | + |
948 | +// remove event handlers (they eat memory) |
949 | +addEventHandler(window, "onunload", function() { |
950 | + var handler; |
951 | + while (handler = eventHandlers.pop()) { |
952 | + removeEventHandler(handler[0], handler[1], handler[2]); |
953 | + } |
954 | +}); |
955 | + |
956 | +function register(handler, element, condition) { // -@DRE |
957 | + //var set = handler[element.uniqueID]; |
958 | + if (!handler.elements) handler.elements = {}; |
959 | + if (condition) handler.elements[element.uniqueID] = element; |
960 | + else delete handler.elements[element.uniqueID]; |
961 | + //return !set && condition; |
962 | + return condition; |
963 | +}; |
964 | + |
965 | +addEventHandler(window, "onbeforeprint", function() { |
966 | + if (!IE7.CSS.print) new StyleSheet("print"); |
967 | + IE7.CSS.print.recalc(); |
968 | +}); |
969 | + |
970 | +// ----------------------------------------------------------------------- |
971 | +// pixel conversion |
972 | +// ----------------------------------------------------------------------- |
973 | + |
974 | +// this is handy because it means that web developers can mix and match |
975 | +// measurement units in their style sheets. it is not uncommon to |
976 | +// express something like padding in "em" units whilst border thickness |
977 | +// is most often expressed in pixels. |
978 | + |
979 | +var PIXEL = /^\d+(px)?$/i; |
980 | +var PERCENT = /^\d+%$/; |
981 | +var getPixelValue = function(element, value) { |
982 | + if (PIXEL.test(value)) return parseInt(value); |
983 | + var style = element.style.left; |
984 | + var runtimeStyle = element.runtimeStyle.left; |
985 | + element.runtimeStyle.left = element.currentStyle.left; |
986 | + element.style.left = value || 0; |
987 | + value = element.style.pixelLeft; |
988 | + element.style.left = style; |
989 | + element.runtimeStyle.left = runtimeStyle; |
990 | + return value; |
991 | +}; |
992 | + |
993 | +// ----------------------------------------------------------------------- |
994 | +// generic |
995 | +// ----------------------------------------------------------------------- |
996 | + |
997 | +var $IE7 = "ie7-"; |
998 | + |
999 | +var Fix = Base.extend({ |
1000 | + constructor: function() { |
1001 | + this.fixes = []; |
1002 | + this.recalcs = []; |
1003 | + }, |
1004 | + init: Undefined |
1005 | +}); |
1006 | + |
1007 | +// a store for functions that will be called when refreshing IE7 |
1008 | +var recalcs = []; |
1009 | +function addRecalc(recalc) { |
1010 | + recalcs.push(recalc); |
1011 | +}; |
1012 | + |
1013 | +IE7.recalc = function() { |
1014 | + IE7.HTML.recalc(); |
1015 | + // re-apply style sheet rules (re-calculate ie7 classes) |
1016 | + IE7.CSS.recalc(); |
1017 | + // apply global fixes to the document |
1018 | + for (var i = 0; i < recalcs.length; i++) recalcs[i](); |
1019 | +}; |
1020 | + |
1021 | +function isFixed(element) { |
1022 | + return element.currentStyle["ie7-position"] == "fixed"; |
1023 | +}; |
1024 | + |
1025 | +// original style |
1026 | +function getDefinedStyle(element, propertyName) { |
1027 | + return element.currentStyle[$IE7 + propertyName] || element.currentStyle[propertyName]; |
1028 | +}; |
1029 | + |
1030 | +function setOverrideStyle(element, propertyName, value) { |
1031 | + if (element.currentStyle[$IE7 + propertyName] == null) { |
1032 | + element.runtimeStyle[$IE7 + propertyName] = element.currentStyle[propertyName]; |
1033 | + } |
1034 | + element.runtimeStyle[propertyName] = value; |
1035 | +}; |
1036 | + |
1037 | +// Create a temporary element which is used to inherit styles |
1038 | +// from the target element. |
1039 | +function createTempElement(tagName) { |
1040 | + var element = document.createElement(tagName || "object"); |
1041 | + element.style.cssText = "position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999"; |
1042 | + element.ie7_anon = true; |
1043 | + return element; |
1044 | +}; |
1045 | + |
1046 | + |
1047 | +// ========================================================================= |
1048 | +// ie7-css.js |
1049 | +// ========================================================================= |
1050 | + |
1051 | +var NEXT_SIBLING = "(e.nextSibling&&IE7._getElementSibling(e,'next'))", |
1052 | + PREVIOUS_SIBLING = NEXT_SIBLING.replace(/next/g, "previous"), |
1053 | + IS_ELEMENT = "e.nodeName>'@'", |
1054 | + IF_ELEMENT = "if(" + IS_ELEMENT + "){"; |
1055 | + |
1056 | +var ID_ATTRIBUTE = "(e.nodeName==='FORM'?IE7._getAttribute(e,'id'):e.id)"; |
1057 | + |
1058 | +var HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i; |
1059 | +var FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/; |
1060 | +var SPACE = /\s/; |
1061 | +var RULE = /((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g; |
1062 | +var SELECTOR = /(?:\\.|[^,\\])+/g; |
1063 | + |
1064 | +var styleSheets = document.styleSheets; |
1065 | + |
1066 | +var inheritedProperties = []; |
1067 | + |
1068 | +IE7.CSS = new (Fix.extend({ // single instance |
1069 | + parser: new Parser, |
1070 | + screen: "", |
1071 | + print: "", |
1072 | + styles: [], |
1073 | + rules: [], |
1074 | + pseudoClasses: appVersion < 7 ? "first\\-child" : "", |
1075 | + dynamicPseudoClasses: { |
1076 | + toString: function() { |
1077 | + var strings = []; |
1078 | + for (var pseudoClass in this) strings.push(pseudoClass); |
1079 | + return strings.join("|"); |
1080 | + } |
1081 | + }, |
1082 | + |
1083 | + init: function() { |
1084 | + var NONE = "^\x01$"; |
1085 | + var CLASS = "\\[class=?[^\\]]*\\]"; |
1086 | + var pseudoClasses = []; |
1087 | + if (this.pseudoClasses) pseudoClasses.push(this.pseudoClasses); |
1088 | + var dynamicPseudoClasses = this.dynamicPseudoClasses.toString(); |
1089 | + if (dynamicPseudoClasses) pseudoClasses.push(dynamicPseudoClasses); |
1090 | + pseudoClasses = pseudoClasses.join("|"); |
1091 | + var unknown = appVersion < 7 ? ["[>+~\\[(]|([:.])[\\w-]+\\1"] : [CLASS]; |
1092 | + if (pseudoClasses) unknown.push(":(" + pseudoClasses + ")"); |
1093 | + this.UNKNOWN = new RegExp(unknown.join("|") || NONE, "i"); |
1094 | + var complex = appVersion < 7 ? ["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"] : [CLASS]; |
1095 | + var complexRule = complex.concat(); |
1096 | + if (pseudoClasses) complexRule.push(":(" + pseudoClasses + ")"); |
1097 | + Rule.COMPLEX = new RegExp(complexRule.join("|") || NONE, "ig"); |
1098 | + if (this.pseudoClasses) complex.push(":(" + this.pseudoClasses + ")"); |
1099 | + DynamicRule.COMPLEX = new RegExp(complex.join("|") || NONE, "i"); |
1100 | + dynamicPseudoClasses = "not\\(:" + dynamicPseudoClasses.split("|").join("\\)|not\\(:") + "\\)|" + dynamicPseudoClasses; |
1101 | + DynamicRule.MATCH = new RegExp(dynamicPseudoClasses ? "(.*?):(" + dynamicPseudoClasses + ")(.*)" : NONE, "i"); |
1102 | + |
1103 | + this.createStyleSheet(); |
1104 | + this.refresh(); |
1105 | + }, |
1106 | + |
1107 | + addEventHandler: function() { |
1108 | + addEventHandler.apply(null, arguments); |
1109 | + }, |
1110 | + |
1111 | + addFix: function(expression, replacement) { |
1112 | + this.parser.add(expression, replacement); |
1113 | + }, |
1114 | + |
1115 | + addRecalc: function(propertyName, test, handler, replacement) { |
1116 | + // recalcs occur whenever the document is refreshed using document.recalc() |
1117 | + propertyName = propertyName.source || propertyName; |
1118 | + test = new RegExp("([{;\\s])" + propertyName + "\\s*:\\s*" + test + "[^;}]*"); |
1119 | + var id = this.recalcs.length; |
1120 | + if (typeof replacement == "string") replacement = propertyName + ":" + replacement; |
1121 | + this.addFix(test, function(match) { |
1122 | + if (typeof replacement == "function") replacement = replacement(match); |
1123 | + return (replacement ? replacement : match) + ";ie7-" + match.slice(1) + ";ie7_recalc" + id + ":1"; |
1124 | + }); |
1125 | + this.recalcs.push(arguments); |
1126 | + return id; |
1127 | + }, |
1128 | + |
1129 | + apply: function() { |
1130 | + this.getInlineCSS(); |
1131 | + new StyleSheet("screen"); |
1132 | + this.trash(); |
1133 | + }, |
1134 | + |
1135 | + createStyleSheet: function() { |
1136 | + // create the IE7 style sheet |
1137 | + document.getElementsByTagName("head")[0].appendChild(document.createElement("style")); |
1138 | + this.styleSheet = styleSheets[styleSheets.length - 1]; |
1139 | + // flag it so we can ignore it during parsing |
1140 | + this.styleSheet.ie7 = true; |
1141 | + this.styleSheet.owningElement.ie7 = true; |
1142 | + this.styleSheet.cssText = HEADER; |
1143 | + }, |
1144 | + |
1145 | + getInlineCSS: function() {// load inline styles |
1146 | + var styleSheets = document.getElementsByTagName("style"), styleSheet; |
1147 | + for (var i = styleSheets.length - 1; styleSheet = styleSheets[i]; i--) { |
1148 | + if (!styleSheet.disabled && !styleSheet.ie7) { |
1149 | + styleSheet._cssText = styleSheet.innerHTML; |
1150 | + } |
1151 | + } |
1152 | + }, |
1153 | + |
1154 | + getText: function(styleSheet, path) { |
1155 | + // Internet Explorer will trash unknown selectors (it converts them to "UNKNOWN"). |
1156 | + // So we must reload external style sheets (internal style sheets can have their text |
1157 | + // extracted through the innerHTML property). |
1158 | + |
1159 | + // load the style sheet text from an external file |
1160 | + try { |
1161 | + var cssText = styleSheet.cssText; |
1162 | + } catch (e) { |
1163 | + cssText = ""; |
1164 | + } |
1165 | + if (httpRequest) cssText = loadFile(styleSheet.href, path) || cssText; |
1166 | + return cssText; |
1167 | + }, |
1168 | + |
1169 | + recalc: function() { |
1170 | + this.screen.recalc(); |
1171 | + // we're going to read through all style rules. |
1172 | + // certain rules have had ie7 properties added to them. |
1173 | + // e.g. p{top:0; ie7_recalc2:1; left:0} |
1174 | + // this flags a property in the rule as needing a fix. |
1175 | + // the selector text is then used to query the document. |
1176 | + // we can then loop through the results of the query |
1177 | + // and fix the elements. |
1178 | + // we ignore the IE7 rules - so count them in the header |
1179 | + var RECALCS = /ie7_recalc\d+/g; |
1180 | + var start = HEADER.match(/[{,]/g).length; |
1181 | + // only calculate screen fixes. print fixes don't show up anyway |
1182 | + var rules = this.styleSheet.rules, rule; |
1183 | + var calcs, calc, elements, element, i, j, k, id; |
1184 | + // loop through all rules |
1185 | + for (i = start; rule = rules[i]; i++) { |
1186 | + var cssText = rule.style.cssText; |
1187 | + // search for the "ie7_recalc" flag (there may be more than one) |
1188 | + if (calcs = cssText.match(RECALCS)) { |
1189 | + // use the selector text to query the document |
1190 | + elements = cssQuery(rule.selectorText); |
1191 | + // if there are matching elements then loop |
1192 | + // through the recalc functions and apply them |
1193 | + // to each element |
1194 | + if (elements.length) for (j = 0; j < calcs.length; j++) { |
1195 | + // get the matching flag (e.g. ie7_recalc3) |
1196 | + id = calcs[j]; |
1197 | + // extract the numeric id from the end of the flag |
1198 | + // and use it to index the collection of recalc |
1199 | + // functions |
1200 | + calc = IE7.CSS.recalcs[id.slice(10)][2]; |
1201 | + for (k = 0; (element = elements[k]); k++) { |
1202 | + // apply the fix |
1203 | + if (element.currentStyle[id]) calc(element, cssText); |
1204 | + } |
1205 | + } |
1206 | + } |
1207 | + } |
1208 | + }, |
1209 | + |
1210 | + refresh: function() { |
1211 | + this.styleSheet.cssText = HEADER + this.screen + this.print; |
1212 | + }, |
1213 | + |
1214 | + trash: function() { |
1215 | + // trash the old style sheets |
1216 | + for (var i = 0; i < styleSheets.length; i++) { |
1217 | + if (!styleSheets[i].ie7) { |
1218 | + try { |
1219 | + var cssText = styleSheets[i].cssText; |
1220 | + } catch (e) { |
1221 | + cssText = ""; |
1222 | + } |
1223 | + if (cssText) styleSheets[i].cssText = ""; |
1224 | + } |
1225 | + } |
1226 | + } |
1227 | +})); |
1228 | + |
1229 | +// ----------------------------------------------------------------------- |
1230 | +// IE7 StyleSheet class |
1231 | +// ----------------------------------------------------------------------- |
1232 | + |
1233 | +var StyleSheet = Base.extend({ |
1234 | + constructor: function(media) { |
1235 | + this.media = media; |
1236 | + this.load(); |
1237 | + IE7.CSS[media] = this; |
1238 | + IE7.CSS.refresh(); |
1239 | + }, |
1240 | + |
1241 | + createRule: function(selector, cssText) { |
1242 | + var match; |
1243 | + if (PseudoElement && (match = selector.match(PseudoElement.MATCH))) { |
1244 | + return new PseudoElement(match[1], match[2], cssText); |
1245 | + } else if (match = selector.match(DynamicRule.MATCH)) { |
1246 | + if (!HYPERLINK.test(match[0]) || DynamicRule.COMPLEX.test(match[0])) { |
1247 | + return new DynamicRule(selector, match[1], match[2], match[3], cssText); |
1248 | + } |
1249 | + } else { |
1250 | + return new Rule(selector, cssText); |
1251 | + } |
1252 | + return selector + " {" + cssText + "}"; |
1253 | + }, |
1254 | + |
1255 | + getText: function() { |
1256 | + // store for style sheet text |
1257 | + // parse media decalarations |
1258 | + var MEDIA = /@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi; |
1259 | + var IMPORTS = /@import[^;\n]+/gi; |
1260 | + var TRIM_IMPORTS = /@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi; |
1261 | + var URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi; |
1262 | + |
1263 | + var self = this; |
1264 | + |
1265 | + // Store loaded cssText URLs |
1266 | + var fileCache = {}; |
1267 | + |
1268 | + function getCSSText(styleSheet, path, media, level) { |
1269 | + var cssText = ""; |
1270 | + if (!level) { |
1271 | + media = toSimpleMedia(styleSheet.media); |
1272 | + level = 0; |
1273 | + } |
1274 | + if (media === "none") { |
1275 | + styleSheet.disabled = true; |
1276 | + return ""; |
1277 | + } |
1278 | + if (media === "all" || media === self.media) { |
1279 | + // IE only allows importing style sheets three levels deep. |
1280 | + // it will crash if you try to access a level below this |
1281 | + try { |
1282 | + var canAcess = !!styleSheet.cssText; |
1283 | + } catch (exe) {} |
1284 | + if (level < 3 && canAcess) { |
1285 | + var hrefs = styleSheet.cssText.match(IMPORTS); |
1286 | + // loop through imported style sheets |
1287 | + for (var i = 0, imported; i < styleSheet.imports.length; i++) { |
1288 | + var imported = styleSheet.imports[i]; |
1289 | + var href = styleSheet._href || styleSheet.href; |
1290 | + imported._href = hrefs[i].replace(TRIM_IMPORTS, ""); |
1291 | + // call this function recursively to get all imported style sheets |
1292 | + cssText += getCSSText(imported, getPath(href, path), media, level + 1); |
1293 | + } |
1294 | + } |
1295 | + // retrieve inline style or load an external style sheet |
1296 | + cssText += encode(styleSheet.href ? loadStyleSheet(styleSheet, path) : styleSheet.owningElement._cssText); |
1297 | + cssText = parseMedia(cssText, self.media); |
1298 | + } |
1299 | + return cssText; |
1300 | + }; |
1301 | + |
1302 | + // Load all style sheets in the document |
1303 | + for (var i = 0; i < styleSheets.length; i++) { |
1304 | + var styleSheet = styleSheets[i]; |
1305 | + if (!styleSheet.disabled && !styleSheet.ie7) this.cssText += getCSSText(styleSheet); |
1306 | + } |
1307 | + |
1308 | + // helper functions |
1309 | + function parseMedia(cssText, media) { |
1310 | + filterMedia.value = media; |
1311 | + return cssText.replace(MEDIA, filterMedia); |
1312 | + }; |
1313 | + |
1314 | + function filterMedia(match, media, cssText) { |
1315 | + media = toSimpleMedia(media); |
1316 | + switch (media) { |
1317 | + case "screen": |
1318 | + case "print": |
1319 | + if (media !== filterMedia.value) return ""; |
1320 | + case "all": |
1321 | + return cssText; |
1322 | + } |
1323 | + return ""; |
1324 | + }; |
1325 | + |
1326 | + function toSimpleMedia(media) { |
1327 | + if (!media) return "all"; |
1328 | + var split = media.toLowerCase().split(/\s*,\s*/); |
1329 | + media = "none"; |
1330 | + for (var i = 0; i < split.length; i++) { |
1331 | + if (split[i] === "all") return "all"; |
1332 | + if (split[i] === "screen") { |
1333 | + if (media === "print") return "all"; |
1334 | + media = "screen"; |
1335 | + } else if (split[i] === "print") { |
1336 | + if (media === "screen") return "all"; |
1337 | + media = "print"; |
1338 | + } |
1339 | + } |
1340 | + return media; |
1341 | + }; |
1342 | + |
1343 | + // Load an external style sheet |
1344 | + function loadStyleSheet(styleSheet, path) { |
1345 | + var href = styleSheet._href || styleSheet.href; |
1346 | + var url = makePath(href, path); |
1347 | + // If the style sheet has already loaded then don't reload it |
1348 | + if (fileCache[url]) return ""; |
1349 | + // Load from source |
1350 | + fileCache[url] = styleSheet.disabled ? "" : |
1351 | + fixUrls(IE7.CSS.getText(styleSheet, path), getPath(href, path)); |
1352 | + return fileCache[url]; |
1353 | + }; |
1354 | + |
1355 | + // Fix CSS paths. |
1356 | + // We're lumping all css text into one big style sheet so relative |
1357 | + // paths have to be fixed. This is necessary anyway because of other |
1358 | + // Internet Explorer bugs. |
1359 | + function fixUrls(cssText, pathname) { |
1360 | + // hack & slash |
1361 | + return cssText.replace(URL, "$1" + pathname.slice(0, pathname.lastIndexOf("/") + 1) + "$2"); |
1362 | + }; |
1363 | + }, |
1364 | + |
1365 | + load: function() { |
1366 | + this.cssText = ""; |
1367 | + this.getText(); |
1368 | + this.parse(); |
1369 | + if (inheritedProperties.length) { |
1370 | + this.cssText = parseInherited(this.cssText); |
1371 | + } |
1372 | + this.cssText = decode(this.cssText); |
1373 | + fileCache = {}; |
1374 | + }, |
1375 | + |
1376 | + parse: function() { |
1377 | + var cssText = IE7.CSS.parser.parse(this.cssText); |
1378 | + |
1379 | + var declarations = ""; |
1380 | + this.cssText = cssText.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g, function(match) { |
1381 | + declarations += match + "\n"; |
1382 | + return ""; |
1383 | + }); |
1384 | + this.declarations = decode(declarations); |
1385 | + |
1386 | + // Parse the style sheet |
1387 | + var offset = IE7.CSS.rules.length; |
1388 | + var rules = [], rule; |
1389 | + while ((rule = RULE.exec(this.cssText))) { |
1390 | + var cssText = rule[2]; |
1391 | + if (cssText) { |
1392 | + var fixDescendants = appVersion < 7 && cssText.indexOf("AlphaImageLoader") !== -1; |
1393 | + var selectors = rule[1].match(SELECTOR), selector; |
1394 | + for (var i = 0; selector = selectors[i]; i++) { |
1395 | + selector = trim(selector); |
1396 | + var isUnknown = IE7.CSS.UNKNOWN.test(selector); |
1397 | + selectors[i] = isUnknown ? this.createRule(selector, cssText) : selector + "{" + cssText + "}"; |
1398 | + if (fixDescendants) selectors[i] += this.createRule(selector + ">*", "position:relative"); |
1399 | + } |
1400 | + rules.push(selectors.join("\n")); |
1401 | + } |
1402 | + } |
1403 | + this.cssText = rules.join("\n"); |
1404 | + this.rules = IE7.CSS.rules.slice(offset); |
1405 | + }, |
1406 | + |
1407 | + recalc: function() { |
1408 | + var rule, i; |
1409 | + for (i = 0; (rule = this.rules[i]); i++) rule.recalc(); |
1410 | + }, |
1411 | + |
1412 | + toString: function() { |
1413 | + return this.declarations + "@media " + this.media + "{" + this.cssText + "}"; |
1414 | + } |
1415 | +}); |
1416 | + |
1417 | +var PseudoElement; |
1418 | + |
1419 | +// ----------------------------------------------------------------------- |
1420 | +// IE7 style rules |
1421 | +// ----------------------------------------------------------------------- |
1422 | + |
1423 | +var Rule = IE7.Rule = Base.extend({ |
1424 | + constructor: function(selector, cssText) { |
1425 | + this.id = IE7.CSS.rules.length; |
1426 | + this.className = Rule.PREFIX + this.id; |
1427 | + var pseudoElement = selector.match(FIRST_LINE_LETTER); |
1428 | + this.selector = (pseudoElement ? pseudoElement[1] : selector) || "*"; |
1429 | + this.selectorText = this.parse(this.selector) + (pseudoElement ? pseudoElement[2] : ""); |
1430 | + this.cssText = cssText; |
1431 | + this.MATCH = new RegExp("\\s" + this.className + "(\\s|$)", "g"); |
1432 | + IE7.CSS.rules.push(this); |
1433 | + this.init(); |
1434 | + }, |
1435 | + |
1436 | + init: Undefined, |
1437 | + |
1438 | + add: function(element) { |
1439 | + // allocate this class |
1440 | + element.className += " " + this.className; |
1441 | + }, |
1442 | + |
1443 | + recalc: function() { |
1444 | + // execute the underlying css query for this class |
1445 | + var match = cssQuery(this.selector); |
1446 | + // add the class name for all matching elements |
1447 | + for (var i = 0; i < match.length; i++) this.add(match[i]); |
1448 | + }, |
1449 | + |
1450 | + parse: function(selector) { |
1451 | + // attempt to preserve specificity for "loose" parsing by |
1452 | + // removing unknown tokens from a css selector but keep as |
1453 | + // much as we can.. |
1454 | + var simple = selector.replace(Rule.CHILD, " ").replace(Rule.COMPLEX, ""); |
1455 | + if (appVersion < 7) simple = simple.replace(Rule.MULTI, ""); |
1456 | + var tags = match(simple, Rule.TAGS).length - match(selector, Rule.TAGS).length; |
1457 | + var classes = match(simple, Rule.CLASSES).length - match(selector, Rule.CLASSES).length + 1; |
1458 | + while (classes > 0 && Rule.CLASS.test(simple)) { |
1459 | + simple = simple.replace(Rule.CLASS, ""); |
1460 | + classes--; |
1461 | + } |
1462 | + while (tags > 0 && Rule.TAG.test(simple)) { |
1463 | + simple = simple.replace(Rule.TAG, "$1*"); |
1464 | + tags--; |
1465 | + } |
1466 | + simple += "." + this.className; |
1467 | + classes = Math.min(classes, 2); |
1468 | + tags = Math.min(tags, 2); |
1469 | + var score = -10 * classes - tags; |
1470 | + if (score > 0) { |
1471 | + simple = simple + "," + Rule.MAP[score] + " " + simple; |
1472 | + } |
1473 | + return simple; |
1474 | + }, |
1475 | + |
1476 | + remove: function(element) { |
1477 | + // deallocate this class |
1478 | + element.className = element.className.replace(this.MATCH, "$1"); |
1479 | + }, |
1480 | + |
1481 | + toString: function() { |
1482 | + return format("%1 {%2}", this.selectorText, this.cssText); |
1483 | + } |
1484 | +}, { |
1485 | + CHILD: />/g, |
1486 | + CLASS: /\.[\w-]+/, |
1487 | + CLASSES: /[.:\[]/g, |
1488 | + MULTI: /(\.[\w-]+)+/g, |
1489 | + PREFIX: "ie7_class", |
1490 | + TAG: /^\w+|([\s>+~])\w+/, |
1491 | + TAGS: /^\w|[\s>+~]\w/g, |
1492 | + MAP: { |
1493 | + "1": "html", |
1494 | + "2": "html body", |
1495 | + "10": ".ie7_html", |
1496 | + "11": "html.ie7_html", |
1497 | + "12": "html.ie7_html body", |
1498 | + "20": ".ie7_html .ie7_body", |
1499 | + "21": "html.ie7_html .ie7_body", |
1500 | + "22": "html.ie7_html body.ie7_body" |
1501 | + } |
1502 | +}); |
1503 | + |
1504 | +// ----------------------------------------------------------------------- |
1505 | +// IE7 dynamic style |
1506 | +// ----------------------------------------------------------------------- |
1507 | + |
1508 | +// object properties: |
1509 | +// attach: the element that an event handler will be attached to |
1510 | +// target: the element that will have the IE7 class applied |
1511 | + |
1512 | +var DynamicRule = Rule.extend({ |
1513 | + // properties |
1514 | + constructor: function(selector, attach, dynamicPseudoClass, target, cssText) { |
1515 | + this.negated = dynamicPseudoClass.indexOf("not") === 0; |
1516 | + if (this.negated) dynamicPseudoClass = dynamicPseudoClass.slice(5, -1); |
1517 | + // initialise object properties |
1518 | + this.attach = attach || "*"; |
1519 | + this.dynamicPseudoClass = IE7.CSS.dynamicPseudoClasses[dynamicPseudoClass]; |
1520 | + this.target = target; |
1521 | + this.base(selector, cssText); |
1522 | + }, |
1523 | + |
1524 | + recalc: function() { |
1525 | + // execute the underlying css query for this class |
1526 | + var attaches = cssQuery(this.attach), attach; |
1527 | + // process results |
1528 | + for (var i = 0; attach = attaches[i]; i++) { |
1529 | + // retrieve the event handler's target element(s) |
1530 | + var target = this.target ? cssQuery(this.target, attach) : [attach]; |
1531 | + // attach event handlers for dynamic pseudo-classes |
1532 | + if (target.length) this.dynamicPseudoClass.apply(attach, target, this); |
1533 | + } |
1534 | + } |
1535 | +}); |
1536 | + |
1537 | +// ----------------------------------------------------------------------- |
1538 | +// IE7 dynamic pseudo-classes |
1539 | +// ----------------------------------------------------------------------- |
1540 | + |
1541 | +var DynamicPseudoClass = Base.extend({ |
1542 | + constructor: function(name, apply) { |
1543 | + this.name = name; |
1544 | + this.apply = apply; |
1545 | + this.instances = {}; |
1546 | + IE7.CSS.dynamicPseudoClasses[name] = this; |
1547 | + }, |
1548 | + |
1549 | + register: function(instance, negated) { |
1550 | + // an "instance" is actually an Arguments object |
1551 | + var _class = instance[2]; |
1552 | + if (!negated && _class.negated) { |
1553 | + this.unregister(instance, true); |
1554 | + } else { |
1555 | + instance.id = _class.id + instance[0].uniqueID; |
1556 | + if (!this.instances[instance.id]) { |
1557 | + var target = instance[1], j; |
1558 | + for (j = 0; j < target.length; j++) _class.add(target[j]); |
1559 | + this.instances[instance.id] = instance; |
1560 | + } |
1561 | + } |
1562 | + }, |
1563 | + |
1564 | + unregister: function(instance, negated) { |
1565 | + var _class = instance[2]; |
1566 | + if (!negated && _class.negated) { |
1567 | + this.register(instance, true); |
1568 | + } else { |
1569 | + if (this.instances[instance.id]) { |
1570 | + var target = instance[1], j; |
1571 | + for (j = 0; j < target.length; j++) _class.remove(target[j]); |
1572 | + delete this.instances[instance.id]; |
1573 | + } |
1574 | + } |
1575 | + } |
1576 | +}); |
1577 | + |
1578 | +// ----------------------------------------------------------------------- |
1579 | +// dynamic pseudo-classes |
1580 | +// ----------------------------------------------------------------------- |
1581 | + |
1582 | +var Hover = new DynamicPseudoClass("hover", function(element) { |
1583 | + var instance = arguments; |
1584 | + IE7.CSS.addEventHandler(element, "onmouseenter", function() { |
1585 | + Hover.register(instance); |
1586 | + }); |
1587 | + IE7.CSS.addEventHandler(element, "onmouseleave", function() { |
1588 | + Hover.unregister(instance); |
1589 | + }); |
1590 | +}); |
1591 | + |
1592 | +// globally trap the mouseup event (thanks Martijn!) |
1593 | +addEventHandler(document, "onmouseup", function() { |
1594 | + var instances = Hover.instances; |
1595 | + for (var i in instances) |
1596 | + if (!instances[i][0].contains(event.srcElement)) |
1597 | + Hover.unregister(instances[i]); |
1598 | +}); |
1599 | + |
1600 | +var ATTR = { |
1601 | + "=": "%1==='%2'", // "[@%1='%2']" |
1602 | + "~=": "(' '+%1+' ').indexOf(' %2 ')!==-1", // "[contains(concat(' ',@%1,' '),' %2 ')]", |
1603 | + "|=": "%1==='%2'||%1.indexOf('%2-')===0", // "[@%1='%2' or starts-with(@%1,'%2-')]", |
1604 | + "^=": "%1.indexOf('%2')===0", // "[starts-with(@%1,'%2')]", |
1605 | + "$=": "%1.slice(-'%2'.length)==='%2'", // "[ends-with(@%1,'%2')]", |
1606 | + "*=": "%1.indexOf('%2')!==-1" // "[contains(@%1,'%2')]" |
1607 | +}; |
1608 | +ATTR[""] = "%1!=null"; // "[@%1]" |
1609 | + |
1610 | +var FILTER = { |
1611 | + "<#attr>": function(match, name, operator, value) { |
1612 | + var attr = "IE7._getAttribute(e,'" + name + "')"; |
1613 | + value = getString(value); |
1614 | + if (operator.length > 1) { |
1615 | + if (!value || operator === "~=" && SPACE.test(value)) { |
1616 | + return "false&&"; |
1617 | + } |
1618 | + attr = "(" + attr + "||'')"; |
1619 | + } |
1620 | + return "(" + format(ATTR[operator], attr, value) + ")&&"; |
1621 | + }, |
1622 | + |
1623 | + "<#id>": ID_ATTRIBUTE + "==='$1'&&", |
1624 | + |
1625 | + "<#class>": "e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&", |
1626 | + |
1627 | + // PSEDUO |
1628 | + ":first-child": "!" + PREVIOUS_SIBLING + "&&", |
1629 | + ":link": "e.currentStyle['ie7-link']=='link'&&", |
1630 | + ":visited": "e.currentStyle['ie7-link']=='visited'&&" |
1631 | +}; |
1632 | + |
1633 | +// ========================================================================= |
1634 | +// ie7-html.js |
1635 | +// ========================================================================= |
1636 | + |
1637 | +// default font-sizes |
1638 | +//HEADER += "h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}"; |
1639 | + |
1640 | +IE7.HTML = new (Fix.extend({ // single instance |
1641 | + fixed: {}, |
1642 | + |
1643 | + init: Undefined, |
1644 | + |
1645 | + addFix: function() { |
1646 | + // fixes are a one-off, they are applied when the document is loaded |
1647 | + this.fixes.push(arguments); |
1648 | + }, |
1649 | + |
1650 | + apply: function() { |
1651 | + for (var i = 0; i < this.fixes.length; i++) { |
1652 | + var match = cssQuery(this.fixes[i][0]); |
1653 | + var fix = this.fixes[i][1]; |
1654 | + for (var j = 0; j < match.length; j++) fix(match[j]); |
1655 | + } |
1656 | + }, |
1657 | + |
1658 | + addRecalc: function() { |
1659 | + // recalcs occur whenever the document is refreshed using document.recalc() |
1660 | + this.recalcs.push(arguments); |
1661 | + }, |
1662 | + |
1663 | + recalc: function() { |
1664 | + // loop through the fixes |
1665 | + for (var i = 0; i < this.recalcs.length; i++) { |
1666 | + var match = cssQuery(this.recalcs[i][0]); |
1667 | + var recalc = this.recalcs[i][1], element; |
1668 | + var key = Math.pow(2, i); |
1669 | + for (var j = 0; (element = match[j]); j++) { |
1670 | + var uniqueID = element.uniqueID; |
1671 | + if ((this.fixed[uniqueID] & key) === 0) { |
1672 | + element = recalc(element) || element; |
1673 | + this.fixed[uniqueID] |= key; |
1674 | + } |
1675 | + } |
1676 | + } |
1677 | + } |
1678 | +})); |
1679 | + |
1680 | +if (appVersion < 7) { |
1681 | + // provide support for the <abbr> tag. |
1682 | + document.createElement("abbr"); |
1683 | + |
1684 | + // bind to the first child control |
1685 | + IE7.HTML.addRecalc("label", function(label) { |
1686 | + if (!label.htmlFor) { |
1687 | + var firstChildControl = cssQuery("input,textarea", label, true); |
1688 | + if (firstChildControl) { |
1689 | + addEventHandler(label, "onclick", function() { |
1690 | + firstChildControl.click(); |
1691 | + }); |
1692 | + } |
1693 | + } |
1694 | + }); |
1695 | +} |
1696 | + |
1697 | +// ========================================================================= |
1698 | +// ie7-layout.js |
1699 | +// ========================================================================= |
1700 | + |
1701 | +var NUMERIC = "[.\\d]"; |
1702 | + |
1703 | +(function() { |
1704 | + var layout = IE7.Layout = {}; |
1705 | + |
1706 | + // big, ugly box-model hack + min/max stuff |
1707 | + |
1708 | + // #tantek > #erik > #dean { voice-family: hacker; } |
1709 | + |
1710 | + // ----------------------------------------------------------------------- |
1711 | + // "layout" |
1712 | + // ----------------------------------------------------------------------- |
1713 | + |
1714 | + HEADER += "*{boxSizing:content-box}"; |
1715 | + |
1716 | + // give an element "layout" |
1717 | + layout.boxSizing = function(element) { |
1718 | + if (!element.currentStyle.hasLayout) { |
1719 | + //# element.runtimeStyle.fixedHeight = |
1720 | + element.style.height = "0cm"; |
1721 | + if (element.currentStyle.verticalAlign === "auto") |
1722 | + element.runtimeStyle.verticalAlign = "top"; |
1723 | + // when an element acquires "layout", margins no longer collapse correctly |
1724 | + collapseMargins(element); |
1725 | + } |
1726 | + }; |
1727 | + |
1728 | + // ----------------------------------------------------------------------- |
1729 | + // Margin Collapse |
1730 | + // ----------------------------------------------------------------------- |
1731 | + |
1732 | + function collapseMargins(element) { |
1733 | + if (element != viewport && element.currentStyle.position !== "absolute") { |
1734 | + collapseMargin(element, "marginTop"); |
1735 | + collapseMargin(element, "marginBottom"); |
1736 | + } |
1737 | + }; |
1738 | + |
1739 | + function collapseMargin(element, type) { |
1740 | + if (!element.runtimeStyle[type]) { |
1741 | + var parentElement = element.parentElement; |
1742 | + var isTopMargin = type === "marginTop"; |
1743 | + if (parentElement && parentElement.currentStyle.hasLayout && !IE7._getElementSibling(element, isTopMargin ? "previous" : "next")) return; |
1744 | + var child = element[isTopMargin ? "firstChild" : "lastChild"]; |
1745 | + if (child && child.nodeName < "@") child = IE7._getElementSibling(child, isTopMargin ? "next" : "previous"); |
1746 | + if (child && child.currentStyle.styleFloat === "none" && child.currentStyle.hasLayout) { |
1747 | + collapseMargin(child, type); |
1748 | + margin = _getMargin(element, element.currentStyle[type]); |
1749 | + childMargin = _getMargin(child, child.currentStyle[type]); |
1750 | + if (margin < 0 || childMargin < 0) { |
1751 | + element.runtimeStyle[type] = margin + childMargin; |
1752 | + } else { |
1753 | + element.runtimeStyle[type] = Math.max(childMargin, margin); |
1754 | + } |
1755 | + child.runtimeStyle[type] = "0px"; |
1756 | + } |
1757 | + } |
1758 | + }; |
1759 | + |
1760 | + function _getMargin(element, value) { |
1761 | + return value === "auto" ? 0 : getPixelValue(element, value); |
1762 | + }; |
1763 | + |
1764 | + // ----------------------------------------------------------------------- |
1765 | + // box-model |
1766 | + // ----------------------------------------------------------------------- |
1767 | + |
1768 | + // constants |
1769 | + var UNIT = /^[.\d][\w]*$/, AUTO = /^(auto|0cm)$/; |
1770 | + |
1771 | + var apply = {}; |
1772 | + layout.borderBox = function(element){ |
1773 | + apply.Width(element); |
1774 | + apply.Height(element); |
1775 | + }; |
1776 | + |
1777 | + var _fixWidth = function(HEIGHT) { |
1778 | + apply.Width = function(element) { |
1779 | + if (!PERCENT.test(element.currentStyle.width)) _fixWidth(element); |
1780 | + if (HEIGHT) collapseMargins(element); |
1781 | + }; |
1782 | + |
1783 | + function _fixWidth(element, value) { |
1784 | + if (!element.runtimeStyle.fixedWidth) { |
1785 | + if (!value) value = element.currentStyle.width; |
1786 | + element.runtimeStyle.fixedWidth = UNIT.test(value) ? Math.max(0, getFixedWidth(element, value)) + "px" : value; |
1787 | + setOverrideStyle(element, "width", element.runtimeStyle.fixedWidth); |
1788 | + } |
1789 | + }; |
1790 | + |
1791 | + function layoutWidth(element) { |
1792 | + if (!isFixed(element)) { |
1793 | + var layoutParent = element.offsetParent; |
1794 | + while (layoutParent && !layoutParent.currentStyle.hasLayout) layoutParent = layoutParent.offsetParent; |
1795 | + } |
1796 | + return (layoutParent || viewport).clientWidth; |
1797 | + }; |
1798 | + |
1799 | + function getPixelWidth(element, value) { |
1800 | + if (PERCENT.test(value)) return parseInt(parseFloat(value) / 100 * layoutWidth(element)); |
1801 | + return getPixelValue(element, value); |
1802 | + }; |
1803 | + |
1804 | + var getFixedWidth = function(element, value) { |
1805 | + var borderBox = element.currentStyle["ie7-box-sizing"] === "border-box"; |
1806 | + var adjustment = 0; |
1807 | + if (MSIE5 && !borderBox) |
1808 | + adjustment += getBorderWidth(element) + getWidth(element, "padding"); |
1809 | + else if (!MSIE5 && borderBox) |
1810 | + adjustment -= getBorderWidth(element) + getWidth(element, "padding"); |
1811 | + return getPixelWidth(element, value) + adjustment; |
1812 | + }; |
1813 | + |
1814 | + // easy way to get border thickness for elements with "layout" |
1815 | + function getBorderWidth(element) { |
1816 | + return element.offsetWidth - element.clientWidth; |
1817 | + }; |
1818 | + |
1819 | + // have to do some pixel conversion to get padding/margin thickness :-( |
1820 | + function getWidth(element, type) { |
1821 | + return getPixelWidth(element, element.currentStyle[type + "Left"]) + getPixelWidth(element, element.currentStyle[type + "Right"]); |
1822 | + }; |
1823 | + |
1824 | + // ----------------------------------------------------------------------- |
1825 | + // min/max |
1826 | + // ----------------------------------------------------------------------- |
1827 | + |
1828 | + HEADER += "*{minWidth:none;maxWidth:none;min-width:none;max-width:none}"; |
1829 | + |
1830 | + // handle min-width property |
1831 | + layout.minWidth = function(element) { |
1832 | + // IE6 supports min-height so we frig it here |
1833 | + //#if (element.currentStyle.minHeight === "auto") element.runtimeStyle.minHeight = 0; |
1834 | + if (element.currentStyle["min-width"] != null) { |
1835 | + element.style.minWidth = element.currentStyle["min-width"]; |
1836 | + } |
1837 | + if (register(arguments.callee, element, element.currentStyle.minWidth !== "none")) { |
1838 | + layout.boxSizing(element); |
1839 | + _fixWidth(element); |
1840 | + resizeWidth(element); |
1841 | + } |
1842 | + }; |
1843 | + |
1844 | + // clone the minWidth function to make a maxWidth function |
1845 | + eval("IE7.Layout.maxWidth=" + String(layout.minWidth).replace(/min/g, "max")); |
1846 | + |
1847 | + // apply min/max restrictions |
1848 | + function resizeWidth(element) { |
1849 | + // check boundaries |
1850 | + if (element == document.body) { |
1851 | + var width = element.clientWidth; |
1852 | + } else { |
1853 | + var rect = element.getBoundingClientRect(); |
1854 | + width = rect.right - rect.left; |
1855 | + } |
1856 | + if (element.currentStyle.minWidth !== "none" && width < getFixedWidth(element, element.currentStyle.minWidth)) { |
1857 | + element.runtimeStyle.width = element.currentStyle.minWidth; |
1858 | + } else if (element.currentStyle.maxWidth !== "none" && width >= getFixedWidth(element, element.currentStyle.maxWidth)) { |
1859 | + element.runtimeStyle.width = element.currentStyle.maxWidth; |
1860 | + } else { |
1861 | + element.runtimeStyle.width = element.runtimeStyle.fixedWidth; |
1862 | + } |
1863 | + }; |
1864 | + |
1865 | + // ----------------------------------------------------------------------- |
1866 | + // right/bottom |
1867 | + // ----------------------------------------------------------------------- |
1868 | + |
1869 | + function fixRight(element) { |
1870 | + if (register(fixRight, element, /^(fixed|absolute)$/.test(element.currentStyle.position) && |
1871 | + getDefinedStyle(element, "left") !== "auto" && |
1872 | + getDefinedStyle(element, "right") !== "auto" && |
1873 | + AUTO.test(getDefinedStyle(element, "width")))) { |
1874 | + resizeRight(element); |
1875 | + layout.boxSizing(element); |
1876 | + } |
1877 | + }; |
1878 | + layout.fixRight = fixRight; |
1879 | + |
1880 | + function resizeRight(element) { |
1881 | + var left = getPixelWidth(element, element.runtimeStyle._left || element.currentStyle.left); |
1882 | + var width = layoutWidth(element) - getPixelWidth(element, element.currentStyle.right) - left - getWidth(element, "margin"); |
1883 | + if (parseInt(element.runtimeStyle.width) === width) return; |
1884 | + element.runtimeStyle.width = ""; |
1885 | + if (isFixed(element) || HEIGHT || element.offsetWidth < width) { |
1886 | + if (!MSIE5) width -= getBorderWidth(element) + getWidth(element, "padding"); |
1887 | + if (width < 0) width = 0; |
1888 | + element.runtimeStyle.fixedWidth = width; |
1889 | + setOverrideStyle(element, "width", width); |
1890 | + } |
1891 | + }; |
1892 | + |
1893 | + // ----------------------------------------------------------------------- |
1894 | + // window.onresize |
1895 | + // ----------------------------------------------------------------------- |
1896 | + |
1897 | + // handle window resize |
1898 | + var clientWidth = 0; |
1899 | + addResize(function() { |
1900 | + if (!viewport) return; |
1901 | + var i, wider = (clientWidth < viewport.clientWidth); |
1902 | + clientWidth = viewport.clientWidth; |
1903 | + // resize elements with "min-width" set |
1904 | + var elements = layout.minWidth.elements; |
1905 | + for (i in elements) { |
1906 | + var element = elements[i]; |
1907 | + var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.minWidth)); |
1908 | + if (wider && fixedWidth) element.runtimeStyle.width = ""; |
1909 | + if (wider == fixedWidth) resizeWidth(element); |
1910 | + } |
1911 | + // resize elements with "max-width" set |
1912 | + var elements = layout.maxWidth.elements; |
1913 | + for (i in elements) { |
1914 | + var element = elements[i]; |
1915 | + var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.maxWidth)); |
1916 | + if (!wider && fixedWidth) element.runtimeStyle.width = ""; |
1917 | + if (wider !== fixedWidth) resizeWidth(element); |
1918 | + } |
1919 | + // resize elements with "right" set |
1920 | + for (i in fixRight.elements) resizeRight(fixRight.elements[i]); |
1921 | + }); |
1922 | + |
1923 | + // ----------------------------------------------------------------------- |
1924 | + // fix CSS |
1925 | + // ----------------------------------------------------------------------- |
1926 | + if (MSIE5) { |
1927 | + IE7.CSS.addRecalc("width", NUMERIC, apply.Width); |
1928 | + } |
1929 | + if (appVersion < 7) { |
1930 | + IE7.CSS.addRecalc("max-width", NUMERIC, layout.maxWidth); |
1931 | + IE7.CSS.addRecalc("right", NUMERIC, fixRight); |
1932 | + } else if (appVersion == 7) { |
1933 | + if (HEIGHT) IE7.CSS.addRecalc("height", "[\\d.]+%", function(element) { |
1934 | + element.runtimeStyle.pixelHeight = parseInt(layoutWidth(element) * element.currentStyle["ie7-height"].slice(0, -1) / 100); |
1935 | + }); |
1936 | + } |
1937 | + }; |
1938 | + |
1939 | + eval("var _fixHeight=" + rotate(_fixWidth)); |
1940 | + |
1941 | + // apply box-model + min/max fixes |
1942 | + _fixWidth(); |
1943 | + _fixHeight(true); |
1944 | + |
1945 | + if (appVersion < 7) { |
1946 | + IE7.CSS.addRecalc("min-width", NUMERIC, layout.minWidth); |
1947 | + IE7.CSS.addFix(/\bmin-height\s*/, "height"); |
1948 | + } |
1949 | +})(); |
1950 | + |
1951 | +// ========================================================================= |
1952 | +// ie7-graphics.js |
1953 | +// ========================================================================= |
1954 | + |
1955 | +// a small transparent image used as a placeholder |
1956 | +var BLANK_GIF = makePath("blank.gif", path); |
1957 | + |
1958 | +var ALPHA_IMAGE_LOADER = "DXImageTransform.Microsoft.AlphaImageLoader"; |
1959 | +var PNG_FILTER = "progid:" + ALPHA_IMAGE_LOADER + "(src='%1',sizingMethod='%2')"; |
1960 | + |
1961 | +// regular expression version of the above |
1962 | +var PNG; |
1963 | + |
1964 | +var filtered = []; |
1965 | + |
1966 | +function fixImage(element) { |
1967 | + if (PNG.test(element.src)) { |
1968 | + // we have to preserve width and height |
1969 | + var image = new Image(element.width, element.height); |
1970 | + image.onload = function() { |
1971 | + element.width = image.width; |
1972 | + element.height = image.height; |
1973 | + image = null; |
1974 | + }; |
1975 | + image.src = element.src; |
1976 | + // store the original url (we'll put it back when it's printed) |
1977 | + element.pngSrc = element.src; |
1978 | + // add the AlphaImageLoader thingy |
1979 | + addFilter(element); |
1980 | + } |
1981 | +}; |
1982 | + |
1983 | +if (appVersion < 7) { |
1984 | + // ** IE7 VARIABLE |
1985 | + // e.g. apply the hack to all files ending in ".png" |
1986 | + // IE7_PNG_SUFFIX = ".png"; |
1987 | + // You can also set it to a RegExp |
1988 | + // IE7_PNG_SUFFIX = /\d+\.png$/; |
1989 | + |
1990 | + // replace background(-image): url(..) .. with background(-image): .. ;filter: ..; |
1991 | + IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/, function(match, $1, $2, url, $4) { |
1992 | + url = getString(url); |
1993 | + return PNG.test(url) ? "filter:" + format(PNG_FILTER, url, $4.indexOf("no-repeat") === -1 ? "scale" : "crop") + |
1994 | + ";zoom:1;background" + ($1||"") + ":" + ($2||"") + "none" + ($4||"") : match; |
1995 | + }); |
1996 | + |
1997 | + // list-style-image |
1998 | + IE7.CSS.addRecalc(/list\-style(\-image)?/, "[^};]*url", function(element) { |
1999 | + var url = element.currentStyle.listStyleImage.slice(5, -2); |
2000 | + if (PNG.test(url)) { |
2001 | + if (element.nodeName === "LI") { |
2002 | + fixListStyleImage(element, url) |
2003 | + } else if (element.nodeName === "UL") { |
2004 | + for (var i = 0, li; li = element.childNodes[i]; i++) { |
2005 | + if (li.nodeName === "LI") fixListStyleImage(li, url); |
2006 | + } |
2007 | + } |
2008 | + } |
2009 | + }); |
2010 | + |
2011 | + function fixListStyleImage(element, src) { |
2012 | + var style = element.runtimeStyle; |
2013 | + var originalHeight = element.offsetHeight; |
2014 | + var image = new Image; |
2015 | + image.onload = function() { |
2016 | + var paddingLeft = element.currentStyle.paddingLeft; |
2017 | + paddingLeft = paddingLeft === "0px" ? 0 : getPixelValue(element, paddingLeft); |
2018 | + style.paddingLeft = (paddingLeft + this.width) + "px"; |
2019 | + style.marginLeft = -this.width + "px"; |
2020 | + style.listStyleType = "none"; |
2021 | + style.listStyleImage = "none"; |
2022 | + style.paddingTop = Math.max(originalHeight - element.offsetHeight, 0) + "px"; |
2023 | + addFilter(element, "crop", src); |
2024 | + element.style.zoom = "100%"; |
2025 | + }; |
2026 | + image.src = src; |
2027 | + }; |
2028 | + |
2029 | + // ----------------------------------------------------------------------- |
2030 | + // fix PNG transparency (HTML images) |
2031 | + // ----------------------------------------------------------------------- |
2032 | + |
2033 | + IE7.HTML.addRecalc("img,input", function(element) { |
2034 | + if (element.nodeName === "INPUT" && element.type !== "image") return; |
2035 | + fixImage(element); |
2036 | + addEventHandler(element, "onpropertychange", function() { |
2037 | + if (!printing && event.propertyName === "src" && |
2038 | + element.src.indexOf(BLANK_GIF) === -1) fixImage(element); |
2039 | + }); |
2040 | + }); |
2041 | + |
2042 | + // assume that background images should not be printed |
2043 | + // (if they are not transparent then they'll just obscure content) |
2044 | + // but we'll put foreground images back... |
2045 | + var printing = false; |
2046 | + addEventHandler(window, "onbeforeprint", function() { |
2047 | + printing = true; |
2048 | + for (var i = 0; i < filtered.length; i++) removeFilter(filtered[i]); |
2049 | + }); |
2050 | + addEventHandler(window, "onafterprint", function() { |
2051 | + for (var i = 0; i < filtered.length; i++) addFilter(filtered[i]); |
2052 | + printing = false; |
2053 | + }); |
2054 | +} |
2055 | + |
2056 | +// apply a filter |
2057 | +function addFilter(element, sizingMethod, src) { |
2058 | + var filter = element.filters[ALPHA_IMAGE_LOADER]; |
2059 | + if (filter) { |
2060 | + filter.src = src || element.src; |
2061 | + filter.enabled = true; |
2062 | + } else { |
2063 | + element.runtimeStyle.filter = format(PNG_FILTER, src || element.src, sizingMethod || "scale"); |
2064 | + filtered.push(element); |
2065 | + } |
2066 | + // remove the real image |
2067 | + element.src = BLANK_GIF; |
2068 | +}; |
2069 | + |
2070 | +function removeFilter(element) { |
2071 | + element.src = element.pngSrc; |
2072 | + element.filters[ALPHA_IMAGE_LOADER].enabled = false; |
2073 | +}; |
2074 | + |
2075 | +// ========================================================================= |
2076 | +// ie7-fixed.js |
2077 | +// ========================================================================= |
2078 | + |
2079 | +(function() { |
2080 | + if (appVersion >= 7) return; |
2081 | + |
2082 | + // some things to consider for this hack. |
2083 | + // the document body requires a fixed background. even if |
2084 | + // it is just a blank image. |
2085 | + // you have to use setExpression instead of onscroll, this |
2086 | + // together with a fixed body background helps avoid the |
2087 | + // annoying screen flicker of other solutions. |
2088 | + |
2089 | + IE7.CSS.addRecalc("position", "fixed", _positionFixed, "absolute"); |
2090 | + IE7.CSS.addRecalc("background(-attachment)?", "[^};]*fixed", _backgroundFixed); |
2091 | + |
2092 | + // scrolling is relative to the documentElement (HTML tag) when in |
2093 | + // standards mode, otherwise it's relative to the document body |
2094 | + var $viewport = MSIE5 ? "body" : "documentElement"; |
2095 | + |
2096 | + function _fixBackground() { |
2097 | + // this is required by both position:fixed and background-attachment:fixed. |
2098 | + // it is necessary for the document to also have a fixed background image. |
2099 | + // we can fake this with a blank image if necessary |
2100 | + if (body.currentStyle.backgroundAttachment !== "fixed") { |
2101 | + if (body.currentStyle.backgroundImage === "none") { |
2102 | + body.runtimeStyle.backgroundRepeat = "no-repeat"; |
2103 | + body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // dummy |
2104 | + } |
2105 | + body.runtimeStyle.backgroundAttachment = "fixed"; |
2106 | + } |
2107 | + _fixBackground = Undefined; |
2108 | + }; |
2109 | + |
2110 | + var _tmp = createTempElement("img"); |
2111 | + |
2112 | + function _isFixed(element) { |
2113 | + return element ? isFixed(element) || _isFixed(element.parentElement) : false; |
2114 | + }; |
2115 | + |
2116 | + function _setExpression(element, propertyName, expression) { |
2117 | + setTimeout("document.all." + element.uniqueID + ".runtimeStyle.setExpression('" + propertyName + "','" + expression + "')", 0); |
2118 | + }; |
2119 | + |
2120 | + // ----------------------------------------------------------------------- |
2121 | + // backgroundAttachment: fixed |
2122 | + // ----------------------------------------------------------------------- |
2123 | + |
2124 | + function _backgroundFixed(element) { |
2125 | + if (register(_backgroundFixed, element, element.currentStyle.backgroundAttachment === "fixed" && !element.contains(body))) { |
2126 | + _fixBackground(); |
2127 | + util.bgLeft(element); |
2128 | + util.bgTop(element); |
2129 | + _backgroundPosition(element); |
2130 | + } |
2131 | + }; |
2132 | + |
2133 | + function _backgroundPosition(element) { |
2134 | + _tmp.src = element.currentStyle.backgroundImage.slice(5, -2); |
2135 | + var parentElement = element.canHaveChildren ? element : element.parentElement; |
2136 | + parentElement.appendChild(_tmp); |
2137 | + util.setOffsetLeft(element); |
2138 | + util.setOffsetTop(element); |
2139 | + parentElement.removeChild(_tmp); |
2140 | + }; |
2141 | + |
2142 | + // ----------------------------------------------------------------------- |
2143 | + // position: fixed |
2144 | + // ----------------------------------------------------------------------- |
2145 | + |
2146 | + function _positionFixed(element) { |
2147 | + if (register(_positionFixed, element, isFixed(element))) { |
2148 | + setOverrideStyle(element, "position", "absolute"); |
2149 | + setOverrideStyle(element, "left", element.currentStyle.left); |
2150 | + setOverrideStyle(element, "top", element.currentStyle.top); |
2151 | + _fixBackground(); |
2152 | + IE7.Layout.fixRight(element); |
2153 | + //IE7.Layout.fixBottom(element); |
2154 | + _foregroundPosition(element); |
2155 | + } |
2156 | + }; |
2157 | + |
2158 | + function _foregroundPosition(element, recalc) { |
2159 | + document.body.getBoundingClientRect(); // force a reflow |
2160 | + util.positionTop(element, recalc); |
2161 | + util.positionLeft(element, recalc, true); |
2162 | + if (!element.runtimeStyle.autoLeft && element.currentStyle.marginLeft === "auto" && |
2163 | + element.currentStyle.right !== "auto") { |
2164 | + var left = viewport.clientWidth - util.getPixelWidth(element, element.currentStyle.right) - |
2165 | + util.getPixelWidth(element, element.runtimeStyle._left) - element.clientWidth; |
2166 | + if (element.currentStyle.marginRight === "auto") left = parseInt(left / 2); |
2167 | + if (_isFixed(element.offsetParent)) element.runtimeStyle.pixelLeft += left; |
2168 | + else element.runtimeStyle.shiftLeft = left; |
2169 | + } |
2170 | + if (!element.runtimeStyle.fixedWidth) util.clipWidth(element); |
2171 | + if (!element.runtimeStyle.fixedHeight) util.clipHeight(element); |
2172 | + }; |
2173 | + |
2174 | + // ----------------------------------------------------------------------- |
2175 | + // capture window resize |
2176 | + // ----------------------------------------------------------------------- |
2177 | + |
2178 | + function _resize() { |
2179 | + // if the window has been resized then some positions need to be |
2180 | + // recalculated (especially those aligned to "right" or "top" |
2181 | + var elements = _backgroundFixed.elements; |
2182 | + for (var i in elements) _backgroundPosition(elements[i]); |
2183 | + elements = _positionFixed.elements; |
2184 | + for (i in elements) { |
2185 | + _foregroundPosition(elements[i], true); |
2186 | + _foregroundPosition(elements[i], true); |
2187 | + } |
2188 | + _timer = 0; |
2189 | + }; |
2190 | + |
2191 | + // use a timer (sometimes this is a good way to prevent resize loops) |
2192 | + var _timer; |
2193 | + addResize(function() { |
2194 | + if (!_timer) _timer = setTimeout(_resize, 100); |
2195 | + }); |
2196 | + |
2197 | + // ----------------------------------------------------------------------- |
2198 | + // rotated |
2199 | + // ----------------------------------------------------------------------- |
2200 | + |
2201 | + var util = {}; |
2202 | + |
2203 | + var _horizontal = function(util) { |
2204 | + util.bgLeft = function(element) { |
2205 | + element.style.backgroundPositionX = element.currentStyle.backgroundPositionX; |
2206 | + if (!_isFixed(element)) { |
2207 | + _setExpression(element, "backgroundPositionX", "(parseInt(runtimeStyle.offsetLeft)+document." + $viewport + ".scrollLeft)||0"); |
2208 | + } |
2209 | + }; |
2210 | + |
2211 | + util.setOffsetLeft = function(element) { |
2212 | + var propertyName = _isFixed(element) ? "backgroundPositionX" : "offsetLeft"; |
2213 | + element.runtimeStyle[propertyName] = |
2214 | + util.getOffsetLeft(element, element.style.backgroundPositionX) - |
2215 | + element.getBoundingClientRect().left - element.clientLeft + 2; |
2216 | + }; |
2217 | + |
2218 | + util.getOffsetLeft = function(element, position) { |
2219 | + switch (position) { |
2220 | + case "left": |
2221 | + case "top": |
2222 | + return 0; |
2223 | + case "right": |
2224 | + case "bottom": |
2225 | + return viewport.clientWidth - _tmp.offsetWidth; |
2226 | + case "center": |
2227 | + return (viewport.clientWidth - _tmp.offsetWidth) / 2; |
2228 | + default: |
2229 | + if (PERCENT.test(position)) { |
2230 | + return parseInt((viewport.clientWidth - _tmp.offsetWidth) * parseFloat(position) / 100); |
2231 | + } |
2232 | + _tmp.style.left = position; |
2233 | + return _tmp.offsetLeft; |
2234 | + } |
2235 | + }; |
2236 | + |
2237 | + util.clipWidth = function(element) { |
2238 | + var fixWidth = element.runtimeStyle.fixWidth; |
2239 | + element.runtimeStyle.borderRightWidth = ""; |
2240 | + element.runtimeStyle.width = fixWidth ? util.getPixelWidth(element, fixWidth) + "px" : ""; |
2241 | + if (element.currentStyle.width !== "auto") { |
2242 | + var rect = element.getBoundingClientRect(); |
2243 | + var width = element.offsetWidth - viewport.clientWidth + rect.left - 2; |
2244 | + if (width >= 0) { |
2245 | + element.runtimeStyle.borderRightWidth = "0px"; |
2246 | + width = Math.max(getPixelValue(element, element.currentStyle.width) - width, 0); |
2247 | + setOverrideStyle(element, "width", width); |
2248 | + return width; |
2249 | + } |
2250 | + } |
2251 | + }; |
2252 | + |
2253 | + util.positionLeft = function(element, recalc) { |
2254 | + // if the element's width is in % units then it must be recalculated |
2255 | + // with respect to the viewport |
2256 | + if (!recalc && PERCENT.test(element.currentStyle.width)) { |
2257 | + element.runtimeStyle.fixWidth = element.currentStyle.width; |
2258 | + } |
2259 | + if (element.runtimeStyle.fixWidth) { |
2260 | + element.runtimeStyle.width = util.getPixelWidth(element, element.runtimeStyle.fixWidth); |
2261 | + } |
2262 | + //if (recalc) { |
2263 | + // // if the element is fixed on the right then no need to recalculate |
2264 | + // if (!element.runtimeStyle.autoLeft) return; |
2265 | + //} else { |
2266 | + element.runtimeStyle.shiftLeft = 0; |
2267 | + element.runtimeStyle._left = element.currentStyle.left; |
2268 | + // is the element fixed on the right? |
2269 | + element.runtimeStyle.autoLeft = element.currentStyle.right !== "auto" && element.currentStyle.left === "auto"; |
2270 | + //} |
2271 | + // reset the element's "left" value and get it's natural position |
2272 | + element.runtimeStyle.left = ""; |
2273 | + element.runtimeStyle.screenLeft = util.getScreenLeft(element); |
2274 | + element.runtimeStyle.pixelLeft = element.runtimeStyle.screenLeft; |
2275 | + // if the element is contained by another fixed element then there is no need to |
2276 | + // continually recalculate it's left position |
2277 | + if (!recalc && !_isFixed(element.offsetParent)) { |
2278 | + // onsrcoll produces jerky movement, so we use an expression |
2279 | + _setExpression(element, "pixelLeft", "runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document." + $viewport + ".scrollLeft"); |
2280 | + } |
2281 | + }; |
2282 | + |
2283 | + // I've forgotten how this works... |
2284 | + util.getScreenLeft = function(element) { // thanks to kevin newman (captainn) |
2285 | + var screenLeft = element.offsetLeft, nested = 1; |
2286 | + if (element.runtimeStyle.autoLeft) { |
2287 | + screenLeft = viewport.clientWidth - element.offsetWidth - util.getPixelWidth(element, element.currentStyle.right); |
2288 | + } |
2289 | + // accommodate margins |
2290 | + if (element.currentStyle.marginLeft !== "auto") { |
2291 | + screenLeft -= util.getPixelWidth(element, element.currentStyle.marginLeft); |
2292 | + } |
2293 | + while (element = element.offsetParent) { |
2294 | + if (element.currentStyle.position !== "static") nested = -1; |
2295 | + screenLeft += element.offsetLeft * nested; |
2296 | + } |
2297 | + return screenLeft; |
2298 | + }; |
2299 | + |
2300 | + util.getPixelWidth = function(element, value) { |
2301 | + return PERCENT.test(value) ? parseInt(parseFloat(value) / 100 * viewport.clientWidth) : getPixelValue(element, value); |
2302 | + }; |
2303 | + }; |
2304 | + eval("var _vertical=" + rotate(_horizontal)); |
2305 | + _horizontal(util); |
2306 | + _vertical(util); |
2307 | +})(); |
2308 | + |
2309 | +// ========================================================================= |
2310 | +// ie7-oveflow.js |
2311 | +// ========================================================================= |
2312 | + |
2313 | +/* --------------------------------------------------------------------- |
2314 | + |
2315 | + This module alters the structure of the document. |
2316 | + It may adversely affect other CSS rules. Be warned. |
2317 | + |
2318 | +--------------------------------------------------------------------- */ |
2319 | + |
2320 | +if (appVersion < 7) { |
2321 | + var WRAPPER_STYLE = { |
2322 | + backgroundColor: "transparent", |
2323 | + backgroundImage: "none", |
2324 | + backgroundPositionX: null, |
2325 | + backgroundPositionY: null, |
2326 | + backgroundRepeat: null, |
2327 | + borderTopWidth: 0, |
2328 | + borderRightWidth: 0, |
2329 | + borderBottomWidth: 0, |
2330 | + borderLeftStyle: "none", |
2331 | + borderTopStyle: "none", |
2332 | + borderRightStyle: "none", |
2333 | + borderBottomStyle: "none", |
2334 | + borderLeftWidth: 0, |
2335 | + borderLeftColor: "#000", |
2336 | + borderTopColor: "#000", |
2337 | + borderRightColor: "#000", |
2338 | + borderBottomColor: "#000", |
2339 | + height: null, |
2340 | + marginTop: 0, |
2341 | + marginBottom: 0, |
2342 | + marginRight: 0, |
2343 | + marginLeft: 0, |
2344 | + width: "100%" |
2345 | + }; |
2346 | + |
2347 | + IE7.CSS.addRecalc("overflow", "visible", function(element) { |
2348 | + if (element.currentStyle.position === "absolute") return; |
2349 | + |
2350 | + // don't do this again |
2351 | + if (element.parentNode.ie7_wrapped) return; |
2352 | + |
2353 | + // if max-height is applied, makes sure it gets applied first |
2354 | + if (IE7.Layout && element.currentStyle["max-height"] !== "auto") { |
2355 | + IE7.Layout.maxHeight(element); |
2356 | + } |
2357 | + |
2358 | + if (element.currentStyle.marginLeft === "auto") element.style.marginLeft = 0; |
2359 | + if (element.currentStyle.marginRight === "auto") element.style.marginRight = 0; |
2360 | + |
2361 | + var wrapper = document.createElement(ANON); |
2362 | + wrapper.ie7_wrapped = element; |
2363 | + for (var propertyName in WRAPPER_STYLE) { |
2364 | + wrapper.style[propertyName] = element.currentStyle[propertyName]; |
2365 | + if (WRAPPER_STYLE[propertyName] != null) { |
2366 | + element.runtimeStyle[propertyName] = WRAPPER_STYLE[propertyName]; |
2367 | + } |
2368 | + } |
2369 | + wrapper.style.display = "block"; |
2370 | + wrapper.style.position = "relative"; |
2371 | + element.runtimeStyle.position = "absolute"; |
2372 | + element.parentNode.insertBefore(wrapper, element); |
2373 | + wrapper.appendChild(element); |
2374 | + }); |
2375 | +} |
2376 | + |
2377 | +// ========================================================================= |
2378 | +// ie7-quirks.js |
2379 | +// ========================================================================= |
2380 | + |
2381 | +function ie7Quirks() { |
2382 | + var FONT_SIZES = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","); |
2383 | + for (var i = 0; i < FONT_SIZES.length; i++) { |
2384 | + FONT_SIZES[FONT_SIZES[i]] = FONT_SIZES[i - 1] || "0.67em"; |
2385 | + } |
2386 | + |
2387 | + IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/, function(match, label, size, value) { |
2388 | + return label + (FONT_SIZES[value] || value); |
2389 | + }); |
2390 | + |
2391 | + var NEGATIVE = /^\-/, LENGTH = /(em|ex)$/i; |
2392 | + var EM = /em$/i, EX = /ex$/i; |
2393 | + |
2394 | + getPixelValue = function(element, value) { |
2395 | + if (PIXEL.test(value)) return parseInt(value)||0; |
2396 | + var scale = NEGATIVE.test(value)? -1 : 1; |
2397 | + if (LENGTH.test(value)) scale *= getFontScale(element); |
2398 | + temp.style.width = scale < 0 ? value.slice(1) : value; |
2399 | + body.appendChild(temp); |
2400 | + // retrieve pixel width |
2401 | + value = scale * temp.offsetWidth; |
2402 | + // remove the temporary element |
2403 | + temp.removeNode(); |
2404 | + return parseInt(value); |
2405 | + }; |
2406 | + |
2407 | + var temp = createTempElement(); |
2408 | + function getFontScale(element) { |
2409 | + var scale = 1; |
2410 | + temp.style.fontFamily = element.currentStyle.fontFamily; |
2411 | + temp.style.lineHeight = element.currentStyle.lineHeight; |
2412 | + //temp.style.fontSize = ""; |
2413 | + while (element != body) { |
2414 | + var fontSize = element.currentStyle["ie7-font-size"]; |
2415 | + if (fontSize) { |
2416 | + if (EM.test(fontSize)) scale *= parseFloat(fontSize); |
2417 | + else if (PERCENT.test(fontSize)) scale *= (parseFloat(fontSize) / 100); |
2418 | + else if (EX.test(fontSize)) scale *= (parseFloat(fontSize) / 2); |
2419 | + else { |
2420 | + temp.style.fontSize = fontSize; |
2421 | + return 1; |
2422 | + } |
2423 | + } |
2424 | + element = element.parentElement; |
2425 | + } |
2426 | + return scale; |
2427 | + }; |
2428 | + |
2429 | + // cursor:pointer (IE5.x) |
2430 | + IE7.CSS.addFix(/cursor\s*:\s*pointer/, "cursor:hand"); |
2431 | + // display:list-item (IE5.x) |
2432 | + IE7.CSS.addFix(/display\s*:\s*list-item/, "display:block"); |
2433 | + |
2434 | + // ----------------------------------------------------------------------- |
2435 | + // margin:auto |
2436 | + // ----------------------------------------------------------------------- |
2437 | + |
2438 | + function fixMargin(element) { |
2439 | + var parent = element.parentElement; |
2440 | + var margin = parent.offsetWidth - element.offsetWidth - getPaddingWidth(parent); |
2441 | + var autoRight = (element.currentStyle["ie7-margin"] && element.currentStyle.marginRight === "auto") || |
2442 | + element.currentStyle["ie7-margin-right"] === "auto"; |
2443 | + switch (parent.currentStyle.textAlign) { |
2444 | + case "right": |
2445 | + margin = autoRight ? parseInt(margin / 2) : 0; |
2446 | + element.runtimeStyle.marginRight = margin + "px"; |
2447 | + break; |
2448 | + case "center": |
2449 | + if (autoRight) margin = 0; |
2450 | + default: |
2451 | + if (autoRight) margin /= 2; |
2452 | + element.runtimeStyle.marginLeft = parseInt(margin) + "px"; |
2453 | + } |
2454 | + }; |
2455 | + |
2456 | + function getPaddingWidth(element) { |
2457 | + return getPixelValue(element, element.currentStyle.paddingLeft) + |
2458 | + getPixelValue(element, element.currentStyle.paddingRight); |
2459 | + }; |
2460 | + |
2461 | + IE7.CSS.addRecalc("margin(-left|-right)?", "[^};]*auto", function(element) { |
2462 | + if (register(fixMargin, element, |
2463 | + element.parentElement && |
2464 | + element.currentStyle.display === "block" && |
2465 | + element.currentStyle.marginLeft === "auto" && |
2466 | + element.currentStyle.position !== "absolute")) { |
2467 | + fixMargin(element); |
2468 | + } |
2469 | + }); |
2470 | + |
2471 | + addResize(function() { |
2472 | + for (var i in fixMargin.elements) { |
2473 | + var element = fixMargin.elements[i]; |
2474 | + element.runtimeStyle.marginLeft = |
2475 | + element.runtimeStyle.marginRight = ""; |
2476 | + fixMargin(element); |
2477 | + } |
2478 | + }); |
2479 | +}; |
2480 | + |
2481 | + |
2482 | +// ========================================================================= |
2483 | +// ie8-css.js |
2484 | +// ========================================================================= |
2485 | + |
2486 | +var BRACKETS = "\\([^)]+\\)"; |
2487 | + |
2488 | +// pseudo-elements can be declared with a double colon |
2489 | +encoder.add(/::(before|after)/, ":$1"); |
2490 | + |
2491 | +if (appVersion < 8) { |
2492 | + |
2493 | + if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|"; |
2494 | + IE7.CSS.pseudoClasses += "before|after|lang" + BRACKETS; |
2495 | + |
2496 | + // ----------------------------------------------------------------------- |
2497 | + // propertyName: inherit; |
2498 | + // ----------------------------------------------------------------------- |
2499 | + |
2500 | + function parseInherited(cssText) { |
2501 | + return cssText.replace(new RegExp("([{;\\s])(" + inheritedProperties.join("|") + ")\\s*:\\s*([^;}]+)", "g"), "$1$2:$3;ie7-$2:$3"); |
2502 | + }; |
2503 | + |
2504 | + var INHERITED = /[\w-]+\s*:\s*inherit/g; |
2505 | + var STRIP_IE7_FLAGS = /ie7\-|\s*:\s*inherit/g; |
2506 | + var DASH_LOWER = /\-([a-z])/g; |
2507 | + function toUpper(match, chr) {return chr.toUpperCase()}; |
2508 | + |
2509 | + IE7.CSS.addRecalc("[\\w-]+", "inherit", function(element, cssText) { |
2510 | + if (element.parentElement) { |
2511 | + var inherited = cssText.match(INHERITED); |
2512 | + for (var i = 0; i < inherited.length; i++) { |
2513 | + var propertyName = inherited[i].replace(STRIP_IE7_FLAGS, ""); |
2514 | + if (element.currentStyle["ie7-" + propertyName] === "inherit") { |
2515 | + propertyName = propertyName.replace(DASH_LOWER, toUpper); |
2516 | + element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName]; |
2517 | + } |
2518 | + } |
2519 | + } |
2520 | + }, function(match) { |
2521 | + inheritedProperties.push(rescape(match.slice(1).split(":")[0])); |
2522 | + return match; |
2523 | + }); |
2524 | + |
2525 | + // ----------------------------------------------------------------------- |
2526 | + // dynamic pseudo-classes |
2527 | + // ----------------------------------------------------------------------- |
2528 | + |
2529 | + var Focus = new DynamicPseudoClass("focus", function(element) { |
2530 | + var instance = arguments; |
2531 | + |
2532 | + IE7.CSS.addEventHandler(element, "onfocus", function() { |
2533 | + Focus.unregister(instance); // in case it starts with focus |
2534 | + Focus.register(instance); |
2535 | + }); |
2536 | + |
2537 | + IE7.CSS.addEventHandler(element, "onblur", function() { |
2538 | + Focus.unregister(instance); |
2539 | + }); |
2540 | + |
2541 | + // check the active element for initial state |
2542 | + if (element == document.activeElement) { |
2543 | + Focus.register(instance) |
2544 | + } |
2545 | + }); |
2546 | + |
2547 | + var Active = new DynamicPseudoClass("active", function(element) { |
2548 | + var instance = arguments; |
2549 | + IE7.CSS.addEventHandler(element, "onmousedown", function() { |
2550 | + Active.register(instance); |
2551 | + }); |
2552 | + }); |
2553 | + |
2554 | + // globally trap the mouseup event (thanks Martijn!) |
2555 | + addEventHandler(document, "onmouseup", function() { |
2556 | + var instances = Active.instances; |
2557 | + for (var i in instances) Active.unregister(instances[i]); |
2558 | + }); |
2559 | + |
2560 | + // ----------------------------------------------------------------------- |
2561 | + // IE7 pseudo elements |
2562 | + // ----------------------------------------------------------------------- |
2563 | + |
2564 | + // constants |
2565 | + var URL = /^url\s*\(\s*([^)]*)\)$/; |
2566 | + var POSITION_MAP = { |
2567 | + before0: "beforeBegin", |
2568 | + before1: "afterBegin", |
2569 | + after0: "afterEnd", |
2570 | + after1: "beforeEnd" |
2571 | + }; |
2572 | + |
2573 | + var PseudoElement = IE7.PseudoElement = Rule.extend({ |
2574 | + constructor: function(selector, position, cssText) { |
2575 | + // initialise object properties |
2576 | + this.position = position; |
2577 | + var content = cssText.match(PseudoElement.CONTENT), match, entity; |
2578 | + if (content) { |
2579 | + content = content[1]; |
2580 | + match = content.split(/\s+/); |
2581 | + for (var i = 0; (entity = match[i]); i++) { |
2582 | + match[i] = /^attr/.test(entity) ? {attr: entity.slice(5, -1)} : |
2583 | + entity.charAt(0) === "'" ? getString(entity) : decode(entity); |
2584 | + } |
2585 | + content = match; |
2586 | + } |
2587 | + this.content = content; |
2588 | + // CSS text needs to be decoded immediately |
2589 | + this.base(selector, decode(cssText)); |
2590 | + }, |
2591 | + |
2592 | + init: function() { |
2593 | + // execute the underlying css query for this class |
2594 | + this.match = cssQuery(this.selector); |
2595 | + for (var i = 0; i < this.match.length; i++) { |
2596 | + var runtimeStyle = this.match[i].runtimeStyle; |
2597 | + if (!runtimeStyle[this.position]) runtimeStyle[this.position] = {cssText:""}; |
2598 | + runtimeStyle[this.position].cssText += ";" + this.cssText; |
2599 | + if (this.content != null) runtimeStyle[this.position].content = this.content; |
2600 | + } |
2601 | + }, |
2602 | + |
2603 | + create: function(target) { |
2604 | + var generated = target.runtimeStyle[this.position]; |
2605 | + if (generated) { |
2606 | + // copy the array of values |
2607 | + var content = [].concat(generated.content || ""); |
2608 | + for (var j = 0; j < content.length; j++) { |
2609 | + if (typeof content[j] == "object") { |
2610 | + content[j] = target.getAttribute(content[j].attr); |
2611 | + } |
2612 | + } |
2613 | + content = content.join(""); |
2614 | + var url = content.match(URL); |
2615 | + var cssText = "overflow:hidden;" + generated.cssText.replace(/'/g, '"'); |
2616 | + var position = POSITION_MAP[this.position + Number(target.canHaveChildren)]; |
2617 | + var id = 'ie7_pseudo' + PseudoElement.count++; |
2618 | + target.insertAdjacentHTML(position, format(PseudoElement.ANON, this.className, id, cssText, url ? "" : content)); |
2619 | + if (url) { |
2620 | + var src = getString(url[1]); |
2621 | + var pseudoElement = document.getElementById(id); |
2622 | + pseudoElement.src = src; |
2623 | + addFilter(pseudoElement, "crop"); |
2624 | + var targetIsFloated = target.currentStyle.styleFloat !== "none"; |
2625 | + if (pseudoElement.currentStyle.display === "inline" || targetIsFloated) { |
2626 | + if (appVersion < 7 && targetIsFloated && target.canHaveChildren) { |
2627 | + target.runtimeStyle.display = "inline"; |
2628 | + target.runtimeStyle.position = "relative"; |
2629 | + pseudoElement.runtimeStyle.position = "absolute"; |
2630 | + } |
2631 | + pseudoElement.style.display = "inline-block"; |
2632 | + if (target.currentStyle.styleFloat !== "none") { |
2633 | + pseudoElement.style.pixelWidth = target.offsetWidth; |
2634 | + } |
2635 | + var image = new Image; |
2636 | + image.onload = function() { |
2637 | + pseudoElement.style.pixelWidth = this.width; |
2638 | + pseudoElement.style.pixelHeight = Math.max(this.height, pseudoElement.offsetHeight); |
2639 | + }; |
2640 | + image.src = src; |
2641 | + } |
2642 | + } |
2643 | + target.runtimeStyle[this.position] = null; |
2644 | + } |
2645 | + }, |
2646 | + |
2647 | + recalc: function() { |
2648 | + if (this.content == null) return; |
2649 | + for (var i = 0; i < this.match.length; i++) { |
2650 | + this.create(this.match[i]); |
2651 | + } |
2652 | + }, |
2653 | + |
2654 | + toString: function() { |
2655 | + return "." + this.className + "{display:inline}"; |
2656 | + } |
2657 | + }, { |
2658 | + CONTENT: /content\s*:\s*([^;]*)(;|$)/, |
2659 | + ANON: "<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>", |
2660 | + MATCH: /(.*):(before|after).*/, |
2661 | + |
2662 | + count: 0 |
2663 | + }); |
2664 | + |
2665 | + IE7._getLang = function(element) { |
2666 | + var lang = ""; |
2667 | + while (element && element.nodeType === 1) { |
2668 | + lang = element.lang || element.getAttribute("lang") || ""; |
2669 | + if (lang) break; |
2670 | + element = element.parentNode; |
2671 | + } |
2672 | + return lang; |
2673 | + }; |
2674 | + |
2675 | + FILTER = extend(FILTER, { |
2676 | + ":lang\\(([^)]+)\\)": "((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&" |
2677 | + }); |
2678 | +} |
2679 | + |
2680 | +// ========================================================================= |
2681 | +// ie8-html.js |
2682 | +// ========================================================================= |
2683 | + |
2684 | +var UNSUCCESSFUL = /^(submit|reset|button)$/; |
2685 | + |
2686 | +// ----------------------------------------------------------------------- |
2687 | +// <button> |
2688 | +// ----------------------------------------------------------------------- |
2689 | + |
2690 | +// IE bug means that innerText is submitted instead of "value" |
2691 | +IE7.HTML.addRecalc("button,input", function(button) { |
2692 | + if (button.nodeName === "BUTTON") { |
2693 | + var match = button.outerHTML.match(/ value="([^"]*)"/i); |
2694 | + button.runtimeStyle.value = match ? match[1] : ""; |
2695 | + } |
2696 | + // flag the button/input that was used to submit the form |
2697 | + if (button.type === "submit") { |
2698 | + addEventHandler(button, "onclick", function() { |
2699 | + button.runtimeStyle.clicked = true; |
2700 | + setTimeout("document.all." + button.uniqueID + ".runtimeStyle.clicked=false", 1); |
2701 | + }); |
2702 | + } |
2703 | +}); |
2704 | + |
2705 | +// ----------------------------------------------------------------------- |
2706 | +// <form> |
2707 | +// ----------------------------------------------------------------------- |
2708 | + |
2709 | +// only submit "successful controls |
2710 | +IE7.HTML.addRecalc("form", function(form) { |
2711 | + addEventHandler(form, "onsubmit", function() { |
2712 | + for (var element, i = 0; element = form[i]; i++) { |
2713 | + if (UNSUCCESSFUL.test(element.type) && !element.disabled && !element.runtimeStyle.clicked) { |
2714 | + element.disabled = true; |
2715 | + setTimeout("document.all." + element.uniqueID + ".disabled=false", 1); |
2716 | + } else if (element.nodeName === "BUTTON" && element.type === "submit") { |
2717 | + setTimeout("document.all." + element.uniqueID + ".value='" + element.value + "'", 1); |
2718 | + element.value = element.runtimeStyle.value; |
2719 | + } |
2720 | + } |
2721 | + }); |
2722 | +}); |
2723 | + |
2724 | +// ----------------------------------------------------------------------- |
2725 | +// <img> |
2726 | +// ----------------------------------------------------------------------- |
2727 | + |
2728 | +// get rid of the spurious tooltip produced by the alt attribute on images |
2729 | +IE7.HTML.addRecalc("img", function(img) { |
2730 | + if (img.alt && !img.title) img.title = ""; |
2731 | +}); |
2732 | + |
2733 | +// ========================================================================= |
2734 | +// ie8-layout.js |
2735 | +// ========================================================================= |
2736 | + |
2737 | +if (appVersion < 8) { |
2738 | + IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) { |
2739 | + if (element.currentStyle.borderCollapse !== "collapse") { |
2740 | + element.cellSpacing = getPixelValue(element, element.currentStyle["ie7-border-spacing"].split(" ")[0]); |
2741 | + } |
2742 | + }); |
2743 | + IE7.CSS.addRecalc("box-sizing", "content-box", IE7.Layout.boxSizing); |
2744 | + IE7.CSS.addRecalc("box-sizing", "border-box", IE7.Layout.borderBox); |
2745 | +} |
2746 | + |
2747 | +// ========================================================================= |
2748 | +// ie8-graphics.js |
2749 | +// ========================================================================= |
2750 | + |
2751 | +if (appVersion < 8) { |
2752 | + // fix object[type=image/*] |
2753 | + var IMAGE = /^image/i; |
2754 | + IE7.HTML.addRecalc("object", function(element) { |
2755 | + if (IMAGE.test(element.type)) { |
2756 | + element.body.style.cssText = "margin:0;padding:0;border:none;overflow:hidden"; |
2757 | + return element; |
2758 | + } |
2759 | + }); |
2760 | +} |
2761 | + |
2762 | +// ========================================================================= |
2763 | +// ie9-css.js |
2764 | +// ========================================================================= |
2765 | + |
2766 | +var NOT_NEXT_BY_TYPE = "!IE7._getElementSiblingByType(e,'next')&&", |
2767 | + NOT_PREVIOUS_BY_TYPE = NOT_NEXT_BY_TYPE.replace("next", "previous"); |
2768 | + |
2769 | +if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|"; |
2770 | +IE7.CSS.pseudoClasses += "(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|" + |
2771 | + ("not|nth\\-child|nth\\-last\\-child|nth\\-of\\-type|nth\\-last\\-of\\-type".split("|").join(BRACKETS + "|") + BRACKETS); |
2772 | + |
2773 | +// :checked |
2774 | +var Checked = new DynamicPseudoClass("checked", function(element) { |
2775 | + if (typeof element.checked !== "boolean") return; |
2776 | + var instance = arguments; |
2777 | + IE7.CSS.addEventHandler(element, "onpropertychange", function() { |
2778 | + if (event.propertyName === "checked") { |
2779 | + if (element.checked === true) Checked.register(instance); |
2780 | + else Checked.unregister(instance); |
2781 | + } |
2782 | + }); |
2783 | + // check current checked state |
2784 | + if (element.checked === true) Checked.register(instance); |
2785 | +}); |
2786 | + |
2787 | +// :enabled |
2788 | +var Enabled = new DynamicPseudoClass("enabled", function(element) { |
2789 | + if (typeof element.disabled !== "boolean") return; |
2790 | + var instance = arguments; |
2791 | + IE7.CSS.addEventHandler(element, "onpropertychange", function() { |
2792 | + if (event.propertyName === "disabled") { |
2793 | + if (element.disabled === false) Enabled.register(instance); |
2794 | + else Enabled.unregister(instance); |
2795 | + } |
2796 | + }); |
2797 | + // check current disabled state |
2798 | + if (element.disabled === false) Enabled.register(instance); |
2799 | +}); |
2800 | + |
2801 | +// :disabled |
2802 | +var Disabled = new DynamicPseudoClass("disabled", function(element) { |
2803 | + if (typeof element.disabled !== "boolean") return; |
2804 | + var instance = arguments; |
2805 | + IE7.CSS.addEventHandler(element, "onpropertychange", function() { |
2806 | + if (event.propertyName === "disabled") { |
2807 | + if (element.disabled === true) Disabled.register(instance); |
2808 | + else Disabled.unregister(instance); |
2809 | + } |
2810 | + }); |
2811 | + // check current disabled state |
2812 | + if (element.disabled === true) Disabled.register(instance); |
2813 | +}); |
2814 | + |
2815 | +// :indeterminate (Kevin Newman) |
2816 | +var Indeterminate = new DynamicPseudoClass("indeterminate", function(element) { |
2817 | + if (typeof element.indeterminate !== "boolean") return; |
2818 | + var instance = arguments; |
2819 | + IE7.CSS.addEventHandler(element, "onpropertychange", function() { |
2820 | + if (event.propertyName === "indeterminate") { |
2821 | + if (element.indeterminate === true) Indeterminate.register(instance); |
2822 | + else Indeterminate.unregister(instance); |
2823 | + } |
2824 | + }); |
2825 | + IE7.CSS.addEventHandler(element, "onclick", function() { |
2826 | + Indeterminate.unregister(instance); |
2827 | + }); |
2828 | + // clever Kev says no need to check this up front |
2829 | +}); |
2830 | + |
2831 | +// :target |
2832 | +var Target = new DynamicPseudoClass("target", function(element) { |
2833 | + var instance = arguments; |
2834 | + // if an element has a tabIndex then it can become "active". |
2835 | + // The default is zero anyway but it works... |
2836 | + if (!element.tabIndex) element.tabIndex = 0; |
2837 | + // this doesn't detect the back button. I don't know how to do that without adding an iframe :-( |
2838 | + IE7.CSS.addEventHandler(document, "onpropertychange", function() { |
2839 | + if (event.propertyName === "activeElement") { |
2840 | + if (element.id && element.id === location.hash.slice(1)) Target.register(instance); |
2841 | + else Target.unregister(instance); |
2842 | + } |
2843 | + }); |
2844 | + // check the current location |
2845 | + if (element.id && element.id === location.hash.slice(1)) Target.register(instance); |
2846 | +}); |
2847 | + |
2848 | +// Register a node and index its siblings. |
2849 | +var _currentIndex = 1, // -@DRE |
2850 | + allIndexes = {_currentIndex: 1}; |
2851 | + |
2852 | +IE7._indexOf = function(element, last, ofType) { |
2853 | + var parent = element.parentNode; |
2854 | + if (!parent || parent.nodeType !== 1) return NaN; |
2855 | + |
2856 | + var tagName = ofType ? element.nodeName : ""; |
2857 | + if (tagName === "TR" && element.sectionRowIndex >= 0) { |
2858 | + var index = element.sectionRowIndex; |
2859 | + return last ? element.parentNode.rows.length - index + 1 : index; |
2860 | + } |
2861 | + if ((tagName === "TD" || tagName === "TH") && element.cellIndex >= 0) { |
2862 | + index = element.cellIndex; |
2863 | + return last ? element.parentNode.cells.length - index + 1 : index; |
2864 | + } |
2865 | + if (allIndexes._currentIndex !== _currentIndex) { |
2866 | + allIndexes = {_currentIndex: _currentIndex}; |
2867 | + } |
2868 | + var id = (parent.uniqueID) + "-" + tagName, |
2869 | + indexes = allIndexes[id]; |
2870 | + if (!indexes) { |
2871 | + indexes = {}; |
2872 | + var index = 0, |
2873 | + child = parent.firstChild; |
2874 | + while (child) { |
2875 | + if (ofType ? child.nodeName === tagName : child.nodeName > "@") { |
2876 | + indexes[child.uniqueID] = ++index; |
2877 | + } |
2878 | + child = child.nextSibling; |
2879 | + } |
2880 | + indexes.length = index; |
2881 | + allIndexes[id] = indexes; |
2882 | + } |
2883 | + index = indexes[element.uniqueID]; |
2884 | + return last ? indexes.length - index + 1 : index; |
2885 | +}; |
2886 | + |
2887 | +IE7._isEmpty = function(node) { |
2888 | + node = node.firstChild; |
2889 | + while (node) { |
2890 | + if (node.nodeType === 3 || node.nodeName > "@") return false; |
2891 | + node = node.nextSibling; |
2892 | + } |
2893 | + return true; |
2894 | +}; |
2895 | + |
2896 | +IE7._getElementSiblingByType = function(node, direction) { |
2897 | + var tagName = node.nodeName; |
2898 | + direction += "Sibling"; |
2899 | + do { |
2900 | + node = node[direction]; |
2901 | + if (node && node.nodeName === tagName) break; |
2902 | + } while (node); |
2903 | + return node; |
2904 | +}; |
2905 | + |
2906 | +var ONE = {"+": 1, "-": -1}, SPACES = / /g; |
2907 | + |
2908 | +FILTER = extend(extend({ |
2909 | + ":nth(-last)?-(?:child|(of-type))\\((<#nth_arg>)\\)(<#filter>)?": function(match, last, ofType, args, filters) { // :nth- pseudo classes |
2910 | + args = args.replace(SPACES, ""); |
2911 | + |
2912 | + var index = "IE7._indexOf(e," + !!last + "," + !!ofType + ")"; |
2913 | + |
2914 | + if (args === "even") args = "2n"; |
2915 | + else if (args === "odd") args = "2n+1"; |
2916 | + else if (!isNaN(args)) args = "0n" + ~~args; |
2917 | + |
2918 | + args = args.split("n"); |
2919 | + var a = ~~(ONE[args[0]] || args[0] || 1), |
2920 | + b = ~~args[1]; |
2921 | + if (a === 0) { |
2922 | + var expr = index + "===" + b; |
2923 | + } else { |
2924 | + expr = "((ii=" + index + ")-(" + b + "))%" + a + "===0&&ii" + (a < 0 ? "<" : ">") + "=" + b; |
2925 | + } |
2926 | + return this.parse(filters) + expr + "&&"; |
2927 | + }, |
2928 | + |
2929 | + "<#negation>": function(match, simple) { |
2930 | + if (/:not/i.test(simple)) throwSelectorError(); |
2931 | + |
2932 | + if (/^[#.:\[]/.test(simple)) { |
2933 | + simple = "*" + simple; |
2934 | + } |
2935 | + return "!(" + MATCHER.parse(simple).slice(3, -2) + ")&&"; |
2936 | + } |
2937 | +}, FILTER), { |
2938 | + ":checked": "e.checked===true&&", |
2939 | + ":disabled": "e.disabled===true&&", |
2940 | + ":enabled": "e.disabled===false&&", |
2941 | + ":last-child": "!" + NEXT_SIBLING + "&&", |
2942 | + ":only-child": "!" + PREVIOUS_SIBLING + "&&!" + NEXT_SIBLING + "&&", |
2943 | + ":first-of-type": NOT_PREVIOUS_BY_TYPE, |
2944 | + ":last-of-type": NOT_NEXT_BY_TYPE, |
2945 | + ":only-of-type": NOT_PREVIOUS_BY_TYPE + NOT_NEXT_BY_TYPE, |
2946 | + |
2947 | + ":empty": "IE7._isEmpty(e)&&", |
2948 | + ":root": "e==R&&", |
2949 | + ":target": "H&&" + ID_ATTRIBUTE + "===H&&" |
2950 | +}); |
2951 | + |
2952 | +var HTML5 = "article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(","); |
2953 | +for (var i = 0, tagName; tagName = HTML5[i]; i++) document.createElement(tagName); |
2954 | + |
2955 | +HEADER += "datalist{display:none}\ |
2956 | +details{padding-left:40px;display:block;margin:1em 0}\ |
2957 | +meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}\ |
2958 | +progress{width:10em;}\ |
2959 | +article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}\ |
2960 | +figure{margin:1em 40px;display:block}\ |
2961 | +mark{background:yellow}"; |
2962 | + |
2963 | +// ========================================================================= |
2964 | +// ie9-layout.js |
2965 | +// ========================================================================= |
2966 | + |
2967 | +// ========================================================================= |
2968 | +// ie9-graphics.js |
2969 | +// ========================================================================= |
2970 | + |
2971 | +IE7.CSS.addFix(/\bopacity\s*:\s*([\d.]+)/, function(match, value) { |
2972 | + return "zoom:1;filter:Alpha(opacity=" + ((value * 100) || 1) + ")"; |
2973 | +}); |
2974 | + |
2975 | +var MATCHER; |
2976 | + |
2977 | +var cssQuery = (function() { |
2978 | + var CONTEXT = /^[>+~]/; |
2979 | + |
2980 | + var useContext = false; |
2981 | + |
2982 | + // This is not a selector engine in the strictest sense. So it's best to silently error. |
2983 | + function cssQuery(selector, context, single) { |
2984 | + selector = trim(selector); |
2985 | + if (!context) context = document; |
2986 | + var ref = context; |
2987 | + useContext = CONTEXT.test(selector); |
2988 | + if (useContext) { |
2989 | + context = context.parentNode; |
2990 | + selector = "*" + selector; |
2991 | + } |
2992 | + try { |
2993 | + return selectQuery.create(selector, useContext)(context, single ? null : [], ref); |
2994 | + } catch (ex) { |
2995 | + return single ? null : []; |
2996 | + } |
2997 | + }; |
2998 | + |
2999 | + var VALID_SELECTOR = /^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/; |
3000 | + |
3001 | + var _EVALUATED = /^(href|src)$/; |
3002 | + var _ATTRIBUTES = { |
3003 | + "class": "className", |
3004 | + "for": "htmlFor" |
3005 | + }; |
3006 | + |
3007 | + var IE7_CLASS_NAMES = /\sie7_\w+/g; |
3008 | + |
3009 | + var USE_IFLAG = /^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i; |
3010 | + |
3011 | + IE7._getAttribute = function(element, name) { |
3012 | + if (element.getAttributeNode) { |
3013 | + var attribute = element.getAttributeNode(name); |
3014 | + } |
3015 | + name = _ATTRIBUTES[name.toLowerCase()] || name; |
3016 | + if (!attribute) attribute = element.attributes[name]; |
3017 | + var specified = attribute && attribute.specified; |
3018 | + |
3019 | + if (element[name] && typeof element[name] == "boolean") return name.toLowerCase(); |
3020 | + if ((specified && USE_IFLAG.test(name)) || (!attribute && MSIE5) || name === "value" || name === "type") { |
3021 | + return element.getAttribute(name, 2); |
3022 | + } |
3023 | + if (name === "style") return element.style.cssText.toLowerCase() || null; |
3024 | + |
3025 | + return specified ? String(attribute.nodeValue) : null; |
3026 | + }; |
3027 | + |
3028 | + var names = "colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc"; |
3029 | + // Convert the list of strings to a hash, mapping the lowercase name to the camelCase name. |
3030 | + extend(_ATTRIBUTES, combine(names.toLowerCase().split(","), names.split(","))); |
3031 | + |
3032 | + IE7._getElementSibling = function(node, direction) { |
3033 | + direction += "Sibling"; |
3034 | + do { |
3035 | + node = node[direction]; |
3036 | + if (node && node.nodeName > "@") break; |
3037 | + } while (node); |
3038 | + return node; |
3039 | + }; |
3040 | + |
3041 | + var IMPLIED_ASTERISK = /(^|[, >+~])([#.:\[])/g, |
3042 | + BLOCKS = /\)\{/g, |
3043 | + COMMA = /,/, |
3044 | + QUOTED = /^['"]/, |
3045 | + HEX_ESCAPE = /\\([\da-f]{2,2})/gi, |
3046 | + LAST_CHILD = /last/i; |
3047 | + |
3048 | + IE7._byId = function(document, id) { |
3049 | + var result = document.all[id] || null; |
3050 | + // Returns a single element or a collection. |
3051 | + if (!result || (result.nodeType && IE7._getAttribute(result, "id") === id)) return result; |
3052 | + // document.all has returned a collection of elements with name/id |
3053 | + for (var i = 0; i < result.length; i++) { |
3054 | + if (IE7._getAttribute(result[i], "id") === id) return result[i]; |
3055 | + } |
3056 | + return null; |
3057 | + }; |
3058 | + |
3059 | + // ========================================================================= |
3060 | + // dom/selectors-api/CSSSelectorParser.js |
3061 | + // ========================================================================= |
3062 | + |
3063 | + // http://www.w3.org/TR/css3-selectors/#w3cselgrammar (kinda) |
3064 | + var CSSSelectorParser = RegGrp.extend({ |
3065 | + dictionary: new Dictionary({ |
3066 | + ident: /\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/, |
3067 | + combinator: /[\s>+~]/, |
3068 | + operator: /[\^~|$*]?=/, |
3069 | + nth_arg: /[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/, |
3070 | + tag: /\*|<#ident>/, |
3071 | + id: /#(<#ident>)/, |
3072 | + 'class': /\.(<#ident>)/, |
3073 | + pseudo: /\:([\w-]+)(?:\(([^)]+)\))?/, |
3074 | + attr: /\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/, |
3075 | + negation: /:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/, |
3076 | + sequence: /(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/, |
3077 | + filter: /[#.:\[]<#sequence>/, |
3078 | + selector: /[^>+~](\\.|[^,])*?/, |
3079 | + grammar: /^(<#selector>)((,<#selector>)*)$/ |
3080 | + }), |
3081 | + |
3082 | + ignoreCase: true |
3083 | + }); |
3084 | + |
3085 | + var normalizer = new CSSSelectorParser({ |
3086 | + "\\\\.|[~*]\\s+=|\\+\\s+\\d": RegGrp.IGNORE, |
3087 | + "\\[\\s+": "[", |
3088 | + "\\(\\s+": "(", |
3089 | + "\\s+\\)": ")", |
3090 | + "\\s+\\]": "]", |
3091 | + "\\s*([,>+~]|<#operator>)\\s*": "$1", |
3092 | + "\\s+$": "", |
3093 | + "\\s+": " " |
3094 | + }); |
3095 | + |
3096 | + function normalize(selector) { |
3097 | + selector = normalizer.parse(selector.replace(HEX_ESCAPE, "\\x$1")) |
3098 | + .replace(UNESCAPE, "$1") |
3099 | + .replace(IMPLIED_ASTERISK, "$1*$2"); |
3100 | + if (!VALID_SELECTOR.test(selector)) throwSelectorError(); |
3101 | + return selector; |
3102 | + }; |
3103 | + |
3104 | + function unescape(query) { |
3105 | + // put string values back |
3106 | + return query.replace(ESCAPED, unescapeString); |
3107 | + }; |
3108 | + |
3109 | + function unescapeString(match, index) { |
3110 | + return strings[index]; |
3111 | + }; |
3112 | + |
3113 | + var BRACES = /\{/g, BRACES_ESCAPED = /\\{/g; |
3114 | + |
3115 | + function closeBlock(group) { |
3116 | + return Array((group.replace(BRACES_ESCAPED, "").match(BRACES) || "").length + 1).join("}"); |
3117 | + }; |
3118 | + |
3119 | + FILTER = new CSSSelectorParser(FILTER); |
3120 | + |
3121 | + var TARGET = /:target/i, ROOT = /:root/i; |
3122 | + |
3123 | + function getConstants(selector) { |
3124 | + var constants = ""; |
3125 | + if (ROOT.test(selector)) constants += ",R=d.documentElement"; |
3126 | + if (TARGET.test(selector)) constants += ",H=d.location;H=H&&H.hash.replace('#','')"; |
3127 | + if (constants || selector.indexOf("#") !== -1) { |
3128 | + constants = ",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document" + constants; |
3129 | + } |
3130 | + return "var ii" + constants + ";"; |
3131 | + }; |
3132 | + |
3133 | + var COMBINATOR = { |
3134 | + " ": ";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){", |
3135 | + ">": ".parentElement;if(e){", |
3136 | + "+": ";while((e=e.previousSibling)&&!(" + IS_ELEMENT + "))continue;if(e){", |
3137 | + "~": ";while((e=e.previousSibling)){" + IF_ELEMENT |
3138 | + }; |
3139 | + |
3140 | + var TOKEN = /\be\b/g; |
3141 | + |
3142 | + MATCHER = new CSSSelectorParser({ |
3143 | + "(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$": function(match, before, combinator, tag, filters) { |
3144 | + var group = ""; |
3145 | + if (tag !== "*") { |
3146 | + var TAG = tag.toUpperCase(); |
3147 | + group += "if(e.nodeName==='" + TAG + (TAG === tag ? "" : "'||e.nodeName==='" + tag) + "'){"; |
3148 | + } |
3149 | + if (filters) { |
3150 | + group += "if(" + FILTER.parse(filters).slice(0, -2) + "){"; |
3151 | + } |
3152 | + group = group.replace(TOKEN, "e" + this.index); |
3153 | + if (combinator) { |
3154 | + group += "var e=e" + (this.index++) + COMBINATOR[combinator]; |
3155 | + group = group.replace(TOKEN, "e" + this.index); |
3156 | + } |
3157 | + if (before) { |
3158 | + group += this.parse(before); |
3159 | + } |
3160 | + return group; |
3161 | + } |
3162 | + }); |
3163 | + |
3164 | + var BY_ID = "e0=IE7._byId(d,'%1');if(e0){", |
3165 | + BY_TAG_NAME = "var n=c.getElementsByTagName('%1');", |
3166 | + STORE = "if(r==null)return e0;r[k++]=e0;"; |
3167 | + |
3168 | + var TAG_NAME = 1; |
3169 | + |
3170 | + var SELECTOR = new CSSSelectorParser({ |
3171 | + "^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$": true |
3172 | + }); |
3173 | + |
3174 | + var cache = {}; |
3175 | + |
3176 | + var selectById = new CSSSelectorParser({ |
3177 | + "^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$": function(match, tagName, id, filters, after) { |
3178 | + var block = format(BY_ID, id), endBlock = "}"; |
3179 | + if (filters) { |
3180 | + block += MATCHER.parse(tagName + filters); |
3181 | + endBlock = closeBlock(block); |
3182 | + } |
3183 | + if (after) { |
3184 | + block += "s=c=e0;" + selectQuery.parse("*" + after); |
3185 | + } else { |
3186 | + block += STORE; |
3187 | + } |
3188 | + return block + endBlock; |
3189 | + }, |
3190 | + |
3191 | + "^([^#,]+)#(<#ident>)(<#filter>)?$": function(match, before, id, filters) { |
3192 | + var block = format(BY_ID, id); |
3193 | + if (before === "*") { |
3194 | + block += STORE; |
3195 | + } else { |
3196 | + block += MATCHER.parse(before + filters) + STORE + "break"; |
3197 | + } |
3198 | + return block + closeBlock(block); |
3199 | + }, |
3200 | + |
3201 | + "^.*$": "" |
3202 | + }); |
3203 | + |
3204 | + var selectQuery = new CSSSelectorParser({ |
3205 | + "<#grammar>": function(match, selector, remainingSelectors) { |
3206 | + if (!this.groups) this.groups = []; |
3207 | + |
3208 | + var group = SELECTOR.exec(" " + selector); |
3209 | + |
3210 | + if (!group) throwSelectorError(); |
3211 | + |
3212 | + this.groups.push(group.slice(1)); |
3213 | + |
3214 | + if (remainingSelectors) { |
3215 | + return this.parse(remainingSelectors.replace(COMMA, "")); |
3216 | + } |
3217 | + |
3218 | + var groups = this.groups, |
3219 | + tagName = groups[0][TAG_NAME]; // first tag name |
3220 | + |
3221 | + for (var i = 1; group = groups[i]; i++) { // search tag names |
3222 | + if (tagName !== group[TAG_NAME]) { |
3223 | + tagName = "*"; // mixed tag names, so use "*" |
3224 | + break; |
3225 | + } |
3226 | + } |
3227 | + |
3228 | + var matcher = "", store = STORE + "continue filtering;"; |
3229 | + |
3230 | + for (var i = 0; group = groups[i]; i++) { |
3231 | + MATCHER.index = 0; |
3232 | + if (tagName !== "*") group[TAG_NAME] = "*"; // we are already filtering by tagName |
3233 | + group = group.join(""); |
3234 | + if (group === " *") { // select all |
3235 | + matcher = store; |
3236 | + break; |
3237 | + } else { |
3238 | + group = MATCHER.parse(group); |
3239 | + if (useContext) group += "if(e" + MATCHER.index + "==s){"; |
3240 | + matcher += group + store + closeBlock(group); |
3241 | + } |
3242 | + } |
3243 | + |
3244 | + // reduce to a single loop |
3245 | + var isWild = tagName === "*"; |
3246 | + return (isWild ? "var n=c.all;" : format(BY_TAG_NAME, tagName)) + |
3247 | + "filtering:while((e0=n[i++]))" + |
3248 | + (isWild ? IF_ELEMENT.replace(TOKEN, "e0") : "{") + |
3249 | + matcher + |
3250 | + "}"; |
3251 | + }, |
3252 | + |
3253 | + "^.*$": throwSelectorError |
3254 | + }); |
3255 | + |
3256 | + var REDUNDANT_NODETYPE_CHECKS = /\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g; |
3257 | + |
3258 | + selectQuery.create = function(selector) { |
3259 | + if (!cache[selector]) { |
3260 | + selector = normalize(selector); |
3261 | + this.groups = null; |
3262 | + MATCHER.index = 0; |
3263 | + var block = this.parse(selector); |
3264 | + this.groups = null; |
3265 | + MATCHER.index = 0; |
3266 | + if (selector.indexOf("#") !== -1) { |
3267 | + var byId = selectById.parse(selector); |
3268 | + if (byId) { |
3269 | + block = |
3270 | + "if(t===1||t===11|!c.getElementById){" + |
3271 | + block + |
3272 | + "}else{" + |
3273 | + byId + |
3274 | + "}"; |
3275 | + } |
3276 | + } |
3277 | + // remove redundant nodeType==1 checks |
3278 | + block = block.replace(REDUNDANT_NODETYPE_CHECKS, "$2"); |
3279 | + block = getConstants(selector) + decode(block); |
3280 | + cache[selector] = new Function("return function(c,r,s){var i=0,k=0,e0;" + block + "return r}")(); |
3281 | + } |
3282 | + return cache[selector]; |
3283 | + }; |
3284 | + |
3285 | + return cssQuery; |
3286 | +})(); |
3287 | + |
3288 | +function throwSelectorError() { |
3289 | + throw new SyntaxError("Invalid selector."); |
3290 | +}; |
3291 | + |
3292 | +// ----------------------------------------------------------------------- |
3293 | +// initialisation |
3294 | +// ----------------------------------------------------------------------- |
3295 | + |
3296 | +IE7.loaded = true; |
3297 | + |
3298 | +(function() { |
3299 | + try { |
3300 | + // http://javascript.nwbox.com/IEContentLoaded/ |
3301 | + if (!document.body) throw "continue"; |
3302 | + documentElement.doScroll("left"); |
3303 | + } catch (ex) { |
3304 | + setTimeout(arguments.callee, 1); |
3305 | + return; |
3306 | + } |
3307 | + // execute the inner text of the IE7 script |
3308 | + try { |
3309 | + eval(script.innerHTML); |
3310 | + } catch (ex) { |
3311 | + // ignore errors |
3312 | + } |
3313 | + if (typeof IE7_PNG_SUFFIX == "object") { |
3314 | + PNG = IE7_PNG_SUFFIX; |
3315 | + } else { |
3316 | + PNG = new RegExp(rescape(window.IE7_PNG_SUFFIX || "-trans.png") + "(\\?.*)?$", "i"); |
3317 | + } |
3318 | + |
3319 | + // frequently used references |
3320 | + body = document.body; |
3321 | + viewport = MSIE5 ? body : documentElement; |
3322 | + |
3323 | + // classes |
3324 | + body.className += " ie7_body"; |
3325 | + documentElement.className += " ie7_html"; |
3326 | + |
3327 | + if (MSIE5) ie7Quirks(); |
3328 | + |
3329 | + IE7.CSS.init(); |
3330 | + IE7.HTML.init(); |
3331 | + |
3332 | + IE7.HTML.apply(); |
3333 | + IE7.CSS.apply(); |
3334 | + |
3335 | + IE7.recalc(); |
3336 | +})(); |
3337 | + |
3338 | +})(this, document); |
3339 | |
3340 | === added file 'media/js/polyfills/IE9/src/squish.src.js' |
3341 | --- media/js/polyfills/IE9/src/squish.src.js 1970-01-01 00:00:00 +0000 |
3342 | +++ media/js/polyfills/IE9/src/squish.src.js 2012-03-26 20:23:22 +0000 |
3343 | @@ -0,0 +1,35 @@ |
3344 | +/* --------------------------------------------------------------------- |
3345 | + |
3346 | + Squish some IE bugs! |
3347 | + |
3348 | + Some of these bug fixes may have adverse effects so they are |
3349 | + not included in the standard library. Add your own if you want. |
3350 | + |
3351 | +--------------------------------------------------------------------- */ |
3352 | + |
3353 | +// NOTE: IE7.Layout.boxSizing is the same as the "Holly Hack" |
3354 | + |
3355 | +if (IE7.loaded && IE7.appVersion < 7) { |
3356 | + |
3357 | + // "doubled margin" bug |
3358 | + // http://www.positioniseverything.net/explorer/doubled-margin.html |
3359 | + IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1"); |
3360 | + |
3361 | + // "peekaboo" bug |
3362 | + // http://www.positioniseverything.net/explorer/peekaboo.html |
3363 | + if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) { |
3364 | + IE7.Layout.boxSizing(element.parentElement); |
3365 | + // "doubled margin" bug |
3366 | + element.style.display = "inline"; |
3367 | + }); |
3368 | + |
3369 | + // "unscrollable content" bug |
3370 | + // http://www.positioniseverything.net/explorer/unscrollable.html |
3371 | + IE7.CSS.addRecalc("position", "absolute|fixed", function(element) { |
3372 | + if (element.offsetParent && element.offsetParent.currentStyle.position === "relative") |
3373 | + IE7.Layout.boxSizing(element.offsetParent); |
3374 | + }); |
3375 | +} |
3376 | + |
3377 | +//# // get rid of Microsoft's pesky image toolbar |
3378 | +//# document.write('<meta http-equiv="imagetoolbar" content="no">'); |
3379 | \ No newline at end of file |
3380 | |
3381 | === added file 'media/js/polyfills/pie.js' |
3382 | --- media/js/polyfills/pie.js 1970-01-01 00:00:00 +0000 |
3383 | +++ media/js/polyfills/pie.js 2012-03-26 20:23:22 +0000 |
3384 | @@ -0,0 +1,140 @@ |
3385 | +(function(){var doc=document;var PIE=window["PIE"];if(!PIE){PIE=window["PIE"]={CSS_PREFIX:"-pie-",STYLE_PREFIX:"Pie",CLASS_PREFIX:"pie_",tableCellTags:{"TD":1,"TH":1},childlessElements:{"TABLE":1,"THEAD":1,"TBODY":1,"TFOOT":1,"TR":1,"INPUT":1,"TEXTAREA":1,"SELECT":1,"OPTION":1,"IMG":1,"HR":1},focusableElements:{"A":1,"INPUT":1,"TEXTAREA":1,"SELECT":1,"BUTTON":1},inputButtonTypes:{"submit":1,"button":1,"reset":1},emptyFn:function(){}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(e){}(function(){var ieVersion= |
3386 | +4,div=doc.createElement("div"),all=div.getElementsByTagName("i"),shape;while(div.innerHTML="<\!--[if gt IE "+ ++ieVersion+"]><i></i><![endif]--\>",all[0]);PIE.ieVersion=ieVersion;if(ieVersion===6)PIE.CSS_PREFIX=PIE.CSS_PREFIX.replace(/^-/,"");PIE.ieDocMode=doc.documentMode||PIE.ieVersion;div.innerHTML='<v:shape adj="1"/>';shape=div.firstChild;shape.style["behavior"]="url(#default#VML)";PIE.supportsVML=typeof shape["adj"]==="object"})();(function(){var vmlCreatorDoc,idNum=0,imageSizes={};PIE.Util= |
3387 | +{createVmlElement:function(tag){var vmlPrefix="css3vml";if(!vmlCreatorDoc){vmlCreatorDoc=doc.createDocumentFragment();vmlCreatorDoc.namespaces.add(vmlPrefix,"urn:schemas-microsoft-com:vml")}return vmlCreatorDoc.createElement(vmlPrefix+":"+tag)},getUID:function(obj){return obj&&obj["_pieId"]||(obj["_pieId"]="_"+ ++idNum)},merge:function(obj1){var i,len,p,objN,args=arguments;for(i=1,len=args.length;i<len;i++){objN=args[i];for(p in objN)if(objN.hasOwnProperty(p))obj1[p]=objN[p]}return obj1},withImageSize:function(src, |
3388 | +func,ctx){var size=imageSizes[src],img,queue;if(size)if(Object.prototype.toString.call(size)==="[object Array]")size.push([func,ctx]);else func.call(ctx,size);else{queue=imageSizes[src]=[[func,ctx]];img=new Image;img.onload=function(){size=imageSizes[src]={w:img.width,h:img.height};for(var i=0,len=queue.length;i<len;i++)queue[i][0].call(queue[i][1],size);img.onload=null};img.src=src}}}})();PIE.GradientUtil={getGradientMetrics:function(el,width,height,gradientInfo){var angle=gradientInfo.angle,startPos= |
3389 | +gradientInfo.gradientStart,startX,startY,endX,endY,startCornerX,startCornerY,endCornerX,endCornerY,deltaX,deltaY,p,UNDEF;function findCorners(){startCornerX=angle>=90&&angle<270?width:0;startCornerY=angle<180?height:0;endCornerX=width-startCornerX;endCornerY=height-startCornerY}function normalizeAngle(){while(angle<0)angle+=360;angle=angle%360}if(startPos){startPos=startPos.coords(el,width,height);startX=startPos.x;startY=startPos.y}if(angle){angle=angle.degrees();normalizeAngle();findCorners();if(!startPos){startX= |
3390 | +startCornerX;startY=startCornerY}p=PIE.GradientUtil.perpendicularIntersect(startX,startY,angle,endCornerX,endCornerY);endX=p[0];endY=p[1]}else if(startPos){endX=width-startX;endY=height-startY}else{startX=startY=endX=0;endY=height}deltaX=endX-startX;deltaY=endY-startY;if(angle===UNDEF){angle=!deltaX?deltaY<0?90:270:!deltaY?deltaX<0?180:0:-Math.atan2(deltaY,deltaX)/Math.PI*180;normalizeAngle();findCorners()}return{angle:angle,startX:startX,startY:startY,endX:endX,endY:endY,startCornerX:startCornerX, |
3391 | +startCornerY:startCornerY,endCornerX:endCornerX,endCornerY:endCornerY,deltaX:deltaX,deltaY:deltaY,lineLength:PIE.GradientUtil.distance(startX,startY,endX,endY)}},perpendicularIntersect:function(x1,y1,angle,x2,y2){if(angle===0||angle===180)return[x2,y1];else if(angle===90||angle===270)return[x1,y2];else{var a1=Math.tan(-angle*Math.PI/180),c1=a1*x1-y1,a2=-1/a1,c2=a2*x2-y2,d=a2-a1,endX=(c2-c1)/d,endY=(a1*c2-a2*c1)/d;return[endX,endY]}},distance:function(p1x,p1y,p2x,p2y){var dx=p2x-p1x,dy=p2y-p1y;return Math.abs(dx=== |
3392 | +0?dy:dy===0?dx:Math.sqrt(dx*dx+dy*dy))}};PIE.Observable=function(){this.observers=[];this.indexes={}};PIE.Observable.prototype={observe:function(fn){var id=PIE.Util.getUID(fn),indexes=this.indexes,observers=this.observers;if(!(id in indexes)){indexes[id]=observers.length;observers.push(fn)}},unobserve:function(fn){var id=PIE.Util.getUID(fn),indexes=this.indexes;if(id&&id in indexes){delete this.observers[indexes[id]];delete indexes[id]}},fire:function(){var o=this.observers,i=o.length;while(i--)o[i]&& |
3393 | +o[i]()}};PIE.Heartbeat=new PIE.Observable;PIE.Heartbeat.run=function(){var me=this;if(!me.running){setInterval(function(){me.fire()},250);me.running=1}};(function(){PIE.OnUnload=new PIE.Observable;function handleUnload(){PIE.OnUnload.fire();window.detachEvent("onunload",handleUnload);window["PIE"]=null}window.attachEvent("onunload",handleUnload);PIE.OnUnload.attachManagedEvent=function(target,name,handler){target.attachEvent(name,handler);this.observe(function(){target.detachEvent(name,handler)})}})(); |
3394 | +PIE.OnResize=new PIE.Observable;PIE.OnUnload.attachManagedEvent(window,"onresize",function(){PIE.OnResize.fire()});(function(){PIE.OnScroll=new PIE.Observable;function scrolled(){PIE.OnScroll.fire()}PIE.OnUnload.attachManagedEvent(window,"onscroll",scrolled);PIE.OnResize.observe(scrolled)})();(function(){var elements;function beforePrint(){elements=PIE.Element.destroyAll()}function afterPrint(){if(elements){for(var i=0,len=elements.length;i<len;i++)PIE["attach"](elements[i]);elements=0}}PIE.OnUnload.attachManagedEvent(window, |
3395 | +"onbeforeprint",beforePrint);PIE.OnUnload.attachManagedEvent(window,"onafterprint",afterPrint)})();PIE.OnMouseup=new PIE.Observable;PIE.OnUnload.attachManagedEvent(doc,"onmouseup",function(){PIE.OnMouseup.fire()});PIE.Length=function(){var lengthCalcEl=doc.createElement("length-calc"),parent=doc.documentElement,s=lengthCalcEl.style,conversions={},units=["mm","cm","in","pt","pc"],i=units.length,instances={};s.position="absolute";s.top=s.left="-9999px";parent.appendChild(lengthCalcEl);while(i--){lengthCalcEl.style.width= |
3396 | +"100"+units[i];conversions[units[i]]=lengthCalcEl.offsetWidth/100}parent.removeChild(lengthCalcEl);lengthCalcEl.style.width="1em";function Length(val){this.val=val}Length.prototype={unitRE:/(px|em|ex|mm|cm|in|pt|pc|%)$/,getNumber:function(){var num=this.num,UNDEF;if(num===UNDEF)num=this.num=parseFloat(this.val);return num},getUnit:function(){var unit=this.unit,m;if(!unit){m=this.val.match(this.unitRE);unit=this.unit=m&&m[0]||"px"}return unit},isPercentage:function(){return this.getUnit()==="%"},pixels:function(el, |
3397 | +pct100){var num=this.getNumber(),unit=this.getUnit();switch(unit){case "px":return num;case "%":return num*(typeof pct100==="function"?pct100():pct100)/100;case "em":return num*this.getEmPixels(el);case "ex":return num*this.getEmPixels(el)/2;default:return num*conversions[unit]}},getEmPixels:function(el){var fs=el.currentStyle.fontSize,px,parent,me;if(fs.indexOf("px")>0)return parseFloat(fs);else if(el.tagName in PIE.childlessElements){me=this;parent=el.parentNode;return PIE.getLength(fs).pixels(parent, |
3398 | +function(){return me.getEmPixels(parent)})}else{el.appendChild(lengthCalcEl);px=lengthCalcEl.offsetWidth;if(lengthCalcEl.parentNode===el)el.removeChild(lengthCalcEl);return px}}};PIE.getLength=function(val){return instances[val]||(instances[val]=new Length(val))};return Length}();PIE.BgPosition=function(){var length_fifty=PIE.getLength("50%"),vert_idents={"top":1,"center":1,"bottom":1},horiz_idents={"left":1,"center":1,"right":1};function BgPosition(tokens){this.tokens=tokens}BgPosition.prototype= |
3399 | +{getValues:function(){if(!this._values){var tokens=this.tokens,len=tokens.length,Tokenizer=PIE.Tokenizer,identType=Tokenizer.Type,length_zero=PIE.getLength("0"),type_ident=identType.IDENT,type_length=identType.LENGTH,type_percent=identType.PERCENT,type,value,vals=["left",length_zero,"top",length_zero];if(len===1){tokens.push(new Tokenizer.Token(type_ident,"center"));len++}if(len===2){if(type_ident&(tokens[0].tokenType|tokens[1].tokenType)&&tokens[0].tokenValue in vert_idents&&tokens[1].tokenValue in |
3400 | +horiz_idents)tokens.push(tokens.shift());if(tokens[0].tokenType&type_ident)if(tokens[0].tokenValue==="center")vals[1]=length_fifty;else vals[0]=tokens[0].tokenValue;else if(tokens[0].isLengthOrPercent())vals[1]=PIE.getLength(tokens[0].tokenValue);if(tokens[1].tokenType&type_ident)if(tokens[1].tokenValue==="center")vals[3]=length_fifty;else vals[2]=tokens[1].tokenValue;else if(tokens[1].isLengthOrPercent())vals[3]=PIE.getLength(tokens[1].tokenValue)}else;this._values=vals}return this._values},coords:function(el, |
3401 | +width,height){var vals=this.getValues(),pxX=vals[1].pixels(el,width),pxY=vals[3].pixels(el,height);return{x:vals[0]==="right"?width-pxX:pxX,y:vals[2]==="bottom"?height-pxY:pxY}}};return BgPosition}();PIE.BgSize=function(){var CONTAIN="contain",COVER="cover",AUTO="auto";function BgSize(w,h){this.w=w;this.h=h}BgSize.prototype={pixels:function(el,areaW,areaH,imgW,imgH){var me=this,w=me.w,h=me.h,areaRatio=areaW/areaH,imgRatio=imgW/imgH;if(w===CONTAIN){w=imgRatio>areaRatio?areaW:areaH*imgRatio;h=imgRatio> |
3402 | +areaRatio?areaW/imgRatio:areaH}else if(w===COVER){w=imgRatio<areaRatio?areaW:areaH*imgRatio;h=imgRatio<areaRatio?areaW/imgRatio:areaH}else if(w===AUTO){h=h===AUTO?imgH:h.pixels(el,areaH);w=h*imgRatio}else{w=w.pixels(el,areaW);h=h===AUTO?w/imgRatio:h.pixels(el,areaH)}return{w:w,h:h}}};BgSize.DEFAULT=new BgSize(AUTO,AUTO);return BgSize}();PIE.Angle=function(){function Angle(val){this.val=val}Angle.prototype={unitRE:/[a-z]+$/i,getUnit:function(){return this._unit||(this._unit=this.val.match(this.unitRE)[0].toLowerCase())}, |
3403 | +degrees:function(){var deg=this._deg,u,n;if(deg===undefined){u=this.getUnit();n=parseFloat(this.val,10);deg=this._deg=u==="deg"?n:u==="rad"?n/Math.PI*180:u==="grad"?n/400*360:u==="turn"?n*360:0}return deg}};return Angle}();PIE.Color=function(){var instances={};function Color(val){this.val=val}Color.rgbaRE=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;Color.names={"aliceblue":"F0F8FF","antiquewhite":"FAEBD7","aqua":"0FF","aquamarine":"7FFFD4","azure":"F0FFFF", |
3404 | +"beige":"F5F5DC","bisque":"FFE4C4","black":"000","blanchedalmond":"FFEBCD","blue":"00F","blueviolet":"8A2BE2","brown":"A52A2A","burlywood":"DEB887","cadetblue":"5F9EA0","chartreuse":"7FFF00","chocolate":"D2691E","coral":"FF7F50","cornflowerblue":"6495ED","cornsilk":"FFF8DC","crimson":"DC143C","cyan":"0FF","darkblue":"00008B","darkcyan":"008B8B","darkgoldenrod":"B8860B","darkgray":"A9A9A9","darkgreen":"006400","darkkhaki":"BDB76B","darkmagenta":"8B008B","darkolivegreen":"556B2F","darkorange":"FF8C00", |
3405 | +"darkorchid":"9932CC","darkred":"8B0000","darksalmon":"E9967A","darkseagreen":"8FBC8F","darkslateblue":"483D8B","darkslategray":"2F4F4F","darkturquoise":"00CED1","darkviolet":"9400D3","deeppink":"FF1493","deepskyblue":"00BFFF","dimgray":"696969","dodgerblue":"1E90FF","firebrick":"B22222","floralwhite":"FFFAF0","forestgreen":"228B22","fuchsia":"F0F","gainsboro":"DCDCDC","ghostwhite":"F8F8FF","gold":"FFD700","goldenrod":"DAA520","gray":"808080","green":"008000","greenyellow":"ADFF2F","honeydew":"F0FFF0", |
3406 | +"hotpink":"FF69B4","indianred":"CD5C5C","indigo":"4B0082","ivory":"FFFFF0","khaki":"F0E68C","lavender":"E6E6FA","lavenderblush":"FFF0F5","lawngreen":"7CFC00","lemonchiffon":"FFFACD","lightblue":"ADD8E6","lightcoral":"F08080","lightcyan":"E0FFFF","lightgoldenrodyellow":"FAFAD2","lightgreen":"90EE90","lightgrey":"D3D3D3","lightpink":"FFB6C1","lightsalmon":"FFA07A","lightseagreen":"20B2AA","lightskyblue":"87CEFA","lightslategray":"789","lightsteelblue":"B0C4DE","lightyellow":"FFFFE0","lime":"0F0","limegreen":"32CD32", |
3407 | +"linen":"FAF0E6","magenta":"F0F","maroon":"800000","mediumauqamarine":"66CDAA","mediumblue":"0000CD","mediumorchid":"BA55D3","mediumpurple":"9370D8","mediumseagreen":"3CB371","mediumslateblue":"7B68EE","mediumspringgreen":"00FA9A","mediumturquoise":"48D1CC","mediumvioletred":"C71585","midnightblue":"191970","mintcream":"F5FFFA","mistyrose":"FFE4E1","moccasin":"FFE4B5","navajowhite":"FFDEAD","navy":"000080","oldlace":"FDF5E6","olive":"808000","olivedrab":"688E23","orange":"FFA500","orangered":"FF4500", |
3408 | +"orchid":"DA70D6","palegoldenrod":"EEE8AA","palegreen":"98FB98","paleturquoise":"AFEEEE","palevioletred":"D87093","papayawhip":"FFEFD5","peachpuff":"FFDAB9","peru":"CD853F","pink":"FFC0CB","plum":"DDA0DD","powderblue":"B0E0E6","purple":"800080","red":"F00","rosybrown":"BC8F8F","royalblue":"4169E1","saddlebrown":"8B4513","salmon":"FA8072","sandybrown":"F4A460","seagreen":"2E8B57","seashell":"FFF5EE","sienna":"A0522D","silver":"C0C0C0","skyblue":"87CEEB","slateblue":"6A5ACD","slategray":"708090","snow":"FFFAFA", |
3409 | +"springgreen":"00FF7F","steelblue":"4682B4","tan":"D2B48C","teal":"008080","thistle":"D8BFD8","tomato":"FF6347","turquoise":"40E0D0","violet":"EE82EE","wheat":"F5DEB3","white":"FFF","whitesmoke":"F5F5F5","yellow":"FF0","yellowgreen":"9ACD32"};Color.prototype={parse:function(){if(!this._color){var me=this,v=me.val,vLower,m=v.match(Color.rgbaRE);if(m){me._color="rgb("+m[1]+","+m[2]+","+m[3]+")";me._alpha=parseFloat(m[4])}else{if((vLower=v.toLowerCase())in Color.names)v="#"+Color.names[vLower];me._color= |
3410 | +v;me._alpha=v==="transparent"?0:1}}},colorValue:function(el){this.parse();return this._color==="currentColor"?el.currentStyle.color:this._color},alpha:function(){this.parse();return this._alpha}};PIE.getColor=function(val){return instances[val]||(instances[val]=new Color(val))};return Color}();PIE.Tokenizer=function(){function Tokenizer(css){this.css=css;this.ch=0;this.tokens=[];this.tokenIndex=0}var Type=Tokenizer.Type={ANGLE:1,CHARACTER:2,COLOR:4,DIMEN:8,FUNCTION:16,IDENT:32,LENGTH:64,NUMBER:128, |
3411 | +OPERATOR:256,PERCENT:512,STRING:1024,URL:2048};Tokenizer.Token=function(type,value){this.tokenType=type;this.tokenValue=value};Tokenizer.Token.prototype={isLength:function(){return this.tokenType&Type.LENGTH||this.tokenType&Type.NUMBER&&this.tokenValue==="0"},isLengthOrPercent:function(){return this.isLength()||this.tokenType&Type.PERCENT}};Tokenizer.prototype={whitespace:/\s/,number:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,ident:/^\-?[_a-z][\w-]*/i,string:/^("([^"]*)"|'([^']*)')/, |
3412 | +operator:/^[\/,]/,hash:/^#[\w]+/,hashColor:/^#([\da-f]{6}|[\da-f]{3})/i,unitTypes:{"px":Type.LENGTH,"em":Type.LENGTH,"ex":Type.LENGTH,"mm":Type.LENGTH,"cm":Type.LENGTH,"in":Type.LENGTH,"pt":Type.LENGTH,"pc":Type.LENGTH,"deg":Type.ANGLE,"rad":Type.ANGLE,"grad":Type.ANGLE},colorFunctions:{"rgb":1,"rgba":1,"hsl":1,"hsla":1},next:function(forget){var css,ch,firstChar,match,val,me=this;function newToken(type,value){var tok=new Tokenizer.Token(type,value);if(!forget){me.tokens.push(tok);me.tokenIndex++}return tok} |
3413 | +function failure(){me.tokenIndex++;return null}if(this.tokenIndex<this.tokens.length)return this.tokens[this.tokenIndex++];while(this.whitespace.test(this.css.charAt(this.ch)))this.ch++;if(this.ch>=this.css.length)return failure();ch=this.ch;css=this.css.substring(this.ch);firstChar=css.charAt(0);switch(firstChar){case "#":if(match=css.match(this.hashColor)){this.ch+=match[0].length;return newToken(Type.COLOR,match[0])}break;case '"':case "'":if(match=css.match(this.string)){this.ch+=match[0].length; |
3414 | +return newToken(Type.STRING,match[2]||match[3]||"")}break;case "/":case ",":this.ch++;return newToken(Type.OPERATOR,firstChar);case "u":if(match=css.match(this.url)){this.ch+=match[0].length;return newToken(Type.URL,match[2]||match[3]||match[4]||"")}}if(match=css.match(this.number)){val=match[0];this.ch+=val.length;if(css.charAt(val.length)==="%"){this.ch++;return newToken(Type.PERCENT,val+"%")}if(match=css.substring(val.length).match(this.ident)){val+=match[0];this.ch+=match[0].length;return newToken(this.unitTypes[match[0].toLowerCase()]|| |
3415 | +Type.DIMEN,val)}return newToken(Type.NUMBER,val)}if(match=css.match(this.ident)){val=match[0];this.ch+=val.length;if(val.toLowerCase()in PIE.Color.names||val==="currentColor"||val==="transparent")return newToken(Type.COLOR,val);if(css.charAt(val.length)==="("){this.ch++;if(val.toLowerCase()in this.colorFunctions){function isNum(tok){return tok&&tok.tokenType&Type.NUMBER}function isNumOrPct(tok){return tok&&tok.tokenType&(Type.NUMBER|Type.PERCENT)}function isValue(tok,val){return tok&&tok.tokenValue=== |
3416 | +val}function next(){return me.next(1)}if((val.charAt(0)==="r"?isNumOrPct(next()):isNum(next()))&&isValue(next(),",")&&isNumOrPct(next())&&isValue(next(),",")&&isNumOrPct(next())&&(val==="rgb"||val==="hsa"||isValue(next(),",")&&isNum(next()))&&isValue(next(),")"))return newToken(Type.COLOR,this.css.substring(ch,this.ch));return failure()}return newToken(Type.FUNCTION,val)}return newToken(Type.IDENT,val)}this.ch++;return newToken(Type.CHARACTER,firstChar)},hasNext:function(){var next=this.next();this.prev(); |
3417 | +return!!next},prev:function(){return this.tokens[this.tokenIndex-- -2]},all:function(){while(this.next());return this.tokens},until:function(func,require){var list=[],t,hit;while(t=this.next()){if(func(t)){hit=true;this.prev();break}list.push(t)}return require&&!hit?null:list}};return Tokenizer}();PIE.BoundsInfo=function(el){this.targetElement=el};PIE.BoundsInfo.prototype={_locked:0,positionChanged:function(){var last=this._lastBounds,bounds;return!last||(bounds=this.getBounds())&&(last.x!==bounds.x|| |
3418 | +last.y!==bounds.y)},sizeChanged:function(){var last=this._lastBounds,bounds;return!last||(bounds=this.getBounds())&&(last.w!==bounds.w||last.h!==bounds.h)},getLiveBounds:function(){var el=this.targetElement,rect=el.getBoundingClientRect(),isIE9=PIE.ieDocMode===9;return{x:rect.left,y:rect.top,w:isIE9?el.offsetWidth:rect.right-rect.left,h:isIE9?el.offsetHeight:rect.bottom-rect.top}},getBounds:function(){return this._locked?this._lockedBounds||(this._lockedBounds=this.getLiveBounds()):this.getLiveBounds()}, |
3419 | +hasBeenQueried:function(){return!!this._lastBounds},lock:function(){++this._locked},unlock:function(){if(!--this._locked){if(this._lockedBounds)this._lastBounds=this._lockedBounds;this._lockedBounds=null}}};(function(){function cacheWhenLocked(fn){var uid=PIE.Util.getUID(fn);return function(){if(this._locked){var cache=this._lockedValues||(this._lockedValues={});return uid in cache?cache[uid]:cache[uid]=fn.call(this)}else return fn.call(this)}}PIE.StyleInfoBase={_locked:0,newStyleInfo:function(proto){function StyleInfo(el){this.targetElement= |
3420 | +el;this._lastCss=this.getCss()}PIE.Util.merge(StyleInfo.prototype,PIE.StyleInfoBase,proto);StyleInfo._propsCache={};return StyleInfo},getProps:function(){var css=this.getCss(),cache=this.constructor._propsCache;return css?css in cache?cache[css]:cache[css]=this.parseCss(css):null},getCss:cacheWhenLocked(function(){var el=this.targetElement,ctor=this.constructor,s=el.style,cs=el.currentStyle,cssProp=this.cssProperty,styleProp=this.styleProperty,prefixedCssProp=ctor._prefixedCssProp||(ctor._prefixedCssProp= |
3421 | +PIE.CSS_PREFIX+cssProp),prefixedStyleProp=ctor._prefixedStyleProp||(ctor._prefixedStyleProp=PIE.STYLE_PREFIX+styleProp.charAt(0).toUpperCase()+styleProp.substring(1));return s[prefixedStyleProp]||cs.getAttribute(prefixedCssProp)||s[styleProp]||cs.getAttribute(cssProp)}),isActive:cacheWhenLocked(function(){return!!this.getProps()}),changed:cacheWhenLocked(function(){var currentCss=this.getCss(),changed=currentCss!==this._lastCss;this._lastCss=currentCss;return changed}),cacheWhenLocked:cacheWhenLocked, |
3422 | +lock:function(){++this._locked},unlock:function(){if(!--this._locked)delete this._lockedValues}}})();PIE.BackgroundStyleInfo=PIE.StyleInfoBase.newStyleInfo({cssProperty:PIE.CSS_PREFIX+"background",styleProperty:PIE.STYLE_PREFIX+"Background",attachIdents:{"scroll":1,"fixed":1,"local":1},repeatIdents:{"repeat-x":1,"repeat-y":1,"repeat":1,"no-repeat":1},originAndClipIdents:{"padding-box":1,"border-box":1,"content-box":1},positionIdents:{"top":1,"right":1,"bottom":1,"left":1,"center":1},sizeIdents:{"contain":1, |
3423 | +"cover":1},propertyNames:{CLIP:"backgroundClip",COLOR:"backgroundColor",IMAGE:"backgroundImage",ORIGIN:"backgroundOrigin",POSITION:"backgroundPosition",REPEAT:"backgroundRepeat",SIZE:"backgroundSize"},parseCss:function(css){var el=this.targetElement,cs=el.currentStyle,tokenizer,token,image,tok_type=PIE.Tokenizer.Type,type_operator=tok_type.OPERATOR,type_ident=tok_type.IDENT,type_color=tok_type.COLOR,tokType,tokVal,beginCharIndex=0,positionIdents=this.positionIdents,gradient,stop,width,height,props= |
3424 | +{bgImages:[]};function isBgPosToken(token){return token&&token.isLengthOrPercent()||token.tokenType&type_ident&&token.tokenValue in positionIdents}function sizeToken(token){return token&&(token.isLengthOrPercent()&&PIE.getLength(token.tokenValue)||token.tokenValue==="auto"&&"auto")}if(this.getCss3()){tokenizer=new PIE.Tokenizer(css);image={};while(token=tokenizer.next()){tokType=token.tokenType;tokVal=token.tokenValue;if(!image.imgType&&tokType&tok_type.FUNCTION&&tokVal==="linear-gradient"){gradient= |
3425 | +{stops:[],imgType:tokVal};stop={};while(token=tokenizer.next()){tokType=token.tokenType;tokVal=token.tokenValue;if(tokType&tok_type.CHARACTER&&tokVal===")"){if(stop.color)gradient.stops.push(stop);if(gradient.stops.length>1)PIE.Util.merge(image,gradient);break}if(tokType&type_color){if(gradient.angle||gradient.gradientStart){token=tokenizer.prev();if(token.tokenType!==type_operator)break;tokenizer.next()}stop={color:PIE.getColor(tokVal)};token=tokenizer.next();if(token.isLengthOrPercent())stop.offset= |
3426 | +PIE.getLength(token.tokenValue);else tokenizer.prev()}else if(tokType&tok_type.ANGLE&&!gradient.angle&&!stop.color&&!gradient.stops.length)gradient.angle=new PIE.Angle(token.tokenValue);else if(isBgPosToken(token)&&!gradient.gradientStart&&!stop.color&&!gradient.stops.length){tokenizer.prev();gradient.gradientStart=new PIE.BgPosition(tokenizer.until(function(t){return!isBgPosToken(t)},false))}else if(tokType&type_operator&&tokVal===","){if(stop.color){gradient.stops.push(stop);stop={}}}else break}}else if(!image.imgType&& |
3427 | +tokType&tok_type.URL){image.imgUrl=tokVal;image.imgType="image"}else if(isBgPosToken(token)&&!image.bgPosition){tokenizer.prev();image.bgPosition=new PIE.BgPosition(tokenizer.until(function(t){return!isBgPosToken(t)},false))}else if(tokType&type_ident)if(tokVal in this.repeatIdents&&!image.imgRepeat)image.imgRepeat=tokVal;else if(tokVal in this.originAndClipIdents&&!image.bgOrigin){image.bgOrigin=tokVal;if((token=tokenizer.next())&&token.tokenType&type_ident&&token.tokenValue in this.originAndClipIdents)image.bgClip= |
3428 | +token.tokenValue;else{image.bgClip=tokVal;tokenizer.prev()}}else if(tokVal in this.attachIdents&&!image.bgAttachment)image.bgAttachment=tokVal;else return null;else if(tokType&type_color&&!props.color)props.color=PIE.getColor(tokVal);else if(tokType&type_operator&&tokVal==="/"&&!image.bgSize&&image.bgPosition){token=tokenizer.next();if(token.tokenType&type_ident&&token.tokenValue in this.sizeIdents)image.bgSize=new PIE.BgSize(token.tokenValue);else if(width=sizeToken(token)){height=sizeToken(tokenizer.next()); |
3429 | +if(!height){height=width;tokenizer.prev()}image.bgSize=new PIE.BgSize(width,height)}else return null}else if(tokType&type_operator&&tokVal===","&&image.imgType){image.origString=css.substring(beginCharIndex,tokenizer.ch-1);beginCharIndex=tokenizer.ch;props.bgImages.push(image);image={}}else return null}if(image.imgType){image.origString=css.substring(beginCharIndex);props.bgImages.push(image)}}else this.withActualBg(PIE.ieDocMode<9?function(){var propNames=this.propertyNames,posX=cs[propNames.POSITION+ |
3430 | +"X"],posY=cs[propNames.POSITION+"Y"],img=cs[propNames.IMAGE],color=cs[propNames.COLOR];if(color!=="transparent")props.color=PIE.getColor(color);if(img!=="none")props.bgImages=[{imgType:"image",imgUrl:(new PIE.Tokenizer(img)).next().tokenValue,imgRepeat:cs[propNames.REPEAT],bgPosition:new PIE.BgPosition((new PIE.Tokenizer(posX+" "+posY)).all())}]}:function(){var propNames=this.propertyNames,splitter=/\s*,\s*/,images=cs[propNames.IMAGE].split(splitter),color=cs[propNames.COLOR],repeats,positions,origins, |
3431 | +clips,sizes,i,len,image,sizeParts;if(color!=="transparent")props.color=PIE.getColor(color);len=images.length;if(len&&images[0]!=="none"){repeats=cs[propNames.REPEAT].split(splitter);positions=cs[propNames.POSITION].split(splitter);origins=cs[propNames.ORIGIN].split(splitter);clips=cs[propNames.CLIP].split(splitter);sizes=cs[propNames.SIZE].split(splitter);props.bgImages=[];for(i=0;i<len;i++){image=images[i];if(image&&image!=="none"){sizeParts=sizes[i].split(" ");props.bgImages.push({origString:image+ |
3432 | +" "+repeats[i]+" "+positions[i]+" / "+sizes[i]+" "+origins[i]+" "+clips[i],imgType:"image",imgUrl:(new PIE.Tokenizer(image)).next().tokenValue,imgRepeat:repeats[i],bgPosition:new PIE.BgPosition((new PIE.Tokenizer(positions[i])).all()),bgOrigin:origins[i],bgClip:clips[i],bgSize:new PIE.BgSize(sizeParts[0],sizeParts[1])})}}}});return props.color||props.bgImages[0]?props:null},withActualBg:function(fn){var isIE9=PIE.ieDocMode>8,propNames=this.propertyNames,rs=this.targetElement.runtimeStyle,rsImage= |
3433 | +rs[propNames.IMAGE],rsColor=rs[propNames.COLOR],rsRepeat=rs[propNames.REPEAT],rsClip,rsOrigin,rsSize,rsPosition,ret;if(rsImage)rs[propNames.IMAGE]="";if(rsColor)rs[propNames.COLOR]="";if(rsRepeat)rs[propNames.REPEAT]="";if(isIE9){rsClip=rs[propNames.CLIP];rsOrigin=rs[propNames.ORIGIN];rsPosition=rs[propNames.POSITION];rsSize=rs[propNames.SIZE];if(rsClip)rs[propNames.CLIP]="";if(rsOrigin)rs[propNames.ORIGIN]="";if(rsPosition)rs[propNames.POSITION]="";if(rsSize)rs[propNames.SIZE]=""}ret=fn.call(this); |
3434 | +if(rsImage)rs[propNames.IMAGE]=rsImage;if(rsColor)rs[propNames.COLOR]=rsColor;if(rsRepeat)rs[propNames.REPEAT]=rsRepeat;if(isIE9){if(rsClip)rs[propNames.CLIP]=rsClip;if(rsOrigin)rs[propNames.ORIGIN]=rsOrigin;if(rsPosition)rs[propNames.POSITION]=rsPosition;if(rsSize)rs[propNames.SIZE]=rsSize}return ret},getCss:PIE.StyleInfoBase.cacheWhenLocked(function(){return this.getCss3()||this.withActualBg(function(){var cs=this.targetElement.currentStyle,propNames=this.propertyNames;return cs[propNames.COLOR]+ |
3435 | +" "+cs[propNames.IMAGE]+" "+cs[propNames.REPEAT]+" "+cs[propNames.POSITION+"X"]+" "+cs[propNames.POSITION+"Y"]})}),getCss3:PIE.StyleInfoBase.cacheWhenLocked(function(){var el=this.targetElement;return el.style[this.styleProperty]||el.currentStyle.getAttribute(this.cssProperty)}),isPngFix:function(){var val=0,el;if(PIE.ieVersion<7){el=this.targetElement;val=""+(el.style[PIE.STYLE_PREFIX+"PngFix"]||el.currentStyle.getAttribute(PIE.CSS_PREFIX+"png-fix"))==="true"}return val},isActive:PIE.StyleInfoBase.cacheWhenLocked(function(){return(this.getCss3()|| |
3436 | +this.isPngFix())&&!!this.getProps()})});PIE.BorderStyleInfo=PIE.StyleInfoBase.newStyleInfo({sides:["Top","Right","Bottom","Left"],namedWidths:{"thin":"1px","medium":"3px","thick":"5px"},parseCss:function(css){var w={},s={},c={},active=false,colorsSame=true,stylesSame=true,widthsSame=true;this.withActualBorder(function(){var el=this.targetElement,cs=el.currentStyle,i=0,style,color,width,lastStyle,lastColor,lastWidth,side,ltr;for(;i<4;i++){side=this.sides[i];ltr=side.charAt(0).toLowerCase();style=s[ltr]= |
3437 | +cs["border"+side+"Style"];color=cs["border"+side+"Color"];width=cs["border"+side+"Width"];if(i>0){if(style!==lastStyle)stylesSame=false;if(color!==lastColor)colorsSame=false;if(width!==lastWidth)widthsSame=false}lastStyle=style;lastColor=color;lastWidth=width;c[ltr]=PIE.getColor(color);width=w[ltr]=PIE.getLength(s[ltr]==="none"?"0":this.namedWidths[width]||width);if(width.pixels(this.targetElement)>0)active=true}});return active?{widths:w,styles:s,colors:c,widthsSame:widthsSame,colorsSame:colorsSame, |
3438 | +stylesSame:stylesSame}:null},getCss:PIE.StyleInfoBase.cacheWhenLocked(function(){var el=this.targetElement,cs=el.currentStyle,css;if(!(el.tagName in PIE.tableCellTags&&el.offsetParent.currentStyle.borderCollapse==="collapse"))this.withActualBorder(function(){css=cs.borderWidth+"|"+cs.borderStyle+"|"+cs.borderColor});return css}),withActualBorder:function(fn){var rs=this.targetElement.runtimeStyle,rsWidth=rs.borderWidth,rsColor=rs.borderColor,ret;if(rsWidth)rs.borderWidth="";if(rsColor)rs.borderColor= |
3439 | +"";ret=fn.call(this);if(rsWidth)rs.borderWidth=rsWidth;if(rsColor)rs.borderColor=rsColor;return ret}});(function(){PIE.BorderRadiusStyleInfo=PIE.StyleInfoBase.newStyleInfo({cssProperty:"border-radius",styleProperty:"borderRadius",parseCss:function(css){var p=null,x,y,tokenizer,token,length,hasNonZero=false;if(css){tokenizer=new PIE.Tokenizer(css);function collectLengths(){var arr=[],num;while((token=tokenizer.next())&&token.isLengthOrPercent()){length=PIE.getLength(token.tokenValue);num=length.getNumber(); |
3440 | +if(num<0)return null;if(num>0)hasNonZero=true;arr.push(length)}return arr.length>0&&arr.length<5?{"tl":arr[0],"tr":arr[1]||arr[0],"br":arr[2]||arr[0],"bl":arr[3]||arr[1]||arr[0]}:null}if(x=collectLengths()){if(token){if(token.tokenType&PIE.Tokenizer.Type.OPERATOR&&token.tokenValue==="/")y=collectLengths()}else y=x;if(hasNonZero&&x&&y)p={x:x,y:y}}}return p}});var zero=PIE.getLength("0"),zeros={"tl":zero,"tr":zero,"br":zero,"bl":zero};PIE.BorderRadiusStyleInfo.ALL_ZERO={x:zeros,y:zeros}})();PIE.BorderImageStyleInfo= |
3441 | +PIE.StyleInfoBase.newStyleInfo({cssProperty:"border-image",styleProperty:"borderImage",repeatIdents:{"stretch":1,"round":1,"repeat":1,"space":1},parseCss:function(css){var p=null,tokenizer,token,type,value,slices,widths,outsets,slashCount=0,Type=PIE.Tokenizer.Type,IDENT=Type.IDENT,NUMBER=Type.NUMBER,PERCENT=Type.PERCENT;if(css){tokenizer=new PIE.Tokenizer(css);p={};function isSlash(token){return token&&token.tokenType&Type.OPERATOR&&token.tokenValue==="/"}function isFillIdent(token){return token&& |
3442 | +token.tokenType&IDENT&&token.tokenValue==="fill"}function collectSlicesEtc(){slices=tokenizer.until(function(tok){return!(tok.tokenType&(NUMBER|PERCENT))});if(isFillIdent(tokenizer.next())&&!p.fill)p.fill=true;else tokenizer.prev();if(isSlash(tokenizer.next())){slashCount++;widths=tokenizer.until(function(token){return!token.isLengthOrPercent()&&!(token.tokenType&IDENT&&token.tokenValue==="auto")});if(isSlash(tokenizer.next())){slashCount++;outsets=tokenizer.until(function(token){return!token.isLength()})}}else tokenizer.prev()} |
3443 | +while(token=tokenizer.next()){type=token.tokenType;value=token.tokenValue;if(type&(NUMBER|PERCENT)&&!slices){tokenizer.prev();collectSlicesEtc()}else if(isFillIdent(token)&&!p.fill){p.fill=true;collectSlicesEtc()}else if(type&IDENT&&this.repeatIdents[value]&&!p.repeat){p.repeat={h:value};if(token=tokenizer.next())if(token.tokenType&IDENT&&this.repeatIdents[token.tokenValue])p.repeat.v=token.tokenValue;else tokenizer.prev()}else if(type&Type.URL&&!p.src)p.src=value;else return null}if(!p.src||!slices|| |
3444 | +slices.length<1||slices.length>4||widths&&widths.length>4||slashCount===1&&widths.length<1||outsets&&outsets.length>4||slashCount===2&&outsets.length<1)return null;if(!p.repeat)p.repeat={h:"stretch"};if(!p.repeat.v)p.repeat.v=p.repeat.h;function distributeSides(tokens,convertFn){return{"t":convertFn(tokens[0]),"r":convertFn(tokens[1]||tokens[0]),"b":convertFn(tokens[2]||tokens[0]),"l":convertFn(tokens[3]||tokens[1]||tokens[0])}}p.slice=distributeSides(slices,function(tok){return PIE.getLength(tok.tokenType& |
3445 | +NUMBER?tok.tokenValue+"px":tok.tokenValue)});if(widths&&widths[0])p.widths=distributeSides(widths,function(tok){return tok.isLengthOrPercent()?PIE.getLength(tok.tokenValue):tok.tokenValue});if(outsets&&outsets[0])p.outset=distributeSides(outsets,function(tok){return tok.isLength()?PIE.getLength(tok.tokenValue):tok.tokenValue})}return p}});PIE.BoxShadowStyleInfo=PIE.StyleInfoBase.newStyleInfo({cssProperty:"box-shadow",styleProperty:"boxShadow",parseCss:function(css){var props,getLength=PIE.getLength, |
3446 | +Type=PIE.Tokenizer.Type,tokenizer;if(css){tokenizer=new PIE.Tokenizer(css);props={outset:[],inset:[]};function parseItem(){var token,type,value,color,lengths,inset,len;while(token=tokenizer.next()){value=token.tokenValue;type=token.tokenType;if(type&Type.OPERATOR&&value===",")break;else if(token.isLength()&&!lengths){tokenizer.prev();lengths=tokenizer.until(function(token){return!token.isLength()})}else if(type&Type.COLOR&&!color)color=value;else if(type&Type.IDENT&&value==="inset"&&!inset)inset= |
3447 | +true;else return false}len=lengths&&lengths.length;if(len>1&&len<5){(inset?props.inset:props.outset).push({xOffset:getLength(lengths[0].tokenValue),yOffset:getLength(lengths[1].tokenValue),blur:getLength(lengths[2]?lengths[2].tokenValue:"0"),spread:getLength(lengths[3]?lengths[3].tokenValue:"0"),color:PIE.getColor(color||"currentColor")});return true}return false}while(parseItem());}return props&&(props.inset.length||props.outset.length)?props:null}});PIE.VisibilityStyleInfo=PIE.StyleInfoBase.newStyleInfo({getCss:PIE.StyleInfoBase.cacheWhenLocked(function(){var cs= |
3448 | +this.targetElement.currentStyle;return cs.visibility+"|"+cs.display}),parseCss:function(){var el=this.targetElement,rs=el.runtimeStyle,cs=el.currentStyle,rsVis=rs.visibility,csVis;rs.visibility="";csVis=cs.visibility;rs.visibility=rsVis;return{visible:csVis!=="hidden",displayed:cs.display!=="none"}},isActive:function(){return false}});PIE.RendererBase={newRenderer:function(proto){function Renderer(el,boundsInfo,styleInfos,parent){this.targetElement=el;this.boundsInfo=boundsInfo;this.styleInfos=styleInfos; |
3449 | +this.parent=parent}PIE.Util.merge(Renderer.prototype,PIE.RendererBase,proto);return Renderer},isPositioned:false,needsUpdate:function(){return false},prepareUpdate:PIE.emptyFn,updateProps:function(){this.destroy();if(this.isActive())this.draw()},updatePos:function(){this.isPositioned=true},updateSize:function(){if(this.isActive())this.draw();else this.destroy()},addLayer:function(index,el){this.removeLayer(index);for(var layers=this._layers||(this._layers=[]),i=index+1,len=layers.length,layer;i<len;i++){layer= |
3450 | +layers[i];if(layer)break}layers[index]=el;this.getBox().insertBefore(el,layer||null)},getLayer:function(index){var layers=this._layers;return layers&&layers[index]||null},removeLayer:function(index){var layer=this.getLayer(index),box=this._box;if(layer&&box){box.removeChild(layer);this._layers[index]=null}},getShape:function(name,subElName,parent,group){var shapes=this._shapes||(this._shapes={}),shape=shapes[name],s;if(!shape){shape=shapes[name]=PIE.Util.createVmlElement("shape");if(subElName)shape.appendChild(shape[subElName]= |
3451 | +PIE.Util.createVmlElement(subElName));if(group){parent=this.getLayer(group);if(!parent){this.addLayer(group,doc.createElement("group"+group));parent=this.getLayer(group)}}parent.appendChild(shape);s=shape.style;s.position="absolute";s.left=s.top=0;s["behavior"]="url(#default#VML)"}return shape},deleteShape:function(name){var shapes=this._shapes,shape=shapes&&shapes[name];if(shape){shape.parentNode.removeChild(shape);delete shapes[name]}return!!shape},getRadiiPixels:function(radii){var el=this.targetElement, |
3452 | +bounds=this.boundsInfo.getBounds(),w=bounds.w,h=bounds.h,tlX,tlY,trX,trY,brX,brY,blX,blY,f;tlX=radii.x["tl"].pixels(el,w);tlY=radii.y["tl"].pixels(el,h);trX=radii.x["tr"].pixels(el,w);trY=radii.y["tr"].pixels(el,h);brX=radii.x["br"].pixels(el,w);brY=radii.y["br"].pixels(el,h);blX=radii.x["bl"].pixels(el,w);blY=radii.y["bl"].pixels(el,h);f=Math.min(w/(tlX+trX),h/(trY+brY),w/(blX+brX),h/(tlY+blY));if(f<1){tlX*=f;tlY*=f;trX*=f;trY*=f;brX*=f;brY*=f;blX*=f;blY*=f}return{x:{"tl":tlX,"tr":trX,"br":brX,"bl":blX}, |
3453 | +y:{"tl":tlY,"tr":trY,"br":brY,"bl":blY}}},getBoxPath:function(shrink,mult,radii){mult=mult||1;var r,str,bounds=this.boundsInfo.getBounds(),w=bounds.w*mult,h=bounds.h*mult,radInfo=this.styleInfos.borderRadiusInfo,floor=Math.floor,ceil=Math.ceil,shrinkT=shrink?shrink.t*mult:0,shrinkR=shrink?shrink.r*mult:0,shrinkB=shrink?shrink.b*mult:0,shrinkL=shrink?shrink.l*mult:0,tlX,tlY,trX,trY,brX,brY,blX,blY;if(radii||radInfo.isActive()){r=this.getRadiiPixels(radii||radInfo.getProps());tlX=r.x["tl"]*mult;tlY= |
3454 | +r.y["tl"]*mult;trX=r.x["tr"]*mult;trY=r.y["tr"]*mult;brX=r.x["br"]*mult;brY=r.y["br"]*mult;blX=r.x["bl"]*mult;blY=r.y["bl"]*mult;str="m"+floor(shrinkL)+","+floor(tlY)+"qy"+floor(tlX)+","+floor(shrinkT)+"l"+ceil(w-trX)+","+floor(shrinkT)+"qx"+ceil(w-shrinkR)+","+floor(trY)+"l"+ceil(w-shrinkR)+","+ceil(h-brY)+"qy"+ceil(w-brX)+","+ceil(h-shrinkB)+"l"+floor(blX)+","+ceil(h-shrinkB)+"qx"+floor(shrinkL)+","+ceil(h-blY)+" x e"}else str="m"+floor(shrinkL)+","+floor(shrinkT)+"l"+ceil(w-shrinkR)+","+floor(shrinkT)+ |
3455 | +"l"+ceil(w-shrinkR)+","+ceil(h-shrinkB)+"l"+floor(shrinkL)+","+ceil(h-shrinkB)+"xe";return str},getBox:function(){var box=this.parent.getLayer(this.boxZIndex),s;if(!box){box=doc.createElement(this.boxName);s=box.style;s.position="absolute";s.top=s.left=0;this.parent.addLayer(this.boxZIndex,box)}return box},hideBorder:function(){var el=this.targetElement,cs=el.currentStyle,rs=el.runtimeStyle,tag=el.tagName,isIE6=PIE.ieVersion===6,sides,side,i;if(isIE6&&(tag in PIE.childlessElements||tag==="FIELDSET")|| |
3456 | +tag==="BUTTON"||tag==="INPUT"&&el.type in PIE.inputButtonTypes){rs.borderWidth="";sides=this.styleInfos.borderInfo.sides;for(i=sides.length;i--;){side=sides[i];rs["padding"+side]="";rs["padding"+side]=PIE.getLength(cs["padding"+side]).pixels(el)+PIE.getLength(cs["border"+side+"Width"]).pixels(el)+(PIE.ieVersion!==8&&i%2?1:0)}rs.borderWidth=0}else if(isIE6){if(el.childNodes.length!==1||el.firstChild.tagName!=="ie6-mask"){var cont=doc.createElement("ie6-mask"),s=cont.style,child;s.visibility="visible"; |
3457 | +s.zoom=1;while(child=el.firstChild)cont.appendChild(child);el.appendChild(cont);rs.visibility="hidden"}}else rs.borderColor="transparent"},unhideBorder:function(){},destroy:function(){this.parent.removeLayer(this.boxZIndex);delete this._shapes;delete this._layers}};PIE.RootRenderer=PIE.RendererBase.newRenderer({isActive:function(){var children=this.childRenderers;for(var i in children)if(children.hasOwnProperty(i)&&children[i].isActive())return true;return false},needsUpdate:function(){return this.styleInfos.visibilityInfo.changed()}, |
3458 | +updatePos:function(){if(this.isActive()){var el=this.getPositioningElement(),par=el,docEl,parRect,tgtCS=el.currentStyle,tgtPos=tgtCS.position,boxPos,s=this.getBox().style,cs,x=0,y=0,elBounds=this.boundsInfo.getBounds();if(tgtPos==="fixed"&&PIE.ieVersion>6){x=elBounds.x;y=elBounds.y;boxPos=tgtPos}else{do par=par.offsetParent;while(par&&par.currentStyle.position==="static");if(par){parRect=par.getBoundingClientRect();cs=par.currentStyle;x=elBounds.x-parRect.left-(parseFloat(cs.borderLeftWidth)||0); |
3459 | +y=elBounds.y-parRect.top-(parseFloat(cs.borderTopWidth)||0)}else{docEl=doc.documentElement;x=elBounds.x+docEl.scrollLeft-docEl.clientLeft;y=elBounds.y+docEl.scrollTop-docEl.clientTop}boxPos="absolute"}s.position=boxPos;s.left=x;s.top=y;s.zIndex=tgtPos==="static"?-1:tgtCS.zIndex;this.isPositioned=true}},updateSize:PIE.emptyFn,updateVisibility:function(){var vis=this.styleInfos.visibilityInfo.getProps();this.getBox().style.display=vis.visible&&vis.displayed?"":"none"},updateProps:function(){if(this.isActive())this.updateVisibility(); |
3460 | +else this.destroy()},getPositioningElement:function(){var el=this.targetElement;return el.tagName in PIE.tableCellTags?el.offsetParent:el},getBox:function(){var box=this._box,el;if(!box){el=this.getPositioningElement();box=this._box=doc.createElement("css3-container");box.style["direction"]="ltr";this.updateVisibility();el.parentNode.insertBefore(box,el)}return box},finishUpdate:PIE.emptyFn,destroy:function(){var box=this._box,par;if(box&&(par=box.parentNode))par.removeChild(box);delete this._box; |
3461 | +delete this._layers}});PIE.BackgroundRenderer=PIE.RendererBase.newRenderer({boxZIndex:2,boxName:"background",needsUpdate:function(){var si=this.styleInfos;return si.backgroundInfo.changed()||si.borderRadiusInfo.changed()},isActive:function(){var si=this.styleInfos;return si.borderImageInfo.isActive()||si.borderRadiusInfo.isActive()||si.backgroundInfo.isActive()||si.boxShadowInfo.isActive()&&si.boxShadowInfo.getProps().inset},draw:function(){var bounds=this.boundsInfo.getBounds();if(bounds.w&&bounds.h){this.drawBgColor(); |
3462 | +this.drawBgImages()}},drawBgColor:function(){var props=this.styleInfos.backgroundInfo.getProps(),bounds=this.boundsInfo.getBounds(),el=this.targetElement,color=props&&props.color,shape,w,h,s,alpha;if(color&&color.alpha()>0){this.hideBackground();shape=this.getShape("bgColor","fill",this.getBox(),1);w=bounds.w;h=bounds.h;shape.stroked=false;shape.coordsize=w*2+","+h*2;shape.coordorigin="1,1";shape.path=this.getBoxPath(null,2);s=shape.style;s.width=w;s.height=h;shape.fill.color=color.colorValue(el); |
3463 | +alpha=color.alpha();if(alpha<1)shape.fill.opacity=alpha}else this.deleteShape("bgColor")},drawBgImages:function(){var props=this.styleInfos.backgroundInfo.getProps(),bounds=this.boundsInfo.getBounds(),images=props&&props.bgImages,img,shape,w,h,s,i;if(images){this.hideBackground();w=bounds.w;h=bounds.h;i=images.length;while(i--){img=images[i];shape=this.getShape("bgImage"+i,"fill",this.getBox(),2);shape.stroked=false;shape.fill.type="tile";shape.fillcolor="none";shape.coordsize=w*2+","+h*2;shape.coordorigin= |
3464 | +"1,1";shape.path=this.getBoxPath(0,2);s=shape.style;s.width=w;s.height=h;if(img.imgType==="linear-gradient")this.addLinearGradient(shape,img);else{shape.fill.src=img.imgUrl;this.positionBgImage(shape,i)}}}i=images?images.length:0;while(this.deleteShape("bgImage"+i++));},positionBgImage:function(shape,index){var me=this;PIE.Util.withImageSize(shape.fill.src,function(size){var el=me.targetElement,bounds=me.boundsInfo.getBounds(),elW=bounds.w,elH=bounds.h;if(elW&&elH){var fill=shape.fill,si=me.styleInfos, |
3465 | +border=si.borderInfo.getProps(),bw=border&&border.widths,bwT=bw?bw["t"].pixels(el):0,bwR=bw?bw["r"].pixels(el):0,bwB=bw?bw["b"].pixels(el):0,bwL=bw?bw["l"].pixels(el):0,bg=si.backgroundInfo.getProps().bgImages[index],bgPos=bg.bgPosition?bg.bgPosition.coords(el,elW-size.w-bwL-bwR,elH-size.h-bwT-bwB):{x:0,y:0},repeat=bg.imgRepeat,pxX,pxY,clipT=0,clipL=0,clipR=elW+1,clipB=elH+1,clipAdjust=PIE.ieVersion===8?0:1;pxX=Math.round(bgPos.x)+bwL+0.5;pxY=Math.round(bgPos.y)+bwT+0.5;fill.position=pxX/elW+","+ |
3466 | +pxY/elH;if(repeat&&repeat!=="repeat"){if(repeat==="repeat-x"||repeat==="no-repeat"){clipT=pxY+1;clipB=pxY+size.h+clipAdjust}if(repeat==="repeat-y"||repeat==="no-repeat"){clipL=pxX+1;clipR=pxX+size.w+clipAdjust}shape.style.clip="rect("+clipT+"px,"+clipR+"px,"+clipB+"px,"+clipL+"px)"}}})},addLinearGradient:function(shape,info){var el=this.targetElement,bounds=this.boundsInfo.getBounds(),w=bounds.w,h=bounds.h,fill=shape.fill,stops=info.stops,stopCount=stops.length,PI=Math.PI,GradientUtil=PIE.GradientUtil, |
3467 | +perpendicularIntersect=GradientUtil.perpendicularIntersect,distance=GradientUtil.distance,metrics=GradientUtil.getGradientMetrics(el,w,h,info),angle=metrics.angle,startX=metrics.startX,startY=metrics.startY,startCornerX=metrics.startCornerX,startCornerY=metrics.startCornerY,endCornerX=metrics.endCornerX,endCornerY=metrics.endCornerY,deltaX=metrics.deltaX,deltaY=metrics.deltaY,lineLength=metrics.lineLength,vmlAngle,vmlGradientLength,vmlColors,stopPx,vmlOffsetPct,p,i,j,before,after;vmlAngle=angle%90? |
3468 | +Math.atan2(deltaX*w/h,deltaY)/PI*180:angle+90;vmlAngle+=180;vmlAngle=vmlAngle%360;p=perpendicularIntersect(startCornerX,startCornerY,angle,endCornerX,endCornerY);vmlGradientLength=distance(startCornerX,startCornerY,p[0],p[1]);vmlColors=[];p=perpendicularIntersect(startX,startY,angle,startCornerX,startCornerY);vmlOffsetPct=distance(startX,startY,p[0],p[1])/vmlGradientLength*100;stopPx=[];for(i=0;i<stopCount;i++)stopPx.push(stops[i].offset?stops[i].offset.pixels(el,lineLength):i===0?0:i===stopCount- |
3469 | +1?lineLength:null);for(i=1;i<stopCount;i++){if(stopPx[i]===null){before=stopPx[i-1];j=i;do after=stopPx[++j];while(after===null);stopPx[i]=before+(after-before)/(j-i+1)}stopPx[i]=Math.max(stopPx[i],stopPx[i-1])}for(i=0;i<stopCount;i++)vmlColors.push(vmlOffsetPct+stopPx[i]/vmlGradientLength*100+"% "+stops[i].color.colorValue(el));fill["angle"]=vmlAngle;fill["type"]="gradient";fill["method"]="sigma";fill["color"]=stops[0].color.colorValue(el);fill["color2"]=stops[stopCount-1].color.colorValue(el);if(fill["colors"])fill["colors"].value= |
3470 | +vmlColors.join(",");else fill["colors"]=vmlColors.join(",")},hideBackground:function(){var rs=this.targetElement.runtimeStyle;rs.backgroundImage="url(about:blank)";rs.backgroundColor="transparent"},destroy:function(){PIE.RendererBase.destroy.call(this);var rs=this.targetElement.runtimeStyle;rs.backgroundImage=rs.backgroundColor=""}});PIE.BorderRenderer=PIE.RendererBase.newRenderer({boxZIndex:4,boxName:"border",needsUpdate:function(){var si=this.styleInfos;return si.borderInfo.changed()||si.borderRadiusInfo.changed()}, |
3471 | +isActive:function(){var si=this.styleInfos;return(si.borderRadiusInfo.isActive()||si.backgroundInfo.isActive())&&!si.borderImageInfo.isActive()&&si.borderInfo.isActive()},draw:function(){var el=this.targetElement,props=this.styleInfos.borderInfo.getProps(),bounds=this.boundsInfo.getBounds(),w=bounds.w,h=bounds.h,shape,stroke,s,segments,seg,i,len;if(props){this.hideBorder();segments=this.getBorderSegments(2);for(i=0,len=segments.length;i<len;i++){seg=segments[i];shape=this.getShape("borderPiece"+i, |
3472 | +seg.stroke?"stroke":"fill",this.getBox());shape.coordsize=w*2+","+h*2;shape.coordorigin="1,1";shape.path=seg.path;s=shape.style;s.width=w;s.height=h;shape.filled=!!seg.fill;shape.stroked=!!seg.stroke;if(seg.stroke){stroke=shape.stroke;stroke["weight"]=seg.weight+"px";stroke.color=seg.color.colorValue(el);stroke["dashstyle"]=seg.stroke==="dashed"?"2 2":seg.stroke==="dotted"?"1 1":"solid";stroke["linestyle"]=seg.stroke==="double"&&seg.weight>2?"ThinThin":"Single"}else shape.fill.color=seg.fill.colorValue(el)}while(this.deleteShape("borderPiece"+ |
3473 | +i++));}},getBorderSegments:function(mult){var el=this.targetElement,bounds,elW,elH,borderInfo=this.styleInfos.borderInfo,segments=[],floor,ceil,wT,wR,wB,wL,round=Math.round,borderProps,radiusInfo,radii,widths,styles,colors;if(borderInfo.isActive()){borderProps=borderInfo.getProps();widths=borderProps.widths;styles=borderProps.styles;colors=borderProps.colors;if(borderProps.widthsSame&&borderProps.stylesSame&&borderProps.colorsSame){if(colors["t"].alpha()>0){wT=widths["t"].pixels(el);wR=wT/2;segments.push({path:this.getBoxPath({t:wR, |
3474 | +r:wR,b:wR,l:wR},mult),stroke:styles["t"],color:colors["t"],weight:wT})}}else{mult=mult||1;bounds=this.boundsInfo.getBounds();elW=bounds.w;elH=bounds.h;wT=round(widths["t"].pixels(el));wR=round(widths["r"].pixels(el));wB=round(widths["b"].pixels(el));wL=round(widths["l"].pixels(el));var pxWidths={"t":wT,"r":wR,"b":wB,"l":wL};radiusInfo=this.styleInfos.borderRadiusInfo;if(radiusInfo.isActive())radii=this.getRadiiPixels(radiusInfo.getProps());floor=Math.floor;ceil=Math.ceil;function radius(xy,corner){return radii? |
3475 | +radii[xy][corner]:0}function curve(corner,shrinkX,shrinkY,startAngle,ccw,doMove){var rx=radius("x",corner),ry=radius("y",corner),deg=65535,isRight=corner.charAt(1)==="r",isBottom=corner.charAt(0)==="b";return rx>0&&ry>0?(doMove?"al":"ae")+(isRight?ceil(elW-rx):floor(rx))*mult+","+(isBottom?ceil(elH-ry):floor(ry))*mult+","+(floor(rx)-shrinkX)*mult+","+(floor(ry)-shrinkY)*mult+","+startAngle*deg+","+45*deg*(ccw?1:-1):(doMove?"m":"l")+(isRight?elW-shrinkX:shrinkX)*mult+","+(isBottom?elH-shrinkY:shrinkY)* |
3476 | +mult}function line(side,shrink,ccw,doMove){var start=side==="t"?floor(radius("x","tl"))*mult+","+ceil(shrink)*mult:side==="r"?ceil(elW-shrink)*mult+","+floor(radius("y","tr"))*mult:side==="b"?ceil(elW-radius("x","br"))*mult+","+floor(elH-shrink)*mult:floor(shrink)*mult+","+ceil(elH-radius("y","bl"))*mult,end=side==="t"?ceil(elW-radius("x","tr"))*mult+","+ceil(shrink)*mult:side==="r"?ceil(elW-shrink)*mult+","+ceil(elH-radius("y","br"))*mult:side==="b"?floor(radius("x","bl"))*mult+","+floor(elH-shrink)* |
3477 | +mult:floor(shrink)*mult+","+floor(radius("y","tl"))*mult;return ccw?(doMove?"m"+end:"")+"l"+start:(doMove?"m"+start:"")+"l"+end}function addSide(side,sideBefore,sideAfter,cornerBefore,cornerAfter,baseAngle){var vert=side==="l"||side==="r",sideW=pxWidths[side],beforeX,beforeY,afterX,afterY;if(sideW>0&&styles[side]!=="none"&&colors[side].alpha()>0){beforeX=pxWidths[vert?side:sideBefore];beforeY=pxWidths[vert?sideBefore:side];afterX=pxWidths[vert?side:sideAfter];afterY=pxWidths[vert?sideAfter:side]; |
3478 | +if(styles[side]==="dashed"||styles[side]==="dotted"){segments.push({path:curve(cornerBefore,beforeX,beforeY,baseAngle+45,0,1)+curve(cornerBefore,0,0,baseAngle,1,0),fill:colors[side]});segments.push({path:line(side,sideW/2,0,1),stroke:styles[side],weight:sideW,color:colors[side]});segments.push({path:curve(cornerAfter,afterX,afterY,baseAngle,0,1)+curve(cornerAfter,0,0,baseAngle-45,1,0),fill:colors[side]})}else segments.push({path:curve(cornerBefore,beforeX,beforeY,baseAngle+45,0,1)+line(side,sideW, |
3479 | +0,0)+curve(cornerAfter,afterX,afterY,baseAngle,0,0)+(styles[side]==="double"&&sideW>2?curve(cornerAfter,afterX-floor(afterX/3),afterY-floor(afterY/3),baseAngle-45,1,0)+line(side,ceil(sideW/3*2),1,0)+curve(cornerBefore,beforeX-floor(beforeX/3),beforeY-floor(beforeY/3),baseAngle,1,0)+"x "+curve(cornerBefore,floor(beforeX/3),floor(beforeY/3),baseAngle+45,0,1)+line(side,floor(sideW/3),1,0)+curve(cornerAfter,floor(afterX/3),floor(afterY/3),baseAngle,0,0):"")+curve(cornerAfter,0,0,baseAngle-45,1,0)+line(side, |
3480 | +0,1,0)+curve(cornerBefore,0,0,baseAngle,1,0),fill:colors[side]})}}addSide("t","l","r","tl","tr",90);addSide("r","t","b","tr","br",0);addSide("b","r","l","br","bl",-90);addSide("l","b","t","bl","tl",-180)}}return segments},destroy:function(){var me=this;if(me.finalized||!me.styleInfos.borderImageInfo.isActive())me.targetElement.runtimeStyle.borderColor="";PIE.RendererBase.destroy.call(me)}});PIE.BorderImageRenderer=PIE.RendererBase.newRenderer({boxZIndex:5,pieceNames:["t","tr","r","br","b","bl","l", |
3481 | +"tl","c"],needsUpdate:function(){return this.styleInfos.borderImageInfo.changed()},isActive:function(){return this.styleInfos.borderImageInfo.isActive()},draw:function(){this.getBox();var props=this.styleInfos.borderImageInfo.getProps(),borderProps=this.styleInfos.borderInfo.getProps(),bounds=this.boundsInfo.getBounds(),el=this.targetElement,pieces=this.pieces;PIE.Util.withImageSize(props.src,function(imgSize){var elW=bounds.w,elH=bounds.h,zero=PIE.getLength("0"),widths=props.widths||(borderProps? |
3482 | +borderProps.widths:{"t":zero,"r":zero,"b":zero,"l":zero}),widthT=widths["t"].pixels(el),widthR=widths["r"].pixels(el),widthB=widths["b"].pixels(el),widthL=widths["l"].pixels(el),slices=props.slice,sliceT=slices["t"].pixels(el),sliceR=slices["r"].pixels(el),sliceB=slices["b"].pixels(el),sliceL=slices["l"].pixels(el);function setSizeAndPos(piece,w,h,x,y){var s=pieces[piece].style,max=Math.max;s.width=max(w,0);s.height=max(h,0);s.left=x;s.top=y}setSizeAndPos("tl",widthL,widthT,0,0);setSizeAndPos("t", |
3483 | +elW-widthL-widthR,widthT,widthL,0);setSizeAndPos("tr",widthR,widthT,elW-widthR,0);setSizeAndPos("r",widthR,elH-widthT-widthB,elW-widthR,widthT);setSizeAndPos("br",widthR,widthB,elW-widthR,elH-widthB);setSizeAndPos("b",elW-widthL-widthR,widthB,widthL,elH-widthB);setSizeAndPos("bl",widthL,widthB,0,elH-widthB);setSizeAndPos("l",widthL,elH-widthT-widthB,0,widthT);setSizeAndPos("c",elW-widthL-widthR,elH-widthT-widthB,widthL,widthT);function setCrops(sides,crop,val){for(var i=0,len=sides.length;i<len;i++)pieces[sides[i]]["imagedata"][crop]= |
3484 | +val}setCrops(["tl","t","tr"],"cropBottom",(imgSize.h-sliceT)/imgSize.h);setCrops(["tl","l","bl"],"cropRight",(imgSize.w-sliceL)/imgSize.w);setCrops(["bl","b","br"],"cropTop",(imgSize.h-sliceB)/imgSize.h);setCrops(["tr","r","br"],"cropLeft",(imgSize.w-sliceR)/imgSize.w);setCrops(["l","r","c"],"cropTop",sliceT/imgSize.h);setCrops(["l","r","c"],"cropBottom",sliceB/imgSize.h);setCrops(["t","b","c"],"cropLeft",sliceL/imgSize.w);setCrops(["t","b","c"],"cropRight",sliceR/imgSize.w);pieces["c"].style.display= |
3485 | +props.fill?"":"none"},this)},getBox:function(){var box=this.parent.getLayer(this.boxZIndex),s,piece,i,pieceNames=this.pieceNames,len=pieceNames.length;if(!box){box=doc.createElement("border-image");s=box.style;s.position="absolute";this.pieces={};for(i=0;i<len;i++){piece=this.pieces[pieceNames[i]]=PIE.Util.createVmlElement("rect");piece.appendChild(PIE.Util.createVmlElement("imagedata"));s=piece.style;s["behavior"]="url(#default#VML)";s.position="absolute";s.top=s.left=0;piece["imagedata"].src=this.styleInfos.borderImageInfo.getProps().src; |
3486 | +piece.stroked=false;piece.filled=false;box.appendChild(piece)}this.parent.addLayer(this.boxZIndex,box)}return box},prepareUpdate:function(){if(this.isActive()){var me=this,el=me.targetElement,rs=el.runtimeStyle,widths=me.styleInfos.borderImageInfo.getProps().widths;rs.borderStyle="solid";if(widths){rs.borderTopWidth=widths["t"].pixels(el)+"px";rs.borderRightWidth=widths["r"].pixels(el)+"px";rs.borderBottomWidth=widths["b"].pixels(el)+"px";rs.borderLeftWidth=widths["l"].pixels(el)+"px"}me.hideBorder()}}, |
3487 | +destroy:function(){var me=this,rs=me.targetElement.runtimeStyle;rs.borderStyle="";if(me.finalized||!me.styleInfos.borderInfo.isActive())rs.borderColor=rs.borderWidth="";PIE.RendererBase.destroy.call(this)}});PIE.BoxShadowOutsetRenderer=PIE.RendererBase.newRenderer({boxZIndex:1,boxName:"outset-box-shadow",needsUpdate:function(){var si=this.styleInfos;return si.boxShadowInfo.changed()||si.borderRadiusInfo.changed()},isActive:function(){var boxShadowInfo=this.styleInfos.boxShadowInfo;return boxShadowInfo.isActive()&& |
3488 | +boxShadowInfo.getProps().outset[0]},draw:function(){var me=this,el=this.targetElement,box=this.getBox(),styleInfos=this.styleInfos,shadowInfos=styleInfos.boxShadowInfo.getProps().outset,radii=styleInfos.borderRadiusInfo.getProps(),len=shadowInfos.length,i=len,j,bounds=this.boundsInfo.getBounds(),w=bounds.w,h=bounds.h,clipAdjust=PIE.ieVersion===8?1:0,corners=["tl","tr","br","bl"],corner,shadowInfo,shape,fill,ss,xOff,yOff,spread,blur,shrink,color,alpha,path,totalW,totalH,focusX,focusY,isBottom,isRight; |
3489 | +function getShadowShape(index,corner,xOff,yOff,color,blur,path){var shape=me.getShape("shadow"+index+corner,"fill",box,len-index),fill=shape.fill;shape["coordsize"]=w*2+","+h*2;shape["coordorigin"]="1,1";shape["stroked"]=false;shape["filled"]=true;fill.color=color.colorValue(el);if(blur){fill["type"]="gradienttitle";fill["color2"]=fill.color;fill["opacity"]=0}shape.path=path;ss=shape.style;ss.left=xOff;ss.top=yOff;ss.width=w;ss.height=h;return shape}while(i--){shadowInfo=shadowInfos[i];xOff=shadowInfo.xOffset.pixels(el); |
3490 | +yOff=shadowInfo.yOffset.pixels(el);spread=shadowInfo.spread.pixels(el),blur=shadowInfo.blur.pixels(el);color=shadowInfo.color;shrink=-spread-blur;if(!radii&&blur)radii=PIE.BorderRadiusStyleInfo.ALL_ZERO;path=this.getBoxPath({t:shrink,r:shrink,b:shrink,l:shrink},2,radii);if(blur){totalW=(spread+blur)*2+w;totalH=(spread+blur)*2+h;focusX=blur*2/totalW;focusY=blur*2/totalH;if(blur-spread>w/2||blur-spread>h/2)for(j=4;j--;){corner=corners[j];isBottom=corner.charAt(0)==="b";isRight=corner.charAt(1)==="r"; |
3491 | +shape=getShadowShape(i,corner,xOff,yOff,color,blur,path);fill=shape.fill;fill["focusposition"]=(isRight?1-focusX:focusX)+","+(isBottom?1-focusY:focusY);fill["focussize"]="0,0";shape.style.clip="rect("+((isBottom?totalH/2:0)+clipAdjust)+"px,"+(isRight?totalW:totalW/2)+"px,"+(isBottom?totalH:totalH/2)+"px,"+((isRight?totalW/2:0)+clipAdjust)+"px)"}else{shape=getShadowShape(i,"",xOff,yOff,color,blur,path);fill=shape.fill;fill["focusposition"]=focusX+","+focusY;fill["focussize"]=1-focusX*2+","+(1-focusY* |
3492 | +2)}}else{shape=getShadowShape(i,"",xOff,yOff,color,blur,path);alpha=color.alpha();if(alpha<1)shape.fill.opacity=alpha}}}});PIE.ImgRenderer=PIE.RendererBase.newRenderer({boxZIndex:6,boxName:"imgEl",needsUpdate:function(){var si=this.styleInfos;return this.targetElement.src!==this._lastSrc||si.borderRadiusInfo.changed()},isActive:function(){var si=this.styleInfos;return si.borderRadiusInfo.isActive()||si.backgroundInfo.isPngFix()},draw:function(){this._lastSrc=src;this.hideActualImg();var shape=this.getShape("img", |
3493 | +"fill",this.getBox()),fill=shape.fill,bounds=this.boundsInfo.getBounds(),w=bounds.w,h=bounds.h,borderProps=this.styleInfos.borderInfo.getProps(),borderWidths=borderProps&&borderProps.widths,el=this.targetElement,src=el.src,round=Math.round,cs=el.currentStyle,getLength=PIE.getLength,s,zero;if(!borderWidths||PIE.ieVersion<7){zero=PIE.getLength("0");borderWidths={"t":zero,"r":zero,"b":zero,"l":zero}}shape.stroked=false;fill.type="frame";fill.src=src;fill.position=(w?0.5/w:0)+","+(h?0.5/h:0);shape.coordsize= |
3494 | +w*2+","+h*2;shape.coordorigin="1,1";shape.path=this.getBoxPath({t:round(borderWidths["t"].pixels(el)+getLength(cs.paddingTop).pixels(el)),r:round(borderWidths["r"].pixels(el)+getLength(cs.paddingRight).pixels(el)),b:round(borderWidths["b"].pixels(el)+getLength(cs.paddingBottom).pixels(el)),l:round(borderWidths["l"].pixels(el)+getLength(cs.paddingLeft).pixels(el))},2);s=shape.style;s.width=w;s.height=h},hideActualImg:function(){this.targetElement.runtimeStyle.filter="alpha(opacity=0)"},destroy:function(){PIE.RendererBase.destroy.call(this); |
3495 | +this.targetElement.runtimeStyle.filter=""}});PIE.IE9RootRenderer=PIE.RendererBase.newRenderer({updatePos:PIE.emptyFn,updateSize:PIE.emptyFn,updateVisibility:PIE.emptyFn,updateProps:PIE.emptyFn,outerCommasRE:/^,+|,+$/g,innerCommasRE:/,+/g,setBackgroundLayer:function(zIndex,bg){var me=this,bgLayers=me._bgLayers||(me._bgLayers=[]),undef;bgLayers[zIndex]=bg||undef},finishUpdate:function(){var me=this,bgLayers=me._bgLayers,bg;if(bgLayers&&(bg=bgLayers.join(",").replace(me.outerCommasRE,"").replace(me.innerCommasRE, |
3496 | +","))!==me._lastBg)me._lastBg=me.targetElement.runtimeStyle.background=bg},destroy:function(){this.targetElement.runtimeStyle.background="";delete this._bgLayers}});PIE.IE9BackgroundRenderer=PIE.RendererBase.newRenderer({bgLayerZIndex:1,needsUpdate:function(){var si=this.styleInfos;return si.backgroundInfo.changed()},isActive:function(){var si=this.styleInfos;return si.backgroundInfo.isActive()||si.borderImageInfo.isActive()},draw:function(){var me=this,props=me.styleInfos.backgroundInfo.getProps(), |
3497 | +bg,images,i=0,img,bgAreaSize,bgSize;if(props){bg=[];images=props.bgImages;if(images)while(img=images[i++])if(img.imgType==="linear-gradient"){bgAreaSize=me.getBgAreaSize(img.bgOrigin);bgSize=(img.bgSize||PIE.BgSize.DEFAULT).pixels(me.targetElement,bgAreaSize.w,bgAreaSize.h,bgAreaSize.w,bgAreaSize.h),bg.push("url(data:image/svg+xml,"+escape(me.getGradientSvg(img,bgSize.w,bgSize.h))+") "+me.bgPositionToString(img.bgPosition)+" / "+bgSize.w+"px "+bgSize.h+"px "+(img.bgAttachment||"")+" "+(img.bgOrigin|| |
3498 | +"")+" "+(img.bgClip||""))}else bg.push(img.origString);if(props.color)bg.push(props.color.val);me.parent.setBackgroundLayer(me.bgLayerZIndex,bg.join(","))}},bgPositionToString:function(bgPosition){return bgPosition?bgPosition.tokens.map(function(token){return token.tokenValue}).join(" "):"0 0"},getBgAreaSize:function(bgOrigin){var me=this,el=me.targetElement,bounds=me.boundsInfo.getBounds(),elW=bounds.w,elH=bounds.h,w=elW,h=elH,borders,getLength,cs;if(bgOrigin!=="border-box"){borders=me.styleInfos.borderInfo.getProps(); |
3499 | +if(borders&&(borders=borders.widths)){w-=borders["l"].pixels(el)+borders["l"].pixels(el);h-=borders["t"].pixels(el)+borders["b"].pixels(el)}}if(bgOrigin==="content-box"){getLength=PIE.getLength;cs=el.currentStyle;w-=getLength(cs.paddingLeft).pixels(el)+getLength(cs.paddingRight).pixels(el);h-=getLength(cs.paddingTop).pixels(el)+getLength(cs.paddingBottom).pixels(el)}return{w:w,h:h}},getGradientSvg:function(info,bgWidth,bgHeight){var el=this.targetElement,stopsInfo=info.stops,stopCount=stopsInfo.length, |
3500 | +metrics=PIE.GradientUtil.getGradientMetrics(el,bgWidth,bgHeight,info),startX=metrics.startX,startY=metrics.startY,endX=metrics.endX,endY=metrics.endY,lineLength=metrics.lineLength,stopPx,i,j,before,after,svg;stopPx=[];for(i=0;i<stopCount;i++)stopPx.push(stopsInfo[i].offset?stopsInfo[i].offset.pixels(el,lineLength):i===0?0:i===stopCount-1?lineLength:null);for(i=1;i<stopCount;i++)if(stopPx[i]===null){before=stopPx[i-1];j=i;do after=stopPx[++j];while(after===null);stopPx[i]=before+(after-before)/(j- |
3501 | +i+1)}svg=['<svg width="'+bgWidth+'" height="'+bgHeight+'" xmlns="http://www.w3.org/2000/svg">'+"<defs>"+'<linearGradient id="g" gradientUnits="userSpaceOnUse"'+' x1="'+startX/bgWidth*100+'%" y1="'+startY/bgHeight*100+'%" x2="'+endX/bgWidth*100+'%" y2="'+endY/bgHeight*100+'%">'];for(i=0;i<stopCount;i++)svg.push('<stop offset="'+stopPx[i]/lineLength+'" stop-color="'+stopsInfo[i].color.colorValue(el)+'" stop-opacity="'+stopsInfo[i].color.alpha()+'"/>');svg.push("</linearGradient>"+"</defs>"+'<rect width="100%" height="100%" fill="url(#g)"/>'+ |
3502 | +"</svg>");return svg.join("")},destroy:function(){this.parent.setBackgroundLayer(this.bgLayerZIndex)}});PIE.IE9BorderImageRenderer=PIE.RendererBase.newRenderer({REPEAT:"repeat",STRETCH:"stretch",ROUND:"round",bgLayerZIndex:0,needsUpdate:function(){return this.styleInfos.borderImageInfo.changed()},isActive:function(){return this.styleInfos.borderImageInfo.isActive()},draw:function(){var me=this,props=me.styleInfos.borderImageInfo.getProps(),borderProps=me.styleInfos.borderInfo.getProps(),bounds=me.boundsInfo.getBounds(), |
3503 | +repeat=props.repeat,repeatH=repeat.h,repeatV=repeat.v,el=me.targetElement,isAsync=0;PIE.Util.withImageSize(props.src,function(imgSize){var elW=bounds.w,elH=bounds.h,imgW=imgSize.w,imgH=imgSize.h,imgSrc=me.imageToDataURI(props.src,imgW,imgH),REPEAT=me.REPEAT,STRETCH=me.STRETCH,ROUND=me.ROUND,ceil=Math.ceil,zero=PIE.getLength("0"),widths=props.widths||(borderProps?borderProps.widths:{"t":zero,"r":zero,"b":zero,"l":zero}),widthT=widths["t"].pixels(el),widthR=widths["r"].pixels(el),widthB=widths["b"].pixels(el), |
3504 | +widthL=widths["l"].pixels(el),slices=props.slice,sliceT=slices["t"].pixels(el),sliceR=slices["r"].pixels(el),sliceB=slices["b"].pixels(el),sliceL=slices["l"].pixels(el),centerW=elW-widthL-widthR,middleH=elH-widthT-widthB,imgCenterW=imgW-sliceL-sliceR,imgMiddleH=imgH-sliceT-sliceB,tileSizeT=repeatH===STRETCH?centerW:imgCenterW*widthT/sliceT,tileSizeR=repeatV===STRETCH?middleH:imgMiddleH*widthR/sliceR,tileSizeB=repeatH===STRETCH?centerW:imgCenterW*widthB/sliceB,tileSizeL=repeatV===STRETCH?middleH:imgMiddleH* |
3505 | +widthL/sliceL,svg,patterns=[],rects=[],i=0;if(repeatH===ROUND){tileSizeT-=(tileSizeT-(centerW%tileSizeT||tileSizeT))/ceil(centerW/tileSizeT);tileSizeB-=(tileSizeB-(centerW%tileSizeB||tileSizeB))/ceil(centerW/tileSizeB)}if(repeatV===ROUND){tileSizeR-=(tileSizeR-(middleH%tileSizeR||tileSizeR))/ceil(middleH/tileSizeR);tileSizeL-=(tileSizeL-(middleH%tileSizeL||tileSizeL))/ceil(middleH/tileSizeL)}svg=['<svg width="'+elW+'" height="'+elH+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">']; |
3506 | +function addImage(x,y,w,h,cropX,cropY,cropW,cropH,tileW,tileH){patterns.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+i+'" '+'x="'+(repeatH===REPEAT?x+w/2-tileW/2:x)+'" '+'y="'+(repeatV===REPEAT?y+h/2-tileH/2:y)+'" '+'width="'+tileW+'" height="'+tileH+'">'+'<svg width="'+tileW+'" height="'+tileH+'" viewBox="'+cropX+" "+cropY+" "+cropW+" "+cropH+'" preserveAspectRatio="none">'+'<image xlink:href="'+imgSrc+'" x="0" y="0" width="'+imgW+'" height="'+imgH+'" />'+"</svg>"+"</pattern>");rects.push('<rect x="'+ |
3507 | +x+'" y="'+y+'" width="'+w+'" height="'+h+'" fill="url(#pattern'+i+')" />');i++}addImage(0,0,widthL,widthT,0,0,sliceL,sliceT,widthL,widthT);addImage(widthL,0,centerW,widthT,sliceL,0,imgCenterW,sliceT,tileSizeT,widthT);addImage(elW-widthR,0,widthR,widthT,imgW-sliceR,0,sliceR,sliceT,widthR,widthT);addImage(0,widthT,widthL,middleH,0,sliceT,sliceL,imgMiddleH,widthL,tileSizeL);if(props.fill)addImage(widthL,widthT,centerW,middleH,sliceL,sliceT,imgCenterW,imgMiddleH,tileSizeT||tileSizeB||imgCenterW,tileSizeL|| |
3508 | +tileSizeR||imgMiddleH);addImage(elW-widthR,widthT,widthR,middleH,imgW-sliceR,sliceT,sliceR,imgMiddleH,widthR,tileSizeR);addImage(0,elH-widthB,widthL,widthB,0,imgH-sliceB,sliceL,sliceB,widthL,widthB);addImage(widthL,elH-widthB,centerW,widthB,sliceL,imgH-sliceB,imgCenterW,sliceB,tileSizeB,widthB);addImage(elW-widthR,elH-widthB,widthR,widthB,imgW-sliceR,imgH-sliceB,sliceR,sliceB,widthR,widthB);svg.push("<defs>"+patterns.join("\n")+"</defs>"+rects.join("\n")+"</svg>");me.parent.setBackgroundLayer(me.bgLayerZIndex, |
3509 | +"url(data:image/svg+xml,"+escape(svg.join(""))+") no-repeat border-box border-box");if(isAsync)me.parent.finishUpdate()},me);isAsync=1},imageToDataURI:function(){var uris={};return function(src,width,height){var uri=uris[src],image,canvas;if(!uri){image=new Image;canvas=doc.createElement("canvas");image.src=src;canvas.width=width;canvas.height=height;canvas.getContext("2d").drawImage(image,0,0);uri=uris[src]=canvas.toDataURL()}return uri}}(),prepareUpdate:PIE.BorderImageRenderer.prototype.prepareUpdate, |
3510 | +destroy:function(){var me=this,rs=me.targetElement.runtimeStyle;me.parent.setBackgroundLayer(me.bgLayerZIndex);rs.borderColor=rs.borderStyle=rs.borderWidth=""}});PIE.Element=function(){var wrappers={},lazyInitCssProp=PIE.CSS_PREFIX+"lazy-init",pollCssProp=PIE.CSS_PREFIX+"poll",hoverClass=PIE.CLASS_PREFIX+"hover",activeClass=PIE.CLASS_PREFIX+"active",focusClass=PIE.CLASS_PREFIX+"focus",firstChildClass=PIE.CLASS_PREFIX+"first-child",ignorePropertyNames={"background":1,"bgColor":1,"display":1},classNameRegExes= |
3511 | +{},dummyArray=[];function addClass(el,className){el.className+=" "+className}function removeClass(el,className){var re=classNameRegExes[className]||(classNameRegExes[className]=new RegExp("\\b"+className+"\\b","g"));el.className=el.className.replace(re,"")}function delayAddClass(el,className){var classes=dummyArray.slice.call(arguments,1),i=classes.length;setTimeout(function(){while(i--)addClass(el,classes[i])},0)}function delayRemoveClass(el,className){var classes=dummyArray.slice.call(arguments, |
3512 | +1),i=classes.length;setTimeout(function(){while(i--)removeClass(el,classes[i])},0)}function Element(el){var renderers,rootRenderer,boundsInfo=new PIE.BoundsInfo(el),styleInfos,styleInfosArr,initializing,initialized,eventsAttached,eventListeners=[],delayed,destroyed,poll;function init(){if(!initialized){var docEl,bounds,ieDocMode=PIE.ieDocMode,cs=el.currentStyle,lazy=cs.getAttribute(lazyInitCssProp)==="true",childRenderers;poll=cs.getAttribute(pollCssProp);poll=ieDocMode>7?poll!=="false":poll==="true"; |
3513 | +if(!initializing){initializing=1;el.runtimeStyle.zoom=1;initFirstChildPseudoClass()}boundsInfo.lock();if(lazy&&(bounds=boundsInfo.getBounds())&&(docEl=doc.documentElement||doc.body)&&(bounds.y>docEl.clientHeight||bounds.x>docEl.clientWidth||bounds.y+bounds.h<0||bounds.x+bounds.w<0)){if(!delayed){delayed=1;PIE.OnScroll.observe(init)}}else{initialized=1;delayed=initializing=0;PIE.OnScroll.unobserve(init);if(ieDocMode===9){styleInfos={backgroundInfo:new PIE.BackgroundStyleInfo(el),borderImageInfo:new PIE.BorderImageStyleInfo(el), |
3514 | +borderInfo:new PIE.BorderStyleInfo(el)};styleInfosArr=[styleInfos.backgroundInfo,styleInfos.borderImageInfo];rootRenderer=new PIE.IE9RootRenderer(el,boundsInfo,styleInfos);childRenderers=[new PIE.IE9BackgroundRenderer(el,boundsInfo,styleInfos,rootRenderer),new PIE.IE9BorderImageRenderer(el,boundsInfo,styleInfos,rootRenderer)]}else{styleInfos={backgroundInfo:new PIE.BackgroundStyleInfo(el),borderInfo:new PIE.BorderStyleInfo(el),borderImageInfo:new PIE.BorderImageStyleInfo(el),borderRadiusInfo:new PIE.BorderRadiusStyleInfo(el), |
3515 | +boxShadowInfo:new PIE.BoxShadowStyleInfo(el),visibilityInfo:new PIE.VisibilityStyleInfo(el)};styleInfosArr=[styleInfos.backgroundInfo,styleInfos.borderInfo,styleInfos.borderImageInfo,styleInfos.borderRadiusInfo,styleInfos.boxShadowInfo,styleInfos.visibilityInfo];rootRenderer=new PIE.RootRenderer(el,boundsInfo,styleInfos);childRenderers=[new PIE.BoxShadowOutsetRenderer(el,boundsInfo,styleInfos,rootRenderer),new PIE.BackgroundRenderer(el,boundsInfo,styleInfos,rootRenderer),new PIE.BorderRenderer(el, |
3516 | +boundsInfo,styleInfos,rootRenderer),new PIE.BorderImageRenderer(el,boundsInfo,styleInfos,rootRenderer)];if(el.tagName==="IMG")childRenderers.push(new PIE.ImgRenderer(el,boundsInfo,styleInfos,rootRenderer));rootRenderer.childRenderers=childRenderers}renderers=[rootRenderer].concat(childRenderers);initAncestorEventListeners();if(poll){PIE.Heartbeat.observe(update);PIE.Heartbeat.run()}update(1)}if(!eventsAttached){eventsAttached=1;if(ieDocMode<9)addListener(el,"onmove",handleMoveOrResize);addListener(el, |
3517 | +"onresize",handleMoveOrResize);addListener(el,"onpropertychange",propChanged);addListener(el,"onmouseenter",mouseEntered);addListener(el,"onmouseleave",mouseLeft);addListener(el,"onmousedown",mousePressed);if(el.tagName in PIE.focusableElements){addListener(el,"onfocus",focused);addListener(el,"onblur",blurred)}PIE.OnResize.observe(handleMoveOrResize);PIE.OnUnload.observe(removeEventListeners)}boundsInfo.unlock()}}function handleMoveOrResize(){if(boundsInfo&&boundsInfo.hasBeenQueried())update()}function update(force){if(!destroyed)if(initialized){var i, |
3518 | +len=renderers.length;lockAll();for(i=0;i<len;i++)renderers[i].prepareUpdate();if(force||boundsInfo.positionChanged())for(i=0;i<len;i++)renderers[i].updatePos();if(force||boundsInfo.sizeChanged())for(i=0;i<len;i++)renderers[i].updateSize();rootRenderer.finishUpdate();unlockAll()}else if(!initializing)init()}function propChanged(){var i,len=renderers.length,renderer,e=event;if(!destroyed&&!(e&&e.propertyName in ignorePropertyNames))if(initialized){lockAll();for(i=0;i<len;i++)renderers[i].prepareUpdate(); |
3519 | +for(i=0;i<len;i++){renderer=renderers[i];if(!renderer.isPositioned)renderer.updatePos();if(renderer.needsUpdate())renderer.updateProps()}rootRenderer.finishUpdate();unlockAll()}else if(!initializing)init()}function mouseEntered(){delayAddClass(el,hoverClass)}function mouseLeft(){delayRemoveClass(el,hoverClass,activeClass)}function mousePressed(){delayAddClass(el,activeClass);PIE.OnMouseup.observe(mouseReleased)}function mouseReleased(){delayRemoveClass(el,activeClass);PIE.OnMouseup.unobserve(mouseReleased)} |
3520 | +function focused(){delayAddClass(el,focusClass)}function blurred(){delayRemoveClass(el,focusClass)}function ancestorPropChanged(){var name=event.propertyName;if(name==="className"||name==="id")propChanged()}function lockAll(){boundsInfo.lock();for(var i=styleInfosArr.length;i--;)styleInfosArr[i].lock()}function unlockAll(){for(var i=styleInfosArr.length;i--;)styleInfosArr[i].unlock();boundsInfo.unlock()}function addListener(targetEl,type,handler){targetEl.attachEvent(type,handler);eventListeners.push([targetEl, |
3521 | +type,handler])}function removeEventListeners(){if(eventsAttached){var i=eventListeners.length,listener;while(i--){listener=eventListeners[i];listener[0].detachEvent(listener[1],listener[2])}PIE.OnUnload.unobserve(removeEventListeners);eventsAttached=0;eventListeners=[]}}function destroy(){if(!destroyed){var i,len;removeEventListeners();destroyed=1;if(renderers)for(i=0,len=renderers.length;i<len;i++){renderers[i].finalized=1;renderers[i].destroy()}if(poll)PIE.Heartbeat.unobserve(update);PIE.OnResize.unobserve(update); |
3522 | +renderers=boundsInfo=styleInfos=styleInfosArr=el=null}}function initAncestorEventListeners(){var watch=el.currentStyle.getAttribute(PIE.CSS_PREFIX+"watch-ancestors"),i,a;if(watch){watch=parseInt(watch,10);i=0;a=el.parentNode;while(a&&(watch==="NaN"||i++<watch)){addListener(a,"onpropertychange",ancestorPropChanged);addListener(a,"onmouseenter",mouseEntered);addListener(a,"onmouseleave",mouseLeft);addListener(a,"onmousedown",mousePressed);if(a.tagName in PIE.focusableElements){addListener(a,"onfocus", |
3523 | +focused);addListener(a,"onblur",blurred)}a=a.parentNode}}}function initFirstChildPseudoClass(){var tmpEl=el,isFirst=1;while(tmpEl=tmpEl.previousSibling)if(tmpEl.nodeType===1){isFirst=0;break}if(isFirst)addClass(el,firstChildClass)}this.init=init;this.update=update;this.destroy=destroy;this.el=el}Element.getInstance=function(el){var id=PIE.Util.getUID(el);return wrappers[id]||(wrappers[id]=new Element(el))};Element.destroy=function(el){var id=PIE.Util.getUID(el),wrapper=wrappers[id];if(wrapper){wrapper.destroy(); |
3524 | +delete wrappers[id]}};Element.destroyAll=function(){var els=[],wrapper;if(wrappers){for(var w in wrappers)if(wrappers.hasOwnProperty(w)){wrapper=wrappers[w];els.push(wrapper.el);wrapper.destroy()}wrappers={}}return els};return Element}();PIE["supportsVML"]=PIE.supportsVML;PIE["attach"]=function(el){if(PIE.ieDocMode<10&&PIE.supportsVML)PIE.Element.getInstance(el).init()};PIE["detach"]=function(el){PIE.Element.destroy(el)}}})(); |
3525 | \ No newline at end of file |
3526 | |
3527 | === added file 'media/js/site.js' |
3528 | --- media/js/site.js 1970-01-01 00:00:00 +0000 |
3529 | +++ media/js/site.js 2012-03-26 20:23:22 +0000 |
3530 | @@ -0,0 +1,26 @@ |
3531 | +$(document).ready(function() { |
3532 | + $("#wireframe .container").mouseenter(function() { |
3533 | + var wf = $(this); |
3534 | + wf.css({border:"1px dashed #555", padding:"0px 9px"}); |
3535 | + wf.parent().is("header") && wf.append('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>HEADER</h3></div>'); |
3536 | + wf.parent().is("aside") && wf.append('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>ASIDE</h3></div>'); |
3537 | + wf.parent().is("section") && wf.append('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>CONTENT</h3></div>'); |
3538 | + wf.parent().is("footer") && wf.append('<div class="label" style="position:absolute; top:0px; left:0px; background-color:rgba(0,0,0,0.7); padding:10px; color:#fff;"><h3>FOOTER</h3></div>') |
3539 | + }); |
3540 | + $("#wireframe .container").mouseleave(function() { |
3541 | + $(".label").remove(); |
3542 | + $(this).css({border:"0px dashed #555", padding:"0px 10px"}) |
3543 | + }) |
3544 | +}); |
3545 | + |
3546 | +(function(d){d.fn.invert=function(){d(this).find("*").andSelf().each(function(){var e=d(this);a("color",e);a("backgroundColor",e);d.each(["right","bottom","left","top"],function(f,g){a("border-"+g+"-color",e)});c(e)});return this};function a(h,f){var g=b(f.css(h));if(g!="transparent"&&g.substring(0,4)!="rgba"){var e=/rgb\((.+),(.+),(.+)\)/.exec(g);f.css(h,"rgb("+(255-e[1])+","+(255-e[2])+","+(255-e[3])+")")}}function b(g){if(g.substring(0,3)=="rgb"||g=="transparent"){return g}if(g.substring(0,1)=="#"){if(g.length==4){g="#"+g.substring(1,2)+g.substring(1,2)+g.substring(2,3)+g.substring(2,3)+g.substring(3,4)+g.substring(3,4)}return"rgb("+parseInt(g.substring(1,3),16)+","+parseInt(g.substring(3,5),16)+","+parseInt(g.substring(5,7),16)+")"}var e=["black","white","red","yellow","gray","blue","green","lime","fuchsia","aqua","maroon","navy","olive","purple","silver","teal"],f=["(0, 0, 0)","(255, 255, 255)","(255, 0, 0)","(255, 255, 0)","(128, 128, 128)","(0, 0, 255)","(0,128,0)","(0, 255, 0)","(255, 0, 255)","(0, 255, 255)","(128, 0, 0)","(0, 0, 128)","(128, 128, 0)","(128, 0, 128)","(192, 192, 192)","(0, 128, 128)"];g=f[d.inArray(g,e)]||g;return"rgb"+g}function c(h){if(!(h.is("img")||/^(data|url)/.test(h.css("backgroundImage")))){return}var e=new Image();d(e).bind("load",function(){var m=document.createElement("canvas");m.width=e.width;m.height=e.height;var j=m.getContext("2d"),s=0,r=0,t;try{j.drawImage(e,s,r);var k=j.getImageData(s,r,e.width,e.height);var q=k.data;for(var o=0,l=q.length;o<l;o+=4){q[o]=255-q[o];q[o+1]=255-q[o+1];q[o+2]=255-q[o+2]}j.putImageData(k,s,r);t=m.toDataURL()}catch(p){}if(h.is("img")){h.attr("src",t)}else{h.css("backgroundImage","url("+t+")")}}).each(function(){if(this.complete||this.complete===undefined){var i=this.src;this.src="#";this.src=i}});var f=h.css("backgroundImage").match(/url\((.*?)\)/),g=f&&f[1];e.src=h[0].src||g||h.css("backgroundImage")}})(jQuery); |
3547 | + |
3548 | +var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; |
3549 | +$(document).keydown(function(a) { |
3550 | + kkeys.push(a.keyCode); |
3551 | + 0 <= kkeys.toString().indexOf(konami) && ($(document).unbind("keydown", arguments.callee), $.fn.invert && $("body").invert()) |
3552 | +}); |
3553 | + |
3554 | +$(function() { |
3555 | + $('.twidenash').twidenash(); |
3556 | +}); |
3557 | |
3558 | === added directory 'templates/old' |
3559 | === renamed file 'templates/ubuntu_website_base.html' => 'templates/old/ubuntu_website_base.html' |
3560 | === modified file 'templates/website_base.html' |
3561 | --- templates/website_base.html 2012-03-25 01:08:53 +0000 |
3562 | +++ templates/website_base.html 2012-03-26 20:23:22 +0000 |
3563 | @@ -1,36 +1,29 @@ |
3564 | -<!DOCTYPE HTML> |
3565 | -<html> |
3566 | +<!DOCTYPE html> |
3567 | +<html lang="en"> |
3568 | <head> |
3569 | - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
3570 | - |
3571 | - <title>{% block title %}Ubuntu Website{% endblock %}</title> |
3572 | - |
3573 | - {% block defaulthead %} |
3574 | - <link rel="shortcut icon" href="/assets/img/favicon.ico" type="image/x-icon" /> |
3575 | - |
3576 | - <!-- stylesheets --> |
3577 | - <!--[if !IE ]><!--> |
3578 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-reset.css" /> |
3579 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-grid.css" /> |
3580 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core.css" /> |
3581 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/extra_styles.css" /> |
3582 | - <!--<link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/default.css" /> |
3583 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/django_extras.css" />--> |
3584 | - <!--<![endif]--> |
3585 | - |
3586 | - <!--[if gte IE 7]> |
3587 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/ie.css" /> |
3588 | - <![endif]--> |
3589 | - |
3590 | - <!--[if IE 6 ]> |
3591 | - <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/ie6.css" media="screen, projection" /> |
3592 | - <![endif]--> |
3593 | - |
3594 | - <!--[if IE ]> |
3595 | - <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
3596 | - <![endif]--> |
3597 | - {% endblock %} |
3598 | -{% block extrahead %}{% endblock %} |
3599 | + {% block defaulthead %}{% block defaultmeta %}<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
3600 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
3601 | + <meta name="viewport" content="width=device-width, initial-scale=1" />{% endblock %} |
3602 | + {% block extrameta %}{% endblock %} |
3603 | + <title>{% block title %}Linaro Website{% endblock %}</title> |
3604 | + |
3605 | + {% block defaultstyles %}<link rel="shortcut icon" href="{{ubuntu_website_media}}/images/favicon.ico" type="image/x-icon" /> |
3606 | + <link rel="stylesheet" type="text/css" media="all" href="//fonts.googleapis.com/css?family=Ubuntu" /> |
3607 | + <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-reset.css" /> |
3608 | + <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-grid.css" /> |
3609 | + <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core.css" /> |
3610 | + <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/extra_styles.css" />{% endblock %} |
3611 | + {%block extrastyles %}{% endblock %} |
3612 | + |
3613 | + {% block defaultheadjs %}<script src="{{ubuntu_website_media}}/js/modernizr.min.js"></script> |
3614 | + <script src="//code.jquery.com/jquery-1.7.2.min.js"></script> |
3615 | + <script>window.jQuery || document.write('<script src="{{ubuntu_website_media}}/js/jquery-1.7.2.min.js"><\/script>')</script> |
3616 | + <script>var website_assets="{{ubuntu_website_media}}";</script>{% endblock %} |
3617 | + <!--block extraheadjs left out by design, add other JS files to the loader.js script for async loading, |
3618 | + this is done and by design, if you MUST add a <script> tag do so in the closure block and test to ensure |
3619 | + no breakage has been caused, also avoid inline CSS and JS when possible, use {{ubuntu_website_media}}/css/site.css |
3620 | + or {{ubuntu_website_media}}/js/site.js so it correct headers are sent and can be cached properly by broswers--> |
3621 | + {% endblock %}{% block extrahead %}{% endblock %} |
3622 | </head> |
3623 | <body> |
3624 | <div class="wrapper"> |
3625 | @@ -75,7 +68,7 @@ |
3626 | <img width="108" height="50" src="{{ubuntu_website_media}}/images/linaro-connect-logo.png" alt="Linaro Connect Logo"/> |
3627 | <h2 class="header-text"><a href="/">{% block logo_text %}Country Loco Team{% endblock %}</a></h2> |
3628 | </a> |
3629 | - |
3630 | + |
3631 | </header> |
3632 | |
3633 | |
3634 | @@ -95,7 +88,7 @@ |
3635 | </nav> |
3636 | |
3637 | <!--<aside id="page-related">--> |
3638 | - |
3639 | + |
3640 | <!-- |
3641 | {% block search %} |
3642 | <section id="searchbox-container"> |
3643 | @@ -106,14 +99,14 @@ |
3644 | {% endblock %} |
3645 | <hr class="divide" /> |
3646 | </div>--> |
3647 | - |
3648 | + |
3649 | <!-- </aside> --> |
3650 | {% endblock %} |
3651 | |
3652 | {% endif %} |
3653 | |
3654 | - |
3655 | - |
3656 | + |
3657 | + |
3658 | {% block messages %} |
3659 | {% endblock %} |
3660 | |
3661 | @@ -122,7 +115,7 @@ |
3662 | |
3663 | {% block general %} |
3664 | {% endblock %} |
3665 | - |
3666 | + |
3667 | |
3668 | </div><!-- div.inner-wrapper --> |
3669 | |
3670 | @@ -198,7 +191,7 @@ |
3671 | </dd> |
3672 | {% endblock %} |
3673 | </dl> |
3674 | - |
3675 | + |
3676 | |
3677 | <details class="foot-note"> |
3678 | {% block footer_note %}<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sit amet lectus massa. </p>{% endblock %} |
3679 | @@ -208,12 +201,19 @@ |
3680 | </footer> |
3681 | |
3682 | {% endif %} |
3683 | - <!-- IE6 hacks --> |
3684 | - <!--[if IE 6 ]> |
3685 | - <script src="{{ubuntu_website_media}}/js/pngFix.js"></script> |
3686 | - <script> DD_belatedPNG.fix('.png'); </script> |
3687 | - <![endif]--> |
3688 | - {% block extrafooter %}{% endblock %} |
3689 | + <script> |
3690 | + (function() { |
3691 | + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
3692 | + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
3693 | + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
3694 | + })(); |
3695 | + </script> |
3696 | + <script src="{{ubuntu_website_media}}/js/loader.js"></script> |
3697 | + <!--[if lt IE 9]> |
3698 | + <script src="{{ubuntu_website_media}}/js/polyfills/IE9/IE9.js">IE7_PNG_SUFFIX=".png";</script> |
3699 | + <script src="{{ubuntu_website_media}}/js/polyfills/IE9/squish.js"></script> |
3700 | + <![endif]--> |
3701 | + {% block closure %}{% endblock %} |
3702 | </div> |
3703 | </body> |
3704 | </html> |