diff --git a/README b/README new file mode 100644 index 0000000..df04cd1 --- /dev/null +++ b/README @@ -0,0 +1,8 @@ +REINDEER STORY +-------------- + + +Reindeer Story is a jQuery demo for the purpose of animation tests. + +Martin Práznovský +Copyright 2011-2013 \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..3914889 --- /dev/null +++ b/css/style.css @@ -0,0 +1,445 @@ +html, body +{ + min-height: 100%; + height: auto !important; + height: 100%; +} +body +{ + font: 100.01% "Trebuchet MS", Trebuchet, Tahoma, Verdana, Arial, sans-serif; + color: #333; + padding: 0; +} +body * +{ + line-height:1.22em; +} +p +{ + margin: 10px 0; + clear: both; +} + +ul, ol +{ + margin-left: 0; +} +ul ul +{ + margin-bottom: 20px; +} +table { + font-size: inherit; + border: 1px solid #c8c8c8; +} + +th { + background: #d8d8d8; + text-align: left; + padding: 5px; + white-space: nowrap; +} + +td { + background: #f8f8f8; + text-align: left; + padding: 5px; + vertical-align: top; +} + +select, input, textarea { + font: 99% "Trebuchet MS", Trebuchet, Tahoma, Verdana, Arial, sans-serif; +} + +pre, code, tt, dt { + font: 100% monospace; + margin: 20px 0; +} + +pre, blockquote { + padding: 15px; + background-color: #f0f0f0; + margin: 20px 0; + -moz-border-radius: 10px; +} + +td pre { + font: 85% monospace; + padding: 5px; + margin: 5px 0; +} + +div.centerStory +{ + margin:0px auto; + width:500px; +} + +.hidden +{ + display:none; +} + + +/* JCarousel ************************************************************/ +.jcarousel-skin-tango .jcarousel-container, +div.nojsBox { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: #000; + border: 1px solid #555; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 480px; + padding: 5px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 480px; + height: 245px; + padding: 5px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 480px; + height: 625px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 480px; + height: 245px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 480px; + height: 625px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 0px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 10px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +.jcarousel-skin-tango ul li{ + position:relative; + top:0px; + left:0px; +} +.jcarousel-skin-tango ul li div.content { + position:absolute; + top:0px; + left:0px; + z-index:2; +} +.jcarousel-skin-tango ul li img { + position:absolute; + top:0px; + left:0px; + z-index:1; +} +.jcarousel-skin-tango ul li div.content div.dialog +{ + position:absolute; + top:0px; + left:0px; + z-index:10; +} +/* *** game Magnifier *** */ +.jcarousel-skin-tango ul li div.content div.magnifier +{ + position:absolute; + top:0px; + left:0px; + z-index:7; +} +.jcarousel-skin-tango ul li div.content div.magnifier img +{ + position:absolute; + top:570px; + left:95px; +} + +/* *** game MAT *** */ +.jcarousel-skin-tango ul li div.content div.gameMat +{ + position:absolute; + top:0px; + left:0px; + z-index:6; +} +.jcarousel-skin-tango ul li div.content div.gameMat img.bg +{ + position:absolute; + top:505px; + left:127px; +} +.jcarousel-skin-tango ul li div.content div.gameMat div.gameMatContent +{ + position:relative; + top:505px; + left:127px; + z-index:6; + width: 225px; + height: 115px; +} +.jcarousel-skin-tango ul li div.content div.gameMat div.gameMatContent span +{ + position:absolute; + z-index:7; + display:block; +} +.jcarousel-skin-tango ul li div.content div.gameMat div.gameMatContent span img.matItem +{ + position:absolute; + top:0px; + left:0px; + z-index:8; + display:none; +} +.jcarousel-skin-tango ul li div#timeCongrats +{ + height:38px; + width:290px; + padding:15px 0 0 0; + text-align:left; + font-family: 'Salsa', serif; + color:#fff; + display:none; + position:absolute; + top:6px; + left:170px; + z-index:3; +} +.jcarousel-skin-tango ul li div#timeCongrats img +{ + display:block; + position:absolute; + left:270px; +} +.jcarousel-skin-tango ul li div#timeCongrats span#timeCongratBlink +{ + display:block; + position:absolute; +} + + + + +/* *** hidden objects *** */ +.jcarousel-skin-tango ul li div.content div.hiddenObjects +{ + position:absolute; + top:0px; + left:0px; + z-index:5; +} +.jcarousel-skin-tango ul li div.content div.hiddenObjects img +{ + display:block; + position:absolute; + z-index:6; +} + + + + + + +.jcarousel-skin-dialog .jcarousel-container { + position:absolute; + top:200px; + left:35px; + z-index:5; + background: transparent; + border: none; +} +.jcarousel-skin-dialog .jcarousel-direction-rtl { + direction: rtl; +} +.jcarousel-skin-dialog .jcarousel-container-horizontal { + width: 415px; + padding: 5px; +} +.jcarousel-skin-dialog .jcarousel-clip { + overflow: hidden; +} +.jcarousel-skin-dialog .jcarousel-clip-horizontal { + width: 415px; + height: 260px; +} +.jcarousel-skin-dialog .jcarousel-item { + width: 415px; + height: 260px; + color: #000; +} +.jcarousel-skin-dialog .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 0px; +} +.jcarousel-skin-dialog .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 0px; + margin-right: 0; +} +.jcarousel-skin-dialog .jcarousel-item-vertical { + margin-bottom: 10px; +} +.jcarousel-skin-dialog .jcarousel-item-placeholder { +} +.jcarousel-skin-dialog ul li { + position:relative; + top:0px; + left:0px; +} +.jcarousel-skin-dialog ul li div.text { + padding: 10px 0px 0px 10px; + position:absolute; + top:0px; + left:0px; + z-index:4; + font-family: 'Salsa', serif; + font-size: 18px; +} +.jcarousel-skin-dialog ul li img.emotion { + position:absolute; + top:0px; + left:0px; + z-index:3; +} + +.jcarousel-skin-dialog ul li a { + position:absolute; + top:0px; + left:0px; + z-index:5; +} + +/* ControllButtons ************************************************************/ +.navBulletControllContainer { + position:relative; + top:0px; + left:0px; + width:100%; + margin:10px 0px; +} + +.navBulletControllContainer .navBulletControllBordered { + display:block; + overflow:hidden; + height: 11px; + margin: 0px auto; + width:100%; +} +.navBulletControllContainer .navBulletControllBordered a { + display:block; + float:left; + margin:0px 2px; + height:11px; + background: url('../images/bullets.png') no-repeat 0px -11px transparent; + width:11px; + background-position: 0px -11px; +} +.navBulletControllContainer .navBulletControllBordered a.current { + background-position: 0px 0px; +} +.navBulletControllContainer .navBulletControllBordered a:hover, +.navBulletControllContainer .navBulletControllBordered a.hover{ + background-position: 0px 0px; +} + +/* Buttons ************************************************************/ +a.greenBtn { + display:block; + overflow:hidden; + width:169px; + height:42px; + position:absolute; + top:0px; + left:0px; + color:#000; + float:left; + text-decoration:none; +} +a.greenBtn img +{ + position:absolute; + top:0px; + left:0px; + z-index:3; +} +a.greenBtn span +{ + display:block; + width:169px; + padding:5px 0px; + text-align:center; + position:absolute; + top:0px; + left:0px; + z-index:4; + font-family: 'Carter One', serif; + font-size: 24px; +} +a.greenBtn:hover img{ + margin:-42px 0px 0px 0px; +} + + +/* -- TIPSY --------------------------------------------------------------- */ +.tipsy { + padding: 5px; + font-size: 16px; + position: absolute; + font-family: 'Salsa', serif; + z-index: 100000; +} +.tipsy-inner { + padding: 5px 8px 4px 8px; + background-color: black; + border:solid black 3px; + color: white; + max-width: 200px; + text-align: center; +} +.tipsy-inner { + border-radius: 3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} +.tipsy-arrow { + position: absolute; + background: url('../images/tipsy.gif') no-repeat top left; + width: 9px; + height: 5px; +} +.tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; } +.tipsy-nw .tipsy-arrow { top: 0; left: 10px; } +.tipsy-ne .tipsy-arrow { top: 0; right: 10px; } +.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; } +.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; } +.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } +.tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } +.tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } \ No newline at end of file diff --git a/images/btnGreenBg.png b/images/btnGreenBg.png new file mode 100644 index 0000000..a34ee43 Binary files /dev/null and b/images/btnGreenBg.png differ diff --git a/images/bullets.png b/images/bullets.png new file mode 100644 index 0000000..2dd3d39 Binary files /dev/null and b/images/bullets.png differ diff --git a/images/dialogBox.png b/images/dialogBox.png new file mode 100644 index 0000000..0c7a642 Binary files /dev/null and b/images/dialogBox.png differ diff --git a/images/gameMat.png b/images/gameMat.png new file mode 100644 index 0000000..51a512e Binary files /dev/null and b/images/gameMat.png differ diff --git a/images/hourglass_medium.png b/images/hourglass_medium.png new file mode 100644 index 0000000..3cba061 Binary files /dev/null and b/images/hourglass_medium.png differ diff --git a/images/hourglass_small.png b/images/hourglass_small.png new file mode 100644 index 0000000..f752c95 Binary files /dev/null and b/images/hourglass_small.png differ diff --git a/images/icon75.jpg b/images/icon75.jpg new file mode 100644 index 0000000..94b9709 Binary files /dev/null and b/images/icon75.jpg differ diff --git a/images/magnifier.png b/images/magnifier.png new file mode 100644 index 0000000..7b162ec Binary files /dev/null and b/images/magnifier.png differ diff --git a/images/nojs.png b/images/nojs.png new file mode 100644 index 0000000..faca46a Binary files /dev/null and b/images/nojs.png differ diff --git a/images/preload_tea.gif b/images/preload_tea.gif new file mode 100644 index 0000000..544b309 Binary files /dev/null and b/images/preload_tea.gif differ diff --git a/images/pulmUpSanta.png b/images/pulmUpSanta.png new file mode 100644 index 0000000..b2b86d1 Binary files /dev/null and b/images/pulmUpSanta.png differ diff --git a/images/screenBirth.jpg b/images/screenBirth.jpg new file mode 100644 index 0000000..36d5859 Binary files /dev/null and b/images/screenBirth.jpg differ diff --git a/images/screenBirth/airplane_alfa40.png b/images/screenBirth/airplane_alfa40.png new file mode 100644 index 0000000..de4046b Binary files /dev/null and b/images/screenBirth/airplane_alfa40.png differ diff --git a/images/screenBirth/airplane_normal.png b/images/screenBirth/airplane_normal.png new file mode 100644 index 0000000..111e5d5 Binary files /dev/null and b/images/screenBirth/airplane_normal.png differ diff --git a/images/screenBirth/airplane_nose_full.png b/images/screenBirth/airplane_nose_full.png new file mode 100644 index 0000000..6c47819 Binary files /dev/null and b/images/screenBirth/airplane_nose_full.png differ diff --git a/images/screenBirth/airplane_nose_hidden.png b/images/screenBirth/airplane_nose_hidden.png new file mode 100644 index 0000000..e2055cd Binary files /dev/null and b/images/screenBirth/airplane_nose_hidden.png differ diff --git a/images/screenBirth/airplane_tail_full.png b/images/screenBirth/airplane_tail_full.png new file mode 100644 index 0000000..7dedc5d Binary files /dev/null and b/images/screenBirth/airplane_tail_full.png differ diff --git a/images/screenBirth/airplane_tail_hidden.png b/images/screenBirth/airplane_tail_hidden.png new file mode 100644 index 0000000..038a0fa Binary files /dev/null and b/images/screenBirth/airplane_tail_hidden.png differ diff --git a/images/screenBirth/airplane_torso_full.png b/images/screenBirth/airplane_torso_full.png new file mode 100644 index 0000000..b447617 Binary files /dev/null and b/images/screenBirth/airplane_torso_full.png differ diff --git a/images/screenBirth/airplane_torso_hidden.png b/images/screenBirth/airplane_torso_hidden.png new file mode 100644 index 0000000..5cce1f9 Binary files /dev/null and b/images/screenBirth/airplane_torso_hidden.png differ diff --git a/images/screenBirth/airplane_wingL_full.png b/images/screenBirth/airplane_wingL_full.png new file mode 100644 index 0000000..b97da1b Binary files /dev/null and b/images/screenBirth/airplane_wingL_full.png differ diff --git a/images/screenBirth/airplane_wingL_hidden.png b/images/screenBirth/airplane_wingL_hidden.png new file mode 100644 index 0000000..685b8ee Binary files /dev/null and b/images/screenBirth/airplane_wingL_hidden.png differ diff --git a/images/screenBirth/airplane_wingR_full.png b/images/screenBirth/airplane_wingR_full.png new file mode 100644 index 0000000..ee7b12b Binary files /dev/null and b/images/screenBirth/airplane_wingR_full.png differ diff --git a/images/screenBirth/airplane_wingR_hidden.png b/images/screenBirth/airplane_wingR_hidden.png new file mode 100644 index 0000000..91b4cba Binary files /dev/null and b/images/screenBirth/airplane_wingR_hidden.png differ diff --git a/images/screenBirth/baby_1.png b/images/screenBirth/baby_1.png new file mode 100644 index 0000000..edfe453 Binary files /dev/null and b/images/screenBirth/baby_1.png differ diff --git a/images/screenBirth/baby_2.png b/images/screenBirth/baby_2.png new file mode 100644 index 0000000..42bd569 Binary files /dev/null and b/images/screenBirth/baby_2.png differ diff --git a/images/screenBirth/baby_3.png b/images/screenBirth/baby_3.png new file mode 100644 index 0000000..d7e91ca Binary files /dev/null and b/images/screenBirth/baby_3.png differ diff --git a/images/screenBirth/baby_4.png b/images/screenBirth/baby_4.png new file mode 100644 index 0000000..b7f3793 Binary files /dev/null and b/images/screenBirth/baby_4.png differ diff --git a/images/screenBirth/baby_5.png b/images/screenBirth/baby_5.png new file mode 100644 index 0000000..b1712ec Binary files /dev/null and b/images/screenBirth/baby_5.png differ diff --git a/images/screenBirth/horsy_alfa40.png b/images/screenBirth/horsy_alfa40.png new file mode 100644 index 0000000..8c10f2f Binary files /dev/null and b/images/screenBirth/horsy_alfa40.png differ diff --git a/images/screenBirth/horsy_feet_full.png b/images/screenBirth/horsy_feet_full.png new file mode 100644 index 0000000..4d0a5b4 Binary files /dev/null and b/images/screenBirth/horsy_feet_full.png differ diff --git a/images/screenBirth/horsy_feet_hidden.png b/images/screenBirth/horsy_feet_hidden.png new file mode 100644 index 0000000..943e405 Binary files /dev/null and b/images/screenBirth/horsy_feet_hidden.png differ diff --git a/images/screenBirth/horsy_head_full.png b/images/screenBirth/horsy_head_full.png new file mode 100644 index 0000000..18b1705 Binary files /dev/null and b/images/screenBirth/horsy_head_full.png differ diff --git a/images/screenBirth/horsy_head_hidden.png b/images/screenBirth/horsy_head_hidden.png new file mode 100644 index 0000000..4d72638 Binary files /dev/null and b/images/screenBirth/horsy_head_hidden.png differ diff --git a/images/screenBirth/horsy_normal.png b/images/screenBirth/horsy_normal.png new file mode 100644 index 0000000..8c1edfc Binary files /dev/null and b/images/screenBirth/horsy_normal.png differ diff --git a/images/screenBirth/horsy_tail_full.png b/images/screenBirth/horsy_tail_full.png new file mode 100644 index 0000000..2c042f5 Binary files /dev/null and b/images/screenBirth/horsy_tail_full.png differ diff --git a/images/screenBirth/horsy_tail_hidden.png b/images/screenBirth/horsy_tail_hidden.png new file mode 100644 index 0000000..836cd6f Binary files /dev/null and b/images/screenBirth/horsy_tail_hidden.png differ diff --git a/images/screenBirth/horsy_torso_full.png b/images/screenBirth/horsy_torso_full.png new file mode 100644 index 0000000..f6ae356 Binary files /dev/null and b/images/screenBirth/horsy_torso_full.png differ diff --git a/images/screenBirth/horsy_torso_hidden.png b/images/screenBirth/horsy_torso_hidden.png new file mode 100644 index 0000000..292ba29 Binary files /dev/null and b/images/screenBirth/horsy_torso_hidden.png differ diff --git a/images/screenIntro.jpg b/images/screenIntro.jpg new file mode 100644 index 0000000..758870f Binary files /dev/null and b/images/screenIntro.jpg differ diff --git a/images/screenOutro.jpg b/images/screenOutro.jpg new file mode 100644 index 0000000..736fb08 Binary files /dev/null and b/images/screenOutro.jpg differ diff --git a/images/screenWork.jpg b/images/screenWork.jpg new file mode 100644 index 0000000..446db01 Binary files /dev/null and b/images/screenWork.jpg differ diff --git a/images/snowflakeBg.png b/images/snowflakeBg.png new file mode 100644 index 0000000..46aef3d Binary files /dev/null and b/images/snowflakeBg.png differ diff --git a/images/snowflakeBg_v2.png b/images/snowflakeBg_v2.png new file mode 100644 index 0000000..1eb9f67 Binary files /dev/null and b/images/snowflakeBg_v2.png differ diff --git a/images/tipsy.gif b/images/tipsy.gif new file mode 100644 index 0000000..74eebae Binary files /dev/null and b/images/tipsy.gif differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..706d594 --- /dev/null +++ b/index.html @@ -0,0 +1,997 @@ + + + + Reindeer Story + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+
+ + + + + + + +
+
+ + + \ No newline at end of file diff --git a/js/jquery-1.4.2.min.js b/js/jquery-1.4.2.min.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/js/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(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,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=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(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.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(R.apply(this,arguments),"slice",R.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};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;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("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};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==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za: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{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);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,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&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);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=== +w)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]||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 Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/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(n){var r=c(this);r.addClass(a.call(this,n,r.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===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).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 j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});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 w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.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:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=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!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.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 w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,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(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.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 fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.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,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 j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.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])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)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"&&"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,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);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,l){return!!k(l[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"===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,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=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 l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.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 j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.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(),a);return this.pushStack(qa(a[0])||qa(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")},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);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.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===w||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!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],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!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},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?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,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}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!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(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/js/jquery.jcarousel.js b/js/jquery.jcarousel.js new file mode 100644 index 0000000..1bbb0bb --- /dev/null +++ b/js/jquery.jcarousel.js @@ -0,0 +1,1057 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +/*global window, jQuery */ +(function($) { + // Default configuration properties. + var defaults = { + vertical: false, + rtl: false, + start: 1, + offset: 1, + size: null, + scroll: 3, + visible: null, + animation: 'normal', + easing: 'swing', + auto: 0, + wrap: null, + initCallback: null, + setupCallback: null, + reloadCallback: null, + itemLoadCallback: null, + itemFirstInCallback: null, + itemFirstOutCallback: null, + itemLastInCallback: null, + itemLastOutCallback: null, + itemVisibleInCallback: null, + itemVisibleOutCallback: null, + animationStepCallback: null, + buttonNextHTML: '
', + buttonPrevHTML: '
', + buttonNextEvent: 'click', + buttonPrevEvent: 'click', + buttonNextCallback: null, + buttonPrevCallback: null, + itemFallbackDimension: null + }, windowLoaded = false; + + $(window).bind('load.jcarousel', function() { windowLoaded = true; }); + + /** + * The jCarousel object. + * + * @constructor + * @class jcarousel + * @param e {HTMLElement} The element to create the carousel for. + * @param o {Object} A set of key/value pairs to set as configuration properties. + * @cat Plugins/jCarousel + */ + $.jcarousel = function(e, o) { + this.options = $.extend({}, defaults, o || {}); + + this.locked = false; + this.autoStopped = false; + + this.container = null; + this.clip = null; + this.list = null; + this.buttonNext = null; + this.buttonPrev = null; + this.buttonNextState = null; + this.buttonPrevState = null; + + // Only set if not explicitly passed as option + if (!o || o.rtl === undefined) { + this.options.rtl = ($(e).attr('dir') || $('html').attr('dir') || '').toLowerCase() == 'rtl'; + } + + this.wh = !this.options.vertical ? 'width' : 'height'; + this.lt = !this.options.vertical ? (this.options.rtl ? 'right' : 'left') : 'top'; + + // Extract skin class + var skin = '', split = e.className.split(' '); + + for (var i = 0; i < split.length; i++) { + if (split[i].indexOf('jcarousel-skin') != -1) { + $(e).removeClass(split[i]); + skin = split[i]; + break; + } + } + + if (e.nodeName.toUpperCase() == 'UL' || e.nodeName.toUpperCase() == 'OL') { + this.list = $(e); + this.clip = this.list.parents('.jcarousel-clip'); + this.container = this.list.parents('.jcarousel-container'); + } else { + this.container = $(e); + this.list = this.container.find('ul,ol').eq(0); + this.clip = this.container.find('.jcarousel-clip'); + } + + if (this.clip.size() === 0) { + this.clip = this.list.wrap('
').parent(); + } + + if (this.container.size() === 0) { + this.container = this.clip.wrap('
').parent(); + } + + if (skin !== '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) { + this.container.wrap('
'); + } + + this.buttonPrev = $('.jcarousel-prev', this.container); + + if (this.buttonPrev.size() === 0 && this.options.buttonPrevHTML !== null) { + this.buttonPrev = $(this.options.buttonPrevHTML).appendTo(this.container); + } + + this.buttonPrev.addClass(this.className('jcarousel-prev')); + + this.buttonNext = $('.jcarousel-next', this.container); + + if (this.buttonNext.size() === 0 && this.options.buttonNextHTML !== null) { + this.buttonNext = $(this.options.buttonNextHTML).appendTo(this.container); + } + + this.buttonNext.addClass(this.className('jcarousel-next')); + + this.clip.addClass(this.className('jcarousel-clip')).css({ + position: 'relative' + }); + + this.list.addClass(this.className('jcarousel-list')).css({ + overflow: 'hidden', + position: 'relative', + top: 0, + margin: 0, + padding: 0 + }).css((this.options.rtl ? 'right' : 'left'), 0); + + this.container.addClass(this.className('jcarousel-container')).css({ + position: 'relative' + }); + + if (!this.options.vertical && this.options.rtl) { + this.container.addClass('jcarousel-direction-rtl').attr('dir', 'rtl'); + } + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var li = this.list.children('li'); + + var self = this; + + if (li.size() > 0) { + var wh = 0, j = this.options.offset; + li.each(function() { + self.format(this, j++); + wh += self.dimension(this, di); + }); + + this.list.css(this.wh, (wh + 100) + 'px'); + + // Only set if not explicitly passed as option + if (!o || o.size === undefined) { + this.options.size = li.size(); + } + } + + // For whatever reason, .show() does not work in Safari... + this.container.css('display', 'block'); + this.buttonNext.css('display', 'block'); + this.buttonPrev.css('display', 'block'); + + this.funcNext = function() { self.next(); }; + this.funcPrev = function() { self.prev(); }; + this.funcResize = function() { + if (self.resizeTimer) { + clearTimeout(self.resizeTimer); + } + + self.resizeTimer = setTimeout(function() { + self.reload(); + }, 100); + }; + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'init'); + } + + if (!windowLoaded && $.browser.safari) { + this.buttons(false, false); + $(window).bind('load.jcarousel', function() { self.setup(); }); + } else { + this.setup(); + } + }; + + // Create shortcut for internal use + var $jc = $.jcarousel; + + $jc.fn = $jc.prototype = { + jcarousel: '0.2.8' + }; + + $jc.fn.extend = $jc.extend = $.extend; + + $jc.fn.extend({ + /** + * Setups the carousel. + * + * @method setup + * @return undefined + */ + setup: function() { + this.first = null; + this.last = null; + this.prevFirst = null; + this.prevLast = null; + this.animating = false; + this.timer = null; + this.resizeTimer = null; + this.tail = null; + this.inTail = false; + + if (this.locked) { + return; + } + + this.list.css(this.lt, this.pos(this.options.offset) + 'px'); + var p = this.pos(this.options.start, true); + this.prevFirst = this.prevLast = null; + this.animate(p, false); + + $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); + + if (this.options.setupCallback !== null) { + this.options.setupCallback(this); + } + }, + + /** + * Clears the list and resets the carousel. + * + * @method reset + * @return undefined + */ + reset: function() { + this.list.empty(); + + this.list.css(this.lt, '0px'); + this.list.css(this.wh, '10px'); + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'reset'); + } + + this.setup(); + }, + + /** + * Reloads the carousel and adjusts positions. + * + * @method reload + * @return undefined + */ + reload: function() { + if (this.tail !== null && this.inTail) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); + } + + this.tail = null; + this.inTail = false; + + if (this.options.reloadCallback !== null) { + this.options.reloadCallback(this); + } + + if (this.options.visible !== null) { + var self = this; + var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; + this.list.children('li').each(function(i) { + wh += self.dimension(this, di); + if (i + 1 < self.first) { + lt = wh; + } + }); + + this.list.css(this.wh, wh + 'px'); + this.list.css(this.lt, -lt + 'px'); + } + + this.scroll(this.first, false); + }, + + /** + * Locks the carousel. + * + * @method lock + * @return undefined + */ + lock: function() { + this.locked = true; + this.buttons(); + }, + + /** + * Unlocks the carousel. + * + * @method unlock + * @return undefined + */ + unlock: function() { + this.locked = false; + this.buttons(); + }, + + /** + * Sets the size of the carousel. + * + * @method size + * @return undefined + * @param s {Number} The size of the carousel. + */ + size: function(s) { + if (s !== undefined) { + this.options.size = s; + if (!this.locked) { + this.buttons(); + } + } + + return this.options.size; + }, + + /** + * Checks whether a list element exists for the given index (or index range). + * + * @method get + * @return bool + * @param i {Number} The index of the (first) element. + * @param i2 {Number} The index of the last element. + */ + has: function(i, i2) { + if (i2 === undefined || !i2) { + i2 = i; + } + + if (this.options.size !== null && i2 > this.options.size) { + i2 = this.options.size; + } + + for (var j = i; j <= i2; j++) { + var e = this.get(j); + if (!e.length || e.hasClass('jcarousel-item-placeholder')) { + return false; + } + } + + return true; + }, + + /** + * Returns a jQuery object with list element for the given index. + * + * @method get + * @return jQuery + * @param i {Number} The index of the element. + */ + get: function(i) { + return $('>.jcarousel-item-' + i, this.list); + }, + + /** + * Adds an element for the given index to the list. + * If the element already exists, it updates the inner html. + * Returns the created element as jQuery object. + * + * @method add + * @return jQuery + * @param i {Number} The index of the element. + * @param s {String} The innerHTML of the element. + */ + add: function(i, s) { + var e = this.get(i), old = 0, n = $(s); + + if (e.length === 0) { + var c, j = $jc.intval(i); + e = this.create(i); + while (true) { + c = this.get(--j); + if (j <= 0 || c.length) { + if (j <= 0) { + this.list.prepend(e); + } else { + c.after(e); + } + break; + } + } + } else { + old = this.dimension(e); + } + + if (n.get(0).nodeName.toUpperCase() == 'LI') { + e.replaceWith(n); + e = n; + } else { + e.empty().append(s); + } + + this.format(e.removeClass(this.className('jcarousel-item-placeholder')), i); + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var wh = this.dimension(e, di) - old; + + if (i > 0 && i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); + } + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); + + return e; + }, + + /** + * Removes an element for the given index from the list. + * + * @method remove + * @return undefined + * @param i {Number} The index of the element. + */ + remove: function(i) { + var e = this.get(i); + + // Check if item exists and is not currently visible + if (!e.length || (i >= this.first && i <= this.last)) { + return; + } + + var d = this.dimension(e); + + if (i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); + } + + e.remove(); + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); + }, + + /** + * Moves the carousel forwards. + * + * @method next + * @return undefined + */ + next: function() { + if (this.tail !== null && !this.inTail) { + this.scrollTail(false); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size !== null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); + } + }, + + /** + * Moves the carousel backwards. + * + * @method prev + * @return undefined + */ + prev: function() { + if (this.tail !== null && this.inTail) { + this.scrollTail(true); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size !== null && this.first == 1) ? this.options.size : this.first - this.options.scroll); + } + }, + + /** + * Scrolls the tail of the carousel. + * + * @method scrollTail + * @return undefined + * @param b {Boolean} Whether scroll the tail back or forward. + */ + scrollTail: function(b) { + if (this.locked || this.animating || !this.tail) { + return; + } + + this.pauseAuto(); + + var pos = $jc.intval(this.list.css(this.lt)); + + pos = !b ? pos - this.tail : pos + this.tail; + this.inTail = !b; + + // Save for callbacks + this.prevFirst = this.first; + this.prevLast = this.last; + + this.animate(pos); + }, + + /** + * Scrolls the carousel to a certain position. + * + * @method scroll + * @return undefined + * @param i {Number} The index of the element to scoll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + scroll: function(i, a) { + if (this.locked || this.animating) { + return; + } + + this.pauseAuto(); + this.animate(this.pos(i), a); + }, + + /** + * Prepares the carousel and return the position for a certian index. + * + * @method pos + * @return {Number} + * @param i {Number} The index of the element to scoll to. + * @param fv {Boolean} Whether to force last item to be visible. + */ + pos: function(i, fv) { + var pos = $jc.intval(this.list.css(this.lt)); + + if (this.locked || this.animating) { + return pos; + } + + if (this.options.wrap != 'circular') { + i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); + } + + var back = this.first > i; + + // Create placeholders, new list width/height + // and new list position + var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; + var c = back ? this.get(f) : this.get(this.last); + var j = back ? f : f - 1; + var e = null, l = 0, p = false, d = 0, g; + + while (back ? --j >= i : ++j < i) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + c[back ? 'before' : 'after' ](e); + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + + if (p) { + l += d; + } + + if (this.first !== null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size === null || j <= this.options.size)))) { + pos = back ? pos + d : pos - d; + } + } + + // Calculate visible items + var clipping = this.clipping(), cache = [], visible = 0, v = 0; + c = this.get(i - 1); + j = i; + + while (++visible) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + // This should only happen on a next scroll + if (c.length === 0) { + this.list.prepend(e); + } else { + c[back ? 'before' : 'after' ](e); + } + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + if (d === 0) { + throw new Error('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); + } + + if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) { + cache.push(e); + } else if (p) { + l += d; + } + + v += d; + + if (v >= clipping) { + break; + } + + j++; + } + + // Remove out-of-range placeholders + for (var x = 0; x < cache.length; x++) { + cache[x].remove(); + } + + // Resize list + if (l > 0) { + this.list.css(this.wh, this.dimension(this.list) + l + 'px'); + + if (back) { + pos -= l; + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); + } + } + + // Calculate first and last item + var last = i + visible - 1; + if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) { + last = this.options.size; + } + + if (j > last) { + visible = 0; + j = last; + v = 0; + while (++visible) { + e = this.get(j--); + if (!e.length) { + break; + } + v += this.dimension(e); + if (v >= clipping) { + break; + } + } + } + + var first = last - visible + 1; + if (this.options.wrap != 'circular' && first < 1) { + first = 1; + } + + if (this.inTail && back) { + pos += this.tail; + this.inTail = false; + } + + this.tail = null; + if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { + var m = $jc.intval(this.get(last).css(!this.options.vertical ? 'marginRight' : 'marginBottom')); + if ((v - m) > clipping) { + this.tail = v - clipping - m; + } + } + + if (fv && i === this.options.size && this.tail) { + pos -= this.tail; + this.inTail = true; + } + + // Adjust position + while (i-- > first) { + pos += this.dimension(this.get(i)); + } + + // Save visible item range + this.prevFirst = this.first; + this.prevLast = this.last; + this.first = first; + this.last = last; + + return pos; + }, + + /** + * Animates the carousel to a certain position. + * + * @method animate + * @return undefined + * @param p {Number} Position to scroll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + animate: function(p, a) { + if (this.locked || this.animating) { + return; + } + + this.animating = true; + + var self = this; + var scrolled = function() { + self.animating = false; + + if (p === 0) { + self.list.css(self.lt, 0); + } + + if (!self.autoStopped && (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size === null || self.last < self.options.size || (self.last == self.options.size && self.tail !== null && !self.inTail))) { + self.startAuto(); + } + + self.buttons(); + self.notify('onAfterAnimation'); + + // This function removes items which are appended automatically for circulation. + // This prevents the list from growing infinitely. + if (self.options.wrap == 'circular' && self.options.size !== null) { + for (var i = self.prevFirst; i <= self.prevLast; i++) { + if (i !== null && !(i >= self.first && i <= self.last) && (i < 1 || i > self.options.size)) { + self.remove(i); + } + } + } + }; + + this.notify('onBeforeAnimation'); + + // Animate + if (!this.options.animation || a === false) { + this.list.css(this.lt, p + 'px'); + scrolled(); + } else { + var o = !this.options.vertical ? (this.options.rtl ? {'right': p} : {'left': p}) : {'top': p}; + // Define animation settings. + var settings = { + duration: this.options.animation, + easing: this.options.easing, + complete: scrolled + }; + // If we have a step callback, specify it as well. + if ($.isFunction(this.options.animationStepCallback)) { + settings.step = this.options.animationStepCallback; + } + // Start the animation. + this.list.animate(o, settings); + } + }, + + /** + * Starts autoscrolling. + * + * @method auto + * @return undefined + * @param s {Number} Seconds to periodically autoscroll the content. + */ + startAuto: function(s) { + if (s !== undefined) { + this.options.auto = s; + } + + if (this.options.auto === 0) { + return this.stopAuto(); + } + + if (this.timer !== null) { + return; + } + + this.autoStopped = false; + + var self = this; + this.timer = window.setTimeout(function() { self.next(); }, this.options.auto * 1000); + }, + + /** + * Stops autoscrolling. + * + * @method stopAuto + * @return undefined + */ + stopAuto: function() { + this.pauseAuto(); + this.autoStopped = true; + }, + + /** + * Pauses autoscrolling. + * + * @method pauseAuto + * @return undefined + */ + pauseAuto: function() { + if (this.timer === null) { + return; + } + + window.clearTimeout(this.timer); + this.timer = null; + }, + + /** + * Sets the states of the prev/next buttons. + * + * @method buttons + * @return undefined + */ + buttons: function(n, p) { + if (n == null) { + n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size === null || this.last < this.options.size); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size !== null && this.last >= this.options.size) { + n = this.tail !== null && !this.inTail; + } + } + + if (p == null) { + p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size !== null && this.first == 1) { + p = this.tail !== null && this.inTail; + } + } + + var self = this; + + if (this.buttonNext.size() > 0) { + this.buttonNext.unbind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + + if (n) { + this.buttonNext.bind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + } + + this.buttonNext[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); + + if (this.options.buttonNextCallback !== null && this.buttonNext.data('jcarouselstate') != n) { + this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }).data('jcarouselstate', n); + } + } else { + if (this.options.buttonNextCallback !== null && this.buttonNextState != n) { + this.options.buttonNextCallback(self, null, n); + } + } + + if (this.buttonPrev.size() > 0) { + this.buttonPrev.unbind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + + if (p) { + this.buttonPrev.bind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + } + + this.buttonPrev[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); + + if (this.options.buttonPrevCallback !== null && this.buttonPrev.data('jcarouselstate') != p) { + this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }).data('jcarouselstate', p); + } + } else { + if (this.options.buttonPrevCallback !== null && this.buttonPrevState != p) { + this.options.buttonPrevCallback(self, null, p); + } + } + + this.buttonNextState = n; + this.buttonPrevState = p; + }, + + /** + * Notify callback of a specified event. + * + * @method notify + * @return undefined + * @param evt {String} The event name + */ + notify: function(evt) { + var state = this.prevFirst === null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); + + // Load items + this.callback('itemLoadCallback', evt, state); + + if (this.prevFirst !== this.first) { + this.callback('itemFirstInCallback', evt, state, this.first); + this.callback('itemFirstOutCallback', evt, state, this.prevFirst); + } + + if (this.prevLast !== this.last) { + this.callback('itemLastInCallback', evt, state, this.last); + this.callback('itemLastOutCallback', evt, state, this.prevLast); + } + + this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); + this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); + }, + + callback: function(cb, evt, state, i1, i2, i3, i4) { + if (this.options[cb] == null || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) { + return; + } + + var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; + + if (!$.isFunction(callback)) { + return; + } + + var self = this; + + if (i1 === undefined) { + callback(self, state, evt); + } else if (i2 === undefined) { + this.get(i1).each(function() { callback(self, this, i1, state, evt); }); + } else { + var call = function(i) { + self.get(i).each(function() { callback(self, this, i, state, evt); }); + }; + for (var i = i1; i <= i2; i++) { + if (i !== null && !(i >= i3 && i <= i4)) { + call(i); + } + } + } + }, + + create: function(i) { + return this.format('
  • ', i); + }, + + format: function(e, i) { + e = $(e); + var split = e.get(0).className.split(' '); + for (var j = 0; j < split.length; j++) { + if (split[j].indexOf('jcarousel-') != -1) { + e.removeClass(split[j]); + } + } + e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ + 'float': (this.options.rtl ? 'right' : 'left'), + 'list-style': 'none' + }).attr('jcarouselindex', i); + return e; + }, + + className: function(c) { + return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); + }, + + dimension: function(e, d) { + var el = $(e); + + if (d == null) { + return !this.options.vertical ? + (el.outerWidth(true) || $jc.intval(this.options.itemFallbackDimension)) : + (el.outerHeight(true) || $jc.intval(this.options.itemFallbackDimension)); + } else { + var w = !this.options.vertical ? + d - $jc.intval(el.css('marginLeft')) - $jc.intval(el.css('marginRight')) : + d - $jc.intval(el.css('marginTop')) - $jc.intval(el.css('marginBottom')); + + $(el).css(this.wh, w + 'px'); + + return this.dimension(el); + } + }, + + clipping: function() { + return !this.options.vertical ? + this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : + this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); + }, + + index: function(i, s) { + if (s == null) { + s = this.options.size; + } + + return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; + } + }); + + $jc.extend({ + /** + * Gets/Sets the global default configuration properties. + * + * @method defaults + * @return {Object} + * @param d {Object} A set of key/value pairs to set as configuration properties. + */ + defaults: function(d) { + return $.extend(defaults, d || {}); + }, + + intval: function(v) { + v = parseInt(v, 10); + return isNaN(v) ? 0 : v; + }, + + windowLoaded: function() { + windowLoaded = true; + } + }); + + /** + * Creates a carousel for all matched elements. + * + * @example $("#mycarousel").jcarousel(); + * @before
    • First item
    • Second item
    + * @result + * + *
    + *
    + *
    + *
      + *
    • First item
    • + *
    • Second item
    • + *
    + *
    + *
    + *
    + *
    + *
    + * + * @method jcarousel + * @return jQuery + * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. + */ + $.fn.jcarousel = function(o) { + if (typeof o == 'string') { + var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); + return instance[o].apply(instance, args); + } else { + return this.each(function() { + var instance = $(this).data('jcarousel'); + if (instance) { + if (o) { + $.extend(instance.options, o); + } + instance.reload(); + } else { + $(this).data('jcarousel', new $jc(this, o)); + } + }); + } + }; + +})(jQuery); diff --git a/js/jquery.jcarousel.min.js b/js/jquery.jcarousel.min.js new file mode 100644 index 0000000..5d9a91e --- /dev/null +++ b/js/jquery.jcarousel.min.js @@ -0,0 +1,16 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"
    ",buttonPrevHTML:"
    ",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f").parent();if(this.container.size()===0)this.container=this.clip.wrap("
    ").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('
    ');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a=this.first&&a<=this.last)){var b=this.dimension(c);athis.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++ethis.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst=j&&k<=e)&&a(k)}}},create:function(a){return this.format("
  • ",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d').html('
    '); + } + return this.$tip; + }, + + validate: function() { + if (!this.$element[0].parentNode) { + this.hide(); + this.$element = null; + this.options = null; + } + }, + + enable: function() { this.enabled = true; }, + disable: function() { this.enabled = false; }, + toggleEnabled: function() { this.enabled = !this.enabled; } + }; + + $.fn.tipsy = function(options) { + + if (options === true) { + return this.data('tipsy'); + } else if (typeof options == 'string') { + return this.data('tipsy')[options](); + } + + options = $.extend({}, $.fn.tipsy.defaults, options); + + function get(ele) { + var tipsy = $.data(ele, 'tipsy'); + if (!tipsy) { + tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); + $.data(ele, 'tipsy', tipsy); + } + return tipsy; + } + + function enter() { + var tipsy = get(this); + tipsy.hoverState = 'in'; + if (options.delayIn == 0) { + tipsy.show(); + } else { + setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); + } + }; + + function leave() { + var tipsy = get(this); + tipsy.hoverState = 'out'; + if (options.delayOut == 0) { + tipsy.hide(); + } else { + setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); + } + }; + + if (!options.live) this.each(function() { get(this); }); + + if (options.trigger != 'manual') { + var binder = options.live ? 'live' : 'bind', + eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', + eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; + this[binder](eventIn, enter)[binder](eventOut, leave); + } + + return this; + + }; + + $.fn.tipsy.defaults = { + delayIn: 0, + delayOut: 0, + fade: false, + fallback: '', + gravity: 'n', + html: false, + live: false, + offset: 0, + opacity: 0.8, + title: 'title', + trigger: 'hover' + }; + + // Overwrite this method to provide options on a per-element basis. + // For example, you could store the gravity in a 'tipsy-gravity' attribute: + // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); + // (remember - do not modify 'options' in place!) + $.fn.tipsy.elementOptions = function(ele, options) { + return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; + }; + + $.fn.tipsy.autoNS = function() { + return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; + }; + + $.fn.tipsy.autoWE = function() { + return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; + }; + +})(jQuery); diff --git a/sounds/fanfare.mp3 b/sounds/fanfare.mp3 new file mode 100644 index 0000000..0286d62 Binary files /dev/null and b/sounds/fanfare.mp3 differ diff --git a/sounds/fanfare.ogg b/sounds/fanfare.ogg new file mode 100644 index 0000000..536372d Binary files /dev/null and b/sounds/fanfare.ogg differ diff --git a/sounds/grab.mp3 b/sounds/grab.mp3 new file mode 100644 index 0000000..e760aa1 Binary files /dev/null and b/sounds/grab.mp3 differ diff --git a/sounds/grab.ogg b/sounds/grab.ogg new file mode 100644 index 0000000..c0fe23f Binary files /dev/null and b/sounds/grab.ogg differ diff --git a/sounds/spark.mp3 b/sounds/spark.mp3 new file mode 100644 index 0000000..d15c71d Binary files /dev/null and b/sounds/spark.mp3 differ diff --git a/sounds/spark.ogg b/sounds/spark.ogg new file mode 100644 index 0000000..8beb989 Binary files /dev/null and b/sounds/spark.ogg differ