KodExplorer/static/js/lib/jquery-lib.js

99 lines
76 KiB
JavaScript
Raw Normal View History

2014-04-01 18:00:42 +00:00
/**
* jQuery JSON plugin 2.4.0
* https://code.google.com/p/jquery-json/
*/
(function($){var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==="object"&&JSON.stringify?JSON.stringify:function(o){if(o===null){return"null"}var pairs,k,name,val,type=$.type(o);if(type==="undefined"){return undefined}if(type==="number"||type==="boolean"){return String(o)}if(type==="string"){return $.quoteString(o)}if(typeof o.toJSON==="function"){return $.toJSON(o.toJSON())}if(type==="date"){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month="0"+month}if(day<10){day="0"+day}if(hours<10){hours="0"+hours}if(minutes<10){minutes="0"+minutes}if(seconds<10){seconds="0"+seconds}if(milli<100){milli="0"+milli}if(milli<10){milli="0"+milli}return'"'+year+"-"+month+"-"+day+"T"+hours+":"+minutes+":"+seconds+"."+milli+'Z"'}pairs=[];if($.isArray(o)){for(k=0;k<o.length;k++){pairs.push($.toJSON(o[k])||"null")}return"["+pairs.join(",")+"]"}if(typeof o==="object"){for(k in o){if(hasOwn.call(o,k)){type=typeof k;if(type==="number"){name='"'+k+'"'}else{if(type==="string"){name=$.quoteString(k)}else{continue}}type=typeof o[k];if(type!=="function"&&type!=="undefined"){val=$.toJSON(o[k]);pairs.push(name+":"+val)}}}return"{"+pairs.join(",")+"}"}};$.evalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){return eval("("+str+")")};$.secureEvalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+str+")")}throw new SyntaxError("Error parsing JSON, source is not valid.")};$.quoteString=function(str){if(str.match(escape)){return'"'+str.replace(escape,function(a){var c=meta[a];if(typeof c==="string"){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+str+'"'}}(jQuery));
//简写
var json_encode = $.toJSON;
var json_decode = $.evalJSON;
/**2.4
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
* t: current time, b: begInnIng value, c: change In value, d: duration
*/
jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g);},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a;},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a;},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a;}return -h/2*((--f)*(f-2)-1)+a;},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a;},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a;},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a;}return h/2*((f-=2)*f*f+2)+a;},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a;},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a;},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a;}return -h/2*((f-=2)*f*f*f-2)+a;},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a;},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a;},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a;}return h/2*((f-=2)*f*f*f*f+2)+a;},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a;},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a;},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a;},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a;},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a;},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a;}if(f==g){return a+h;}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a;}return h/2*(-Math.pow(2,-10*--f)+2)+a;},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a;},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a;},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a;}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a;},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k)==1){return e+l;}if(!j){j=k*0.3;}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e;},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k)==1){return e+l;}if(!j){j=k*0.3;}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e;},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k/2)==2){return e+l;}if(!j){j=k*(0.3*1.5);}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e;}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e;},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}return i*(f/=h)*f*((g+1)*f-g)+a;},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a;},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a;},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a;},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a;}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a;}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a;}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a;}});
/**
* 快捷键 mousetrap v1.4.6
* http://craig.is/killing/mice
*/
(function(J,r,f){function s(a,b,d){a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent("on"+b,d)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return h[a.which]?h[a.which]:B[a.which]?B[a.which]:String.fromCharCode(a.which).toLowerCase()}function t(a){a=a||{};var b=!1,d;for(d in n)a[d]?b=!0:n[d]=0;b||(u=!1)}function C(a,b,d,c,e,v){var g,k,f=[],h=d.type;if(!l[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(g=0;g<l[a].length;++g)if(k=l[a][g],!(!c&&k.seq&&n[k.seq]!=k.level||h!=k.action||("keypress"!=h||d.metaKey||d.ctrlKey)&&b.sort().join(",")!==k.modifiers.sort().join(","))){var m=c&&k.seq==c&&k.level==v;(!c&&k.combo==e||m)&&l[a].splice(g,1);f.push(k)}return f}function K(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a,b,d,c){m.stopCallback(b,b.target||b.srcElement,d,c)||!1!==a(b,d)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function y(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=A(a);b&&("keyup"==a.type&&z===b?z=!1:m.handleKey(b,K(a),a))}function w(a){return"shift"==a||"ctrl"==a||"alt"==a||"meta"==a}function L(a,b,d,c){function e(b){return function(){u=b;++n[a];clearTimeout(D);D=setTimeout(t,1E3)}}function v(b){x(d,b,a);"keyup"!==c&&(z=A(b));setTimeout(t,10)}for(var g=n[a]=0;g<b.length;++g){var f=g+1===b.length?v:e(c||E(b[g+1]).action);F(b[g],f,c,a,g)}}function E(a,b){var d,c,e,f=[];d="+"===a?["+"]:a.split("+");for(e=0;e<d.length;++e)c=d[e],G[c]&&(c=G[c]),b&&"keypress"!=b&&H[c]&&(c=H[c],f.push("shift")),w(c)&&f.push(c);d=c;e=b;if(!e){if(!p){p={};for(var g in h)95<g&&112>g||h.hasOwnProperty(g)&&(p[h[g]]=g)}e=p[d]?"keydown":"keypress"}"keypress"==e&&f.length&&(e="keydown");return{key:c,modifiers:f,action:e}}function F(a,b,d,c,e){q[a+":"+d]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1<f.length?L(a,f,b,d):(d=E(a,d),l[d.key]=l[d.key]||[],C(d.key,d.modifiers,{type:d.action},c,a,e),l[d.key][c?"unshift":"push"]({callback:b,modifiers:d.modifiers,action:d.action,seq:c,level:e,combo:a}))}var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},B={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},H={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},G={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p,l={},q={},n={},D,z=!1,I=!1,u=!1;for(f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;s(r,"keypress",y);s(r,"keydown",y);s(r,"keyup",y);var m={bind:function(a,b,d){a=a instanceof Array?a:[a];for(var c=0;c<a.length;++c)F(a[c],b,d);return this},unbind:function(a,b){return m.bind(a,function(){},b)},trigger:function(a,b){if(q[a+":"+b])q[a+":"+b]({},a);return this},reset:function(){l={};q={};return this},stopCallback:function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable},handleKey:function(a,b,d){var c=C(a,b,d),e;b={};var f=0,g=!1;for(e=0;e<c.length;++e)c[e].seq&&(f=Math.max(f,c[e].level));for(e=0;e<c.length;++e)c[e].seq?c[e].level==f&&(g=!0,b[c[e].seq]=1,x(c[e].callback,d,c[e].combo,c[e].seq)):g||x(c[e].callback,d,c[e].combo);c="keypress"==d.type&&I;d.type!=u||w(a)||c||t(b);I=g&&"keydown"==d.type}};J.Mousetrap=m;"function"===typeof define&&define.amd&&define(m)})(window,document);
/*! Lazy Load 1.9.3 -
* MIT license - Copyright 2010-2013 Mika Tuupola
* https://github.com/tuupola/jquery_lazyload
*/
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
/*
* CMP embed JavaScript
* http://bbs.cenfun.com/
* 2, var htm = CMP.create(id, width, height, swf_url, flashvars, params, attrs);
* 3, var cmpo = CMP.get(id);
* 4, CMP.remove(id/cmpo);
*/
(function(a){typeof a.CMP=="undefined"&&(a.CMP=function(){var b=/msie/.test(navigator.userAgent.toLowerCase()),c=function(a,b){if(b&&typeof b=="object")for(var c in b)a[c]=b[c];return a},d=function(a,d,e,f,g,h,i){i=c({width:d,height:e,id:a},i),h=c({allowfullscreen:"true",allowscriptaccess:"always"},h);var j,k,l=[];if(g){j=g;if(typeof g=="object"){for(var m in g)l.push(m+"="+encodeURIComponent(g[m]));j=l.join("&")}h.flashvars=j}k="<object ",k+=b?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ':'type="application/x-shockwave-flash" data="'+f+'" ';for(var m in i)k+=m+'="'+i[m]+'" ';k+=b?'><param name="movie" value="'+f+'" />':">";for(m in h)k+='<param name="'+m+'" value="'+h[m]+'" />';return k+="</object>",k},e=function(c){var d=document.getElementById(c);if(!d||d.nodeName.toLowerCase()!="object")d=b?a[c]:document[c];return d},f=function(a){if(a){for(var b in a)typeof a[b]=="function"&&(a[b]=null);a.parentNode.removeChild(a)}},g=function(a){if(a){var c=typeof a=="string"?e(a):a;if(c&&c.nodeName.toLowerCase()=="object")return b?(c.style.display="none",function(){c.readyState==4?f(c):setTimeout(arguments.callee,15)}()):c.parentNode.removeChild(c),!0}return!1};return{create:function(){return d.apply(this,arguments)},write:function(){var a=d.apply(this,arguments);return document.write(a),a},get:function(a){return e(a)},remove:function(a){return g(a)}}}());var b=function(b){b=b||a.event;var c=b.target||b.srcElement;if(c&&typeof c.cmp_version=="function"){var d=c.skin("list.tree","maxVerticalScrollPosition");if(d>0)return c.focus(),b.preventDefault&&b.preventDefault(),!1}};a.addEventListener&&a.addEventListener("DOMMouseScroll",b,!1),a.onmousewheel=document.onmousewheel=b})(window);
/*
* jQuery UI Position v1.10.0
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://api.jqueryui.com/position/
*/
(function(E,C){E.ui=E.ui||{};var H,J=Math.max,I=Math.abs,G=Math.round,N=/left|center|right/,D=/top|center|bottom/,O=/[\+\-]\d+%?/,B=/^\w+/,M=/%$/,A=E.fn.position;function L(R,Q,P){return[parseInt(R[0],10)*(M.test(R[0])?Q/100:1),parseInt(R[1],10)*(M.test(R[1])?P/100:1)]}function F(Q,P){return parseInt(E.css(Q,P),10)||0}function K(P){var Q=P[0];if(Q.nodeType===9){return{width:P.width(),height:P.height(),offset:{top:0,left:0}}}if(E.isWindow(Q)){return{width:P.width(),height:P.height(),offset:{top:P.scrollTop(),left:P.scrollLeft()}}}if(Q.preventDefault){return{width:0,height:0,offset:{top:Q.pageY,left:Q.pageX}}}return{width:P.outerWidth(),height:P.outerHeight(),offset:P.offset()}}E.position={scrollbarWidth:function(){if(H!==C){return H}var S,R,Q=E("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),P=Q.children()[0];E("body").append(Q);S=P.offsetWidth;Q.css("overflow","scroll");R=P.offsetWidth;if(S===R){R=Q[0].clientWidth}Q.remove();return(H=S-R)},getScrollInfo:function(P){var R=P.isWindow?"":P.element.css("overflow-x"),Q=P.isWindow?"":P.element.css("overflow-y"),T=R==="scroll"||(R==="auto"&&P.width<P.element[0].scrollWidth),S=Q==="scroll"||(Q==="auto"&&P.height<P.element[0].scrollHeight);return{width:T?E.position.scrollbarWidth():0,height:S?E.position.scrollbarWidth():0}},getWithinInfo:function(R){var Q=E(R||window),P=E.isWindow(Q[0]);return{element:Q,isWindow:P,offset:Q.offset()||{left:0,top:0},scrollLeft:Q.scrollLeft(),scrollTop:Q.scrollTop(),width:P?Q.width():Q.outerWidth(),height:P?Q.height():Q.outerHeight()}}};E.fn.position=function(P){if(!P||!P.of){return A.apply(this,arguments)}P=E.extend({},P);var V,Q,X,S,R,Y,Z=E(P.of),a=E.position.getWithinInfo(P.within),W=E.position.getScrollInfo(a),U=(P.collision||"flip").split(" "),T={};Y=K(Z);if(Z[0].preventDefault){P.at="left top"}Q=Y.width;X=Y.height;S=Y.offset;R=E.extend({},S);E.each(["my","at"],function(){var c=(P[this]||"").split(" "),b,d;if(c.length===1){c=N.test(c[0])?c.concat(["center"]):D.test(c[0])?["center"].concat(c):["center","center"]}c[0]=N.test(c[0])?c[0]:"center";c[1]=D.test(c[1])?c[1]:"center";b=O.exec(c[0]);d=O.exec(c[1]);T[this]=[b?b[0]:0,d?d[0]:0];P[this]=[B.exec(c[0])[0],B.exec(c[1])[0]]});if(U.length===1){U[1]=U[0]}if(P.at[0]==="right"){R.left+=Q}else{if(P.at[0]==="center"){R.left+=Q/2}}if(P.at[1]==="bottom"){R.top+=X}else{if(P.at[1]==="center"){R.top+=X/2}}V=L(T.at,Q,X);R.left+=V[0];R.top+=V[1];return this.each(function(){var l,d,k=E(this),h=k.outerWidth(),g=k.outerHeight(),j=F(this,"marginLeft"),f=F(this,"marginTop"),b=h+j+F(this,"marginRight")+W.width,i=g+f+F(this,"marginBottom")+W.height,c=E.extend({},R),e=L(T.my,k.outerWidth(),k.outerHeight());if(P.my[0]==="right"){c.left-=h}else{if(P.my[0]==="center"){c.left-=h/2}}if(P.my[1]==="bottom"){c.top-=g}else{if(P.my[1]==="center"){c.top-=g/2}}c.left+=e[0];c.top+=e[1];if(!E.support.offsetFractions){c.left=G(c.left);c.top=G(c.top)}l={marginLeft:j,marginTop:f};E.each(["left","top"],function(n,m){if(E.ui.position[U[n]]){E.ui.position[U[n]][m](c,{targetWidth:Q,targetHeight:X,elemWidth:h,elemHeight:g,collisionPosition:l,collisionWidth:b,collisionHeight:i,offset:[V[0]+e[0],V[1]+e[1]],my:P.my,at:P.at,within:a,elem:k})}});if(P.using){d=function(m){var p=S.left-c.left,n=p+Q-h,q=S.top-c.top,r=q+X-g,o={target:{element:Z,left:S.left,top:S.top,width:Q,height:X},element:{element:k,left:c.left,top:c.top,width:h,height:g},horizontal:n<0?"left":p>0?"right":"center",vertical:r<0?"top":q>0?"bottom":"middle"};if(Q<h&&I(p+n)<Q){o.horizontal="center"}if(X<g&&I(q+r)<X){o.vertical="middle"}if(J(I(p),I(n))>J(I(q),I(r))){o.important="horizontal"}else{o.important="vertical"}P.using.call(this,m,o)}}k.offset(E.extend(c,{using:d}))})};E.ui.position={fit:{left:function(P,R){var Q=R.within,T=Q.isWindow?Q.scrollLeft:Q.offset.left,U=Q.width,V=P.left-R.collisionPosition.marginLeft,X=T-V,W=V+R.collisionWidth-U-T,S;if(R.collisionWidth>U){if(X>0&&W<=0){S=P.left+X+R.collisionWidth-U-T;P.left+=X-S}else{if(W>0&&X<=0){P.left=T}else{if(X>W){P.left=T+U-R.collisionWidth}else{P.left=T
/**
* 全屏插件
* http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/
*/
(function(){var d={supportsFullScreen:false,isFullScreen:function(){return false;},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},c="webkit moz o ms khtml".split(" ");if(typeof document.cancelFullScreen!="undefined"){d.supportsFullScreen=true;}else{for(var b=0,a=c.length;b<a;b++){d.prefix=c[b];if(typeof document[d.prefix+"CancelFullScreen"]!="undefined"){d.supportsFullScreen=true;break;}}}if(d.supportsFullScreen){d.fullScreenEventName=d.prefix+"fullscreenchange";d.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;default:return document[this.prefix+"FullScreen"];}};d.requestFullScreen=function(e){return(this.prefix==="")?e.requestFullScreen():e[this.prefix+"RequestFullScreen"]();};d.cancelFullScreen=function(e){return(this.prefix==="")?document.cancelFullScreen():document[this.prefix+"CancelFullScreen"]();};}if(typeof jQuery!="undefined"){jQuery.fn.requestFullScreen=function(){return this.each(function(){if(d.supportsFullScreen){d.requestFullScreen(this);}});};}window.fullScreenApi=d;})();
/**
* artTemplate - Template Engine
* https://github.com/aui/artTemplate
*/
!function(e){"use strict";var n=function(e,r){return n["string"==typeof r?"compile":"render"].apply(n,arguments)};n.version="2.0.4",n.openTag="<%",n.closeTag="%>",n.isEscape=!0,n.isCompress=!1,n.parser=null,n.render=function(e,r){var t=n.get(e)||a({id:e,name:"Render Error",message:"No Template"});return t(r)},n.compile=function(e,t){function o(r){try{return new l(r,e)+""}catch(i){return s?a(i)():n.compile(e,t,!0)(r)}}var c=arguments,s=c[2],u="anonymous";"string"!=typeof t&&(s=c[1],t=c[0],e=u);try{var l=i(e,t,s)}catch(p){return p.id=e||t,p.name="Syntax Error",a(p)}return o.prototype=l.prototype,o.toString=function(){return l.toString()},e!==u&&(r[e]=o),o};var r=n.cache={},t=n.helpers=function(){var e=function(n,r){return"string"!=typeof n&&(r=typeof n,"number"===r?n+="":n="function"===r?e(n.call(n)):""),n},r={"<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","&":"&#38;"},t=function(n){return e(n).replace(/&(?![\w#]+;)|[<>"']/g,function(e){return r[e]})},a=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},i=function(e,n){if(a(e))for(var r=0,t=e.length;t>r;r++)n.call(e,e[r],r,e);else for(r in e)n.call(e,e[r],r)};return{$include:n.render,$string:e,$escape:t,$each:i}}();n.helper=function(e,n){t[e]=n},n.onerror=function(n){var r="Template Error\n\n";for(var t in n)r+="<"+t+">\n"+n[t]+"\n\n";e.console&&console.error(r)},n.get=function(t){var a;if(r.hasOwnProperty(t))a=r[t];else if("document"in e){var i=document.getElementById(t);if(i){var o=i.value||i.innerHTML;a=n.compile(t,o.replace(/^\s*|\s*$/g,""))}}return a};var a=function(e){return n.onerror(e),function(){return"{Template Error}"}},i=function(){var e=t.$each,r="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",a=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,i=/[^\w$]+/g,o=new RegExp(["\\b"+r.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),c=/^\d[^,]*|,\d[^,]*/g,s=/^,+|,+$/g,u=function(e){return e.replace(a,"").replace(i,",").replace(o,"").replace(c,"").replace(s,"").split(/^$|,+/)};return function(r,a,i){function o(e){return m+=e.split(/\n/).length-1,n.isCompress&&(e=e.replace(/[\n\r\t\s]+/g," ").replace(/<!--.*?-->/g,"")),e&&(e=x[1]+p(e)+x[2]+"\n"),e}function c(e){var r=m;if($?e=$(e):i&&(e=e.replace(/\n/g,function(){return m++,"$line="+m+";"})),0===e.indexOf("=")){var a=!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),a&&n.isEscape){var o=e.replace(/\s*\([^\)]+\)/,"");t.hasOwnProperty(o)||/^(include|print)$/.test(o)||(e="$escape("+e+")")}else e="$string("+e+")";e=x[1]+e+x[2]}return i&&(e="$line="+r+";"+e),s(e),e+"\n"}function s(n){n=u(n),e(n,function(e){e&&!v.hasOwnProperty(e)&&(l(e),v[e]=!0)})}function l(e){var n;"print"===e?n=k:"include"===e?(y.$include=t.$include,n=E):(n="$data."+e,t.hasOwnProperty(e)&&(y[e]=t[e],n=0===e.indexOf("$")?"$helpers."+e:n+"===undefined?$helpers."+e+":"+n)),w+=e+"="+n+","}function p(e){return"'"+e.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}var f=n.openTag,d=n.closeTag,$=n.parser,g=a,h="",m=1,v={$data:1,$id:1,$helpers:1,$out:1,$line:1},y={},w="var $helpers=this,"+(i?"$line=0,":""),b="".trim,x=b?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],T=b?"$out+=$text;return $text;":"$out.push($text);",k="function($text){"+T+"}",E="function(id,data){data=data||$data;var $text=$helpers.$include(id,data,$id);"+T+"}";e(g.split(f),function(e){e=e.split(d);var n=e[0],r=e[1];1===e.length?h+=o(n):(h+=c(n),r&&(h+=o(r)))}),g=h,i&&(g="try{"+g+"}catch(e){"+"throw {"+"id:$id,"+"name:'Render Error',"+"message:e.message,"+"line:$line,"+"source:"+p(a)+".split(/\\n/)[$line-1].replace(/^[\\s\\t]+/,'')"+"};"+"}"),g=w+x[0]+g+"return new String("+x[
/**
* SWFObject v2.2
* http://code.google.com/p/swfobject/
* swfobject.embedSWF("test.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf");
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae
/* PDFObject, copyright (C) 2008 Philip Hutchison (pipwerks.com). Documentation and examples are at www.pdfobject.com. Version 1.2, April 2011. MIT style license */
var PDFObject=function(y){if(!y||!y.url){return false;}var w="1.2",b=y.id||false,i=y.width||"100%",z=y.height||"100%",r=y.pdfOpenParams,a,x;var v=function(){var c=null;if(window.ActiveXObject){c=new ActiveXObject("AcroPDF.PDF");if(!c){c=new ActiveXObject("PDF.PdfCtrl");}if(c!==null){return true;}}return false;};var u=function(){var c,f=navigator.plugins,d=f.length,e=/Adobe Reader|Adobe PDF|Acrobat/gi;for(c=0;c<d;c++){if(e.test(f[c].name)){return true;}}return false;};var t=function(){var c=navigator.mimeTypes["application/pdf"];return(c&&c.enabledPlugin);};var s=function(){var c=null;if(u()||v()){c="Adobe";}else{if(t()){c="generic";}}return c;};var q=function(){var e=document.getElementsByTagName("html");if(!e){return false;}var c=e[0].style,d=document.body.style;c.height="100%";c.overflow="hidden";d.margin="0";d.padding="0";d.height="100%";d.overflow="hidden";};var p=function(d){var c="",e;if(!d){return c;}for(e in d){if(d.hasOwnProperty(e)){c+=e+"=";if(e==="search"){c+=encodeURI(d[e]);}else{c+=d[e];}c+="&";}}return c.slice(0,c.length-1);};var o=function(d){var c=null;switch(d){case"url":c=a;break;case"id":c=b;break;case"width":c=i;break;case"height":c=z;break;case"pdfOpenParams":c=r;break;case"pluginTypeFound":c=x;break;case"pdfobjectversion":c=w;break;}return c;};var n=function(d){if(!x){return false;}var c=null;if(d){c=(d.nodeType&&d.nodeType===1)?d:document.getElementById(d);if(!c){return false;}}else{c=document.body;q();i="100%";z="100%";}c.innerHTML='<object data="'+a+'" type="application/pdf" width="'+i+'" height="'+z+'"></object>';return c.getElementsByTagName("object")[0];};a=encodeURI(y.url)+"#"+p(r);x=s();this.get=function(c){return o(c);};this.embed=function(c){return n(c);};return this;};
/* Touchy : a jQuery plugin for managing touch events
* version: 1.1
* https://github.com/HotStudio/touchy
*/
(function(g){g.touchyOptions={useDelegation:!1,longpress:{preventDefault:{start:!0,move:!0,end:!0},requiredTouches:1,msThresh:800,triggerStartPhase:!1,data:{startDate:null},proxyEvents:["TouchStart","TouchEnd"]},drag:{preventDefault:{start:!0,move:!0,end:!0},requiredTouches:1,msHoldThresh:100,data:{startPoint:null,startDate:null,movePoint:null,moveDate:null,held:!1},proxyEvents:["TouchStart","TouchMove","TouchEnd"]},pinch:{preventDefault:{start:!0,move:!0,end:!0},requiredTouches:2,pxThresh:0,data:{startPoint:null,
startDate:null,movePoint:null,moveDate:null},proxyEvents:["TouchStart","TouchMove","GestureChange","TouchEnd"]},rotate:{preventDefault:{start:!0,move:!0,end:!0},requiredTouches:1,data:{},proxyEvents:["TouchStart","TouchMove","GestureChange","TouchEnd"]},swipe:{preventDefault:{start:!0,move:!0,end:!0},requiredTouches:1,velocityThresh:1,triggerOn:"touchmove",data:{startPoint:null,startDate:null,movePoint:null,moveDate:null},proxyEvents:["TouchStart","TouchMove","TouchEnd"]}};var t={handleTouchStart:function(a){var b=
this.context,e=j(a,b);if(e){var d=a.originalEvent,f=d.targetTouches,c="touchy"+b.charAt(0).toUpperCase()+b.slice(1),c=e.data(c),m=c.settings;m.preventDefault.start&&d.preventDefault();if(f.length===m.requiredTouches)switch(b){case "drag":p(c,f,a.timeStamp);a=c.startPoint;e.trigger("touchy-drag",["start",e,{movePoint:a,lastMovePoint:a,startPoint:a,velocity:0}]);break;case "swipe":q(c,f,a.timeStamp);break;case "pinch":if(b=n(a))c.startPoint={x:b.centerX,y:b.centerY},c.startDistance=Math.sqrt(Math.pow(b.x2-
b.x1,2)+Math.pow(b.y2-b.y1,2));break;case "longpress":c.startPoint={x:f[0].pageX,y:f[0].pageY};c.startDate=a.timeStamp;m.triggerStartPhase&&e.trigger("touchy-longpress",["start",e]);c.timer=setTimeout(g.proxy(function(){e.trigger("touchy-longpress",["end",e])},this),m.msThresh);break;case "rotate":1===f.length?k(c,f,a.timeStamp):(b=n(a),c.startPoint={x:b.centerX,y:b.centerY},c.startDate=a.timeStamp),a=c.startPoint,e.trigger("touchy-rotate",["start",e,{startPoint:a,movePoint:a,lastMovePoint:a,velocity:0,
degrees:0}])}}},handleTouchMove:function(a){var b=this.context,e=j(a,b);if(e){var d=a.originalEvent,f=d.targetTouches,c="touchy"+b.charAt(0).toUpperCase()+b.slice(1),c=e.data(c),g=c.settings;g.preventDefault.move&&d.preventDefault();if(f.length===g.requiredTouches)switch(b){case "drag":p(c,f,a.timeStamp);var g=c.movePoint,b=c.lastMovePoint,h=g.x===b.x&&g.y===b.y?0:Math.sqrt(Math.pow(g.x-b.x,2)+Math.pow(g.y-b.y,2)),d=c.moveDate-c.lastMoveDate;c.held&&e.trigger("touchy-drag",["move",e,{movePoint:g,
lastMovePoint:b,startPoint:c.startPoint,velocity:0===d?0:h/d}]);break;case "swipe":q(c,f,a.timeStamp);!c.swipeExecuted&&(c.swiped&&"touchmove"===g.triggerOn)&&(c.swipeExecuted=!0,r(c,e));break;case "pinch":if(a=n(a))c.currentPoint={x:a.centerX,y:a.centerY},"object"!=typeof window.ongesturechange&&(h=Math.sqrt(Math.pow(a.x2-a.x1,2)+Math.pow(a.y2-a.y1,2)),b=c.previousScale=c.scale||1,d=c.startDistance,h=c.scale=h/d,h*d>g.pxThresh&&e.trigger("touchy-pinch",[e,{scale:h,previousScale:b,currentPoint:c.currentPoint,
startPoint:c.startPoint,startDistance:d}]));break;case "rotate":var l,b=c.lastMovePoint=c.movePoint||c.startPoint,d=c.lastMoveDate=c.moveDate||c.startDate,g=c.movePoint={x:f[0].pageX,y:f[0].pageY},h=c.moveDate=a.timeStamp;if(1===f.length){if(!(f=c.targetPageCoords)){a=a.target;var k=function(a,b,c){var e=a.offsetParent;b.x+=a.offsetLeft-(e?e.scrollLeft:0);b.y+=a.offsetTop-(e?e.scrollTop:0);if(e){if(1==e.nodeType){var d=c.getComputedStyle(e,"");"static"!=d.position?(b.x+=parseInt(d.borderLeftWidth),
b.y+=parseInt(d.borderTopWidth),"TABLE"==e.localName?(b.x+=parseInt(d.paddingLeft),b.y+=parseInt(d.paddingTop)):"BODY"==e.localName&&(d=c.getComputedStyle(a,""),b.x+=parseInt(d.marginLeft),b.y+=parseInt(d.marginTop))):"BODY"==e.localName&&(b.x+=parseInt(d.borderLeftWidth),b.y+=parseInt(d.borderTopWidth));for(a=a.parentNode;e!=a;)b.x-=a.scrollLeft,b.y-=a.scrollTop,a=a.parentNode;k(e,b,c)}}else"BODY"==a.localName&&(d=c.getComputedStyle(a,""),b.x+=parseInt(d.borderLeftWidth),b.y+=parseInt(d.borderTopWidth),
c=c.getComputedStyle(a.parentNode,""),b.x-=parseInt(c.paddingLeft),b.y-=parseInt(c.paddingTop)),a.scrollLeft&&(b.x+=a.scrollLeft),a.scrollTop&&(b.y+=a.scrollTop),(a=a.ownerDocument.defaultView)&&a.frameElement&&k(a.frameElement,b,a)},f={x:0,y:0};a&&k(a,f,a.ownerDocument.defaultView)}a=c.targetPageCoords=f;a=c.centerCoords=c.centerCoords||{x:a.x+0.5*e.width(),y:a.y+0.5*e.height()}}else if(a=n(a),a=c.centerCoords={x:a.centerX,y:a.centerY},"object"==typeof window.ongesturechange)break;f=Math.atan2(g.y-
a.y,g.x-a.x);l=c.lastDegrees=c.degrees;f=c.degrees=f*(180/Math.PI);l=l?f-l:0;d=h-d;d=c.velocity=0===d?0:l/d;e.trigger("touchy-rotate",["move",e,{startPoint:c.startPoint,startDate:c.startDate,movePoint:g,lastMovePoint:b,centerCoords:a,degrees:f,degreeDelta:l,velocity:d}])}}},handleGestureChange:function(a){var b=this.context,e=j(a,b);if(e){var e=g(a.target),d=a.originalEvent;a="touchy"+b.charAt(0).toUpperCase()+b.slice(1);a=e.data(a);a.preventDefault.move&&d.preventDefault();switch(b){case "pinch":var b=
a.previousScale=a.scale||1,d=a.scale=d.scale,f=a.startPoint,c=a.currentPoint||f,h=a.startDistance;d*h>a.settings.pxThresh&&e.trigger("touchy-pinch",[e,{scale:d,previousScale:b,currentPoint:c,startPoint:f,startDistance:h}]);break;case "rotate":f=a.lastDegrees=a.degrees,b=a.degrees=d.rotation,d=f?b-f:0,f=a.moveDate-a.lastMoveDate,f=a.velocity=0===f?0:d/f,e.trigger("touchy-rotate",["move",e,{startPoint:a.startPoint,startDate:a.startDate,movePoint:a.movePoint,lastMovePoint:a.lastMovePoint,centerCoords:a.centerCoords,
degrees:b,degreeDelta:d,velocity:f}])}}},handleTouchEnd:function(a){var b=this.context,e=j(a,b);if(e){var d=a.originalEvent;a="touchy"+b.charAt(0).toUpperCase()+b.slice(1);a=e.data(a);var f=a.settings;f.preventDefault.end&&d.preventDefault();switch(b){case "drag":if(a.held){var b=a.movePoint||a.startPoint,d=a.lastMovePoint||a.startPoint,f=b.x===d.x&&b.y===d.y?0:Math.sqrt(Math.pow(b.x-d.x,2)+Math.pow(b.y-d.y,2)),c=a.moveDate-a.lastMoveDate;e.trigger("touchy-drag",["end",e,{movePoint:b,lastMovePoint:d,
startPoint:a.startPoint,velocity:0===c?0:f/c}])}g.extend(a,{startPoint:null,startDate:null,movePoint:null,moveDate:null,lastMovePoint:null,lastMoveDate:null,held:!1});break;case "swipe":a.swiped&&"touchend"===f.triggerOn&&r(a,e);g.extend(a,{startPoint:null,startDate:null,movePoint:null,moveDate:null,lastMovePoint:null,lastMoveDate:null,swiped:!1,swipeExecuted:!1});break;case "pinch":g.extend(a,{startPoint:null,startDistance:0,currentPoint:null,pinched:!1,scale:1,previousScale:null});break;case "longpress":clearTimeout(a.timer);
g.extend(a,{startDate:null});break;case "rotate":e.trigger("touchy-rotate",["end",e,{startPoint:a.startPoint,startDate:a.startDate,movePoint:a.movePoint,lastMovePoint:a.lastMovePoint,degrees:a.degrees,degreeDelta:a.lastDegrees?a.degrees-a.lastDegrees:0,velocity:a.velocity}]),g.extend(a,{startPoint:null,startDate:null,movePoint:null,moveDate:null,lastMovePoint:null,lastMoveDate:null,targetPageCoords:null,centerCoords:null,degrees:null,lastDegrees:null,velocity:null})}}}},p=function(a,b,e){k(a,b,e);
var d=a.moveDate||a.startDate;a.held||e-d>a.settings.msHoldThresh?g.extend(a,{held:!0,lastMoveDate:d,lastMovePoint:a.movePoint&&a.movePoint.x?a.movePoint:a.startPoint,moveDate:e,movePoint:{x:b[0].pageX,y:b[0].pageY}}):g.extend(a,{held:!1,lastMoveDate:0,lastMovePoint:a.startPoint,moveDate:0,movePoint:a.startPoint})},q=function(a,b,e){k(a,b,e);var d=a.settings,f=a.startPoint,c=a.moveDate||a.startDate;b={x:b[0].pageX,y:b[0].pageY};var h=b.x-f.x,f=b.y-f.y,j=e-c;g.extend(a,{lastMoveDate:c,lastMovePoint:a.movePoint&&
a.movePoint.x?a.movePoint:a.startPoint,moveDate:e,movePoint:b,hDistance:h,vDistance:f});if(!a.swiped&&(Math.abs(h)/j>d.velocityThresh||Math.abs(f)/j>d.velocityThresh))a.swiped=!0},r=function(a,b){var e=a.movePoint,d=a.lastMovePoint,f=e.x===d.x&&e.y===d.y?0:Math.sqrt(Math.pow(e.x-d.x,2)+Math.pow(e.y-d.y,2)),c=a.moveDate-a.lastMoveDate,f=0===c?0:f/c,c=a.hDistance,g=a.vDistance;f>a.settings.velocityThresh&&(c=Math.abs(c)>Math.abs(g)?0<c?"right":"left":0<g?"down":"up",b.trigger("touchy-swipe",[b,{direction:c,
movePoint:e,lastMovePoint:d,startPoint:a.startPoint,velocity:f}]))},k=function(a,b,e){a.startPoint||(a.startPoint={x:b[0].pageX,y:b[0].pageY});a.startDate||(a.startDate=e)},n=function(a){var b=!1;a=a.originalEvent.touches;2===a.length&&(b={x1:a[0].pageX,y1:a[0].pageY,x2:a[1].pageX,y2:a[1].pageY},b.centerX=(b.x1+b.x2)/2,b.centerY=(b.y1+b.y2)/2);return b},j=function(a,b){var e,d=!1,f=0,c=h[b].length;if(g.touchyOptions.useDelegation)for(;f<c;f+=1){if(e=g(h[b][f]).has(a.target),0<e.length){d=e;break}}else h[b]&&
-1!=h[b].index(a.target)&&(d=g(a.target));return d},h={},s={};g.each(g.touchyOptions,function(a){if("useDelegation"!==a){var b=a.charAt(0).toUpperCase()+a.slice(1);h[a]=g([]);s[a]=new function(){this.context=a};g.event.special["touchy-"+a]={setup:function(){h[a]=h[a].add(this);g(this).data("touchy"+b,g.extend({},g.touchyOptions[a].data));g(this).data("touchy"+b).settings=g.extend({},g.touchyOptions[a]);delete g(this).data("touchy"+b).settings.data;1===h[a].length&&g.each(g.touchyOptions[a].proxyEvents,
function(b,d){g(document).bind(d.toLowerCase()+".touchy."+a,g.proxy(t["handle"+d],s[a]))})},teardown:function(){h[a]=h[a].not(this);g(this).removeData("touchy"+b);0===h[a].length&&g.each(g.touchyOptions[a].proxyEvents,function(b,d){g(document).unbind(d.toLowerCase()+".touchy."+a)})},add:function(a){g.extend(g(this).data("touchy"+b).settings,a.data);var d=a.handler;a.handler=function(a){return d.apply(this,arguments)}}}}})})(jQuery);
/*!
* Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.sl