/*

 jQuery Templates Plugin
 http://github.com/jquery/jquery-tmpl

 Copyright Software Freedom Conservancy, Inc.
 Dual licensed under the MIT or GPL Version 2 licenses.
 http://jquery.org/license
 Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 Licensed under the MIT License (LICENSE.txt).

 Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 Thanks to: Seamus Leahy for adding deltaX and deltaY

 Version: 3.0.4

 Requires: 1.2.2+
*/
(function(c){c.browser.msie&&parseInt(c.browser.version)<9&&(c(document).ready(function(){c("body").addClass("wk-ie wk-ie"+parseInt(c.browser.version))}),c.each(["abbr","article","aside","audio","canvas","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],function(){document.createElement(this)}))})(jQuery);
(function(c){var i=document.createElement("div"),i=i.style,h=c.support,b="-webkit- -moz- -o- -ms- -khtml-".split(" "),e="Webkit Moz O ms Khtml".split(" "),r="";"Property Duration TimingFunction".split(" ");h.transition=!1;for(var g=0;g<e.length;g++)if(i[e[g]+"Transition"]===""){h.transition=e[g]+"Transition";r=b[g];break}i=null;c.fn.css3animate=function(b,e,g,i,q){q=q||0;if(!h.transition){var x=this;setTimeout(function(){x.animate(b,e,g,i)},q);return this}var s=[],n,t=r+"transition";for(n in b)s.push(n);
return this.each(function(){var g=c(this);if(c.isFunction(i))g.one("webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd",i);g.css(t,"all "+(e!==void 0?e:500)+"ms ease-in "+q+"ms").css("top");g.css(b).css("top")})}})(jQuery);
(function(c){function i(a,f,j,d){d={data:d||(f?f.data:{}),_wrap:f?f._wrap:null,tmpl:null,parent:f||null,nodes:[],calls:p,nest:B,wrap:C,html:q,update:x};a&&c.extend(d,a,{nodes:[],parent:f});if(j)d.tmpl=j,d._ctnt=d._ctnt||d.tmpl(c,d),d.key=++u,(y.length?v:l)[u]=d;return d}function h(a,f,j){var d,j=j?c.map(j,function(c){return typeof c==="string"?a.key?c.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+n+'="'+a.key+'" $2'):c:h(c,a,c._ctnt)}):a;if(f)return j;j=j.join("");j.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(a,f,j,g){d=c(j).get();z(d);f&&(d=b(f).concat(d));g&&(d=d.concat(b(g)))});return d?d:b(j)}function b(a){var f=document.createElement("div");f.innerHTML=a;return c.makeArray(f.childNodes)}function e(a){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+c.trim(a).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(a,j,d,b,k,m,e){a=c.tmpl.tag[d];if(!a)throw"Template command not found: "+d;d=a._default||[];m&&!/\w$/.test(k)&&(k+=m,m="");k?(k=g(k),e=e?","+g(e)+")":m?")":"",e=m?k.indexOf(".")>-1?k+m:"("+k+").call($item"+e:k,m=m?e:"(typeof("+k+")==='function'?("+k+").call($item):("+k+"))"):m=e=d.$1||"null";b=g(b);return"');"+a[j?"close":"open"].split("$notnull_1").join(k?"typeof("+k+")!=='undefined' && ("+k+")!=null":"true").split("$1a").join(m).split("$1").join(e).split("$2").join(b?b.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,
function(a,c,f,d){return(d=d?","+d+")":f?")":"")?"("+c+").call($item"+d:a}):d.$2||"")+"_.push('"})+"');}return _;")}function r(a,f){a._wrap=h(a,!0,c.isArray(f)?f:[t.test(f)?f:c(f).html()]).join("")}function g(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function z(a){function f(a){function d(a){var m;a+=j;m=k[a]=k[a]||i(e,l[e.parent.key+j]||e.parent,null,!0),e=m}var f,b=a,e,g;if(g=a.getAttribute(n)){for(;b.parentNode&&(b=b.parentNode).nodeType===1&&!(f=b.getAttribute(n)););if(f!==
g){b=b.parentNode?b.nodeType===11?0:b.getAttribute(n)||0:0;if(!(e=l[g]))e=v[g],e=i(e,l[b]||v[b],null,!0),e.key=++u,l[u]=e;o&&d(g)}a.removeAttribute(n)}else if(o&&(e=c.data(a,"tmplItem")))d(e.key),l[e.key]=e,b=(b=c.data(a.parentNode,"tmplItem"))?b.key:0;if(e){for(f=e;f&&f.key!=b;)f.nodes.push(a),f=f.parent;delete e._ctnt;delete e._wrap;c.data(a,"tmplItem",e)}}var j="_"+o,d,b,k={},e,g,h;e=0;for(g=a.length;e<g;e++)if((d=a[e]).nodeType===1){b=d.getElementsByTagName("*");for(h=b.length-1;h>=0;h--)f(b[h]);
f(d)}}function p(a,c,b,d){if(!a)return y.pop();y.push({_:a,tmpl:c,item:this,data:b,options:d})}function B(a,f,b){return c.tmpl(c.template(a),f,b,this)}function C(a,f){var b=a.options||{};b.wrapped=f;return c.tmpl(c.template(a.tmpl),a.data,b,a.item)}function q(a,f){var b=this._wrap;return c.map(c(c.isArray(b)?b.join(""):b).filter(a||"*"),function(a){if(f)a=a.innerText||a.textContent;else{var c;if(!(c=a.outerHTML))c=document.createElement("div"),c.appendChild(a.cloneNode(!0)),c=c.innerHTML;a=c}return a})}
function x(){var a=this.nodes;c.tmpl(null,null,null,this).insertBefore(a[0]);c(a).remove()}var s=c.fn.domManip,n="_tmplitem",t=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,l={},v={},w,A={key:0,data:{}},u=0,o=0,y=[];c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,f){c.fn[a]=function(b){var d=[],b=c(b),e,g,h;e=this.length===1&&this[0].parentNode;w=l||{};if(e&&e.nodeType===11&&e.childNodes.length===1&&b.length===1)b[f](this[0]),d=this;
else{g=0;for(h=b.length;g<h;g++)o=g,e=(g>0?this.clone(!0):this).get(),c.fn[f].apply(c(b[g]),e),d=d.concat(e);o=0;d=this.pushStack(d,a,b.selector)}b=w;w=null;c.tmpl.complete(b);return d}});c.fn.extend({tmpl:function(a,f,b){return c.tmpl(this[0],a,f,b)},tmplItem:function(){return c.tmplItem(this[0])},template:function(a){return c.template(a,this[0])},domManip:function(a,f,b){if(a[0]&&a[0].nodeType){for(var d=c.makeArray(arguments),e=a.length,g=0,h;g<e&&!(h=c.data(a[g++],"tmplItem")););e>1&&(d[0]=[c.makeArray(a)]);
h&&o&&(d[2]=function(a){c.tmpl.afterManip(this,a,b)});s.apply(this,d)}else s.apply(this,arguments);o=0;w||c.tmpl.complete(l);return this}});c.extend({tmpl:function(a,f,b,d){var e=!d;if(e)d=A,a=c.template[a]||c.template(null,a),v={};else if(!a)return a=d.tmpl,l[d.key]=d,d.nodes=[],d.wrapped&&r(d,d.wrapped),c(h(d,null,d.tmpl(c,d)));if(!a)return[];typeof f==="function"&&(f=f.call(d||{}));b&&b.wrapped&&r(b,b.wrapped);f=c.isArray(f)?c.map(f,function(c){return c?i(b,d,a,c):null}):[i(b,d,a,f)];return e?
c(h(d,null,f)):f},tmplItem:function(a){var b;for(a instanceof c&&(a=a[0]);a&&a.nodeType===1&&!(b=c.data(a,"tmplItem"))&&(a=a.parentNode););return b||A},template:function(a,b){if(b)return typeof b==="string"?b=e(b):b instanceof c&&(b=b[0]||{}),b.nodeType&&(b=c.data(b,"tmpl")||c.data(b,"tmpl",e(b.innerHTML))),typeof a==="string"?c.template[a]=b:b;return a?typeof a!=="string"?c.template(null,a):c.template[a]||c.template(null,t.test(a)?a:c(a)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});
c.extend(c.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},
open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){l={}},afterManip:function(a,b,e){var d=b.nodeType===11?c.makeArray(b.childNodes):b.nodeType===1?[b]:[];e.call(a,b);z(d);o++}})})(jQuery);
(function(c){function i(b){var e=b||window.event,h=[].slice.call(arguments,1),g=0,i=0,p=0,b=c.event.fix(e);b.type="mousewheel";b.wheelDelta&&(g=b.wheelDelta/120);b.detail&&(g=-b.detail/3);p=g;e.axis!==void 0&&e.axis===e.HORIZONTAL_AXIS&&(p=0,i=-1*g);e.wheelDeltaY!==void 0&&(p=e.wheelDeltaY/120);e.wheelDeltaX!==void 0&&(i=-1*e.wheelDeltaX/120);h.unshift(b,g,i,p);return c.event.handle.apply(this,h)}var h=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var b=
h.length;b;)this.addEventListener(h[--b],i,!1);else this.onmousewheel=i},teardown:function(){if(this.removeEventListener)for(var b=h.length;b;)this.removeEventListener(h[--b],i,!1);else this.onmousewheel=null}};c.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);

