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

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
Reviewer Review Type Date Requested Status
Linaro Infrastructure Pending
Review via email: mp+99413@code.launchpad.net

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
=== modified file 'media/css/extra_styles.css'
--- media/css/extra_styles.css 2012-03-25 00:36:30 +0000
+++ media/css/extra_styles.css 2012-03-26 20:23:22 +0000
@@ -9,50 +9,50 @@
9*/9*/
1010
1111
12#top-nav { 12#top-nav {
13 font-size:11px; 13 font-size:11px;
14 margin:0 auto; 14 margin:0 auto;
15 line-height: 2em; 15 line-height: 2em;
16 height: 22px;16 height: 22px;
17}17}
1818
1919
20.top-nav-item { 20.top-nav-item {
21 display:inline-block; 21 display:inline-block;
22 margin-right: 14px; 22 margin-right: 14px;
23 line-height:2em; 23 line-height:2em;
24}24}
2525
26#top-login { 26#top-login {
27 display:inline-block; 27 display:inline-block;
28 margin-right:15px; 28 margin-right:15px;
29 float:right;29 float:right;
30}30}
3131
32.top-login-item { 32.top-login-item {
33 display:inline-block; 33 display:inline-block;
34 padding:0 8px; 34 padding:0 8px;
35 line-height:2em; 35 line-height:2em;
36}36}
3737
38#top-nav { 38#top-nav {
39 background-color:#ffffff; 39 background-color:#ffffff;
40}40}
4141
42.top-nav-item, .top-nav-item:visited { 42.top-nav-item, .top-nav-item:visited {
43 color:#333333; 43 color:#333333;
44}44}
4545
46.top-nav-item:hover { 46.top-nav-item:hover {
47 text-decoration: underline; 47 text-decoration: underline;
48}48}
4949
50.top-login-item { 50.top-login-item {
51 color:#dd4814; 51 color:#dd4814;
52}52}
5353
54.top-login-item:hover { 54.top-login-item:hover {
55 text-decoration: underline; 55 text-decoration: underline;
56}56}
5757
58header .logo-ubuntu {58header .logo-ubuntu {
@@ -66,10 +66,10 @@
66}66}
6767
68 .alone, .leading, .aggregator /* progressive */ {68 .alone, .leading, .aggregator /* progressive */ {
69 -webkit-border-radius: 8px;69 -webkit-border-radius: 4px;
70 -moz-border-radius: 8px;70 -moz-border-radius: 4px;
71 }71 }
72 72
73table.basic thead th, table.basic thead a {73table.basic thead th, table.basic thead a {
74 font-weight:bold;74 font-weight:bold;
75}75}
@@ -93,7 +93,7 @@
93 padding:4px 8px;93 padding:4px 8px;
94}94}
9595
96table.basic thead { 96table.basic thead {
97 background-color:#aea79f;97 background-color:#aea79f;
98}98}
9999
@@ -172,7 +172,7 @@
172172
173/* Form Layout */173/* Form Layout */
174174
175form ul.errorlist { 175form ul.errorlist {
176 display: inline-block;176 display: inline-block;
177 line-height: 1em;177 line-height: 1em;
178 vertical-align: top;178 vertical-align: top;
@@ -294,7 +294,7 @@
294 background-color: #962d0c;294 background-color: #962d0c;
295}295}
296296
297input[type="submit"][disabled="disabled"], input[type="submit"][disabled="disabled"]:hover { 297input[type="submit"][disabled="disabled"], input[type="submit"][disabled="disabled"]:hover {
298 background-color:#AEA79F;298 background-color:#AEA79F;
299 text-shadow: none;299 text-shadow: none;
300}300}
@@ -312,7 +312,7 @@
312312
313/*313/*
314*314*
315* For Linaro 315* For Linaro
316*316*
317*/317*/
318a:link {318a:link {
@@ -352,3 +352,6 @@
352.nav-secondary li.active a, .nav-secondary a:hover {352.nav-secondary li.active a, .nav-secondary a:hover {
353color: #79A519;353color: #79A519;
354}354}
355
356span.skype_pnh_container {display:none !important;}
357span.skype_pnh_print_container {display:inline !important;}
355358
=== added directory 'media/css/old'
=== renamed file 'media/css/960.css' => 'media/css/old/960.css'
=== renamed file 'media/css/default.css' => 'media/css/old/default.css'
=== renamed file 'media/css/django_extras.css' => 'media/css/old/django_extras.css'
=== renamed file 'media/css/ie.css' => 'media/css/old/ie.css'
=== renamed file 'media/css/ie6.css' => 'media/css/old/ie6.css'
=== added file 'media/js/ga.js'
--- media/js/ga.js 1970-01-01 00:00:00 +0000
+++ media/js/ga.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,5 @@
1$(document).ready(function() {
2var _gaq = _gaq || [];
3 _gaq.push(['_setAccount', 'UA-30315860-1']);
4 _gaq.push(['_trackPageview']);
5});
06
=== added file 'media/js/jquery-1.7.2.min.js'
--- media/js/jquery-1.7.2.min.js 1970-01-01 00:00:00 +0000
+++ media/js/jquery-1.7.2.min.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,4 @@
1/*! jQuery v1.7.2 jquery.com | jquery.org/license */
2(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(
3a){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
4.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);
05
=== added file 'media/js/loader.js'
--- media/js/loader.js 1970-01-01 00:00:00 +0000
+++ media/js/loader.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,19 @@
1Modernizr.load([
2 {
3 load: website_assets + '/js/twidenash/jquery-twidenash.js'
4 },
5 {
6 load: website_assets + '/js/site.js'
7 },
8 {
9 test: Modernizr.borderradius && Modernizr.boxshadow,
10 nope: website_assets + "/js/polyfills/pie.js",
11 complete: function() {
12 window.PIE && $("*").each(function() {
13 ($(this).css("box-shadow") || $(this).css("border-radius")) && PIE.attach(this)
14 })
15 }
16 },
17 website_assets + '/js/ga.js'
18]);
19
020
=== removed file 'media/js/main.js'
--- media/js/main.js 2010-06-14 14:48:41 +0000
+++ media/js/main.js 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
1$(function(){
2
3 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>'),
4 $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>'),
5 $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>'),
6 $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>');
7
8
9 $('#wireframe .container').mouseenter(function(){
10 var $el = $(this);
11
12 $el.css( { border : "1px dashed #555", padding : "0px 9px" })
13
14 if($el.parent().is('header')) {
15 $el.append($header);
16 }
17
18 if($el.parent().is('aside')) {
19 $el.append($aside);
20 }
21
22 if($el.parent().is('section')) {
23 $el.append($content);
24 }
25
26 if($el.parent().is('footer')) {
27 $el.append($footer);
28 }
29
30
31 });
32
33
34 $('#wireframe .container').mouseleave(function(){
35 $('.label').remove();
36 $(this).css( { border : "0px dashed #555", padding : "0px 10px" })
37
38 });
39
40
41
42
43});
440
=== added file 'media/js/modernizr.min.js'
--- media/js/modernizr.min.js 1970-01-01 00:00:00 +0000
+++ media/js/modernizr.min.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,4 @@
1/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2 * 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
3 */
4;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=["&#173;","<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});
05
=== removed file 'media/js/pngFix.js'
--- media/js/pngFix.js 2010-06-14 14:48:41 +0000
+++ media/js/pngFix.js 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1/**
2* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
3* Author: Drew Diller
4* Email: drew.diller@gmail.com
5* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
6* Version: 0.0.8a
7* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
8*
9* Example usage:
10* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
11* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
12**/
13var 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();
140
=== added directory 'media/js/polyfills'
=== added directory 'media/js/polyfills/IE9'
=== added file 'media/js/polyfills/IE9/IE9.js'
--- media/js/polyfills/IE9/IE9.js 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/IE9/IE9.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,118 @@
1(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=
2(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]||
3""}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=
4arguments.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]=
5[];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])},
6exec: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=
7group[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=
8[],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);
9if(typeof replacement=="number")replacement=String(replacement);else if(replacement==null)replacement=0;if(typeof replacement=="string"&&REGGRP_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=
10replacement}}),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);
11if(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==
12"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=
13this.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)||
14[]}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,
15"\\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,
16-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,
17"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=
18function(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=
19function(){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]=
20value}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)";
21var 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);
22return 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("|")||
23NONE,"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?
24"(.*?):("+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;
25this.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=
26true;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;
27var 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},
28trash: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])||
29DynamicRule.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=
30toSimpleMedia(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+=
31encode(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!==
32filterMedia.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,
33path);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);
34var 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);
35selectors[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,
36cssText){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);
37for(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,
38"$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",
392:"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,
40cssText)},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,
41true);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",
42function(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",
43"^=":"%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":"!"+
44PREVIOUS_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]);
45var 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=
46"[.\\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,
47type){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=
48_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=
49function(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;
50while(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");
51else 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"]!=
52null)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,
53element.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")!==
54"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-=
55getBorderWidth(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=
56"";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,
57layout.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=
58"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\(([^\)]+)\)([^;}]*)?/,
59function(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===
60"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,
610)+"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])});
62addEventHandler(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=
63false}(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=
64Undefined}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);
65util.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",
66element.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)-
67util.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;
68for(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=
69_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-
70_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,
71element.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!==
72"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-
73element.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="+
74rotate(_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,
75marginBottom: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=
76element;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=
770;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);
78value=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)/
792;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=
80autoRight?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===
81"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])("+
82inheritedProperties.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]===
83"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)});
84if(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"};
85var 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);
86for(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);
87content=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!==
88"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=
89Math.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===
901){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=
91true;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+
92"'",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<
938){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+
94"|")+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=
95arguments;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===
96true)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,
97"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=
98{_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=
99{_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;
100node=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===
101"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&&",
102":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=
1030,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="+
104(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=
105/^(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();
106if(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];
107if(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])*/,
108combinator:/[\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=
109new 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,
110index){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"+
111constants;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?
112"":"'||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});
113var 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+
114filters)+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=
115"",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});
116var 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);
117cache[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")+
118"(\\?.*)?$","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);
0\ No newline at end of file119\ No newline at end of file
1120
=== added file 'media/js/polyfills/IE9/LICENSE'
--- media/js/polyfills/IE9/LICENSE 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/IE9/LICENSE 2012-03-26 20:23:22 +0000
@@ -0,0 +1,21 @@
1The MIT License
2
3Copyright (c) 2004-2010 Dean Edwards
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21THE SOFTWARE.
022
=== added file 'media/js/polyfills/IE9/blank.gif'
1Binary 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 differ23Binary 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
=== added file 'media/js/polyfills/IE9/squish.js'
--- media/js/polyfills/IE9/squish.js 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/IE9/squish.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,1 @@
1if(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)})};
0\ No newline at end of file2\ No newline at end of file
13
=== added directory 'media/js/polyfills/IE9/src'
=== added file 'media/js/polyfills/IE9/src/IE9.src.js'
--- media/js/polyfills/IE9/src/IE9.src.js 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/IE9/src/IE9.src.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,2901 @@
1/*
2 IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards
3 http://code.google.com/p/ie7-js/
4 http://www.opensource.org/licenses/mit-license.php
5*/
6
7/* W3C compliance for Microsoft Internet Explorer */
8
9/* credits/thanks:
10 Shaggy, Martijn Wargers, Jimmy Cerra, Mark D Anderson,
11 Lars Dieckow, Erik Arvidsson, Gellért Gyuris, James Denny,
12 Unknown W Brackets, Benjamin Westfarer, Rob Eberhardt,
13 Bill Edney, Kevin Newman, James Crompton, Matthew Mastracci,
14 Doug Wright, Richard York, Kenneth Kolano, MegaZone,
15 Thomas Verelst, Mark 'Tarquin' Wilton-Jones, Rainer Ã…hlfors,
16 David Zulaica, Ken Kolano, Kevin Newman, Sjoerd Visscher,
17 Ingo Chao
18*/
19
20// timestamp: Fri, 30 Apr 2010 20:59:18
21
22(function(window, document) {
23
24var IE7 = window.IE7 = {
25 version: "2.1(beta4)",
26 toString: K("[IE7]")
27};
28IE7.compat = 9;
29var appVersion = IE7.appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1] - 0;
30
31if (/ie7_off/.test(top.location.search) || appVersion < 5.5 || appVersion >= IE7.compat) return;
32
33var MSIE5 = appVersion < 6;
34
35var Undefined = K();
36var documentElement = document.documentElement, body, viewport;
37var ANON = "!";
38var HEADER = ":link{ie7-link:link}:visited{ie7-link:visited}";
39
40// -----------------------------------------------------------------------
41// external
42// -----------------------------------------------------------------------
43
44var RELATIVE = /^[\w\.]+[^:]*$/;
45function makePath(href, path) {
46 if (RELATIVE.test(href)) href = (path || "") + href;
47 return href;
48};
49
50function getPath(href, path) {
51 href = makePath(href, path);
52 return href.slice(0, href.lastIndexOf("/") + 1);
53};
54
55// Get the path to this script
56var script = document.scripts[document.scripts.length - 1];
57var path = getPath(script.src);
58
59// Use microsoft's http request object to load external files
60try {
61 var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
62} catch (ex) {
63 // ActiveX disabled
64}
65
66var fileCache = {};
67function loadFile(href, path) {
68 try {
69 href = makePath(href, path);
70 if (!fileCache[href]) {
71 httpRequest.open("GET", href, false);
72 httpRequest.send();
73 if (httpRequest.status == 0 || httpRequest.status == 200) {
74 fileCache[href] = httpRequest.responseText;
75 }
76 }
77 } catch (ex) {
78 // ignore errors
79 }
80 return fileCache[href] || "";
81};
82
83// -----------------------------------------------------------------------
84// OO support
85// -----------------------------------------------------------------------
86
87
88// This is a cut-down version of base2 (http://code.google.com/p/base2/)
89
90var _slice = Array.prototype.slice;
91
92// private
93var _FORMAT = /%([1-9])/g;
94var _LTRIM = /^\s\s*/;
95var _RTRIM = /\s\s*$/;
96var _RESCAPE = /([\/()[\]{}|*+-.,^$?\\])/g; // safe regular expressions
97var _BASE = /\bbase\b/;
98var _HIDDEN = ["constructor", "toString"]; // only override these when prototyping
99
100var prototyping;
101
102function Base(){};
103Base.extend = function(_instance, _static) {
104 // Build the prototype.
105 prototyping = true;
106 var _prototype = new this;
107 extend(_prototype, _instance);
108 prototyping = false;
109
110 // Create the wrapper for the constructor function.
111 var _constructor = _prototype.constructor;
112 function klass() {
113 // Don't call the constructor function when prototyping.
114 if (!prototyping) _constructor.apply(this, arguments);
115 };
116 _prototype.constructor = klass;
117
118 // Build the static interface.
119 klass.extend = arguments.callee;
120 extend(klass, _static);
121 klass.prototype = _prototype;
122 return klass;
123};
124Base.prototype.extend = function(source) {
125 return extend(this, source);
126};
127
128
129// A collection of regular expressions and their associated replacement values.
130// A Base class for creating parsers.
131
132var HASH = "#";
133var ITEMS = "#";
134var KEYS = ".";
135var COMPILED = "/";
136
137var REGGRP_BACK_REF = /\\(\d+)/g,
138 REGGRP_ESCAPE_COUNT = /\[(\\.|[^\]\\])+\]|\\.|\(\?/g,
139 REGGRP_PAREN = /\(/g,
140 REGGRP_LOOKUP = /\$(\d+)/,
141 REGGRP_LOOKUP_SIMPLE = /^\$\d+$/,
142 REGGRP_LOOKUPS = /(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,
143 REGGRP_DICT_ENTRY = /^<#\w+>$/,
144 REGGRP_DICT_ENTRIES = /<#(\w+)>/g;
145
146var RegGrp = Base.extend({
147 constructor: function(values) {
148 this[KEYS] = [];
149 this[ITEMS] = {};
150 this.merge(values);
151 },
152
153 //dictionary: null,
154 //ignoreCase: false,
155
156 add: function(expression, replacement) {
157 delete this[COMPILED];
158 if (expression instanceof RegExp) {
159 expression = expression.source;
160 }
161 if (!this[HASH + expression]) this[KEYS].push(String(expression));
162 return this[ITEMS][HASH + expression] = new RegGrp.Item(expression, replacement, this);
163 },
164
165 compile: function(recompile) {
166 if (recompile || !this[COMPILED]) {
167 this[COMPILED] = new RegExp(this, this.ignoreCase ? "gi" : "g");
168 }
169 return this[COMPILED];
170 },
171
172 merge: function(values) {
173 for (var i in values) this.add(i, values[i]);
174 },
175
176 exec: function(string) {
177 var group = this,
178 patterns = group[KEYS],
179 items = group[ITEMS], item;
180 var result = this.compile(true).exec(string);
181 if (result) {
182 // Loop through the RegGrp items.
183 var i = 0, offset = 1;
184 while ((item = items[HASH + patterns[i++]])) {
185 var next = offset + item.length + 1;
186 if (result[offset]) { // do we have a result?
187 if (item.replacement === 0) {
188 return group.exec(string);
189 } else {
190 var args = result.slice(offset, next), j = args.length;
191 while (--j) args[j] = args[j] || ""; // some platforms return null/undefined for non-matching sub-expressions
192 args[0] = {match: args[0], item: item};
193 return args;
194 }
195 }
196 offset = next;
197 }
198 }
199 return null;
200 },
201
202 parse: function(string) {
203 string += ""; // type safe
204 var group = this,
205 patterns = group[KEYS],
206 items = group[ITEMS];
207 return string.replace(this.compile(), function(match) {
208 var args = [], item, offset = 1, i = arguments.length;
209 while (--i) args[i] = arguments[i] || ""; // some platforms return null/undefined for non-matching sub-expressions
210 // Loop through the RegGrp items.
211 while ((item = items[HASH + patterns[i++]])) {
212 var next = offset + item.length + 1;
213 if (args[offset]) { // do we have a result?
214 var replacement = item.replacement;
215 switch (typeof replacement) {
216 case "function":
217 return replacement.apply(group, args.slice(offset, next));
218 case "number":
219 return args[offset + replacement];
220 default:
221 return replacement;
222 }
223 }
224 offset = next;
225 }
226 return match;
227 });
228 },
229
230 toString: function() {
231 var strings = [],
232 keys = this[KEYS],
233 items = this[ITEMS], item;
234 for (var i = 0; item = items[HASH + keys[i]]; i++) {
235 strings[i] = item.source;
236 }
237 return "(" + strings.join(")|(") + ")";
238 }
239}, {
240 IGNORE: null, // a null replacement value means that there is no replacement.
241
242 Item: Base.extend({
243 constructor: function(source, replacement, owner) {
244 var length = source.indexOf("(") === -1 ? 0 : RegGrp.count(source);
245
246 var dictionary = owner.dictionary;
247 if (dictionary && source.indexOf("<#") !== -1) {
248 if (REGGRP_DICT_ENTRY.test(source)) {
249 var entry = dictionary[ITEMS][HASH + source.slice(2, -1)];
250 source = entry.replacement;
251 length = entry._length;
252 } else {
253 source = dictionary.parse(source);
254 }
255 }
256
257 if (typeof replacement == "number") replacement = String(replacement);
258 else if (replacement == null) replacement = 0;
259
260 // Does the expression use sub-expression lookups?
261 if (typeof replacement == "string" && REGGRP_LOOKUP.test(replacement)) {
262 if (REGGRP_LOOKUP_SIMPLE.test(replacement)) { // A simple lookup? (e.g. "$2").
263 // Store the index (used for fast retrieval of matched strings).
264 var index = replacement.slice(1) - 0;
265 if (index && index <= length) replacement = index;
266 } else {
267 // A complicated lookup (e.g. "Hello $2 $1.").
268 var lookup = replacement, regexp;
269 replacement = function(match) {
270 if (!regexp) {
271 regexp = new RegExp(source, "g" + (this.ignoreCase ? "i": ""));
272 }
273 return match.replace(regexp, lookup);
274 };
275 }
276 }
277
278 this.length = length;
279 this.source = String(source);
280 this.replacement = replacement;
281 }
282 }),
283
284 count: function(expression) {
285 return (String(expression).replace(REGGRP_ESCAPE_COUNT, "").match(REGGRP_PAREN) || "").length;
286 }
287});
288
289var Dictionary = RegGrp.extend({
290 parse: function(phrase) {
291 // Prevent sub-expressions in dictionary entries from capturing.
292 var entries = this[ITEMS];
293 return phrase.replace(REGGRP_DICT_ENTRIES, function(match, entry) {
294 entry = entries[HASH + entry];
295 return entry ? entry._nonCapturing : match;
296 });
297 },
298
299 add: function(expression, replacement) {
300 // Get the underlying replacement value.
301 if (replacement instanceof RegExp) {
302 replacement = replacement.source;
303 }
304 // Translate the replacement.
305 // The result is the original replacement recursively parsed by this dictionary.
306 var nonCapturing = replacement.replace(REGGRP_LOOKUPS, _nonCapture);
307 if (replacement.indexOf("(") !== -1) {
308 var realLength = RegGrp.count(replacement);
309 }
310 if (replacement.indexOf("<#") !== -1) {
311 replacement = this.parse(replacement);
312 nonCapturing = this.parse(nonCapturing);
313 }
314 var item = this.base(expression, replacement);
315 item._nonCapturing = nonCapturing;
316 item._length = realLength || item.length; // underlying number of sub-groups
317 return item;
318 },
319
320 toString: function() {
321 return "(<#" + this[PATTERNS].join(">)|(<#") + ">)";
322 }
323});
324
325function _nonCapture(match, escaped) {
326 return escaped || "(?:"; // non-capturing
327};
328
329// =========================================================================
330// lang/extend.js
331// =========================================================================
332
333function extend(object, source) { // or extend(object, key, value)
334 if (object && source) {
335 var proto = (typeof source == "function" ? Function : Object).prototype;
336 // Add constructor, toString etc
337 var i = _HIDDEN.length, key;
338 if (prototyping) while (key = _HIDDEN[--i]) {
339 var value = source[key];
340 if (value != proto[key]) {
341 if (_BASE.test(value)) {
342 _override(object, key, value)
343 } else {
344 object[key] = value;
345 }
346 }
347 }
348 // Copy each of the source object's properties to the target object.
349 for (key in source) if (typeof proto[key] == "undefined") {
350 var value = source[key];
351 // Check for method overriding.
352 if (object[key] && typeof value == "function" && _BASE.test(value)) {
353 _override(object, key, value);
354 } else {
355 object[key] = value;
356 }
357 }
358 }
359 return object;
360};
361
362function _override(object, name, method) {
363 // Override an existing method.
364 var ancestor = object[name];
365 object[name] = function() {
366 var previous = this.base;
367 this.base = ancestor;
368 var returnValue = method.apply(this, arguments);
369 this.base = previous;
370 return returnValue;
371 };
372};
373
374function combine(keys, values) {
375 // Combine two arrays to make a hash.
376 if (!values) values = keys;
377 var hash = {};
378 for (var i in keys) hash[i] = values[i];
379 return hash;
380};
381
382function format(string) {
383 // Replace %n with arguments[n].
384 // e.g. format("%1 %2%3 %2a %1%3", "she", "se", "lls");
385 // ==> "she sells sea shells"
386 // Only %1 - %9 supported.
387 var args = arguments;
388 var _FORMAT = new RegExp("%([1-" + arguments.length + "])", "g");
389 return String(string).replace(_FORMAT, function(match, index) {
390 return index < args.length ? args[index] : match;
391 });
392};
393
394function match(string, expression) {
395 // Same as String.match() except that this function will return an empty
396 // array if there is no match.
397 return String(string).match(expression) || [];
398};
399
400function rescape(string) {
401 // Make a string safe for creating a RegExp.
402 return String(string).replace(_RESCAPE, "\\$1");
403};
404
405// http://blog.stevenlevithan.com/archives/faster-trim-javascript
406function trim(string) {
407 return String(string).replace(_LTRIM, "").replace(_RTRIM, "");
408};
409
410function K(k) {
411 return function() {
412 return k;
413 };
414};
415
416// -----------------------------------------------------------------------
417// parsing
418// -----------------------------------------------------------------------
419
420var Parser = RegGrp.extend({ignoreCase: true});
421
422var SINGLE_QUOTES = /'/g,
423 ESCAPED = /'(\d+)'/g,
424 ESCAPE = /\\/g,
425 UNESCAPE = /\\([nrtf'"])/g;
426
427var strings = [];
428
429var encoder = new Parser({
430 // comments
431 "<!\\-\\-|\\-\\->": "",
432 "\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/": "",
433 // get rid
434 "@(namespace|import)[^;\\n]+[;\\n]": "",
435 // strings
436 "'(\\\\.|[^'\\\\])*'": encodeString,
437 '"(\\\\.|[^"\\\\])*"': encodeString,
438 // white space
439 "\\s+": " "
440});
441
442function encode(selector) {
443 return encoder.parse(selector).replace(UNESCAPE, "$1");
444};
445
446function decode(query) {
447 // put string values back
448 return query.replace(ESCAPED, decodeString);
449};
450
451function encodeString(string) {
452 var index = strings.length;
453 strings[index] = string.slice(1, -1)
454 .replace(UNESCAPE, "$1")
455 .replace(SINGLE_QUOTES, "\\'");
456 return "'" + index + "'";
457};
458
459function decodeString(match, index) {
460 var string = strings[index];
461 if (string == null) return match;
462 return "'" + strings[index] + "'";
463};
464
465function getString(value) {
466 return value.indexOf("'") === 0 ? strings[value.slice(1, - 1)] : value;
467};
468
469// clone a "width" function to create a "height" function
470var rotater = new RegGrp({
471 Width: "Height",
472 width: "height",
473 Left: "Top",
474 left: "top",
475 Right: "Bottom",
476 right: "bottom",
477 onX: "onY"
478});
479
480function rotate(fn) {
481 return rotater.parse(fn);
482};
483
484// -----------------------------------------------------------------------
485// event handling
486// -----------------------------------------------------------------------
487
488var eventHandlers = [];
489
490function addResize(handler) {
491 addRecalc(handler);
492 addEventHandler(window, "onresize", handler);
493};
494
495// add an event handler (function) to an element
496function addEventHandler(element, type, handler) {
497 element.attachEvent(type, handler);
498 // store the handler so it can be detached later
499 eventHandlers.push(arguments);
500};
501
502// remove an event handler assigned to an element by IE7
503function removeEventHandler(element, type, handler) {
504 try {
505 element.detachEvent(type, handler);
506 } catch (ex) {
507 // write a letter of complaint to microsoft..
508 }
509};
510
511// remove event handlers (they eat memory)
512addEventHandler(window, "onunload", function() {
513 var handler;
514 while (handler = eventHandlers.pop()) {
515 removeEventHandler(handler[0], handler[1], handler[2]);
516 }
517});
518
519function register(handler, element, condition) { // -@DRE
520 //var set = handler[element.uniqueID];
521 if (!handler.elements) handler.elements = {};
522 if (condition) handler.elements[element.uniqueID] = element;
523 else delete handler.elements[element.uniqueID];
524 //return !set && condition;
525 return condition;
526};
527
528addEventHandler(window, "onbeforeprint", function() {
529 if (!IE7.CSS.print) new StyleSheet("print");
530 IE7.CSS.print.recalc();
531});
532
533// -----------------------------------------------------------------------
534// pixel conversion
535// -----------------------------------------------------------------------
536
537// this is handy because it means that web developers can mix and match
538// measurement units in their style sheets. it is not uncommon to
539// express something like padding in "em" units whilst border thickness
540// is most often expressed in pixels.
541
542var PIXEL = /^\d+(px)?$/i;
543var PERCENT = /^\d+%$/;
544var getPixelValue = function(element, value) {
545 if (PIXEL.test(value)) return parseInt(value);
546 var style = element.style.left;
547 var runtimeStyle = element.runtimeStyle.left;
548 element.runtimeStyle.left = element.currentStyle.left;
549 element.style.left = value || 0;
550 value = element.style.pixelLeft;
551 element.style.left = style;
552 element.runtimeStyle.left = runtimeStyle;
553 return value;
554};
555
556// -----------------------------------------------------------------------
557// generic
558// -----------------------------------------------------------------------
559
560var $IE7 = "ie7-";
561
562var Fix = Base.extend({
563 constructor: function() {
564 this.fixes = [];
565 this.recalcs = [];
566 },
567 init: Undefined
568});
569
570// a store for functions that will be called when refreshing IE7
571var recalcs = [];
572function addRecalc(recalc) {
573 recalcs.push(recalc);
574};
575
576IE7.recalc = function() {
577 IE7.HTML.recalc();
578 // re-apply style sheet rules (re-calculate ie7 classes)
579 IE7.CSS.recalc();
580 // apply global fixes to the document
581 for (var i = 0; i < recalcs.length; i++) recalcs[i]();
582};
583
584function isFixed(element) {
585 return element.currentStyle["ie7-position"] == "fixed";
586};
587
588// original style
589function getDefinedStyle(element, propertyName) {
590 return element.currentStyle[$IE7 + propertyName] || element.currentStyle[propertyName];
591};
592
593function setOverrideStyle(element, propertyName, value) {
594 if (element.currentStyle[$IE7 + propertyName] == null) {
595 element.runtimeStyle[$IE7 + propertyName] = element.currentStyle[propertyName];
596 }
597 element.runtimeStyle[propertyName] = value;
598};
599
600// Create a temporary element which is used to inherit styles
601// from the target element.
602function createTempElement(tagName) {
603 var element = document.createElement(tagName || "object");
604 element.style.cssText = "position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";
605 element.ie7_anon = true;
606 return element;
607};
608
609
610// =========================================================================
611// ie7-css.js
612// =========================================================================
613
614var NEXT_SIBLING = "(e.nextSibling&&IE7._getElementSibling(e,'next'))",
615 PREVIOUS_SIBLING = NEXT_SIBLING.replace(/next/g, "previous"),
616 IS_ELEMENT = "e.nodeName>'@'",
617 IF_ELEMENT = "if(" + IS_ELEMENT + "){";
618
619var ID_ATTRIBUTE = "(e.nodeName==='FORM'?IE7._getAttribute(e,'id'):e.id)";
620
621var HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
622var FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
623var SPACE = /\s/;
624var RULE = /((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g;
625var SELECTOR = /(?:\\.|[^,\\])+/g;
626
627var styleSheets = document.styleSheets;
628
629var inheritedProperties = [];
630
631IE7.CSS = new (Fix.extend({ // single instance
632 parser: new Parser,
633 screen: "",
634 print: "",
635 styles: [],
636 rules: [],
637 pseudoClasses: appVersion < 7 ? "first\\-child" : "",
638 dynamicPseudoClasses: {
639 toString: function() {
640 var strings = [];
641 for (var pseudoClass in this) strings.push(pseudoClass);
642 return strings.join("|");
643 }
644 },
645
646 init: function() {
647 var NONE = "^\x01$";
648 var CLASS = "\\[class=?[^\\]]*\\]";
649 var pseudoClasses = [];
650 if (this.pseudoClasses) pseudoClasses.push(this.pseudoClasses);
651 var dynamicPseudoClasses = this.dynamicPseudoClasses.toString();
652 if (dynamicPseudoClasses) pseudoClasses.push(dynamicPseudoClasses);
653 pseudoClasses = pseudoClasses.join("|");
654 var unknown = appVersion < 7 ? ["[>+~\\[(]|([:.])[\\w-]+\\1"] : [CLASS];
655 if (pseudoClasses) unknown.push(":(" + pseudoClasses + ")");
656 this.UNKNOWN = new RegExp(unknown.join("|") || NONE, "i");
657 var complex = appVersion < 7 ? ["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"] : [CLASS];
658 var complexRule = complex.concat();
659 if (pseudoClasses) complexRule.push(":(" + pseudoClasses + ")");
660 Rule.COMPLEX = new RegExp(complexRule.join("|") || NONE, "ig");
661 if (this.pseudoClasses) complex.push(":(" + this.pseudoClasses + ")");
662 DynamicRule.COMPLEX = new RegExp(complex.join("|") || NONE, "i");
663 dynamicPseudoClasses = "not\\(:" + dynamicPseudoClasses.split("|").join("\\)|not\\(:") + "\\)|" + dynamicPseudoClasses;
664 DynamicRule.MATCH = new RegExp(dynamicPseudoClasses ? "(.*?):(" + dynamicPseudoClasses + ")(.*)" : NONE, "i");
665
666 this.createStyleSheet();
667 this.refresh();
668 },
669
670 addEventHandler: function() {
671 addEventHandler.apply(null, arguments);
672 },
673
674 addFix: function(expression, replacement) {
675 this.parser.add(expression, replacement);
676 },
677
678 addRecalc: function(propertyName, test, handler, replacement) {
679 // recalcs occur whenever the document is refreshed using document.recalc()
680 propertyName = propertyName.source || propertyName;
681 test = new RegExp("([{;\\s])" + propertyName + "\\s*:\\s*" + test + "[^;}]*");
682 var id = this.recalcs.length;
683 if (typeof replacement == "string") replacement = propertyName + ":" + replacement;
684 this.addFix(test, function(match) {
685 if (typeof replacement == "function") replacement = replacement(match);
686 return (replacement ? replacement : match) + ";ie7-" + match.slice(1) + ";ie7_recalc" + id + ":1";
687 });
688 this.recalcs.push(arguments);
689 return id;
690 },
691
692 apply: function() {
693 this.getInlineCSS();
694 new StyleSheet("screen");
695 this.trash();
696 },
697
698 createStyleSheet: function() {
699 // create the IE7 style sheet
700 document.getElementsByTagName("head")[0].appendChild(document.createElement("style"));
701 this.styleSheet = styleSheets[styleSheets.length - 1];
702 // flag it so we can ignore it during parsing
703 this.styleSheet.ie7 = true;
704 this.styleSheet.owningElement.ie7 = true;
705 this.styleSheet.cssText = HEADER;
706 },
707
708 getInlineCSS: function() {// load inline styles
709 var styleSheets = document.getElementsByTagName("style"), styleSheet;
710 for (var i = styleSheets.length - 1; styleSheet = styleSheets[i]; i--) {
711 if (!styleSheet.disabled && !styleSheet.ie7) {
712 styleSheet._cssText = styleSheet.innerHTML;
713 }
714 }
715 },
716
717 getText: function(styleSheet, path) {
718 // Internet Explorer will trash unknown selectors (it converts them to "UNKNOWN").
719 // So we must reload external style sheets (internal style sheets can have their text
720 // extracted through the innerHTML property).
721
722 // load the style sheet text from an external file
723 try {
724 var cssText = styleSheet.cssText;
725 } catch (e) {
726 cssText = "";
727 }
728 if (httpRequest) cssText = loadFile(styleSheet.href, path) || cssText;
729 return cssText;
730 },
731
732 recalc: function() {
733 this.screen.recalc();
734 // we're going to read through all style rules.
735 // certain rules have had ie7 properties added to them.
736 // e.g. p{top:0; ie7_recalc2:1; left:0}
737 // this flags a property in the rule as needing a fix.
738 // the selector text is then used to query the document.
739 // we can then loop through the results of the query
740 // and fix the elements.
741 // we ignore the IE7 rules - so count them in the header
742 var RECALCS = /ie7_recalc\d+/g;
743 var start = HEADER.match(/[{,]/g).length;
744 // only calculate screen fixes. print fixes don't show up anyway
745 var rules = this.styleSheet.rules, rule;
746 var calcs, calc, elements, element, i, j, k, id;
747 // loop through all rules
748 for (i = start; rule = rules[i]; i++) {
749 var cssText = rule.style.cssText;
750 // search for the "ie7_recalc" flag (there may be more than one)
751 if (calcs = cssText.match(RECALCS)) {
752 // use the selector text to query the document
753 elements = cssQuery(rule.selectorText);
754 // if there are matching elements then loop
755 // through the recalc functions and apply them
756 // to each element
757 if (elements.length) for (j = 0; j < calcs.length; j++) {
758 // get the matching flag (e.g. ie7_recalc3)
759 id = calcs[j];
760 // extract the numeric id from the end of the flag
761 // and use it to index the collection of recalc
762 // functions
763 calc = IE7.CSS.recalcs[id.slice(10)][2];
764 for (k = 0; (element = elements[k]); k++) {
765 // apply the fix
766 if (element.currentStyle[id]) calc(element, cssText);
767 }
768 }
769 }
770 }
771 },
772
773 refresh: function() {
774 this.styleSheet.cssText = HEADER + this.screen + this.print;
775 },
776
777 trash: function() {
778 // trash the old style sheets
779 for (var i = 0; i < styleSheets.length; i++) {
780 if (!styleSheets[i].ie7) {
781 try {
782 var cssText = styleSheets[i].cssText;
783 } catch (e) {
784 cssText = "";
785 }
786 if (cssText) styleSheets[i].cssText = "";
787 }
788 }
789 }
790}));
791
792// -----------------------------------------------------------------------
793// IE7 StyleSheet class
794// -----------------------------------------------------------------------
795
796var StyleSheet = Base.extend({
797 constructor: function(media) {
798 this.media = media;
799 this.load();
800 IE7.CSS[media] = this;
801 IE7.CSS.refresh();
802 },
803
804 createRule: function(selector, cssText) {
805 var match;
806 if (PseudoElement && (match = selector.match(PseudoElement.MATCH))) {
807 return new PseudoElement(match[1], match[2], cssText);
808 } else if (match = selector.match(DynamicRule.MATCH)) {
809 if (!HYPERLINK.test(match[0]) || DynamicRule.COMPLEX.test(match[0])) {
810 return new DynamicRule(selector, match[1], match[2], match[3], cssText);
811 }
812 } else {
813 return new Rule(selector, cssText);
814 }
815 return selector + " {" + cssText + "}";
816 },
817
818 getText: function() {
819 // store for style sheet text
820 // parse media decalarations
821 var MEDIA = /@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi;
822 var IMPORTS = /@import[^;\n]+/gi;
823 var TRIM_IMPORTS = /@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi;
824 var URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
825
826 var self = this;
827
828 // Store loaded cssText URLs
829 var fileCache = {};
830
831 function getCSSText(styleSheet, path, media, level) {
832 var cssText = "";
833 if (!level) {
834 media = toSimpleMedia(styleSheet.media);
835 level = 0;
836 }
837 if (media === "none") {
838 styleSheet.disabled = true;
839 return "";
840 }
841 if (media === "all" || media === self.media) {
842 // IE only allows importing style sheets three levels deep.
843 // it will crash if you try to access a level below this
844 try {
845 var canAcess = !!styleSheet.cssText;
846 } catch (exe) {}
847 if (level < 3 && canAcess) {
848 var hrefs = styleSheet.cssText.match(IMPORTS);
849 // loop through imported style sheets
850 for (var i = 0, imported; i < styleSheet.imports.length; i++) {
851 var imported = styleSheet.imports[i];
852 var href = styleSheet._href || styleSheet.href;
853 imported._href = hrefs[i].replace(TRIM_IMPORTS, "");
854 // call this function recursively to get all imported style sheets
855 cssText += getCSSText(imported, getPath(href, path), media, level + 1);
856 }
857 }
858 // retrieve inline style or load an external style sheet
859 cssText += encode(styleSheet.href ? loadStyleSheet(styleSheet, path) : styleSheet.owningElement._cssText);
860 cssText = parseMedia(cssText, self.media);
861 }
862 return cssText;
863 };
864
865 // Load all style sheets in the document
866 for (var i = 0; i < styleSheets.length; i++) {
867 var styleSheet = styleSheets[i];
868 if (!styleSheet.disabled && !styleSheet.ie7) this.cssText += getCSSText(styleSheet);
869 }
870
871 // helper functions
872 function parseMedia(cssText, media) {
873 filterMedia.value = media;
874 return cssText.replace(MEDIA, filterMedia);
875 };
876
877 function filterMedia(match, media, cssText) {
878 media = toSimpleMedia(media);
879 switch (media) {
880 case "screen":
881 case "print":
882 if (media !== filterMedia.value) return "";
883 case "all":
884 return cssText;
885 }
886 return "";
887 };
888
889 function toSimpleMedia(media) {
890 if (!media) return "all";
891 var split = media.toLowerCase().split(/\s*,\s*/);
892 media = "none";
893 for (var i = 0; i < split.length; i++) {
894 if (split[i] === "all") return "all";
895 if (split[i] === "screen") {
896 if (media === "print") return "all";
897 media = "screen";
898 } else if (split[i] === "print") {
899 if (media === "screen") return "all";
900 media = "print";
901 }
902 }
903 return media;
904 };
905
906 // Load an external style sheet
907 function loadStyleSheet(styleSheet, path) {
908 var href = styleSheet._href || styleSheet.href;
909 var url = makePath(href, path);
910 // If the style sheet has already loaded then don't reload it
911 if (fileCache[url]) return "";
912 // Load from source
913 fileCache[url] = styleSheet.disabled ? "" :
914 fixUrls(IE7.CSS.getText(styleSheet, path), getPath(href, path));
915 return fileCache[url];
916 };
917
918 // Fix CSS paths.
919 // We're lumping all css text into one big style sheet so relative
920 // paths have to be fixed. This is necessary anyway because of other
921 // Internet Explorer bugs.
922 function fixUrls(cssText, pathname) {
923 // hack & slash
924 return cssText.replace(URL, "$1" + pathname.slice(0, pathname.lastIndexOf("/") + 1) + "$2");
925 };
926 },
927
928 load: function() {
929 this.cssText = "";
930 this.getText();
931 this.parse();
932 if (inheritedProperties.length) {
933 this.cssText = parseInherited(this.cssText);
934 }
935 this.cssText = decode(this.cssText);
936 fileCache = {};
937 },
938
939 parse: function() {
940 var cssText = IE7.CSS.parser.parse(this.cssText);
941
942 var declarations = "";
943 this.cssText = cssText.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g, function(match) {
944 declarations += match + "\n";
945 return "";
946 });
947 this.declarations = decode(declarations);
948
949 // Parse the style sheet
950 var offset = IE7.CSS.rules.length;
951 var rules = [], rule;
952 while ((rule = RULE.exec(this.cssText))) {
953 var cssText = rule[2];
954 if (cssText) {
955 var fixDescendants = appVersion < 7 && cssText.indexOf("AlphaImageLoader") !== -1;
956 var selectors = rule[1].match(SELECTOR), selector;
957 for (var i = 0; selector = selectors[i]; i++) {
958 selector = trim(selector);
959 var isUnknown = IE7.CSS.UNKNOWN.test(selector);
960 selectors[i] = isUnknown ? this.createRule(selector, cssText) : selector + "{" + cssText + "}";
961 if (fixDescendants) selectors[i] += this.createRule(selector + ">*", "position:relative");
962 }
963 rules.push(selectors.join("\n"));
964 }
965 }
966 this.cssText = rules.join("\n");
967 this.rules = IE7.CSS.rules.slice(offset);
968 },
969
970 recalc: function() {
971 var rule, i;
972 for (i = 0; (rule = this.rules[i]); i++) rule.recalc();
973 },
974
975 toString: function() {
976 return this.declarations + "@media " + this.media + "{" + this.cssText + "}";
977 }
978});
979
980var PseudoElement;
981
982// -----------------------------------------------------------------------
983// IE7 style rules
984// -----------------------------------------------------------------------
985
986var Rule = IE7.Rule = Base.extend({
987 constructor: function(selector, cssText) {
988 this.id = IE7.CSS.rules.length;
989 this.className = Rule.PREFIX + this.id;
990 var pseudoElement = selector.match(FIRST_LINE_LETTER);
991 this.selector = (pseudoElement ? pseudoElement[1] : selector) || "*";
992 this.selectorText = this.parse(this.selector) + (pseudoElement ? pseudoElement[2] : "");
993 this.cssText = cssText;
994 this.MATCH = new RegExp("\\s" + this.className + "(\\s|$)", "g");
995 IE7.CSS.rules.push(this);
996 this.init();
997 },
998
999 init: Undefined,
1000
1001 add: function(element) {
1002 // allocate this class
1003 element.className += " " + this.className;
1004 },
1005
1006 recalc: function() {
1007 // execute the underlying css query for this class
1008 var match = cssQuery(this.selector);
1009 // add the class name for all matching elements
1010 for (var i = 0; i < match.length; i++) this.add(match[i]);
1011 },
1012
1013 parse: function(selector) {
1014 // attempt to preserve specificity for "loose" parsing by
1015 // removing unknown tokens from a css selector but keep as
1016 // much as we can..
1017 var simple = selector.replace(Rule.CHILD, " ").replace(Rule.COMPLEX, "");
1018 if (appVersion < 7) simple = simple.replace(Rule.MULTI, "");
1019 var tags = match(simple, Rule.TAGS).length - match(selector, Rule.TAGS).length;
1020 var classes = match(simple, Rule.CLASSES).length - match(selector, Rule.CLASSES).length + 1;
1021 while (classes > 0 && Rule.CLASS.test(simple)) {
1022 simple = simple.replace(Rule.CLASS, "");
1023 classes--;
1024 }
1025 while (tags > 0 && Rule.TAG.test(simple)) {
1026 simple = simple.replace(Rule.TAG, "$1*");
1027 tags--;
1028 }
1029 simple += "." + this.className;
1030 classes = Math.min(classes, 2);
1031 tags = Math.min(tags, 2);
1032 var score = -10 * classes - tags;
1033 if (score > 0) {
1034 simple = simple + "," + Rule.MAP[score] + " " + simple;
1035 }
1036 return simple;
1037 },
1038
1039 remove: function(element) {
1040 // deallocate this class
1041 element.className = element.className.replace(this.MATCH, "$1");
1042 },
1043
1044 toString: function() {
1045 return format("%1 {%2}", this.selectorText, this.cssText);
1046 }
1047}, {
1048 CHILD: />/g,
1049 CLASS: /\.[\w-]+/,
1050 CLASSES: /[.:\[]/g,
1051 MULTI: /(\.[\w-]+)+/g,
1052 PREFIX: "ie7_class",
1053 TAG: /^\w+|([\s>+~])\w+/,
1054 TAGS: /^\w|[\s>+~]\w/g,
1055 MAP: {
1056 "1": "html",
1057 "2": "html body",
1058 "10": ".ie7_html",
1059 "11": "html.ie7_html",
1060 "12": "html.ie7_html body",
1061 "20": ".ie7_html .ie7_body",
1062 "21": "html.ie7_html .ie7_body",
1063 "22": "html.ie7_html body.ie7_body"
1064 }
1065});
1066
1067// -----------------------------------------------------------------------
1068// IE7 dynamic style
1069// -----------------------------------------------------------------------
1070
1071// object properties:
1072// attach: the element that an event handler will be attached to
1073// target: the element that will have the IE7 class applied
1074
1075var DynamicRule = Rule.extend({
1076 // properties
1077 constructor: function(selector, attach, dynamicPseudoClass, target, cssText) {
1078 this.negated = dynamicPseudoClass.indexOf("not") === 0;
1079 if (this.negated) dynamicPseudoClass = dynamicPseudoClass.slice(5, -1);
1080 // initialise object properties
1081 this.attach = attach || "*";
1082 this.dynamicPseudoClass = IE7.CSS.dynamicPseudoClasses[dynamicPseudoClass];
1083 this.target = target;
1084 this.base(selector, cssText);
1085 },
1086
1087 recalc: function() {
1088 // execute the underlying css query for this class
1089 var attaches = cssQuery(this.attach), attach;
1090 // process results
1091 for (var i = 0; attach = attaches[i]; i++) {
1092 // retrieve the event handler's target element(s)
1093 var target = this.target ? cssQuery(this.target, attach) : [attach];
1094 // attach event handlers for dynamic pseudo-classes
1095 if (target.length) this.dynamicPseudoClass.apply(attach, target, this);
1096 }
1097 }
1098});
1099
1100// -----------------------------------------------------------------------
1101// IE7 dynamic pseudo-classes
1102// -----------------------------------------------------------------------
1103
1104var DynamicPseudoClass = Base.extend({
1105 constructor: function(name, apply) {
1106 this.name = name;
1107 this.apply = apply;
1108 this.instances = {};
1109 IE7.CSS.dynamicPseudoClasses[name] = this;
1110 },
1111
1112 register: function(instance, negated) {
1113 // an "instance" is actually an Arguments object
1114 var _class = instance[2];
1115 if (!negated && _class.negated) {
1116 this.unregister(instance, true);
1117 } else {
1118 instance.id = _class.id + instance[0].uniqueID;
1119 if (!this.instances[instance.id]) {
1120 var target = instance[1], j;
1121 for (j = 0; j < target.length; j++) _class.add(target[j]);
1122 this.instances[instance.id] = instance;
1123 }
1124 }
1125 },
1126
1127 unregister: function(instance, negated) {
1128 var _class = instance[2];
1129 if (!negated && _class.negated) {
1130 this.register(instance, true);
1131 } else {
1132 if (this.instances[instance.id]) {
1133 var target = instance[1], j;
1134 for (j = 0; j < target.length; j++) _class.remove(target[j]);
1135 delete this.instances[instance.id];
1136 }
1137 }
1138 }
1139});
1140
1141// -----------------------------------------------------------------------
1142// dynamic pseudo-classes
1143// -----------------------------------------------------------------------
1144
1145var Hover = new DynamicPseudoClass("hover", function(element) {
1146 var instance = arguments;
1147 IE7.CSS.addEventHandler(element, "onmouseenter", function() {
1148 Hover.register(instance);
1149 });
1150 IE7.CSS.addEventHandler(element, "onmouseleave", function() {
1151 Hover.unregister(instance);
1152 });
1153});
1154
1155// globally trap the mouseup event (thanks Martijn!)
1156addEventHandler(document, "onmouseup", function() {
1157 var instances = Hover.instances;
1158 for (var i in instances)
1159 if (!instances[i][0].contains(event.srcElement))
1160 Hover.unregister(instances[i]);
1161});
1162
1163var ATTR = {
1164 "=": "%1==='%2'", // "[@%1='%2']"
1165 "~=": "(' '+%1+' ').indexOf(' %2 ')!==-1", // "[contains(concat(' ',@%1,' '),' %2 ')]",
1166 "|=": "%1==='%2'||%1.indexOf('%2-')===0", // "[@%1='%2' or starts-with(@%1,'%2-')]",
1167 "^=": "%1.indexOf('%2')===0", // "[starts-with(@%1,'%2')]",
1168 "$=": "%1.slice(-'%2'.length)==='%2'", // "[ends-with(@%1,'%2')]",
1169 "*=": "%1.indexOf('%2')!==-1" // "[contains(@%1,'%2')]"
1170};
1171ATTR[""] = "%1!=null"; // "[@%1]"
1172
1173var FILTER = {
1174 "<#attr>": function(match, name, operator, value) {
1175 var attr = "IE7._getAttribute(e,'" + name + "')";
1176 value = getString(value);
1177 if (operator.length > 1) {
1178 if (!value || operator === "~=" && SPACE.test(value)) {
1179 return "false&&";
1180 }
1181 attr = "(" + attr + "||'')";
1182 }
1183 return "(" + format(ATTR[operator], attr, value) + ")&&";
1184 },
1185
1186 "<#id>": ID_ATTRIBUTE + "==='$1'&&",
1187
1188 "<#class>": "e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",
1189
1190 // PSEDUO
1191 ":first-child": "!" + PREVIOUS_SIBLING + "&&",
1192 ":link": "e.currentStyle['ie7-link']=='link'&&",
1193 ":visited": "e.currentStyle['ie7-link']=='visited'&&"
1194};
1195
1196// =========================================================================
1197// ie7-html.js
1198// =========================================================================
1199
1200// default font-sizes
1201//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}";
1202
1203IE7.HTML = new (Fix.extend({ // single instance
1204 fixed: {},
1205
1206 init: Undefined,
1207
1208 addFix: function() {
1209 // fixes are a one-off, they are applied when the document is loaded
1210 this.fixes.push(arguments);
1211 },
1212
1213 apply: function() {
1214 for (var i = 0; i < this.fixes.length; i++) {
1215 var match = cssQuery(this.fixes[i][0]);
1216 var fix = this.fixes[i][1];
1217 for (var j = 0; j < match.length; j++) fix(match[j]);
1218 }
1219 },
1220
1221 addRecalc: function() {
1222 // recalcs occur whenever the document is refreshed using document.recalc()
1223 this.recalcs.push(arguments);
1224 },
1225
1226 recalc: function() {
1227 // loop through the fixes
1228 for (var i = 0; i < this.recalcs.length; i++) {
1229 var match = cssQuery(this.recalcs[i][0]);
1230 var recalc = this.recalcs[i][1], element;
1231 var key = Math.pow(2, i);
1232 for (var j = 0; (element = match[j]); j++) {
1233 var uniqueID = element.uniqueID;
1234 if ((this.fixed[uniqueID] & key) === 0) {
1235 element = recalc(element) || element;
1236 this.fixed[uniqueID] |= key;
1237 }
1238 }
1239 }
1240 }
1241}));
1242
1243if (appVersion < 7) {
1244 // provide support for the <abbr> tag.
1245 document.createElement("abbr");
1246
1247 // bind to the first child control
1248 IE7.HTML.addRecalc("label", function(label) {
1249 if (!label.htmlFor) {
1250 var firstChildControl = cssQuery("input,textarea", label, true);
1251 if (firstChildControl) {
1252 addEventHandler(label, "onclick", function() {
1253 firstChildControl.click();
1254 });
1255 }
1256 }
1257 });
1258}
1259
1260// =========================================================================
1261// ie7-layout.js
1262// =========================================================================
1263
1264var NUMERIC = "[.\\d]";
1265
1266(function() {
1267 var layout = IE7.Layout = {};
1268
1269 // big, ugly box-model hack + min/max stuff
1270
1271 // #tantek > #erik > #dean { voice-family: hacker; }
1272
1273 // -----------------------------------------------------------------------
1274 // "layout"
1275 // -----------------------------------------------------------------------
1276
1277 HEADER += "*{boxSizing:content-box}";
1278
1279 // give an element "layout"
1280 layout.boxSizing = function(element) {
1281 if (!element.currentStyle.hasLayout) {
1282 //# element.runtimeStyle.fixedHeight =
1283 element.style.height = "0cm";
1284 if (element.currentStyle.verticalAlign === "auto")
1285 element.runtimeStyle.verticalAlign = "top";
1286 // when an element acquires "layout", margins no longer collapse correctly
1287 collapseMargins(element);
1288 }
1289 };
1290
1291 // -----------------------------------------------------------------------
1292 // Margin Collapse
1293 // -----------------------------------------------------------------------
1294
1295 function collapseMargins(element) {
1296 if (element != viewport && element.currentStyle.position !== "absolute") {
1297 collapseMargin(element, "marginTop");
1298 collapseMargin(element, "marginBottom");
1299 }
1300 };
1301
1302 function collapseMargin(element, type) {
1303 if (!element.runtimeStyle[type]) {
1304 var parentElement = element.parentElement;
1305 var isTopMargin = type === "marginTop";
1306 if (parentElement && parentElement.currentStyle.hasLayout && !IE7._getElementSibling(element, isTopMargin ? "previous" : "next")) return;
1307 var child = element[isTopMargin ? "firstChild" : "lastChild"];
1308 if (child && child.nodeName < "@") child = IE7._getElementSibling(child, isTopMargin ? "next" : "previous");
1309 if (child && child.currentStyle.styleFloat === "none" && child.currentStyle.hasLayout) {
1310 collapseMargin(child, type);
1311 margin = _getMargin(element, element.currentStyle[type]);
1312 childMargin = _getMargin(child, child.currentStyle[type]);
1313 if (margin < 0 || childMargin < 0) {
1314 element.runtimeStyle[type] = margin + childMargin;
1315 } else {
1316 element.runtimeStyle[type] = Math.max(childMargin, margin);
1317 }
1318 child.runtimeStyle[type] = "0px";
1319 }
1320 }
1321 };
1322
1323 function _getMargin(element, value) {
1324 return value === "auto" ? 0 : getPixelValue(element, value);
1325 };
1326
1327 // -----------------------------------------------------------------------
1328 // box-model
1329 // -----------------------------------------------------------------------
1330
1331 // constants
1332 var UNIT = /^[.\d][\w]*$/, AUTO = /^(auto|0cm)$/;
1333
1334 var apply = {};
1335 layout.borderBox = function(element){
1336 apply.Width(element);
1337 apply.Height(element);
1338 };
1339
1340 var _fixWidth = function(HEIGHT) {
1341 apply.Width = function(element) {
1342 if (!PERCENT.test(element.currentStyle.width)) _fixWidth(element);
1343 if (HEIGHT) collapseMargins(element);
1344 };
1345
1346 function _fixWidth(element, value) {
1347 if (!element.runtimeStyle.fixedWidth) {
1348 if (!value) value = element.currentStyle.width;
1349 element.runtimeStyle.fixedWidth = UNIT.test(value) ? Math.max(0, getFixedWidth(element, value)) + "px" : value;
1350 setOverrideStyle(element, "width", element.runtimeStyle.fixedWidth);
1351 }
1352 };
1353
1354 function layoutWidth(element) {
1355 if (!isFixed(element)) {
1356 var layoutParent = element.offsetParent;
1357 while (layoutParent && !layoutParent.currentStyle.hasLayout) layoutParent = layoutParent.offsetParent;
1358 }
1359 return (layoutParent || viewport).clientWidth;
1360 };
1361
1362 function getPixelWidth(element, value) {
1363 if (PERCENT.test(value)) return parseInt(parseFloat(value) / 100 * layoutWidth(element));
1364 return getPixelValue(element, value);
1365 };
1366
1367 var getFixedWidth = function(element, value) {
1368 var borderBox = element.currentStyle["ie7-box-sizing"] === "border-box";
1369 var adjustment = 0;
1370 if (MSIE5 && !borderBox)
1371 adjustment += getBorderWidth(element) + getWidth(element, "padding");
1372 else if (!MSIE5 && borderBox)
1373 adjustment -= getBorderWidth(element) + getWidth(element, "padding");
1374 return getPixelWidth(element, value) + adjustment;
1375 };
1376
1377 // easy way to get border thickness for elements with "layout"
1378 function getBorderWidth(element) {
1379 return element.offsetWidth - element.clientWidth;
1380 };
1381
1382 // have to do some pixel conversion to get padding/margin thickness :-(
1383 function getWidth(element, type) {
1384 return getPixelWidth(element, element.currentStyle[type + "Left"]) + getPixelWidth(element, element.currentStyle[type + "Right"]);
1385 };
1386
1387 // -----------------------------------------------------------------------
1388 // min/max
1389 // -----------------------------------------------------------------------
1390
1391 HEADER += "*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";
1392
1393 // handle min-width property
1394 layout.minWidth = function(element) {
1395 // IE6 supports min-height so we frig it here
1396 //#if (element.currentStyle.minHeight === "auto") element.runtimeStyle.minHeight = 0;
1397 if (element.currentStyle["min-width"] != null) {
1398 element.style.minWidth = element.currentStyle["min-width"];
1399 }
1400 if (register(arguments.callee, element, element.currentStyle.minWidth !== "none")) {
1401 layout.boxSizing(element);
1402 _fixWidth(element);
1403 resizeWidth(element);
1404 }
1405 };
1406
1407 // clone the minWidth function to make a maxWidth function
1408 eval("IE7.Layout.maxWidth=" + String(layout.minWidth).replace(/min/g, "max"));
1409
1410 // apply min/max restrictions
1411 function resizeWidth(element) {
1412 // check boundaries
1413 if (element == document.body) {
1414 var width = element.clientWidth;
1415 } else {
1416 var rect = element.getBoundingClientRect();
1417 width = rect.right - rect.left;
1418 }
1419 if (element.currentStyle.minWidth !== "none" && width < getFixedWidth(element, element.currentStyle.minWidth)) {
1420 element.runtimeStyle.width = element.currentStyle.minWidth;
1421 } else if (element.currentStyle.maxWidth !== "none" && width >= getFixedWidth(element, element.currentStyle.maxWidth)) {
1422 element.runtimeStyle.width = element.currentStyle.maxWidth;
1423 } else {
1424 element.runtimeStyle.width = element.runtimeStyle.fixedWidth;
1425 }
1426 };
1427
1428 // -----------------------------------------------------------------------
1429 // right/bottom
1430 // -----------------------------------------------------------------------
1431
1432 function fixRight(element) {
1433 if (register(fixRight, element, /^(fixed|absolute)$/.test(element.currentStyle.position) &&
1434 getDefinedStyle(element, "left") !== "auto" &&
1435 getDefinedStyle(element, "right") !== "auto" &&
1436 AUTO.test(getDefinedStyle(element, "width")))) {
1437 resizeRight(element);
1438 layout.boxSizing(element);
1439 }
1440 };
1441 layout.fixRight = fixRight;
1442
1443 function resizeRight(element) {
1444 var left = getPixelWidth(element, element.runtimeStyle._left || element.currentStyle.left);
1445 var width = layoutWidth(element) - getPixelWidth(element, element.currentStyle.right) - left - getWidth(element, "margin");
1446 if (parseInt(element.runtimeStyle.width) === width) return;
1447 element.runtimeStyle.width = "";
1448 if (isFixed(element) || HEIGHT || element.offsetWidth < width) {
1449 if (!MSIE5) width -= getBorderWidth(element) + getWidth(element, "padding");
1450 if (width < 0) width = 0;
1451 element.runtimeStyle.fixedWidth = width;
1452 setOverrideStyle(element, "width", width);
1453 }
1454 };
1455
1456 // -----------------------------------------------------------------------
1457 // window.onresize
1458 // -----------------------------------------------------------------------
1459
1460 // handle window resize
1461 var clientWidth = 0;
1462 addResize(function() {
1463 if (!viewport) return;
1464 var i, wider = (clientWidth < viewport.clientWidth);
1465 clientWidth = viewport.clientWidth;
1466 // resize elements with "min-width" set
1467 var elements = layout.minWidth.elements;
1468 for (i in elements) {
1469 var element = elements[i];
1470 var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.minWidth));
1471 if (wider && fixedWidth) element.runtimeStyle.width = "";
1472 if (wider == fixedWidth) resizeWidth(element);
1473 }
1474 // resize elements with "max-width" set
1475 var elements = layout.maxWidth.elements;
1476 for (i in elements) {
1477 var element = elements[i];
1478 var fixedWidth = (parseInt(element.runtimeStyle.width) === getFixedWidth(element, element.currentStyle.maxWidth));
1479 if (!wider && fixedWidth) element.runtimeStyle.width = "";
1480 if (wider !== fixedWidth) resizeWidth(element);
1481 }
1482 // resize elements with "right" set
1483 for (i in fixRight.elements) resizeRight(fixRight.elements[i]);
1484 });
1485
1486 // -----------------------------------------------------------------------
1487 // fix CSS
1488 // -----------------------------------------------------------------------
1489 if (MSIE5) {
1490 IE7.CSS.addRecalc("width", NUMERIC, apply.Width);
1491 }
1492 if (appVersion < 7) {
1493 IE7.CSS.addRecalc("max-width", NUMERIC, layout.maxWidth);
1494 IE7.CSS.addRecalc("right", NUMERIC, fixRight);
1495 } else if (appVersion == 7) {
1496 if (HEIGHT) IE7.CSS.addRecalc("height", "[\\d.]+%", function(element) {
1497 element.runtimeStyle.pixelHeight = parseInt(layoutWidth(element) * element.currentStyle["ie7-height"].slice(0, -1) / 100);
1498 });
1499 }
1500 };
1501
1502 eval("var _fixHeight=" + rotate(_fixWidth));
1503
1504 // apply box-model + min/max fixes
1505 _fixWidth();
1506 _fixHeight(true);
1507
1508 if (appVersion < 7) {
1509 IE7.CSS.addRecalc("min-width", NUMERIC, layout.minWidth);
1510 IE7.CSS.addFix(/\bmin-height\s*/, "height");
1511 }
1512})();
1513
1514// =========================================================================
1515// ie7-graphics.js
1516// =========================================================================
1517
1518// a small transparent image used as a placeholder
1519var BLANK_GIF = makePath("blank.gif", path);
1520
1521var ALPHA_IMAGE_LOADER = "DXImageTransform.Microsoft.AlphaImageLoader";
1522var PNG_FILTER = "progid:" + ALPHA_IMAGE_LOADER + "(src='%1',sizingMethod='%2')";
1523
1524// regular expression version of the above
1525var PNG;
1526
1527var filtered = [];
1528
1529function fixImage(element) {
1530 if (PNG.test(element.src)) {
1531 // we have to preserve width and height
1532 var image = new Image(element.width, element.height);
1533 image.onload = function() {
1534 element.width = image.width;
1535 element.height = image.height;
1536 image = null;
1537 };
1538 image.src = element.src;
1539 // store the original url (we'll put it back when it's printed)
1540 element.pngSrc = element.src;
1541 // add the AlphaImageLoader thingy
1542 addFilter(element);
1543 }
1544};
1545
1546if (appVersion < 7) {
1547 // ** IE7 VARIABLE
1548 // e.g. apply the hack to all files ending in ".png"
1549 // IE7_PNG_SUFFIX = ".png";
1550 // You can also set it to a RegExp
1551 // IE7_PNG_SUFFIX = /\d+\.png$/;
1552
1553 // replace background(-image): url(..) .. with background(-image): .. ;filter: ..;
1554 IE7.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/, function(match, $1, $2, url, $4) {
1555 url = getString(url);
1556 return PNG.test(url) ? "filter:" + format(PNG_FILTER, url, $4.indexOf("no-repeat") === -1 ? "scale" : "crop") +
1557 ";zoom:1;background" + ($1||"") + ":" + ($2||"") + "none" + ($4||"") : match;
1558 });
1559
1560 // list-style-image
1561 IE7.CSS.addRecalc(/list\-style(\-image)?/, "[^};]*url", function(element) {
1562 var url = element.currentStyle.listStyleImage.slice(5, -2);
1563 if (PNG.test(url)) {
1564 if (element.nodeName === "LI") {
1565 fixListStyleImage(element, url)
1566 } else if (element.nodeName === "UL") {
1567 for (var i = 0, li; li = element.childNodes[i]; i++) {
1568 if (li.nodeName === "LI") fixListStyleImage(li, url);
1569 }
1570 }
1571 }
1572 });
1573
1574 function fixListStyleImage(element, src) {
1575 var style = element.runtimeStyle;
1576 var originalHeight = element.offsetHeight;
1577 var image = new Image;
1578 image.onload = function() {
1579 var paddingLeft = element.currentStyle.paddingLeft;
1580 paddingLeft = paddingLeft === "0px" ? 0 : getPixelValue(element, paddingLeft);
1581 style.paddingLeft = (paddingLeft + this.width) + "px";
1582 style.marginLeft = -this.width + "px";
1583 style.listStyleType = "none";
1584 style.listStyleImage = "none";
1585 style.paddingTop = Math.max(originalHeight - element.offsetHeight, 0) + "px";
1586 addFilter(element, "crop", src);
1587 element.style.zoom = "100%";
1588 };
1589 image.src = src;
1590 };
1591
1592 // -----------------------------------------------------------------------
1593 // fix PNG transparency (HTML images)
1594 // -----------------------------------------------------------------------
1595
1596 IE7.HTML.addRecalc("img,input", function(element) {
1597 if (element.nodeName === "INPUT" && element.type !== "image") return;
1598 fixImage(element);
1599 addEventHandler(element, "onpropertychange", function() {
1600 if (!printing && event.propertyName === "src" &&
1601 element.src.indexOf(BLANK_GIF) === -1) fixImage(element);
1602 });
1603 });
1604
1605 // assume that background images should not be printed
1606 // (if they are not transparent then they'll just obscure content)
1607 // but we'll put foreground images back...
1608 var printing = false;
1609 addEventHandler(window, "onbeforeprint", function() {
1610 printing = true;
1611 for (var i = 0; i < filtered.length; i++) removeFilter(filtered[i]);
1612 });
1613 addEventHandler(window, "onafterprint", function() {
1614 for (var i = 0; i < filtered.length; i++) addFilter(filtered[i]);
1615 printing = false;
1616 });
1617}
1618
1619// apply a filter
1620function addFilter(element, sizingMethod, src) {
1621 var filter = element.filters[ALPHA_IMAGE_LOADER];
1622 if (filter) {
1623 filter.src = src || element.src;
1624 filter.enabled = true;
1625 } else {
1626 element.runtimeStyle.filter = format(PNG_FILTER, src || element.src, sizingMethod || "scale");
1627 filtered.push(element);
1628 }
1629 // remove the real image
1630 element.src = BLANK_GIF;
1631};
1632
1633function removeFilter(element) {
1634 element.src = element.pngSrc;
1635 element.filters[ALPHA_IMAGE_LOADER].enabled = false;
1636};
1637
1638// =========================================================================
1639// ie7-fixed.js
1640// =========================================================================
1641
1642(function() {
1643 if (appVersion >= 7) return;
1644
1645 // some things to consider for this hack.
1646 // the document body requires a fixed background. even if
1647 // it is just a blank image.
1648 // you have to use setExpression instead of onscroll, this
1649 // together with a fixed body background helps avoid the
1650 // annoying screen flicker of other solutions.
1651
1652 IE7.CSS.addRecalc("position", "fixed", _positionFixed, "absolute");
1653 IE7.CSS.addRecalc("background(-attachment)?", "[^};]*fixed", _backgroundFixed);
1654
1655 // scrolling is relative to the documentElement (HTML tag) when in
1656 // standards mode, otherwise it's relative to the document body
1657 var $viewport = MSIE5 ? "body" : "documentElement";
1658
1659 function _fixBackground() {
1660 // this is required by both position:fixed and background-attachment:fixed.
1661 // it is necessary for the document to also have a fixed background image.
1662 // we can fake this with a blank image if necessary
1663 if (body.currentStyle.backgroundAttachment !== "fixed") {
1664 if (body.currentStyle.backgroundImage === "none") {
1665 body.runtimeStyle.backgroundRepeat = "no-repeat";
1666 body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // dummy
1667 }
1668 body.runtimeStyle.backgroundAttachment = "fixed";
1669 }
1670 _fixBackground = Undefined;
1671 };
1672
1673 var _tmp = createTempElement("img");
1674
1675 function _isFixed(element) {
1676 return element ? isFixed(element) || _isFixed(element.parentElement) : false;
1677 };
1678
1679 function _setExpression(element, propertyName, expression) {
1680 setTimeout("document.all." + element.uniqueID + ".runtimeStyle.setExpression('" + propertyName + "','" + expression + "')", 0);
1681 };
1682
1683 // -----------------------------------------------------------------------
1684 // backgroundAttachment: fixed
1685 // -----------------------------------------------------------------------
1686
1687 function _backgroundFixed(element) {
1688 if (register(_backgroundFixed, element, element.currentStyle.backgroundAttachment === "fixed" && !element.contains(body))) {
1689 _fixBackground();
1690 util.bgLeft(element);
1691 util.bgTop(element);
1692 _backgroundPosition(element);
1693 }
1694 };
1695
1696 function _backgroundPosition(element) {
1697 _tmp.src = element.currentStyle.backgroundImage.slice(5, -2);
1698 var parentElement = element.canHaveChildren ? element : element.parentElement;
1699 parentElement.appendChild(_tmp);
1700 util.setOffsetLeft(element);
1701 util.setOffsetTop(element);
1702 parentElement.removeChild(_tmp);
1703 };
1704
1705 // -----------------------------------------------------------------------
1706 // position: fixed
1707 // -----------------------------------------------------------------------
1708
1709 function _positionFixed(element) {
1710 if (register(_positionFixed, element, isFixed(element))) {
1711 setOverrideStyle(element, "position", "absolute");
1712 setOverrideStyle(element, "left", element.currentStyle.left);
1713 setOverrideStyle(element, "top", element.currentStyle.top);
1714 _fixBackground();
1715 IE7.Layout.fixRight(element);
1716 //IE7.Layout.fixBottom(element);
1717 _foregroundPosition(element);
1718 }
1719 };
1720
1721 function _foregroundPosition(element, recalc) {
1722 document.body.getBoundingClientRect(); // force a reflow
1723 util.positionTop(element, recalc);
1724 util.positionLeft(element, recalc, true);
1725 if (!element.runtimeStyle.autoLeft && element.currentStyle.marginLeft === "auto" &&
1726 element.currentStyle.right !== "auto") {
1727 var left = viewport.clientWidth - util.getPixelWidth(element, element.currentStyle.right) -
1728 util.getPixelWidth(element, element.runtimeStyle._left) - element.clientWidth;
1729 if (element.currentStyle.marginRight === "auto") left = parseInt(left / 2);
1730 if (_isFixed(element.offsetParent)) element.runtimeStyle.pixelLeft += left;
1731 else element.runtimeStyle.shiftLeft = left;
1732 }
1733 if (!element.runtimeStyle.fixedWidth) util.clipWidth(element);
1734 if (!element.runtimeStyle.fixedHeight) util.clipHeight(element);
1735 };
1736
1737 // -----------------------------------------------------------------------
1738 // capture window resize
1739 // -----------------------------------------------------------------------
1740
1741 function _resize() {
1742 // if the window has been resized then some positions need to be
1743 // recalculated (especially those aligned to "right" or "top"
1744 var elements = _backgroundFixed.elements;
1745 for (var i in elements) _backgroundPosition(elements[i]);
1746 elements = _positionFixed.elements;
1747 for (i in elements) {
1748 _foregroundPosition(elements[i], true);
1749 _foregroundPosition(elements[i], true);
1750 }
1751 _timer = 0;
1752 };
1753
1754 // use a timer (sometimes this is a good way to prevent resize loops)
1755 var _timer;
1756 addResize(function() {
1757 if (!_timer) _timer = setTimeout(_resize, 100);
1758 });
1759
1760 // -----------------------------------------------------------------------
1761 // rotated
1762 // -----------------------------------------------------------------------
1763
1764 var util = {};
1765
1766 var _horizontal = function(util) {
1767 util.bgLeft = function(element) {
1768 element.style.backgroundPositionX = element.currentStyle.backgroundPositionX;
1769 if (!_isFixed(element)) {
1770 _setExpression(element, "backgroundPositionX", "(parseInt(runtimeStyle.offsetLeft)+document." + $viewport + ".scrollLeft)||0");
1771 }
1772 };
1773
1774 util.setOffsetLeft = function(element) {
1775 var propertyName = _isFixed(element) ? "backgroundPositionX" : "offsetLeft";
1776 element.runtimeStyle[propertyName] =
1777 util.getOffsetLeft(element, element.style.backgroundPositionX) -
1778 element.getBoundingClientRect().left - element.clientLeft + 2;
1779 };
1780
1781 util.getOffsetLeft = function(element, position) {
1782 switch (position) {
1783 case "left":
1784 case "top":
1785 return 0;
1786 case "right":
1787 case "bottom":
1788 return viewport.clientWidth - _tmp.offsetWidth;
1789 case "center":
1790 return (viewport.clientWidth - _tmp.offsetWidth) / 2;
1791 default:
1792 if (PERCENT.test(position)) {
1793 return parseInt((viewport.clientWidth - _tmp.offsetWidth) * parseFloat(position) / 100);
1794 }
1795 _tmp.style.left = position;
1796 return _tmp.offsetLeft;
1797 }
1798 };
1799
1800 util.clipWidth = function(element) {
1801 var fixWidth = element.runtimeStyle.fixWidth;
1802 element.runtimeStyle.borderRightWidth = "";
1803 element.runtimeStyle.width = fixWidth ? util.getPixelWidth(element, fixWidth) + "px" : "";
1804 if (element.currentStyle.width !== "auto") {
1805 var rect = element.getBoundingClientRect();
1806 var width = element.offsetWidth - viewport.clientWidth + rect.left - 2;
1807 if (width >= 0) {
1808 element.runtimeStyle.borderRightWidth = "0px";
1809 width = Math.max(getPixelValue(element, element.currentStyle.width) - width, 0);
1810 setOverrideStyle(element, "width", width);
1811 return width;
1812 }
1813 }
1814 };
1815
1816 util.positionLeft = function(element, recalc) {
1817 // if the element's width is in % units then it must be recalculated
1818 // with respect to the viewport
1819 if (!recalc && PERCENT.test(element.currentStyle.width)) {
1820 element.runtimeStyle.fixWidth = element.currentStyle.width;
1821 }
1822 if (element.runtimeStyle.fixWidth) {
1823 element.runtimeStyle.width = util.getPixelWidth(element, element.runtimeStyle.fixWidth);
1824 }
1825 //if (recalc) {
1826 // // if the element is fixed on the right then no need to recalculate
1827 // if (!element.runtimeStyle.autoLeft) return;
1828 //} else {
1829 element.runtimeStyle.shiftLeft = 0;
1830 element.runtimeStyle._left = element.currentStyle.left;
1831 // is the element fixed on the right?
1832 element.runtimeStyle.autoLeft = element.currentStyle.right !== "auto" && element.currentStyle.left === "auto";
1833 //}
1834 // reset the element's "left" value and get it's natural position
1835 element.runtimeStyle.left = "";
1836 element.runtimeStyle.screenLeft = util.getScreenLeft(element);
1837 element.runtimeStyle.pixelLeft = element.runtimeStyle.screenLeft;
1838 // if the element is contained by another fixed element then there is no need to
1839 // continually recalculate it's left position
1840 if (!recalc && !_isFixed(element.offsetParent)) {
1841 // onsrcoll produces jerky movement, so we use an expression
1842 _setExpression(element, "pixelLeft", "runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document." + $viewport + ".scrollLeft");
1843 }
1844 };
1845
1846 // I've forgotten how this works...
1847 util.getScreenLeft = function(element) { // thanks to kevin newman (captainn)
1848 var screenLeft = element.offsetLeft, nested = 1;
1849 if (element.runtimeStyle.autoLeft) {
1850 screenLeft = viewport.clientWidth - element.offsetWidth - util.getPixelWidth(element, element.currentStyle.right);
1851 }
1852 // accommodate margins
1853 if (element.currentStyle.marginLeft !== "auto") {
1854 screenLeft -= util.getPixelWidth(element, element.currentStyle.marginLeft);
1855 }
1856 while (element = element.offsetParent) {
1857 if (element.currentStyle.position !== "static") nested = -1;
1858 screenLeft += element.offsetLeft * nested;
1859 }
1860 return screenLeft;
1861 };
1862
1863 util.getPixelWidth = function(element, value) {
1864 return PERCENT.test(value) ? parseInt(parseFloat(value) / 100 * viewport.clientWidth) : getPixelValue(element, value);
1865 };
1866 };
1867 eval("var _vertical=" + rotate(_horizontal));
1868 _horizontal(util);
1869 _vertical(util);
1870})();
1871
1872// =========================================================================
1873// ie7-oveflow.js
1874// =========================================================================
1875
1876/* ---------------------------------------------------------------------
1877
1878 This module alters the structure of the document.
1879 It may adversely affect other CSS rules. Be warned.
1880
1881--------------------------------------------------------------------- */
1882
1883if (appVersion < 7) {
1884 var WRAPPER_STYLE = {
1885 backgroundColor: "transparent",
1886 backgroundImage: "none",
1887 backgroundPositionX: null,
1888 backgroundPositionY: null,
1889 backgroundRepeat: null,
1890 borderTopWidth: 0,
1891 borderRightWidth: 0,
1892 borderBottomWidth: 0,
1893 borderLeftStyle: "none",
1894 borderTopStyle: "none",
1895 borderRightStyle: "none",
1896 borderBottomStyle: "none",
1897 borderLeftWidth: 0,
1898 borderLeftColor: "#000",
1899 borderTopColor: "#000",
1900 borderRightColor: "#000",
1901 borderBottomColor: "#000",
1902 height: null,
1903 marginTop: 0,
1904 marginBottom: 0,
1905 marginRight: 0,
1906 marginLeft: 0,
1907 width: "100%"
1908 };
1909
1910 IE7.CSS.addRecalc("overflow", "visible", function(element) {
1911 if (element.currentStyle.position === "absolute") return;
1912
1913 // don't do this again
1914 if (element.parentNode.ie7_wrapped) return;
1915
1916 // if max-height is applied, makes sure it gets applied first
1917 if (IE7.Layout && element.currentStyle["max-height"] !== "auto") {
1918 IE7.Layout.maxHeight(element);
1919 }
1920
1921 if (element.currentStyle.marginLeft === "auto") element.style.marginLeft = 0;
1922 if (element.currentStyle.marginRight === "auto") element.style.marginRight = 0;
1923
1924 var wrapper = document.createElement(ANON);
1925 wrapper.ie7_wrapped = element;
1926 for (var propertyName in WRAPPER_STYLE) {
1927 wrapper.style[propertyName] = element.currentStyle[propertyName];
1928 if (WRAPPER_STYLE[propertyName] != null) {
1929 element.runtimeStyle[propertyName] = WRAPPER_STYLE[propertyName];
1930 }
1931 }
1932 wrapper.style.display = "block";
1933 wrapper.style.position = "relative";
1934 element.runtimeStyle.position = "absolute";
1935 element.parentNode.insertBefore(wrapper, element);
1936 wrapper.appendChild(element);
1937 });
1938}
1939
1940// =========================================================================
1941// ie7-quirks.js
1942// =========================================================================
1943
1944function ie7Quirks() {
1945 var FONT_SIZES = "xx-small,x-small,small,medium,large,x-large,xx-large".split(",");
1946 for (var i = 0; i < FONT_SIZES.length; i++) {
1947 FONT_SIZES[FONT_SIZES[i]] = FONT_SIZES[i - 1] || "0.67em";
1948 }
1949
1950 IE7.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/, function(match, label, size, value) {
1951 return label + (FONT_SIZES[value] || value);
1952 });
1953
1954 var NEGATIVE = /^\-/, LENGTH = /(em|ex)$/i;
1955 var EM = /em$/i, EX = /ex$/i;
1956
1957 getPixelValue = function(element, value) {
1958 if (PIXEL.test(value)) return parseInt(value)||0;
1959 var scale = NEGATIVE.test(value)? -1 : 1;
1960 if (LENGTH.test(value)) scale *= getFontScale(element);
1961 temp.style.width = scale < 0 ? value.slice(1) : value;
1962 body.appendChild(temp);
1963 // retrieve pixel width
1964 value = scale * temp.offsetWidth;
1965 // remove the temporary element
1966 temp.removeNode();
1967 return parseInt(value);
1968 };
1969
1970 var temp = createTempElement();
1971 function getFontScale(element) {
1972 var scale = 1;
1973 temp.style.fontFamily = element.currentStyle.fontFamily;
1974 temp.style.lineHeight = element.currentStyle.lineHeight;
1975 //temp.style.fontSize = "";
1976 while (element != body) {
1977 var fontSize = element.currentStyle["ie7-font-size"];
1978 if (fontSize) {
1979 if (EM.test(fontSize)) scale *= parseFloat(fontSize);
1980 else if (PERCENT.test(fontSize)) scale *= (parseFloat(fontSize) / 100);
1981 else if (EX.test(fontSize)) scale *= (parseFloat(fontSize) / 2);
1982 else {
1983 temp.style.fontSize = fontSize;
1984 return 1;
1985 }
1986 }
1987 element = element.parentElement;
1988 }
1989 return scale;
1990 };
1991
1992 // cursor:pointer (IE5.x)
1993 IE7.CSS.addFix(/cursor\s*:\s*pointer/, "cursor:hand");
1994 // display:list-item (IE5.x)
1995 IE7.CSS.addFix(/display\s*:\s*list-item/, "display:block");
1996
1997 // -----------------------------------------------------------------------
1998 // margin:auto
1999 // -----------------------------------------------------------------------
2000
2001 function fixMargin(element) {
2002 var parent = element.parentElement;
2003 var margin = parent.offsetWidth - element.offsetWidth - getPaddingWidth(parent);
2004 var autoRight = (element.currentStyle["ie7-margin"] && element.currentStyle.marginRight === "auto") ||
2005 element.currentStyle["ie7-margin-right"] === "auto";
2006 switch (parent.currentStyle.textAlign) {
2007 case "right":
2008 margin = autoRight ? parseInt(margin / 2) : 0;
2009 element.runtimeStyle.marginRight = margin + "px";
2010 break;
2011 case "center":
2012 if (autoRight) margin = 0;
2013 default:
2014 if (autoRight) margin /= 2;
2015 element.runtimeStyle.marginLeft = parseInt(margin) + "px";
2016 }
2017 };
2018
2019 function getPaddingWidth(element) {
2020 return getPixelValue(element, element.currentStyle.paddingLeft) +
2021 getPixelValue(element, element.currentStyle.paddingRight);
2022 };
2023
2024 IE7.CSS.addRecalc("margin(-left|-right)?", "[^};]*auto", function(element) {
2025 if (register(fixMargin, element,
2026 element.parentElement &&
2027 element.currentStyle.display === "block" &&
2028 element.currentStyle.marginLeft === "auto" &&
2029 element.currentStyle.position !== "absolute")) {
2030 fixMargin(element);
2031 }
2032 });
2033
2034 addResize(function() {
2035 for (var i in fixMargin.elements) {
2036 var element = fixMargin.elements[i];
2037 element.runtimeStyle.marginLeft =
2038 element.runtimeStyle.marginRight = "";
2039 fixMargin(element);
2040 }
2041 });
2042};
2043
2044
2045// =========================================================================
2046// ie8-css.js
2047// =========================================================================
2048
2049var BRACKETS = "\\([^)]+\\)";
2050
2051// pseudo-elements can be declared with a double colon
2052encoder.add(/::(before|after)/, ":$1");
2053
2054if (appVersion < 8) {
2055
2056 if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|";
2057 IE7.CSS.pseudoClasses += "before|after|lang" + BRACKETS;
2058
2059 // -----------------------------------------------------------------------
2060 // propertyName: inherit;
2061 // -----------------------------------------------------------------------
2062
2063 function parseInherited(cssText) {
2064 return cssText.replace(new RegExp("([{;\\s])(" + inheritedProperties.join("|") + ")\\s*:\\s*([^;}]+)", "g"), "$1$2:$3;ie7-$2:$3");
2065 };
2066
2067 var INHERITED = /[\w-]+\s*:\s*inherit/g;
2068 var STRIP_IE7_FLAGS = /ie7\-|\s*:\s*inherit/g;
2069 var DASH_LOWER = /\-([a-z])/g;
2070 function toUpper(match, chr) {return chr.toUpperCase()};
2071
2072 IE7.CSS.addRecalc("[\\w-]+", "inherit", function(element, cssText) {
2073 if (element.parentElement) {
2074 var inherited = cssText.match(INHERITED);
2075 for (var i = 0; i < inherited.length; i++) {
2076 var propertyName = inherited[i].replace(STRIP_IE7_FLAGS, "");
2077 if (element.currentStyle["ie7-" + propertyName] === "inherit") {
2078 propertyName = propertyName.replace(DASH_LOWER, toUpper);
2079 element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName];
2080 }
2081 }
2082 }
2083 }, function(match) {
2084 inheritedProperties.push(rescape(match.slice(1).split(":")[0]));
2085 return match;
2086 });
2087
2088 // -----------------------------------------------------------------------
2089 // dynamic pseudo-classes
2090 // -----------------------------------------------------------------------
2091
2092 var Focus = new DynamicPseudoClass("focus", function(element) {
2093 var instance = arguments;
2094
2095 IE7.CSS.addEventHandler(element, "onfocus", function() {
2096 Focus.unregister(instance); // in case it starts with focus
2097 Focus.register(instance);
2098 });
2099
2100 IE7.CSS.addEventHandler(element, "onblur", function() {
2101 Focus.unregister(instance);
2102 });
2103
2104 // check the active element for initial state
2105 if (element == document.activeElement) {
2106 Focus.register(instance)
2107 }
2108 });
2109
2110 var Active = new DynamicPseudoClass("active", function(element) {
2111 var instance = arguments;
2112 IE7.CSS.addEventHandler(element, "onmousedown", function() {
2113 Active.register(instance);
2114 });
2115 });
2116
2117 // globally trap the mouseup event (thanks Martijn!)
2118 addEventHandler(document, "onmouseup", function() {
2119 var instances = Active.instances;
2120 for (var i in instances) Active.unregister(instances[i]);
2121 });
2122
2123 // -----------------------------------------------------------------------
2124 // IE7 pseudo elements
2125 // -----------------------------------------------------------------------
2126
2127 // constants
2128 var URL = /^url\s*\(\s*([^)]*)\)$/;
2129 var POSITION_MAP = {
2130 before0: "beforeBegin",
2131 before1: "afterBegin",
2132 after0: "afterEnd",
2133 after1: "beforeEnd"
2134 };
2135
2136 var PseudoElement = IE7.PseudoElement = Rule.extend({
2137 constructor: function(selector, position, cssText) {
2138 // initialise object properties
2139 this.position = position;
2140 var content = cssText.match(PseudoElement.CONTENT), match, entity;
2141 if (content) {
2142 content = content[1];
2143 match = content.split(/\s+/);
2144 for (var i = 0; (entity = match[i]); i++) {
2145 match[i] = /^attr/.test(entity) ? {attr: entity.slice(5, -1)} :
2146 entity.charAt(0) === "'" ? getString(entity) : decode(entity);
2147 }
2148 content = match;
2149 }
2150 this.content = content;
2151 // CSS text needs to be decoded immediately
2152 this.base(selector, decode(cssText));
2153 },
2154
2155 init: function() {
2156 // execute the underlying css query for this class
2157 this.match = cssQuery(this.selector);
2158 for (var i = 0; i < this.match.length; i++) {
2159 var runtimeStyle = this.match[i].runtimeStyle;
2160 if (!runtimeStyle[this.position]) runtimeStyle[this.position] = {cssText:""};
2161 runtimeStyle[this.position].cssText += ";" + this.cssText;
2162 if (this.content != null) runtimeStyle[this.position].content = this.content;
2163 }
2164 },
2165
2166 create: function(target) {
2167 var generated = target.runtimeStyle[this.position];
2168 if (generated) {
2169 // copy the array of values
2170 var content = [].concat(generated.content || "");
2171 for (var j = 0; j < content.length; j++) {
2172 if (typeof content[j] == "object") {
2173 content[j] = target.getAttribute(content[j].attr);
2174 }
2175 }
2176 content = content.join("");
2177 var url = content.match(URL);
2178 var cssText = "overflow:hidden;" + generated.cssText.replace(/'/g, '"');
2179 var position = POSITION_MAP[this.position + Number(target.canHaveChildren)];
2180 var id = 'ie7_pseudo' + PseudoElement.count++;
2181 target.insertAdjacentHTML(position, format(PseudoElement.ANON, this.className, id, cssText, url ? "" : content));
2182 if (url) {
2183 var src = getString(url[1]);
2184 var pseudoElement = document.getElementById(id);
2185 pseudoElement.src = src;
2186 addFilter(pseudoElement, "crop");
2187 var targetIsFloated = target.currentStyle.styleFloat !== "none";
2188 if (pseudoElement.currentStyle.display === "inline" || targetIsFloated) {
2189 if (appVersion < 7 && targetIsFloated && target.canHaveChildren) {
2190 target.runtimeStyle.display = "inline";
2191 target.runtimeStyle.position = "relative";
2192 pseudoElement.runtimeStyle.position = "absolute";
2193 }
2194 pseudoElement.style.display = "inline-block";
2195 if (target.currentStyle.styleFloat !== "none") {
2196 pseudoElement.style.pixelWidth = target.offsetWidth;
2197 }
2198 var image = new Image;
2199 image.onload = function() {
2200 pseudoElement.style.pixelWidth = this.width;
2201 pseudoElement.style.pixelHeight = Math.max(this.height, pseudoElement.offsetHeight);
2202 };
2203 image.src = src;
2204 }
2205 }
2206 target.runtimeStyle[this.position] = null;
2207 }
2208 },
2209
2210 recalc: function() {
2211 if (this.content == null) return;
2212 for (var i = 0; i < this.match.length; i++) {
2213 this.create(this.match[i]);
2214 }
2215 },
2216
2217 toString: function() {
2218 return "." + this.className + "{display:inline}";
2219 }
2220 }, {
2221 CONTENT: /content\s*:\s*([^;]*)(;|$)/,
2222 ANON: "<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>",
2223 MATCH: /(.*):(before|after).*/,
2224
2225 count: 0
2226 });
2227
2228 IE7._getLang = function(element) {
2229 var lang = "";
2230 while (element && element.nodeType === 1) {
2231 lang = element.lang || element.getAttribute("lang") || "";
2232 if (lang) break;
2233 element = element.parentNode;
2234 }
2235 return lang;
2236 };
2237
2238 FILTER = extend(FILTER, {
2239 ":lang\\(([^)]+)\\)": "((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&"
2240 });
2241}
2242
2243// =========================================================================
2244// ie8-html.js
2245// =========================================================================
2246
2247var UNSUCCESSFUL = /^(submit|reset|button)$/;
2248
2249// -----------------------------------------------------------------------
2250// <button>
2251// -----------------------------------------------------------------------
2252
2253// IE bug means that innerText is submitted instead of "value"
2254IE7.HTML.addRecalc("button,input", function(button) {
2255 if (button.nodeName === "BUTTON") {
2256 var match = button.outerHTML.match(/ value="([^"]*)"/i);
2257 button.runtimeStyle.value = match ? match[1] : "";
2258 }
2259 // flag the button/input that was used to submit the form
2260 if (button.type === "submit") {
2261 addEventHandler(button, "onclick", function() {
2262 button.runtimeStyle.clicked = true;
2263 setTimeout("document.all." + button.uniqueID + ".runtimeStyle.clicked=false", 1);
2264 });
2265 }
2266});
2267
2268// -----------------------------------------------------------------------
2269// <form>
2270// -----------------------------------------------------------------------
2271
2272// only submit "successful controls
2273IE7.HTML.addRecalc("form", function(form) {
2274 addEventHandler(form, "onsubmit", function() {
2275 for (var element, i = 0; element = form[i]; i++) {
2276 if (UNSUCCESSFUL.test(element.type) && !element.disabled && !element.runtimeStyle.clicked) {
2277 element.disabled = true;
2278 setTimeout("document.all." + element.uniqueID + ".disabled=false", 1);
2279 } else if (element.nodeName === "BUTTON" && element.type === "submit") {
2280 setTimeout("document.all." + element.uniqueID + ".value='" + element.value + "'", 1);
2281 element.value = element.runtimeStyle.value;
2282 }
2283 }
2284 });
2285});
2286
2287// -----------------------------------------------------------------------
2288// <img>
2289// -----------------------------------------------------------------------
2290
2291// get rid of the spurious tooltip produced by the alt attribute on images
2292IE7.HTML.addRecalc("img", function(img) {
2293 if (img.alt && !img.title) img.title = "";
2294});
2295
2296// =========================================================================
2297// ie8-layout.js
2298// =========================================================================
2299
2300if (appVersion < 8) {
2301 IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) {
2302 if (element.currentStyle.borderCollapse !== "collapse") {
2303 element.cellSpacing = getPixelValue(element, element.currentStyle["ie7-border-spacing"].split(" ")[0]);
2304 }
2305 });
2306 IE7.CSS.addRecalc("box-sizing", "content-box", IE7.Layout.boxSizing);
2307 IE7.CSS.addRecalc("box-sizing", "border-box", IE7.Layout.borderBox);
2308}
2309
2310// =========================================================================
2311// ie8-graphics.js
2312// =========================================================================
2313
2314if (appVersion < 8) {
2315 // fix object[type=image/*]
2316 var IMAGE = /^image/i;
2317 IE7.HTML.addRecalc("object", function(element) {
2318 if (IMAGE.test(element.type)) {
2319 element.body.style.cssText = "margin:0;padding:0;border:none;overflow:hidden";
2320 return element;
2321 }
2322 });
2323}
2324
2325// =========================================================================
2326// ie9-css.js
2327// =========================================================================
2328
2329var NOT_NEXT_BY_TYPE = "!IE7._getElementSiblingByType(e,'next')&&",
2330 NOT_PREVIOUS_BY_TYPE = NOT_NEXT_BY_TYPE.replace("next", "previous");
2331
2332if (IE7.CSS.pseudoClasses) IE7.CSS.pseudoClasses += "|";
2333IE7.CSS.pseudoClasses += "(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|" +
2334 ("not|nth\\-child|nth\\-last\\-child|nth\\-of\\-type|nth\\-last\\-of\\-type".split("|").join(BRACKETS + "|") + BRACKETS);
2335
2336// :checked
2337var Checked = new DynamicPseudoClass("checked", function(element) {
2338 if (typeof element.checked !== "boolean") return;
2339 var instance = arguments;
2340 IE7.CSS.addEventHandler(element, "onpropertychange", function() {
2341 if (event.propertyName === "checked") {
2342 if (element.checked === true) Checked.register(instance);
2343 else Checked.unregister(instance);
2344 }
2345 });
2346 // check current checked state
2347 if (element.checked === true) Checked.register(instance);
2348});
2349
2350// :enabled
2351var Enabled = new DynamicPseudoClass("enabled", function(element) {
2352 if (typeof element.disabled !== "boolean") return;
2353 var instance = arguments;
2354 IE7.CSS.addEventHandler(element, "onpropertychange", function() {
2355 if (event.propertyName === "disabled") {
2356 if (element.disabled === false) Enabled.register(instance);
2357 else Enabled.unregister(instance);
2358 }
2359 });
2360 // check current disabled state
2361 if (element.disabled === false) Enabled.register(instance);
2362});
2363
2364// :disabled
2365var Disabled = new DynamicPseudoClass("disabled", function(element) {
2366 if (typeof element.disabled !== "boolean") return;
2367 var instance = arguments;
2368 IE7.CSS.addEventHandler(element, "onpropertychange", function() {
2369 if (event.propertyName === "disabled") {
2370 if (element.disabled === true) Disabled.register(instance);
2371 else Disabled.unregister(instance);
2372 }
2373 });
2374 // check current disabled state
2375 if (element.disabled === true) Disabled.register(instance);
2376});
2377
2378// :indeterminate (Kevin Newman)
2379var Indeterminate = new DynamicPseudoClass("indeterminate", function(element) {
2380 if (typeof element.indeterminate !== "boolean") return;
2381 var instance = arguments;
2382 IE7.CSS.addEventHandler(element, "onpropertychange", function() {
2383 if (event.propertyName === "indeterminate") {
2384 if (element.indeterminate === true) Indeterminate.register(instance);
2385 else Indeterminate.unregister(instance);
2386 }
2387 });
2388 IE7.CSS.addEventHandler(element, "onclick", function() {
2389 Indeterminate.unregister(instance);
2390 });
2391 // clever Kev says no need to check this up front
2392});
2393
2394// :target
2395var Target = new DynamicPseudoClass("target", function(element) {
2396 var instance = arguments;
2397 // if an element has a tabIndex then it can become "active".
2398 // The default is zero anyway but it works...
2399 if (!element.tabIndex) element.tabIndex = 0;
2400 // this doesn't detect the back button. I don't know how to do that without adding an iframe :-(
2401 IE7.CSS.addEventHandler(document, "onpropertychange", function() {
2402 if (event.propertyName === "activeElement") {
2403 if (element.id && element.id === location.hash.slice(1)) Target.register(instance);
2404 else Target.unregister(instance);
2405 }
2406 });
2407 // check the current location
2408 if (element.id && element.id === location.hash.slice(1)) Target.register(instance);
2409});
2410
2411// Register a node and index its siblings.
2412var _currentIndex = 1, // -@DRE
2413 allIndexes = {_currentIndex: 1};
2414
2415IE7._indexOf = function(element, last, ofType) {
2416 var parent = element.parentNode;
2417 if (!parent || parent.nodeType !== 1) return NaN;
2418
2419 var tagName = ofType ? element.nodeName : "";
2420 if (tagName === "TR" && element.sectionRowIndex >= 0) {
2421 var index = element.sectionRowIndex;
2422 return last ? element.parentNode.rows.length - index + 1 : index;
2423 }
2424 if ((tagName === "TD" || tagName === "TH") && element.cellIndex >= 0) {
2425 index = element.cellIndex;
2426 return last ? element.parentNode.cells.length - index + 1 : index;
2427 }
2428 if (allIndexes._currentIndex !== _currentIndex) {
2429 allIndexes = {_currentIndex: _currentIndex};
2430 }
2431 var id = (parent.uniqueID) + "-" + tagName,
2432 indexes = allIndexes[id];
2433 if (!indexes) {
2434 indexes = {};
2435 var index = 0,
2436 child = parent.firstChild;
2437 while (child) {
2438 if (ofType ? child.nodeName === tagName : child.nodeName > "@") {
2439 indexes[child.uniqueID] = ++index;
2440 }
2441 child = child.nextSibling;
2442 }
2443 indexes.length = index;
2444 allIndexes[id] = indexes;
2445 }
2446 index = indexes[element.uniqueID];
2447 return last ? indexes.length - index + 1 : index;
2448};
2449
2450IE7._isEmpty = function(node) {
2451 node = node.firstChild;
2452 while (node) {
2453 if (node.nodeType === 3 || node.nodeName > "@") return false;
2454 node = node.nextSibling;
2455 }
2456 return true;
2457};
2458
2459IE7._getElementSiblingByType = function(node, direction) {
2460 var tagName = node.nodeName;
2461 direction += "Sibling";
2462 do {
2463 node = node[direction];
2464 if (node && node.nodeName === tagName) break;
2465 } while (node);
2466 return node;
2467};
2468
2469var ONE = {"+": 1, "-": -1}, SPACES = / /g;
2470
2471FILTER = extend(extend({
2472 ":nth(-last)?-(?:child|(of-type))\\((<#nth_arg>)\\)(<#filter>)?": function(match, last, ofType, args, filters) { // :nth- pseudo classes
2473 args = args.replace(SPACES, "");
2474
2475 var index = "IE7._indexOf(e," + !!last + "," + !!ofType + ")";
2476
2477 if (args === "even") args = "2n";
2478 else if (args === "odd") args = "2n+1";
2479 else if (!isNaN(args)) args = "0n" + ~~args;
2480
2481 args = args.split("n");
2482 var a = ~~(ONE[args[0]] || args[0] || 1),
2483 b = ~~args[1];
2484 if (a === 0) {
2485 var expr = index + "===" + b;
2486 } else {
2487 expr = "((ii=" + index + ")-(" + b + "))%" + a + "===0&&ii" + (a < 0 ? "<" : ">") + "=" + b;
2488 }
2489 return this.parse(filters) + expr + "&&";
2490 },
2491
2492 "<#negation>": function(match, simple) {
2493 if (/:not/i.test(simple)) throwSelectorError();
2494
2495 if (/^[#.:\[]/.test(simple)) {
2496 simple = "*" + simple;
2497 }
2498 return "!(" + MATCHER.parse(simple).slice(3, -2) + ")&&";
2499 }
2500}, FILTER), {
2501 ":checked": "e.checked===true&&",
2502 ":disabled": "e.disabled===true&&",
2503 ":enabled": "e.disabled===false&&",
2504 ":last-child": "!" + NEXT_SIBLING + "&&",
2505 ":only-child": "!" + PREVIOUS_SIBLING + "&&!" + NEXT_SIBLING + "&&",
2506 ":first-of-type": NOT_PREVIOUS_BY_TYPE,
2507 ":last-of-type": NOT_NEXT_BY_TYPE,
2508 ":only-of-type": NOT_PREVIOUS_BY_TYPE + NOT_NEXT_BY_TYPE,
2509
2510 ":empty": "IE7._isEmpty(e)&&",
2511 ":root": "e==R&&",
2512 ":target": "H&&" + ID_ATTRIBUTE + "===H&&"
2513});
2514
2515var HTML5 = "article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(",");
2516for (var i = 0, tagName; tagName = HTML5[i]; i++) document.createElement(tagName);
2517
2518HEADER += "datalist{display:none}\
2519details{padding-left:40px;display:block;margin:1em 0}\
2520meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}\
2521progress{width:10em;}\
2522article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}\
2523figure{margin:1em 40px;display:block}\
2524mark{background:yellow}";
2525
2526// =========================================================================
2527// ie9-layout.js
2528// =========================================================================
2529
2530// =========================================================================
2531// ie9-graphics.js
2532// =========================================================================
2533
2534IE7.CSS.addFix(/\bopacity\s*:\s*([\d.]+)/, function(match, value) {
2535 return "zoom:1;filter:Alpha(opacity=" + ((value * 100) || 1) + ")";
2536});
2537
2538var MATCHER;
2539
2540var cssQuery = (function() {
2541 var CONTEXT = /^[>+~]/;
2542
2543 var useContext = false;
2544
2545 // This is not a selector engine in the strictest sense. So it's best to silently error.
2546 function cssQuery(selector, context, single) {
2547 selector = trim(selector);
2548 if (!context) context = document;
2549 var ref = context;
2550 useContext = CONTEXT.test(selector);
2551 if (useContext) {
2552 context = context.parentNode;
2553 selector = "*" + selector;
2554 }
2555 try {
2556 return selectQuery.create(selector, useContext)(context, single ? null : [], ref);
2557 } catch (ex) {
2558 return single ? null : [];
2559 }
2560 };
2561
2562 var VALID_SELECTOR = /^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/;
2563
2564 var _EVALUATED = /^(href|src)$/;
2565 var _ATTRIBUTES = {
2566 "class": "className",
2567 "for": "htmlFor"
2568 };
2569
2570 var IE7_CLASS_NAMES = /\sie7_\w+/g;
2571
2572 var USE_IFLAG = /^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;
2573
2574 IE7._getAttribute = function(element, name) {
2575 if (element.getAttributeNode) {
2576 var attribute = element.getAttributeNode(name);
2577 }
2578 name = _ATTRIBUTES[name.toLowerCase()] || name;
2579 if (!attribute) attribute = element.attributes[name];
2580 var specified = attribute && attribute.specified;
2581
2582 if (element[name] && typeof element[name] == "boolean") return name.toLowerCase();
2583 if ((specified && USE_IFLAG.test(name)) || (!attribute && MSIE5) || name === "value" || name === "type") {
2584 return element.getAttribute(name, 2);
2585 }
2586 if (name === "style") return element.style.cssText.toLowerCase() || null;
2587
2588 return specified ? String(attribute.nodeValue) : null;
2589 };
2590
2591 var names = "colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";
2592 // Convert the list of strings to a hash, mapping the lowercase name to the camelCase name.
2593 extend(_ATTRIBUTES, combine(names.toLowerCase().split(","), names.split(",")));
2594
2595 IE7._getElementSibling = function(node, direction) {
2596 direction += "Sibling";
2597 do {
2598 node = node[direction];
2599 if (node && node.nodeName > "@") break;
2600 } while (node);
2601 return node;
2602 };
2603
2604 var IMPLIED_ASTERISK = /(^|[, >+~])([#.:\[])/g,
2605 BLOCKS = /\)\{/g,
2606 COMMA = /,/,
2607 QUOTED = /^['"]/,
2608 HEX_ESCAPE = /\\([\da-f]{2,2})/gi,
2609 LAST_CHILD = /last/i;
2610
2611 IE7._byId = function(document, id) {
2612 var result = document.all[id] || null;
2613 // Returns a single element or a collection.
2614 if (!result || (result.nodeType && IE7._getAttribute(result, "id") === id)) return result;
2615 // document.all has returned a collection of elements with name/id
2616 for (var i = 0; i < result.length; i++) {
2617 if (IE7._getAttribute(result[i], "id") === id) return result[i];
2618 }
2619 return null;
2620 };
2621
2622 // =========================================================================
2623 // dom/selectors-api/CSSSelectorParser.js
2624 // =========================================================================
2625
2626 // http://www.w3.org/TR/css3-selectors/#w3cselgrammar (kinda)
2627 var CSSSelectorParser = RegGrp.extend({
2628 dictionary: new Dictionary({
2629 ident: /\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/,
2630 combinator: /[\s>+~]/,
2631 operator: /[\^~|$*]?=/,
2632 nth_arg: /[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,
2633 tag: /\*|<#ident>/,
2634 id: /#(<#ident>)/,
2635 'class': /\.(<#ident>)/,
2636 pseudo: /\:([\w-]+)(?:\(([^)]+)\))?/,
2637 attr: /\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,
2638 negation: /:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,
2639 sequence: /(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,
2640 filter: /[#.:\[]<#sequence>/,
2641 selector: /[^>+~](\\.|[^,])*?/,
2642 grammar: /^(<#selector>)((,<#selector>)*)$/
2643 }),
2644
2645 ignoreCase: true
2646 });
2647
2648 var normalizer = new CSSSelectorParser({
2649 "\\\\.|[~*]\\s+=|\\+\\s+\\d": RegGrp.IGNORE,
2650 "\\[\\s+": "[",
2651 "\\(\\s+": "(",
2652 "\\s+\\)": ")",
2653 "\\s+\\]": "]",
2654 "\\s*([,>+~]|<#operator>)\\s*": "$1",
2655 "\\s+$": "",
2656 "\\s+": " "
2657 });
2658
2659 function normalize(selector) {
2660 selector = normalizer.parse(selector.replace(HEX_ESCAPE, "\\x$1"))
2661 .replace(UNESCAPE, "$1")
2662 .replace(IMPLIED_ASTERISK, "$1*$2");
2663 if (!VALID_SELECTOR.test(selector)) throwSelectorError();
2664 return selector;
2665 };
2666
2667 function unescape(query) {
2668 // put string values back
2669 return query.replace(ESCAPED, unescapeString);
2670 };
2671
2672 function unescapeString(match, index) {
2673 return strings[index];
2674 };
2675
2676 var BRACES = /\{/g, BRACES_ESCAPED = /\\{/g;
2677
2678 function closeBlock(group) {
2679 return Array((group.replace(BRACES_ESCAPED, "").match(BRACES) || "").length + 1).join("}");
2680 };
2681
2682 FILTER = new CSSSelectorParser(FILTER);
2683
2684 var TARGET = /:target/i, ROOT = /:root/i;
2685
2686 function getConstants(selector) {
2687 var constants = "";
2688 if (ROOT.test(selector)) constants += ",R=d.documentElement";
2689 if (TARGET.test(selector)) constants += ",H=d.location;H=H&&H.hash.replace('#','')";
2690 if (constants || selector.indexOf("#") !== -1) {
2691 constants = ",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document" + constants;
2692 }
2693 return "var ii" + constants + ";";
2694 };
2695
2696 var COMBINATOR = {
2697 " ": ";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",
2698 ">": ".parentElement;if(e){",
2699 "+": ";while((e=e.previousSibling)&&!(" + IS_ELEMENT + "))continue;if(e){",
2700 "~": ";while((e=e.previousSibling)){" + IF_ELEMENT
2701 };
2702
2703 var TOKEN = /\be\b/g;
2704
2705 MATCHER = new CSSSelectorParser({
2706 "(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$": function(match, before, combinator, tag, filters) {
2707 var group = "";
2708 if (tag !== "*") {
2709 var TAG = tag.toUpperCase();
2710 group += "if(e.nodeName==='" + TAG + (TAG === tag ? "" : "'||e.nodeName==='" + tag) + "'){";
2711 }
2712 if (filters) {
2713 group += "if(" + FILTER.parse(filters).slice(0, -2) + "){";
2714 }
2715 group = group.replace(TOKEN, "e" + this.index);
2716 if (combinator) {
2717 group += "var e=e" + (this.index++) + COMBINATOR[combinator];
2718 group = group.replace(TOKEN, "e" + this.index);
2719 }
2720 if (before) {
2721 group += this.parse(before);
2722 }
2723 return group;
2724 }
2725 });
2726
2727 var BY_ID = "e0=IE7._byId(d,'%1');if(e0){",
2728 BY_TAG_NAME = "var n=c.getElementsByTagName('%1');",
2729 STORE = "if(r==null)return e0;r[k++]=e0;";
2730
2731 var TAG_NAME = 1;
2732
2733 var SELECTOR = new CSSSelectorParser({
2734 "^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$": true
2735 });
2736
2737 var cache = {};
2738
2739 var selectById = new CSSSelectorParser({
2740 "^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$": function(match, tagName, id, filters, after) {
2741 var block = format(BY_ID, id), endBlock = "}";
2742 if (filters) {
2743 block += MATCHER.parse(tagName + filters);
2744 endBlock = closeBlock(block);
2745 }
2746 if (after) {
2747 block += "s=c=e0;" + selectQuery.parse("*" + after);
2748 } else {
2749 block += STORE;
2750 }
2751 return block + endBlock;
2752 },
2753
2754 "^([^#,]+)#(<#ident>)(<#filter>)?$": function(match, before, id, filters) {
2755 var block = format(BY_ID, id);
2756 if (before === "*") {
2757 block += STORE;
2758 } else {
2759 block += MATCHER.parse(before + filters) + STORE + "break";
2760 }
2761 return block + closeBlock(block);
2762 },
2763
2764 "^.*$": ""
2765 });
2766
2767 var selectQuery = new CSSSelectorParser({
2768 "<#grammar>": function(match, selector, remainingSelectors) {
2769 if (!this.groups) this.groups = [];
2770
2771 var group = SELECTOR.exec(" " + selector);
2772
2773 if (!group) throwSelectorError();
2774
2775 this.groups.push(group.slice(1));
2776
2777 if (remainingSelectors) {
2778 return this.parse(remainingSelectors.replace(COMMA, ""));
2779 }
2780
2781 var groups = this.groups,
2782 tagName = groups[0][TAG_NAME]; // first tag name
2783
2784 for (var i = 1; group = groups[i]; i++) { // search tag names
2785 if (tagName !== group[TAG_NAME]) {
2786 tagName = "*"; // mixed tag names, so use "*"
2787 break;
2788 }
2789 }
2790
2791 var matcher = "", store = STORE + "continue filtering;";
2792
2793 for (var i = 0; group = groups[i]; i++) {
2794 MATCHER.index = 0;
2795 if (tagName !== "*") group[TAG_NAME] = "*"; // we are already filtering by tagName
2796 group = group.join("");
2797 if (group === " *") { // select all
2798 matcher = store;
2799 break;
2800 } else {
2801 group = MATCHER.parse(group);
2802 if (useContext) group += "if(e" + MATCHER.index + "==s){";
2803 matcher += group + store + closeBlock(group);
2804 }
2805 }
2806
2807 // reduce to a single loop
2808 var isWild = tagName === "*";
2809 return (isWild ? "var n=c.all;" : format(BY_TAG_NAME, tagName)) +
2810 "filtering:while((e0=n[i++]))" +
2811 (isWild ? IF_ELEMENT.replace(TOKEN, "e0") : "{") +
2812 matcher +
2813 "}";
2814 },
2815
2816 "^.*$": throwSelectorError
2817 });
2818
2819 var REDUNDANT_NODETYPE_CHECKS = /\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;
2820
2821 selectQuery.create = function(selector) {
2822 if (!cache[selector]) {
2823 selector = normalize(selector);
2824 this.groups = null;
2825 MATCHER.index = 0;
2826 var block = this.parse(selector);
2827 this.groups = null;
2828 MATCHER.index = 0;
2829 if (selector.indexOf("#") !== -1) {
2830 var byId = selectById.parse(selector);
2831 if (byId) {
2832 block =
2833 "if(t===1||t===11|!c.getElementById){" +
2834 block +
2835 "}else{" +
2836 byId +
2837 "}";
2838 }
2839 }
2840 // remove redundant nodeType==1 checks
2841 block = block.replace(REDUNDANT_NODETYPE_CHECKS, "$2");
2842 block = getConstants(selector) + decode(block);
2843 cache[selector] = new Function("return function(c,r,s){var i=0,k=0,e0;" + block + "return r}")();
2844 }
2845 return cache[selector];
2846 };
2847
2848 return cssQuery;
2849})();
2850
2851function throwSelectorError() {
2852 throw new SyntaxError("Invalid selector.");
2853};
2854
2855// -----------------------------------------------------------------------
2856// initialisation
2857// -----------------------------------------------------------------------
2858
2859IE7.loaded = true;
2860
2861(function() {
2862 try {
2863 // http://javascript.nwbox.com/IEContentLoaded/
2864 if (!document.body) throw "continue";
2865 documentElement.doScroll("left");
2866 } catch (ex) {
2867 setTimeout(arguments.callee, 1);
2868 return;
2869 }
2870 // execute the inner text of the IE7 script
2871 try {
2872 eval(script.innerHTML);
2873 } catch (ex) {
2874 // ignore errors
2875 }
2876 if (typeof IE7_PNG_SUFFIX == "object") {
2877 PNG = IE7_PNG_SUFFIX;
2878 } else {
2879 PNG = new RegExp(rescape(window.IE7_PNG_SUFFIX || "-trans.png") + "(\\?.*)?$", "i");
2880 }
2881
2882 // frequently used references
2883 body = document.body;
2884 viewport = MSIE5 ? body : documentElement;
2885
2886 // classes
2887 body.className += " ie7_body";
2888 documentElement.className += " ie7_html";
2889
2890 if (MSIE5) ie7Quirks();
2891
2892 IE7.CSS.init();
2893 IE7.HTML.init();
2894
2895 IE7.HTML.apply();
2896 IE7.CSS.apply();
2897
2898 IE7.recalc();
2899})();
2900
2901})(this, document);
02902
=== added file 'media/js/polyfills/IE9/src/squish.src.js'
--- media/js/polyfills/IE9/src/squish.src.js 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/IE9/src/squish.src.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,35 @@
1/* ---------------------------------------------------------------------
2
3 Squish some IE bugs!
4
5 Some of these bug fixes may have adverse effects so they are
6 not included in the standard library. Add your own if you want.
7
8--------------------------------------------------------------------- */
9
10// NOTE: IE7.Layout.boxSizing is the same as the "Holly Hack"
11
12if (IE7.loaded && IE7.appVersion < 7) {
13
14 // "doubled margin" bug
15 // http://www.positioniseverything.net/explorer/doubled-margin.html
16 IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1");
17
18 // "peekaboo" bug
19 // http://www.positioniseverything.net/explorer/peekaboo.html
20 if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
21 IE7.Layout.boxSizing(element.parentElement);
22 // "doubled margin" bug
23 element.style.display = "inline";
24 });
25
26 // "unscrollable content" bug
27 // http://www.positioniseverything.net/explorer/unscrollable.html
28 IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
29 if (element.offsetParent && element.offsetParent.currentStyle.position === "relative")
30 IE7.Layout.boxSizing(element.offsetParent);
31 });
32}
33
34//# // get rid of Microsoft's pesky image toolbar
35//# document.write('<meta http-equiv="imagetoolbar" content="no">');
0\ No newline at end of file36\ No newline at end of file
137
=== added file 'media/js/polyfills/pie.js'
--- media/js/polyfills/pie.js 1970-01-01 00:00:00 +0000
+++ media/js/polyfills/pie.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,140 @@
1(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=
24,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=
3{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,
4func,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=
5gradientInfo.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=
6startCornerX;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,
7startCornerY: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===
80?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]&&
9o[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)})}})();
10PIE.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,
11"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=
12"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,
13pct100){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,
14function(){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=
15{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
16horiz_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,
17width,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>
18areaRatio?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())},
19degrees: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",
20"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",
21"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",
22"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",
23"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",
24"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",
25"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=
26v;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,
27OPERATOR: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:/^("([^"]*)"|'([^']*)')/,
28operator:/^[\/,]/,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}
29function 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;
30return 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()]||
31Type.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===
32val}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();
33return!!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||
34last.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()},
35hasBeenQueried: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=
36el;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=
37PIE.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,
38lock: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,
39"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=
40{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=
41{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=
42PIE.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&&
43tokType&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=
44token.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());
45if(!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+
46"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,
47clips,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+
48" "+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=
49rs[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);
50if(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]+
51" "+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()||
52this.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]=
53cs["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,
54stylesSame: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=
55"";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();
56if(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=
57PIE.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&&
58token.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()}
59while(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||
60slices.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&
61NUMBER?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,
62Type=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=
63true;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=
64this.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;
65this.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=
66layers[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]=
67PIE.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,
68bounds=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},
69y:{"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=
70r.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)+
71"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")||
72tag==="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";
73s.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()},
74updatePos: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);
75y=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();
76else 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;
77delete 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();
78this.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);
79alpha=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=
80"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,
81border=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+","+
82pxY/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,
83perpendicularIntersect=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?
84Math.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-
851?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=
86vmlColors.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()},
87isActive: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,
88seg.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"+
89i++));}},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,
90r: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?
91radii[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)*
92mult}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)*
93mult: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];
94if(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,
950,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,
960,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",
97"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?
98borderProps.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",
99elW-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]=
100val}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=
101props.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;
102piece.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()}},
103destroy: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()&&
104boxShadowInfo.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;
105function 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);
106yOff=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";
107shape=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*
1082)}}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",
109"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=
110w*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);
111this.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,
112","))!==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(),
113bg,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||
114"")+" "+(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();
115if(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,
116metrics=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-
117i+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)"/>'+
118"</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(),
119repeat=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),
120widthL=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*
121widthL/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">'];
122function 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="'+
123x+'" 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||
124tileSizeR||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,
125"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,
126destroy: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=
127{},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,
1281),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";
129if(!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),
130borderInfo: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),
131boxShadowInfo: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,
132boundsInfo,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,
133"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,
134len=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();
135for(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)}
136function 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,
137type,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);
138renderers=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",
139focused);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();
140delete 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)}}})();
0\ No newline at end of file141\ No newline at end of file
1142
=== added file 'media/js/site.js'
--- media/js/site.js 1970-01-01 00:00:00 +0000
+++ media/js/site.js 2012-03-26 20:23:22 +0000
@@ -0,0 +1,26 @@
1$(document).ready(function() {
2 $("#wireframe .container").mouseenter(function() {
3 var wf = $(this);
4 wf.css({border:"1px dashed #555", padding:"0px 9px"});
5 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>');
6 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>');
7 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>');
8 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>')
9 });
10 $("#wireframe .container").mouseleave(function() {
11 $(".label").remove();
12 $(this).css({border:"0px dashed #555", padding:"0px 10px"})
13 })
14});
15
16(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);
17
18var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
19$(document).keydown(function(a) {
20 kkeys.push(a.keyCode);
21 0 <= kkeys.toString().indexOf(konami) && ($(document).unbind("keydown", arguments.callee), $.fn.invert && $("body").invert())
22});
23
24$(function() {
25 $('.twidenash').twidenash();
26});
027
=== added directory 'templates/old'
=== renamed file 'templates/ubuntu_website_base.html' => 'templates/old/ubuntu_website_base.html'
=== modified file 'templates/website_base.html'
--- templates/website_base.html 2012-03-25 01:08:53 +0000
+++ templates/website_base.html 2012-03-26 20:23:22 +0000
@@ -1,36 +1,29 @@
1<!DOCTYPE HTML>1<!DOCTYPE html>
2<html>2<html lang="en">
3<head>3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />4 {% block defaulthead %}{% block defaultmeta %}<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6 <title>{% block title %}Ubuntu Website{% endblock %}</title>6 <meta name="viewport" content="width=device-width, initial-scale=1" />{% endblock %}
77 {% block extrameta %}{% endblock %}
8 {% block defaulthead %}8 <title>{% block title %}Linaro Website{% endblock %}</title>
9 <link rel="shortcut icon" href="/assets/img/favicon.ico" type="image/x-icon" />9
1010 {% block defaultstyles %}<link rel="shortcut icon" href="{{ubuntu_website_media}}/images/favicon.ico" type="image/x-icon" />
11 <!-- stylesheets -->11 <link rel="stylesheet" type="text/css" media="all" href="//fonts.googleapis.com/css?family=Ubuntu" />
12 <!--[if !IE ]><!-->12 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-reset.css" />
13 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-reset.css" />13 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-grid.css" />
14 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-grid.css" />14 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core.css" />
15 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core.css" />15 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/extra_styles.css" />{% endblock %}
16 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/extra_styles.css" />16 {%block extrastyles %}{% endblock %}
17 <!--<link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/default.css" />17
18 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/django_extras.css" />-->18 {% block defaultheadjs %}<script src="{{ubuntu_website_media}}/js/modernizr.min.js"></script>
19 <!--<![endif]-->19 <script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
2020 <script>window.jQuery || document.write('<script src="{{ubuntu_website_media}}/js/jquery-1.7.2.min.js"><\/script>')</script>
21 <!--[if gte IE 7]>21 <script>var website_assets="{{ubuntu_website_media}}";</script>{% endblock %}
22 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/ie.css" />22 <!--block extraheadjs left out by design, add other JS files to the loader.js script for async loading,
23 <![endif]-->23 this is done and by design, if you MUST add a <script> tag do so in the closure block and test to ensure
2424 no breakage has been caused, also avoid inline CSS and JS when possible, use {{ubuntu_website_media}}/css/site.css
25 <!--[if IE 6 ]>25 or {{ubuntu_website_media}}/js/site.js so it correct headers are sent and can be cached properly by broswers-->
26 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/ie6.css" media="screen, projection" />26 {% endblock %}{% block extrahead %}{% endblock %}
27 <![endif]-->
28
29 <!--[if IE ]>
30 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
31 <![endif]-->
32 {% endblock %}
33{% block extrahead %}{% endblock %}
34</head>27</head>
35<body>28<body>
36 <div class="wrapper">29 <div class="wrapper">
@@ -75,7 +68,7 @@
75 <img width="108" height="50" src="{{ubuntu_website_media}}/images/linaro-connect-logo.png" alt="Linaro Connect Logo"/>68 <img width="108" height="50" src="{{ubuntu_website_media}}/images/linaro-connect-logo.png" alt="Linaro Connect Logo"/>
76 <h2 class="header-text"><a href="/">{% block logo_text %}Country Loco Team{% endblock %}</a></h2>69 <h2 class="header-text"><a href="/">{% block logo_text %}Country Loco Team{% endblock %}</a></h2>
77 </a>70 </a>
78 71
79</header>72</header>
8073
8174
@@ -95,7 +88,7 @@
95 </nav>88 </nav>
9689
97 <!--<aside id="page-related">-->90 <!--<aside id="page-related">-->
98 91
99 <!--92 <!--
100 {% block search %}93 {% block search %}
101 <section id="searchbox-container">94 <section id="searchbox-container">
@@ -106,14 +99,14 @@
106 {% endblock %}99 {% endblock %}
107 <hr class="divide" />100 <hr class="divide" />
108 </div>-->101 </div>-->
109 102
110 <!-- </aside> -->103 <!-- </aside> -->
111 {% endblock %}104 {% endblock %}
112105
113 {% endif %}106 {% endif %}
114107
115 108
116 109
117 {% block messages %}110 {% block messages %}
118 {% endblock %}111 {% endblock %}
119112
@@ -122,7 +115,7 @@
122115
123 {% block general %}116 {% block general %}
124 {% endblock %}117 {% endblock %}
125 118
126119
127</div><!-- div.inner-wrapper -->120</div><!-- div.inner-wrapper -->
128121
@@ -198,7 +191,7 @@
198 </dd>191 </dd>
199 {% endblock %}192 {% endblock %}
200 </dl>193 </dl>
201 194
202195
203 <details class="foot-note">196 <details class="foot-note">
204 {% block footer_note %}<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sit amet lectus massa. </p>{% endblock %}197 {% block footer_note %}<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sit amet lectus massa. </p>{% endblock %}
@@ -208,12 +201,19 @@
208 </footer>201 </footer>
209202
210 {% endif %}203 {% endif %}
211 <!-- IE6 hacks -->204 <script>
212 <!--[if IE 6 ]>205 (function() {
213 <script src="{{ubuntu_website_media}}/js/pngFix.js"></script>206 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
214 <script> DD_belatedPNG.fix('.png'); </script>207 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
215 <![endif]-->208 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
216 {% block extrafooter %}{% endblock %}209 })();
210 </script>
211 <script src="{{ubuntu_website_media}}/js/loader.js"></script>
212 <!--[if lt IE 9]>
213 <script src="{{ubuntu_website_media}}/js/polyfills/IE9/IE9.js">IE7_PNG_SUFFIX=".png";</script>
214 <script src="{{ubuntu_website_media}}/js/polyfills/IE9/squish.js"></script>
215 <![endif]-->
216 {% block closure %}{% endblock %}
217</div>217</div>
218</body>218</body>
219</html>219</html>

Subscribers

People subscribed via source and target branches