├── .repo-rt ├── images ├── bg-button.png ├── bg-form.png ├── bg-slider.png ├── bg-continuum.png ├── bg-button-hover.png ├── bg-slider-handle.png ├── bg-slider-range.png └── bg-slider-handle-hover.png ├── css ├── basic.css └── enhanced.css ├── README.md ├── js ├── example.js ├── jQuery.peSlider.js ├── enhance.js └── jquery.min.js ├── license.txt ├── index.html └── enhance.js /.repo-rt: -------------------------------------------------------------------------------- 1 | RETIRED 2 | -------------------------------------------------------------------------------- /images/bg-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-button.png -------------------------------------------------------------------------------- /images/bg-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-form.png -------------------------------------------------------------------------------- /images/bg-slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-slider.png -------------------------------------------------------------------------------- /images/bg-continuum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-continuum.png -------------------------------------------------------------------------------- /images/bg-button-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-button-hover.png -------------------------------------------------------------------------------- /images/bg-slider-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-slider-handle.png -------------------------------------------------------------------------------- /images/bg-slider-range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-slider-range.png -------------------------------------------------------------------------------- /images/bg-slider-handle-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filamentgroup/jQuery-Slider/HEAD/images/bg-slider-handle-hover.png -------------------------------------------------------------------------------- /css/basic.css: -------------------------------------------------------------------------------- 1 | /* Page styles */ 2 | body, input { font-family: "Segoe UI", Arial, sans-serif; } 3 | legend { font-weight: bold; } 4 | /* Logo */ 5 | .header { 6 | background: #247201 url(http://filamentgroup.com/images/headerbg-new.jpg) no-repeat bottom left; 7 | } 8 | #fg-logo { 9 | text-indent: -9999px; 10 | margin: 0 auto; 11 | width: 287px; 12 | height: 52px; 13 | background-image: url(http://filamentgroup.com/images/fg-logo-icon.png); 14 | } 15 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5){ 16 | #fg-logo { 17 | background-size: 287px 52px; 18 | background-image: url(http://filamentgroup.com/images/fg-logo-icon-lrg.png); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :warning: This project is archived and the repository is no longer maintained. 2 | 3 | # Code Examples from the book [Designing with Progressive Enhancement](http://filamentgroup.com/dwpe) 4 | 5 | [![Filament Group](http://filamentgroup.com/images/fg-logo-positive-sm-crop.png) ](http://www.filamentgroup.com/) 6 | 7 | This repository includes open-sourced code developed and maintained by Filament Group, Inc. as part of the book "Designing With Progressive Enhancement" (Peachpit). 8 | 9 | All examples use the [jQuery JavaScript library](http://jquery.com). 10 | 11 | These code examples use the [EnhanceJS framework](https://github.com/filamentgroup/EnhanceJS) for applying progressive enhancement based on browser capabilities testing. 12 | -------------------------------------------------------------------------------- /js/example.js: -------------------------------------------------------------------------------- 1 | // Run the script on DOM ready: 2 | $(function(){ 3 | 4 | //create input sliders 5 | $('input#price').peSlider({range: 'min'}); 6 | $('input#bedrooms,input#baths').peSlider({range: 'min'}); 7 | 8 | //create select sliders 9 | $('select') 10 | .attr('aria-hidden','true') 11 | .after('') 12 | .peSlider({ 13 | slide:function(e,ui){ 14 | $(this).next().next().text( $(this).find('a:eq(0)').attr('aria-valuetext') ); 15 | } 16 | }) 17 | .each(function(){ 18 | $(this).next().text( $(this).prev().find('a:eq(0)').attr('aria-valuetext') ); 19 | }); 20 | 21 | //add select labels 22 | $('') 23 | .insertAfter('#amenities legend'); 24 | 25 | }); 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010 Filament Group, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /css/enhanced.css: -------------------------------------------------------------------------------- 1 | /* Page styles */ 2 | body { font-size:62.5%; } 3 | form { margin:20px 0; padding:3em 20px; border:2px solid #aaa; background:#fafafa; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; width:630px; } 4 | fieldset { border:0; margin:1em 0 0; border-top:1px dotted #aaa; } 5 | legend { font-size:2em; padding:0; margin:0; color:#222; } 6 | legend span { position:relative; top:-.1em; left:-10px; background:#fafafa; padding-right:10px; } 7 | label { font-size:1.6em; margin-right:15px; float:left; clear:left; width:130px; text-align:right; } 8 | .question { overflow:auto; padding:1.4em 0; } 9 | .slider-status { float:left; font-weight:bold; font-size:1.5em; color:#444; } 10 | input#price,input#bedrooms,input#baths { float:left; font-size:1.3em; font-weight:bold; width:55px; border:1px solid #ccc; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; padding:.2em; } 11 | input#search { background:#666 url(../images/bg-button.png) 50% repeat-x; color:#fff; padding:.4em 1.3em; border:2px solid #444; font-size:1.7em; font-weight:bold; -moz-border-radius:1.3em; -webkit-border-radius:1.3em; border-radius:1.3em; cursor:pointer; margin:1em 0 0 150px; width: 200px; } 12 | input#search:hover { background-image:url(../images/bg-button-hover.png); } 13 | #subway,#water,#walking { display: none;} 14 | 15 | /* slider styles */ 16 | .ui-slider { position:relative; top:.8em; width:293px; float:left; margin-right:15px; text-align:left; height:1em; background:#ebebec url(../images/bg-slider.png) top repeat-x; border:1px solid #aaa; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; } 17 | .ui-slider .ui-slider-handle { position:absolute; z-index:2; width:1.6em; height:1.6em; top:-.5em; margin-left:-.8em; cursor:pointer; border:2px solid #444; background:#fff url(../images/bg-slider-handle.png) 50% repeat-x; -moz-border-radius:.9em; -webkit-border-radius:.9em; border-radius:.9em; } 18 | .ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus { background-image:url(../images/bg-slider-handle-hover.png); } 19 | .ui-slider .ui-slider-handle:active { background-image:none; } 20 | .ui-slider .ui-slider-range { position:absolute; z-index:1; font-size:.7em; display:block; border:0; top:0; height:100%; background:#999 url(../images/bg-slider-range.png) 50% repeat-x; left:0; } 21 | 22 | /*slider label key*/ 23 | .sliders-labels { height:2em; margin-left:145px; width:293px; background:url(../images/bg-continuum.png) bottom left no-repeat; padding-top:1em; } 24 | .sliders-labels span.label-first { float:left; } 25 | .sliders-labels span.label-last { float:right; } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Slider from input 6 | 7 | 8 | 22 | 23 | 24 | 25 |
26 |

Filament Group

27 |
28 | 29 |
30 |
31 | Apartment Criteria 32 | 33 |
34 | 35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 | 49 |
50 | Amenity Preferences 51 | 52 |
53 | 54 | 60 |
61 | 62 |
63 | 64 | 70 |
71 | 72 |
73 | 74 | 80 |
81 |
82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /js/jQuery.peSlider.js: -------------------------------------------------------------------------------- 1 | /** 2 | * -------------------------------------------------------------------- 3 | * jQuery peSlider plugin 4 | * Author: Scott Jehl, scott@filamentgroup.com 5 | * Copyright (c) 2009 Filament Group 6 | * licensed under MIT (filamentgroup.com/examples/mit-license.txt) 7 | * -------------------------------------------------------------------- 8 | */ 9 | $.fn.peSlider = function(settings){ 10 | 11 | //configurable options (none so far) 12 | var o = $.extend({},settings); 13 | 14 | if( !$('body').is('[role]') ){ $('body').attr('role','application'); } 15 | 16 | return $(this).each(function(){ 17 | var thisLabel = $('label[for=' + $(this).attr('id') + ']').attr('id', $(this).attr('id') + '-label').attr('id'); 18 | var thisUnits = $(this).attr('data-units') || ''; 19 | var slider = $('
'); 20 | 21 | if( $(this).is('input') ){ 22 | var input = $(this); 23 | var thisUnits = input.attr('data-units'); 24 | var friendlyVal = input.val() + ' ' + thisUnits; 25 | var sliderOptions = $.extend(o,{ 26 | min: parseFloat(input.attr('min')), 27 | max: parseFloat(input.attr('max')), 28 | value: parseFloat(input.val()) 29 | }); 30 | 31 | slider 32 | .insertBefore(input) 33 | .slider(sliderOptions) 34 | .bind('slide', function(e, ui){ 35 | input.val(ui.value); 36 | friendlyVal = input.val() + ' ' + thisUnits; 37 | slider.find('a').attr({ 38 | 'aria-valuenow': ui.value, 39 | 'aria-valuetext': friendlyVal, 40 | 'title': friendlyVal 41 | }); 42 | }) 43 | .find('a') 44 | .attr({ 45 | 'role': 'slider', 46 | 'aria-valuemin': input.attr('min'), 47 | 'aria-valuemax': input.attr('max'), 48 | 'aria-valuenow': input.val(), 49 | 'aria-valuetext': friendlyVal, 50 | 'title': friendlyVal, 51 | 'aria-labelledby': thisLabel 52 | }); 53 | 54 | input 55 | .keyup(function(){ 56 | var inVal = parseFloat(input.val()); 57 | if( !isNaN(inVal) ){ 58 | slider.slider('value', inVal); 59 | input.val(slider.slider('value')); 60 | } 61 | }) 62 | .blur(function(){ 63 | var inVal = parseFloat(input.val()); 64 | if( isNaN(inVal) ){ 65 | input.val(0); 66 | } 67 | }); 68 | 69 | if( !settings.step ){ 70 | var step = Math.round( parseFloat(input.attr('max')) / slider.width()); 71 | if(step > 1){ slider.slider('option','step',step); } 72 | } 73 | 74 | } 75 | else { 76 | var select = $(this); 77 | var friendlyVal = select.find('option').eq( select[0].selectedIndex ).text() + ' ' + thisUnits; 78 | var sliderOptions = $.extend(o,{ 79 | min: 0, 80 | max: select.find('option').length-1, 81 | value: select[0].selectedIndex 82 | }); 83 | 84 | slider 85 | .insertBefore(select) 86 | .slider(sliderOptions) 87 | .bind('slide', function(e, ui){ 88 | select[0].selectedIndex = ui.value; 89 | friendlyVal = select.find('option').eq( select[0].selectedIndex ).text() + ' ' + thisUnits; 90 | slider.find('a').attr({ 91 | 'aria-valuenow': ui.value, 92 | 'aria-valuetext': friendlyVal, 93 | 'title': friendlyVal 94 | }); 95 | }) 96 | .find('a') 97 | .attr({ 98 | 'role': 'slider', 99 | 'aria-valuemin': 0, 100 | 'aria-valuemax': select.find('option').length-1, 101 | 'aria-valuenow': select[0].selectedIndex, 102 | 'aria-valuetext': friendlyVal, 103 | 'title': friendlyVal, 104 | 'aria-labelledby': thisLabel 105 | }); 106 | 107 | select.bind('keyup change', function(){ 108 | slider.slider('value', select[0].selectedIndex); 109 | }); 110 | } 111 | 112 | 113 | }); 114 | }; 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /enhance.js: -------------------------------------------------------------------------------- 1 | /* 2 | * enhance.js - Test-Driven Progressive Enhancement 3 | * Authored by Scott Jehl, Filament Group (filamentgroup.com) 4 | * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses. 5 | * Version 1.0 6 | */ 7 | 8 | var enhance = function(settings){ 9 | var that = this; 10 | that.settings = { 11 | testName: 'enhanced', 12 | loadScripts: [], 13 | loadStyles: [], 14 | queueLoading: true, 15 | appendToggleLink: true, 16 | forcePassText: 'View High-bandwidth version', 17 | forceFailText: 'View Low-bandwidth version', 18 | tests: { 19 | getById: function(){ 20 | return document.getElementById ? true : false; 21 | }, 22 | getByTagName: function(){ 23 | return document.getElementsByTagName ? true : false; 24 | }, 25 | createEl: function(){ 26 | return document.createElement ? true : false; 27 | }, 28 | boxmodel: function(){ 29 | var newDiv = document.createElement('div'); 30 | document.body.appendChild(newDiv); 31 | newDiv.style.width = '1px'; 32 | newDiv.style.padding = '1px'; 33 | var divWidth = newDiv.offsetWidth; 34 | document.body.removeChild(newDiv); 35 | return divWidth == 3; 36 | }, 37 | position: function(){ 38 | var newDiv = document.createElement('div'); 39 | document.body.appendChild(newDiv); 40 | newDiv.style.position = 'absolute'; 41 | newDiv.style.left = '10px'; 42 | var divLeft = newDiv.offsetLeft; 43 | document.body.removeChild(newDiv); 44 | return divLeft == 10; 45 | }, 46 | float: function(){ 47 | var newDiv = document.createElement('div'); 48 | document.body.appendChild(newDiv); 49 | newDiv.innerHTML = '
'; 50 | var divTopA = newDiv.childNodes[0].offsetTop; 51 | var divTopB = newDiv.childNodes[1].offsetTop; 52 | document.body.removeChild(newDiv); 53 | return divTopA == divTopB; 54 | }, 55 | clear: function(){ 56 | var newDiv = document.createElement('div'); 57 | document.body.appendChild(newDiv); 58 | newDiv.style.visibility = 'hidden'; 59 | newDiv.innerHTML = ''; 60 | var liTopA = newDiv.getElementsByTagName('li')[0].offsetTop; 61 | var liTopB = newDiv.getElementsByTagName('li')[1].offsetTop; 62 | document.body.removeChild(newDiv); 63 | return liTopA != liTopB; 64 | }, 65 | overflow: function(){ 66 | var newDiv = document.createElement('div'); 67 | document.body.appendChild(newDiv); 68 | newDiv.innerHTML = '
'; 69 | var divHeight = newDiv.offsetHeight; 70 | document.body.removeChild(newDiv); 71 | return divHeight == 10; 72 | }, 73 | ajax: function(){ 74 | //factory test borrowed from quirksmode.org 75 | var XMLHttpFactories = [ 76 | function () {return new XMLHttpRequest()}, 77 | function () {return new ActiveXObject("Msxml2.XMLHTTP")}, 78 | function () {return new ActiveXObject("Msxml3.XMLHTTP")}, 79 | function () {return new ActiveXObject("Microsoft.XMLHTTP")} 80 | ]; 81 | var xmlhttp = false; 82 | for (var k=0;k0){ 202 | for(var name in settings.loadStyles){ 203 | var s = document.createElement('link'); 204 | if(typeof(settings.loadStyles[name]) == 'object'){ 205 | s.setAttribute('href', settings.loadStyles[name]['url']); 206 | s.setAttribute('media', settings.loadStyles[name]['media']); 207 | } 208 | else { 209 | s.setAttribute('href', settings.loadStyles[name]); 210 | } 211 | s.setAttribute('type', 'text/css'); 212 | s.setAttribute('rel', 'stylesheet'); 213 | h.appendChild(s); 214 | } 215 | } 216 | //append scripts 217 | if(settings.loadScripts.length>0){ 218 | var jsQueue = (settings.queueLoading) ? [] : null; 219 | for(var name in settings.loadScripts){ 220 | var s = document.createElement('script'); 221 | s.setAttribute('src', settings.loadScripts[name]); 222 | s.setAttribute('type', 'text/javascript'); 223 | if(jsQueue == null){ h.appendChild(s); } 224 | else{ jsQueue[name] = s; } 225 | } 226 | //if queue 227 | var i = 0; 228 | //script and style queue 229 | function loadFromQueue(){ 230 | if(jsQueue[i]){ 231 | h.appendChild(jsQueue[i]); 232 | //var event = (jsQueue.onreadystatechange) ? 'onreadystatechange' : 'onload'; 233 | jsQueue[i].onreadystatechange = jsQueue[i].onload = function(){ loadFromQueue(i); } 234 | i++; 235 | } 236 | } 237 | if(jsQueue!=null){ loadFromQueue(); } 238 | } 239 | }; 240 | 241 | /*cookie functions from quirksmode.org*/ 242 | that._createCookie = function(name,value,days) { 243 | if (days) { 244 | var date = new Date(); 245 | date.setTime(date.getTime()+(days*24*60*60*1000)); 246 | var expires = "; expires="+date.toGMTString(); 247 | } 248 | else var expires = ""; 249 | document.cookie = name+"="+value+expires+"; path=/"; 250 | }; 251 | that._readCookie = function(name) { 252 | var nameEQ = name + "="; 253 | var ca = document.cookie.split(';'); 254 | for(var i=0;i < ca.length;i++) { 255 | var c = ca[i]; 256 | while (c.charAt(0)==' ') c = c.substring(1,c.length); 257 | if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 258 | } 259 | return null; 260 | }; 261 | that._eraseCookie = function(name) { 262 | that._createCookie(name,"",-1); 263 | }; 264 | 265 | that._runtests(); 266 | return that; 267 | }; -------------------------------------------------------------------------------- /js/enhance.js: -------------------------------------------------------------------------------- 1 | /* 2 | * enhance.js - Test-Driven Progressive Enhancement 3 | * Authored by Scott Jehl, Filament Group (filamentgroup.com) 4 | * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses. 5 | * Version 1.0 6 | */ 7 | 8 | var enhance = function(settings){ 9 | var that = this; 10 | that.settings = { 11 | testName: 'enhanced', 12 | loadScripts: [], 13 | loadStyles: [], 14 | queueLoading: true, 15 | appendToggleLink: true, 16 | forcePassText: 'View High-bandwidth version', 17 | forceFailText: 'View Low-bandwidth version', 18 | tests: { 19 | getById: function(){ 20 | return document.getElementById ? true : false; 21 | }, 22 | getByTagName: function(){ 23 | return document.getElementsByTagName ? true : false; 24 | }, 25 | createEl: function(){ 26 | return document.createElement ? true : false; 27 | }, 28 | boxmodel: function(){ 29 | var newDiv = document.createElement('div'); 30 | document.body.appendChild(newDiv); 31 | newDiv.style.width = '1px'; 32 | newDiv.style.padding = '1px'; 33 | var divWidth = newDiv.offsetWidth; 34 | document.body.removeChild(newDiv); 35 | return divWidth == 3; 36 | }, 37 | position: function(){ 38 | var newDiv = document.createElement('div'); 39 | document.body.appendChild(newDiv); 40 | newDiv.style.position = 'absolute'; 41 | newDiv.style.left = '10px'; 42 | var divLeft = newDiv.offsetLeft; 43 | document.body.removeChild(newDiv); 44 | return divLeft == 10; 45 | }, 46 | float: function(){ 47 | var newDiv = document.createElement('div'); 48 | document.body.appendChild(newDiv); 49 | newDiv.innerHTML = '
'; 50 | var divTopA = newDiv.childNodes[0].offsetTop; 51 | var divTopB = newDiv.childNodes[1].offsetTop; 52 | document.body.removeChild(newDiv); 53 | return divTopA == divTopB; 54 | }, 55 | clear: function(){ 56 | var newDiv = document.createElement('div'); 57 | document.body.appendChild(newDiv); 58 | newDiv.style.visibility = 'hidden'; 59 | newDiv.innerHTML = ''; 60 | var liTopA = newDiv.getElementsByTagName('li')[0].offsetTop; 61 | var liTopB = newDiv.getElementsByTagName('li')[1].offsetTop; 62 | document.body.removeChild(newDiv); 63 | return liTopA != liTopB; 64 | }, 65 | overflow: function(){ 66 | var newDiv = document.createElement('div'); 67 | document.body.appendChild(newDiv); 68 | newDiv.innerHTML = '
'; 69 | var divHeight = newDiv.offsetHeight; 70 | document.body.removeChild(newDiv); 71 | return divHeight == 10; 72 | }, 73 | ajax: function(){ 74 | //factory test borrowed from quirksmode.org 75 | var XMLHttpFactories = [ 76 | function () {return new XMLHttpRequest()}, 77 | function () {return new ActiveXObject("Msxml2.XMLHTTP")}, 78 | function () {return new ActiveXObject("Msxml3.XMLHTTP")}, 79 | function () {return new ActiveXObject("Microsoft.XMLHTTP")} 80 | ]; 81 | var xmlhttp = false; 82 | for (var k=0;k0){ 202 | for(var name in settings.loadStyles){ 203 | var s = document.createElement('link'); 204 | if(typeof(settings.loadStyles[name]) == 'object'){ 205 | s.setAttribute('href', settings.loadStyles[name]['url']); 206 | s.setAttribute('media', settings.loadStyles[name]['media']); 207 | } 208 | else { 209 | s.setAttribute('href', settings.loadStyles[name]); 210 | } 211 | s.setAttribute('type', 'text/css'); 212 | s.setAttribute('rel', 'stylesheet'); 213 | h.appendChild(s); 214 | } 215 | } 216 | //append scripts 217 | if(settings.loadScripts.length>0){ 218 | var jsQueue = (settings.queueLoading) ? [] : null; 219 | for(var name in settings.loadScripts){ 220 | var s = document.createElement('script'); 221 | s.setAttribute('src', settings.loadScripts[name]); 222 | s.setAttribute('type', 'text/javascript'); 223 | if(jsQueue == null){ h.appendChild(s); } 224 | else{ jsQueue[name] = s; } 225 | } 226 | //if queue 227 | var i = 0; 228 | //script and style queue 229 | function loadFromQueue(){ 230 | if(jsQueue[i]){ 231 | h.appendChild(jsQueue[i]); 232 | //var event = (jsQueue.onreadystatechange) ? 'onreadystatechange' : 'onload'; 233 | jsQueue[i].onreadystatechange = jsQueue[i].onload = function(){ loadFromQueue(i); } 234 | i++; 235 | } 236 | } 237 | if(jsQueue!=null){ loadFromQueue(); } 238 | } 239 | }; 240 | 241 | /*cookie functions from quirksmode.org*/ 242 | that._createCookie = function(name,value,days) { 243 | if (days) { 244 | var date = new Date(); 245 | date.setTime(date.getTime()+(days*24*60*60*1000)); 246 | var expires = "; expires="+date.toGMTString(); 247 | } 248 | else var expires = ""; 249 | document.cookie = name+"="+value+expires+"; path=/"; 250 | }; 251 | that._readCookie = function(name) { 252 | var nameEQ = name + "="; 253 | var ca = document.cookie.split(';'); 254 | for(var i=0;i < ca.length;i++) { 255 | var c = ca[i]; 256 | while (c.charAt(0)==' ') c = c.substring(1,c.length); 257 | if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 258 | } 259 | return null; 260 | }; 261 | that._eraseCookie = function(name) { 262 | that._createCookie(name,"",-1); 263 | }; 264 | 265 | that._runtests(); 266 | return that; 267 | }; -------------------------------------------------------------------------------- /js/jquery.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.4.1 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2010, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2010, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Mon Jan 25 19:43:33 2010 -0500 15 | */ 16 | (function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, 18 | a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, 21 | va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], 22 | [f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, 23 | this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, 24 | a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(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(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; 25 | c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= 34 | {leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; 35 | b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); 36 | c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= 37 | {"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, 38 | {},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, 39 | a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); 40 | return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| 41 | a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= 42 | c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| 45 | {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); 47 | f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= 48 | ""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= 49 | function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, 50 | d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ 51 | s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, 52 | "events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, 53 | b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, 54 | d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), 55 | fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| 56 | d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= 57 | 0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; 58 | c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= 59 | a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== 60 | "form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, 61 | "keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| 62 | d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= 63 | a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, 64 | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, 65 | b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| 70 | typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= 71 | l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& 72 | y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& 79 | "2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); 80 | return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== 81 | g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== 82 | 0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= 84 | 0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? 85 | k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; 86 | try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); 89 | return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", 90 | 2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== 91 | 0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], 92 | l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e 95 | -1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), 96 | a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, 97 | nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): 98 | e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== 99 | b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"], 100 | col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, 101 | wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? 102 | d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, 103 | false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& 104 | !c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/