/* SWFObject v2.2 is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); /* * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();/************************************************************************************************ * Floatbox v3.24 * December 01, 2008 * * Copyright (C) 2008 Byron McGregor * Website: http://randomous.com/tools/floatbox/ * License: Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/) * This comment block must be retained in all deployments and distributions *************************************************************************************************/ function Floatbox() { this.defaultOptions = { /***** BEGIN OPTIONS CONFIGURATION *****/ // see docs/options.html for detailed descriptions /*** ***/ theme: 'black' ,// 'auto'|'black'|'white'|'blue'|'yellow'|'red'|'custom' padding: 0 ,// pixels panelPadding: 8 ,// pixels outerBorder: 0 ,// pixels innerBorder: 0 ,// pixels overlayOpacity: 55 ,// 0-100 controlOpacity: 60 ,// 0-100 autoSizeImages: true ,// true|false autoSizeOther: false ,// true|false resizeImages: true ,// true|false resizeOther: false ,// true|false resizeTool: 'cursor' ,// 'cursor'|'topleft'|'both' infoPos: 'bl' ,// 'tl'|'tc'|'tr'|'bl'|'bc'|'br' controlPos: 'br' ,// 'tl'|'tr'|'bl'|'br' boxLeft: 'auto' ,// 'auto'|pixels|'[-]xx%' boxTop: 'auto' ,// 'auto'|pixels|'[-]xx%' shadowType: 'drop' ,// 'drop'|'halo'|'none' shadowSize: 8 ,// 8|12|16|24 enableDrag: false ,// true|false showCaption: true ,// true|false showItemNumber: true ,// true|false showClose: true ,// true|false hideFlash: true ,// true|false hideJava: true ,// true|false disableScroll: false ,// true|false autoGallery: false ,// true|false preloadAll: true ,// true|false enableCookies: false ,// true|false cookieScope: 'site' ,// 'site'|'folder' language: 'nl' ,// 'auto'|'en'|... (see the languages folder) graphicsType: 'international' ,// 'auto'|'international'|'english' urlGraphics: '/img/floatbox/' ,// change this if you install in another folder urlLanguages: '/js/floatbox/' ,// change this if you install in another folder /*** ***/ /*** ***/ navType: 'both' ,// 'overlay'|'button'|'both'|'none' navOverlayWidth: 35 ,// 0-50 navOverlayPos: 10 ,// 0-100 showNavOverlay: 'always' ,// 'always'|'once'|'never' showHints: 'always' ,// 'always'|'once'|'never' enableWrap: true ,// true|false enableKeyboardNav: true ,// true|false outsideClickCloses: true ,// true|false numIndexLinks: 0 ,// number, -1 = no limit indexLinksPanel: 'control' ,// 'info'|'control' showIndexThumbs: true ,// true|false /*** ***/ /*** ***/ doAnimations: true ,// true|false resizeDuration: 3.5 ,// 0-10 imageFadeDuration: 3.5 ,// 0-10 overlayFadeDuration: 4 ,// 0-10 splitResize: 'no' ,// 'no'|'auto'|'wh'|'hw' startAtClick: true ,// true|false zoomImageStart: true ,// true|false liveImageResize: false ,// true|false /*** ***/ /*** ***/ slideInterval: 4.5 ,// seconds endTask: 'exit' ,// 'stop'|'exit'|'loop' showPlayPause: true ,// true|false startPaused: false ,// true|false pauseOnResize: true ,// true|false pauseOnPrev: true ,// true|false pauseOnNext: false // true|false /*** ***/ }; /*** ***/ // Will inherit from the primary floatbox options unless overridden here // Add any you like this.childOptions = { overlayOpacity: 45, resizeDuration: 3, imageFadeDuration: 3, overlayFadeDuration: 0 }; /*** ***/ /***** END OPTIONS CONFIGURATION *****/ this.init(); } Floatbox.prototype = { panelGap: 22, infoLinkGap: 16, showHintsTime: 1600, zoomPopBorder: 1, controlSpacing: 8, minInfoWidth: 80, minIndexWidth: 120, ctrlJump: 5, slowLoadDelay: 750, loaderDelay: 200, autoSizeSpace: 4, initialSize: 120, defaultWidth: '85%', defaultHeight: '82%', init: function() { this.setOptions(this.defaultOptions); if (typeof fbPageOptions === 'object') this.setOptions(fbPageOptions); this.setOptions(this.parseOptionString(location.search.substring(1))); this.items = []; this.nodeNames = []; this.hiddenEls = []; this.timeouts = {}; this.pos = {}; var path = this.urlGraphics; this.slowZoomImg = path + 'loading_white_small.gif'; this.slowLoadImg = path + 'loading_black_small.gif'; this.iframeSrc = path + 'loading_iframe.html'; this.resizeUpCursor = path + 'magnify_plus.cur'; this.resizeDownCursor = path + 'magnify_minus.cur'; this.notFoundImg = path + '404.jpg'; var agent = navigator.userAgent, version = navigator.appVersion; this.mac = version.indexOf('Macintosh') !== -1; if (window.opera) { this.opera = true; this.operaOld = parseFloat(version) < 9.5; this.operaMac = this.mac; } else if (document.all) { this.ie = true; this.ieOld = parseInt(version.substr(version.indexOf('MSIE') + 5), 10) < 7; this.ie8b2 = version.indexOf('MSIE 8.0') !== -1 && navigator.appMinorVersion === 'beta 2'; this.ieXP = parseInt(version.substr(version.indexOf('Windows NT') + 11), 10) < 6; } else if (agent.indexOf('Firefox') !== -1) { this.ff = true; this.ffOld = parseInt(agent.substr(agent.indexOf('Firefox') + 8), 10) < 3; this.ffNew = !this.ffOld; this.ffMac = this.mac; } else if (version.indexOf('WebKit') !== -1) { this.webkit = true; this.webkitNew = parseInt(version.substr(version.indexOf('WebKit') + 7), 10) >= 500; this.webkitOld = !this.webkitNew; this.webkitMac = this.mac; } this.isChild = !!(self.fb && self.fb.fbBox); if (!this.isChild) { this.fbParent = this.lastChild = this; this.anchors = []; this.children = []; this.preloads = {}; this.preloads.count = 0; this.html = document.documentElement; this.bod = document.body || document.getElementsByTagName('body')[0]; this.rtl = this.getStyle(this.bod, 'direction') === 'rtl' || this.getStyle(this.html, 'direction') === 'rtl'; this.xhr = this.getXMLHttpRequest(); this.strings = { hintClose: 'Exit (key: Esc)', hintPrev: 'Previous (key: <--)', hintNext: 'Next (key: -->)', hintPlay: 'Play (key: spacebar)', hintPause: 'Pause (key: spacebar)', hintResize: 'Resize (key: Tab)', imgCount: 'Image %1 of %2', nonImgCount: 'Page %1 of %2', mixedCount: '(%1 of %2)', infoText: 'Info...', printText: 'Print...' }; } else { this.fbParent = fb.lastChild; fb.lastChild = this; fb.children.push(this); if (this.fbParent.isSlideshow) this.fbParent.setPause(true); this.anchors = fb.anchors; this.children = fb.children; this.html = fb.html; this.bod = fb.bod; this.rtl = fb.rtl; this.xhr = fb.xhr; this.strings = fb.strings; } this.browserLanguage = (navigator.language || navigator.userLanguage || navigator.systemLanguage || navigator.browserLanguage || 'en').substring(0, 2); if (!this.isChild) { var lang = this.language === 'auto' ? this.browserLanguage : this.language; if (this.xhr) { var that = this; this.xhr.getResponse(this.urlLanguages + lang + '.json', function(xhr) { if ((xhr.status === 200 || xhr.status === 203 || xhr.status === 304) && xhr.responseText) { var ltArrow = String.fromCharCode(8592), rtArrow = String.fromCharCode(8594), text = xhr.responseText; if (that.ieXP) { text = text.replace(ltArrow, '<--').replace(rtArrow, '-->'); } try { var obj = eval('(' + text + ')'); if (obj && obj.hintClose) that.strings = obj; } catch(e) {} } if (that.rtl) { if (!/^(ar|he)$/.test(that.language)) { that.strings.infoText = that.strings.infoText.replace('...', ''); that.strings.printText = that.strings.printText.replace('...', ''); } that.strings.hintPrev = that.strings.hintPrev.replace(ltArrow, rtArrow).replace('-->', '<--'); that.strings.hintNext = that.strings.hintNext.replace(rtArrow, ltArrow).replace('<--', '-->'); var t = that.strings.hintPrev; that.strings.hintPrev = that.strings.hintNext; that.strings.hintNext = t; } }); } } if (!this.rtl && (this.graphicsType.toLowerCase() === 'english' || (this.graphicsType === 'auto' && this.browserLanguage === 'en'))) { this.offPos = 'top left'; this.onPos = 'bottom left'; } else { this.offPos = 'top right'; this.onPos = 'bottom right'; this.controlSpacing = 0; } this.zIndex = { base: 90000 + 10*this.children.length, fbOverlay: 1, fbBox: 2, fbCanvas: 3, fbMainDiv: 4, fbLeftNav: 5, fbRightNav: 5, fbOverlayPrev: 6, fbOverlayNext: 6, fbResizer: 7, fbZoomDiv: 8, fbInfoPanel: 8, fbControlPanel: 8 }; var match = /\bautoStart=(.+?)(?:&|$)/i.exec(location.search); this.autoHref = match ? match[1] : false; }, tagAnchors: function(baseEl) { var that = fb.lastChild, doOutline = this.ieOld && /^fb/.test(baseEl.id); function tag(tagName) { var elements = baseEl.getElementsByTagName(tagName); for (var i = 0, len = elements.length; i < len; i++) { var el = elements[i], revOptions = that.parseOptionString(el.getAttribute('rev')), href = revOptions.href || el.getAttribute('href'); if (that.autoGallery && that.fileType(href) === 'img' && el.getAttribute('rel') !== 'nofloatbox') { el.setAttribute('rel', 'floatbox.autoGallery'); if (that.autoTitle && !el.getAttribute('title')) el.setAttribute('title', that.autoTitle); } if (doOutline) el.setAttribute('hideFocus', 'true'); that.tagOneAnchor(el, revOptions); } } tag('a'); tag('area'); }, tagOneAnchor: function(anchor, revOptions) { var that = this, isAnchor = !!anchor.getAttribute; if (isAnchor) { var a = { rel: anchor.getAttribute('rel'), rev: anchor.getAttribute('rev'), title: anchor.getAttribute('title'), anchor: anchor, thumb: this.getThumb(anchor) }; var match; if (a.thumb && (match = /(?:^|\s)fbPop(up|down)(?:\s|$)/i.exec(anchor.className))) { var up = (match[1] === 'up'); a.popup = true; a.thumb.style.borderWidth = this.zoomPopBorder + 'px'; anchor.onmouseover = function () { a.thumb.style.display = 'none'; var aPos = that.getLeftTop(this, true), aLeft = aPos.left, aTop = aPos.top; aPos = that.getLayout(this); a.thumb.style.display = ''; var relLeft = (aPos.width - a.thumb.offsetWidth)/2, relTop = up ? 2 - a.thumb.offsetHeight : aPos.height, scroll = that.getScroll(), screenRight = scroll.left + that.getDisplayWidth(); var spill = aPos.left + relLeft + a.thumb.offsetWidth - screenRight; if (spill > 0) relLeft -= spill; var spill = aPos.left + relLeft - scroll.left; if (spill < 0) relLeft -= spill; if (up) { if (aPos.top + relTop < scroll.top) relTop = aPos.height; } else { if (aPos.top + relTop + a.thumb.offsetHeight > scroll.top + that.getDisplayHeight()) relTop = 2 - a.thumb.offsetHeight; } a.thumb.style.left = (aLeft + relLeft) + 'px'; a.thumb.style.top = (aTop + relTop) + 'px'; }; anchor.onmouseout = function () { a.thumb.style.left = '0'; a.thumb.style.top = '-9999px'; }; if (!anchor.onclick) anchor.onclick = anchor.onmouseout; } } else { var a = anchor; } if (/^(floatbox|gallery|iframe|slideshow|lytebox|lyteshow|lyteframe|lightbox)/i.test(a.rel)) { a.revOptions = revOptions || this.parseOptionString(a.rev); a.href = a.revOptions.href || anchor.href || anchor.getAttribute('href'); a.level = this.children.length + (fb.lastChild.fbBox && !a.revOptions.sameBox ? 1 : 0); var a_i, i = this.anchors.length; while (i--) { a_i = this.anchors[i]; if (a_i.href === a.href && a_i.rel === a.rel && a_i.rev === a.rev && a_i.title === a.title && a_i.level === a.level) { a_i.anchor = anchor; break; } } if (i === -1) { a.type = a.revOptions.type || this.fileType(a.href); if (a.type === 'html') { a.type = 'iframe'; var match = /#(\w+)/.exec(a.href); if (match) { var doc = document; if (a.anchor) { doc = a.anchor.ownerDocument || a.anchor.document || doc; } if (doc === document && this.currentItem && this.currentItem.anchor) { doc = this.currentItem.anchor.ownerDocument || this.currentItem.anchor.document || doc; } var el = doc.getElementById(match[1]); if (el) { a.type = 'inline'; a.sourceEl = el; } } } this.anchors.push(a); if (this.autoHref) { if (a.revOptions.showThis !== false && this.autoHref === a.href.substr(a.href.length - this.autoHref.length)) this.autoStart = a; } else if (a.revOptions.autoStart === true) { this.autoStart = a; } else if (a.revOptions.autoStart === 'once') { var match = /fbAutoShown=(.+?)(?:;|$)/.exec(document.cookie), val = match ? match[1] : '', href = escape(a.href); if (val.indexOf(href) === -1) { this.autoStart = a; document.cookie = 'fbAutoShown=' + val + href + '; path=/'; } } } if (isAnchor) { anchor.onclick = function(e) { e = e || window.event; if (this.ie && !e) { var iframes = self.frames, i = iframes.length; while (i-- && !e) { try { if (typeof iframes[i].window === 'object') e = iframes[i].window.event; } catch(err) {} } } if (!(e && (e.ctrlKey || e.metaKey || e.shiftKey)) || a.revOptions.showThis === false || !/img|iframe/.test(a.type)) { fb.start(this); if (this.ie && e) e.returnValue = false; return false; } }; } } return a; }, fileType: function(href) { var s = href.toLowerCase(), i = s.indexOf('?'); if (i !== -1) s = s.substr(0, i); s = s.substr(s.lastIndexOf('.') + 1); if (/^(jpe?g|png|gif|bmp)$/.test(s)) return 'img'; if (s === 'swf' || /^(http:)?\/\/(www.)?youtube.com\/v\//i.test(href)) return 'flash'; if (/^(mov|mpe?g|movie)$/.test(s)) return 'quicktime'; return 'html'; }, preloadImages: function(href, chain) { if (this !== fb) return fb.preloadImages(href, chain); if (typeof chain !== 'undefined') arguments.callee.chain = chain; if (!href && arguments.callee.chain && (this.preloadAll || !this.preloads.count)) { for (var i = 0, len = this.anchors.length; i < len; i++) { var a = this.anchors[i]; if (a.type === 'img' && !this.preloads[a.href]) { href = a.href; break; } } } if (href) { if (this.preloads[href]) { this.preloadImages(); } else { var img = this.preloads[href] = new Image(); img.onerror = function() { setTimeout(function() { fb.preloadImages(); }, 50); fb.preloads[href] = true; }; img.onload = function() { fb.preloads.count++; this.onerror(); }; img.src = href; } } }, start: function(anchor) { if (this !== fb.lastChild) return fb.lastChild.start(anchor); var that = this; this.preloadImages('', false); if (anchor.getAttribute) { var a = { rel: anchor.getAttribute('rel'), rev: anchor.getAttribute('rev'), title: anchor.getAttribute('title') }; a.revOptions = this.parseOptionString(a.rev); a.href = a.revOptions.href || anchor.href || anchor.getAttribute('href'); anchor.blur(); } else { var a = anchor; } this.isRestart = !!this.fbBox; if (this.isRestart) { if (!a.revOptions.sameBox) return new Floatbox().start(anchor); this.setOptions(a.revOptions); } else { this.clickedAnchor = anchor.getAttribute ? anchor : false; } a.level = this.children.length + (fb.lastChild.fbBox && !a.revOptions.sameBox ? 1 : 0); this.itemsShown = 0; fb.previousAnchor = this.currentItem; this.buildItemArray(a); if (!this.itemCount) return; if (this.itemCount === 1 && this.fbNavControls) this.fbNavControls.style.display = 'none'; self.focus(); this.revOptions = a.revOptions; if (!this.isRestart) { this.getOptions(); this.buildDOM(); this.addEventHandlers(); this.initState(); } this.collapse(); this.updatePanels(); var fetchAndGo = function() { that.fetchContent(function() { that.clearTimeout('slowLoad'); that.calcSize(); } ); }; if (this.fbBox.style.visibility || this.isRestart) { fetchAndGo(); } else { var offset = this.initialSize/2, size = { id: 'fbBox', left: that.pos.fbBox.left - offset, top: that.pos.fbBox.top - offset, width: that.initialSize, height: that.initialSize, borderWidth: that.outerBorder }; if (this.splitResize) { var oncomplete = function() { that.setSize(fetchAndGo, size); }; } else { this.timeouts.slowLoad = setTimeout(function() { that.setSize(size); }, this.slowLoadDelay); var oncomplete = fetchAndGo; } this.fadeOpacity(this.fbOverlay, this.overlayOpacity, this.overlayFadeDuration, oncomplete); } }, buildItemArray: function(a) { this.itemCount = this.items.length = this.currentIndex = 0; this.justImages = true; this.hasImages = false; var isSingle = /^(floatbox|gallery|iframe|lytebox|lyteframe|lightbox)$/i.test(a.rel); for (var i = 0, len = this.anchors.length; i < len; i++) { var a_i = this.anchors[i]; if (a_i.rel === a.rel && a_i.level === a.level) { if (a_i.revOptions.showThis !== false) { var isMatch = a_i.rev === a.rev && a_i.title === a.title && a_i.href === a.href.substr(a.href.length - a_i.href.length); if (isMatch || !isSingle) { a_i.seen = false; this.items.push(a_i); if (a_i.type === 'img') { this.hasImages = true; } else { this.justImages = false; } if (isMatch) this.currentIndex = this.items.length - 1; } } } } if (a.revOptions.showThis === false && a.href) { i = this.items.length; while (i--) { var href = this.items[i].href; if (href === a.href.substr(a.href.length - href.length)) { this.currentIndex = i; } } } this.itemCount = this.items.length; this.currentItem = this.items[this.currentIndex]; }, getOptions: function() { if (this.isChild) { for (var name in this.defaultOptions) { if (this.defaultOptions.hasOwnProperty(name)) this[name] = this.fbParent[name]; } this.setOptions(this.childOptions); } else { this.setOptions(this.defaultOptions); } this.doSlideshow = this.loadPageOnClose = this.sameBox = false; if (!(this.isChild || this.fbBox)) { if (typeof setFloatboxOptions === 'function') setFloatboxOptions(); if (typeof fbPageOptions === 'object') this.setOptions(fbPageOptions); if (this.enableCookies) { var match = /fbOptions=(.+?)(;|$)/.exec(document.cookie); if (match) this.setOptions(this.parseOptionString(match[1])); var strOptions = ''; for (var name in this.defaultOptions) { if (this.defaultOptions.hasOwnProperty(name)) { strOptions += ' ' + name + ':' + this[name]; } } var strPath = '/'; if (this.cookieScope === 'folder') { strPath = location.pathname; strPath = strPath.substring(0, strPath.lastIndexOf('/') + 1); } document.cookie = 'fbOptions=' + strOptions + '; path=' + strPath; } } this.setOptions(this.revOptions); this.setOptions(this.parseOptionString(location.search.substring(1))); if (this.theme === 'grey') this.theme = 'white'; if (this.endTask === 'cont') this.endTask = 'loop'; if (this.navType === 'upper') this.navType = 'overlay'; if (this.navType === 'lower') this.navType = 'button'; if (this.upperOpacity) this.controlOpacity = this.upperOpacity; if (this.upperNavWidth) this.navOverlayWidth = this.upperNavWidth; if (this.upperNavPos) this.navOverlayPos = this.upperNavPos; if (this.showUpperNav) this.showNavOverlay = this.showUpperNav; if (this.dropShadow) this.shadowType = 'drop'; if (!/^(auto|black|white|blue|yellow|red|custom)$/.test(this.theme)) this.theme='auto'; if (!/^(overlay|button|both|none)$/i.test(this.navType)) this.navType = 'button'; if (!/^(auto|wh|hw)$/.test(this.splitResize)) this.splitResize = false; if (this.webkitOld && (this.navType === 'overlay' || this.navType === 'both') ) { this.navType = 'button'; } if (this.itemCount > 1) { this.isSlideshow = this.doSlideshow || /^(slideshow|lyteshow)/i.test(this.currentItem.rel); var overlayRequest = /overlay|both/i.test(this.navType), buttonRequest = /button|both/i.test(this.navType); this.navOverlay = this.justImages && overlayRequest; this.navButton = buttonRequest || (!this.justImages && overlayRequest); this.lclShowItemNumber = this.showItemNumber; this.lclNumIndexLinks = this.numIndexLinks; } else { this.isSlideshow = this.navOverlay = this.navButton = this.lclShowItemNumber = this.lclNumIndexLinks = false; } this.isPaused = this.startPaused; if ((this.lclTheme = this.theme) === 'auto') { this.lclTheme = this.currentItem.type === 'img' ? 'black' : /flash|quicktime/.test(this.currentItem.type) ? 'blue' : 'white'; } if (!this.doAnimations) { this.resizeDuration = this.imageFadeDuration = this.overlayFadeDuration = 0; } if (!this.resizeDuration) this.zoomImageStart = false; if (!/[tb][lr]/.test(this.controlPos)) this.controlPos = ''; if (!/[tb][lcr]/.test(this.infoPos)) this.infoPos = ''; this.controlTop = this.controlPos.charAt(0) === 't'; this.controlLeft = this.controlPos.charAt(1) === 'l'; this.infoTop = this.infoPos.charAt(0) === 't'; this.infoCenter = this.infoPos.charAt(1) === 'c'; this.infoLeft = this.infoPos.charAt(1) === 'l' || (this.infoCenter && this.controlTop === this.infoTop && !this.controlLeft); if (this.infoLeft === this.controlLeft && this.infoTop === this.controlTop) { this.infoLeft = true; this.controlLeft = false; } if (this.indexLinksPanel === 'info') { this.indexCenter = this.infoCenter; this.indexLeft = this.infoLeft; this.indexTop = this.infoTop; } else { this.indexLeft = this.controlLeft; this.indexTop = this.controlTop; } if (!/^(drop|halo|none)$/.test(this.shadowType)) this.shadowType='drop'; if (!/^(8|12|16|24)$/.test(this.shadowSize + '')) this.shadowSize = 8; this.shadowSize = +this.shadowSize; if (this.opera || (this.mac && !this.webkitNew)) { this.resizeTool = 'topleft'; } else { this.resizeTool = this.resizeTool.toLowerCase(); if (!/topleft|cursor|both/.test(this.resizeTool)) this.resizeTool = 'cursor'; } if (this.ieOld) this.shadowType = 'none'; if (this.padding + this.outerBorder === 0) this.zoomPopBorder = 0; if (this.overlayOpacity > 1) this.overlayOpacity /= 100; if (this.controlOpacity > 1) this.controlOpacity /= 100; }, parseOptionString: function(str) { if (!str) return {}; var quotes = [], match, rex = /`([^`]*?)`/g; while ((match = rex.exec(str))) quotes.push(match[1]); if (quotes.length) str = str.replace(rex, '``'); str = str.replace(/\s*[:=]\s*/g, ':'); str = str.replace(/\s*[;&]\s*/g, ' '); str = str.replace(/^\s+|\s+$/g, ''); var pairs = {}, aVars = str.split(' '), i = aVars.length; while (i--) { var aThisVar = aVars[i].split(':'), name = aThisVar[0], value = aThisVar[1]; if (typeof value === 'string') { if (!isNaN(value)) value = +value; else if (value === 'true') value = true; else if (value === 'false') value = false; } if (value === '``') value = quotes.pop() || ''; pairs[name] = value; } return pairs; }, setOptions: function(pairs) { for (var name in pairs) { if (pairs.hasOwnProperty(name)) this[name] = pairs[name]; } }, buildDOM: function() { this.fbOverlay = this.newNode('div', 'fbOverlay', this.bod); this.fbZoomDiv = this.newNode('div', 'fbZoomDiv', this.bod); this.fbZoomImg = this.newNode('img', 'fbZoomImg', this.fbZoomDiv); this.fbBox = this.newNode('div', 'fbBox'); this.fbShadowTop = this.newNode('div', 'fbShadowTop', this.fbBox); this.fbShadowRight = this.newNode('div', 'fbShadowRight', this.fbBox); this.fbShadowBottom = this.newNode('div', 'fbShadowBottom', this.fbBox); this.fbShadowLeft = this.newNode('div', 'fbShadowLeft', this.fbBox); this.fbShadowCorner = this.newNode('div', 'fbShadowCorner', this.fbBox); this.fbLoader = this.newNode('div', 'fbLoader', this.fbBox); this.fbCanvas = this.newNode('div', 'fbCanvas', this.fbBox); this.fbMainDiv = this.newNode('div', 'fbMainDiv', this.fbCanvas); this.fbLeftNav = this.newNode('a', 'fbLeftNav', this.fbMainDiv); this.fbRightNav = this.newNode('a', 'fbRightNav', this.fbMainDiv); this.fbOverlayPrev = this.newNode('a', 'fbOverlayPrev', this.fbMainDiv, this.strings.hintPrev); this.fbOverlayNext = this.newNode('a', 'fbOverlayNext', this.fbMainDiv, this.strings.hintNext); this.fbResizer = this.newNode('a', 'fbResizer', this.fbMainDiv, this.strings.hintResize); this.fbInfoPanel = this.newNode('div', 'fbInfoPanel', this.fbCanvas); this.fbCaptionDiv = this.newNode('div', 'fbCaptionDiv', this.fbInfoPanel); this.fbCaption = this.newNode('span', 'fbCaption', this.fbCaptionDiv); this.fbInfoDiv = this.newNode('div', 'fbInfoDiv', this.fbInfoPanel); if (this.infoLeft || this.infoCenter) { this.fbInfoLink = this.newNode('span', 'fbInfoLink', this.fbInfoDiv); this.fbPrintLink = this.newNode('span', 'fbPrintLink', this.fbInfoDiv); this.fbItemNumber = this.newNode('span', 'fbItemNumber', this.fbInfoDiv); } else { this.fbItemNumber = this.newNode('span', 'fbItemNumber', this.fbInfoDiv); this.fbPrintLink = this.newNode('span', 'fbPrintLink', this.fbInfoDiv); this.fbInfoLink = this.newNode('span', 'fbInfoLink', this.fbInfoDiv); } this.fbControlPanel = this.newNode('div', 'fbControlPanel', this.fbCanvas); this.fbControls = this.newNode('div', 'fbControls', this.fbControlPanel); this.fbNavControls = this.newNode('div', 'fbNavControls', this.fbControls); this.fbPrev = this.newNode('a', 'fbPrev', this.fbNavControls, this.strings.hintPrev); this.fbNext = this.newNode('a', 'fbNext', this.fbNavControls, this.strings.hintNext); this.fbSubControls = this.newNode('div', 'fbSubControls', this.fbControls); this.fbPlayPause = this.newNode('div', 'fbPlayPause', this.fbSubControls); this.fbPlay = this.newNode('a', 'fbPlay', this.fbPlayPause, this.strings.hintPlay); this.fbPause = this.newNode('a', 'fbPause', this.fbPlayPause, this.strings.hintPause); this.fbClose = this.newNode('a', 'fbClose', this.fbSubControls, this.strings.hintClose); this.fbIndexLinks = this.newNode('span', 'fbIndexLinks', this.indexLinksPanel === 'info' ? this.fbInfoPanel : this.fbControlPanel); this.bod.appendChild(this.fbBox); }, newNode: function(nodeType, id, parentNode, title) { if (this[id] && this[id].parentNode) { this[id].parentNode.removeChild(this[id]); } var node = document.createElement(nodeType); node.id = id; node.className = id + '_' + (id.indexOf('fbShadow') === -1 ? this.lclTheme : this.shadowType + this.shadowSize); if (nodeType === 'a') { if (!this.operaOld) node.setAttribute('href', ''); if (this.ieOld) node.setAttribute('hideFocus', 'true'); node.style.outline = 'none'; } else if (nodeType === 'iframe') { node.setAttribute('scrolling', this.itemScroll); node.setAttribute('frameBorder', '0'); node.setAttribute('align', 'middle'); node.src = this.iframeSrc; } if (this.isChild && this.fbParent[id]) title = this.fbParent[id].getAttribute('title'); if (title && this.showHints !== 'never') node.setAttribute('title', title); if (this.zIndex[id]) node.style.zIndex = this.zIndex.base + this.zIndex[id]; node.style.display = 'none'; if (parentNode) parentNode.appendChild(node); this.nodeNames.push(id); return node; }, addEventHandlers: function() { var that = this, leftNav = this.fbLeftNav.style, rightNav = this.fbRightNav.style, overlayPrev = this.fbOverlayPrev.style, overlayNext = this.fbOverlayNext.style, prev = this.fbPrev.style, next = this.fbNext.style; if (this.showHints === 'once') { this.hideHint = function(id) { if (that[id].title) { that.timeouts[id] = setTimeout(function() { that[id].title = that.fbParent[id].title = ''; var id2 = ''; if (/fbOverlay(Prev|Next)/.test(id)) { id2 = id.replace('Overlay', ''); } else if (/fb(Prev|Next)/.test(id)) { id2 = id.replace('fb', 'fbOverlay'); } if (id2) that[id2].title = that.fbParent[id2].title = ''; }, that.showHintsTime); } }; } else { this.hideHint = function() {}; } this.fbPlay.onclick = function() { that.setPause(false); if (window.event) event.returnValue = false; return false; }; this.fbPause.onclick = function() { that.setPause(true); if (window.event) event.returnValue = false; return false; }; this.fbClose.onclick = function() { that.end(); if (window.event) event.returnValue = false; return false; }; if (this.outsideClickCloses) { this.fbOverlay.onclick = this.fbShadowTop.onclick = this.fbShadowRight.onclick = this.fbShadowBottom.onclick = this.fbShadowLeft.onclick = this.fbShadowCorner.onclick = this.fbClose.onclick; } this[this.rtl ? 'fbNext' : 'fbPrev'].onclick = function(step) { if (typeof step !== 'number') step = 1; var newIndex = (that.currentIndex - step) % that.itemCount; if (newIndex < 0) newIndex += that.itemCount; if (that.enableWrap || newIndex < that.currentIndex) { that.newContent(newIndex); if (that.isSlideshow && that.pauseOnPrev && !that.isPaused) { that.setPause(true); } } if (window.event) event.returnValue = false; return false; }; this[this.rtl ? 'fbPrev' : 'fbNext'].onclick = function(step) { if (typeof step !== 'number') step = 1; var newIndex = (that.currentIndex + step) % that.itemCount; if (that.enableWrap || newIndex > that.currentIndex) { that.newContent(newIndex); if (that.isSlideshow && that.pauseOnNext && !that.isPaused) { that.setPause(true); } } if (window.event) event.returnValue = false; return false; }; this.fbLeftNav.onclick = this.fbOverlayPrev.onclick = this.fbPrev.onclick; this.fbRightNav.onclick = this.fbOverlayNext.onclick = this.fbNext.onclick; this.fbLeftNav.onmouseover = this.fbLeftNav.onmousemove = this.fbOverlayPrev.onmousemove = function() { if (!that.timeouts.fbCanvas) overlayPrev.visibility = ''; if (that.navButton) prev.backgroundPosition = that.onPos; return true; }; this.fbRightNav.onmouseover = this.fbRightNav.onmousemove = this.fbOverlayNext.onmousemove = function() { if (!that.timeouts.fbCanvas) overlayNext.visibility = ''; if (that.navButton) next.backgroundPosition = that.onPos; return true; }; this.fbOverlayPrev.onmouseover = this.fbOverlayNext.onmouseover = function() { this.onmousemove(); that.hideHint(this.id); return true; }; this.fbLeftNav.onmouseout = function() { overlayPrev.visibility = 'hidden'; if (that.navButton) prev.backgroundPosition = that.offPos; }; this.fbRightNav.onmouseout = function() { overlayNext.visibility = 'hidden'; if (that.navButton) next.backgroundPosition = that.offPos; }; this.fbOverlayPrev.onmouseout = this.fbOverlayNext.onmouseout = function() { this.style.visibility = 'hidden'; that.clearTimeout(this.id); }; this.fbLeftNav.onmousedown = this.fbRightNav.onmousedown = function(e) { e = e || window.event; if (e.button === 2) { leftNav.visibility = rightNav.visibility = 'hidden'; that.timeouts.hideNavOverlay = setTimeout(function() { leftNav.visibility = rightNav.visibility = ''; }, 600); } }; this.fbPlay.onmouseover = this.fbPause.onmouseover = this.fbClose.onmouseover = this.fbPrev.onmouseover = this.fbNext.onmouseover = function() { this.style.backgroundPosition = that.onPos; that.hideHint(this.id); return true; }; this.fbResizer.onmouseover = function() { that.hideHint(this.id); return true; }; this.fbPlay.onmouseout = this.fbPause.onmouseout = this.fbClose.onmouseout = this.fbPrev.onmouseout = this.fbNext.onmouseout = function() { this.style.backgroundPosition = that.offPos; that.clearTimeout(this.id); }; this.fbResizer.onmouseout = function() { that.clearTimeout(this.id); }; if (this.enableKeyboardNav) { if (!document.keydownSet) { this.priorOnkeydown = document.onkeydown; document.onkeydown = this.keydownHandler; document.keydownSet = true; } } else if (document.keydownSet) { document.onkeydown = this.priorOnkeydown; document.keydownSet = false; } if (this.opera && !document.keypressSet) { this.priorOnkeypress = document.onkeypress; document.onkeypress = function() { return false; }; document.keypressSet = true; } if (this.enableDrag) this.fbBox.onmousedown = this.dragonDrop(); }, keydownHandler: function(e) { e = e || window.event; var that = fb.lastChild, keyCode = e.keyCode || e.which; switch (keyCode) { case 37: case 39: if (that.itemCount > 1) { that[keyCode === 37 ? 'fbPrev' : 'fbNext'].onclick((e.ctrlKey || e.metaKey) ? that.ctrlJump : 1); if (that.showHints === 'once') { that.fbPrev.title = that.fbNext.title = that.fbOverlayPrev.title = that.fbOverlayNext.title = ''; } } return false; case 32: if (that.isSlideshow) { that.setPause(!that.isPaused); if (that.showHints === 'once') that.fbPlay.title = that.fbPause.title = ''; } return false; case 9: if (that.fbResizer.onclick) { that.fbResizer.onclick(); if (that.showHints === 'once') that.fbResizer.title = ''; } return false; case 27: if (that.showHints === 'once') that.fbClose.title = ''; that.end(); return false; case 13: return false; } }, dragonDrop: function() { var that = this, fbBox = this.fbBox; return function(e) { e = e || window.event; if (/fb(Box|Canvas|Info|Caption|Item|Control|Index)/.test((e.target || e.srcElement).id)) { var startX = e.clientX, startY = e.clientY, box = that.fbBox.style, content = that.fbContent.style, pos = that.pos.fbBox, boxX = pos.left, boxY = pos.top; pos.dx = pos.dy = 0; var moveHandler = function(e) { if (that.currentItem.type === 'iframe' && !(that.ie || that.opera) && !content.visibility) content.visibility = 'hidden'; if (that.isSlideshow && !that.isPaused) that.setPause(true); e = e || window.event; pos.dx = e.clientX - startX; pos.dy = e.clientY - startY; box.left = (boxX + pos.dx) + 'px'; box.top = (boxY + pos.dy) + 'px'; (e.stopPropagation && e.stopPropagation()) || (e.cancelBubble = true); that.clearTimeout('dragonDrop'); that.timeouts.dragonDrop = setTimeout(upHandler, 1500); return false; }; var upHandler = function(e) { that.clearTimeout('dragonDrop'); e = e || window.event; if (document.removeEventListener) { document.removeEventListener("mouseup", upHandler, true); document.removeEventListener("mousemove", moveHandler, true); } else if (fbBox.detachEvent) { fbBox.detachEvent("onlosecapture", upHandler); fbBox.detachEvent("onmouseup", upHandler); fbBox.detachEvent("onmousemove", moveHandler); fbBox.releaseCapture(); } if (e) (e.stopPropagation && e.stopPropagation()) || (e.cancelBubble = true); pos.left += pos.dx; pos.top += pos.dy; content.visibility = ''; return false; }; if (document.addEventListener) { document.addEventListener("mousemove", moveHandler, true); document.addEventListener("mouseup", upHandler, true); } else if (fbBox.attachEvent) { fbBox.setCapture(); fbBox.attachEvent("onmousemove", moveHandler); fbBox.attachEvent("onmouseup", upHandler); fbBox.attachEvent("onlosecapture", upHandler); } return false; } }; }, initState: function() { var that = this, box = this.fbBox.style, mainDiv = this.fbMainDiv.style, canvas = this.fbCanvas.style, zoomDiv = this.fbZoomDiv.style, zoomImg = this.fbZoomImg.style; if (this.currentItem.popup) this.currentItem.anchor.onmouseover(); var anchorPos = this.getAnchorPos(this.clickedAnchor, this.currentItem.anchor === this.clickedAnchor && this.currentItem.type === 'img'); if (anchorPos.width) { this.pos.fbZoomDiv = anchorPos; zoomDiv.borderWidth = this.zoomPopBorder + 'px'; zoomDiv.left = (anchorPos.left - this.zoomPopBorder) + 'px'; zoomDiv.top = (anchorPos.top - this.zoomPopBorder) + 'px'; zoomDiv.width = (this.fbZoomImg.width = anchorPos.width) + 'px'; zoomDiv.height = (this.fbZoomImg.height = anchorPos.height) + 'px'; this.fbZoomImg.src = anchorPos.src; box.visibility = 'hidden'; this.timeouts.slowLoad = setTimeout(function() { if (that.fbOverlay.style.display) that.fadeOpacity(that.fbOverlay, that.overlayOpacity, that.overlayFadeDuration); that.fbZoomImg.src = that.slowZoomImg; zoomDiv.display = zoomImg.display = ''; }, this.slowLoadDelay); } else { this.pos.fbBox = anchorPos; this.pos.fbBox.borderWidth = 0; this.pos.fbMainDiv = { width:0, height:0 }; } box.position = 'absolute'; box.left = box.top = box.width = box.height = box.borderWidth = '0'; mainDiv.borderWidth = this.innerBorder + 'px'; mainDiv.left = this.padding + 'px'; this.fbControlPanel.style[this.controlLeft ? 'left' : 'right'] = this.fbInfoPanel.style[this.infoLeft ? 'left' : 'right'] = Math.max(this.padding, this.panelPadding) + 'px'; canvas.visibility = 'hidden'; box.display = canvas.display = ''; if (this.shadowType === 'none') { this.shadowSize = 0; } else { var shadowTop = this.fbShadowTop.style, shadowRight = this.fbShadowRight.style, shadowBottom = this.fbShadowBottom.style, shadowLeft = this.fbShadowLeft.style, shadowCorner = this.fbShadowCorner.style; shadowRight.top = shadowBottom.left = shadowLeft.top = -this.outerBorder + 'px'; shadowRight.paddingRight = shadowBottom.paddingBottom = shadowCorner.paddingRight = shadowCorner.paddingBottom = (this.outerBorder + this.shadowSize) + 'px'; if (this.shadowType === 'halo') { shadowTop.paddingRight = shadowRight.paddingBottom = shadowBottom.paddingRight = shadowLeft.paddingBottom = (this.outerBorder*2 + this.shadowSize) + 'px'; shadowTop.top = shadowTop.left = shadowRight.top = shadowLeft.left = -(this.outerBorder + this.shadowSize) + 'px'; } else { shadowBottom.backgroundPosition = 'bottom left'; shadowRight.paddingBottom = shadowBottom.paddingRight = this.outerBorder*2 + 'px'; } } if (this.navOverlay) { if (fb.showNavOverlay === 'never' || (fb.showNavOverlay === 'once' && fb.navOverlayShown)) { fb.showNavOverlay = false; } else { this.fbOverlayPrev.style.backgroundPosition = this.fbOverlayNext.style.backgroundPosition = this.onPos; this.fadeOpacity(this.fbOverlayPrev, this.controlOpacity); this.fadeOpacity(this.fbOverlayNext, this.controlOpacity); } } this.initPanels(); this.lastShown = false; if (this.hideFlash) this.hideElements('flash'); if (this.hideJava) this.hideElements('applet'); if (this.ieOld) { this.hideElements('select'); this.fbOverlay.style.position = 'absolute'; this.stretchOverlay()(); attachEvent('onresize', this.stretchOverlay()); attachEvent('onscroll', this.stretchOverlay()); } }, hideElements: function(type, thisWindow) { if (!thisWindow) { this.hideElements(type, self); } else { var tagName, tagNames = type === 'flash' ? ['object', 'embed'] : [type]; try { while ((tagName = tagNames.pop())) { var els = thisWindow.document.getElementsByTagName(tagName), i = els.length; while (i--) { var el = els[i]; if (el.style.visibility !== 'hidden' && (tagName !== 'object' || (el.getAttribute('type') && el.getAttribute('type').toLowerCase() === 'application/x-shockwave-flash') || (el.getAttribute('classid') && el.getAttribute('classid').toLowerCase() === 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000') || /data\s*=\s*"?[^>"]+\.swf\b/i.test(el.innerHTML) || /param\s+name\s*=\s*"?(movie|src)("|\s)[^>]+\.swf\b/i.test(el.innerHTML))) { this.hiddenEls.push(el); el.style.visibility = 'hidden'; } } } } catch(e) {} var iframes = thisWindow.frames, i = iframes.length; while (i--) { try { if (typeof iframes[i].window === 'object') this.hideElements(type, iframes[i].window); } catch(e) {} } } }, getAnchorPos: function(anchor, useThumb) { var display = this.getDisplaySize(), scroll = this.getScroll(), noAnchorPos = { left: display.width/2 + scroll.left, top: display.height/3 + scroll.top, width: 0, height: 0 }; var thumb = useThumb ? this.getThumb(anchor) : false; if (thumb && this.zoomImageStart) { var pos = this.getLeftTop(thumb), border = (thumb.offsetWidth - thumb.width)/2; pos.left += border; pos.top += border; pos.width = thumb.width; pos.height = thumb.height; pos.src = thumb.src; } else if (this.startAtClick && anchor && anchor.offsetWidth && anchor.tagName.toLowerCase() === 'a') { var pos = this.getLayout(thumb || anchor); } else { return noAnchorPos; } var centerPos = { left: pos.left + pos.width/2, top: pos.top + pos.height/2, width: 0, height: 0 }; if (centerPos.left < scroll.left || centerPos.left > (scroll.left + display.width) || centerPos.top < scroll.top || centerPos.top > (scroll.top + display.height)) { return noAnchorPos; } return (thumb && this.zoomImageStart ? pos : centerPos); }, getThumb: function(anchor) { var nodes = anchor && anchor.childNodes, i = (nodes && nodes.length) || 0; while (i--) { if ((nodes[i].tagName || '').toLowerCase() === 'img') return nodes[i]; } return false; }, initPanels: function() { var infoPanel = this.fbInfoPanel.style, infoLink = this.fbInfoLink.style, printLink = this.fbPrintLink.style, itemNumber = this.fbItemNumber.style; if (this.infoCenter) { var infoPos = ' posCenter'; infoPanel.textAlign = 'center'; infoLink.paddingLeft = printLink.paddingLeft = itemNumber.paddingLeft = infoLink.paddingRight = printLink.paddingRight = itemNumber.paddingRight = (this.infoLinkGap/2) + 'px'; } else if (this.infoLeft) { var infoPos = ' posLeft'; infoPanel.textAlign = 'left'; infoLink.paddingRight = printLink.paddingRight = this.infoLinkGap + 'px'; } else { var infoPos = ' posRight'; infoPanel.textAlign = 'right'; infoLink.paddingLeft = printLink.paddingLeft = this.infoLinkGap + 'px'; } this.fbInfoPanel.className += infoPos; this.fbInfoDiv.className += infoPos; infoPanel.width = '400px'; var controlPanel = this.fbControlPanel.style, controls = this.fbControls.style, subControls = this.fbSubControls.style; if (this.controlLeft) { var controlPos = ' posLeft'; controlPanel.textAlign = 'left'; } else { var controlPos = ' posRight'; controlPanel.textAlign = 'right'; controls.right = '0'; } this.fbControlPanel.className += controlPos; this.fbSubControls.className += controlPos; if (!this.ieOld) this.fbControls.className += controlPos; if (this.navButton) { var prev = this.fbPrev.style, next = this.fbNext.style, navControls = this.fbNavControls.style; prev.backgroundPosition = next.backgroundPosition = this.offPos; navControls['padding' + (this.controlLeft ? 'Left' : 'Right')] = this.controlSpacing + 'px'; this.fbNavControls.className += controlPos; controlPanel.display = navControls.display = prev.display = next.display = ''; } var width = 0; if (this.showClose) { var close = this.fbClose.style; close.backgroundPosition = this.offPos; this.fbClose.className += controlPos; controlPanel.display = controls.display = subControls.display = close.display = ''; width = this.fbClose.offsetWidth; } if (this.showPlayPause && this.isSlideshow) { var play = this.fbPlay.style, pause = this.fbPause.style, playPause = this.fbPlayPause.style; play.backgroundPosition = pause.backgroundPosition = this.offPos; playPause['padding' + (this.controlLeft ? 'Left' : 'Right')] = this.controlSpacing + 'px'; this.fbPlayPause.className += controlPos; controlPanel.display = controls.display = subControls.display = playPause.display = play.display = pause.display = ''; play.top = this.isPaused ? '' : '-9999px'; pause.top = this.isPaused ? '-9999px' : ''; width += this.fbPlayPause.offsetWidth; } subControls.width = width + 'px'; controlPanel.width = controls.width = (width + this.fbNavControls.offsetWidth) + 'px'; if (this.lclNumIndexLinks) { var indexLinks = this.fbIndexLinks.style; if (this.indexLinksPanel === 'info') { this.fbIndexLinks.className += infoPos; infoPanel.display = ''; if (this.showIndexThumbs) infoPanel.overflow = 'visible'; } else { this.fbIndexLinks.className += controlPos; controlPanel.display = ''; if (this.showIndexThumbs) controlPanel.overflow = 'visible'; indexLinks['padding' + (this.indexLeft ? 'Left' : 'Right')] = '2px'; } indexLinks.width = '250px'; indexLinks.display = ''; } }, fetchContent: function(callback, phase) { var that = this; if (!phase) { if (this.fbContent) { this.fbMainDiv.removeChild(this.fbContent); delete this.fbContent; return this.timeouts.fetch = setTimeout(function() { that.fetchContent(callback, 1); }, 10); } } var item = this.currentItem; item.nativeWidth = item.revOptions.width; item.nativeHeight = item.revOptions.height; if (item.type !== 'img') { item.nativeWidth = item.nativeWidth || (fb.previousAnchor && fb.previousAnchor.nativeWidth) || this.defaultWidth; item.nativeHeight = item.nativeHeight || (fb.previousAnchor && fb.previousAnchor.nativeHeight) || this.defaultHeight; } if (this.ieOld) this.fbMainDiv.style.backgroundColor = item.type === 'img' ? '#000' : ''; this.itemScroll = item.revOptions.scrolling || item.revOptions.scroll || 'auto'; if (/img|iframe/.test(item.type)) { this.fbContent = this.newNode(item.type, 'fbContent', this.fbMainDiv); if (item.type === 'img') { var loader = new Image(); loader.onload = function() { item.nativeWidth = item.nativeWidth || loader.width; item.nativeHeight = item.nativeHeight || loader.height; that.fbContent.src = loader.src; if (callback) callback(); }; loader.onerror = function() { if (this.src !== that.notFoundImg) this.src = that.notFoundImg; }; loader.src = item.href; } } else { this.fbContent = this.newNode('div', 'fbContent', this.fbMainDiv); this.fbContent.style.overflow = this.itemScroll === 'yes' ? 'scroll' : (this.itemScroll === 'no' ? 'hidden' : 'auto'); if (item.type === 'inline') { var el = item.sourceEl.cloneNode(true); el.style.display = el.style.visibility = ''; try { this.fbContent.appendChild(el); } catch(e) { this.setInnerHTML(this.fbContent, el.innerHTML); } this.tagAnchors(this.fbContent); } else if (item.type === 'ajax') { this.xhr.getResponse(item.href, function(xhr) { if ((xhr.status === 200 || xhr.status === 203 || xhr.status === 304) && xhr.responseText) { that.setInnerHTML(that.fbContent, xhr.responseText); that.tagAnchors(that.fbContent); } else { that.setInnerHTML(that.fbContent, '

' + 'Unable to fetch content from ' + item.href + '

'); } }); } } this.fbContent.style.border = '0'; this.fbContent.style.display = ''; if (item.type !== 'img' && callback) callback(); }, updatePanels: function() { var infoPanel = this.fbInfoPanel.style, captionDiv = this.fbCaptionDiv.style, caption = this.fbCaption.style, infoDiv = this.fbInfoDiv.style, infoLink = this.fbInfoLink.style, printLink = this.fbPrintLink.style, itemNumber = this.fbItemNumber.style, item = this.currentItem, str; infoPanel.display = captionDiv.display = caption.display = infoDiv.display = infoLink.display = printLink.display = itemNumber.display = 'none'; if (this.showCaption) { str = item.revOptions.caption || item.title || ''; if (str === 'href') { str = this.encodeHTML(this.currentItem.href); } else { str = this.decodeHTML(str).replace(/&/g, '&'); } if (this.setInnerHTML(this.fbCaption, str) && str) infoPanel.display = captionDiv.display = caption.display = ''; } if (item.revOptions.info) { str = this.encodeHTML(this.decodeHTML(item.revOptions.info)); var options = item.revOptions.infoOptions || ''; if (options) options = this.encodeHTML(this.decodeHTML(options)); str = '' + (item.revOptions.infoText || this.strings.infoText) + ''; if (this.setInnerHTML(this.fbInfoLink, str)) infoPanel.display = infoDiv.display = infoLink.display = ''; } if (item.revOptions.showPrint) { var css = item.revOptions.printCSS || ''; str = '' + (item.revOptions.printText || this.strings.printText) + ''; if (this.setInnerHTML(this.fbPrintLink, str)) infoPanel.display = infoDiv.display = printLink.display = ''; } if (this.lclShowItemNumber) { str = this.justImages ? this.strings.imgCount : (this.hasImages ? this.strings.mixedCount : this.strings.nonImgCount); str = str.replace('%1', this.currentIndex + 1); str = str.replace('%2', this.itemCount); if (this.setInnerHTML(this.fbItemNumber, str)) infoPanel.display = infoDiv.display = itemNumber.display = ''; } var w = this.fbInfoLink.offsetWidth + this.fbPrintLink.offsetWidth + this.fbItemNumber.offsetWidth; if (this.ie) { if (this.fbInfoLink.offsetWidth) w += this.infoLinkGap; if (this.fbPrintLink.offsetWidth) w += this.infoLinkGap; if (this.fbItemNumber.offsetWidth) w += this.infoLinkGap; } infoDiv.width = w + 'px'; if (this.lclNumIndexLinks) { str = ''; var max = this.itemCount - 1, loRange, hiRange; if (this.lclNumIndexLinks === -1) { loRange = 0; hiRange = max; } else { var range = Math.floor(this.lclNumIndexLinks/2) - 1; loRange = this.currentIndex - range; hiRange = this.currentIndex + range; if (loRange <= 0) hiRange += Math.min(1 - loRange, range); if (this.currentIndex === 0) hiRange++; if (hiRange - max >= 0) loRange -= Math.min(1 + hiRange - max, range); if (this.currentIndex === max) loRange--; } var pos = this.indexTop ? 'down' : 'up', i = 0; while (i < this.itemCount) { if (i !== 0 && i < loRange) { str += '... '; i = loRange; } else if (i !== max && i > hiRange) { str += '... '; i = max; } else { if (i !== this.currentIndex) { var item = this.items[i]; str += '' + ++i; try { if (this.showIndexThumbs && item.thumb) { str += ''; } } catch(e) {} str += ' '; } else { str += ++i + ' '; } } } if (this.setInnerHTML(this.fbIndexLinks, str)) { if (this.indexLinksPanel === 'info') { infoPanel.display = ''; } else { this.tagAnchors(this.fbIndexLinks); } } } if (!infoPanel.display) this.tagAnchors(this.fbInfoPanel); }, calcSize: function(fit, pass) { var that = this; if (!this.fbBox) return; var boxX, boxY, boxW, boxH, mainW, mainH ; if (typeof fit === 'undefined') { fit = this.currentItem.type === 'img' ? this.autoSizeImages : this.autoSizeOther; } var box = this.fbBox.style, infoPanel = this.fbInfoPanel.style, controlPanel = this.fbControlPanel.style, indexLinks = this.fbIndexLinks.style, captionDiv = this.fbCaptionDiv.style, itemNumber = this.fbItemNumber.style; if (!pass) { this.displaySize = this.getDisplaySize(); if (this.showCaption && this.fbCaption.innerHTML) captionDiv.display = ''; if (this.lclShowItemNumber) itemNumber.display = ''; } this.upperSpace = Math.max(this.infoTop ? this.fbInfoPanel.offsetHeight : 0, this.controlTop ? this.fbControlPanel.offsetHeight : 0); this.lowerSpace = Math.max(this.infoTop ? 0 : this.fbInfoPanel.offsetHeight, this.controlTop ? 0 : this.fbControlPanel.offsetHeight); if (this.upperSpace) this.upperSpace += 2*this.panelPadding; if (this.lowerSpace) this.lowerSpace += 2*this.panelPadding; this.upperSpace = Math.max(this.upperSpace, this.padding); this.lowerSpace = Math.max(this.lowerSpace, this.padding); var extraSpace; if (this.shadowType === 'none') { extraSpace = 2*this.autoSizeSpace; } else if (this.shadowType === 'halo') { extraSpace = 2*this.shadowSize + this.autoSizeSpace; } else { extraSpace = this.shadowSize + 1.5*this.autoSizeSpace; } var pad = 2*(this.outerBorder + this.innerBorder) + extraSpace, maxW = Math.floor(this.displaySize.width - pad - 2*this.padding), maxH = Math.floor(this.displaySize.height - pad - this.upperSpace - this.lowerSpace), hardW = false, hardH = false; mainW = this.currentItem.nativeWidth + ''; if (mainW === 'max') { mainW = maxW; } else if (mainW.substr(mainW.length - 1) === '%') { mainW = Math.floor(maxW * parseInt(mainW, 10) / 100); } else { mainW = parseInt(mainW, 10); hardW = true; } mainH = this.currentItem.nativeHeight + ''; if (mainH === 'max') { mainH = maxH; } else if (mainH.substr(mainH.length - 1) === '%') { mainH = Math.floor(maxH * parseInt(mainH, 10) / 100); } else { mainH = parseInt(mainH, 10); hardH = true; } this.scaledBy = this.oversizedBy = 0; if (fit) { var scaleW = maxW/mainW, scaleH = maxH/mainH, fullW = mainW, fullH = mainH; if (hardW && hardH) scaleW = scaleH = Math.min(scaleW, scaleH); if (scaleW < 1) mainW = Math.round(mainW * scaleW); if (scaleH < 1) mainH = Math.round(mainH * scaleH); this.scaledBy = Math.max(fullW - mainW, fullH - mainH); if (this.scaledBy && this.scaledBy < this.outerBorder + extraSpace + this.panelPadding) { mainW = fullW; mainH = fullH; this.scaledBy = 0; } } boxW = mainW + 2*(this.innerBorder + this.padding); boxH = mainH + 2*this.innerBorder + this.upperSpace + this.lowerSpace; var infoH = this.fbInfoPanel.offsetHeight, controlH = this.fbControlPanel.offsetHeight; var infoW = boxW - 2*Math.max(this.padding, this.panelPadding); if (this.infoTop === this.controlTop && this.fbControls.offsetWidth) { infoW -= this.fbControls.offsetWidth + this.panelGap; } if (infoW < 0) infoW = 0; infoPanel.width = infoW + 'px'; if (!this.lclNumIndexLinks) { var indexW = 0; } else if (this.indexLinksPanel === 'info' || this.infoTop !== this.controlTop) { var indexW = infoW; } else if (this.indexLinksPanel !== 'info' && this.infoTop === this.controlTop && this.infoCenter) { var indexW = Math.max(this.minIndexWidth, this.fbControls.offsetWidth); } else { var infoUsed = Math.max(this.fbCaption.offsetWidth, this.fbInfoLink.offsetWidth + this.fbPrintLink.offsetWidth + this.fbItemNumber.offsetWidth); var indexW = Math.max(this.minIndexWidth, this.fbControls.offsetWidth, (boxW - infoUsed - 2*Math.max(this.padding, this.panelPadding))); if (infoUsed) indexW -= this.panelGap; } if (indexW) indexLinks.width = (indexW - (this.indexLinksPanel !== 'info' ? 2 : 0)) + 'px'; controlPanel.width = Math.max(indexW, this.fbControls.offsetWidth) + 'px'; var changed = this.fbInfoPanel.offsetHeight !== infoH || this.fbControlPanel.offsetHeight !== controlH; if (this.showCaption) { if (this.minInfoWidth > infoW && !captionDiv.display) { captionDiv.display = 'none'; changed = true; } } if (this.lclShowItemNumber) { if (this.fbInfoLink.offsetWidth + this.fbPrintLink.offsetWidth + this.fbItemNumber.offsetWidth > infoW && !itemNumber.display) { itemNumber.display = 'none'; changed = true; } } if (changed && pass !== 3) return this.calcSize(fit, (pass || 0) + 1); if (!fit) this.oversizedBy = Math.max(boxW - this.displaySize.width, boxH - this.displaySize.height) + 2*this.outerBorder + extraSpace; if (this.oversizedBy < 0) this.oversizedBy = 0; if (this.shadowType === 'halo') { extraSpace = this.shadowSize + this.autoSizeSpace/2; } else { extraSpace = this.autoSizeSpace; } if (typeof this.boxLeft === 'number') { boxX = this.boxLeft; } else if (mainW === maxW) { boxX = extraSpace; } else { var freeSpace = this.displaySize.width - boxW - 2*this.outerBorder; boxX = Math.floor(freeSpace/2); if (boxX < this.autoSizeSpace) { boxX = this.autoSizeSpace; } else { if (typeof this.boxLeft === 'string' && this.boxLeft.substr(this.boxLeft.length - 1) === '%') { boxX += parseInt(this.boxLeft, 10)/100 * boxX; } } } if (typeof this.boxTop === 'number') { boxY = this.boxTop; } else if (mainH === maxH) { boxY = extraSpace; } else { var freeSpace = this.displaySize.height - boxH - 2*this.outerBorder, ratio = freeSpace / this.displaySize.height, factor; if (ratio <= 0.15) { factor = 2; } else if (ratio >= 0.3) { factor = 3; } else { factor = 1 + ratio/0.15; } boxY = Math.floor(freeSpace/factor); if (boxY < this.autoSizeSpace) { boxY = this.autoSizeSpace; } else { if (typeof this.boxTop === 'string' && this.boxTop.substr(this.boxTop.length - 1) === '%') { boxY += parseInt(this.boxTop, 10)/100 * boxY; } } } var boxPosition = box.position; if (this.ieOld) { box.display = 'none'; this.stretchOverlay()(); } else { this.setPosition(this.fbBox, 'fixed'); } var scroll = this.getScroll(); this.setPosition(this.fbBox, boxPosition); box.display = ''; boxX += scroll.left; boxY += scroll.top; if (this.isChild) { var rex = /max|%/i, pos = this.fbParent.pos.fbBox, childX = rex.test(this.currentItem.nativeWidth) ? 99999 : (pos.left + boxX)/2, childY = rex.test(this.currentItem.nativeHeight) ? 99999 : (pos.top + boxY)/2; if (scroll.left < childX && scroll.top < childY) { boxX = Math.min(boxX, childX); boxY = Math.min(boxY, childY); } } var split = (pos = this.pos.fbBox) && !this.liveResize && this.splitResize; if (split === 'auto') split = boxW - pos.width <= boxH - pos.height ? 'wh' : 'hw'; var oncomplete2 = function() { that.fbBox.style.visibility ? that.zoomIn() : that.showContent(); }; var oncomplete = function() { that.setSize(split, { id: 'fbBox', left: boxX, top: boxY, width: boxW, height: boxH, borderWidth: that.outerBorder }, { id: 'fbMainDiv', width: mainW, height: mainH, top: that.upperSpace }, function() { that.timeouts.showContent = setTimeout(oncomplete2, 10); } ); }; this.timeouts.setSize = setTimeout(oncomplete, 10); }, setPosition: function(el, position) { if (el.style.position === position) return; var scroll = this.getScroll(); if (position === 'fixed') { scroll.left = -scroll.left; scroll.top = -scroll.top; } if (this.pos[el.id]) { this.pos[el.id].left += scroll.left; this.pos[el.id].top += scroll.top; } el.style.left = (el.offsetLeft + scroll.left) + 'px'; el.style.top = (el.offsetTop + scroll.top) + 'px'; el.style.position = position; }, collapse: function(callback, phase) { var that = this; if (!phase) { this.setPosition(this.fbBox, 'absolute'); this.fbResizer.onclick = null; this.fbResizer.style.display = 'none'; if (this.fbContent) { this.fbContent.onclick = null; this.fbContent.style.cursor = ''; } if (this.navOverlay) { this.fbLeftNav.style.display = this.fbRightNav.style.display = this.fbOverlayPrev.style.display = this.fbOverlayNext.style.display = 'none'; } var opacity = 0, duration = 0; if (this.currentItem.type === 'img' && !this.fbCanvas.style.visibility) { if (this.currentItem === this.lastShown && this.liveImageResize) opacity = 1; duration = this.imageFadeDuration; } this.liveResize = (opacity === 1); var oncomplete = function() { that.collapse(callback, 1); }; return this.fadeOpacity(this.fbCanvas, opacity, duration, oncomplete); } if (!this.liveResize) { this.fbMainDiv.style.display = 'none'; if (this.fbContent) this.fbContent.style.display = 'none'; this.clearTimeout('loader'); this.timeouts.loader = setTimeout(function() { that.fbLoader.style.display = ''; }, this.loaderDelay); } var infoPanel = this.fbInfoPanel.style, controlPanel = this.fbControlPanel.style; infoPanel.visibility = controlPanel.visibility = 'hidden'; infoPanel.left = controlPanel.left = '0'; infoPanel.top = controlPanel.top = '-9999px'; if (callback) callback(); }, restore: function(callback, phase) { var that = this; if (!phase) { if (this.fbShadowRight.style.display && this.shadowType !== 'none') { this.fbShadowRight.style.display = this.fbShadowBottom.style.display = ''; if (this.shadowType === 'halo') { this.fbShadowTop.style.display = this.fbShadowLeft.style.display = ''; } else { this.fbShadowCorner.style.display = ''; } } var infoPanel = this.fbInfoPanel.style, controlPanel = this.fbControlPanel.style, pad = this.upperSpace + this.pos.fbMainDiv.height + 2*this.innerBorder; infoPanel.top = (((this.infoTop ? this.upperSpace : this.lowerSpace) - this.fbInfoPanel.offsetHeight) / 2 - 1 + (this.infoTop ? 0 : pad)) + 'px'; controlPanel.top = (((this.controlTop ? this.upperSpace : this.lowerSpace) - this.fbControlPanel.offsetHeight) / 2 + (this.controlTop ? 0 : pad)) + 'px'; var pad = Math.max(this.padding, this.panelPadding) + 'px'; infoPanel.left = [this.infoLeft ? pad : '']; controlPanel.left = [this.controlLeft ? pad : '']; infoPanel.visibility = controlPanel.visibility = ''; this.clearTimeout('loader'); this.fbLoader.style.display = 'none'; this.fbMainDiv.style.display = this.fbContent.style.display = ''; var duration = (this.currentItem.type === 'img' && !this.fbCanvas.style.visibility) ? this.imageFadeDuration : 0, oncomplete = function() { that.restore(callback, 1); }; return this.fadeOpacity(this.fbCanvas, 1, duration, oncomplete); } if (this.currentItem.type === 'img' ? this.resizeImages : this.resizeOther) { var scale = 0; if (this.scaledBy > 35) { scale = 1; } else if (this.oversizedBy > 28){ scale = -1; } if (scale) { this.fbResizer.onclick = function() { if (that.isSlideshow && that.pauseOnResize && !that.isPaused) { that.setPause(true); } that.collapse(function() { that.calcSize(scale === -1); }); if (window.event) event.returnValue = false; return false; }; if (this.currentItem.type === 'img' && /cursor|both/.test(this.resizeTool)) { this.fbContent.style.cursor = 'url(' + (scale === -1 ? this.resizeDownCursor : this.resizeUpCursor) +'), default'; this.fbContent.onclick = this.fbResizer.onclick; } if (this.currentItem.type !== 'img' || /topleft|both/.test(this.resizeTool)) { this.fbResizer.style.backgroundPosition = (scale === -1 ? 'bottom' : 'top'); this.fadeOpacity(this.fbResizer, this.controlOpacity); } } } if (this.navOverlay) { var leftNav = this.fbLeftNav.style, rightNav = this.fbRightNav.style, overlayPrev = this.fbOverlayPrev.style, overlayNext = this.fbOverlayNext.style; leftNav.width = rightNav.width = Math.max(this.navOverlayWidth/100 * this.pos.fbMainDiv.width, this.fbOverlayPrev.offsetWidth) + 'px'; leftNav.display = rightNav.display = ''; if (fb.showNavOverlay) { overlayPrev.visibility = overlayNext.visibility = 'hidden'; overlayPrev.display = overlayNext.display = ''; overlayPrev.top = overlayNext.top = ((this.pos.fbMainDiv.height - this.fbOverlayPrev.offsetHeight) * this.navOverlayPos/100) + 'px'; } } if (callback) callback(); }, setSize: function(order) { var that = this, oncomplete = function() {}, arr = [[], []], defer = {}, node, i = arguments.length; if (order === 'wh') { defer.top = 1; defer.height = 1; } else if (order === 'hw') { defer.left = 1; defer.width = 1; } while (i--) { if (typeof arguments[i] === 'object' && (node = this[arguments[i].id])) { var obj = arguments[i]; if (!this.pos[obj.id]) this.pos[obj.id] = {}; for (var property in obj) { if (obj.hasOwnProperty(property) && property !== 'id') { var idx = defer[property] || 0; var start = this.pos[obj.id][property]; if (typeof start !== 'number' || node.style.display || node.style.visibility) { start = obj[property]; } arr[idx].push({ node: node, property: property, start: start, finish: obj[property] }); if (obj.id === 'fbMainDiv') { arr[idx].push({ node: this.fbContent, property: property, start: start, finish: obj[property] }); } if (obj.id === 'fbZoomDiv' && /\b(width|height)\b/i.test(property)) { arr[idx].push({ node: this.fbZoomImg, property: property, start: start, finish: obj[property] }); } this.pos[obj.id][property] = obj[property]; } } } else if (typeof arguments[i] === 'function') { oncomplete = arguments[i]; } } this.resizeGroup(arr[0], function() { that.resizeGroup(arr[1], oncomplete); }); }, showContent: function(phase) { var that = this; if (!phase) { var displaySize = this.getDisplaySize(); if (!this.resized) { var vscrollChanged = displaySize.width !== this.displaySize.width, hscrollChanged = displaySize.height !== this.displaySize.height; if ((vscrollChanged && Math.abs(this.pos.fbBox.width - displaySize.width) < 50) || (hscrollChanged && Math.abs(this.pos.fbBox.height - displaySize.height) < 50)) { this.resized = true; return this.calcSize(this.scaledBy); } } this.resized = false; self.focus(); if (this.ieOld) this.stretchOverlay()(); if ((this.disableScroll || (this.ffOld && /iframe|quicktime/i.test(this.currentItem.type))) && !(this.ieOld || this.webkitOld || this.ie8b2)) { if (this.pos.fbBox.width <= displaySize.width && this.pos.fbBox.height <= displaySize.height) { this.setPosition(this.fbBox, 'fixed'); } } if (this.currentItem.type === 'iframe') { this.fbContent.src = this.currentItem.href; } else if (/flash|quicktime/.test(this.currentItem.type)) { this.setInnerHTML(this.fbContent, this.objectHTML(this.currentItem.href, this.currentItem.type, this.pos.fbMainDiv.width, this.pos.fbMainDiv.height)); } this.prevIndex = this.currentIndex ? this.currentIndex - 1 : this.itemCount - 1; this.nextIndex = this.currentIndex < this.itemCount - 1 ? this.currentIndex + 1 : 0; var prevHref = this.enableWrap || this.currentIndex !== 0 ? this.items[this.prevIndex].href : '', nextHref = this.enableWrap || this.currentIndex !== this.itemCount - 1 ? this.items[this.nextIndex].href : ''; if (this.navButton) { if (prevHref) { if (!this.operaOld) this.fbPrev.href = prevHref; this.fbPrev.title = this.fbOverlayPrev.title; } else { this.fbPrev.removeAttribute('href'); this.fbPrev.title = ''; } if (nextHref) { if (!this.operaOld) this.fbNext.href = nextHref; this.fbNext.title = this.fbOverlayNext.title; } else { this.fbNext.removeAttribute('href'); this.fbNext.title = ''; } var prevOn = this.fbPrev.className.replace('_off', ''), nextOn = this.fbNext.className.replace('_off', ''); this.fbPrev.className = prevOn + (prevHref ? '' : '_off'); this.fbNext.className = nextOn + (nextHref ? '' : '_off'); } if (this.navOverlay) { if (!this.operaOld) { this.fbLeftNav.href = this.fbOverlayPrev.href = prevHref; this.fbRightNav.href = this.fbOverlayNext.href = nextHref; } this.fbLeftNav.style.visibility = prevHref ? '' : 'hidden'; this.fbRightNav.style.visibility = nextHref ? '' : 'hidden'; fb.navOverlayShown = true; } this.fbCanvas.style.visibility = ''; return this.restore(function() { that.timeouts.showContent = setTimeout(function() { that.showContent(1); }, 10); } ); } this.lastShown = this.currentItem; if (!this.currentItem.seen) { this.currentItem.seen = true; this.itemsShown++; } if (this.isSlideshow && !this.isPaused) { this.timeouts.slideshow = setTimeout(function() { if (that.endTask === 'loop' || that.itemsShown < that.itemCount) { that.newContent(that.nextIndex); } else if (that.endTask === 'exit') { that.end(); } else { that.setPause(true); var i = that.itemCount; while (i--) that.items[i].seen = false; that.itemsShown = 0; } }, this.slideInterval*1000); } this.timeouts.preload = setTimeout(function() { that.preloadImages(nextHref || prevHref || '', true); }, 10); }, objectHTML: function(href, type, width, height) { if (type === 'flash') { var classid = 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', mime = 'type="application/x-shockwave-flash"', pluginurl = 'http://get.adobe.com/flashplayer/', match = /\bwmode=(\w+?)\b/i.exec(href), wmode = match ? match[1] : 'window', match = /\bbgcolor=(#\w+?)\b/i.exec(href), bgcolor = match ? match[1] : '', match = /\bscale=(\w+?)\b/i.exec(href), scale = match ? match[1] : 'exactfit', params = { wmode:wmode, bgcolor:bgcolor, scale:scale, quality:'high', flashvars:'autoplay=1&ap=true&border=0&rel=0' }; if (this.ffOld) params.wmode = this.ffMac ? 'window' : 'opaque'; if (this.ffNew && href.indexOf('YV_YEP.swf') !== -1) params.wmode = 'window'; } else { var classid = 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"', mime = 'type="video/quicktime"', pluginurl = 'http://www.apple.com/quicktime/download/', params = { autoplay:'true', controller:'true', showlogo:'false', scale:'tofit' }; } var html = ''; params[type === 'flash' ? 'movie' : 'src'] = this.encodeHTML(href); } else { html += mime + ' data="' + this.encodeHTML(href) + '">'; } for (var name in params) { if (params.hasOwnProperty(name)) { html += ''; } } if (type === 'quicktime' && this.webkitMac) { html += ''; } else { html += '

' + (type === 'flash' ? 'Flash' : 'QuickTime') + ' player is required to view this content.' + '
download player

'; } return html; }, newContent: function(index) { var that = this; this.clearTimeout('slideshow'); this.clearTimeout('resize'); this.currentIndex = index; fb.previousAnchor = this.currentItem; this.currentItem = this.items[index]; if (this.showNavOverlay == 'once' && this.navOverlayShown) this.showNavOverlay = false; var oncomplete = function() { that.updatePanels(); that.fetchContent(function() { that.calcSize(); }); }; this.collapse(function() { that.timeouts.fetch = setTimeout(oncomplete, 10); } ); }, end: function(all) { if (this !== fb.lastChild) return fb.lastChild.end(all); var that = this; this.endAll = this.endAll || all; this.fbOverlay.onclick = null; if (this.isChild) { if (this.endAll) this.imageFadeDuration = this.overlayFadeDuration = this.resizeDuration = 0; } else { if (document.keydownSet) { document.onkeydown = this.priorOnkeydown; document.keydownSet = false; } if (document.keypressSet) { document.onkeypress = this.priorOnkeypress; document.keypressSet = false; } parent.focus(); } if (this.ieOld) { detachEvent('onresize', this.stretchOverlay()); detachEvent('onscroll', this.stretchOverlay()); } for (var key in this.timeouts) { if (this.timeouts.hasOwnProperty(key)) this.clearTimeout(key); } if (this.fbBox.style.visibility) { if (!this.lastShown) this.fbZoomDiv.style.display = 'none'; } else if (this.currentItem.type === 'img' && this.zoomImageStart) { if (this.currentItem.popup) this.currentItem.anchor.onmouseover(); var anchorPos = this.getAnchorPos(this.currentItem.anchor, true); if (this.currentItem.popup) this.currentItem.anchor.onmouseout(); if (anchorPos.width) { this.fbZoomDiv.style.borderWidth = this.zoomPopBorder + 'px'; anchorPos.left -= this.zoomPopBorder; anchorPos.top -= this.zoomPopBorder; this.pos.thumb = anchorPos; return this.zoomOut(); } } if (!this.fbBox.style.visibility) { var anchorPos = this.getAnchorPos(this.currentItem.anchor, !this.currentItem.popup), offset = this.initialSize/2, initialPos = { id: 'fbBox', left: anchorPos.left - offset, top: anchorPos.top - offset, width: this.initialSize, height: this.initialSize }, zeroPos = { id: 'fbBox', left: anchorPos.left, top: anchorPos.top, width: 0, height: 0, borderWidth: 0 }, split = this.splitResize; if (split === 'wh') { split = 'hw'; } else if (split === 'hw') { split = 'wh'; } else if (split === 'auto') { split = this.pos.fbBox.width <= this.pos.fbBox.height ? 'hw' : 'wh'; } var oncomplete3 = function() { setTimeout(function() { that.fbBox.style.visibility = 'hidden'; that.end(); }, 10); }; if (split) { var oncomplete2 = function() { that.setSize(split, initialPos, function() { that.setSize(zeroPos, oncomplete3); }); }; } else { var oncomplete2 = function() { that.setSize(zeroPos, oncomplete3); }; } var oncomplete = function() { setTimeout( function() { if (that.fbContent) { that.fbMainDiv.removeChild(that.fbContent); delete that.fbContent; } }, 20); that.fbLoader.style.display = ''; that.fbCanvas.style.display = that.fbShadowTop.style.display = that.fbShadowRight.style.display = that.fbShadowBottom.style.display = that.fbShadowLeft.style.display = that.fbShadowCorner.style.display = 'none'; oncomplete2(); }; return this.collapse(oncomplete); } this.fbBox.style.display = 'none'; var level = this.children.length + 1, i = this.anchors.length; while(i && this.anchors[i-1].level >= level) i--; this.anchors.length = i; if (this.isChild) this.children.length--; fb.lastChild = this.children[this.children.length-1] || fb; var oncomplete2 = function() { setTimeout(function() { while (that.nodeNames.length) { var id = that.nodeNames.pop(); if (that[id] && that[id].parentNode) { that[id].parentNode.removeChild(that[id]); delete that[id]; } } if (that.endAll && that.isChild) { return fb.end(true); } else if (that.loadPageOnClose) { if (that.loadPageOnClose === 'self' || that.loadPageOnClose === 'this') { location.reload(true); } else if (that.loadPageOnClose === 'back') { history.back(); } else { location.replace(that.loadPageOnClose); } } }, 10); }; var oncomplete = function() { while(that.hiddenEls.length) { var el = that.hiddenEls.pop(); el.style.visibility = 'visible'; if (this.ffOld && this.ffMac) { el.focus(); el.blur(); } } var overlay = that.fbOverlay.style; overlay.display = 'none'; overlay.width = overlay.height = '0'; var duration = that.currentItem.popup ? 6.5 : 0; that.fbZoomDiv.style.opacity = '1'; that.fadeOpacity( that.fbZoomDiv, 0, duration, oncomplete2); that.currentItem = fb.previousAnchor = null; }; this.fadeOpacity(this.fbOverlay, 0, this.overlayFadeDuration, oncomplete); }, zoomIn: function(phase) { var that = this, zoomDiv = this.fbZoomDiv.style; if (!phase) { this.clearTimeout('slowLoad'); zoomDiv.display = this.fbZoomImg.style.display = ''; if (this.currentItem.popup) this.currentItem.anchor.onmouseout(); var pad = this.outerBorder + this.innerBorder - this.zoomPopBorder; var oncomplete = function () { that.fbZoomImg.src = that.currentItem.href; that.setSize( { id: 'fbZoomDiv', width: that.pos.fbMainDiv.width, height: that.pos.fbMainDiv.height, left: that.pos.fbBox.left + pad + that.padding, top: that.pos.fbBox.top + pad + that.upperSpace }, function() { that.zoomIn(1); } ); }; return this.fadeOpacity(this.fbOverlay, this.overlayOpacity, this.overlayFadeDuration, oncomplete); } if (phase === 1) { var boxPos = { left: this.pos.fbBox.left, top: this.pos.fbBox.top, width: this.pos.fbBox.width, height: this.pos.fbBox.height }; var pad = 2*(this.zoomPopBorder - this.outerBorder); this.pos.fbBox = { left: this.pos.fbZoomDiv.left, top: this.pos.fbZoomDiv.top, width: this.pos.fbZoomDiv.width + pad, height: this.pos.fbZoomDiv.height + pad }; this.fbBox.style.visibility = ''; var oncomplete = function() { that.restore(function() { that.zoomIn(2); }); }; return this.setSize( { id: 'fbBox', left: boxPos.left, top: boxPos.top, width: boxPos.width, height: boxPos.height}, oncomplete); } var show = function() { zoomDiv.display = 'none'; that.fbZoomImg.src = ''; zoomDiv.left = zoomDiv.top = zoomDiv.width = zoomDiv.height = that.fbZoomImg.width = that.fbZoomImg.height = '0'; that.showContent(); }; this.timeouts.showContent = setTimeout(show, 10); }, zoomOut: function(phase) { var that = this; if (!phase) { this.fbZoomImg.src = this.currentItem.href; var pad = this.outerBorder + this.innerBorder - this.zoomPopBorder; this.setSize( { id: 'fbZoomDiv', width: this.pos.fbMainDiv.width, height: this.pos.fbMainDiv.height, left: this.pos.fbBox.left + pad + this.padding, top: this.pos.fbBox.top + pad + this.upperSpace }, function() { that.zoomOut(1); } ); } if (phase === 1) { this.fbZoomDiv.style.display = this.fbZoomImg.style.display = ''; this.fbCanvas.style.visibility = 'hidden'; return this.collapse(function() { that.zoomOut(2); }); } if (phase === 2) { var pad = 2*(this.zoomPopBorder - this.outerBorder); return this.setSize( { id: 'fbBox', left: this.pos.fbZoomDiv.left, top: this.pos.fbZoomDiv.top, width: this.pos.fbZoomDiv.width + pad, height: this.pos.fbZoomDiv.height + pad }, function() { that.zoomOut(3); } ); } this.fbBox.style.visibility = 'hidden'; var end = function() { that.fbZoomImg.src = that.pos.thumb.src; that.end(); }; this.setSize( { id: 'fbZoomDiv', left: this.pos.thumb.left, top: this.pos.thumb.top, width: this.pos.thumb.width, height: this.pos.thumb.height }, end); }, setPause: function(pause) { this.isPaused = pause; if (pause) { this.clearTimeout('slideshow'); } else { this.newContent(this.nextIndex); } if (this.showPlayPause) { this.fbPlay.style.top = pause ? '' : '-9999px'; this.fbPause.style.top = pause ? '-9999px' : ''; } }, fadeOpacity: function(el, opacity, duration, callback) { var startOp = +(el.style.opacity || 0); duration = duration || 0; this.clearTimeout['fade' + el.id]; var fadeIn = (startOp <= opacity && opacity > 0); if (duration > 10) duration = 10; if (duration < 0) duration = 0; if (duration === 0) { startOp = opacity; var incr = 1; } else { var root = Math.pow(100, 0.1), power = duration + ((10 - duration)/9) * (Math.log(2)/Math.log(root) - 1), incr = 1/Math.pow(root, power); } if (fadeIn) { el.style.display = el.style.visibility = ''; } else { incr = -incr; } this.stepFade(el, startOp, opacity, incr, fadeIn, callback); }, stepFade: function(el, thisOp, finishOp, incr, fadeIn, callback) { if (!el) return; var that = this; if ((fadeIn && thisOp >= finishOp) || (!fadeIn && thisOp <= finishOp)) thisOp = finishOp; if (this.ie) el.style.filter = 'alpha(opacity=' + thisOp*100 + ')'; el.style.opacity = thisOp + ''; if (thisOp === finishOp) { if (this.ie && finishOp >= 1) el.style.removeAttribute('filter'); if (callback) callback(); } else { this.timeouts['fade' + el.id] = setTimeout(function() { that.stepFade(el, thisOp + incr, finishOp, incr, fadeIn, callback); }, 20); } }, resizeGroup: function(arr, callback) { var i = arr.length; if (!i) return callback ? callback() : null; this.clearTimeout('resize'); var diff = 0; while (i--) { diff = Math.max(diff, Math.abs(arr[i].finish - arr[i].start)); } var duration = this.resizeDuration * (this.liveResize ? 0.65 : 1); var rate = diff && duration ? Math.pow(Math.max(1, 2.2 - duration/10), (Math.log(diff))) / diff : 1; i = arr.length; while (i--) arr[i].diff = arr[i].finish - arr[i].start; this.stepResize(rate, rate, arr, callback); }, stepResize: function(increment, rate, arr, callback) { var that = this; if (increment > 1) increment = 1; var i = arr.length; while (i--) { var node = arr[i].node, prop = arr[i].property, val = Math.round(arr[i].start + arr[i].diff * increment), tag = node.tagName.toLowerCase(); if (tag === 'img' || tag === 'iframe') { node[prop] = val; } else { node.style[prop] = val + 'px'; } } if (increment >= 1) { delete this.timeouts.resize; if (callback) callback(); } else { this.timeouts.resize = setTimeout(function() { that.stepResize(increment + rate, rate, arr, callback); }, 20); } }, getDisplaySize: function() { return { width: this.getDisplayWidth(), height: this.getDisplayHeight() }; }, getDisplayWidth: function() { return this.html.clientWidth || this.bod.clientWidth; }, getDisplayHeight: function() { if (this.webkitOld) return window.innerHeight; if (!this.html.clientHeight || this.operaOld || document.compatMode === 'BackCompat') { return this.bod.clientHeight; } return this.html.clientHeight; }, getScroll: function(win) { if (!(win && win.document)) win = self; var doc = win.document, html = doc.documentElement, bod = doc.body || doc.getElementsByTagName('body')[0], left = win.pageXOffset || bod.scrollLeft || doc.documentElement.scrollLeft || 0; if (this.ie && this.rtl) left -= html.scrollWidth - html.clientWidth; return { left: left, top: win.pageYOffset || bod.scrollTop || doc.documentElement.scrollTop || 0 }; }, getLeftTop: function(el, local) { var left = el.offsetLeft || 0, top = el.offsetTop || 0, doc = el.ownerDocument || el.document, bod = doc.body || doc.getElementsByTagName('body')[0], win = doc.defaultView || doc.parentWindow || doc.contentWindow, scroll = this.getScroll(win), position = this.getStyle(el, 'position', win), rex = /absolute|fixed/, elFlow = !rex.test(position), inFlow = elFlow, node = el; if (position === 'fixed') { left += scroll.left; top += scroll.top; } while (position !== 'fixed' && (node = node.offsetParent)) { var borderLeft = 0, borderTop = 0, nodeFlow = true, position = this.getStyle(node, 'position', win), nodeFlow = !rex.test(position); if (this.opera) { if (local && node !== bod) { left += node.scrollLeft - node.clientLeft; top += node.scrollTop - node.clientTop; } } else if (this.ie) { if (node.currentStyle.hasLayout && node !== doc.documentElement) { borderLeft = node.clientLeft; borderTop = node.clientTop; } } else { borderLeft = parseInt(this.getStyle(node, 'border-left-width', win), 10); borderTop = parseInt(this.getStyle(node, 'border-top-width', win), 10); if (this.ff && node === el.offsetParent && !nodeFlow && (this.ffOld || !elFlow)) { left += borderLeft; top += borderTop; } } if (!nodeFlow) { if (local) return { left: left, top: top }; inFlow = false; } if (node.offsetLeft > 0) left += node.offsetLeft; left += borderLeft; top += node.offsetTop + borderTop; if (position === 'fixed') { left += scroll.left; top += scroll.top; } if (!(this.opera && elFlow) && node !== bod && node !== doc.documentElement) { left -= node.scrollLeft; top -= node.scrollTop; } } if (this.ff && inFlow) { left += parseInt(this.getStyle(bod, 'border-left-width', win), 10); top += parseInt(this.getStyle(bod, 'border-top-width', win), 10); } if (this.webkitOld) { var scriptElement = doc.createElement('script'); scriptElement.innerHTML = 'document.parentWindow=self'; doc.documentElement.appendChild(scriptElement); doc.documentElement.removeChild(scriptElement); win = doc.parentWindow; } if (!local && win !== self) { var iframes = win.parent.document.getElementsByTagName('iframe'), i = iframes.length; while (i--) { var node = iframes[i], idoc = false; try { idoc = node.contentDocument || node.contentWindow; idoc = idoc.document || idoc; } catch(e) {} if (idoc === doc || (typeof idoc !== 'object' && node.src === win.location.href.substr(win.location.href.length - node.src.length))) { if (this.webkitOld) win = doc.defaultView; var pos = this.getLeftTop(node); left += pos.left - scroll.left; top += pos.top - scroll.top; if (this.ie || this.opera) { var padLeft = 0, padTop = 0; if (!this.ie || elFlow) { padLeft = parseInt(this.getStyle(node, 'padding-left', win), 10); padTop = parseInt(this.getStyle(node, 'padding-top', win), 10); } left += node.clientLeft + padLeft; top += node.clientTop + padTop; } else { left += parseInt(this.getStyle(node, 'border-left-width', win), 10) + parseInt(this.getStyle(node, 'padding-left', win), 10); top += parseInt(this.getStyle(node, 'border-top-width', win), 10) + parseInt(this.getStyle(node, 'padding-top', win), 10); } break; } } } return { left: left, top: top }; }, getStyle: function(el, prop, win) { if (!(el && prop)) return ''; if (!win) { var doc = el.ownerDocument || el.document; win = doc.defaultView || doc.parentWindow || doc.contentWindow; } if (el.currentStyle) { return el.currentStyle[prop.replace(/-(\w)/g, function(match, p1) { return p1.toUpperCase(); })] || ''; } else { if (!win) { var doc = el.ownerDocument || el.document; win = doc.defaultView || doc.parentWindow || doc.contentWindow; } return (win.getComputedStyle && win.getComputedStyle(el, '').getPropertyValue(prop)) || ''; } }, getLayout: function(el) { var lay = this.getLeftTop(el); lay.width = el.offsetWidth; lay.height = el.offsetHeight; return lay; }, clearTimeout: function(key) { if (this.timeouts[key]) { clearTimeout(this.timeouts[key]); delete this.timeouts[key]; } }, stretchOverlay: function() { var that = this; return function() { if (arguments.length === 1) { that.clearTimeout('stretch'); that.timeouts.stretch = setTimeout(function() { that.stretchOverlay()(); }, 25); } else { delete that.timeouts.stretch; if (!that.fbBox) return; var width = that.fbBox.offsetLeft + that.fbBox.offsetWidth, height = that.fbBox.offsetTop + that.fbBox.offsetHeight, display = that.getDisplaySize(), scroll = that.getScroll(), overlay = that.fbOverlay.style; overlay.width = overlay.height = '0'; var rtlAdjust = (that.rtl && scroll.left) ? that.html.clientWidth - that.html.scrollWidth : 0; overlay.left = rtlAdjust + 'px'; overlay.width = Math.max(width, that.bod.scrollWidth, that.bod.clientWidth, that.html.clientWidth, display.width + scroll.left) + 'px'; overlay.height = Math.max(height, that.bod.scrollHeight, that.bod.clientHeight, that.html.clientHeight, display.height + scroll.top) + 'px'; } }; }, encodeHTML: function(str) { return str.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, '''); }, decodeHTML: function(str) { return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'"); }, getXMLHttpRequest: function() { var xhr, that = this; if (window.XMLHttpRequest) { if (!(xhr = new XMLHttpRequest())) return false; } else { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { return false; } } } return { getResponse: function(url, callback) { try { xhr.open('GET', url, true); xhr.setRequestHeader('If-Modified-Since', 'Thu, 1 Jan 1970 00:00:00 GMT'); xhr.setRequestHeader('Cache-Control', 'no-cache'); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { xhr.onreadystatechange = function() {}; callback(xhr); } }; xhr.send(null); } catch(e) {} } }; }, setInnerHTML: function(el, strHTML) { try { var range = document.createRange(); range.selectNodeContents(el); range.deleteContents(); if (strHTML) { var xmlDiv = new DOMParser().parseFromString('
' + strHTML + '
', 'application/xhtml+xml'), childNodes = xmlDiv.documentElement.childNodes; for (var i = 0, len = childNodes.length; i < len; i++) { el.appendChild(document.importNode(childNodes[i], true)); } } return true; } catch (e) {} try { el.innerHTML = strHTML; return true; } catch(e) {} return false; }, printContents: function(el, style) { if (el && el.offsetWidth) { var width = el.offsetWidth, height = el.offsetHeight; } else { el = fb.lastChild.fbContent; var pos = fb.lastChild.pos.fbMainDiv, width = pos.width, height = pos.height; } var win = window.open('', '', 'width=' + width + ', height=' + height), doc = win && win.document; if (!doc) { alert('Popup windows are being blocked by your browser.\nUnable to print.'); return false; } if (/\.css$/i.test(style)) { style = ''; } else { style = ''; } var div = document.createElement('div'); div.appendChild(el.cloneNode(true)); doc.open('text/html'); doc.write('' + style + '
' + div.innerHTML + '
'); doc.close(); setTimeout(function() { win && win.print(); win && win.close(); }, 200); return true; }, loadAnchor: function(href, rev, title) { if (href.setAttribute) { var anchor = href; if (!anchor.getAttribute('rel')) anchor.setAttribute('rel', 'floatbox'); fb.lastChild.start(this.tagOneAnchor(anchor)); } else { fb.lastChild.start(this.tagOneAnchor({ href: href, rev: rev, title: title, rel: 'floatbox' })); } }, goBack: function() { var a = fb.previousAnchor; if (a) this.loadAnchor(a.href, a.rev + ' sameBox:true', a.title); }, resize: function(width, height) { var changed = false; if (width && fb.lastChild.currentItem && fb.lastChild.currentItem.nativeWidth != width) { fb.lastChild.currentItem.nativeWidth = width; changed = true; } if (height && fb.lastChild.currentItem && fb.lastChild.currentItem.nativeHeight != height) { fb.lastChild.currentItem.nativeHeight = height; changed = true; } if (changed) fb.lastChild.calcSize(false); } }; function initfb() { if (arguments.callee.done) return; var fbWindow = 'self'; if (self !== parent) { try { if (self.location.host === parent.location.host && self.location.protocol === parent.location.protocol) fbWindow = 'parent'; } catch(e) {} if (fbWindow === 'parent' && !parent.fb) return setTimeout(initfb, 50); } arguments.callee.done = true; if (document.compatMode === 'BackCompat') { alert('Floatbox does not support quirks mode.\nPage needs to have a valid a doc type.'); return; } fb = (fbWindow === 'self' ? new Floatbox() : parent.fb); fb.tagAnchors(self.document.body || self.document.getElementsByTagName('body')[0]); if (fb.autoStart) { fb.start(fb.autoStart); if (typeof fb !== 'undefined') delete fb.autoStart; } else { fb.preloadImages('', true); } } if (document.addEventListener) { document.addEventListener('DOMContentLoaded', initfb, false); } (function() { /*@cc_on if (document.body) { try { document.createElement('div').doScroll('left'); return initfb(); } catch(e) {} } /*@if (false) @*/ if (/loaded|complete/.test(document.readyState)) return initfb(); /*@end @*/ if (!initfb.done) setTimeout(arguments.callee, 50); })(); fb_prevOnload = window.onload; window.onload = function() { if (arguments.callee.done) return; arguments.callee.done = true; if (typeof fb_prevOnload === 'function') fb_prevOnload(); initfb(); };/** * jCarousel - Riding carousels with jQuery * http://sorgalla.com/jcarousel/ * * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * Built on top of the jQuery library * http://jquery.com * * Inspired by the "Carousel Component" by Bill Scott * http://billwscott.com/carousel/ */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9($){$.1s.A=9(o){z 4.14(9(){2H r(4,o)})};8 q={W:F,23:1,1G:1,u:7,15:3,16:7,1H:\'2I\',24:\'2J\',1i:0,B:7,1j:7,1I:7,25:7,26:7,27:7,28:7,29:7,2a:7,2b:7,1J:\'\',1K:\'\',2c:\'2d\',2e:\'2d\',1L:7,1M:7};$.A=9(e,o){4.5=$.17({},q,o||{});4.Q=F;4.D=7;4.H=7;4.t=7;4.R=7;4.S=7;4.O=!4.5.W?\'1N\':\'2f\';4.E=!4.5.W?\'2g\':\'2h\';8 a=\'\',1d=e.J.1d(\' \');1k(8 i=0;i<1d.K;i++){6(1d[i].2i(\'A-2j\')!=-1){$(e).1t(1d[i]);8 a=1d[i];1l}}6(e.2k==\'2K\'||e.2k==\'2L\'){4.t=$(e);4.D=4.t.18();6(4.D.1m(\'A-H\')){6(!4.D.18().1m(\'A-D\'))4.D=4.D.B(\'\');4.D=4.D.18()}X 6(!4.D.1m(\'A-D\'))4.D=4.t.B(\'\').18()}X{4.D=$(e);4.t=$(e).2M(\'>2l,>2m,N>2l,N>2m\')}6(a!=\'\'&&4.D.18()[0].J.2i(\'A-2j\')==-1)4.D.B(\'\');4.H=4.t.18();6(!4.H.K||!4.H.1m(\'A-H\'))4.H=4.t.B(\'\').18();4.S=$(\'.A-11\',4.D);6(4.S.u()==0&&4.5.1K!=7)4.S=4.H.1u(4.5.1K).11();4.S.V(4.J(\'A-11\'));4.R=$(\'.A-19\',4.D);6(4.R.u()==0&&4.5.1J!=7)4.R=4.H.1u(4.5.1J).11();4.R.V(4.J(\'A-19\'));4.H.V(4.J(\'A-H\'));4.t.V(4.J(\'A-t\'));4.D.V(4.J(\'A-D\'));8 b=4.5.16!=7?1n.1O(4.1o()/4.5.16):7;8 c=4.t.2O(\'1v\');8 d=4;6(c.u()>0){8 f=0,i=4.5.1G;c.14(9(){d.1P(4,i++);f+=d.T(4,b)});4.t.y(4.O,f+\'U\');6(!o||o.u===L)4.5.u=c.u()}4.D.y(\'1w\',\'1x\');4.R.y(\'1w\',\'1x\');4.S.y(\'1w\',\'1x\');4.2n=9(){d.19()};4.2o=9(){d.11()};4.1Q=9(){d.2p()};6(4.5.1j!=7)4.5.1j(4,\'2q\');6($.2r.2s){4.1e(F,F);$(2t).1y(\'2P\',9(){d.1z()})}X 4.1z()};8 r=$.A;r.1s=r.2Q={A:\'0.2.3\'};r.1s.17=r.17=$.17;r.1s.17({1z:9(){4.C=7;4.G=7;4.Y=7;4.12=7;4.1a=F;4.1f=7;4.P=7;4.Z=F;6(4.Q)z;4.t.y(4.E,4.1A(4.5.1G)+\'U\');8 p=4.1A(4.5.23);4.Y=4.12=7;4.1p(p,F);$(2t).1R(\'2u\',4.1Q).1y(\'2u\',4.1Q)},2v:9(){4.t.2w();4.t.y(4.E,\'2R\');4.t.y(4.O,\'2S\');6(4.5.1j!=7)4.5.1j(4,\'2v\');4.1z()},2p:9(){6(4.P!=7&&4.Z)4.t.y(4.E,r.I(4.t.y(4.E))+4.P);4.P=7;4.Z=F;6(4.5.1I!=7)4.5.1I(4);6(4.5.16!=7){8 a=4;8 b=1n.1O(4.1o()/4.5.16),O=0,E=0;$(\'1v\',4.t).14(9(i){O+=a.T(4,b);6(i+14.5.u)a=4.5.u;1k(8 j=i;j<=a;j++){8 e=4.M(j);6(!e.K||e.1m(\'A-1b-1B\'))z F}z 1g},M:9(i){z $(\'.A-1b-\'+i,4.t)},2x:9(i,s){8 e=4.M(i),1S=0,2x=0;6(e.K==0){8 c,e=4.1C(i),j=r.I(i);1q(c=4.M(--j)){6(j<=0||c.K){j<=0?4.t.2y(e):c.1T(e);1l}}}X 1S=4.T(e);e.1t(4.J(\'A-1b-1B\'));1U s==\'2W\'?e.2X(s):e.2w().2Y(s);8 a=4.5.16!=7?1n.1O(4.1o()/4.5.16):7;8 b=4.T(e,a)-1S;6(i>0&&i<4.C)4.t.y(4.E,r.I(4.t.y(4.E))-b+\'U\');4.t.y(4.O,r.I(4.t.y(4.O))+b+\'U\');z e},1V:9(i){8 e=4.M(i);6(!e.K||(i>=4.C&&i<=4.G))z;8 d=4.T(e);6(i<4.C)4.t.y(4.E,r.I(4.t.y(4.E))+d+\'U\');e.1V();4.t.y(4.O,r.I(4.t.y(4.O))-d+\'U\')},19:9(){4.1D();6(4.P!=7&&!4.Z)4.1W(F);X 4.15(((4.5.B==\'1X\'||4.5.B==\'G\')&&4.5.u!=7&&4.G==4.5.u)?1:4.C+4.5.15)},11:9(){4.1D();6(4.P!=7&&4.Z)4.1W(1g);X 4.15(((4.5.B==\'1X\'||4.5.B==\'C\')&&4.5.u!=7&&4.C==1)?4.5.u:4.C-4.5.15)},1W:9(b){6(4.Q||4.1a||!4.P)z;8 a=r.I(4.t.y(4.E));!b?a-=4.P:a+=4.P;4.Z=!b;4.Y=4.C;4.12=4.G;4.1p(a)},15:9(i,a){6(4.Q||4.1a)z;4.1p(4.1A(i),a)},1A:9(i){6(4.Q||4.1a)z;i=r.I(i);6(4.5.B!=\'1c\')i=i<1?1:(4.5.u&&i>4.5.u?4.5.u:i);8 a=4.C>i;8 b=r.I(4.t.y(4.E));8 f=4.5.B!=\'1c\'&&4.C<=1?1:4.C;8 c=a?4.M(f):4.M(4.G);8 j=a?f:f-1;8 e=7,l=0,p=F,d=0;1q(a?--j>=i:++j=1&&(4.5.u==7||j<=4.5.u))))b=a?b+d:b-d}8 g=4.1o();8 h=[];8 k=0,j=i,v=0;8 c=4.M(i-1);1q(++k){e=4.M(j);p=!e.K;6(e.K==0){e=4.1C(j).V(4.J(\'A-1b-1B\'));c.K==0?4.t.2y(e):c[a?\'1u\':\'1T\'](e)}c=e;8 d=4.T(e);6(d==0){2Z(\'30: 31 1N/2f 32 1k 33. 34 35 36 37 38 39. 3a...\');z 0}6(4.5.B!=\'1c\'&&4.5.u!==7&&j>4.5.u)h.3b(e);X 6(p)l+=d;v+=d;6(v>=g)1l;j++}1k(8 x=0;x0){4.t.y(4.O,4.T(4.t)+l+\'U\');6(a){b-=l;4.t.y(4.E,r.I(4.t.y(4.E))-l+\'U\')}}8 n=i+k-1;6(4.5.B!=\'1c\'&&4.5.u&&n>4.5.u)n=4.5.u;6(j>n){k=0,j=n,v=0;1q(++k){8 e=4.M(j--);6(!e.K)1l;v+=4.T(e);6(v>=g)1l}}8 o=n-k+1;6(4.5.B!=\'1c\'&&o<1)o=1;6(4.Z&&a){b+=4.P;4.Z=F}4.P=7;6(4.5.B!=\'1c\'&&n==4.5.u&&(n-k+1)>=1){8 m=r.10(4.M(n),!4.5.W?\'1r\':\'1Y\');6((v-m)>g)4.P=v-g-m}1q(i-->o)b+=4.T(4.M(i));4.Y=4.C;4.12=4.G;4.C=o;4.G=n;z b},1p:9(p,a){6(4.Q||4.1a)z;4.1a=1g;8 b=4;8 c=9(){b.1a=F;6(p==0)b.t.y(b.E,0);6(b.5.B==\'1X\'||b.5.B==\'G\'||b.5.u==7||b.G=4.5.u)n=4.P!=7&&!4.Z}6(p==L||p==7){8 p=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'G\')||4.C>1);6(!4.Q&&(!4.5.B||4.5.B==\'G\')&&4.5.u!=7&&4.C==1)p=4.P!=7&&4.Z}8 a=4;4.R[n?\'1y\':\'1R\'](4.5.2c,4.2n)[n?\'1t\':\'V\'](4.J(\'A-19-1E\')).20(\'1E\',n?F:1g);4.S[p?\'1y\':\'1R\'](4.5.2e,4.2o)[p?\'1t\':\'V\'](4.J(\'A-11-1E\')).20(\'1E\',p?F:1g);6(4.R.K>0&&(4.R[0].1h==L||4.R[0].1h!=n)&&4.5.1L!=7){4.R.14(9(){a.5.1L(a,4,n)});4.R[0].1h=n}6(4.S.K>0&&(4.S[0].1h==L||4.S[0].1h!=p)&&4.5.1M!=7){4.S.14(9(){a.5.1M(a,4,p)});4.S[0].1h=p}},1Z:9(a){8 b=4.Y==7?\'2q\':(4.Y<4.C?\'19\':\'11\');4.13(\'25\',a,b);6(4.Y!==4.C){4.13(\'26\',a,b,4.C);4.13(\'27\',a,b,4.Y)}6(4.12!==4.G){4.13(\'28\',a,b,4.G);4.13(\'29\',a,b,4.12)}4.13(\'2a\',a,b,4.C,4.G,4.Y,4.12);4.13(\'2b\',a,b,4.Y,4.12,4.C,4.G)},13:9(a,b,c,d,e,f,g){6(4.5[a]==L||(1U 4.5[a]!=\'2B\'&&b!=\'2A\'))z;8 h=1U 4.5[a]==\'2B\'?4.5[a][b]:4.5[a];6(!$.3g(h))z;8 j=4;6(d===L)h(j,c,b);X 6(e===L)4.M(d).14(9(){h(j,4,d,c,b)});X{1k(8 i=d;i<=e;i++)6(i!==7&&!(i>=f&&i<=g))4.M(i).14(9(){h(j,4,i,c,b)})}},1C:9(i){z 4.1P(\'<1v>\',i)},1P:9(e,i){8 a=$(e).V(4.J(\'A-1b\')).V(4.J(\'A-1b-\'+i));a.20(\'3h\',i);z a},J:9(c){z c+\' \'+c+(!4.5.W?\'-3i\':\'-W\')},T:9(e,d){8 a=e.2C!=L?e[0]:e;8 b=!4.5.W?a.1F+r.10(a,\'2D\')+r.10(a,\'1r\'):a.2E+r.10(a,\'2F\')+r.10(a,\'1Y\');6(d==L||b==d)z b;8 w=!4.5.W?d-r.10(a,\'2D\')-r.10(a,\'1r\'):d-r.10(a,\'2F\')-r.10(a,\'1Y\');$(a).y(4.O,w+\'U\');z 4.T(a)},1o:9(){z!4.5.W?4.H[0].1F-r.I(4.H.y(\'3j\'))-r.I(4.H.y(\'3k\')):4.H[0].2E-r.I(4.H.y(\'3l\'))-r.I(4.H.y(\'3m\'))},3n:9(i,s){6(s==L)s=4.5.u;z 1n.3o((((i-1)/s)-1n.3p((i-1)/s))*s)+1}});r.17({3q:9(d){z $.17(q,d||{})},10:9(e,p){6(!e)z 0;8 a=e.2C!=L?e[0]:e;6(p==\'1r\'&&$.2r.2s){8 b={\'1w\':\'1x\',\'3r\':\'3s\',\'1N\':\'1i\'},21,22;$.2G(a,b,9(){21=a.1F});b[\'1r\']=0;$.2G(a,b,9(){22=a.1F});z 22-21}z r.I($.y(a,p))},I:9(v){v=3t(v);z 3u(v)?0:v}})})(3v);',62,218,'||||this|options|if|null|var|function||||||||||||||||||||list|size||||css|return|jcarousel|wrap|first|container|lt|false|last|clip|intval|className|length|undefined|get|div|wh|tail|locked|buttonNext|buttonPrev|dimension|px|addClass|vertical|else|prevFirst|inTail|margin|prev|prevLast|callback|each|scroll|visible|extend|parent|next|animating|item|circular|split|buttons|timer|true|jcarouselstate|auto|initCallback|for|break|hasClass|Math|clipping|animate|while|marginRight|fn|removeClass|before|li|display|block|bind|setup|pos|placeholder|create|stopAuto|disabled|offsetWidth|offset|animation|reloadCallback|buttonNextHTML|buttonPrevHTML|buttonNextCallback|buttonPrevCallback|width|ceil|format|funcResize|unbind|old|after|typeof|remove|scrollTail|both|marginBottom|notify|attr|oWidth|oWidth2|start|easing|itemLoadCallback|itemFirstInCallback|itemFirstOutCallback|itemLastInCallback|itemLastOutCallback|itemVisibleInCallback|itemVisibleOutCallback|buttonNextEvent|click|buttonPrevEvent|height|left|top|indexOf|skin|nodeName|ul|ol|funcNext|funcPrev|reload|init|browser|safari|window|resize|reset|empty|add|prepend|startAuto|onAfterAnimation|object|jquery|marginLeft|offsetHeight|marginTop|swap|new|normal|swing|UL|OL|find|class|children|load|prototype|0px|10px|lock|unlock|has|string|html|append|alert|jCarousel|No|set|items|This|will|cause|an|infinite|loop|Aborting|push|onBeforeAnimation|setTimeout|1000|clearTimeout|isFunction|jcarouselindex|horizontal|borderLeftWidth|borderRightWidth|borderTopWidth|borderBottomWidth|index|round|floor|defaults|float|none|parseInt|isNaN|jQuery'.split('|'),0,{})) function contentCarousel_initCallback(carousel, state) { // Disable autoscrolling if the user clicks the prev or next button. carousel.buttonNext.bind('click', function() { // carousel.startAuto(0); }); carousel.buttonPrev.bind('click', function() { // carousel.startAuto(0); }); // Pause autoscrolling if the user moves with the cursor over the clip. carousel.clip.hover(function() { carousel.stopAuto(); }, function() { carousel.startAuto(); }); // controls jQuery('.jcarousel-control a').bind('click', function() { carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text())); return false; }); jQuery('.jcarousel-scroll select').bind('change', function() { carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value); return false; }); jQuery('#contentCarousel-next').bind('click', function() { carousel.next(); return false; }); jQuery('#contentCarousel-prev').bind('click', function() { carousel.prev(); return false; }); }; function uitvoerigbelicht_initCallback(carousel, state) { // Disable autoscrolling if the user clicks the prev or next button. carousel.buttonNext.bind('click', function() { carousel.startAuto(0); }); carousel.buttonPrev.bind('click', function() { carousel.startAuto(0); }); // Pause autoscrolling if the user moves with the cursor over the clip. carousel.clip.hover(function() { carousel.stopAuto(); }, function() { carousel.startAuto(); }); // controls jQuery('.jcarousel-control a').bind('click', function() { carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text())); return false; }); jQuery('.jcarousel-scroll select').bind('change', function() { carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value); return false; }); jQuery('#uitvoerigbelicht-next').bind('click', function() { carousel.next(); return false; }); jQuery('#uitvoerigbelicht-prev').bind('click', function() { carousel.prev(); return false; }); }; function haaifeit_initCallback(carousel, state) { carousel.lock(); jQuery.get( '/haaienfeiten_feed.php', { 'feed': 'yes' }, function(xml) { mycarousel_itemAddCallback(carousel, xml); }, 'xml' ); }; function mycarousel_itemAddCallback(carousel, xml) { var $items = jQuery('item', xml); $items.each(function(i) { carousel.add(i + 1, mycarousel_getItemHTML(this)); }); carousel.size($items.size()); // Unlock and setup. carousel.unlock(); carousel.setup(); }; /** * Item html creation helper. */ function mycarousel_getItemHTML(item) { // return '

'+$('title', item).text()+'

'+mycarousel_truncate($('description', item).text(), 90)+'

'; return '

'+$('title', item).text()+'

'; }; // it will append class="active" into // 1 to 1 // http://mheidzir.wordpress.com/2009/06/25/how-to-highlight-external-controller-for-jcarousel/ function highlight(carousel, obejctli,liindex,listate){ jQuery('.jcarousel-control a:nth-child('+ liindex +')').attr("class","active"); }; // it will remove last active slide from // 1 to 1 function removehighlight(carousel, obejctli,liindex,listate){ jQuery('.jcarousel-control a:nth-child('+ liindex +')').removeAttr("class","active"); }; /* * jQuery validation plug-in 1.7 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submitButton){hidden.remove();}return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value);},filled:function(a){return!!$.trim(""+a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&¶ms.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);else if(element.parentNode.name in this.submitted)this.element(element.parentNode);},highlight:function(element,errorClass,validClass){$(element).addClass(errorClass).removeClass(validClass);},unhighlight:function(element,errorClass,validClass){$(element).removeClass(errorClass).addClass(validClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");validator.settings[eventType]&&validator.settings[eventType].call(validator,this[0]);}$(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",delegate).validateDelegate(":radio, :checkbox, select, option","click",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id +", check the '"+rule.method+"' method",e);throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+"");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message=="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=jQuery.format(message.replace(theregex,'{$1}'),rule.parameters);}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr('for')==name;});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages;}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var val=$(element).val();return val&&val.length>0;case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};var message=(previous.message=response||validator.defaultMessage(element,"remote"));errors[element.name]=$.isFunction(message)?message(value):message;validator.showErrors(errors);}previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});return value==target.val();}}});$.format=$.validator.format;})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true);},teardown:function(){this.removeEventListener(original,handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,e);}});};$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});})(jQuery); $(document).ready(function() { $("#subForm").validate({ rules: {email: {email: true}}, messages: {email: {email: "Dit e-mailadres is niet juist"}} }); $('.footer form fieldset').hover(function() { $(this).animate({ opacity: 1}, 100);},function() { $(this).animate({ opacity: .3}, 100);}); $('.footer form fieldset input').focus(function() { $(this).parent().css({ opacity: 1});}); $('li.portfolio').hover( function(){$('ul#portfolio_menu').fadeIn(500);} ); $('ul#portfolio_menu').hover( function(){}, function(){$('ul#portfolio_menu').fadeOut(500);} ); $("#readmore").click(function() { $("#textBox").slideDown('slow'); $("#readless").show(); $("#readmore").hide(); }); $("#readless").click(function() { $("#textBox").slideUp('slow'); $("#readless").hide(); $("#readmore").show(); }); var flashvars = {}; var params = {wmode:"transparent",menu: "false"}; var attributes = {}; swfobject.embedSWF("/vis_homepage.swf", "swimmingFishReplace", "160", "200", "9.0.0", "/expressInstall.swf", flashvars, params, attributes); jQuery('#uitvoerigbelicht').jcarousel({ auto: 5, scroll: 1, wrap: 'last', animation: 1000, initCallback: uitvoerigbelicht_initCallback, itemVisibleInCallback: highlight, // new itemVisibleOutCallback: removehighlight // new }); /** * We show a simple loading indicator * using the jQuery ajax events */ jQuery().ajaxStart(function() { jQuery(".jcarousel-clip-vertical").addClass('loading'); }); jQuery().ajaxStop(function() { jQuery(".jcarousel-clip-vertical").removeClass('loading'); }); jQuery('#haaifeit').jcarousel({ visible:1, scroll:1, initCallback: haaifeit_initCallback }); jQuery('#contentCarousel').jcarousel({ visible:1, scroll:1, initCallback: contentCarousel_initCallback, itemVisibleInCallback: highlight, // new itemVisibleOutCallback: removehighlight // new }); }); function keepMeAlive(imgName) { myImg = document.getElementById(imgName); if (myImg) myImg.src = myImg.src.replace(/\?.*$/, '?' + Math.random()); } window.setInterval("keepMeAlive('keepalive')", 60000);