").append(a.replace(cr,"")).find(e=
):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError =
ajaxSuccess ajaxSend".split(" =
"),function(a,b){p.fn[b]=3Dfunction(a){return =
this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=3Dfunction(a,d,e=
,f){return =
p.isFunction(d)&&(f=3Df||e,e=3Dd,d=3Db),p.ajax({type:c,url:a,data:d,succe=
ss:e,dataType:f})}}),p.extend({getScript:function(a,c){return =
p.get(a,b,c,"script")},getJSON:function(a,b,c){return =
p.get(a,b,c,"json")},ajaxSetup:function(a,b){return =
b?cB(a,p.ajaxSettings):(b=3Da,a=3Dp.ajaxSettings),cB(a,b),a},ajaxSettings=
:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"applica=
tion/x-www-form-urlencoded; =
charset=3DUTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, =
text/xml",html:"text/html",text:"text/plain",json:"application/json, =
text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},res=
ponseFields:{xml:"responseXML",text:"responseText"},converters:{"* =
text":a.String,"text html":!0,"text json":p.parseJSON,"text =
xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),aj=
axTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var =
k,s,t,u,w,y=3Dc;if(v=3D=3D=3D2)return;v=3D2,h&&clearTimeout(h),g=3Db,e=3D=
i||"",x.readyState=3Da>0?4:0,f&&(u=3DcC(l,x,f));if(a>=3D200&&a<300||a=3D=3D=
=3D304)l.ifModified&&(w=3Dx.getResponseHeader("Last-Modified"),w&&(p.last=
Modified[d]=3Dw),w=3Dx.getResponseHeader("Etag"),w&&(p.etag[d]=3Dw)),a=3D=
=3D=3D304?(y=3D"notmodified",k=3D!0):(k=3DcD(l,u),y=3Dk.state,s=3Dk.data,=
t=3Dk.error,k=3D!t);else{t=3Dy;if(!y||a)y=3D"error",a<0&&(a=3D0)}x.status=
=3Da,x.statusText=3D(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[=
x,y,t]),x.statusCode(r),r=3Db,j&&n.trigger("ajax"+(k?"Success":"Error"),[=
x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.a=
ctive||p.event.trigger("ajaxStop"))}typeof =
a=3D=3D"object"&&(c=3Da,a=3Db),c=3Dc||{};var =
d,e,f,g,h,i,j,k,l=3Dp.ajaxSetup({},c),m=3Dl.context||l,n=3Dm!=3D=3Dl&&(m.=
nodeType||m instanceof =
p)?p(m):p.event,o=3Dp.Deferred(),q=3Dp.Callbacks("once =
memory"),r=3Dl.statusCode||{},t=3D{},u=3D{},v=3D0,w=3D"canceled",x=3D{rea=
dyState:0,setRequestHeader:function(a,b){if(!v){var =
c=3Da.toLowerCase();a=3Du[c]=3Du[c]||a,t[a]=3Db}return =
this},getAllResponseHeaders:function(){return =
v=3D=3D=3D2?e:null},getResponseHeader:function(a){var =
c;if(v=3D=3D=3D2){if(!f){f=3D{};while(c=3Dcm.exec(e))f[c[1].toLowerCase()=
]=3Dc[2]}c=3Df[a.toLowerCase()]}return =
c=3D=3D=3Db?null:c},overrideMimeType:function(a){return =
v||(l.mimeType=3Da),this},abort:function(a){return =
a=3Da||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=3Dx.done,x.er=
ror=3Dx.fail,x.complete=3Dq.add,x.statusCode=3Dfunction(a){if(a){var =
b;if(v<2)for(b in a)r[b]=3D[r[b],a[b]];else =
b=3Da[x.status],x.always(b)}return =
this},l.url=3D((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dat=
aTypes=3Dp.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain=3D=3D=
null&&(i=3Dct.exec(l.url.toLowerCase())||!1,l.crossDomain=3Di&&i.join(":"=
)+(i[3]?"":i[1]=3D=3D=3D"http:"?80:443)!=3D=3Dcj.join(":")+(cj[3]?"":cj[1=
]=3D=3D=3D"http:"?80:443)),l.data&&l.processData&&typeof =
l.data!=3D"string"&&(l.data=3Dp.param(l.data,l.traditional)),cA(cv,l,c,x)=
;if(v=3D=3D=3D2)return =
x;j=3Dl.global,l.type=3Dl.type.toUpperCase(),l.hasContent=3D!co.test(l.ty=
pe),j&&p.active++=3D=3D=3D0&&p.event.trigger("ajaxStart");if(!l.hasConten=
t){l.data&&(l.url+=3D(cq.test(l.url)?"&":"?")+l.data,delete =
l.data),d=3Dl.url;if(l.cache=3D=3D=3D!1){var =
z=3Dp.now(),A=3Dl.url.replace(cs,"$1_=3D"+z);l.url=3DA+(A=3D=3D=3Dl.url?(=
cq.test(l.url)?"&":"?")+"_=3D"+z:"")}}(l.data&&l.hasContent&&l.contentTyp=
e!=3D=3D!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentTy=
pe),l.ifModified&&(d=3Dd||l.url,p.lastModified[d]&&x.setRequestHeader("If=
-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-Non=
e-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accept=
s[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=3D=3D"*"?", =
"+cx+"; q=3D0.01":""):l.accepts["*"]);for(k in =
l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSe=
nd.call(m,x,l)!=3D=3D!1&&v!=3D=3D2){w=3D"abort";for(k =
in{success:1,error:1,complete:1})x[k](l[k]);g=3DcA(cw,l,c,x);if(!g)y(-1,"=
No =
Transport");else{x.readyState=3D1,j&&n.trigger("ajaxSend",[x,l]),l.async&=
&l.timeout>0&&(h=3DsetTimeout(function(){x.abort("timeout")},l.timeout));=
try{v=3D1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return =
x}return x.abort()},active:0,lastModified:{},etag:{}});var =
cE=3D[],cF=3D/\?/,cG=3D/(=3D)\?(?=3D&|$)|\?\?/,cH=3Dp.now();p.ajaxSetup({=
jsonp:"callback",jsonpCallback:function(){var =
a=3DcE.pop()||p.expando+"_"+cH++;return =
this[a]=3D!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var =
f,g,h,i=3Dc.data,j=3Dc.url,k=3Dc.jsonp!=3D=3D!1,l=3Dk&&cG.test(j),m=3Dk&&=
!l&&typeof =
i=3D=3D"string"&&!(c.contentType||"").indexOf("application/x-www-form-url=
encoded")&&cG.test(i);if(c.dataTypes[0]=3D=3D=3D"jsonp"||l||m)return =
f=3Dc.jsonpCallback=3Dp.isFunction(c.jsonpCallback)?c.jsonpCallback():c.j=
sonpCallback,g=3Da[f],l?c.url=3Dj.replace(cG,"$1"+f):m?c.data=3Di.replace=
(cG,"$1"+f):k&&(c.url+=3D(cF.test(j)?"&":"?")+c.jsonp+"=3D"+f),c.converte=
rs["script json"]=3Dfunction(){return h||p.error(f+" was not =
called"),h[0]},c.dataTypes[0]=3D"json",a[f]=3Dfunction(){h=3Darguments},e=
.always(function(){a[f]=3Dg,c[f]&&(c.jsonpCallback=3Dd.jsonpCallback,cE.p=
ush(f)),h&&p.isFunction(g)&&g(h[0]),h=3Dg=3Db}),"script"}),p.ajaxSetup({a=
ccepts:{script:"text/javascript, application/javascript, =
application/ecmascript, =
application/x-ecmascript"},contents:{script:/javascript|ecmascript/},conv=
erters:{"text script":function(a){return =
p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache=3D=3D=3D=
b&&(a.cache=3D!1),a.crossDomain&&(a.type=3D"GET",a.global=3D!1)}),p.ajaxT=
ransport("script",function(a){if(a.crossDomain){var =
c,d=3De.head||e.getElementsByTagName("head")[0]||e.documentElement;return=
{send:function(f,g){c=3De.createElement("script"),c.async=3D"async",a.scr=
iptCharset&&(c.charset=3Da.scriptCharset),c.src=3Da.url,c.onload=3Dc.onre=
adystatechange=3Dfunction(a,e){if(e||!c.readyState||/loaded|complete/.tes=
t(c.readyState))c.onload=3Dc.onreadystatechange=3Dnull,d&&c.parentNode&&d=
.removeChild(c),c=3Db,e||g(200,"success")},d.insertBefore(c,d.firstChild)=
},abort:function(){c&&c.onload(0,1)}}}});var =
cI,cJ=3Da.ActiveXObject?function(){for(var a in =
cI)cI[a](0,1)}:!1,cK=3D0;p.ajaxSettings.xhr=3Da.ActiveXObject?function(){=
return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:=
!!a,cors:!!a&&"withCredentials"in =
a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if=
(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var =
g,h,i=3Dc.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.passw=
ord):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in =
c.xhrFields)i[h]=3Dc.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overr=
ideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Req=
uested-With"]=3D"XMLHttpRequest");try{for(h in =
e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null)=
,d=3Dfunction(a,e){var =
h,j,k,l,m;try{if(d&&(e||i.readyState=3D=3D=3D4)){d=3Db,g&&(i.onreadystate=
change=3Dp.noop,cJ&&delete =
cI[g]);if(e)i.readyState!=3D=3D4&&i.abort();else{h=3Di.status,k=3Di.getAl=
lResponseHeaders(),l=3D{},m=3Di.responseXML,m&&m.documentElement&&(l.xml=3D=
m);try{l.text=3Di.responseText}catch(a){}try{j=3Di.statusText}catch(n){j=3D=
""}!h&&c.isLocal&&!c.crossDomain?h=3Dl.text?200:404:h=3D=3D=3D1223&&(h=3D=
204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState=3D=3D=3D4?=
setTimeout(d,0):(g=3D++cK,cJ&&(cI||(cI=3D{},p(a).unload(cJ)),cI[g]=3Dd),i=
.onreadystatechange=3Dd):d()},abort:function(){d&&d(0,1)}}}});var =
cN,cO,cP=3D/^(?:toggle|show|hide)$/,cQ=3Dnew =
RegExp("^(?:([-+])=3D|)("+q+")([a-z%]*)$","i"),cR=3D/queueHooks$/,cS=3D[c=
Y],cT=3D{"*":[function(a,b){var =
c,d,e=3Dthis.createTween(a,b),f=3DcQ.exec(b),g=3De.cur(),h=3D+g||0,i=3D1,=
j=3D20;if(f){c=3D+f[2],d=3Df[3]||(p.cssNumber[a]?"":"px");if(d!=3D=3D"px"=
&&h){h=3Dp.css(e.elem,a,!0)||c||1;do =
i=3Di||".5",h=3Dh/i,p.style(e.elem,a,h+d);while(i!=3D=3D(i=3De.cur()/g)&&=
i!=3D=3D1&&--j)}e.unit=3Dd,e.start=3Dh,e.end=3Df[1]?h+(f[1]+1)*c:c}return=
=
e}]};p.Animation=3Dp.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=3D=
a,a=3D["*"]):a=3Da.split(" ");var =
c,d=3D0,e=3Da.length;for(;d
-1,j=3D{},k=3D=
{},l,m;i?(k=3De.position(),l=3Dk.top,m=3Dk.left):(l=3DparseFloat(g)||0,m=3D=
parseFloat(h)||0),p.isFunction(b)&&(b=3Db.call(a,c,f)),b.top!=3Dnull&&(j.=
top=3Db.top-f.top+l),b.left!=3Dnull&&(j.left=3Db.left-f.left+m),"using"in=
=
b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[=
0])return;var =
a=3Dthis[0],b=3Dthis.offsetParent(),c=3Dthis.offset(),d=3Dc_.test(b[0].no=
deName)?{top:0,left:0}:b.offset();return =
c.top-=3DparseFloat(p.css(a,"marginTop"))||0,c.left-=3DparseFloat(p.css(a=
,"marginLeft"))||0,d.top+=3DparseFloat(p.css(b[0],"borderTopWidth"))||0,d=
.left+=3DparseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,le=
ft:c.left-d.left}},offsetParent:function(){return =
this.map(function(){var =
a=3Dthis.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"pos=
ition")=3D=3D=3D"static")a=3Da.offsetParent;return =
a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},=
function(a,c){var d=3D/Y/.test(c);p.fn[a]=3Dfunction(e){return =
p.access(this,function(a,e,f){var g=3Dda(a);if(f=3D=3D=3Db)return g?c in =
g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft(=
):f,d?f:p(g).scrollTop()):a[e]=3Df},a,e,arguments.length,null)}}),p.each(=
{Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,c=
ontent:c,"":"outer"+a},function(d,e){p.fn[e]=3Dfunction(e,f){var =
g=3Darguments.length&&(d||typeof =
e!=3D"boolean"),h=3Dd||(e=3D=3D=3D!0||f=3D=3D=3D!0?"margin":"border");ret=
urn p.access(this,function(c,d,e){var f;return =
p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType=3D=3D=3D9=
?(f=3Dc.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body[=
"offset"+a],f["offset"+a],f["client"+a])):e=3D=3D=3Db?p.css(c,d,e,h):p.st=
yle(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=3Da.$=3Dp,typeof =
define=3D=3D"function"&&define.amd&&define.amd.jQuery&&define("jquery",[]=
,function(){return p})})(window);
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/shared/libs/modernizr/modernizr-2.6.1-respond-1.1.0.min.js
/* Modernizr 2.6.1 (Custom Build) | MIT & BSD=0A=
* Build: =
http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borde=
rradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssani=
mations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransf=
orms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-dr=
aganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-local=
storage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-g=
eolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses=
-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domp=
refixes-load=0A=
*/=0A=
;window.Modernizr=3Dfunction(a,b,c){function D(a){j.cssText=3Da}function =
E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof =
a=3D=3D=3Db}function G(a,b){return!!~(""+a).indexOf(b)}function =
H(a,b){for(var d in a){var e=3Da[d];if(!G(e,"-")&&j[e]!=3D=3Dc)return =
b=3D=3D"pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var =
f=3Db[a[e]];if(f!=3D=3Dc)return =
d=3D=3D=3D!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function =
J(a,b,c){var d=3Da.charAt(0).toUpperCase()+a.slice(1),e=3D(a+" =
"+p.join(d+" ")+d).split(" ");return =
F(b,"string")||F(b,"undefined")?H(e,b):(e=3D(a+" "+q.join(d+" =
")+d).split(" "),I(e,b,c))}function K(){e.input=3Dfunction(c){for(var =
d=3D0,e=3Dc.length;d',a,""].join(""),k.id=3Dh,(l?k:m).innerHTML+=3Df,m.=
appendChild(k),l||(m.style.background=3D"",g.appendChild(m)),i=3Dc(k,a),l=
?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},z=3Dfunctio=
n(b){var c=3Da.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var =
d;return y("@media "+b+" { #"+h+" { position: absolute; } =
}",function(b){d=3D(a.getComputedStyle?getComputedStyle(b,null):b.current=
Style)["position"]=3D=3D"absolute"}),d},A=3Dfunction(){function =
d(d,e){e=3De||b.createElement(a[d]||"div"),d=3D"on"+d;var f=3Dd in =
e;return =
f||(e.setAttribute||(e=3Db.createElement("div")),e.setAttribute&&e.remove=
Attribute&&(e.setAttribute(d,""),f=3DF(e[d],"function"),F(e[d],"undefined=
")||(e[d]=3Dc),e.removeAttribute(d))),e=3Dnull,f}var =
a=3D{select:"input",change:"input",submit:"form",reset:"form",error:"img"=
,load:"img",abort:"img"};return =
d}(),B=3D{}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=3D=
function(a,b){return B.call(a,b)}:C=3Dfunction(a,b){return b in =
a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(F=
unction.prototype.bind=3Dfunction(b){var c=3Dthis;if(typeof =
c!=3D"function")throw new TypeError;var =
d=3Dw.call(arguments,1),e=3Dfunction(){if(this instanceof e){var =
a=3Dfunction(){};a.prototype=3Dc.prototype;var f=3Dnew =
a,g=3Dc.apply(f,d.concat(w.call(arguments)));return =
Object(g)=3D=3D=3Dg?g:f}return =
c.apply(b,d.concat(w.call(arguments)))};return =
e}),s.flexbox=3Dfunction(){return =
J("flexWrap")},s.canvas=3Dfunction(){var =
a=3Db.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")}=
,s.canvastext=3Dfunction(){return!!e.canvas&&!!F(b.createElement("canvas"=
).getContext("2d").fillText,"function")},s.webgl=3Dfunction(){return!!a.W=
ebGLRenderingContext},s.touch=3Dfunction(){var c;return"ontouchstart"in =
a||a.DocumentTouch&&b instanceof DocumentTouch?c=3D!0:y(["@media =
(",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolut=
e}}"].join(""),function(a){c=3Da.offsetTop=3D=3D=3D9}),c},s.geolocation=3D=
function(){return"geolocation"in =
navigator},s.postmessage=3Dfunction(){return!!a.postMessage},s.websqldata=
base=3Dfunction(){return!!a.openDatabase},s.indexedDB=3Dfunction(){return=
!!J("indexedDB",a)},s.hashchange=3Dfunction(){return =
A("hashchange",a)&&(b.documentMode=3D=3D=3Dc||b.documentMode>7)},s.histor=
y=3Dfunction(){return!!a.history&&!!history.pushState},s.draganddrop=3Dfu=
nction(){var a=3Db.createElement("div");return"draggable"in =
a||"ondragstart"in a&&"ondrop"in =
a},s.websockets=3Dfunction(){return"WebSocket"in a||"MozWebSocket"in =
a},s.rgba=3Dfunction(){return =
D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s=
.hsla=3Dfunction(){return =
D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||=
G(j.backgroundColor,"hsla")},s.multiplebgs=3Dfunction(){return =
D("background:url(https://),url(https://),red =
url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=3D=
function(){return J("backgroundSize")},s.borderimage=3Dfunction(){return =
J("borderImage")},s.borderradius=3Dfunction(){return =
J("borderRadius")},s.boxshadow=3Dfunction(){return =
J("boxShadow")},s.textshadow=3Dfunction(){return =
b.createElement("div").style.textShadow=3D=3D=3D""},s.opacity=3Dfunction(=
){return =
E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=3Dfunction(){r=
eturn J("animationName")},s.csscolumns=3Dfunction(){return =
J("columnCount")},s.cssgradients=3Dfunction(){var =
a=3D"background-image:",b=3D"gradient(linear,left top,right =
bottom,from(#9f9),to(white));",c=3D"linear-gradient(left top,#9f9, =
white);";return D((a+"-webkit- ".split(" =
").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradie=
nt")},s.cssreflections=3Dfunction(){return =
J("boxReflect")},s.csstransforms=3Dfunction(){return!!J("transform")},s.c=
sstransforms3d=3Dfunction(){var a=3D!!J("perspective");return =
a&&"webkitPerspective"in g.style&&y("@media =
(transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolu=
te;height:3px;}}",function(b,c){a=3Db.offsetLeft=3D=3D=3D9&&b.offsetHeigh=
t=3D=3D=3D3}),a},s.csstransitions=3Dfunction(){return =
J("transition")},s.fontface=3Dfunction(){var a;return y('@font-face =
{font-family:"font";src:url("https://")}',function(c,d){var =
e=3Db.getElementById("smodernizr"),f=3De.sheet||e.styleSheet,g=3Df?f.cssR=
ules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=3D/src/i.tes=
t(g)&&g.indexOf(d.split(" =
")[0])=3D=3D=3D0}),a},s.generatedcontent=3Dfunction(){var a;return =
y(['#modernizr:after{content:"',l,'";visibility:hidden}'].join(""),functi=
on(b){a=3Db.offsetHeight>=3D1}),a},s.video=3Dfunction(){var =
a=3Db.createElement("video"),c=3D!1;try{if(c=3D!!a.canPlayType)c=3Dnew =
Boolean(c),c.ogg=3Da.canPlayType('video/ogg; =
codecs=3D"theora"').replace(/^no$/,""),c.h264=3Da.canPlayType('video/mp4;=
=
codecs=3D"avc1.42E01E"').replace(/^no$/,""),c.webm=3Da.canPlayType('video=
/webm; codecs=3D"vp8, vorbis"').replace(/^no$/,"")}catch(d){}return =
c},s.audio=3Dfunction(){var =
a=3Db.createElement("audio"),c=3D!1;try{if(c=3D!!a.canPlayType)c=3Dnew =
Boolean(c),c.ogg=3Da.canPlayType('audio/ogg; =
codecs=3D"vorbis"').replace(/^no$/,""),c.mp3=3Da.canPlayType("audio/mpeg;=
").replace(/^no$/,""),c.wav=3Da.canPlayType('audio/wav; =
codecs=3D"1"').replace(/^no$/,""),c.m4a=3D(a.canPlayType("audio/x-m4a;")|=
|a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return =
c},s.localstorage=3Dfunction(){try{return =
localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1=
}},s.sessionstorage=3Dfunction(){try{return =
sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){retu=
rn!1}},s.webworkers=3Dfunction(){return!!a.Worker},s.applicationcache=3Df=
unction(){return!!a.applicationCache},s.svg=3Dfunction(){return!!b.create=
ElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=3D=
function(){var a=3Db.createElement("div");return =
a.innerHTML=3D" ",(a.firstChild&&a.firstChild.namespaceURI)=3D=3Dr.s=
vg},s.smil=3Dfunction(){return!!b.createElementNS&&/SVGAnimate/.test(m.ca=
ll(b.createElementNS(r.svg,"animate")))},s.svgclippaths=3Dfunction(){retu=
rn!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,=
"clipPath")))};for(var L in =
s)C(s,L)&&(x=3DL.toLowerCase(),e[x]=3Ds[L](),v.push((e[x]?"":"no-")+x));r=
eturn e.input||K(),e.addTest=3Dfunction(a,b){if(typeof =
a=3D=3D"object")for(var d in =
a)C(a,d)&&e.addTest(d,a[d]);else{a=3Da.toLowerCase();if(e[a]!=3D=3Dc)retu=
rn e;b=3Dtypeof b=3D=3D"function"?b():b,f&&(g.className+=3D" =
"+(b?"":"no-")+a),e[a]=3Db}return =
e},D(""),i=3Dk=3Dnull,function(a,b){function k(a,b){var =
c=3Da.createElement("p"),d=3Da.getElementsByTagName("head")[0]||a.documen=
tElement;return =
c.innerHTML=3D"x",d.insertBefore(c.lastChild,d.firstC=
hild)}function l(){var a=3Dr.elements;return typeof =
a=3D=3D"string"?a.split(" "):a}function m(a){var b=3Di[a[g]];return =
b||(b=3D{},h++,a[g]=3Dh,i[h]=3Db),b}function =
n(a,c,f){c||(c=3Db);if(j)return c.createElement(a);f||(f=3Dm(c));var =
g;return =
f.cache[a]?g=3Df.cache[a].cloneNode():e.test(a)?g=3D(f.cache[a]=3Df.creat=
eElem(a)).cloneNode():g=3Df.createElem(a),g.canHaveChildren&&!d.test(a)?f=
.frag.appendChild(g):g}function o(a,c){a||(a=3Db);if(j)return =
a.createDocumentFragment();c=3Dc||m(a);var =
d=3Dc.frag.cloneNode(),e=3D0,f=3Dl(),g=3Df.length;for(;e",f=3D"hidden"in =
a,j=3Da.childNodes.length=3D=3D1||function(){b.createElement("a");var =
a=3Db.createDocumentFragment();return typeof =
a.cloneNode=3D=3D"undefined"||typeof =
a.createDocumentFragment=3D=3D"undefined"||typeof =
a.createElement=3D=3D"undefined"}()}catch(c){f=3D!0,j=3D!0}})();var =
r=3D{elements:c.elements||"abbr article aside audio bdi canvas data =
datalist details figcaption figure footer header hgroup mark meter nav =
output progress section summary time =
video",shivCSS:c.shivCSS!=3D=3D!1,supportsUnknownElements:j,shivMethods:c=
.shivMethods!=3D=3D!1,type:"default",shivDocument:q,createElement:n,creat=
eDocumentFragment:o};a.html5=3Dr,q(b)}(this,b),e._version=3Dd,e._prefixes=
=3Dn,e._domPrefixes=3Dq,e._cssomPrefixes=3Dp,e.mq=3Dz,e.hasEvent=3DA,e.te=
stProp=3Dfunction(a){return =
H([a])},e.testAllProps=3DJ,e.testStyles=3Dy,e.prefixed=3Dfunction(a,b,c){=
return =
b?J(a,b,c):J(a,"pfx")},g.className=3Dg.className.replace(/(^|\s)no-js(\s|=
$)/,"$1$2")+(f?" js "+v.join(" =
"):""),e}(this,this.document),function(a,b,c){function d(a){return =
o.call(a)=3D=3D"[object Function]"}function e(a){return typeof =
a=3D=3D"string"}function f(){}function =
g(a){return!a||a=3D=3D"loaded"||a=3D=3D"complete"||a=3D=3D"uninitialized"=
}function h(){var =
a=3Dp.shift();q=3D1,a?a.t?m(function(){(a.t=3D=3D"c"?B.injectCss:B.inject=
Js)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=3D0}function =
i(a,c,d,e,f,i,j){function =
k(b){if(!o&&g(l.readyState)&&(u.r=3Do=3D1,!q&&h(),l.onload=3Dl.onreadysta=
techange=3Dnull,b)){a!=3D"img"&&m(function(){t.removeChild(l)},50);for(va=
r d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var =
j=3Dj||B.errorTimeout,l=3D{},o=3D0,r=3D0,u=3D{t:d,s:c,e:f,a:i,x:j};y[c]=3D=
=3D=3D1&&(r=3D1,y[c]=3D[],l=3Db.createElement(a)),a=3D=3D"object"?l.data=3D=
c:(l.src=3Dc,l.type=3Da),l.width=3Dl.height=3D"0",l.onerror=3Dl.onload=3D=
l.onreadystatechange=3Dfunction(){k.call(this,r)},p.splice(e,0,u),a!=3D"i=
mg"&&(r||y[c]=3D=3D=3D2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))=
}function j(a,b,c,d,f){return =
q=3D0,b=3Db||"j",e(a)?i(b=3D=3D"c"?v:u,a,b,this.i++,c,d,f):(p.splice(this=
.i++,0,a),p.length=3D=3D1&&h()),this}function k(){var a=3DB;return =
a.loader=3D{load:j,i:0},a}var =
l=3Db.documentElement,m=3Da.setTimeout,n=3Db.getElementsByTagName("script=
")[0],o=3D{}.toString,p=3D[],q=3D0,r=3D"MozAppearance"in =
l.style,s=3Dr&&!!b.createRange().compareNode,t=3Ds?l:n.parentNode,l=3Da.o=
pera&&o.call(a.opera)=3D=3D"[object =
Opera]",l=3D!!b.attachEvent&&!l,u=3Dr?"object":l?"script":"img",v=3Dl?"sc=
ript":u,w=3DArray.isArray||function(a){return o.call(a)=3D=3D"[object =
Array]"},x=3D[],y=3D{},z=3D{timeout:function(a,b){return =
b.length&&(a.timeout=3Db[0]),a}},A,B;B=3Dfunction(a){function b(a){var =
a=3Da.split("!"),b=3Dx.length,c=3Da.pop(),d=3Da.length,c=3D{url:c,origUrl=
:c,prefixes:a},e,f,g;for(f=3D0;f #mq-test-1 { width: 42px; =
}';a.insertBefore(d,b);c=3Dg.offsetWidth=3D=3D42;a.removeChild(d)=
;return{matches:c,media:h}}})(document);=0A=
=0A=
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott =
Jehl. MIT/GPLv2 Lic. j.mp/respondjs */=0A=
(function(e){e.respond=3D{};respond.update=3Dfunction(){};respond.mediaQu=
eriesSupported=3De.matchMedia&&e.matchMedia("only =
all").matches;if(respond.mediaQueriesSupported){return}var =
w=3De.document,s=3Dw.documentElement,i=3D[],k=3D[],q=3D[],o=3D{},h=3D30,f=
=3Dw.getElementsByTagName("head")[0]||s,g=3Dw.getElementsByTagName("base"=
)[0],b=3Df.getElementsByTagName("link"),d=3D[],a=3Dfunction(){var =
D=3Db,y=3DD.length,B=3D0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]=
+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\=
(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(=
RegExp.$2||"")})}}j()},l,r,v=3Dfunction(){var =
z,A=3Dw.createElement("div"),x=3Dw.body,y=3Dfalse;A.style.cssText=3D"posi=
tion:absolute;font-size:1em;width:1em";if(!x){x=3Dy=3Dw.createElement("bo=
dy");x.style.background=3D"none"}x.appendChild(A);s.insertBefore(x,s.firs=
tChild);z=3DA.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=3D=
p=3DparseFloat(z);return z},p,j=3Dfunction(I){var =
x=3D"clientWidth",B=3Ds[x],H=3Dw.compatMode=3D=3D=3D"CSS1Compat"&&B||w.bo=
dy[x]||B,D=3D{},G=3Db[b.length-1],z=3D(new =
Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=3Dp=
arseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H=
>=3DC)&&(L||H<=3DJ)){if(!D[K.media]){D[K.media]=3D[]}D[K.media].push(k[K.=
rules])}}for(var E in =
q){if(q[E]&&q[E].parentNode=3D=3D=3Df){f.removeChild(q[E])}}for(var E in =
D){var =
M=3Dw.createElement("style"),F=3DD[E].join("\n");M.type=3D"text/css";M.me=
dia=3DE;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.css=
Text=3DF}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=3Dfunction=
(x,z){var =
y=3Dc();if(!y){return}y.open("GET",x,true);y.onreadystatechange=3Dfunctio=
n(){if(y.readyState!=3D4||y.status!=3D200&&y.status!=3D304){return}z(y.re=
sponseText)};if(y.readyState=3D=3D4){return}y.send(null)},c=3D(function()=
{var x=3Dfalse;try{x=3Dnew XMLHttpRequest()}catch(y){x=3Dnew =
ActiveXObject("Microsoft.XMLHTTP")}return function(){return =
x}})();a();respond.update=3Da;function =
t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}e=
lse{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/shared/libs/bootstrap/js/bootstrap.min.js
/*!=0A=
* Bootstrap.js by @fat & @mdo=0A=
* Copyright 2012 Twitter, Inc.=0A=
* http://www.apache.org/licenses/LICENSE-2.0.txt=0A=
*/=0A=
!function(e){"use =
strict";e(function(){e.support.transition=3Dfunction(){var =
e=3Dfunction(){var =
e=3Ddocument.createElement("bootstrap"),t=3D{WebkitTransition:"webkitTran=
sitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd =
otransitionend",transition:"transitionend"},n;for(n in =
t)if(e.style[n]!=3D=3Dundefined)return t[n]}();return =
e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var =
t=3D'[data-dismiss=3D"alert"]',n=3Dfunction(n){e(n).on("click",t,this.clo=
se)};n.prototype.close=3Dfunction(t){function =
s(){i.trigger("closed").remove()}var =
n=3De(this),r=3Dn.attr("data-target"),i;r||(r=3Dn.attr("href"),r=3Dr&&r.r=
eplace(/.*(?=3D#[^\s]*$)/,"")),i=3De(r),t&&t.preventDefault(),i.length||(=
i=3Dn.hasClass("alert")?n:n.parent()),i.trigger(t=3De.Event("close"));if(=
t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i=
.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=3Dfunc=
tion(t){return this.each(function(){var =
r=3De(this),i=3Dr.data("alert");i||r.data("alert",i=3Dnew =
n(this)),typeof =
t=3D=3D"string"&&i[t].call(r)})},e.fn.alert.Constructor=3Dn,e(document).o=
n("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e=
){"use strict";var =
t=3Dfunction(t,n){this.$element=3De(t),this.options=3De.extend({},e.fn.bu=
tton.defaults,n)};t.prototype.setState=3Dfunction(e){var =
t=3D"disabled",n=3Dthis.$element,r=3Dn.data(),i=3Dn.is("input")?"val":"ht=
ml";e+=3D"Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.o=
ptions[e]),setTimeout(function(){e=3D=3D"loadingText"?n.addClass(t).attr(=
t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=3Dfunction(){=
var =
e=3Dthis.$element.closest('[data-toggle=3D"buttons-radio"]');e&&e.find(".=
active").removeClass("active"),this.$element.toggleClass("active")},e.fn.=
button=3Dfunction(n){return this.each(function(){var =
r=3De(this),i=3Dr.data("button"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("button",i=3Dnew =
t(this,s)),n=3D=3D"toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.def=
aults=3D{loadingText:"loading..."},e.fn.button.Constructor=3Dt,e(document=
).on("click.button.data-api","[data-toggle^=3Dbutton]",function(t){var =
n=3De(t.target);n.hasClass("btn")||(n=3Dn.closest(".btn")),n.button("togg=
le")})}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(t,n){this.$element=3De(t),this.options=3Dn,this.options.slid=
e&&this.slide(this.options.slide),this.options.pause=3D=3D"hover"&&this.$=
element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy=
(this.cycle,this))};t.prototype=3D{cycle:function(t){return =
t||(this.paused=3D!1),this.options.interval&&!this.paused&&(this.interval=
=3DsetInterval(e.proxy(this.next,this),this.options.interval)),this},to:f=
unction(t){var =
n=3Dthis.$element.find(".item.active"),r=3Dn.parent().children(),i=3Dr.in=
dex(n),s=3Dthis;if(t>r.length-1||t<0)return;return =
this.sliding?this.$element.one("slid",function(){s.to(t)}):i=3D=3Dt?this.=
pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){=
return t||(this.paused=3D!0),this.$element.find(".next, =
.prev").length&&e.support.transition.end&&(this.$element.trigger(e.suppor=
t.transition.end),this.cycle()),clearInterval(this.interval),this.interva=
l=3Dnull,this},next:function(){if(this.sliding)return;return =
this.slide("next")},prev:function(){if(this.sliding)return;return =
this.slide("prev")},slide:function(t,n){var =
r=3Dthis.$element.find(".item.active"),i=3Dn||r[t](),s=3Dthis.interval,o=3D=
t=3D=3D"next"?"left":"right",u=3Dt=3D=3D"next"?"first":"last",a=3Dthis,f;=
this.sliding=3D!0,s&&this.pause(),i=3Di.length?i:this.$element.find(".ite=
m")[u](),f=3De.Event("slide",{relatedTarget:i[0]});if(i.hasClass("active"=
))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$=
element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].of=
fsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transit=
ion.end,function(){i.removeClass([t,o].join(" =
")).addClass("active"),r.removeClass(["active",o].join(" =
")),a.sliding=3D!1,setTimeout(function(){a.$element.trigger("slid")},0)})=
}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeC=
lass("active"),i.addClass("active"),this.sliding=3D!1,this.$element.trigg=
er("slid")}return =
s&&this.cycle(),this}},e.fn.carousel=3Dfunction(n){return =
this.each(function(){var =
r=3De(this),i=3Dr.data("carousel"),s=3De.extend({},e.fn.carousel.defaults=
,typeof n=3D=3D"object"&&n),o=3Dtypeof =
n=3D=3D"string"?n:s.slide;i||r.data("carousel",i=3Dnew t(this,s)),typeof =
n=3D=3D"number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.d=
efaults=3D{interval:5e3,pause:"hover"},e.fn.carousel.Constructor=3Dt,e(do=
cument).on("click.carousel.data-api","[data-slide]",function(t){var =
n=3De(this),r,i=3De(n.attr("data-target")||(r=3Dn.attr("href"))&&r.replac=
e(/.*(?=3D#[^\s]+$)/,"")),s=3De.extend({},i.data(),n.data());i.carousel(s=
),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(t,n){this.$element=3De(t),this.options=3De.extend({},e.fn.co=
llapse.defaults,n),this.options.parent&&(this.$parent=3De(this.options.pa=
rent)),this.options.toggle&&this.toggle()};t.prototype=3D{constructor:t,d=
imension:function(){var e=3Dthis.$element.hasClass("width");return =
e?"width":"height"},show:function(){var =
t,n,r,i;if(this.transitioning)return;t=3Dthis.dimension(),n=3De.camelCase=
(["scroll",t].join("-")),r=3Dthis.$parent&&this.$parent.find("> =
.accordion-group > =
.in");if(r&&r.length){i=3Dr.data("collapse");if(i&&i.transitioning)return=
;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.t=
ransition("addClass",e.Event("show"),"shown"),e.support.transition&&this.=
$element[t](this.$element[0][n])},hide:function(){var =
t;if(this.transitioning)return;t=3Dthis.dimension(),this.reset(this.$elem=
ent[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$e=
lement[t](0)},reset:function(e){var t=3Dthis.dimension();return =
this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$=
element[e!=3D=3Dnull?"addClass":"removeClass"]("collapse"),this},transiti=
on:function(t,n,r){var =
i=3Dthis,s=3Dfunction(){n.type=3D=3D"show"&&i.reset(),i.transitioning=3D0=
,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented(=
))return;this.transitioning=3D1,this.$element[t]("in"),e.support.transiti=
on&&this.$element.hasClass("collapse")?this.$element.one(e.support.transi=
tion.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hid=
e":"show"]()}},e.fn.collapse=3Dfunction(n){return =
this.each(function(){var r=3De(this),i=3Dr.data("collapse"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("collapse",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.collapse.defaults=3D{toggle:!0},e.fn.coll=
apse.Constructor=3Dt,e(document).on("click.collapse.data-api","[data-togg=
le=3Dcollapse]",function(t){var =
n=3De(this),r,i=3Dn.attr("data-target")||t.preventDefault()||(r=3Dn.attr(=
"href"))&&r.replace(/.*(?=3D#[^\s]+$)/,""),s=3De(i).data("collapse")?"tog=
gle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"=
),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function =
r(){e(t).each(function(){i(e(this)).removeClass("open")})}function =
i(t){var n=3Dt.attr("data-target"),r;return =
n||(n=3Dt.attr("href"),n=3Dn&&/#/.test(n)&&n.replace(/.*(?=3D#[^\s]*$)/,"=
")),r=3De(n),r.length||(r=3Dt.parent()),r}var =
t=3D"[data-toggle=3Ddropdown]",n=3Dfunction(t){var =
n=3De(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dr=
opdown.data-api",function(){n.parent().removeClass("open")})};n.prototype=
=3D{constructor:n,toggle:function(t){var =
n=3De(this),s,o;if(n.is(".disabled, :disabled"))return;return =
s=3Di(n),o=3Ds.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),=
!1},keydown:function(t){var =
n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=3De(this),t.prevent=
Default(),t.stopPropagation();if(n.is(".disabled, =
:disabled"))return;o=3Di(n),u=3Do.hasClass("open");if(!u||u&&t.keyCode=3D=
=3D27)return n.click();r=3De("[role=3Dmenu] li:not(.divider) =
a",o);if(!r.length)return;a=3Dr.index(r.filter(":focus")),t.keyCode=3D=3D=
38&&a>0&&a--,t.keyCode=3D=3D40&&a ').appendTo(document.body),this.$backdrop.click(this.options.backdrop=3D=
=3D"static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this=
.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in=
"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown=
&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&=
this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.en=
d,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn=
.modal=3Dfunction(n){return this.each(function(){var =
r=3De(this),i=3Dr.data("modal"),s=3De.extend({},e.fn.modal.defaults,r.dat=
a(),typeof n=3D=3D"object"&&n);i||r.data("modal",i=3Dnew =
t(this,s)),typeof =
n=3D=3D"string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults=3D{backdro=
p:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=3Dt,e(document).on("clic=
k.modal.data-api",'[data-toggle=3D"modal"]',function(t){var =
n=3De(this),r=3Dn.attr("href"),i=3De(n.attr("data-target")||r&&r.replace(=
/.*(?=3D#[^\s]+$)/,"")),s=3Di.data("modal")?"toggle":e.extend({remote:!/#=
/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide"=
,function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(e,t){this.init("tooltip",e,t)};t.prototype=3D{constructor:t,=
init:function(t,n,r){var =
i,s;this.type=3Dt,this.$element=3De(n),this.options=3Dthis.getOptions(r),=
this.enabled=3D!0,this.options.trigger=3D=3D"click"?this.$element.on("cli=
ck."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.opti=
ons.trigger!=3D"manual"&&(i=3Dthis.options.trigger=3D=3D"hover"?"mouseent=
er":"focus",s=3Dthis.options.trigger=3D=3D"hover"?"mouseleave":"blur",thi=
s.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,th=
is)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.=
leave,this))),this.options.selector?this._options=3De.extend({},this.opti=
ons,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(=
t){return =
t=3De.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&=
&typeof =
t.delay=3D=3D"number"&&(t.delay=3D{show:t.delay,hide:t.delay}),t},enter:f=
unction(t){var =
n=3De(t.currentTarget)[this.type](this._options).data(this.type);if(!n.op=
tions.delay||!n.options.delay.show)return =
n.show();clearTimeout(this.timeout),n.hoverState=3D"in",this.timeout=3Dse=
tTimeout(function(){n.hoverState=3D=3D"in"&&n.show()},n.options.delay.sho=
w)},leave:function(t){var =
n=3De(t.currentTarget)[this.type](this._options).data(this.type);this.tim=
eout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hi=
de)return =
n.hide();n.hoverState=3D"out",this.timeout=3DsetTimeout(function(){n.hove=
rState=3D=3D"out"&&n.hide()},n.options.delay.hide)},show:function(){var =
e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=3Dthis.tip(),this.set=
Content(),this.options.animation&&e.addClass("fade"),s=3Dtypeof =
this.options.placement=3D=3D"function"?this.options.placement.call(this,e=
[0],this.$element[0]):this.options.placement,t=3D/in/.test(s),e.detach().=
css({top:0,left:0,display:"block"}).insertAfter(this.$element),n=3Dthis.g=
etPosition(t),r=3De[0].offsetWidth,i=3De[0].offsetHeight;switch(t?s.split=
(" =
")[1]:s){case"bottom":o=3D{top:n.top+n.height,left:n.left+n.width/2-r/2};=
break;case"top":o=3D{top:n.top-i,left:n.left+n.width/2-r/2};break;case"le=
ft":o=3D{top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o=3D{t=
op:n.top+n.height/2-i/2,left:n.left+n.width}}e.offset(o).addClass(s).addC=
lass("in")}},setContent:function(){var =
e=3Dthis.tip(),t=3Dthis.getTitle();e.find(".tooltip-inner")[this.options.=
html?"html":"text"](t),e.removeClass("fade in top bottom left =
right")},hide:function(){function r(){var =
t=3DsetTimeout(function(){n.off(e.support.transition.end).detach()},500);=
n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}va=
r t=3Dthis,n=3Dthis.tip();return =
n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():=
n.detach(),this},fixTitle:function(){var =
e=3Dthis.$element;(e.attr("title")||typeof =
e.attr("data-original-title")!=3D"string")&&e.attr("data-original-title",=
e.attr("title")||"").removeAttr("title")},hasContent:function(){return =
this.getTitle()},getPosition:function(t){return =
e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[=
0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(=
){var e,t=3Dthis.$element,n=3Dthis.options;return =
e=3Dt.attr("data-original-title")||(typeof =
n.title=3D=3D"function"?n.title.call(t[0]):n.title),e},tip:function(){ret=
urn =
this.$tip=3Dthis.$tip||e(this.options.template)},validate:function(){this=
.$element[0].parentNode||(this.hide(),this.$element=3Dnull,this.options=3D=
null)},enable:function(){this.enabled=3D!0},disable:function(){this.enabl=
ed=3D!1},toggleEnabled:function(){this.enabled=3D!this.enabled},toggle:fu=
nction(t){var =
n=3De(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip(=
).hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$elemen=
t.off("."+this.type).removeData(this.type)}},e.fn.tooltip=3Dfunction(n){r=
eturn this.each(function(){var =
r=3De(this),i=3Dr.data("tooltip"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("tooltip",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.tooltip.Constructor=3Dt,e.fn.tooltip.defa=
ults=3D{animation:!0,placement:"top",selector:!1,template:'',trigger:"hover",title:"",delay:0,ht=
ml:!1}}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(e,t){this.init("popover",e,t)};t.prototype=3De.extend({},e.f=
n.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var =
e=3Dthis.tip(),t=3Dthis.getTitle(),n=3Dthis.getContent();e.find(".popover=
-title")[this.options.html?"html":"text"](t),e.find(".popover-content > =
*")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom =
left right in")},hasContent:function(){return =
this.getTitle()||this.getContent()},getContent:function(){var =
e,t=3Dthis.$element,n=3Dthis.options;return =
e=3Dt.attr("data-content")||(typeof =
n.content=3D=3D"function"?n.content.call(t[0]):n.content),e},tip:function=
(){return =
this.$tip||(this.$tip=3De(this.options.template)),this.$tip},destroy:func=
tion(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e=
.fn.popover=3Dfunction(n){return this.each(function(){var =
r=3De(this),i=3Dr.data("popover"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("popover",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.popover.Constructor=3Dt,e.fn.popover.defa=
ults=3De.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"clic=
k",content:"",template:''})}(window.jQuery),!f=
unction(e){"use strict";function t(t,n){var =
r=3De.proxy(this.process,this),i=3De(t).is("body")?e(window):e(t),s;this.=
options=3De.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=3Di.=
on("scroll.scroll-spy.data-api",r),this.selector=3D(this.options.target||=
(s=3De(t).attr("href"))&&s.replace(/.*(?=3D#[^\s]+$)/,"")||"")+" .nav li =
> =
a",this.$body=3De("body"),this.refresh(),this.process()}t.prototype=3D{co=
nstructor:t,refresh:function(){var =
t=3Dthis,n;this.offsets=3De([]),this.targets=3De([]),n=3Dthis.$body.find(=
this.selector).map(function(){var =
t=3De(this),n=3Dt.data("target")||t.attr("href"),r=3D/^#\w/.test(n)&&e(n)=
;return =
r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return =
e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1=
])})},process:function(){var =
e=3Dthis.$scrollElement.scrollTop()+this.options.offset,t=3Dthis.$scrollE=
lement[0].scrollHeight||this.$body[0].scrollHeight,n=3Dt-this.$scrollElem=
ent.height(),r=3Dthis.offsets,i=3Dthis.targets,s=3Dthis.activeTarget,o;if=
(e>=3Dn)return =
s!=3D(o=3Di.last()[0])&&this.activate(o);for(o=3Dr.length;o--;)s!=3Di[o]&=
&e>=3Dr[o]&&(!r[o+1]||e<=3Dr[o+1])&&this.activate(i[o])},activate:functio=
n(t){var =
n,r;this.activeTarget=3Dt,e(this.selector).parent(".active").removeClass(=
"active"),r=3Dthis.selector+'[data-target=3D"'+t+'"],'+this.selector+'[hr=
ef=3D"'+t+'"]',n=3De(r).parent("li").addClass("active"),n.parent(".dropdo=
wn-menu").length&&(n=3Dn.closest("li.dropdown").addClass("active")),n.tri=
gger("activate")}},e.fn.scrollspy=3Dfunction(n){return =
this.each(function(){var r=3De(this),i=3Dr.data("scrollspy"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("scrollspy",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.scrollspy.Constructor=3Dt,e.fn.scrollspy.=
defaults=3D{offset:10},e(window).on("load",function(){e('[data-spy=3D"scr=
oll"]').each(function(){var =
t=3De(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use =
strict";var =
t=3Dfunction(t){this.element=3De(t)};t.prototype=3D{constructor:t,show:fu=
nction(){var =
t=3Dthis.element,n=3Dt.closest("ul:not(.dropdown-menu)"),r=3Dt.attr("data=
-target"),i,s,o;r||(r=3Dt.attr("href"),r=3Dr&&r.replace(/.*(?=3D#[^\s]*$)=
/,""));if(t.parent("li").hasClass("active"))return;i=3Dn.find(".active:la=
st =
a")[0],o=3De.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultP=
revented())return;s=3De(r),this.activate(t.parent("li"),n),this.activate(=
s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},acti=
vate:function(t,n,r){function o(){i.removeClass("active").find("> =
.dropdown-menu > =
.active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,=
t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.clo=
sest("li.dropdown").addClass("active"),r&&r()}var i=3Dn.find("> =
.active"),s=3Dr&&e.support.transition&&i.hasClass("fade");s?i.one(e.suppo=
rt.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=3Dfunction(n){ret=
urn this.each(function(){var =
r=3De(this),i=3Dr.data("tab");i||r.data("tab",i=3Dnew t(this)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.tab.Constructor=3Dt,e(document).on("click=
.tab.data-api",'[data-toggle=3D"tab"], =
[data-toggle=3D"pill"]',function(t){t.preventDefault(),e(this).tab("show"=
)})}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(t,n){this.$element=3De(t),this.options=3De.extend({},e.fn.ty=
peahead.defaults,n),this.matcher=3Dthis.options.matcher||this.matcher,thi=
s.sorter=3Dthis.options.sorter||this.sorter,this.highlighter=3Dthis.optio=
ns.highlighter||this.highlighter,this.updater=3Dthis.options.updater||thi=
s.updater,this.$menu=3De(this.options.menu).appendTo("body"),this.source=3D=
this.options.source,this.shown=3D!1,this.listen()};t.prototype=3D{constru=
ctor:t,select:function(){var =
e=3Dthis.$menu.find(".active").attr("data-value");return =
this.$element.val(this.updater(e)).change(),this.hide()},updater:function=
(e){return e},show:function(){var =
t=3De.extend({},this.$element.offset(),{height:this.$element[0].offsetHei=
ght});return =
this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.s=
hown=3D!0,this},hide:function(){return =
this.$menu.hide(),this.shown=3D!1,this},lookup:function(t){var n;return =
this.query=3Dthis.$element.val(),!this.query||this.query.length"+t+""})},re=
nder:function(t){var n=3Dthis;return t=3De(t).map(function(t,r){return =
t=3De(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter=
(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:fu=
nction(t){var =
n=3Dthis.$menu.find(".active").removeClass("active"),r=3Dn.next();r.lengt=
h||(r=3De(this.$menu.find("li")[0])),r.addClass("active")},prev:function(=
e){var =
t=3Dthis.$menu.find(".active").removeClass("active"),n=3Dt.prev();n.lengt=
h||(n=3Dthis.$menu.find("li").last()),n.addClass("active")},listen:functi=
on(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.pro=
xy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSu=
pported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)=
),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.=
proxy(this.mouseenter,this))},eventSupported:function(e){var t=3De in =
this.$element;return =
t||(this.$element.setAttribute(e,"return;"),t=3Dtypeof =
this.$element[e]=3D=3D"function"),t},move:function(e){if(!this.shown)retu=
rn;switch(e.keyCode){case 9:case 13:case =
27:e.preventDefault();break;case =
38:e.preventDefault(),this.prev();break;case =
40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t=
){this.suppressKeyPressRepeat=3D!~e.inArray(t.keyCode,[40,38,9,13,27]),th=
is.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;th=
is.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case =
16:case 17:case 18:break;case 9:case =
13:if(!this.shown)return;this.select();break;case =
27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPr=
opagation(),e.preventDefault()},blur:function(e){var =
t=3Dthis;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPr=
opagation(),e.preventDefault(),this.select()},mouseenter:function(t){this=
.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass(=
"active")}},e.fn.typeahead=3Dfunction(n){return this.each(function(){var =
r=3De(this),i=3Dr.data("typeahead"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("typeahead",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.typeahead.defaults=3D{source:[],items:8,m=
enu:'',item:' ',minLength:1},e.fn.typeahead.Constructor=3Dt,e(docum=
ent).on("focus.typeahead.data-api",'[data-provide=3D"typeahead"]',functio=
n(t){var =
n=3De(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(=
n.data())})}(window.jQuery),!function(e){"use strict";var =
t=3Dfunction(t,n){this.options=3De.extend({},e.fn.affix.defaults,n),this.=
$window=3De(window).on("scroll.affix.data-api",e.proxy(this.checkPosition=
,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(t=
his.checkPosition,this),1)},this)),this.$element=3De(t),this.checkPositio=
n()};t.prototype.checkPosition=3Dfunction(){if(!this.$element.is(":visibl=
e"))return;var =
t=3De(document).height(),n=3Dthis.$window.scrollTop(),r=3Dthis.$element.o=
ffset(),i=3Dthis.options.offset,s=3Di.bottom,o=3Di.top,u=3D"affix =
affix-top affix-bottom",a;typeof i!=3D"object"&&(s=3Do=3Di),typeof =
o=3D=3D"function"&&(o=3Di.top()),typeof =
s=3D=3D"function"&&(s=3Di.bottom()),a=3Dthis.unpin!=3Dnull&&n+this.unpin<=
=3Dr.top?!1:s!=3Dnull&&r.top+this.$element.height()>=3Dt-s?"bottom":o!=3D=
null&&n<=3Do?"top":!1;if(this.affixed=3D=3D=3Da)return;this.affixed=3Da,t=
his.unpin=3Da=3D=3D"bottom"?r.top-n:null,this.$element.removeClass(u).add=
Class("affix"+(a?"-"+a:""))},e.fn.affix=3Dfunction(n){return =
this.each(function(){var r=3De(this),i=3Dr.data("affix"),s=3Dtypeof =
n=3D=3D"object"&&n;i||r.data("affix",i=3Dnew t(this,s)),typeof =
n=3D=3D"string"&&i[n]()})},e.fn.affix.Constructor=3Dt,e.fn.affix.defaults=
=3D{offset:0},e(window).on("load",function(){e('[data-spy=3D"affix"]').ea=
ch(function(){var =
t=3De(this),n=3Dt.data();n.offset=3Dn.offset||{},n.offsetBottom&&(n.offse=
t.bottom=3Dn.offsetBottom),n.offsetTop&&(n.offset.top=3Dn.offsetTop),t.af=
fix(n)})})}(window.jQuery);
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/shared/js/netteForms.js
/**
* NetteForms - simple form validation.
*
* This file is part of the Nette Framework.
* Copyright (c) 2004, 2012 David Grudl (http://davidgrudl.com)
*/
var Nette =3D Nette || {};
/**
* Attaches a handler to an event for the element.
*/
Nette.addEvent =3D function(element, on, callback) {
var original =3D element['on' + on];
element['on' + on] =3D function() {
if (typeof original =3D=3D=3D 'function' && original.apply(element, =
arguments) =3D=3D=3D false) {
return false;
}
return callback.apply(element, arguments);
};
};
/**
* Returns the value of form element.
*/
Nette.getValue =3D function(elem) {
var i, len;
if (!elem) {
return null;
} else if (!elem.nodeName) { // radio
for (i =3D 0, len =3D elem.length; i < len; i++) {
if (elem[i].checked) {
return elem[i].value;
}
}
return null;
} else if (elem.nodeName.toLowerCase() =3D=3D=3D 'select') {
var index =3D elem.selectedIndex, options =3D elem.options;
if (index < 0) {
return null;
} else if (elem.type =3D=3D=3D 'select-one') {
return options[index].value;
}
for (i =3D 0, values =3D [], len =3D options.length; i < len; i++) {
if (options[i].selected) {
values.push(options[i].value);
}
}
return values;
} else if (elem.type =3D=3D=3D 'checkbox') {
return elem.checked;
} else if (elem.type =3D=3D=3D 'radio') {
return Nette.getValue(elem.form.elements[elem.name].nodeName ? [elem] =
: elem.form.elements[elem.name]);
} else {
return elem.value.replace(/^\s+|\s+$/g, '');
}
};
/**
* Validates form element against given rules.
*/
Nette.validateControl =3D function(elem, rules, onlyCheck) {
rules =3D rules || eval('[' + (elem.getAttribute('data-nette-rules') || =
'') + ']');
for (var id =3D 0, len =3D rules.length; id < len; id++) {
var rule =3D rules[id], op =3D rule.op.match(/(~)?([^?]+)/);
rule.neg =3D op[1];
rule.op =3D op[2];
rule.condition =3D !!rule.rules;
var el =3D rule.control ? elem.form.elements[rule.control] : elem;
var success =3D Nette.validateRule(el, rule.op, rule.arg);
if (success =3D=3D=3D null) { continue; }
if (rule.neg) { success =3D !success; }
if (rule.condition && success) {
if (!Nette.validateControl(elem, rule.rules, onlyCheck)) {
return false;
}
} else if (!rule.condition && !success) {
if (el.disabled) { continue; }
if (!onlyCheck) {
Nette.addError(el, rule.msg.replace('%value', Nette.getValue(el)));
}
return false;
}
}
return true;
};
/**
* Validates whole form.
*/
Nette.validateForm =3D function(sender) {
var form =3D sender.form || sender;
if (form['nette-submittedBy'] && =
form['nette-submittedBy'].getAttribute('formnovalidate') !=3D=3D null) {
return true;
}
for (var i =3D 0; i < form.elements.length; i++) {
var elem =3D form.elements[i];
if (!(elem.nodeName.toLowerCase() in {input: 1, select: 1, textarea: =
1}) ||
(elem.type in {hidden: 1, submit: 1, image: 1, reset: 1}) ||
elem.disabled || elem.readonly
) {
continue;
}
if (!Nette.validateControl(elem)) {
return false;
}
}
return true;
};
/**
* Display error message.
*/
Nette.addError =3D function(elem, message) {
if (elem.focus) {
elem.focus();
}
if (message) {
alert(message);
}
};
/**
* Validates single rule.
*/
Nette.validateRule =3D function(elem, op, arg) {
var val =3D Nette.getValue(elem);
if (elem.getAttribute) {
if (val =3D=3D=3D elem.getAttribute('data-nette-empty-value')) { val =
=3D ''; }
}
if (op.charAt(0) =3D=3D=3D ':') {
op =3D op.substr(1);
}
op =3D op.replace('::', '_');
op =3D op.replace(/\\/g, '');
return Nette.validators[op] ? Nette.validators[op](elem, arg, val) : =
null;
};
Nette.validators =3D {
filled: function(elem, arg, val) {
return val !=3D=3D '' && val !=3D=3D false && val !=3D=3D null;
},
valid: function(elem, arg, val) {
return Nette.validateControl(elem, null, true);
},
equal: function(elem, arg, val) {
if (arg =3D=3D=3D undefined) {
return null;
}
arg =3D Nette.isArray(arg) ? arg : [arg];
for (var i =3D 0, len =3D arg.length; i < len; i++) {
if (val =3D=3D (arg[i].control ? =
Nette.getValue(elem.form.elements[arg[i].control]) : arg[i])) {
return true;
}
}
return false;
},
minLength: function(elem, arg, val) {
return val.length >=3D arg;
},
maxLength: function(elem, arg, val) {
return val.length <=3D arg;
},
length: function(elem, arg, val) {
arg =3D Nette.isArray(arg) ? arg : [arg, arg];
return (arg[0] =3D=3D=3D null || val.length >=3D arg[0]) && (arg[1] =
=3D=3D=3D null || val.length <=3D arg[1]);
},
email: function(elem, arg, val) {
return (/^("([ !\x23-\x5B\x5D-\x7E]*|\\[ =
-~])+"|[-a-z0-9!#$%&'*+/=3D?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=3D?^_`{|}~]+)*)=
@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{=
0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1E=
FF][-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EF=
F]$/i).test(val);
},
url: function(elem, arg, val) {
return =
(/^(https?:\/\/|(?=3D.*\.))([0-9a-z\u00C0-\u02FF\u0370-\u1EFF](([-0-9a-z\=
u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)*[=
a-z\u00C0-\u02FF\u0370-\u1EFF][-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a=
-z\u00C0-\u02FF\u0370-\u1EFF]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(:\d{1,5=
})?(\/\S*)?$/i).test(val);
},
regexp: function(elem, arg, val) {
var parts =3D typeof arg =3D=3D=3D 'string' ? =
arg.match(/^\/(.*)\/([imu]*)$/) : false;
if (parts) { try {
return (new RegExp(parts[1], parts[2].replace('u', ''))).test(val);
} catch (e) {} }
},
pattern: function(elem, arg, val) {
try {
return typeof arg =3D=3D=3D 'string' ? (new RegExp('^(' + arg + =
')$')).test(val) : null;
} catch (e) {}
},
integer: function(elem, arg, val) {
return (/^-?[0-9]+$/).test(val);
},
'float': function(elem, arg, val) {
return (/^-?[0-9]*[.,]?[0-9]+$/).test(val);
},
range: function(elem, arg, val) {
return Nette.isArray(arg) ?
((arg[0] =3D=3D=3D null || parseFloat(val) >=3D arg[0]) && (arg[1] =
=3D=3D=3D null || parseFloat(val) <=3D arg[1])) : null;
},
submitted: function(elem, arg, val) {
return elem.form['nette-submittedBy'] =3D=3D=3D elem;
}
};
/**
* Process all toggles in form.
*/
Nette.toggleForm =3D function(form) {
for (var i =3D 0; i < form.elements.length; i++) {
if (form.elements[i].nodeName.toLowerCase() in {input: 1, select: 1, =
textarea: 1, button: 1}) {
Nette.toggleControl(form.elements[i]);
}
}
};
/**
* Process toggles on form element.
*/
Nette.toggleControl =3D function(elem, rules, firsttime) {
rules =3D rules || eval('[' + (elem.getAttribute('data-nette-rules') || =
'') + ']');
var has =3D false, __hasProp =3D Object.prototype.hasOwnProperty, =
handler =3D function() { Nette.toggleForm(elem.form); };
for (var id =3D 0, len =3D rules.length; id < len; id++) {
var rule =3D rules[id], op =3D rule.op.match(/(~)?([^?]+)/);
rule.neg =3D op[1];
rule.op =3D op[2];
rule.condition =3D !!rule.rules;
if (!rule.condition) { continue; }
var el =3D rule.control ? elem.form.elements[rule.control] : elem;
var success =3D Nette.validateRule(el, rule.op, rule.arg);
if (success =3D=3D=3D null) { continue; }
if (rule.neg) { success =3D !success; }
if (Nette.toggleControl(elem, rule.rules, firsttime) || rule.toggle) {
has =3D true;
if (firsttime) {
if (!el.nodeName) { // radio
for (var i =3D 0; i < el.length; i++) {
Nette.addEvent(el[i], 'click', handler);
}
} else if (el.nodeName.toLowerCase() =3D=3D=3D 'select') {
Nette.addEvent(el, 'change', handler);
} else {
Nette.addEvent(el, 'click', handler);
}
}
for (var id2 in rule.toggle || []) {
if (__hasProp.call(rule.toggle, id2)) { Nette.toggle(id2, success ? =
rule.toggle[id2] : !rule.toggle[id2]); }
}
}
}
return has;
};
/**
* Displays or hides HTML element.
*/
Nette.toggle =3D function(id, visible) {
var elem =3D document.getElementById(id);
if (elem) {
elem.style.display =3D visible ? '' : 'none';
}
};
/**
* Setup handlers.
*/
Nette.initForm =3D function(form) {
form.noValidate =3D 'novalidate';
Nette.addEvent(form, 'submit', function() {
return Nette.validateForm(form);
});
Nette.addEvent(form, 'click', function(e) {
e =3D e || event;
var target =3D e.target || e.srcElement;
form['nette-submittedBy'] =3D (target.type in {submit: 1, image: 1}) ? =
target : null;
});
for (var i =3D 0; i < form.elements.length; i++) {
Nette.toggleControl(form.elements[i], null, true);
}
if (/MSIE/.exec(navigator.userAgent)) {
var labels =3D {},
wheelHandler =3D function() { return false; },
clickHandler =3D function() { =
document.getElementById(this.htmlFor).focus(); return false; };
for (i =3D 0, elms =3D form.getElementsByTagName('label'); i < =
elms.length; i++) {
labels[elms[i].htmlFor] =3D elms[i];
}
for (i =3D 0, elms =3D form.getElementsByTagName('select'); i < =
elms.length; i++) {
Nette.addEvent(elms[i], 'mousewheel', wheelHandler); // prevents =
accidental change in IE
if (labels[elms[i].htmlId]) {
Nette.addEvent(labels[elms[i].htmlId], 'click', clickHandler); // =
prevents deselect in IE 5 - 6
}
}
}
};
/**
* Determines whether the argument is an array.
*/
Nette.isArray =3D function(arg) {
return Object.prototype.toString.call(arg) =3D=3D=3D '[object Array]';
};
Nette.addEvent(window, 'load', function() {
for (var i =3D 0; i < document.forms.length; i++) {
Nette.initForm(document.forms[i]);
}
});
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/shared/libs/nette.ajax.js-1.2.0/nette.ajax.js
/**=0A=
* AJAX Nette Framework plugin for jQuery=0A=
*=0A=
* @copyright Copyright (c) 2009, 2010 Jan Marek=0A=
* @copyright Copyright (c) 2009, 2010 David Grudl=0A=
* @copyright Copyright (c) 2012 Vojt=C4=9Bch Dobe=C5=A1=0A=
* @license MIT=0A=
*/=0A=
=0A=
(function($, undefined) {=0A=
=0A=
if (typeof $ !=3D 'function') {=0A=
return console.error('nette.ajax.js: jQuery is missing, load it =
please');=0A=
}=0A=
=0A=
var nette =3D function () {=0A=
var inner =3D {=0A=
self: this,=0A=
initialized: false,=0A=
contexts: {},=0A=
on: {=0A=
init: {},=0A=
load: {},=0A=
before: {},=0A=
start: {},=0A=
success: {},=0A=
complete: {},=0A=
error: {}=0A=
},=0A=
fire: function () {=0A=
var result =3D true;=0A=
var args =3D Array.prototype.slice.call(arguments);=0A=
var props =3D args.shift();=0A=
var name =3D (typeof props =3D=3D 'string') ? props : props.name;=0A=
var off =3D (typeof props =3D=3D 'object') ? props.off || {} : {};=0A=
args.push(inner.self);=0A=
$.each(inner.on[name], function (index, reaction) {=0A=
if (reaction =3D=3D=3D undefined || $.inArray(index, off) !=3D=3D =
-1) return true;=0A=
var temp =3D reaction.apply(inner.contexts[index], args);=0A=
return result =3D (temp =3D=3D=3D undefined || temp);=0A=
});=0A=
return result;=0A=
},=0A=
requestHandler: function (e) {=0A=
if (!inner.self.ajax({}, this, e)) return;=0A=
},=0A=
ext: function (callbacks, context, name) {=0A=
while (!name) {=0A=
name =3D 'ext_' + Math.random();=0A=
if (inner.contexts[name]) {=0A=
name =3D undefined;=0A=
}=0A=
}=0A=
=0A=
$.each(callbacks, function (event, callback) {=0A=
inner.on[event][name] =3D callback;=0A=
});=0A=
inner.contexts[name] =3D $.extend(context ? context : {}, {=0A=
name: function () {=0A=
return name;=0A=
},=0A=
ext: function (name, force) {=0A=
var ext =3D inner.contexts[name];=0A=
if (!ext && force) throw "Extension '" + this.name() + "' depends =
on disabled extension '" + name + "'.";=0A=
return ext;=0A=
}=0A=
});=0A=
}=0A=
};=0A=
=0A=
/**=0A=
* Allows manipulation with extensions.=0A=
* When called with 1. argument only, it returns extension with given =
name.=0A=
* When called with 2. argument equal to false, it removes extension =
entirely.=0A=
* When called with 2. argument equal to hash of event callbacks, it =
adds new extension.=0A=
*=0A=
* @param {string} Name of extension=0A=
* @param {bool|object|null} Set of callbacks for any events OR false =
for removing extension.=0A=
* @param {object|null} Context for added extension=0A=
* @return {$.nette|object} Provides a fluent interface OR returns =
extensions with given name=0A=
*/=0A=
this.ext =3D function (name, callbacks, context) {=0A=
if (typeof name =3D=3D 'object') {=0A=
inner.ext(name, callbacks);=0A=
} else if (callbacks =3D=3D=3D undefined) {=0A=
return inner.contexts[name];=0A=
} else if (!callbacks) {=0A=
$.each(['init', 'load', 'before', 'start', 'success', 'complete', =
'error'], function (index, event) {=0A=
inner.on[event][name] =3D undefined;=0A=
});=0A=
inner.contexts[name] =3D undefined;=0A=
} else if (typeof name =3D=3D 'string' && inner.contexts[name] !=3D=3D =
undefined) {=0A=
throw 'Cannot override already registered nette-ajax extension.';=0A=
} else {=0A=
inner.ext(callbacks, context, name);=0A=
}=0A=
return this;=0A=
};=0A=
=0A=
/**=0A=
* Initializes the plugin:=0A=
* - fires 'init' event, then 'load' event=0A=
* - when called with any arguments, it will override default 'init' =
extension=0A=
* with provided callbacks=0A=
*=0A=
* @param {function|object|null} Callback for 'load' event or entire =
set of callbacks for any events=0A=
* @param {object|null} Context provided for callbacks in first =
argument=0A=
* @return {$.nette} Provides a fluent interface=0A=
*/=0A=
this.init =3D function (load, loadContext) {=0A=
if (inner.initialized) throw 'Cannot initialize nette-ajax twice.';=0A=
=0A=
if (typeof load =3D=3D 'function') {=0A=
this.ext('init', null);=0A=
this.ext('init', {=0A=
load: load=0A=
}, loadContext);=0A=
} else if (typeof load =3D=3D 'object') {=0A=
this.ext('init', null);=0A=
this.ext('init', load, loadContext);=0A=
} else if (load !=3D=3D undefined) {=0A=
throw 'Argument of init() can be function or function-hash only.';=0A=
}=0A=
=0A=
inner.initialized =3D true;=0A=
=0A=
inner.fire('init');=0A=
this.load();=0A=
return this;=0A=
};=0A=
=0A=
/**=0A=
* Fires 'load' event=0A=
*=0A=
* @return {$.nette} Provides a fluent interface=0A=
*/=0A=
this.load =3D function () {=0A=
inner.fire('load', inner.requestHandler);=0A=
return this;=0A=
};=0A=
=0A=
/**=0A=
* Executes AJAX request. Attaches listeners and events.=0A=
*=0A=
* @param {object} settings=0A=
* @param {Element|null} ussually Anchor or Form=0A=
* @param {event|null} event causing the request=0A=
* @return {jqXHR|null}=0A=
*/=0A=
this.ajax =3D function (settings, ui, e) {=0A=
if (!settings.nette && ui && e) {=0A=
var $el =3D $(ui), xhr, originalBeforeSend;=0A=
var analyze =3D settings.nette =3D {=0A=
e: e,=0A=
ui: ui,=0A=
el: $el,=0A=
isForm: $el.is('form'),=0A=
isSubmit: $el.is('input[type=3Dsubmit]'),=0A=
isImage: $el.is('input[type=3Dimage]'),=0A=
form: null=0A=
};=0A=
=0A=
if (analyze.isSubmit || analyze.isImage) {=0A=
analyze.form =3D analyze.el.closest('form');=0A=
} else if (analyze.isForm) {=0A=
analyze.form =3D analyze.el;=0A=
}=0A=
=0A=
if (!settings.url) {=0A=
settings.url =3D analyze.form ? analyze.form.attr('action') : =
ui.href;=0A=
}=0A=
if (!settings.type) {=0A=
settings.type =3D analyze.form ? analyze.form.attr('method') : 'get';=0A=
}=0A=
=0A=
if ($el.is('[data-ajax-off]')) {=0A=
settings.off =3D $el.data('ajaxOff');=0A=
if (typeof settings.off =3D=3D 'string') settings.off =3D =
[settings.off];=0A=
}=0A=
}=0A=
=0A=
originalBeforeSend =3D settings.beforeSend;=0A=
settings.beforeSend =3D function (xhr, settings) {=0A=
if (originalBeforeSend) {=0A=
var result =3D originalBeforeSend(xhr, settings);=0A=
if (result !=3D=3D undefined && !result) return result;=0A=
}=0A=
return inner.fire({=0A=
name: 'before',=0A=
off: settings.off || {}=0A=
}, xhr, settings);=0A=
};=0A=
=0A=
xhr =3D $.ajax(settings);=0A=
=0A=
if (xhr) {=0A=
xhr.done(function (payload) {=0A=
inner.fire({=0A=
name: 'success',=0A=
off: settings.off || {}=0A=
}, payload);=0A=
}).fail(function (xhr, status, error) {=0A=
inner.fire({=0A=
name :'error',=0A=
off: settings.off || {}=0A=
}, xhr, status, error);=0A=
}).always(function () {=0A=
inner.fire({=0A=
name: 'complete',=0A=
off: settings.off || {}=0A=
});=0A=
});=0A=
inner.fire({=0A=
name: 'start',=0A=
off: settings.off || {}=0A=
}, xhr, settings);=0A=
}=0A=
return xhr;=0A=
};=0A=
};=0A=
=0A=
$.nette =3D new ($.extend(nette, $.nette ? $.nette : {}));=0A=
=0A=
$.fn.netteAjax =3D function (e, options) {=0A=
return $.nette.ajax(options || {}, this[0], e);=0A=
};=0A=
=0A=
$.nette.ext('validation', {=0A=
before: function (xhr, settings) {=0A=
if (!settings.nette) return true;=0A=
else var analyze =3D settings.nette;=0A=
var e =3D analyze.e;=0A=
=0A=
var validate =3D $.extend({=0A=
keys: true,=0A=
url: true,=0A=
form: true=0A=
}, settings.validate || (function () {=0A=
if (!analyze.el.is('[data-ajax-validate]')) return;=0A=
var attr =3D analyze.el.data('ajaxValidate');=0A=
if (attr =3D=3D=3D false) return {=0A=
keys: false,=0A=
url: false,=0A=
form: false=0A=
}; else if (typeof attr =3D=3D 'object') return attr;=0A=
})() || {});=0A=
=0A=
var passEvent =3D false;=0A=
if (analyze.el.attr('data-ajax-pass') !=3D=3D undefined) {=0A=
passEvent =3D analyze.el.data('ajaxPass');=0A=
passEvent =3D typeof passEvent =3D=3D 'bool' ? passEvent : true;=0A=
}=0A=
=0A=
if (validate.keys) {=0A=
// thx to @vrana=0A=
var explicitNoAjax =3D e.button || e.ctrlKey || e.shiftKey || =
e.altKey || e.metaKey;=0A=
=0A=
if (analyze.form) {=0A=
if (explicitNoAjax && analyze.isSubmit) {=0A=
this.explicitNoAjax =3D true;=0A=
return false;=0A=
} else if (analyze.isForm && this.explicitNoAjax) {=0A=
this.explicitNoAjax =3D false;=0A=
return false;=0A=
}=0A=
} else if (explicitNoAjax) return false;=0A=
}=0A=
=0A=
if (validate.form && analyze.form && !((analyze.isSubmit || =
analyze.isImage) && analyze.el.attr('formnovalidate') !=3D=3D =
undefined)) {=0A=
if (analyze.form.get(0).onsubmit && !analyze.form.get(0).onsubmit()) {=0A=
e.stopImmediatePropagation();=0A=
e.preventDefault();=0A=
return false;=0A=
}=0A=
}=0A=
=0A=
if (validate.url) {=0A=
// thx to @vrana=0A=
if (/:|^#/.test(analyze.form ? settings.url : =
analyze.el.attr('href'))) return false;=0A=
}=0A=
=0A=
if (!passEvent) {=0A=
e.stopPropagation();=0A=
e.preventDefault();=0A=
}=0A=
return true;=0A=
}=0A=
}, {=0A=
explicitNoAjax: false=0A=
});=0A=
=0A=
$.nette.ext('forms', {=0A=
success: function (payload) {=0A=
var snippets;=0A=
if (!window.Nette || !payload.snippets || !(snippets =3D =
this.ext('snippets'))) return;=0A=
=0A=
for (var id in payload.snippets) {=0A=
snippets.getElement(id).find('form').each(function() {=0A=
window.Nette.initForm(this);=0A=
});=0A=
}=0A=
},=0A=
before: function (xhr, settings) {=0A=
var analyze =3D settings.nette;=0A=
if (!analyze || !analyze.form) return;=0A=
var e =3D analyze.e;=0A=
var originalData =3D settings.data || {};=0A=
var formData =3D {};=0A=
=0A=
if (analyze.isSubmit) {=0A=
formData[analyze.el.attr('name')] =3D analyze.el.val() || '';=0A=
} else if (analyze.isImage) {=0A=
var offset =3D analyze.el.offset();=0A=
var name =3D analyze.el.attr('name');=0A=
var dataOffset =3D [ Math.max(0, e.pageX - offset.left), Math.max(0, =
e.pageY - offset.top) ];=0A=
=0A=
if (name.indexOf('[', 0) !=3D=3D -1) { // inside a container=0A=
formData[name] =3D dataOffset;=0A=
} else {=0A=
formData[name + '.x'] =3D dataOffset[0];=0A=
formData[name + '.y'] =3D dataOffset[1];=0A=
}=0A=
}=0A=
=0A=
if (typeof originalData !=3D 'string') {=0A=
originalData =3D $.param(originalData);=0A=
}=0A=
formData =3D $.param(formData);=0A=
settings.data =3D analyze.form.serialize() + (formData ? '&' + =
formData : '') + '&' + originalData;=0A=
=0A=
if (settings.contentType !=3D=3D false) {=0A=
xhr.setRequestHeader('Content-Type', settings.contentType);=0A=
}=0A=
}=0A=
});=0A=
=0A=
// default snippet handler=0A=
$.nette.ext('snippets', {=0A=
success: function (payload) {=0A=
if (payload.snippets) {=0A=
for (var i in payload.snippets) {=0A=
this.updateSnippet(i, payload.snippets[i]);=0A=
}=0A=
}=0A=
}=0A=
}, {=0A=
updateSnippet: function (id, html) {=0A=
var $el =3D this.getElement(id);=0A=
// Fix for setting document title in IE=0A=
if ($el.eq(0).tagName =3D=3D 'TITLE') {=0A=
document.title =3D html;=0A=
} else {=0A=
this.applySnippet($el, html);=0A=
}=0A=
},=0A=
getElement: function (id) {=0A=
return $('#' + this.escapeSelector(id));=0A=
},=0A=
applySnippet: function ($el, html) {=0A=
$el.html(html);=0A=
},=0A=
escapeSelector: function (selector) {=0A=
// thx to @uestla (https://github.com/uestla)=0A=
return =
selector.replace(/[\!"#\$%&'\(\)\*\+,\.\/:;<=3D>\?@\[\\\]\^`\{\|\}~]/g, =
'\\$&');=0A=
}=0A=
});=0A=
=0A=
// support $this->redirect()=0A=
$.nette.ext('redirect', {=0A=
success: function (payload) {=0A=
if (payload.redirect) {=0A=
window.location.href =3D payload.redirect;=0A=
return false;=0A=
}=0A=
}=0A=
});=0A=
=0A=
// current page state=0A=
$.nette.ext('state', {=0A=
success: function (payload) {=0A=
if (payload.state) {=0A=
this.state =3D payload.state;=0A=
}=0A=
}=0A=
}, {state: null});=0A=
=0A=
// abort last request if new started=0A=
$.nette.ext('unique', {=0A=
start: function (xhr) {=0A=
if (this.xhr) {=0A=
this.xhr.abort();=0A=
}=0A=
this.xhr =3D xhr;=0A=
},=0A=
complete: function () {=0A=
this.xhr =3D null;=0A=
}=0A=
}, {xhr: null});=0A=
=0A=
// option to abort by ESC (thx to @vrana)=0A=
$.nette.ext('abort', {=0A=
init: function () {=0A=
$('body').keydown($.proxy(function (e) {=0A=
if (this.xhr && (e.keyCode =3D=3D 27 // Esc=0A=
&& !(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey))=0A=
) {=0A=
this.xhr.abort();=0A=
}=0A=
}, this));=0A=
},=0A=
start: function (xhr) {=0A=
this.xhr =3D xhr;=0A=
},=0A=
complete: function () {=0A=
this.xhr =3D null;=0A=
}=0A=
}, {xhr: null});=0A=
=0A=
// default ajaxification (can be overridden in init())=0A=
$.nette.ext('init', {=0A=
load: function (rh) {=0A=
$(this.linkSelector).off('click.nette', rh).on('click.nette', rh);=0A=
var $forms =3D $(this.formSelector);=0A=
$forms.off('submit.nette', rh).on('submit.nette', rh);=0A=
$forms.off('click.nette', ':image', rh).on('click.nette', ':image', =
rh);=0A=
$forms.off('click.nette', ':submit', rh).on('click.nette', ':submit', =
rh);=0A=
=0A=
var buttonSelector =3D this.buttonSelector;=0A=
$(buttonSelector).each(function () {=0A=
$(this).closest('form')=0A=
.off('click.nette', buttonSelector, rh)=0A=
.on('click.nette', buttonSelector, rh);=0A=
});=0A=
},=0A=
success: function () {=0A=
$.nette.load();=0A=
}=0A=
}, {=0A=
linkSelector: 'a.ajax',=0A=
formSelector: 'form.ajax',=0A=
buttonSelector: 'input.ajax[type=3D"submit"], =
input.ajax[type=3D"image"]'=0A=
});=0A=
=0A=
})(window.jQuery);=0A=
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: 7bit
Content-Location: http://www.ptupraha.cz/theme/shared/js/nette.ajax.js
$(function () {
// Disable unique request checking
$.nette.ext('unique', null);
// Initialize library
$.nette.init();
// And you fly...
});
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/shared/js/jquery.cycle.all.js
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.9999.5 (10-APR-2012)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.3.2 or later
*/
;(function($, undefined) {
"use strict";
var ver =3D '2.9999.5';
// if $.support is not defined (pre jQuery 1.3) add what I need
if ($.support =3D=3D=3D undefined) {
$.support =3D {
opacity: !($.browser.msie)
};
}
function debug(s) {
if ($.fn.cycle.debug)
log(s);
} =09
function log() {
if (window.console && console.log)
console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
}
$.expr[':'].paused =3D function(el) {
return el.cyclePause;
};
// the options arg can be...
// a number - indicates an immediate transition should occur to the =
given slide index
// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', =
'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
// an object - properties to control the slideshow
//
// the arg2 arg can be...
// the name of an fx (only used in conjunction with a numeric value =
for 'options')
// the value true (only used in first arg =3D=3D 'resume') and =
indicates
// that the resume should occur immediately (not wait for next timeout)
$.fn.cycle =3D function(options, arg2) {
var o =3D { s: this.selector, c: this.context };
// in 1.3+ we can fix mistakes with the ready state
if (this.length =3D=3D=3D 0 && options !=3D 'stop') {
if (!$.isReady && o.s) {
log('DOM not ready, queuing slideshow');
$(function() {
$(o.s,o.c).cycle(options,arg2);
});
return this;
}
// is your DOM ready? =
http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
log('terminating; zero elements found by selector' + ($.isReady ? '' : =
' (DOM not ready)'));
return this;
}
// iterate the matched nodeset
return this.each(function() {
var opts =3D handleArguments(this, options, arg2);
if (opts =3D=3D=3D false)
return;
opts.updateActivePagerLink =3D opts.updateActivePagerLink || =
$.fn.cycle.updateActivePagerLink;
=09
// stop existing slideshow for this container (if there is one)
if (this.cycleTimeout)
clearTimeout(this.cycleTimeout);
this.cycleTimeout =3D this.cyclePause =3D 0;
this.cycleStop =3D 0; // issue #108
var $cont =3D $(this);
var $slides =3D opts.slideExpr ? $(opts.slideExpr, this) : =
$cont.children();
var els =3D $slides.get();
if (els.length < 2) {
log('terminating; too few slides: ' + els.length);
return;
}
var opts2 =3D buildOptions($cont, $slides, els, opts, o);
if (opts2 =3D=3D=3D false)
return;
var startTime =3D opts2.continuous ? 10 : =
getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, =
!opts2.backwards);
// if it's an auto slideshow, kick it off
if (startTime) {
startTime +=3D (opts2.delay || 0);
if (startTime < 10)
startTime =3D 10;
debug('first timeout: ' + startTime);
this.cycleTimeout =3D =
setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
}
});
};
function triggerPause(cont, byHover, onPager) {
var opts =3D $(cont).data('cycle.opts');
var paused =3D !!cont.cyclePause;
if (paused && opts.paused)
opts.paused(cont, opts, byHover, onPager);
else if (!paused && opts.resumed)
opts.resumed(cont, opts, byHover, onPager);
}
// process the args that were passed to the plugin fn
function handleArguments(cont, options, arg2) {
if (cont.cycleStop =3D=3D=3D undefined)
cont.cycleStop =3D 0;
if (options =3D=3D=3D undefined || options =3D=3D=3D null)
options =3D {};
if (options.constructor =3D=3D String) {
switch(options) {
case 'destroy':
case 'stop':
var opts =3D $(cont).data('cycle.opts');
if (!opts)
return false;
cont.cycleStop++; // callbacks look for change
if (cont.cycleTimeout)
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout =3D 0;
if (opts.elements)
$(opts.elements).stop();
$(cont).removeData('cycle.opts');
if (options =3D=3D 'destroy')
destroy(cont, opts);
return false;
case 'toggle':
cont.cyclePause =3D (cont.cyclePause =3D=3D=3D 1) ? 0 : 1;
checkInstantResume(cont.cyclePause, arg2, cont);
triggerPause(cont);
return false;
case 'pause':
cont.cyclePause =3D 1;
triggerPause(cont);
return false;
case 'resume':
cont.cyclePause =3D 0;
checkInstantResume(false, arg2, cont);
triggerPause(cont);
return false;
case 'prev':
case 'next':
opts =3D $(cont).data('cycle.opts');
if (!opts) {
log('options not found, "prev/next" ignored');
return false;
}
$.fn.cycle[options](opts);
return false;
default:
options =3D { fx: options };
}
return options;
}
else if (options.constructor =3D=3D Number) {
// go to the requested slide
var num =3D options;
options =3D $(cont).data('cycle.opts');
if (!options) {
log('options not found, can not advance slide');
return false;
}
if (num < 0 || num >=3D options.elements.length) {
log('invalid slide index: ' + num);
return false;
}
options.nextSlide =3D num;
if (cont.cycleTimeout) {
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout =3D 0;
}
if (typeof arg2 =3D=3D 'string')
options.oneTimeFx =3D arg2;
go(options.elements, options, 1, num >=3D options.currSlide);
return false;
}
return options;
=09
function checkInstantResume(isPaused, arg2, cont) {
if (!isPaused && arg2 =3D=3D=3D true) { // resume now!
var options =3D $(cont).data('cycle.opts');
if (!options) {
log('options not found, can not resume');
return false;
}
if (cont.cycleTimeout) {
clearTimeout(cont.cycleTimeout);
cont.cycleTimeout =3D 0;
}
go(options.elements, options, 1, !options.backwards);
}
}
}
function removeFilter(el, opts) {
if (!$.support.opacity && opts.cleartype && el.style.filter) {
try { el.style.removeAttribute('filter'); }
catch(smother) {} // handle old opera versions
}
}
// unbind event handlers
function destroy(cont, opts) {
if (opts.next)
$(opts.next).unbind(opts.prevNextEvent);
if (opts.prev)
$(opts.prev).unbind(opts.prevNextEvent);
=09
if (opts.pager || opts.pagerAnchorBuilder)
$.each(opts.pagerAnchors || [], function() {
this.unbind().remove();
});
opts.pagerAnchors =3D null;
$(cont).unbind('mouseenter.cycle mouseleave.cycle');
if (opts.destroy) // callback
opts.destroy(opts);
}
// one-time initialization
function buildOptions($cont, $slides, els, options, o) {
var startingSlideSpecified;
// support metadata plugin (v1.0 and v2.0)
var opts =3D $.extend({}, $.fn.cycle.defaults, options || {}, =
$.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
var meta =3D $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : =
null;
if (meta)
opts =3D $.extend(opts, meta);
if (opts.autostop)
opts.countdown =3D opts.autostopCount || els.length;
var cont =3D $cont[0];
$cont.data('cycle.opts', opts);
opts.$cont =3D $cont;
opts.stopCount =3D cont.cycleStop;
opts.elements =3D els;
opts.before =3D opts.before ? [opts.before] : [];
opts.after =3D opts.after ? [opts.after] : [];
// push some after callbacks
if (!$.support.opacity && opts.cleartype)
opts.after.push(function() { removeFilter(this, opts); });
if (opts.continuous)
opts.after.push(function() { go(els,opts,0,!opts.backwards); });
saveOriginalOpts(opts);
// clearType corrections
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
clearTypeFix($slides);
// container requires non-static position so that slides can be =
position within
if ($cont.css('position') =3D=3D 'static')
$cont.css('position', 'relative');
if (opts.width)
$cont.width(opts.width);
if (opts.height && opts.height !=3D 'auto')
$cont.height(opts.height);
if (opts.startingSlide !=3D=3D undefined) {
opts.startingSlide =3D parseInt(opts.startingSlide,10);
if (opts.startingSlide >=3D els.length || opts.startSlide < 0)
opts.startingSlide =3D 0; // catch bogus input
else=20
startingSlideSpecified =3D true;
}
else if (opts.backwards)
opts.startingSlide =3D els.length - 1;
else
opts.startingSlide =3D 0;
// if random, mix up the slide array
if (opts.random) {
opts.randomMap =3D [];
for (var i =3D 0; i < els.length; i++)
opts.randomMap.push(i);
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
if (startingSlideSpecified) {
// try to find the specified starting slide and if found set start =
slide index in the map accordingly
for ( var cnt =3D 0; cnt < els.length; cnt++ ) {
if ( opts.startingSlide =3D=3D opts.randomMap[cnt] ) {
opts.randomIndex =3D cnt;
}
}
}
else {
opts.randomIndex =3D 1;
opts.startingSlide =3D opts.randomMap[1];
}
}
else if (opts.startingSlide >=3D els.length)
opts.startingSlide =3D 0; // catch bogus input
opts.currSlide =3D opts.startingSlide || 0;
var first =3D opts.startingSlide;
// set position and zIndex on all the slides
$slides.css({position: 'absolute', top:0, =
left:0}).hide().each(function(i) {
var z;
if (opts.backwards)
z =3D first ? i <=3D first ? els.length + (i-first) : first-i : =
els.length-i;
else
z =3D first ? i >=3D first ? els.length - (i-first) : first-i : =
els.length-i;
$(this).css('z-index', z);
});
// make sure first slide is visible
$(els[first]).css('opacity',1).show(); // opacity bit needed to handle =
restart use case
removeFilter(els[first], opts);
// stretch slides
if (opts.fit) {
if (!opts.aspect) {
if (opts.width)
$slides.width(opts.width);
if (opts.height && opts.height !=3D 'auto')
$slides.height(opts.height);
} else {
$slides.each(function(){
var $slide =3D $(this);
var ratio =3D (opts.aspect =3D=3D=3D true) ? =
$slide.width()/$slide.height() : opts.aspect;
if( opts.width && $slide.width() !=3D opts.width ) {
$slide.width( opts.width );
$slide.height( opts.width / ratio );
}
if( opts.height && $slide.height() < opts.height ) {
$slide.height( opts.height );
$slide.width( opts.height * ratio );
}
});
}
}
if (opts.center && ((!opts.fit) || opts.aspect)) {
$slides.each(function(){
var $slide =3D $(this);
$slide.css({
"margin-left": opts.width ?
((opts.width - $slide.width()) / 2) + "px" :
0,
"margin-top": opts.height ?
((opts.height - $slide.height()) / 2) + "px" :
0
});
});
}
if (opts.center && !opts.fit && !opts.slideResize) {
$slides.each(function(){
var $slide =3D $(this);
$slide.css({
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + =
"px" : 0,
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + =
"px" : 0
});
});
}
=09
// stretch container
var reshape =3D opts.containerResize && !$cont.innerHeight();
if (reshape) { // do this only if container has no size =
http://tinyurl.com/da2oa9
var maxw =3D 0, maxh =3D 0;
for(var j=3D0; j < els.length; j++) {
var $e =3D $(els[j]), e =3D $e[0], w =3D $e.outerWidth(), h =3D =
$e.outerHeight();
if (!w) w =3D e.offsetWidth || e.width || $e.attr('width');
if (!h) h =3D e.offsetHeight || e.height || $e.attr('height');
maxw =3D w > maxw ? w : maxw;
maxh =3D h > maxh ? h : maxh;
}
if (maxw > 0 && maxh > 0)
$cont.css({width:maxw+'px',height:maxh+'px'});
}
var pauseFlag =3D false; // https://github.com/malsup/cycle/issues/44
if (opts.pause)
$cont.bind('mouseenter.cycle', function(){
pauseFlag =3D true;
this.cyclePause++;
triggerPause(cont, true);
}).bind('mouseleave.cycle', function(){
if (pauseFlag)
this.cyclePause--;
triggerPause(cont, true);
});
if (supportMultiTransitions(opts) =3D=3D=3D false)
return false;
// apparently a lot of people use image slideshows without height/width =
attributes on the images.
// Cycle 2.50+ requires the sizing info for every slide; this block =
tries to deal with that.
var requeue =3D false;
options.requeueAttempts =3D options.requeueAttempts || 0;
$slides.each(function() {
// try to get height/width of each slide
var $el =3D $(this);
this.cycleH =3D (opts.fit && opts.height) ? opts.height : =
($el.height() || this.offsetHeight || this.height || $el.attr('height') =
|| 0);
this.cycleW =3D (opts.fit && opts.width) ? opts.width : ($el.width() =
|| this.offsetWidth || this.width || $el.attr('width') || 0);
if ( $el.is('img') ) {
// sigh.. sniffing, hacking, shrugging... this crappy hack tries to =
account for what browsers do when
// an image is being downloaded and the markup did not include sizing =
info (height/width attributes);
// there seems to be some "default" sizes used in this situation
var loadingIE =3D ($.browser.msie && this.cycleW =3D=3D 28 && =
this.cycleH =3D=3D 30 && !this.complete);
var loadingFF =3D ($.browser.mozilla && this.cycleW =3D=3D 34 && =
this.cycleH =3D=3D 19 && !this.complete);
var loadingOp =3D ($.browser.opera && ((this.cycleW =3D=3D 42 && =
this.cycleH =3D=3D 19) || (this.cycleW =3D=3D 37 && this.cycleH =3D=3D =
17)) && !this.complete);
var loadingOther =3D (this.cycleH =3D=3D=3D 0 && this.cycleW =
=3D=3D=3D 0 && !this.complete);
// don't requeue for images that are still loading but have a valid =
size
if (loadingIE || loadingFF || loadingOp || loadingOther) {
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts =
< 100) { // track retry count so we don't loop forever
log(options.requeueAttempts,' - img slide not loaded, requeuing =
slideshow: ', this.src, this.cycleW, this.cycleH);
setTimeout(function() {$(o.s,o.c).cycle(options);}, =
opts.requeueTimeout);
requeue =3D true;
return false; // break each loop
}
else {
log('could not determine size of image: '+this.src, this.cycleW, =
this.cycleH);
}
}
}
return true;
});
if (requeue)
return false;
opts.cssBefore =3D opts.cssBefore || {};
opts.cssAfter =3D opts.cssAfter || {};
opts.cssFirst =3D opts.cssFirst || {};
opts.animIn =3D opts.animIn || {};
opts.animOut =3D opts.animOut || {};
$slides.not(':eq('+first+')').css(opts.cssBefore);
$($slides[first]).css(opts.cssFirst);
if (opts.timeout) {
opts.timeout =3D parseInt(opts.timeout,10);
// ensure that timeout and speed settings are sane
if (opts.speed.constructor =3D=3D String)
opts.speed =3D $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
if (!opts.sync)
opts.speed =3D opts.speed / 2;
=09
var buffer =3D opts.fx =3D=3D 'none' ? 0 : opts.fx =3D=3D 'shuffle' ? =
500 : 250;
while((opts.timeout - opts.speed) < buffer) // sanitize timeout
opts.timeout +=3D opts.speed;
}
if (opts.easing)
opts.easeIn =3D opts.easeOut =3D opts.easing;
if (!opts.speedIn)
opts.speedIn =3D opts.speed;
if (!opts.speedOut)
opts.speedOut =3D opts.speed;
opts.slideCount =3D els.length;
opts.currSlide =3D opts.lastSlide =3D first;
if (opts.random) {
if (++opts.randomIndex =3D=3D els.length)
opts.randomIndex =3D 0;
opts.nextSlide =3D opts.randomMap[opts.randomIndex];
}
else if (opts.backwards)
opts.nextSlide =3D opts.startingSlide =3D=3D=3D 0 ? (els.length-1) : =
opts.startingSlide-1;
else
opts.nextSlide =3D opts.startingSlide >=3D (els.length-1) ? 0 : =
opts.startingSlide+1;
// run transition init fn
if (!opts.multiFx) {
var init =3D $.fn.cycle.transitions[opts.fx];
if ($.isFunction(init))
init($cont, $slides, opts);
else if (opts.fx !=3D 'custom' && !opts.multiFx) {
log('unknown transition: ' + opts.fx,'; slideshow terminating');
return false;
}
}
// fire artificial events
var e0 =3D $slides[first];
if (!opts.skipInitializationCallbacks) {
if (opts.before.length)
opts.before[0].apply(e0, [e0, e0, opts, true]);
if (opts.after.length)
opts.after[0].apply(e0, [e0, e0, opts, true]);
}
if (opts.next)
$(opts.next).bind(opts.prevNextEvent,function(){return =
advance(opts,1);});
if (opts.prev)
$(opts.prev).bind(opts.prevNextEvent,function(){return =
advance(opts,0);});
if (opts.pager || opts.pagerAnchorBuilder)
buildPager(els,opts);
exposeAddSlide(opts, els);
return opts;
}
// save off original opts so we can restore after clearing state
function saveOriginalOpts(opts) {
opts.original =3D { before: [], after: [] };
opts.original.cssBefore =3D $.extend({}, opts.cssBefore);
opts.original.cssAfter =3D $.extend({}, opts.cssAfter);
opts.original.animIn =3D $.extend({}, opts.animIn);
opts.original.animOut =3D $.extend({}, opts.animOut);
$.each(opts.before, function() { opts.original.before.push(this); });
$.each(opts.after, function() { opts.original.after.push(this); });
}
function supportMultiTransitions(opts) {
var i, tx, txs =3D $.fn.cycle.transitions;
// look for multiple effects
if (opts.fx.indexOf(',') > 0) {
opts.multiFx =3D true;
opts.fxs =3D opts.fx.replace(/\s*/g,'').split(',');
// discard any bogus effect names
for (i=3D0; i < opts.fxs.length; i++) {
var fx =3D opts.fxs[i];
tx =3D txs[fx];
if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
log('discarding unknown transition: ',fx);
opts.fxs.splice(i,1);
i--;
}
}
// if we have an empty list then we threw everything away!
if (!opts.fxs.length) {
log('No valid transitions named; slideshow terminating.');
return false;
}
}
else if (opts.fx =3D=3D 'all') { // auto-gen the list of transitions
opts.multiFx =3D true;
opts.fxs =3D [];
for (var p in txs) {
if (txs.hasOwnProperty(p)) {
tx =3D txs[p];
if (txs.hasOwnProperty(p) && $.isFunction(tx))
opts.fxs.push(p);
}
}
}
if (opts.multiFx && opts.randomizeEffects) {
// munge the fxs array to make effect selection random
var r1 =3D Math.floor(Math.random() * 20) + 30;
for (i =3D 0; i < r1; i++) {
var r2 =3D Math.floor(Math.random() * opts.fxs.length);
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
}
debug('randomized fx sequence: ',opts.fxs);
}
return true;
}
// provide a mechanism for adding slides after the slideshow has started
function exposeAddSlide(opts, els) {
opts.addSlide =3D function(newSlide, prepend) {
var $s =3D $(newSlide), s =3D $s[0];
if (!opts.autostopCount)
opts.countdown++;
els[prepend?'unshift':'push'](s);
if (opts.els)
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
opts.slideCount =3D els.length;
// add the slide to the random map and resort
if (opts.random) {
opts.randomMap.push(opts.slideCount-1);
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
}
$s.css('position','absolute');
$s[prepend?'prependTo':'appendTo'](opts.$cont);
if (prepend) {
opts.currSlide++;
opts.nextSlide++;
}
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
clearTypeFix($s);
if (opts.fit && opts.width)
$s.width(opts.width);
if (opts.fit && opts.height && opts.height !=3D 'auto')
$s.height(opts.height);
s.cycleH =3D (opts.fit && opts.height) ? opts.height : $s.height();
s.cycleW =3D (opts.fit && opts.width) ? opts.width : $s.width();
$s.css(opts.cssBefore);
if (opts.pager || opts.pagerAnchorBuilder)
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, =
opts);
if ($.isFunction(opts.onAddSlide))
opts.onAddSlide($s);
else
$s.hide(); // default behavior
};
}
// reset internal state; we do this on every pass in order to support =
multiple effects
$.fn.cycle.resetState =3D function(opts, fx) {
fx =3D fx || opts.fx;
opts.before =3D []; opts.after =3D [];
opts.cssBefore =3D $.extend({}, opts.original.cssBefore);
opts.cssAfter =3D $.extend({}, opts.original.cssAfter);
opts.animIn =3D $.extend({}, opts.original.animIn);
opts.animOut =3D $.extend({}, opts.original.animOut);
opts.fxFn =3D null;
$.each(opts.original.before, function() { opts.before.push(this); });
$.each(opts.original.after, function() { opts.after.push(this); });
// re-init
var init =3D $.fn.cycle.transitions[fx];
if ($.isFunction(init))
init(opts.$cont, $(opts.elements), opts);
};
// this is the main engine fn, it handles the timeouts, callbacks and =
slide index mgmt
function go(els, opts, manual, fwd) {
var p =3D opts.$cont[0], curr =3D els[opts.currSlide], next =3D =
els[opts.nextSlide];
// opts.busy is true if we're in the middle of an animation
if (manual && opts.busy && opts.manualTrump) {
// let manual transitions requests trump active ones
debug('manualTrump in go(), stopping active transition');
$(els).stop(true,true);
opts.busy =3D 0;
clearTimeout(p.cycleTimeout);
}
// don't begin another timeout-based transition if there is one active
if (opts.busy) {
debug('transition active, ignoring new tx request');
return;
}
// stop cycling if we have an outstanding stop request
if (p.cycleStop !=3D opts.stopCount || p.cycleTimeout =3D=3D=3D 0 && =
!manual)
return;
// check to see if we should stop cycling based on autostop options
if (!manual && !p.cyclePause && !opts.bounce &&
((opts.autostop && (--opts.countdown <=3D 0)) ||
(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
if (opts.end)
opts.end(opts);
return;
}
// if slideshow is paused, only transition on a manual trigger
var changed =3D false;
if ((manual || !p.cyclePause) && (opts.nextSlide !=3D opts.currSlide)) =
{
changed =3D true;
var fx =3D opts.fx;
// keep trying to get the slide size if we don't have it yet
curr.cycleH =3D curr.cycleH || $(curr).height();
curr.cycleW =3D curr.cycleW || $(curr).width();
next.cycleH =3D next.cycleH || $(next).height();
next.cycleW =3D next.cycleW || $(next).width();
// support multiple transition types
if (opts.multiFx) {
if (fwd && (opts.lastFx =3D=3D=3D undefined || ++opts.lastFx >=3D =
opts.fxs.length))
opts.lastFx =3D 0;
else if (!fwd && (opts.lastFx =3D=3D=3D undefined || --opts.lastFx < =
0))
opts.lastFx =3D opts.fxs.length - 1;
fx =3D opts.fxs[opts.lastFx];
}
// one-time fx overrides apply to: $('div').cycle(3,'zoom');
if (opts.oneTimeFx) {
fx =3D opts.oneTimeFx;
opts.oneTimeFx =3D null;
}
$.fn.cycle.resetState(opts, fx);
// run the before callbacks
if (opts.before.length)
$.each(opts.before, function(i,o) {
if (p.cycleStop !=3D opts.stopCount) return;
o.apply(next, [curr, next, opts, fwd]);
});
// stage the after callacks
var after =3D function() {
opts.busy =3D 0;
$.each(opts.after, function(i,o) {
if (p.cycleStop !=3D opts.stopCount) return;
o.apply(next, [curr, next, opts, fwd]);
});
if (!p.cycleStop) {
// queue next transition
queueNext();
}
};
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; =
nextSlide: ' + opts.nextSlide);
=09
// get ready to perform the transition
opts.busy =3D 1;
if (opts.fxFn) // fx function provided?
opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && =
opts.fastOnEvent);
else
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && =
opts.fastOnEvent);
}
else {
queueNext();
}
if (changed || opts.nextSlide =3D=3D opts.currSlide) {
// calculate the next slide
var roll;
opts.lastSlide =3D opts.currSlide;
if (opts.random) {
opts.currSlide =3D opts.nextSlide;
if (++opts.randomIndex =3D=3D els.length) {
opts.randomIndex =3D 0;
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
}
opts.nextSlide =3D opts.randomMap[opts.randomIndex];
if (opts.nextSlide =3D=3D opts.currSlide)
opts.nextSlide =3D (opts.currSlide =3D=3D opts.slideCount - 1) ? 0 : =
opts.currSlide + 1;
}
else if (opts.backwards) {
roll =3D (opts.nextSlide - 1) < 0;
if (roll && opts.bounce) {
opts.backwards =3D !opts.backwards;
opts.nextSlide =3D 1;
opts.currSlide =3D 0;
}
else {
opts.nextSlide =3D roll ? (els.length-1) : opts.nextSlide-1;
opts.currSlide =3D roll ? 0 : opts.nextSlide+1;
}
}
else { // sequence
roll =3D (opts.nextSlide + 1) =3D=3D els.length;
if (roll && opts.bounce) {
opts.backwards =3D !opts.backwards;
opts.nextSlide =3D els.length-2;
opts.currSlide =3D els.length-1;
}
else {
opts.nextSlide =3D roll ? 0 : opts.nextSlide+1;
opts.currSlide =3D roll ? els.length-1 : opts.nextSlide-1;
}
}
}
if (changed && opts.pager)
opts.updateActivePagerLink(opts.pager, opts.currSlide, =
opts.activePagerClass);
=09
function queueNext() {
// stage the next transition
var ms =3D 0, timeout =3D opts.timeout;
if (opts.timeout && !opts.continuous) {
ms =3D getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, =
fwd);
if (opts.fx =3D=3D 'shuffle')
ms -=3D opts.speedOut;
}
else if (opts.continuous && p.cyclePause) // continuous shows work off =
an after callback, not this timer logic
ms =3D 10;
if (ms > 0)
p.cycleTimeout =3D setTimeout(function(){ go(els, opts, 0, =
!opts.backwards); }, ms);
}
}
// invoked after transition
$.fn.cycle.updateActivePagerLink =3D function(pager, currSlide, clsName) =
{
$(pager).each(function() {
=
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
});
};
// calculate timeout value for current transition
function getTimeout(curr, next, opts, fwd) {
if (opts.timeoutFn) {
// call user provided calc fn
var t =3D opts.timeoutFn.call(curr,curr,next,opts,fwd);
while (opts.fx !=3D 'none' && (t - opts.speed) < 250) // sanitize =
timeout
t +=3D opts.speed;
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
if (t !=3D=3D false)
return t;
}
return opts.timeout;
}
// expose next/prev function, caller must pass in state
$.fn.cycle.next =3D function(opts) { advance(opts,1); };
$.fn.cycle.prev =3D function(opts) { advance(opts,0);};
// advance slide forward or back
function advance(opts, moveForward) {
var val =3D moveForward ? 1 : -1;
var els =3D opts.elements;
var p =3D opts.$cont[0], timeout =3D p.cycleTimeout;
if (timeout) {
clearTimeout(timeout);
p.cycleTimeout =3D 0;
}
if (opts.random && val < 0) {
// move back to the previously display slide
opts.randomIndex--;
if (--opts.randomIndex =3D=3D -2)
opts.randomIndex =3D els.length-2;
else if (opts.randomIndex =3D=3D -1)
opts.randomIndex =3D els.length-1;
opts.nextSlide =3D opts.randomMap[opts.randomIndex];
}
else if (opts.random) {
opts.nextSlide =3D opts.randomMap[opts.randomIndex];
}
else {
opts.nextSlide =3D opts.currSlide + val;
if (opts.nextSlide < 0) {
if (opts.nowrap) return false;
opts.nextSlide =3D els.length - 1;
}
else if (opts.nextSlide >=3D els.length) {
if (opts.nowrap) return false;
opts.nextSlide =3D 0;
}
}
var cb =3D opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick =
is deprecated
if ($.isFunction(cb))
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
go(els, opts, 1, moveForward);
return false;
}
function buildPager(els, opts) {
var $p =3D $(opts.pager);
$.each(els, function(i,o) {
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
});
opts.updateActivePagerLink(opts.pager, opts.startingSlide, =
opts.activePagerClass);
}
$.fn.cycle.createPagerAnchor =3D function(i, el, $p, els, opts) {
var a;
if ($.isFunction(opts.pagerAnchorBuilder)) {
a =3D opts.pagerAnchorBuilder(i,el);
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
}
else
a =3D ''+(i+1)+' ';
=09
if (!a)
return;
var $a =3D $(a);
// don't reparent if anchor is in the dom
if ($a.parents('body').length =3D=3D=3D 0) {
var arr =3D [];
if ($p.length > 1) {
$p.each(function() {
var $clone =3D $a.clone(true);
$(this).append($clone);
arr.push($clone[0]);
});
$a =3D $(arr);
}
else {
$a.appendTo($p);
}
}
opts.pagerAnchors =3D opts.pagerAnchors || [];
opts.pagerAnchors.push($a);
=09
var pagerFn =3D function(e) {
e.preventDefault();
opts.nextSlide =3D i;
var p =3D opts.$cont[0], timeout =3D p.cycleTimeout;
if (timeout) {
clearTimeout(timeout);
p.cycleTimeout =3D 0;
}
var cb =3D opts.onPagerEvent || opts.pagerClick; // pagerClick is =
deprecated
if ($.isFunction(cb))
cb(opts.nextSlide, els[opts.nextSlide]);
go(els,opts,1,opts.currSlide < i); // trigger the trans
// return false; // <=3D=3D allow bubble
};
=09
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
$a.hover(pagerFn, function(){/* no-op */} );
}
else {
$a.bind(opts.pagerEvent, pagerFn);
}
=09
if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
$a.bind('click.cycle', function(){return false;}); // suppress click
=09
var cont =3D opts.$cont[0];
var pauseFlag =3D false; // https://github.com/malsup/cycle/issues/44
if (opts.pauseOnPagerHover) {
$a.hover(
function() {=20
pauseFlag =3D true;
cont.cyclePause++;=20
triggerPause(cont,true,true);
}, function() {=20
if (pauseFlag)
cont.cyclePause--;=20
triggerPause(cont,true,true);
}=20
);
}
};
// helper fn to calculate the number of slides between the current and =
the next
$.fn.cycle.hopsFromLast =3D function(opts, fwd) {
var hops, l =3D opts.lastSlide, c =3D opts.currSlide;
if (fwd)
hops =3D c > l ? c - l : opts.slideCount - l;
else
hops =3D c < l ? l - c : l + opts.slideCount - c;
return hops;
};
// fix clearType problems in ie6 by setting an explicit bg color
// (otherwise text slides look horrible during a fade transition)
function clearTypeFix($slides) {
debug('applying clearType background-color hack');
function hex(s) {
s =3D parseInt(s,10).toString(16);
return s.length < 2 ? '0'+s : s;
}
function getBg(e) {
for ( ; e && e.nodeName.toLowerCase() !=3D 'html'; e =3D e.parentNode) =
{
var v =3D $.css(e,'background-color');
if (v && v.indexOf('rgb') >=3D 0 ) {
var rgb =3D v.match(/\d+/g);
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
}
if (v && v !=3D 'transparent')
return v;
}
return '#ffffff';
}
$slides.each(function() { $(this).css('background-color', getBg(this)); =
});
}
// reset common props before the next transition
$.fn.cycle.commonReset =3D function(curr,next,opts,w,h,rev) {
$(opts.elements).not(curr).hide();
if (typeof opts.cssBefore.opacity =3D=3D 'undefined')
opts.cssBefore.opacity =3D 1;
opts.cssBefore.display =3D 'block';
if (opts.slideResize && w !=3D=3D false && next.cycleW > 0)
opts.cssBefore.width =3D next.cycleW;
if (opts.slideResize && h !=3D=3D false && next.cycleH > 0)
opts.cssBefore.height =3D next.cycleH;
opts.cssAfter =3D opts.cssAfter || {};
opts.cssAfter.display =3D 'none';
$(curr).css('zIndex',opts.slideCount + (rev =3D=3D=3D true ? 1 : 0));
$(next).css('zIndex',opts.slideCount + (rev =3D=3D=3D true ? 0 : 1));
};
// the actual fn for effecting a transition
$.fn.cycle.custom =3D function(curr, next, opts, cb, fwd, speedOverride) =
{
var $l =3D $(curr), $n =3D $(next);
var speedIn =3D opts.speedIn, speedOut =3D opts.speedOut, easeIn =3D =
opts.easeIn, easeOut =3D opts.easeOut;
$n.css(opts.cssBefore);
if (speedOverride) {
if (typeof speedOverride =3D=3D 'number')
speedIn =3D speedOut =3D speedOverride;
else
speedIn =3D speedOut =3D 1;
easeIn =3D easeOut =3D null;
}
var fn =3D function() {
$n.animate(opts.animIn, speedIn, easeIn, function() {
cb();
});
};
$l.animate(opts.animOut, speedOut, easeOut, function() {
$l.css(opts.cssAfter);
if (!opts.sync)=20
fn();
});
if (opts.sync) fn();
};
// transition definitions - only fade is defined here, transition pack =
defines the rest
$.fn.cycle.transitions =3D {
fade: function($cont, $slides, opts) {
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
opts.before.push(function(curr,next,opts) {
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.opacity =3D 0;
});
opts.animIn =3D { opacity: 1 };
opts.animOut =3D { opacity: 0 };
opts.cssBefore =3D { top: 0, left: 0 };
}
};
$.fn.cycle.ver =3D function() { return ver; };
// override these globally if you like (they are all optional)
$.fn.cycle.defaults =3D {
activePagerClass: 'activeSlide', // class name used for the active =
pager link
after: null, // transition callback (scope set to =
element that was shown): function(currSlideElement, nextSlideElement, =
options, forwardFlag)
allowPagerClickBubble: false, // allows or prevents click event on =
pager anchors from bubbling
animIn: null, // properties that define how the slide =
animates in
animOut: null, // properties that define how the slide =
animates out
aspect: false, // preserve aspect ratio during fit =
resizing, cropping if necessary (must be used with fit option)
autostop: 0, // true to end slideshow after X =
transitions (where X =3D=3D slide count)
autostopCount: 0, // number of transitions (optionally =
used with autostop to define X)
backwards: false, // true to start slideshow at last slide =
and move backwards through the stack
before: null, // transition callback (scope set to =
element to be shown): function(currSlideElement, nextSlideElement, =
options, forwardFlag)
center: null, // set to true to have cycle add =
top/left margin to each slide (use with width and height options)
cleartype: !$.support.opacity, // true if clearType =
corrections should be applied (for IE)
cleartypeNoBg: false, // set to true to disable extra =
cleartype fixing (leave false to force background color setting on =
slides)
containerResize: 1, // resize container to fit largest slide
continuous: 0, // true to start next transition =
immediately after current one completes
cssAfter: null, // properties that defined the state of =
the slide after transitioning out
cssBefore: null, // properties that define the initial =
state of the slide before transitioning in
delay: 0, // additional delay (in ms) for first =
transition (hint: can be negative)
easeIn: null, // easing for "in" transition
easeOut: null, // easing for "out" transition
easing: null, // easing method for both in and out =
transitions
end: null, // callback invoked when the slideshow =
terminates (use with autostop or nowrap options): function(options)
fastOnEvent: 0, // force fast transitions when triggered =
manually (via pager or prev/next); value =3D=3D time in ms
fit: 0, // force slides to fit container
fx: 'fade', // name of transition effect (or comma =
separated names, ex: 'fade,scrollUp,shuffle')
fxFn: null, // function used to control the =
transition: function(currSlideElement, nextSlideElement, options, =
afterCalback, forwardFlag)
height: 'auto', // container height (if the 'fit' option =
is true, the slides will be set to this height as well)
manualTrump: true, // causes manual transition to stop an =
active transition instead of being ignored
metaAttr: 'cycle', // data- attribute that holds the option =
data for the slideshow
next: null, // element, jQuery object, or jQuery =
selector string for the element to use as event trigger for next slide
nowrap: 0, // true to prevent slideshow from =
wrapping
onPagerEvent: null, // callback fn for pager events: =
function(zeroBasedSlideIndex, slideElement)
onPrevNextEvent: null, // callback fn for prev/next events: =
function(isNext, zeroBasedSlideIndex, slideElement)
pager: null, // element, jQuery object, or jQuery =
selector string for the element to use as pager container
pagerAnchorBuilder: null, // callback fn for building anchor =
links: function(index, DOMelement)
pagerEvent: 'click.cycle', // name of event which drives the =
pager navigation
pause: 0, // true to enable "pause on hover"
pauseOnPagerHover: 0, // true to pause when hovering over =
pager link
prev: null, // element, jQuery object, or jQuery =
selector string for the element to use as event trigger for previous =
slide
prevNextEvent: 'click.cycle',// event which drives the manual =
transition to the previous or next slide
random: 0, // true for random, false for sequence =
(not applicable to shuffle fx)
randomizeEffects: 1, // valid when multiple effects are used; =
true to make the effect sequence random
requeueOnImageNotLoaded: true, // requeue the slideshow if any image =
slides are not yet loaded
requeueTimeout: 250, // ms delay for requeue
rev: 0, // causes animations to transition in =
reverse (for effects that support it such as =
scrollHorz/scrollVert/shuffle)
shuffle: null, // coords for shuffle animation, ex: { =
top:15, left: 200 }
skipInitializationCallbacks: false, // set to true to disable the =
first before/after callback that occurs prior to any transition
slideExpr: null, // expression for selecting slides (if =
something other than all children is required)
slideResize: 1, // force slide width/height to fixed =
size before every transition
speed: 1000, // speed of the transition (any valid fx =
speed value)
speedIn: null, // speed of the 'in' transition
speedOut: null, // speed of the 'out' transition
startingSlide: undefined,// zero-based index of the first slide =
to be displayed
sync: 1, // true if in/out transitions should =
occur simultaneously
timeout: 4000, // milliseconds between slide =
transitions (0 to disable auto advance)
timeoutFn: null, // callback for determining per-slide =
timeout value: function(currSlideElement, nextSlideElement, options, =
forwardFlag)
updateActivePagerLink: null,// callback fn invoked to update the =
active pager link (adds/removes activePagerClass style)
width: null // container width (if the 'fit' option =
is true, the slides will be set to this width as well)
};
})(jQuery);
/*!
* jQuery Cycle Plugin Transition Definitions
* This script is a plugin for the jQuery Cycle Plugin
* Examples and documentation at: http://malsup.com/jquery/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.73
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($) {
"use strict";
//
// These functions define slide initialization and properties for the =
named
// transitions. To save file size feel free to remove any of these that =
you
// don't need.
//
$.fn.cycle.transitions.none =3D function($cont, $slides, opts) {
opts.fxFn =3D function(curr,next,opts,after){
$(next).show();
$(curr).hide();
after();
};
};
// not a cross-fade, fadeout only fades out the top slide
$.fn.cycle.transitions.fadeout =3D function($cont, $slides, opts) {
$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', =
'opacity': 1 });
opts.before.push(function(curr,next,opts,w,h,rev) {
$(curr).css('zIndex',opts.slideCount + (rev !=3D=3D true ? 1 : 0));
$(next).css('zIndex',opts.slideCount + (rev !=3D=3D true ? 0 : 1));
});
opts.animIn.opacity =3D 1;
opts.animOut.opacity =3D 0;
opts.cssBefore.opacity =3D 1;
opts.cssBefore.display =3D 'block';
opts.cssAfter.zIndex =3D 0;
};
// scrollUp/Down/Left/Right
$.fn.cycle.transitions.scrollUp =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var h =3D $cont.height();
opts.cssBefore.top =3D h;
opts.cssBefore.left =3D 0;
opts.cssFirst.top =3D 0;
opts.animIn.top =3D 0;
opts.animOut.top =3D -h;
};
$.fn.cycle.transitions.scrollDown =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var h =3D $cont.height();
opts.cssFirst.top =3D 0;
opts.cssBefore.top =3D -h;
opts.cssBefore.left =3D 0;
opts.animIn.top =3D 0;
opts.animOut.top =3D h;
};
$.fn.cycle.transitions.scrollLeft =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var w =3D $cont.width();
opts.cssFirst.left =3D 0;
opts.cssBefore.left =3D w;
opts.cssBefore.top =3D 0;
opts.animIn.left =3D 0;
opts.animOut.left =3D 0-w;
};
$.fn.cycle.transitions.scrollRight =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push($.fn.cycle.commonReset);
var w =3D $cont.width();
opts.cssFirst.left =3D 0;
opts.cssBefore.left =3D -w;
opts.cssBefore.top =3D 0;
opts.animIn.left =3D 0;
opts.animOut.left =3D w;
};
$.fn.cycle.transitions.scrollHorz =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden').width();
opts.before.push(function(curr, next, opts, fwd) {
if (opts.rev)
fwd =3D !fwd;
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.left =3D fwd ? (next.cycleW-1) : (1-next.cycleW);
opts.animOut.left =3D fwd ? -curr.cycleW : curr.cycleW;
});
opts.cssFirst.left =3D 0;
opts.cssBefore.top =3D 0;
opts.animIn.left =3D 0;
opts.animOut.top =3D 0;
};
$.fn.cycle.transitions.scrollVert =3D function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push(function(curr, next, opts, fwd) {
if (opts.rev)
fwd =3D !fwd;
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.top =3D fwd ? (1-next.cycleH) : (next.cycleH-1);
opts.animOut.top =3D fwd ? curr.cycleH : -curr.cycleH;
});
opts.cssFirst.top =3D 0;
opts.cssBefore.left =3D 0;
opts.animIn.top =3D 0;
opts.animOut.left =3D 0;
};
// slideX/slideY
$.fn.cycle.transitions.slideX =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$(opts.elements).not(curr).hide();
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.animIn.width =3D next.cycleW;
});
opts.cssBefore.left =3D 0;
opts.cssBefore.top =3D 0;
opts.cssBefore.width =3D 0;
opts.animIn.width =3D 'show';
opts.animOut.width =3D 0;
};
$.fn.cycle.transitions.slideY =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$(opts.elements).not(curr).hide();
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.animIn.height =3D next.cycleH;
});
opts.cssBefore.left =3D 0;
opts.cssBefore.top =3D 0;
opts.cssBefore.height =3D 0;
opts.animIn.height =3D 'show';
opts.animOut.height =3D 0;
};
// shuffle
$.fn.cycle.transitions.shuffle =3D function($cont, $slides, opts) {
var i, w =3D $cont.css('overflow', 'visible').width();
$slides.css({left: 0, top: 0});
opts.before.push(function(curr,next,opts) {
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
});
// only adjust speed once!
if (!opts.speedAdjusted) {
opts.speed =3D opts.speed / 2; // shuffle has 2 transitions
opts.speedAdjusted =3D true;
}
opts.random =3D 0;
opts.shuffle =3D opts.shuffle || {left:-w, top:15};
opts.els =3D [];
for (i=3D0; i < $slides.length; i++)
opts.els.push($slides[i]);
for (i=3D0; i < opts.currSlide; i++)
opts.els.push(opts.els.shift());
// custom transition fn (hat tip to Benjamin Sterling for this bit of =
sweetness!)
opts.fxFn =3D function(curr, next, opts, cb, fwd) {
if (opts.rev)
fwd =3D !fwd;
var $el =3D fwd ? $(curr) : $(next);
$(next).css(opts.cssBefore);
var count =3D opts.slideCount;
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
var hops =3D $.fn.cycle.hopsFromLast(opts, fwd);
for (var k=3D0; k < hops; k++) {
if (fwd)
opts.els.push(opts.els.shift());
else
opts.els.unshift(opts.els.pop());
}
if (fwd) {
for (var i=3D0, len=3Dopts.els.length; i < len; i++)
$(opts.els[i]).css('z-index', len-i+count);
}
else {
var z =3D $(curr).css('z-index');
$el.css('z-index', parseInt(z,10)+1+count);
}
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() =
{
$(fwd ? this : curr).hide();
if (cb) cb();
});
});
};
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: =
0 });
};
// turnUp/Down/Left/Right
$.fn.cycle.transitions.turnUp =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.cssBefore.top =3D next.cycleH;
opts.animIn.height =3D next.cycleH;
opts.animOut.width =3D next.cycleW;
});
opts.cssFirst.top =3D 0;
opts.cssBefore.left =3D 0;
opts.cssBefore.height =3D 0;
opts.animIn.top =3D 0;
opts.animOut.height =3D 0;
};
$.fn.cycle.transitions.turnDown =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.animIn.height =3D next.cycleH;
opts.animOut.top =3D curr.cycleH;
});
opts.cssFirst.top =3D 0;
opts.cssBefore.left =3D 0;
opts.cssBefore.top =3D 0;
opts.cssBefore.height =3D 0;
opts.animOut.height =3D 0;
};
$.fn.cycle.transitions.turnLeft =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.cssBefore.left =3D next.cycleW;
opts.animIn.width =3D next.cycleW;
});
opts.cssBefore.top =3D 0;
opts.cssBefore.width =3D 0;
opts.animIn.left =3D 0;
opts.animOut.width =3D 0;
};
$.fn.cycle.transitions.turnRight =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.animIn.width =3D next.cycleW;
opts.animOut.left =3D curr.cycleW;
});
$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
opts.animIn.left =3D 0;
opts.animOut.width =3D 0;
};
// zoom
$.fn.cycle.transitions.zoom =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,false,true);
opts.cssBefore.top =3D next.cycleH/2;
opts.cssBefore.left =3D next.cycleW/2;
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: =
next.cycleH });
$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, =
left: curr.cycleW/2 });
});
opts.cssFirst.top =3D 0;
opts.cssFirst.left =3D 0;
opts.cssBefore.width =3D 0;
opts.cssBefore.height =3D 0;
};
// fadeZoom
$.fn.cycle.transitions.fadeZoom =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,false);
opts.cssBefore.left =3D next.cycleW/2;
opts.cssBefore.top =3D next.cycleH/2;
$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: =
next.cycleH });
});
opts.cssBefore.width =3D 0;
opts.cssBefore.height =3D 0;
opts.animOut.opacity =3D 0;
};
// blindX
$.fn.cycle.transitions.blindX =3D function($cont, $slides, opts) {
var w =3D $cont.css('overflow','hidden').width();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.width =3D next.cycleW;
opts.animOut.left =3D curr.cycleW;
});
opts.cssBefore.left =3D w;
opts.cssBefore.top =3D 0;
opts.animIn.left =3D 0;
opts.animOut.left =3D w;
};
// blindY
$.fn.cycle.transitions.blindY =3D function($cont, $slides, opts) {
var h =3D $cont.css('overflow','hidden').height();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.height =3D next.cycleH;
opts.animOut.top =3D curr.cycleH;
});
opts.cssBefore.top =3D h;
opts.cssBefore.left =3D 0;
opts.animIn.top =3D 0;
opts.animOut.top =3D h;
};
// blindZ
$.fn.cycle.transitions.blindZ =3D function($cont, $slides, opts) {
var h =3D $cont.css('overflow','hidden').height();
var w =3D $cont.width();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts);
opts.animIn.height =3D next.cycleH;
opts.animOut.top =3D curr.cycleH;
});
opts.cssBefore.top =3D h;
opts.cssBefore.left =3D w;
opts.animIn.top =3D 0;
opts.animIn.left =3D 0;
opts.animOut.top =3D h;
opts.animOut.left =3D w;
};
// growX - grow horizontally from centered 0 width
$.fn.cycle.transitions.growX =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,true);
opts.cssBefore.left =3D this.cycleW/2;
opts.animIn.left =3D 0;
opts.animIn.width =3D this.cycleW;
opts.animOut.left =3D 0;
});
opts.cssBefore.top =3D 0;
opts.cssBefore.width =3D 0;
};
// growY - grow vertically from centered 0 height
$.fn.cycle.transitions.growY =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,false);
opts.cssBefore.top =3D this.cycleH/2;
opts.animIn.top =3D 0;
opts.animIn.height =3D this.cycleH;
opts.animOut.top =3D 0;
});
opts.cssBefore.height =3D 0;
opts.cssBefore.left =3D 0;
};
// curtainX - squeeze in both edges horizontally
$.fn.cycle.transitions.curtainX =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,false,true,true);
opts.cssBefore.left =3D next.cycleW/2;
opts.animIn.left =3D 0;
opts.animIn.width =3D this.cycleW;
opts.animOut.left =3D curr.cycleW/2;
opts.animOut.width =3D 0;
});
opts.cssBefore.top =3D 0;
opts.cssBefore.width =3D 0;
};
// curtainY - squeeze in both edges vertically
$.fn.cycle.transitions.curtainY =3D function($cont, $slides, opts) {
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,false,true);
opts.cssBefore.top =3D next.cycleH/2;
opts.animIn.top =3D 0;
opts.animIn.height =3D next.cycleH;
opts.animOut.top =3D curr.cycleH/2;
opts.animOut.height =3D 0;
});
opts.cssBefore.height =3D 0;
opts.cssBefore.left =3D 0;
};
// cover - curr slide covered by next slide
$.fn.cycle.transitions.cover =3D function($cont, $slides, opts) {
var d =3D opts.direction || 'left';
var w =3D $cont.css('overflow','hidden').width();
var h =3D $cont.height();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts);
if (d =3D=3D 'right')
opts.cssBefore.left =3D -w;
else if (d =3D=3D 'up')
opts.cssBefore.top =3D h;
else if (d =3D=3D 'down')
opts.cssBefore.top =3D -h;
else
opts.cssBefore.left =3D w;
});
opts.animIn.left =3D 0;
opts.animIn.top =3D 0;
opts.cssBefore.top =3D 0;
opts.cssBefore.left =3D 0;
};
// uncover - curr slide moves off next slide
$.fn.cycle.transitions.uncover =3D function($cont, $slides, opts) {
var d =3D opts.direction || 'left';
var w =3D $cont.css('overflow','hidden').width();
var h =3D $cont.height();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
if (d =3D=3D 'right')
opts.animOut.left =3D w;
else if (d =3D=3D 'up')
opts.animOut.top =3D -h;
else if (d =3D=3D 'down')
opts.animOut.top =3D h;
else
opts.animOut.left =3D -w;
});
opts.animIn.left =3D 0;
opts.animIn.top =3D 0;
opts.cssBefore.top =3D 0;
opts.cssBefore.left =3D 0;
};
// toss - move top slide and fade away
$.fn.cycle.transitions.toss =3D function($cont, $slides, opts) {
var w =3D $cont.css('overflow','visible').width();
var h =3D $cont.height();
opts.before.push(function(curr, next, opts) {
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
// provide default toss settings if animOut not provided
if (!opts.animOut.left && !opts.animOut.top)
$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
else
opts.animOut.opacity =3D 0;
});
opts.cssBefore.left =3D 0;
opts.cssBefore.top =3D 0;
opts.animIn.left =3D 0;
};
// wipe - clip animation
$.fn.cycle.transitions.wipe =3D function($cont, $slides, opts) {
var w =3D $cont.css('overflow','hidden').width();
var h =3D $cont.height();
opts.cssBefore =3D opts.cssBefore || {};
var clip;
if (opts.clip) {
if (/l2r/.test(opts.clip))
clip =3D 'rect(0px 0px '+h+'px 0px)';
else if (/r2l/.test(opts.clip))
clip =3D 'rect(0px '+w+'px '+h+'px '+w+'px)';
else if (/t2b/.test(opts.clip))
clip =3D 'rect(0px '+w+'px 0px 0px)';
else if (/b2t/.test(opts.clip))
clip =3D 'rect('+h+'px '+w+'px '+h+'px 0px)';
else if (/zoom/.test(opts.clip)) {
var top =3D parseInt(h/2,10);
var left =3D parseInt(w/2,10);
clip =3D 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
}
}
opts.cssBefore.clip =3D opts.cssBefore.clip || clip || 'rect(0px 0px =
0px 0px)';
var d =3D opts.cssBefore.clip.match(/(\d+)/g);
var t =3D parseInt(d[0],10), r =3D parseInt(d[1],10), b =3D =
parseInt(d[2],10), l =3D parseInt(d[3],10);
opts.before.push(function(curr, next, opts) {
if (curr =3D=3D next) return;
var $curr =3D $(curr), $next =3D $(next);
$.fn.cycle.commonReset(curr,next,opts,true,true,false);
opts.cssAfter.display =3D 'block';
var step =3D 1, count =3D parseInt((opts.speedIn / 13),10) - 1;
(function f() {
var tt =3D t ? t - parseInt(step * (t/count),10) : 0;
var ll =3D l ? l - parseInt(step * (l/count),10) : 0;
var bb =3D b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
var rr =3D r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
(step++ <=3D count) ? setTimeout(f, 13) : $curr.css('display', =
'none');
})();
});
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: =
0 });
opts.animIn =3D { left: 0 };
opts.animOut =3D { left: 0 };
};
})(jQuery);
------=_NextPart_000_0000_01D179E4.F2134AB0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.ptupraha.cz/theme/web/js/slider.js
$(document).ready(function(){
$('#slideshow_next').css("opacity", "0");
$('#slideshow_prev').css("opacity", "0");
=20
$("#slides").cycle({
fx: 'scrollHorz',
sync: true,
delay: -2000,
speed: 500,
timeout: 5000,
pause: 1,
prev: '#slideshow_prev',
next: '#slideshow_next'
});
=20
$("#slides").mouseover(function() {
$('#slideshow_next').css("opacity", "0");
$('#slideshow_prev').css("opacity", "0");
$('#slideshow_next').stop(true, false).animate({opacity: '0.7'}, =
200); =20
$('#slideshow_prev').stop(true, false).animate({opacity: '0.7'}, =
200);
=20
}).mouseout(function(){
$('#slideshow_next').stop(true, false).animate({opacity: 0}, =
100);
$('#slideshow_prev').stop(true, false).animate({opacity: 0}, =
100);
});
=20
$("#slideshow_next").mouseover(function() {
$(this).css("opacity", "0.7"); =20
$(this).stop(true, false).animate({opacity: 1}, 100);
=20
}).mouseout(function(){
$(this).stop(true, false).animate({opacity: 0.7}, 100);
});
=20
$("#slideshow_prev").mouseover(function() {
$(this).css("opacity", "0.7"); =20
$(this).stop(true, false).animate({opacity: 1}, 100);
=20
}).mouseout(function(){
$(this).stop(true, false).animate({opacity: 0.7}, 100);
});
});
------=_NextPart_000_0000_01D179E4.F2134AB0--