Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

initial commit
  • Loading branch information...
commit 401ba453aa74704c1d7bb67328b14f7cb1aa7c32 0 parents
@jeromecoupe authored
502 css/normalize.css
@@ -0,0 +1,502 @@
+/*! normalize.css 2012-02-07T12:37 UTC - http://github.com/necolas/normalize.css */
+
+/* =============================================================================
+ HTML5 display definitions
+ ========================================================================== */
+
+/*
+ * Corrects block display not defined in IE6/7/8/9 & FF3
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/*
+ * Corrects inline-block display not defined in IE6/7/8/9 & FF3
+ */
+
+audio,
+canvas,
+video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+/*
+ * Prevents modern browsers from displaying 'audio' without controls
+ */
+
+audio:not([controls]) {
+ display: none;
+}
+
+/*
+ * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
+ * Known issue: no IE6 support
+ */
+
+[hidden] {
+ display: none;
+}
+
+
+/* =============================================================================
+ Base
+ ========================================================================== */
+
+/*
+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
+ * http://clagnut.com/blog/348/#c790
+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
+ */
+
+html {
+ font-size: 100%; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+ -ms-text-size-adjust: 100%; /* 2 */
+}
+
+/*
+ * Addresses font-family inconsistency between 'textarea' and other form elements.
+ */
+
+html,
+button,
+input,
+select,
+textarea {
+ font-family: sans-serif;
+}
+
+/*
+ * Addresses margins handled incorrectly in IE6/7
+ */
+
+body {
+ margin: 0;
+}
+
+
+/* =============================================================================
+ Links
+ ========================================================================== */
+
+/*
+ * Addresses outline displayed oddly in Chrome
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/*
+ * Improves readability when focused and also mouse hovered in all browsers
+ * people.opera.com/patrickl/experiments/keyboard/test
+ */
+
+a:hover,
+a:active {
+ outline: 0;
+}
+
+
+/* =============================================================================
+ Typography
+ ========================================================================== */
+
+/*
+ * Addresses font sizes and margins set differently in IE6/7
+ * Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+h2 {
+ font-size: 1.5em;
+ margin: 0.83em 0;
+}
+
+h3 {
+ font-size: 1.17em;
+ margin: 1em 0;
+}
+
+h4 {
+ font-size: 1em;
+ margin: 1.33em 0;
+}
+
+h5 {
+ font-size: 0.83em;
+ margin: 1.67em 0;
+}
+
+h6 {
+ font-size: 0.75em;
+ margin: 2.33em 0;
+}
+
+/*
+ * Addresses styling not present in IE7/8/9, S5, Chrome
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/*
+ * Addresses style set to 'bolder' in FF3+, S4/5, Chrome
+*/
+
+b,
+strong {
+ font-weight: bold;
+}
+
+blockquote {
+ margin: 1em 40px;
+}
+
+/*
+ * Addresses styling not present in S5, Chrome
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/*
+ * Addresses styling not present in IE6/7/8/9
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/*
+ * Addresses margins set differently in IE6/7
+ */
+
+p,
+pre {
+ margin: 1em 0;
+}
+
+/*
+ * Corrects font family set oddly in IE6, S4/5, Chrome
+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
+ */
+
+pre,
+code,
+kbd,
+samp {
+ font-family: monospace, serif;
+ _font-family: 'courier new', monospace;
+ font-size: 1em;
+}
+
+/*
+ * Improves readability of pre-formatted text in all browsers
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/*
+ * 1. Addresses CSS quotes not supported in IE6/7
+ * 2. Addresses quote property not supported in S4
+ */
+
+/* 1 */
+
+q {
+ quotes: none;
+}
+
+/* 2 */
+
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+small {
+ font-size: 75%;
+}
+
+/*
+ * Prevents sub and sup affecting line-height in all browsers
+ * gist.github.com/413930
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+
+/* =============================================================================
+ Lists
+ ========================================================================== */
+
+/*
+ * Addresses margins set differently in IE6/7
+ */
+
+dl,
+menu,
+ol,
+ul {
+ margin: 1em 0;
+}
+
+dd {
+ margin: 0 0 0 40px;
+}
+
+/*
+ * Addresses paddings set differently in IE6/7
+ */
+
+menu,
+ol,
+ul {
+ padding: 0 0 0 40px;
+}
+
+/*
+ * Corrects list images handled incorrectly in IE7
+ */
+
+nav ul,
+nav ol {
+ list-style: none;
+ list-style-image: none;
+}
+
+
+/* =============================================================================
+ Embedded content
+ ========================================================================== */
+
+/*
+ * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
+ * 2. Improves image quality when scaled in IE7
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
+ */
+
+img {
+ border: 0; /* 1 */
+ -ms-interpolation-mode: bicubic; /* 2 */
+}
+
+/*
+ * Corrects overflow displayed oddly in IE9
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+
+/* =============================================================================
+ Figures
+ ========================================================================== */
+
+/*
+ * Addresses margin not present in IE6/7/8/9, S5, O11
+ */
+
+figure {
+ margin: 0;
+}
+
+
+/* =============================================================================
+ Forms
+ ========================================================================== */
+
+/*
+ * Corrects margin displayed oddly in IE6/7
+ */
+
+form {
+ margin: 0;
+}
+
+/*
+ * Define consistent border, margin, and padding
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/*
+ * 1. Corrects color not being inherited in IE6/7/8/9
+ * 2. Corrects text not wrapping in FF3
+ * 3. Corrects alignment displayed oddly in IE6/7
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0;
+ white-space: normal; /* 2 */
+ *margin-left: -7px; /* 3 */
+}
+
+/*
+ * 1. Corrects font size not being inherited in all browsers
+ * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
+ * 3. Improves appearance and consistency in all browsers
+ */
+
+button,
+input,
+select,
+textarea {
+ font-size: 100%; /* 1 */
+ margin: 0; /* 2 */
+ vertical-align: baseline; /* 3 */
+ *vertical-align: middle; /* 3 */
+}
+
+/*
+ * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
+ */
+
+button,
+input {
+ line-height: normal; /* 1 */
+}
+
+/*
+ * 1. Improves usability and consistency of cursor style between image-type 'input' and others
+ * 2. Corrects inability to style clickable 'input' types in iOS
+ * 3. Removes inner spacing in IE7 without affecting normal text inputs
+ * Known issue: inner spacing remains in IE6
+ */
+
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer; /* 1 */
+ -webkit-appearance: button; /* 2 */
+ *overflow: visible; /* 3 */
+}
+
+/*
+ * Re-set default cursor for disabled elements
+ */
+
+button[disabled],
+input[disabled] {
+ cursor: default;
+}
+
+/*
+ * 1. Addresses box sizing set to content-box in IE8/9
+ * 2. Removes excess padding in IE8/9
+ * 3. Removes excess padding in IE7
+ Known issue: excess padding remains in IE6
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
+}
+
+/*
+ * 1. Addresses appearance set to searchfield in S5, Chrome
+ * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/*
+ * Removes inner padding and search cancel button in S5, Chrome on OS X
+ */
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none;
+}
+
+/*
+ * Removes inner padding and border in FF3+
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/*
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
+ * 2. Improves readability and alignment in all browsers
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+
+/* =============================================================================
+ Tables
+ ========================================================================== */
+
+/*
+ * Remove most spacing between table cells
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
141 css/screen.css
@@ -0,0 +1,141 @@
+/*
+
+Mobile First item grid using display:inline-block; for items
+
+- Reflows depending on the available width (4 items per row > 3 items per row > 2 items per row)
+- Prevent the whitespace bug between items
+- Tested in all modern browsers and in IE >= 7
+- Uses selectivizr and respond to get support for CSS3 selectors and screen-size based media-queries
+- Demo available at: http://www.g-rom.be/reflowing_item_grid/ (or .zip attached)
+
+*/
+
+body
+{
+ font:normal 14px/1.5 Helvetica, Arial, sans-serif;
+ background:#fcf9f5;
+ color:#000;
+ margin:2em;
+}
+
+#pagewrapper
+{
+ margin:0 auto;
+ padding:0 4.3478261%;
+}
+
+/* =Grids
+reflowing grids of items
+###########################################*/
+.grid
+{
+ width:100%;
+ background:green;
+ list-style:none;
+ margin:0;
+ padding:0;
+ font-family: "Courier New", monospace; /*switch to monospace for the whitespace hack to work consistently*/
+ letter-spacing: -0.55em; /* webkit: collapse whitespace between units */
+ word-spacing: -0.1em; /* IE < 8 && gecko: collapse whitespace between units */
+}
+
+.lt-ie8 .grid
+{
+ letter-spacing: normal; /* reset IE < 8 */
+}
+
+.gridunit
+{
+ display:inline-block;
+ vertical-align:top;
+ width:47.826087%; /*440/920*/
+ margin:0 4.3478261% 3em 0; /*40/920*/
+ font-family: "open-sans", Helvetica, sans-serif; /*restore non-monospace font in grid units*/
+ letter-spacing: normal;
+ word-spacing: normal;
+ background:yellow;
+}
+
+.gridunit:nth-child(2n)
+{
+ background:red;
+ margin-right:0;
+}
+
+.lt-ie8 .gridunit
+{
+ min-height:1px; /*triggers haslayout for ie < 8*/
+ display:inline; /*faking inline-block behavious for IE < 8*/
+}
+
+@media screen and (min-width:760px) {
+
+ /*bumping down the font size*/
+ body
+ {
+ font-size:80%;
+ }
+
+ /*Grid of items: 3 units per row*/
+ .gridunit, .gridunit:nth-child(2n)
+ {
+ width:30.4347826%; /*280/920*/
+ margin-right:4.3478261%; /*40/920*/
+ background:yellow;
+ }
+
+ .gridunit:nth-child(3n)
+ {
+ background:red;
+ margin-right:0;
+ }
+
+}
+
+@media screen and (min-width:1000px), only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:landscape){
+
+ #pagewrapper
+ {
+ max-width:1000px;
+ }
+
+ /*Grid of items: 4 units per row*/
+ .gridunit, .gridunit:nth-child(2n), .gridunit:nth-child(3n)
+ {
+ width:21.7391304%; /*200/920*/
+ margin-right:4.3478261%; /*40/920*/
+ background:yellow;
+ }
+
+ .gridunit:nth-child(4n)
+ {
+ background:red;
+ margin-right:0;
+ }
+
+}
+
+/* =Fluid Images
+The bicubic interpolation for IE is dealt with in normalize.css
+###########################################*/
+.imgholder img
+{
+ max-width:100%;
+}
+
+/* =Clearing Floats
+<http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/>
+###########################################*/
+.group:after
+{
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.lt-ie8 .group
+{
+ min-height: 1px;
+}
BIN  img/placeholder_16-9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 index.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+
+<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
+<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
+
+<head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width">
+
+ <title>Reflowing Inline-block Grid</title>
+
+ <!-- CSS -->
+ <link rel="stylesheet" media="screen" href="css/normalize.css" />
+ <link rel="stylesheet" media="screen" href="css/screen.css" />
+
+ <!-- JS (modernizr only in the head, rest of script at the bottom) -->
+ <script src="js/modernizr.min.js"></script>
+
+</head>
+<body>
+ <div id="pagewrapper" class="group">
+ <hgroup>
+ <h1>Test for reflowing grids using inline-block</h1>
+ <h2>AKA we will be so happy when <a href="http://dev.w3.org/csswg/css3-flexbox/">flexbox</a> is supported accross the board</h2>
+ <hgroup>
+ <p>The aim of this test is to have a grid of items using media queries to change the number of items displayed per row depending on the available screen space. Using floats was not an option, since we have to support items of various lengths.</p>
+ <ul>
+ <li>Uses display:inline-block; and media queries</li>
+ <li>Reflows depending on the available width (4 items per row > 3 items per row > 2 items per row)</li>
+ <li>Plays nice with items of various lengths</li>
+ <li>Prevent the <a href="http://robertnyman.com/2010/02/24/css-display-inline-block-why-it-rocks-and-why-it-sucks/">whitespace bug between items</a></li>
+ <li>Tested in all modern browsers and in IE >= 7 (slight float drops in IE7 upon window resize but I can live with that)</li>
+ <li>Uses <a href="https://github.com/keithclark/selectivizr">selectivizr</a> and <a href="https://github.com/scottjehl/Respond">respond</a> to get support for CSS3 selectors and screen-size based media-queries in IE</li>
+ </ul>
+
+ <ul class="module grid row3">
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 1</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 2</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 3</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis. Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 4</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 5</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 6</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 7</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 8</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 9</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 10</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis. Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis. Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 11</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ <li class="gridunit">
+ <p class="imgholder"><img src="img/placeholder_16-9.png" /></p>
+ <h3>Block 12</h3>
+ <p>Curabitur mollis nisl id augue placerat vestibulum. Ut varius erat ac enim iaculis convallis. Donec metus eros, malesuada eget tristique eget, pellentesque a dui. Quisque a metus sit amet erat bibendum sagittis</p>
+ </li>
+ </ul>
+
+ </div>
+
+ <!--[if lte IE 9]>
+ <script src="js/domassistant.min.js"></script>
+ <script src="js/selectivizr.min.js"></script>
+ <script src="js/respond.min.js"></script>
+ <![endif]-->
+
+</body>
+</html>
4 js/domassistant.min.js
@@ -0,0 +1,4 @@
+// Developed by Robert Nyman/DOMAssistant team, code/licensing: http://domassistant.googlecode.com/, documentation: http://www.domassistant.com/documentation, version 2.8.1
+var DOMAssistant=function(){var p=function(){},h=window,j=h.$,c=h.$$,k=/*@cc_on!@*/false,n=!!document.getElementsByTagName("*").length,e=function(){if(!k){return true;}try{document.createElement("<img />");return false;}catch(s){return true;}}(),q,d={},b={},m=true,l=Array.prototype.slice,r={accesskey:"accessKey","class":"className",colspan:"colSpan","for":"htmlFor",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding"},f={rules:/\s*,\s*/g,selector:/^(\w+|\*)?(#[\w\u00C0-\uFFFF\-=$]+)?((\.[\w\u00C0-\uFFFF\-]+)*)?((\[\w[-\w]*\s*([~^$*|])?(=\s*([-\w\u00C0-\uFFFF\s.]+|"[^"]*"|'[^']*'))?\]+)*)?((:\w[-\w]*(\((odd|even|\-?\d*n?([-+]\d+)?|[:#]?[-\w\u00C0-\uFFFF.]+|"[^"]*"|'[^']*'|((\w*\.[-\w\u00C0-\uFFFF]+)*)?|(\[#?\w[-\w]*([~^$*|])?=?[-\w\u00C0-\uFFFF\s.'"]+\]+)|(:\w[-\w]*\(.+\)))\))?)*)?([+>~])?/,selectorSplit:/(?:\[.*\]|\(.*\)|[^\s+>~[(])+|[+>~]/g,id:/^#([-\w\u00C0-\uFFFF=$]+)$/,tag:/^\w+/,relation:/^[+>~]$/,pseudo:/^:(\w[-\w]*)(\((.+)\))?$/,pseudos:/:(\w[-\w]*)(\((([^(]+)|([^(]+\([^(]+)\))\))?/g,attribs:/\[(\w[-\w]*)\s*([~^$*|])?(=)?\s*([^\[\]]*|"[^"]*"|'[^']*')?\](?=$|\[|:|\s)/g,classes:/\.([-\w\u00C0-\uFFFF]+)/g,quoted:/^["'](.*)["']$/,nth:/^((odd|even)|([1-9]\d*)|((([1-9]\d*)?)n([-+]\d+)?)|(-(([1-9]\d*)?)n\+(\d+)))$/,special:/((:check|:enabl|\bselect)ed\b)|[*^$]=\s*(""|'')/},o=function(u,v,s){var t=u.tagName;while((u=u[v+"Sibling"])&&(u.nodeType!==1||(s?u.tagName!==t:u.tagName==="!"))){}return u;},i=function(s){return typeof s!=="undefined";},g=function(s){return(g=s[0].compareDocumentPosition?function(t){return t.sort(function(v,u){return 3-(v.compareDocumentPosition(u)&6);});}:k?function(t){return t.sort(function(v,u){return v.sourceIndex-u.sourceIndex;});}:function(t){return t.sort(function(x,v){var w=document.createRange(),u=document.createRange();w.setStart(x,0);w.setEnd(x,0);u.setStart(v,0);u.setEnd(v,0);return w.compareBoundaryPoints(Range.START_TO_END,u);});})(s);};var a=function(t,s){t.push.apply(t,l.apply(s));return t;};if(k){a=function(u,t){if(t.slice){return u.concat(t);}var s=0,v;while((v=t[s++])){u[u.length]=v;}return u;};}return{isIE:k,strictElmCreation:e,camel:r,def:i,allMethods:[],publicMethods:["prev","next","hasChild","cssSelect","elmsByClass","elmsByAttribute","elmsByTag"],harmonize:function(){h.$=j;h.$$=c;return this;},initCore:function(){this.applyMethod.call(h,"$",this.$);this.applyMethod.call(h,"$$",this.$$);h.DOMAssistant=this;if(k){p=Array;}p.prototype=[];(function(s){s.each=function(w,v){for(var u=0,t=this.length;u<t;u++){if(w.call(v||this[u],this[u],u,this)===false){break;}}return this;};s.first=function(){return i(this[0])?DOMAssistant.addMethodsToElm(this[0]):null;};s.end=function(){return this.previousSet;};s.indexOf=s.indexOf||function(v){for(var u=0,t=this.length;u<t;u++){if(u in this&&this[u]===v){return u;}}return -1;};s.map=function(x,w){var v=[];for(var u=0,t=this.length;u<t;u++){if(u in this){v[u]=x.call(w||this[u],this[u],u,this);}}return v;};s.filter=function(x,w){var v=new p();v.previousSet=this;for(var u=0,t=this.length;u<t;u++){if(u in this&&x.call(w||this[u],this[u],u,this)){v.push(this[u]);}}return v;};s.every=function(w,v){for(var u=0,t=this.length;u<t;u++){if(u in this&&!w.call(v||this[u],this[u],u,this)){return false;}}return true;};s.some=function(w,v){for(var u=0,t=this.length;u<t;u++){if(u in this&&w.call(v||this[u],this[u],u,this)){return true;}}return false;};})(p.prototype);this.attach(this);},addMethods:function(s,t){if(!i(this.allMethods[s])){this.allMethods[s]=t;this.addHTMLArrayPrototype(s,t);}},addMethodsToElm:function(t){for(var s in this.allMethods){if(i(this.allMethods[s])){this.applyMethod.call(t,s,this.allMethods[s]);}}return t;},applyMethod:function(t,s){if(typeof this[t]!=="function"){this[t]=s;}},attach:function(u){var s=u.publicMethods;if(!i(s)){for(var w in u){if(w!=="init"&&i(u[w])){this.addMethods(w,u[w]);}}}else{if(s.constructor===Array){for(var t=0,v;(v=s[t]);t++){this.addMethods(v,u[v]);}}}if(typeof u.init==="function"){u.init();}},addHTMLArrayPrototype:function(s,t){p.prototype[s]=function(){var w=new p();w.previousSet=this;for(var v=0,u=this.length;v<u;v++){w.push(t.apply(DOMAssistant.$$(this[v]),arguments));}return w;};},cleanUp:function(v){var t=v.all||v.getElementsByTagName("*");for(var s=0,u;(u=t[s++]);){if(u.hasData&&u.hasData()){if(u.removeEvent){u.removeEvent();}u.unstore();}}v.innerHTML="";},setCache:function(s){m=s;},$:function(){var v=arguments[0];if(arguments.length===1&&(typeof v==="object"||(typeof v==="function"&&!!v.nodeName))){return DOMAssistant.$$(v);}var x=!!v?new p():null;for(var t=0,s,w;(s=arguments[t]);t++){if(typeof s==="string"){s=s.replace(/^[^#\(]*(#)/,"$1");if(f.id.test(s)){if((w=DOMAssistant.$$(s.substr(1),false))){x.push(w);}}else{var u=(document.all||document.getElementsByTagName("*")).length;x=(!document.querySelectorAll&&m&&b.rule&&b.rule===s&&b.doc===u)?b.elms:a(x,DOMAssistant.cssSelection.call(document,s));b={rule:s,elms:x,doc:u};}}}return x;},$$:function(y,v){var x=(typeof y==="object"||typeof y==="function"&&!!y.nodeName)?y:document.getElementById(y),w=i(v)?v:true,u=function(A){var z=A.id;return typeof z!=="object"?z:A.attributes.id.nodeValue;};if(typeof y==="string"&&x&&u(x)!==y){x=null;for(var s=0,t;(t=document.all[s]);s++){if(u(t)===y){x=t;break;}}}if(x&&w&&!x.next){DOMAssistant.addMethodsToElm(x);}return x;},prev:function(){return DOMAssistant.$$(o(this,"previous"));},next:function(){return DOMAssistant.$$(o(this,"next"));},hasChild:function(s){return this===document||this!==s&&(this.contains?this.contains(s):!!(this.compareDocumentPosition(s)&16));},getSequence:function(w){var x,v=2,t=-1,s=-1,u=f.nth.exec(w.replace(/^0n\+/,"").replace(/^2n$/,"even").replace(/^2n+1$/,"odd"));if(!u){return null;}if(u[2]){x=(u[2]==="odd")?1:2;s=(x===1)?1:0;}else{if(u[3]){x=t=parseInt(u[3],10);v=0;}else{if(u[4]){v=u[6]?parseInt(u[6],10):1;x=u[7]?parseInt(u[7],10):0;while(x<1){x+=v;}s=(x>=v)?(x-v)%v:x;}else{if(u[8]){v=u[10]?parseInt(u[10],10):1;x=t=parseInt(u[11],10);while(x>v){x-=v;}s=(t>=v)?(t-v)%v:t;}}}}return{start:x,add:v,max:t,modVal:s};},cssByDOM:function(v){var aX,I,D,N,aw,x,ah,A,K,w,ar,aP,y,aJ,au,aC=new p(),aT=aC.indexOf,aq=[],aH=[],aL=v.replace(f.rules,",").split(","),aG={};function aS(t){t=t||aq;for(var s=t.length;s--;){t[s].added=null;t[s].removeAttribute("added");}}function C(){for(var s=aX.length;s--;){aX[s].childElms=null;}}function an(u,s){for(var aY=0,a1;(a1=u[aY]);aY++){var a0=false;for(var t=0,aZ;(aZ=s[t]);t++){if(aZ===a1){a0=true;s.splice(t,1);break;}}if(a0){u.splice(aY--,1);}}return u;}function al(t,s){return t.hasAttribute?t.hasAttribute(s):(t.attributes&&t.attributes[s]&&!/type/.test(s))?!!t.attributes[s].specified:(t.getAttribute(s)!==null);}function E(u,s){var t=f.special.test(s);if(k&&!t&&!al(u,s)){return undefined;}return(k||t)?u[r[s.toLowerCase()]||s]:u.getAttribute(s,2);}function P(s,t){s=s?s.replace(f.quoted,"$1").replace(/(\.|\[|\])/g,"\\$1"):null;return t?{"^":"^"+s,"$":s+"$","*":s,"|":"^"+s+"(\\-\\w+)*$","~":"\\b"+s+"\\b"}[t]:(s!==null?"^"+s+"$":s);}function W(s){return(s||this).tagName!=="!";}function S(s,t){return n?t.getElementsByTagName(s):(s==="*"?t.all:t.all.tags(s));}function aM(s,t){s=s||"*";t=t||document;return(t===document||t.lastModified)?d[s]||(d[s]=S(s,document)):S(s,t);}function at(a1,bj,aY){aX=[];var aZ=bj.split("-"),a4=[],a9=0,bi=/\-of\-type$/.test(bj),a8,a3={first:function(bk){return !o(bk,"previous",bi);},last:function(bk){return !o(bk,"next",bi);},empty:function(bk){for(var bl=bk.firstChild;bl!==null;bl=bl.nextSibling){if(bl.nodeType===1&&bl.nodeName!=="!"||bl.nodeType===3){return false;}}return true;},enabled:function(bk){return !bk.disabled&&bk.type!=="hidden";},disabled:function(bk){return bk.disabled;},checked:function(bk){return bk.checked;},contains:function(bk){return(bk.innerText||bk.textContent||"").indexOf(aY.replace(f.quoted,"$1"))>-1;},other:function(bk){return E(bk,bj)===aY;}};function u(bk){while((A=a1[a9++])){if(W(A)&&a3[bk](A)){a4[a4.length]=A;}}return a4;}var bf=aZ[0]||null;if(bf&&a3[bf]){return u(bf);}switch(bf){case"only":var a5,a0;while((A=a1[a9++])){K=A.parentNode;var ba=A.nodeName;if(K!==a5||ba!==a0){if(a3.first(A)&&a3.last(A)){a4[a4.length]=A;}a5=K;a0=ba;}}break;case"nth":if(aY==="n"){a4=a1;}else{var bh=(aZ[1]==="last")?["lastChild","previousSibling"]:["firstChild","nextSibling"];aJ=DOMAssistant.getSequence(aY);if(aJ){while((A=a1[a9++])){K=A.parentNode;K.childElms=K.childElms||{};var bb=A.nodeName;if(!K.childElms[bb]){var be=0;aP=aJ.start;y=K[bh[0]];while(y&&(aJ.max<0||aP<=aJ.max)){var bg=y.nodeName;if((bi&&bg===bb)||(!bi&&y.nodeType===1&&bg!=="!")){if(++be===aP){if(bg===bb){a4[a4.length]=y;}aP+=aJ.add;}}y=y[bh[1]];}if(au){q++;}K.childElms[bb]=true;aX[aX.length]=K;}}C();}}break;case"target":var t=document.location.hash.slice(1);if(t){while((A=a1[a9++])){if(E(A,"name")===t||E(A,"id")===t){a4[a4.length]=A;break;}}}break;case"not":if((a8=f.pseudo.exec(aY))){a4=an(a1,at(a1,a8[1]?a8[1].toLowerCase():null,a8[3]||null));}else{for(var bc in f){if(f[bc].lastIndex){f[bc].lastIndex=0;}}aY=aY.replace(f.id,"[id=$1]");var a7=f.tag.exec(aY);var a2=f.classes.exec(aY);var a6=f.attribs.exec(aY);var s=new RegExp(a6?P(a6[4],a6[2])||"":"(^|\\s)"+(a7?a7[0]:a2?a2[1]:"")+"(\\s|$)","i");while((w=a1[a9++])){ar=null;if(a7&&!s.test(w.nodeName)||a2&&!s.test(w.className)){ar=w;}else{if(a6){var bd=E(w,a6[1]);if(!i(bd)||bd===false||typeof bd==="string"&&!s.test(bd)){ar=w;}}}if(ar&&!ar.added){ar.added=true;a4[a4.length]=ar;}}}break;default:return u("other");}return a4;}function Z(aZ,u){var t=0,aY=aZ,a0;while((a0=u[t++])){if(!aY.length||aY.indexOf(a0)<0){aZ.push(a0);}}return aZ;}q=-1;for(var ak=0,aK=[];(I=aL[ak]);ak++){if(!(D=I.match(f.selectorSplit))||ak&&aT.call(aL.slice(0,ak),I)>-1){continue;}aq=[this];for(var ai=0,G;(G=D[ai]);ai++){aH=[];if((N=f.relation.exec(G))){var ao=null,aU=D[ai+1];if((aw=f.tag.exec(aU))){aw=aw[0];x=new RegExp("(^|\\s)"+aw+"(\\s|$)","i");}else{if(f.id.test(aU)){ao=DOMAssistant.$(aU)||null;}}for(var ag=0,M;(M=aq[ag]);ag++){switch(N[0]){case">":var aE=ao||aM(aw,M);for(var ae=0,az;(az=aE[ae]);ae++){if(az.parentNode===M){aH[aH.length]=az;}}break;case"+":if((M=o(M,"next"))){if((ao&&ao[0]===M)||(!ao&&(!aw||x.test(M.nodeName)))){aH[aH.length]=M;}}break;case"~":while((M=M.nextSibling)&&!M.added){if((ao&&ao[0]===M)||(!ao&&(!aw||x.test(M.nodeName)))){M.added=true;aH[aH.length]=M;}}break;}}aq=aH;aS();G=D[++ai];if(/^\w+$/.test(G)||f.id.test(G)){continue;}aq.skipTag=true;}var av=f.selector.exec(G);aG={tag:av[1]?av[1]:"*",id:av[2],allClasses:av[3],allAttr:av[5],allPseudos:av[10]};au=(aG.tag==="*");if(aG.id){var O=0,am=document.getElementById(aG.id.slice(1));if(am){while(aq[O]&&!DOMAssistant.hasChild.call(aq[O],am)){O++;}aH=(O<aq.length&&(au||aG.tag===am.tagName.toLowerCase()))?[am]:[];}aq=aH;}else{if(aG.tag&&!aq.skipTag){if(ai===0&&!aH.length&&aq.length===1){aq=aH=a([],aM(aG.tag,aq[0]));}else{for(var ad=0,aQ=aq.length,aB,ax;ad<aQ;ad++){aB=aM(aG.tag,aq[ad]);for(var aa=0;(ax=aB[aa]);aa++){if(!ax.added){ax.added=true;aH[aH.length]=ax;}}}aq=aH;aS();}}}if(!aH.length){break;}aq.skipTag=false;if(aG.allClasses){var Y=0,ab=[],J=aG.allClasses.split(".").slice(1);while((ah=aq[Y++])){var af=true,ay=ah.className;if(ay&&ay.length){ay=ay.split(" ");for(var X=J.length;X--;){if(ay.indexOf(J[X])<0){af=false;break;}}if(af){ab[ab.length]=ah;}}}aq=aH=ab;}if(aG.allAttr){var B,T=0,aD=[],ac=[],aI=aG.allAttr.match(f.attribs),aO=/^[$^]?$/;for(var H=/^\[(selected|readonly)(\s*=.+)?\]$/,V=0,z=aI.length,U,aR;V<z;V++){f.attribs.lastIndex=0;U=f.attribs.exec(aI[V].replace(H,"[$1]"));aR=P(U[4],U[2]||null);aD[V]=[aR,U[1]];}while((ah=aH[T++])){for(var R=0,aF=aD.length;R<aF;R++){var aV=aD[R][0],aA=aV?new RegExp(aV):null,aj=E(ah,aD[R][1]);B=true;if(!aA&&aj===true){continue;}if(aO.test(aV)||(!aA&&typeof aj!=="string")||(!!aA&&!aA.test(aj))){B=false;break;}}if(B){ac[ac.length]=ah;}}aq=aH=ac;}if(aG.allPseudos){var F=aG.allPseudos.match(f.pseudos);for(var Q=0,ap=F.length;Q<ap;Q++){f.pseudos.lastIndex=0;var aW=f.pseudos.exec(F[Q]);var L=aW[1]?aW[1].toLowerCase():null;var aN=aW[3]||null;aH=at(aH,L,aN);aS(aH);}aq=aH;}}aC=((aK.length&&(au||aT.call(aK,aG.tag)>=0||aT.call(aK,"*")>=0))?Z:a)(aC,aq);aK.push(aG.tag);if(k&&au){aC=aC.filter(W);}}return((aC.length>1&&aL.length>1)||q>0)?g(aC):aC;},cssByXpath:function(t){var u={xhtml:"http://www.w3.org/1999/xhtml"},v=(document.documentElement.namespaceURI===u.xhtml)?"xhtml:":"",s=function w(x){return u[x]||null;};DOMAssistant.cssByXpath=function(O){var S,U,K,A,B,F,C=new p(),D=O.replace(f.rules,",").split(",");function N(X){var Y=X?"[":"",W=X?"]":"";return function(Z,ad,ac,ab,aa){aa=(aa||"").replace(f.quoted,"$1");if(ad===aa&&ad==="readonly"){ab=null;}return Y+({"^":"starts-with(@"+ad+', "'+aa+'")',"$":"substring(@"+ad+", (string-length(@"+ad+") - "+(aa.length-1)+"), "+aa.length+') = "'+aa+'"',"*":'contains(concat(" ", @'+ad+', " "), "'+aa+'")',"|":"@"+ad+'="'+aa+'" or starts-with(@'+ad+', "'+aa+'-")',"~":'contains(concat(" ", @'+ad+', " "), " '+aa+' ")'}[ac]||("@"+ad+(ab?'="'+aa+'"':"")))+W;};}function Q(X,Z,Y){X=/\-child$/.test(Z)?"*":X;var ab=Z.split("-"),W=((ab[1]==="last")?"(count(following-sibling::":"(count(preceding-sibling::")+X+") + 1)",aa,ac;switch(ab[0]){case"nth":return(Y!=="n"&&(F=DOMAssistant.getSequence(Y)))?((F.start===F.max)?W+" = "+F.start:W+" mod "+F.add+" = "+F.modVal+((F.start>1)?" and "+W+" >= "+F.start:"")+((F.max>0)?" and "+W+" <= "+F.max:"")):"";case"not":return"not("+((aa=f.pseudo.exec(Y))?Q(X,aa[1]?aa[1].toLowerCase():null,aa[3]||null):Y.replace(f.id,"[id=$1]").replace(f.tag,"self::$0").replace(f.classes,'contains(concat(" ", @class, " "), " $1 ")').replace(f.attribs,N()))+")";case"first":return"not(preceding-sibling::"+X+")";case"last":return"not(following-sibling::"+X+")";case"only":return"not(preceding-sibling::"+X+" or following-sibling::"+X+")";case"empty":return"not(child::*) and not(text())";case"contains":return'contains(., "'+Y.replace(f.quoted,"$1")+'")';case"enabled":return'not(@disabled) and not(@type="hidden")';case"disabled":return"@disabled";case"target":return'@name="'+(ac=document.location.hash.slice(1))+'" or @id="'+ac+'"';default:return"@"+Z+'="'+Y+'"';}}for(var P=0;(S=D[P]);P++){if(!(U=S.match(f.selectorSplit))||P&&C.indexOf.call(D.slice(0,P),S)>-1){continue;}K=K?K+" | .":".";for(var M=0,R=U.length;M<R;M++){A=f.selector.exec(U[M]);B={tag:v+(A[1]?A[1]:"*"),id:A[2],allClasses:A[3],allAttr:A[5],allPseudos:A[10],tagRelation:A[20]};K+=(B.tagRelation?({">":"/","+":"/following-sibling::*[1]/self::","~":"/following-sibling::"}[B.tagRelation]||""):((M>0&&f.relation.test(U[M-1]))?B.tag:("//"+B.tag)))+(B.id||"").replace(f.id,'[@id = "$1"]')+(B.allClasses||"").replace(f.classes,'[contains(concat(" ", @class, " "), " $1 ")]')+(B.allAttr||"").replace(f.attribs,N(true));if(B.allPseudos){var E=B.allPseudos.match(f.pseudos);for(var L=0,y=E.length;L<y;L++){f.pseudos.lastIndex=0;var z=f.pseudos.exec(E[L]),V=z[1]?z[1].toLowerCase():null,x=z[3]||null,H=Q(B.tag,V,x);if(H.length){K+="["+H+"]";}}}}}try{var J=document.evaluate(K,this,s,7,null),I,G=0;while((I=J.snapshotItem(G++))){C.push(I);}}catch(T){}return C;};return DOMAssistant.cssByXpath.call(this,t);},cssSelection:function(t){if(!t){return null;}var s=f.special.test(t);try{if(document.querySelectorAll&&!s){return a(new p(),this.querySelectorAll(t));}}catch(u){}return((document.evaluate&&!s&&!/-of-type/.test(t))?DOMAssistant.cssByXpath:DOMAssistant.cssByDOM).call(this,t);},cssSelect:function(s){return DOMAssistant.cssSelection.call(this,s);},elmsByClass:function(u,s){var t=(s||"")+"."+u;return DOMAssistant.cssSelection.call(this,t);},elmsByAttribute:function(t,u,s,w){var v=(s||"")+"["+t+((u&&u!=="*")?((w||"")+"="+u+"]"):"]");return DOMAssistant.cssSelection.call(this,v);},elmsByTag:function(s){return DOMAssistant.cssSelection.call(this,s);}};}();DOMAssistant.initCore();DOMAssistant.Storage=function(){var c=1,a=[],b="_da"+ +new Date();return{hasData:function(){var d=this[b];return !!d&&!!a[d];},retrieve:function(d){if(!DOMAssistant.def(d)){return this[b]||(this[b]=c++);}if(!this[b]||!a[this[b]]){return;}return a[this[b]][d];},store:function(f,g){var e=this[b]||(this[b]=c++);a[e]=a[e]||{};if(typeof f==="object"){for(var d in f){if(typeof d==="string"){a[e][d]=f[d];}}}else{a[e][f]=g;}return this;},unstore:function(e){var d=this[b]||(this[b]=c++);if(a[d]){if(DOMAssistant.def(e)){delete a[d][e];}else{a[d]=null;}}return this;}};}();DOMAssistant.attach(DOMAssistant.Storage);DOMAssistant.AJAX=function(){var globalXMLHttp=null,readyState=0,status=-1,statusText="",requestPool=[],createAjaxObj=function(url,method,callback,addToContent){var params=null;if(/POST/i.test(method)){url=url.split("?");params=url[1];url=url[0];}return{url:url,method:method,callback:callback,params:params,headers:{},responseType:"text",addToContent:addToContent||false};};return{publicMethods:["ajax","get","post","load"],initRequest:function(){var XMLHttp=null;if(!!window.XMLHttpRequest&&!DOMAssistant.isIE){XMLHttp=new XMLHttpRequest();DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new XMLHttpRequest();};}else{if(!!window.ActiveXObject){var XMLHttpMS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var i=0;i<XMLHttpMS.length;i++){try{XMLHttp=new window.ActiveXObject(XMLHttpMS[i]);DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new window.ActiveXObject(XMLHttpMS[i]);};break;}catch(e){XMLHttp=null;}}}}return XMLHttp;},ajax:function(ajaxObj){if(!ajaxObj.noParse&&ajaxObj.url&&/\?/.test(ajaxObj.url)&&ajaxObj.method&&/POST/i.test(ajaxObj.method)){var url=ajaxObj.url.split("?");ajaxObj.url=url[0];ajaxObj.params=url[1]+((url[1].length>0&&ajaxObj.params)?("&"+ajaxObj.params):"");}return DOMAssistant.AJAX.makeCall.call(this,ajaxObj);},get:function(url,callback,addToContent){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"GET",callback,addToContent));},post:function(url,callback){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"POST",callback));},load:function(url,addToContent){this.get(url,DOMAssistant.AJAX.replaceWithAJAXContent,addToContent);},makeCall:function(ajaxObj){var XMLHttp=DOMAssistant.AJAX.initRequest();if(XMLHttp){globalXMLHttp=XMLHttp;(function(elm){var url=ajaxObj.url,method=ajaxObj.method||"GET",callback=ajaxObj.callback,params=ajaxObj.params,headers=ajaxObj.headers,responseType=ajaxObj.responseType||"text",addToContent=ajaxObj.addToContent,timeout=ajaxObj.timeout||null,ex=ajaxObj.exception,timeoutId=null,done=false;XMLHttp.open(method,url,true);XMLHttp.setRequestHeader("AJAX","true");XMLHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");if(method==="POST"){XMLHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-length",params?params.length:0);if(XMLHttp.overrideMimeType){XMLHttp.setRequestHeader("Connection","close");}}if(responseType==="json"){XMLHttp.setRequestHeader("Accept","application/json, text/javascript, */*");}for(var i in headers){if(typeof i==="string"){XMLHttp.setRequestHeader(i,headers[i]);}}if(typeof callback==="function"){XMLHttp.onreadystatechange=function(){try{if(XMLHttp.readyState===4&&!done){window.clearTimeout(timeoutId);done=true;status=XMLHttp.status;statusText=XMLHttp.statusText;readyState=4;if((status||location.protocol!=="file:")&&(status<200||status>=300)){throw new Error(statusText);}var response=/xml/i.test(responseType)?XMLHttp.responseXML:XMLHttp.responseText;if(/json/i.test(responseType)&&!!response){response=(typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(response):eval("("+response+")");}globalXMLHttp=null;XMLHttp.onreadystatechange=function(){};requestPool.push(XMLHttp);callback.call(elm,response,addToContent);}}catch(e){globalXMLHttp=XMLHttp=null;if(typeof ex==="function"){ex.call(elm,e);ex=null;}}};}XMLHttp.send(params);if(timeout){timeoutId=window.setTimeout(function(){if(!done){XMLHttp.abort();done=true;if(typeof ex==="function"){readyState=0;status=408;statusText="Request timeout";globalXMLHttp=XMLHttp=null;ex.call(elm,new Error(statusText));ex=null;}}},timeout);}})(this);}return this;},replaceWithAJAXContent:function(content,add){if(add){this.innerHTML+=content;}else{DOMAssistant.cleanUp(this);this.innerHTML=content;}},getReadyState:function(){return(globalXMLHttp&&DOMAssistant.def(globalXMLHttp.readyState))?globalXMLHttp.readyState:readyState;},getStatus:function(){return status;},getStatusText:function(){return statusText;}};}();DOMAssistant.attach(DOMAssistant.AJAX);DOMAssistant.CSS=function(){var a=DOMAssistant.def,b={display:true};return{addClass:function(d){if(!this.hasClass(d)){var c=this.className;this.className=c+(c.length?" ":"")+d;}return this;},removeClass:function(c){return this.replaceClass(c);},replaceClass:function(d,e){var c=new RegExp(("(^|\\s)"+d+"(\\s|$)"),"i");this.className=this.className.replace(c,function(f,h,g){return e?(h+e+g):" ";}).replace(/^\s+|\s+$/g,"");return this;},hasClass:function(c){return(" "+this.className+" ").indexOf(" "+c+" ")>-1;},setStyle:function(f,g){var e=this.style;if("filters" in this&&(typeof f==="string"?/opacity/i.test(f):a(f.opacity))){e.zoom=1;e.filter=(e.filter||"").replace(/alpha\([^)]*\)/,"")+"alpha(opacity="+(a(f.opacity)?f.opacity:g)*100+")";}if(a(e.cssText)){var c=e.cssText;if(typeof f==="object"){for(var d in f){if(typeof d==="string"){if(b[d]){e[d]=f[d];}c+=";"+d+":"+f[d];}}}else{if(b[f]){e[f]=g;}c+=";"+f+":"+g;}e.cssText=c;}return this;},getStyle:function(c){var e="",d;c=c.toLowerCase();if(window.getComputedStyle){e=document.defaultView.getComputedStyle(this,null).getPropertyValue(c);}else{if(this.currentStyle){if("filters" in this&&c==="opacity"){e=(d=this.style.filter||this.currentStyle.filter)&&d.indexOf("opacity=")>=0?parseFloat(d.match(/opacity=([^)]*)/)[1])/100:1;}else{c=c.replace(/^float$/,"styleFloat").replace(/\-(\w)/g,function(f,g){return g.toUpperCase();});e=this.currentStyle[c];}if(e==="auto"&&/^(width|height)$/.test(c)&&this.currentStyle.display!=="none"){e=this["offset"+c.charAt(0).toUpperCase()+c.substr(1)]+"px";}}}return e;}};}();DOMAssistant.attach(DOMAssistant.CSS);DOMAssistant.Content=function(){var a=DOMAssistant.$$;return{init:function(){DOMAssistant.setCache(false);},create:function(d,c,b,e){var f=a(document.createElement(d));if(c){f=f.setAttributes(c);}if(DOMAssistant.def(e)){f.addContent(e);}if(b){this.appendChild(f);}return f;},setAttributes:function(b){if(!DOMAssistant.strictElmCreation){var c=function(g,e,f){var d=e.toLowerCase();switch(d){case"name":case"type":case"multiple":return a(document.createElement(g.outerHTML.replace(new RegExp(d+"(=[a-zA-Z]+)?")," ").replace(">"," "+d+"="+f+">")));case"style":g.style.cssText=f;return g;default:g[DOMAssistant.camel[d]||e]=f;return g;}};DOMAssistant.Content.setAttributes=function(d){var h=this;var g=this.parentNode;for(var f in d){if(typeof d[f]==="string"||typeof d[f]==="number"){var e=c(h,f,d[f]);if(g&&/(name|type)/i.test(f)){if(h.innerHTML){e.innerHTML=h.innerHTML;}g.replaceChild(e,h);}h=e;}}return h;};}else{DOMAssistant.Content.setAttributes=function(d){for(var e in d){if(/class/i.test(e)){this.className=d[e];}else{this.setAttribute(e,d[e]);}}return this;};}return DOMAssistant.Content.setAttributes.call(this,b);},addContent:function(f){var d=typeof f;if(d==="string"||d==="number"){if(!this.firstChild){this.innerHTML=f;}else{var c=document.createElement("div");c.innerHTML=f;for(var b=c.childNodes.length-1,e=null;b>=0;b--){e=this.insertBefore(c.childNodes[b],e);}}}else{if(d==="object"||(d==="function"&&!!f.nodeName)){this.appendChild(f);}}return this;},replaceContent:function(b){DOMAssistant.cleanUp(this);return this.addContent(b);},replace:function(g,b){var f=typeof g;if(f==="string"||f==="number"){var e=this.parentNode;var d=DOMAssistant.Content.create.call(e,"div",null,false,g);for(var c=d.childNodes.length;c--;){e.insertBefore(d.childNodes[c],this.nextSibling);}g=this.nextSibling;e.removeChild(this);}else{if(f==="object"||(f==="function"&&!!g.nodeName)){this.parentNode.replaceChild(g,this);}}return b?g:this;},remove:function(){DOMAssistant.cleanUp(this);if(this.hasData()){if(this.removeEvent){this.removeEvent();}this.unstore();}this.parentNode.removeChild(this);return null;}};}();DOMAssistant.attach(DOMAssistant.Content);DOMAssistant.Events=function(){var j,h="_events",d=!!document.addEventListener,a={focus:true,blur:true},b=DOMAssistant.isIE?{focus:"activate",blur:"deactivate",mouseenter:"mouseover",mouseleave:"mouseout"}:{mouseenter:"mouseover",mouseleave:"mouseout"},g={special:/^submit|reset|change|select$/i,mouseenterleave:/^mouse(enter|leave)$/i,dom:/^DOM/,on:/^on/i},c=function(l){l="on"+l;var k=document.createElement("div");k.setAttribute(l,"");return(typeof k[l]==="function");},f=function(k){return g.special.test(k)&&!c(k);},e=function(k){return b[k]||k;},i=function(o,l,n){o=o||window.event||{};if(o.event){return o;}var m={event:o,type:l||o.type,bubbles:o.bubbles||true,cancelable:o.cancelable||false,target:n||o.target||o.srcElement,clientX:o.clientX||0,clientY:o.clientY||0,altKey:o.altKey||false,ctrlKey:o.ctrlKey||false,shiftKey:o.shiftKey||false,button:o.button||null,timeStamp:+new Date(),preventDefault:function(){if(o.preventDefault){o.preventDefault();}this.returnValue=o.returnValue=false;},stopPropagation:function(){if(o.stopPropagation){o.stopPropagation();}this.cancelBubble=o.cancelBubble=true;}};if(m.target&&3===m.target.nodeType){m.target=m.target.parentNode;}m.currentTarget=m.target;m.relatedTarget=o.relatedTarget||(o.fromElement===m.target?o.toElement:o.fromElement)||null;var p=document.documentElement,k=document.body;m.pageX=DOMAssistant.def(o.pageX)?o.pageX:(m.clientX+(p.scrollLeft||k.scrollLeft)-(p.clientLeft||0));m.pageY=DOMAssistant.def(o.pageY)?o.pageY:(m.clientY+(p.scrollTop||k.scrollTop)-(p.clientTop||0));if("number"===typeof o.which){m.keyCode=o.keyCode;m.charCode=m.which=o.which;}else{if(o.keyCode){m.keyCode=m.charCode=o.keyCode;}}return m;};return{publicMethods:["triggerEvent","addEvent","removeEvent","relayEvent","unrelayEvent","preventDefault","cancelBubble"],init:function(){DOMAssistant.preventDefault=this.preventDefault;DOMAssistant.cancelBubble=this.cancelBubble;j=this.handleEvent;},triggerEvent:function(s,q,r){var n=e(s),t=this.retrieve(h),k=r||i(r,n,q||this);k.currentTarget=this;if(t&&t[n]){for(var o=0,m=t[n].length;o<m;o++){if(t[n][o].call(this,k)===false){k.stopPropagation();}}}else{if(typeof this["on"+n]==="function"){this["on"+n].call(this,k);}}var l=DOMAssistant.$$(this.parentNode);if(!k.cancelBubble&&l&&l.nodeType===1){l.triggerEvent(n,q,k);}return this;},addEvent:function(s,m,l,r,o){var k,n=e(s),q=n+this.retrieve(),p="on"+n;if(!(m.attachedElements&&m.attachedElements[q])){var t=this.retrieve(h)||{};if(!t[n]){t[n]=[];k=this[p];this[p]=null;}if(typeof this.window==="object"){this.window[p]=j;}else{if(!t[n].length){if(d){this.addEventListener(n,j,a[n]);}else{this[p]=j;}}}if(k){t[n].push(k);}if(n!==s){m.evt=s;}m.relay=l;m.proxy=r;m.selector=o;m.attachedElements=m.attachedElements||{};m.attachedElements[q]=true;t[n].push(m);this.store(h,t);}return this;},handleEvent:function(s){var r=(s&&g.dom.test(s.type)&&d)?s:i(s),p=e(r.type),q=r.target,m=r.relatedTarget,o=this.retrieve(h)[p].slice(0),u,k,t;if((u=o.length)){for(var n=0;n<u;n++){if(typeof o[n]==="function"){if((t=o[n].evt)&&t!==p){r.type=t;if(m&&g.mouseenterleave.test(t)){if(o[n].relay){var l=o[n].elms||(o[n].elms=this.cssSelect(o[n].selector));if(l.indexOf(q)<0||!DOMAssistant.hasChild.call(m,q)){continue;}}else{if(this===m||this.hasChild(m)){continue;}}}}k=o[n].call(this,r);}}if(k===false){r.stopPropagation();}return k;}},removeEvent:function(w,l,k,s){var q=(w=e(w))+this.retrieve(),x=this.retrieve(h),p="on"+w;if(x&&!w){for(var v in x){if(x[v].length){this.removeEvent(v);}}var r=this.attributes;for(var t,m=r.length;m--;){t=r[m].nodeName.toLowerCase();if(g.on.test(t)&&typeof this[t]==="function"){this[t]=null;}}}else{if(x&&x[w]){var o=x[w];for(var u,n=o.length;n--;){u=l||o[n];if(o[n]===u&&k===u.relay&&s===u.proxy){o.splice(n,1);if(!!s&&u.selector){this.cssSelect(u.selector).removeEvent(s);}if(u.attachedElements){u.attachedElements[q]=null;}}}if(!x[w].length){if(d){this.removeEventListener(w,j,a[w]);}else{this[p]=null;}}}else{if(this[p]&&!l&&!k){this[p]=null;}}}return this;},relayEvent:function(l,k,n,m){if(f(l)){this.relayEvent("focus",k,function(){DOMAssistant.$$(this).removeEvent(l).addEvent(l,function(o){return n.call(this,i(o));});},l).relayEvent("blur",k,function(){DOMAssistant.$$(this).removeEvent(l);},l);return this;}return this.addEvent(l,function(t){t=i(t);var s=t.target,o=arguments,p=0,u,q=this.cssSelect(k);while((u=q[p++])){if((u===s||DOMAssistant.hasChild.call(u,s))&&!u.disabled){t.currentTarget=u;var r=n.apply(u,o);if(!r){t.preventDefault();}return r;}}},true,m,k);},unrelayEvent:function(k){if(f(k)){return this.removeEvent("focus",null,true,k).removeEvent("blur",null,true,k);}return this.removeEvent(k,null,true);},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}k.returnValue=false;},cancelBubble:function(k){if(k.stopPropagation){k.stopPropagation();}k.cancelBubble=true;}};}();DOMAssistant.attach(DOMAssistant.Events);DOMAssistant.DOMLoad=function(){var g=false,a=null,f=[],b={},c=null,d=function(){for(var j=0,h=f.length;j<h;j++){try{f[j]()}catch(k){if(c&&typeof c==="function"){c(k)}}}f=[]},e=function(){if(g){return}g=true;d()};
+/*@cc_on @if(@_win32||@_win64)document.write("<script id=\"ieScriptLoad\" defer src=\"//:\"><\/script>");document.getElementById("ieScriptLoad").onreadystatechange=function(){if(this.readyState==="complete"){e()}}@end@*/
+if(document.addEventListener){document.addEventListener("DOMContentLoaded",e,false)}if(/KHTML|WebKit|iCab/i.test(navigator.userAgent)){a=setInterval(function(){if(/loaded|complete/i.test(document.readyState)){e();clearInterval(a)}},10)}window.onload=e;return{DOMReady:function(){for(var j=0,h=arguments.length,k;j<h;j++){k=arguments[j];if(!k.DOMReady&&!b[k]){if(typeof k==="string"){b[k]=true;k=new Function(k)}k.DOMReady=true;f.push(k)}}if(g){d()}},setErrorHandling:function(h){c=h}}}();DOMAssistant.DOMReady=DOMAssistant.DOMLoad.DOMReady;
4 js/modernizr.min.js
@@ -0,0 +1,4 @@
+/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
+ * Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
+ */
+;window.Modernizr=function(a,b,c){function A(a){j.cssText=a}function B(a,b){return A(n.join(a+";")+(b||""))}function C(a,b){return typeof a===b}function D(a,b){return!!~(""+a).indexOf(b)}function E(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function F(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}return!1}function G(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),F(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,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={}.hasOwnProperty,z;!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(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 H=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.generatedcontent=(i.generatedcontent&&i.generatedcontent.offsetHeight)>=1,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(""),['#generatedcontent:after{content:"',l,'";visibility:hidden}'].join("")],["fontface","csstransforms3d","generatedcontent"]);r.flexbox=function(){return G("flexOrder")},r.rgba=function(){return A("background-color:rgba(150,255,150,.5)"),D(j.backgroundColor,"rgba")},r.hsla=function(){return A("background-color:hsla(120,40%,100%,.5)"),D(j.backgroundColor,"rgba")||D(j.backgroundColor,"hsla")},r.multiplebgs=function(){return A("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},r.backgroundsize=function(){return G("backgroundSize")},r.borderimage=function(){return G("borderImage")},r.borderradius=function(){return G("borderRadius")},r.boxshadow=function(){return G("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return B("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return G("animationName")},r.csscolumns=function(){return G("columnCount")},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 A((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),D(j.backgroundImage,"gradient")},r.cssreflections=function(){return G("boxReflect")},r.csstransforms=function(){return!!G("transform")},r.csstransforms3d=function(){var a=!!G("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a},r.csstransitions=function(){return G("transition")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent};for(var I in r)z(r,I)&&(w=I.toLowerCase(),e[w]=r[I](),u.push((e[w]?"":"no-")+w));return A(""),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.testProp=function(a){return E([a])},e.testAllProps=G,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))};
6 js/respond.min.js
@@ -0,0 +1,6 @@
+/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
+/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
+window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='&shy;<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
+
+/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
+(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
560 js/selectivizr.min.js
@@ -0,0 +1,560 @@
+/*
+selectivizr v1.0.3b - (c) Keith Clark, freely distributable under the terms
+of the MIT license.
+
+selectivizr.com
+*/
+/*
+
+Notes about this source
+-----------------------
+
+ * The #DEBUG_START and #DEBUG_END comments are used to mark blocks of code
+ that will be removed prior to building a final release version (using a
+ pre-compression script)
+
+
+References:
+-----------
+
+ * CSS Syntax : http://www.w3.org/TR/2003/WD-css3-syntax-20030813/#style
+ * Selectors : http://www.w3.org/TR/css3-selectors/#selectors
+ * IE Compatability : http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx
+ * W3C Selector Tests : http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/
+
+*/
+
+(function(win) {
+
+ // If browser isn't IE, then stop execution! This handles the script
+ // being loaded by non IE browsers because the developer didn't use
+ // conditional comments.
+ if (/*@cc_on!@*/true) return;
+
+ // =========================== Init Objects ============================
+
+ var doc = document;
+ var root = doc.documentElement;
+ var xhr = getXHRObject();
+ var ieVersion = /MSIE (\d+)/.exec(navigator.userAgent)[1];
+
+ // If were not in standards mode, IE is too old / new or we can't create
+ // an XMLHttpRequest object then we should get out now.
+ if (doc.compatMode != 'CSS1Compat' || ieVersion<6 || ieVersion>8 || !xhr) {
+ return;
+ }
+
+
+ // ========================= Common Objects ============================
+
+ // Compatiable selector engines in order of CSS3 support. Note: '*' is
+ // a placholder for the object key name. (basically, crude compression)
+ var selectorEngines = {
+ "NW" : "*.Dom.select",
+ "MooTools" : "$$",
+ "DOMAssistant" : "*.$",
+ "Prototype" : "$$",
+ "YAHOO" : "*.util.Selector.query",
+ "Sizzle" : "*",
+ "jQuery" : "*",
+ "dojo" : "*.query"
+ };
+
+ var selectorMethod;
+ var enabledWatchers = []; // array of :enabled/:disabled elements to poll
+ var domPatches = [];
+ var ie6PatchID = 0; // used to solve ie6's multiple class bug
+ var patchIE6MultipleClasses = true; // if true adds class bloat to ie6
+ var namespace = "slvzr";
+
+ // Stylesheet parsing regexp's
+ var RE_COMMENT = /(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*?/g;
+ var RE_IMPORT = /@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))\s*([^;]*);/g;
+ var RE_ASSET_URL = /(behavior\s*?:\s*)?\burl\(\s*(["']?)(?!data:)([^"')]+)\2\s*\)/g;
+ var RE_PSEUDO_STRUCTURAL = /^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/;
+ var RE_PSEUDO_ELEMENTS = /:(:first-(?:line|letter))/g;
+ var RE_SELECTOR_GROUP = /((?:^|(?:\s*})+)(?:\s*@media[^{]+{)?)\s*([^\{]*?[\[:][^{]+)/g;
+ var RE_SELECTOR_PARSE = /([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g;
+ var RE_LIBRARY_INCOMPATIBLE_PSEUDOS = /(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g;
+ var RE_PATCH_CLASS_NAME_REPLACE = /[^\w-]/g;
+
+ // HTML UI element regexp's
+ var RE_INPUT_ELEMENTS = /^(INPUT|SELECT|TEXTAREA|BUTTON)$/;
+ var RE_INPUT_CHECKABLE_TYPES = /^(checkbox|radio)$/;
+
+ // Broken attribute selector implementations (IE7/8 native [^=""], [$=""] and [*=""])
+ var BROKEN_ATTR_IMPLEMENTATIONS = ieVersion>6 ? /[\$\^*]=(['"])\1/ : null;
+
+ // Whitespace normalization regexp's
+ var RE_TIDY_TRAILING_WHITESPACE = /([(\[+~])\s+/g;
+ var RE_TIDY_LEADING_WHITESPACE = /\s+([)\]+~])/g;
+ var RE_TIDY_CONSECUTIVE_WHITESPACE = /\s+/g;
+ var RE_TIDY_TRIM_WHITESPACE = /^\s*((?:[\S\s]*\S)?)\s*$/;
+
+ // String constants
+ var EMPTY_STRING = "";
+ var SPACE_STRING = " ";
+ var PLACEHOLDER_STRING = "$1";
+
+ // =========================== Patching ================================
+
+ // --[ patchStyleSheet() ]----------------------------------------------
+ // Scans the passed cssText for selectors that require emulation and
+ // creates one or more patches for each matched selector.
+ function patchStyleSheet( cssText ) {
+ return cssText.replace(RE_PSEUDO_ELEMENTS, PLACEHOLDER_STRING).
+ replace(RE_SELECTOR_GROUP, function(m, prefix, selectorText) {
+ var selectorGroups = selectorText.split(",");
+ for (var c = 0, cs = selectorGroups.length; c < cs; c++) {
+ var selector = normalizeSelectorWhitespace(selectorGroups[c]) + SPACE_STRING;
+ var patches = [];
+ selectorGroups[c] = selector.replace(RE_SELECTOR_PARSE,
+ function(match, combinator, pseudo, attribute, index) {
+ if (combinator) {
+ if (patches.length>0) {
+ domPatches.push( { selector: selector.substring(0, index), patches: patches } )
+ patches = [];
+ }
+ return combinator;
+ }
+ else {
+ var patch = (pseudo) ? patchPseudoClass( pseudo ) : patchAttribute( attribute );
+ if (patch) {
+ patches.push(patch);
+ return "." + patch.className;
+ }
+ return match;
+ }
+ }
+ );
+ }
+ return prefix + selectorGroups.join(",");
+ });
+ };
+
+ // --[ patchAttribute() ]-----------------------------------------------
+ // returns a patch for an attribute selector.
+ function patchAttribute( attr ) {
+ return (!BROKEN_ATTR_IMPLEMENTATIONS || BROKEN_ATTR_IMPLEMENTATIONS.test(attr)) ?
+ { className: createClassName(attr), applyClass: true } : null;
+ };
+
+ // --[ patchPseudoClass() ]---------------------------------------------
+ // returns a patch for a pseudo-class
+ function patchPseudoClass( pseudo ) {
+
+ var applyClass = true;
+ var className = createClassName(pseudo.slice(1));
+ var isNegated = pseudo.substring(0, 5) == ":not(";
+ var activateEventName;
+ var deactivateEventName;
+
+ // if negated, remove :not()
+ if (isNegated) {
+ pseudo = pseudo.slice(5, -1);
+ }
+
+ // bracket contents are irrelevant - remove them
+ var bracketIndex = pseudo.indexOf("(")
+ if (bracketIndex > -1) {
+ pseudo = pseudo.substring(0, bracketIndex);
+ }
+
+ // check we're still dealing with a pseudo-class
+ if (pseudo.charAt(0) == ":") {
+ switch (pseudo.slice(1)) {
+
+ case "root":
+ applyClass = function(e) {
+ return isNegated ? e != root : e == root;
+ }
+ break;
+
+ case "target":
+ // :target is only supported in IE8
+ if (ieVersion == 8) {
+ applyClass = function(e) {
+ var handler = function() {
+ var hash = location.hash;
+ var hashID = hash.slice(1);
+ return isNegated ? (hash == EMPTY_STRING || e.id != hashID) : (hash != EMPTY_STRING && e.id == hashID);
+ };
+ addEvent( win, "hashchange", function() {
+ toggleElementClass(e, className, handler());
+ })
+ return handler();
+ }
+ break;
+ }
+ return false;
+
+ case "checked":
+ applyClass = function(e) {
+ if (RE_INPUT_CHECKABLE_TYPES.test(e.type)) {
+ addEvent( e, "propertychange", function() {
+ if (event.propertyName == "checked") {
+ toggleElementClass( e, className, e.checked !== isNegated );
+ }
+ })
+ }
+ return e.checked !== isNegated;
+ }
+ break;
+
+ case "disabled":
+ isNegated = !isNegated;
+
+ case "enabled":
+ applyClass = function(e) {
+ if (RE_INPUT_ELEMENTS.test(e.tagName)) {
+ addEvent( e, "propertychange", function() {
+ if (event.propertyName == "$disabled") {
+ toggleElementClass( e, className, e.$disabled === isNegated );
+ }
+ });
+ enabledWatchers.push(e);
+ e.$disabled = e.disabled;
+ return e.disabled === isNegated;
+ }
+ return pseudo == ":enabled" ? isNegated : !isNegated;
+ }
+ break;
+
+ case "focus":
+ activateEventName = "focus";
+ deactivateEventName = "blur";
+
+ case "hover":
+ if (!activateEventName) {
+ activateEventName = "mouseenter";
+ deactivateEventName = "mouseleave";
+ }
+ applyClass = function(e) {
+ addEvent( e, isNegated ? deactivateEventName : activateEventName, function() {
+ toggleElementClass( e, className, true );
+ })
+ addEvent( e, isNegated ? activateEventName : deactivateEventName, function() {
+ toggleElementClass( e, className, false );
+ })
+ return isNegated;
+ }
+ break;
+
+ // everything else
+ default:
+ // If we don't support this pseudo-class don't create
+ // a patch for it
+ if (!RE_PSEUDO_STRUCTURAL.test(pseudo)) {
+ return false;
+ }
+ break;
+ }
+ }
+ return { className: className, applyClass: applyClass };
+ };
+
+ // --[ applyPatches() ]-------------------------------------------------
+ function applyPatches() {
+ var elms, selectorText, patches, domSelectorText;
+
+ for (var c=0; c<domPatches.length; c++) {
+ selectorText = domPatches[c].selector;
+ patches = domPatches[c].patches;
+
+ // Although some selector libraries can find :checked :enabled etc.
+ // we need to find all elements that could have that state because
+ // it can be changed by the user.
+ domSelectorText = selectorText.replace(RE_LIBRARY_INCOMPATIBLE_PSEUDOS, EMPTY_STRING);
+
+ // If the dom selector equates to an empty string or ends with
+ // whitespace then we need to append a universal selector (*) to it.
+ if (domSelectorText == EMPTY_STRING || domSelectorText.charAt(domSelectorText.length - 1) == SPACE_STRING) {
+ domSelectorText += "*";
+ }
+
+ // Ensure we catch errors from the selector library
+ try {
+ elms = selectorMethod( domSelectorText );
+ } catch (ex) {
+ // #DEBUG_START
+ log( "Selector '" + selectorText + "' threw exception '" + ex + "'" );
+ // #DEBUG_END
+ }
+
+
+ if (elms) {
+ for (var d = 0, dl = elms.length; d < dl; d++) {
+ var elm = elms[d];
+ var cssClasses = elm.className;
+ for (var f = 0, fl = patches.length; f < fl; f++) {
+ var patch = patches[f];
+ if (!hasPatch(elm, patch)) {
+ if (patch.applyClass && (patch.applyClass === true || patch.applyClass(elm) === true)) {
+ cssClasses = toggleClass(cssClasses, patch.className, true );
+ }
+ }
+ }
+ elm.className = cssClasses;
+ }
+ }
+ }
+ };
+
+ // --[ hasPatch() ]-----------------------------------------------------
+ // checks for the exsistence of a patch on an element
+ function hasPatch( elm, patch ) {
+ return new RegExp("(^|\\s)" + patch.className + "(\\s|$)").test(elm.className);
+ };
+
+
+ // =========================== Utility =================================
+
+ function createClassName( className ) {
+ return namespace + "-" + ((ieVersion == 6 && patchIE6MultipleClasses) ?
+ ie6PatchID++
+ :
+ className.replace(RE_PATCH_CLASS_NAME_REPLACE, function(a) { return a.charCodeAt(0) }));
+ };
+
+ // --[ log() ]----------------------------------------------------------
+ // #DEBUG_START
+ function log( message ) {
+ if (win.console) {
+ win.console.log(message);
+ }
+ };
+ // #DEBUG_END
+
+ // --[ trim() ]---------------------------------------------------------
+ // removes leading, trailing whitespace from a string
+ function trim( text ) {
+ return text.replace(RE_TIDY_TRIM_WHITESPACE, PLACEHOLDER_STRING);
+ };
+
+ // --[ normalizeWhitespace() ]------------------------------------------
+ // removes leading, trailing and consecutive whitespace from a string
+ function normalizeWhitespace( text ) {
+ return trim(text).replace(RE_TIDY_CONSECUTIVE_WHITESPACE, SPACE_STRING);
+ };
+
+ // --[ normalizeSelectorWhitespace() ]----------------------------------
+ // tidies whitespace around selector brackets and combinators
+ function normalizeSelectorWhitespace( selectorText ) {
+ return normalizeWhitespace(selectorText.
+ replace(RE_TIDY_TRAILING_WHITESPACE, PLACEHOLDER_STRING).
+ replace(RE_TIDY_LEADING_WHITESPACE, PLACEHOLDER_STRING)
+ );
+ };
+
+ // --[ toggleElementClass() ]-------------------------------------------
+ // toggles a single className on an element
+ function toggleElementClass( elm, className, on ) {
+ var oldClassName = elm.className;
+ var newClassName = toggleClass(oldClassName, className, on);
+ if (newClassName != oldClassName) {
+ elm.className = newClassName;
+ elm.parentNode.className += EMPTY_STRING;
+ }
+ };
+
+ // --[ toggleClass() ]--------------------------------------------------
+ // adds / removes a className from a string of classNames. Used to
+ // manage multiple class changes without forcing a DOM redraw
+ function toggleClass( classList, className, on ) {
+ var re = RegExp("(^|\\s)" + className + "(\\s|$)");
+ var classExists = re.test(classList);
+ if (on) {
+ return classExists ? classList : classList + SPACE_STRING + className;
+ } else {
+ return classExists ? trim(classList.replace(re, PLACEHOLDER_STRING)) : classList;
+ }
+ };
+
+ // --[ addEvent() ]-----------------------------------------------------
+ function addEvent(elm, eventName, eventHandler) {
+ elm.attachEvent("on" + eventName, eventHandler);
+ };
+
+ // --[ getXHRObject() ]-------------------------------------------------
+ function getXHRObject() {
+ if (win.XMLHttpRequest) {
+ return new XMLHttpRequest;
+ }
+ try {
+ return new ActiveXObject('Microsoft.XMLHTTP');
+ } catch(e) {
+ return null;
+ }
+ };
+
+ // --[ loadStyleSheet() ]-----------------------------------------------
+ function loadStyleSheet( url ) {
+ xhr.open("GET", url, false);
+ xhr.send();
+ return (xhr.status==200) ? xhr.responseText : EMPTY_STRING;
+ };
+
+ // --[ resolveUrl() ]---------------------------------------------------
+ // Converts a URL fragment to a fully qualified URL using the specified
+ // context URL. Returns null if same-origin policy is broken
+ function resolveUrl( url, contextUrl, ignoreSameOriginPolicy ) {
+
+ function getProtocol( url ) {
+ return url.substring(0, url.indexOf("//"));
+ };
+
+ function getProtocolAndHost( url ) {
+ return url.substring(0, url.indexOf("/", 8));
+ };
+
+ if (!contextUrl) {
+ contextUrl = baseUrl;
+ }
+
+ // protocol-relative path
+ if (url.substring(0,2)=="//") {
+ url = getProtocol(contextUrl) + url;
+ }
+
+ // absolute path
+ if (/^https?:\/\//i.test(url)) {
+ return !ignoreSameOriginPolicy && getProtocolAndHost(contextUrl) != getProtocolAndHost(url) ? null : url ;
+ }
+
+ // root-relative path
+ if (url.charAt(0)=="/") {
+ return getProtocolAndHost(contextUrl) + url;
+ }
+
+ // relative path
+ var contextUrlPath = contextUrl.split(/[?#]/)[0]; // ignore query string in the contextUrl
+ if (url.charAt(0) != "?" && contextUrlPath.charAt(contextUrlPath.length - 1) != "/") {
+ contextUrlPath = contextUrlPath.substring(0, contextUrlPath.lastIndexOf("/") + 1);
+ }
+
+ return contextUrlPath + url;
+ };
+
+ // --[ parseStyleSheet() ]----------------------------------------------
+ // Downloads the stylesheet specified by the URL, removes it's comments
+ // and recursivly replaces @import rules with their contents, ultimately
+ // returning the full cssText.
+ function parseStyleSheet( url ) {
+ if (url) {
+ return loadStyleSheet(url).replace(RE_COMMENT, EMPTY_STRING).
+ replace(RE_IMPORT, function( match, quoteChar, importUrl, quoteChar2, importUrl2, media ) {
+ var cssText = parseStyleSheet(resolveUrl(importUrl || importUrl2, url));
+ return (media) ? "@media " + media + " {" + cssText + "}" : cssText;
+ }).
+ replace(RE_ASSET_URL, function( match, isBehavior, quoteChar, assetUrl ) {
+ quoteChar = quoteChar || EMPTY_STRING;
+ return isBehavior ? match : " url(" + quoteChar + resolveUrl(assetUrl, url, true) + quoteChar + ") ";
+ });
+ }
+ return EMPTY_STRING;
+ };
+
+ // --[ getStyleSheets() ]-----------------------------------------------
+ function getStyleSheets() {
+ var url, stylesheet;
+ for (var c = 0; c < doc.styleSheets.length; c++) {
+ stylesheet = doc.styleSheets[c];
+ if (stylesheet.href != EMPTY_STRING) {
+ url = resolveUrl(stylesheet.href);
+ if (url) {
+ stylesheet.cssText = stylesheet["rawCssText"] = patchStyleSheet( parseStyleSheet( url ) );
+ }
+ }
+ }
+ };
+
+ // --[ init() ]---------------------------------------------------------
+ function init() {
+ applyPatches();
+
+ // :enabled & :disabled polling script (since we can't hook
+ // onpropertychange event when an element is disabled)
+ if (enabledWatchers.length > 0) {
+ setInterval( function() {
+ for (var c = 0, cl = enabledWatchers.length; c < cl; c++) {
+ var e = enabledWatchers[c];
+ if (e.disabled !== e.$disabled) {
+ if (e.disabled) {
+ e.disabled = false;
+ e.$disabled = true;
+ e.disabled = true;
+ }
+ else {
+ e.$disabled = e.disabled;
+ }
+ }
+ }
+ }, 250)
+ }
+ };
+
+ // Determine the baseUrl and download the stylesheets
+ var baseTags = doc.getElementsByTagName("BASE");
+ var baseUrl = (baseTags.length > 0) ? baseTags[0].href : doc.location.href;
+ getStyleSheets();
+
+ // Bind selectivizr to the ContentLoaded event.
+ ContentLoaded(win, function() {
+ // Determine the "best fit" selector engine
+ for (var engine in selectorEngines) {
+ var members, member, context = win;
+ if (win[engine]) {
+ members = selectorEngines[engine].replace("*", engine).split(".");
+ while ((member = members.shift()) && (context = context[member])) {}
+ if (typeof context == "function") {
+ selectorMethod = context;
+ init();
+ return;
+ }
+ }
+ }
+ });
+
+
+
+ /*!
+ * ContentLoaded.js by Diego Perini, modified for IE<9 only (to save space)
+ *
+ * Author: Diego Perini (diego.perini at gmail.com)
+ * Summary: cross-browser wrapper for DOMContentLoaded
+ * Updated: 20101020
+ * License: MIT
+ * Version: 1.2
+ *
+ * URL:
+ * http://javascript.nwbox.com/ContentLoaded/
+ * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
+ *
+ */
+
+ // @w window reference
+ // @f function reference
+ function ContentLoaded(win, fn) {
+
+ var done = false, top = true,
+ init = function(e) {
+ if (e.type == "readystatechange" && doc.readyState != "complete") return;
+ (e.type == "load" ? win : doc).detachEvent("on" + e.type, init, false);
+ if (!done && (done = true)) fn.call(win, e.type || e);
+ },
+ poll = function() {
+ try { root.doScroll("left"); } catch(e) { setTimeout(poll, 50); return; }
+ init('poll');
+ };
+
+ if (doc.readyState == "complete") fn.call(win, EMPTY_STRING);
+ else {
+ if (doc.createEventObject && root.doScroll) {
+ try { top = !win.frameElement; } catch(e) { }
+ if (top) poll();
+ }
+ addEvent(doc,"readystatechange", init);
+ addEvent(win,"load", init);
+ }
+ };
+})(this);
Please sign in to comment.
Something went wrong with that request. Please try again.