var HTTP_PATH = "http://www.ecom.cz/"; var HTTP_PATH_SHOP = "http://www.ecom.cz/e-shop/"; /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\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")}})})();//\///// //\ overLIB 4.22 - You may not remove or change this notice. //\ Copyright Erik Bosrup 1998-2004. All rights reserved. //\ //\ Contributors are listed on the homepage. //\ This file might be old, always check for the latest version at: //\ http://www.bosrup.com/web/overlib/ //\ //\ Please read the license agreement (available through the link above) //\ before using overLIB. Direct any licensing questions to erik@bosrup.com. //\ //\ Do not sell this as your own work or remove this copyright notice. //\ For full details on copying or changing this script please read the //\ license agreement at the link above. Please give credit on sites that //\ use overLIB and submit changes of the script so other people can use //\ them as well. // $Revision: 1.119 $ $Date: 2005/07/02 23:41:44 $ //\///// //\mini //////// // PRE-INIT // Ignore these lines, configuration is below. //////// var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.22', 0); var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4; var olHideForm=0; // parameter for hiding SELECT and ActiveX elements in IE5.5+ var olHautoFlag = 0; // flags for over-riding VAUTO and HAUTO if corresponding var olVautoFlag = 0; // positioning commands are used on the command line var hookPts = new Array(), postParse = new Array(), cmdLine = new Array(), runTime = new Array(); // for plugins registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass'); //////// // DEFAULT CONFIGURATION // Settings you want everywhere are set here. All of this can also be // changed on your html page or through an overLIB call. //////// if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF"; if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399"; if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000"; if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF"; if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF"; if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica"; if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica"; if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica"; if (typeof ol_textsize=='undefined') var ol_textsize="1"; if (typeof ol_captionsize=='undefined') var ol_captionsize="1"; if (typeof ol_closesize=='undefined') var ol_closesize="1"; if (typeof ol_width=='undefined') var ol_width="200"; if (typeof ol_border=='undefined') var ol_border="1"; if (typeof ol_cellpad=='undefined') var ol_cellpad=2; if (typeof ol_offsetx=='undefined') var ol_offsetx=10; if (typeof ol_offsety=='undefined') var ol_offsety=10; if (typeof ol_text=='undefined') var ol_text="Default Text"; if (typeof ol_cap=='undefined') var ol_cap=""; if (typeof ol_sticky=='undefined') var ol_sticky=0; if (typeof ol_background=='undefined') var ol_background=""; if (typeof ol_close=='undefined') var ol_close="Close"; if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT; if (typeof ol_status=='undefined') var ol_status=""; if (typeof ol_autostatus=='undefined') var ol_autostatus=0; if (typeof ol_height=='undefined') var ol_height=-1; if (typeof ol_snapx=='undefined') var ol_snapx=0; if (typeof ol_snapy=='undefined') var ol_snapy=0; if (typeof ol_fixx=='undefined') var ol_fixx=-1; if (typeof ol_fixy=='undefined') var ol_fixy=-1; if (typeof ol_relx=='undefined') var ol_relx=null; if (typeof ol_rely=='undefined') var ol_rely=null; if (typeof ol_fgbackground=='undefined') var ol_fgbackground=""; if (typeof ol_bgbackground=='undefined') var ol_bgbackground=""; if (typeof ol_padxl=='undefined') var ol_padxl=1; if (typeof ol_padxr=='undefined') var ol_padxr=1; if (typeof ol_padyt=='undefined') var ol_padyt=1; if (typeof ol_padyb=='undefined') var ol_padyb=1; if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0; if (typeof ol_vpos=='undefined') var ol_vpos=BELOW; if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0; if (typeof ol_capicon=='undefined') var ol_capicon=""; if (typeof ol_frame=='undefined') var ol_frame=self; if (typeof ol_timeout=='undefined') var ol_timeout=0; if (typeof ol_function=='undefined') var ol_function=null; if (typeof ol_delay=='undefined') var ol_delay=0; if (typeof ol_hauto=='undefined') var ol_hauto=0; if (typeof ol_vauto=='undefined') var ol_vauto=0; if (typeof ol_closeclick=='undefined') var ol_closeclick=0; if (typeof ol_wrap=='undefined') var ol_wrap=0; if (typeof ol_followmouse=='undefined') var ol_followmouse=1; if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0; if (typeof ol_closetitle=='undefined') var ol_closetitle='Close'; if (typeof ol_compatmode=='undefined') var ol_compatmode=0; if (typeof ol_css=='undefined') var ol_css=CSSOFF; if (typeof ol_fgclass=='undefined') var ol_fgclass=""; if (typeof ol_bgclass=='undefined') var ol_bgclass=""; if (typeof ol_textfontclass=='undefined') var ol_textfontclass=""; if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass=""; if (typeof ol_closefontclass=='undefined') var ol_closefontclass=""; //////// // ARRAY CONFIGURATION //////// // You can use these arrays to store popup text here instead of in the html. if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1"); if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1"); //////// // END OF CONFIGURATION // Don't change anything below this line, all configuration is above. //////// //////// // INIT //////// // Runtime variables init. Don't change for config! var o3_text=""; var o3_cap=""; var o3_sticky=0; var o3_background=""; var o3_close="Close"; var o3_hpos=RIGHT; var o3_offsetx=2; var o3_offsety=2; var o3_fgcolor=""; var o3_bgcolor=""; var o3_textcolor=""; var o3_capcolor=""; var o3_closecolor=""; var o3_width=100; var o3_border=1; var o3_cellpad=2; var o3_status=""; var o3_autostatus=0; var o3_height=-1; var o3_snapx=0; var o3_snapy=0; var o3_fixx=-1; var o3_fixy=-1; var o3_relx=null; var o3_rely=null; var o3_fgbackground=""; var o3_bgbackground=""; var o3_padxl=0; var o3_padxr=0; var o3_padyt=0; var o3_padyb=0; var o3_fullhtml=0; var o3_vpos=BELOW; var o3_aboveheight=0; var o3_capicon=""; var o3_textfont="Verdana,Arial,Helvetica"; var o3_captionfont="Verdana,Arial,Helvetica"; var o3_closefont="Verdana,Arial,Helvetica"; var o3_textsize="1"; var o3_captionsize="1"; var o3_closesize="1"; var o3_frame=self; var o3_timeout=0; var o3_timerid=0; var o3_allowmove=0; var o3_function=null; var o3_delay=0; var o3_delayid=0; var o3_hauto=0; var o3_vauto=0; var o3_closeclick=0; var o3_wrap=0; var o3_followmouse=1; var o3_mouseoff=0; var o3_closetitle=''; var o3_compatmode=0; var o3_css=CSSOFF; var o3_fgclass=""; var o3_bgclass=""; var o3_textfontclass=""; var o3_captionfontclass=""; var o3_closefontclass=""; // Display state variables var o3_x = 0; var o3_y = 0; var o3_showingsticky = 0; var o3_removecounter = 0; // Our layer var over = null; var fnRef, hoveringSwitch = false; var olHideDelay; // Decide browser version var isMac = (navigator.userAgent.indexOf("Mac") != -1); var olOp = (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && document.createTextNode); // Opera 7 var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4); var olNs6 = (document.getElementById) ? true : false; var olKq = (olNs6 && /konqueror/i.test(navigator.userAgent)); var olIe4 = (document.all) ? true : false; var olIe5 = false; var olIe55 = false; // Added additional variable to identify IE5.5+ var docRoot = 'document.body'; // Resize fix for NS4.x to keep track of layer if (olNs4) { var oW = window.innerWidth; var oH = window.innerHeight; window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); } } // Microsoft Stupidity Check(tm). if (olIe4) { var agent = navigator.userAgent; if (/MSIE/.test(agent)) { var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]); if (versNum >= 5){ olIe5=true; olIe55=(versNum>=5.5&&!olOp) ? true : false; if (olNs6) olNs6=false; } } if (olNs6) olIe4 = false; } // Check for compatability mode. if (document.compatMode && document.compatMode == 'CSS1Compat') { docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot); } // Add window onload handlers to indicate when all modules have been loaded // For Netscape 6+ and Mozilla, uses addEventListener method on the window object // For IE it uses the attachEvent method of the window object and for Netscape 4.x // it sets the window.onload handler to the OLonload_handler function for Bubbling if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false); else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler); var capExtent; //////// // PUBLIC FUNCTIONS //////// // overlib(arg0,...,argN) // Loads parameters into global runtime variables. function overlib() { if (!olLoaded || isExclusive(overlib.arguments)) return true; if (olCheckMouseCapture) olMouseCapture(); if (over) { over = (typeof over.id != 'string') ? o3_frame.document.all['overDiv'] : over; cClick(); } // Load defaults to runtime. olHideDelay=0; o3_text=ol_text; o3_cap=ol_cap; o3_sticky=ol_sticky; o3_background=ol_background; o3_close=ol_close; o3_hpos=ol_hpos; o3_offsetx=ol_offsetx; o3_offsety=ol_offsety; o3_fgcolor=ol_fgcolor; o3_bgcolor=ol_bgcolor; o3_textcolor=ol_textcolor; o3_capcolor=ol_capcolor; o3_closecolor=ol_closecolor; o3_width=ol_width; o3_border=ol_border; o3_cellpad=ol_cellpad; o3_status=ol_status; o3_autostatus=ol_autostatus; o3_height=ol_height; o3_snapx=ol_snapx; o3_snapy=ol_snapy; o3_fixx=ol_fixx; o3_fixy=ol_fixy; o3_relx=ol_relx; o3_rely=ol_rely; o3_fgbackground=ol_fgbackground; o3_bgbackground=ol_bgbackground; o3_padxl=ol_padxl; o3_padxr=ol_padxr; o3_padyt=ol_padyt; o3_padyb=ol_padyb; o3_fullhtml=ol_fullhtml; o3_vpos=ol_vpos; o3_aboveheight=ol_aboveheight; o3_capicon=ol_capicon; o3_textfont=ol_textfont; o3_captionfont=ol_captionfont; o3_closefont=ol_closefont; o3_textsize=ol_textsize; o3_captionsize=ol_captionsize; o3_closesize=ol_closesize; o3_timeout=ol_timeout; o3_function=ol_function; o3_delay=ol_delay; o3_hauto=ol_hauto; o3_vauto=ol_vauto; o3_closeclick=ol_closeclick; o3_wrap=ol_wrap; o3_followmouse=ol_followmouse; o3_mouseoff=ol_mouseoff; o3_closetitle=ol_closetitle; o3_css=ol_css; o3_compatmode=ol_compatmode; o3_fgclass=ol_fgclass; o3_bgclass=ol_bgclass; o3_textfontclass=ol_textfontclass; o3_captionfontclass=ol_captionfontclass; o3_closefontclass=ol_closefontclass; setRunTimeVariables(); fnRef = ''; // Special for frame support, over must be reset... o3_frame = ol_frame; if(!(over=createDivContainer())) return false; parseTokens('o3_', overlib.arguments); if (!postParseChecks('o3_',overlib.arguments)) return false; if (o3_delay == 0) { return runHook("olMain", FREPLACE); } else { o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay); return false; } } // Clears popups if appropriate function nd(time) { if (olLoaded && !isExclusive()) { hideDelay(time); // delay popup close if time specified if (o3_removecounter >= 1) { o3_showingsticky = 0 }; if (o3_showingsticky == 0) { o3_allowmove = 0; if (over != null && (o3_compatmode ? 1 : o3_timerid == 0)) runHook("hideObject", FREPLACE, over); } else { o3_removecounter++; } } return true; } // The Close onMouseOver function for stickies function cClick() { if (olLoaded) { runHook("hideObject", FREPLACE, over); o3_showingsticky = 0; } return false; } // Method for setting page specific defaults. function overlib_pagedefaults() { parseTokens('ol_', overlib_pagedefaults.arguments); } //////// // OVERLIB MAIN FUNCTION //////// // This function decides what it is we want to display and how we want it done. function olMain() { var layerhtml, styleType; runHook("olMain", FBEFORE); if (o3_background!="" || o3_fullhtml) { // Use background instead of box. layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml); } else { // They want a popup box. styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass"); // Prepare popup background if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\""; if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground); // Prepare popup colors if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor); if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor); // Prepare popup height if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height); else o3_height = ""; // Decide which kinda box. if (o3_cap=="") { // Plain layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text); } else { // With caption if (o3_sticky) { // Show close text layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close); } else { // No close text layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, ""); } } } // We want it to stick! if (o3_sticky) { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } o3_showingsticky = 1; o3_removecounter = 0; } // Created a separate routine to generate the popup to make it easier // to implement a plugin capability if (!runHook("olCreatePopup", FREPLACE, layerhtml)) return false; // Prepare status bar if (o3_autostatus > 0) { o3_status = o3_text; if (o3_autostatus > 1) o3_status = o3_cap; if (o3_wrap) o3_status = o3_status.replace(/ /g,' '); } // When placing the layer the first time, even stickies may be moved. o3_allowmove = 0; // Initiate a timer for timeout if (o3_timeout > 0) { if (o3_timerid > 0) clearTimeout(o3_timerid); o3_timerid = setTimeout("cClick()", o3_timeout); } // Show layer runHook("disp", FREPLACE, o3_status); runHook("olMain", FAFTER); return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != ''); } //////// // LAYER GENERATION FUNCTIONS //////// // These functions just handle popup content with tags that should adhere to the W3C standards specification. // Makes simple table without caption function ol_content_simple(text) { var cpIsMultiple = /,/.test(o3_cellpad); var txt = '
' : ((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'
'; set_background(""); return txt; } // Makes table with caption and optional close link function ol_content_caption(text,title,close) { var nameId, txt, cpIsMultiple = /,/.test(o3_cellpad); var closing, closeevent; closing = ""; closeevent = "onmouseover"; if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onclick"; if (o3_capicon != "") { nameId = ' hspace = \"5\"'+' align = \"middle\" alt = \"\"'; if (typeof o3_dragimg != 'undefined' && o3_dragimg) nameId =' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"'; o3_capicon = ''; } if (close != "") closing = ''+(o3_closefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass ? '' : wrapStr(1,o3_closesize,'close'))+''; txt = '
' : '>')+(o3_captionfontclass ? '' : ''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass ? '' : wrapStr(1,o3_captionsize)+'')+''+closing+'
' :((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize)) + '
'; set_background(""); return txt; } // Sets the background picture,padding and lots more. :) function ol_content_background(text,picture,hasfullhtml) { var txt; if (hasfullhtml) { txt=text; } else { txt='
'+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'
'; } set_background(picture); return txt; } // Loads a picture into the div. function set_background(pic) { if (pic == "") { if (olNs4) { over.background.src = null; } else if (over.style) { over.style.backgroundImage = "none"; } } else { if (olNs4) { over.background.src = pic; } else if (over.style) { over.style.width=o3_width + 'px'; over.style.backgroundImage = "url("+pic+")"; } } } //////// // HANDLING FUNCTIONS //////// var olShowId=-1; // Displays the popup function disp(statustext) { runHook("disp", FBEFORE, statustext); if (o3_allowmove == 0) { runHook("placeLayer", FREPLACE); (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over); o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1; } runHook("disp", FAFTER, statustext); if (statustext != "") self.status = statustext; } // Creates the actual popup structure function olCreatePopup(lyrContent){ runHook("olCreatePopup", FBEFORE, lyrContent); if (o3_wrap) { var wd,ww,theObj = (olNs4 ? over : over.style); theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0); layerWrite(lyrContent); wd = (olNs4 ? over.clip.width : over.offsetWidth); if (wd > (ww=windowWidth())) { lyrContent=lyrContent.replace(/\ /g, ' '); o3_width=ww; o3_wrap=0; } } layerWrite(lyrContent); // Have to set o3_width for placeLayer() routine if o3_wrap is turned on if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth); runHook("olCreatePopup", FAFTER, lyrContent); return true; } // Decides where we want the popup. function placeLayer() { var placeX, placeY, widthFix = 0; // HORIZONTAL PLACEMENT, re-arranged to work in Safari if (o3_frame.innerWidth) widthFix=18; iwidth = windowWidth(); // Horizontal scroll offset winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset; placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix); // VERTICAL PLACEMENT, re-arranged to work in Safari if (o3_frame.innerHeight) { iheight=o3_frame.innerHeight; } else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) { iheight=eval('o3_frame.'+docRoot+'.clientHeight'); } // Vertical scroll offset scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset; placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset); // Actually move the object. repositionTo(over, placeX, placeY); } // Moves the layer function olMouseMove(e) { var e = (e) ? e : event; if (e.pageX) { o3_x = e.pageX; o3_y = e.pageY; } else if (e.clientX) { o3_x = eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'); o3_y = eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'); } if (o3_allowmove == 1) runHook("placeLayer", FREPLACE); // MouseOut handler if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) { (olHideDelay ? hideDelay(olHideDelay) : cClick()); hoveringSwitch = !hoveringSwitch; } } // Fake function for 3.0 users. function no_overlib() { return ver3fix; } // Capture the mouse and chain other scripts. function olMouseCapture() { capExtent = document; var fN, str = '', l, k, f, wMv, sS, mseHandler = olMouseMove; var re = /function[ ]*(\w*)\(/; wMv = (!olIe4 && window.onmousemove); if (document.onmousemove || wMv) { if (wMv) capExtent = window; f = capExtent.onmousemove.toString(); fN = f.match(re); if (fN == null) { str = f+'(e); '; } else if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove' || (wMv && fN[1] == 'onmousemove')) { if (!olOp && wMv) { l = f.indexOf('{')+1; k = f.lastIndexOf('}'); sS = f.substring(l,k); if ((l = sS.indexOf('(')) != -1) { sS = sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,''); if (eval("typeof " + sS + " == 'undefined'")) window.onmousemove = null; else str = sS + '(e);'; } } if (!str) { olCheckMouseCapture = false; return; } } else { if (fN[1]) str = fN[1]+'(e); '; else { l = f.indexOf('{')+1; k = f.lastIndexOf('}'); str = f.substring(l,k) + '\n'; } } str += 'olMouseMove(e); '; mseHandler = new Function('e', str); } capExtent.onmousemove = mseHandler; if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE); } //////// // PARSING FUNCTIONS //////// // Does the actual command parsing. function parseTokens(pf, ar) { // What the next argument is expected to be. var v, i, mode=-1, par = (pf != 'ol_'); var fnMark = (par && !ar.length ? 1 : 0); for (i = 0; i < ar.length; i++) { if (mode < 0) { // Arg is maintext,unless its a number between pmStart and pmUpper // then its a command. if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) { fnMark = (par ? 1 : 0); i--; // backup one so that the next block can parse it } else { switch(pf) { case 'ol_': ol_text = ar[i].toString(); break; default: o3_text=ar[i].toString(); } } mode = 0; } else { // Note: NS4 doesn't like switch cases with vars. if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; } if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; } if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; } if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; } if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; } if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; } if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); if(pf!='ol_') olHautoFlag=1; continue; } if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; } if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; } if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; } if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; } if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; } if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; } if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; } if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; } if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; } if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; } if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; } if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; } if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again. if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; } if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; } if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; } if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; } if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; } if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; } if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; } if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; } if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; } if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; } if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; } if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); if (pf!='ol_') olVautoFlag=1; continue; } if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; } if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; } if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; } if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; } if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; } if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i]; opt_FUNCTION(v); } continue; } if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; } if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; } if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; } if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; } if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; } if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; } if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff==0) ? 1 : 0'); v=ar[i+1]; if (pf != 'ol_' && eval(pf+'mouseoff') && typeof v == 'number' && (v < pmStart || v > pmUpper)) olHideDelay=ar[++i]; continue; } if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; } if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; } if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0) ? 1 : 0'); continue; } if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; } if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; } if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; } if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; } if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; } i = parseCmdLine(pf, i, ar); } } if (fnMark && o3_function) o3_text = o3_function(); if ((pf == 'o3_') && o3_wrap) { o3_width = 0; var tReg=/<.*\n*>/ig; if (!tReg.test(o3_text)) o3_text = o3_text.replace(/[ ]+/g, ' '); if (!tReg.test(o3_cap))o3_cap = o3_cap.replace(/[ ]+/g, ' '); } if ((pf == 'o3_') && o3_sticky) { if (!o3_close && (o3_frame != ol_frame)) o3_close = ol_close; if (o3_mouseoff && (o3_frame == ol_frame)) opt_NOCLOSE(' '); } } //////// // LAYER FUNCTIONS //////// // Writes to a layer function layerWrite(txt) { txt += "\n"; if (olNs4) { var lyr = o3_frame.document.layers['overDiv'].document lyr.write(txt) lyr.close() } else if (typeof over.innerHTML != 'undefined') { if (olIe5 && isMac) over.innerHTML = ''; over.innerHTML = txt; } else { range = o3_frame.document.createRange(); range.setStartAfter(over); domfrag = range.createContextualFragment(txt); while (over.hasChildNodes()) { over.removeChild(over.lastChild); } over.appendChild(domfrag); } } // Make an object visible function showObject(obj) { runHook("showObject", FBEFORE, obj); var theObj=(olNs4 ? obj : obj.style); theObj.visibility = 'visible'; runHook("showObject", FAFTER, obj); } // Hides an object function hideObject(obj) { runHook("hideObject", FBEFORE, obj); var theObj=(olNs4 ? obj : obj.style); if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=0; } theObj.visibility = 'hidden'; theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0); if (o3_timerid > 0) clearTimeout(o3_timerid); if (o3_delayid > 0) clearTimeout(o3_delayid); o3_timerid = 0; o3_delayid = 0; self.status = ""; if (obj.onmouseout||obj.onmouseover) { if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER); obj.onmouseout = obj.onmouseover = null; } runHook("hideObject", FAFTER, obj); } // Move a layer function repositionTo(obj, xL, yL) { var theObj=(olNs4 ? obj : obj.style); theObj.left = xL + (!olNs4 ? 'px' : 0); theObj.top = yL + (!olNs4 ? 'px' : 0); } // Check position of cursor relative to overDiv DIVision; mouseOut function function cursorOff() { var left = parseInt(over.style.left); var top = parseInt(over.style.top); var right = left + (over.offsetWidth >= parseInt(o3_width) ? over.offsetWidth : parseInt(o3_width)); var bottom = top + (over.offsetHeight >= o3_aboveheight ? over.offsetHeight : o3_aboveheight); if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true; return false; } //////// // COMMAND FUNCTIONS //////// // Calls callme or the default function. function opt_FUNCTION(callme) { o3_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function')); return 0; } // Handle hovering function opt_NOCLOSE(unused) { if (!unused) o3_close = ""; if (olNs4) { over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER); over.onmouseover = function () { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } } over.onmouseout = function (e) { if (olHideDelay) hideDelay(olHideDelay); else cClick(e); } } else { over.onmouseover = function () {hoveringSwitch = true; if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =0; } } } return 0; } // Function to scan command line arguments for multiples function opt_MULTIPLEARGS(i, args, parameter) { var k=i, re, pV, str=''; for(k=i; kpmStart) break; str += args[k] + ','; } if (str) str = str.substring(0,--str.length); k--; // reduce by one so the for loop this is in works correctly pV=(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str; eval(parameter + '="' + pV + '"'); return k; } // Remove   in texts when done. function nbspCleanup() { if (o3_wrap) { o3_text = o3_text.replace(/\ /g, ' '); o3_cap = o3_cap.replace(/\ /g, ' '); } } // Escape embedded single quotes in text strings function escSglQuote(str) { return str.toString().replace(/'/g,"\\'"); } // Onload handler for window onload event function OLonLoad_handler(e) { var re = /\w+\(.*\)[;\s]+/g, olre = /overlib\(|nd\(|cClick\(/, fn, l, i; if(!olLoaded) olLoaded=1; // Remove it for Gecko based browsers if(window.removeEventListener && e.eventPhase == 3) window.removeEventListener("load",OLonLoad_handler,false); else if(window.detachEvent) { // and for IE and Opera 4.x but execute calls to overlib, nd, or cClick() window.detachEvent("onload",OLonLoad_handler); var fN = document.body.getAttribute('onload'); if (fN) { fN=fN.toString().match(re); if (fN && fN.length) { for (i=0; i' : '
') : ''; else { fontStr='o3_'+whichString+'font'; fontColor='o3_'+((whichString=='caption')? 'cap' : whichString)+'color'; return (hasDims&&!olNs4) ? (isClose ? '' : '
') : ''; } } // Quotes Multi word font names; needed for CSS Standards adherence in font-family function quoteMultiNameFonts(theFont) { var v, pM=theFont.split(','); for (var i=0; i 0) clearTimeout(o3_timerid); o3_timerid=setTimeout("cClick()",(o3_timeout=time)); } } // Was originally in the placeLayer() routine; separated out for future ease function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix) { var placeX, iwidth=browserWidth, winoffset=horizontalScrollAmount; var parsedWidth = parseInt(o3_width); if (o3_fixx > -1 || o3_relx != null) { // Fixed position placeX=(o3_relx != null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx); } else { // If HAUTO, decide what to use. if (o3_hauto == 1) { if ((o3_x - winoffset) > (iwidth / 2) && o3_hpos == RIGHT && ((o3_x - winoffset) - (parsedWidth + o3_offsetx - iwidth > (iwidth - widthFix)))) { o3_hpos = LEFT; } else if (o3_hpos == LEFT && ((o3_x - o3_offsetx - parsedWidth) < winoffset)) { o3_hpos = RIGHT; } } // From mouse if (o3_hpos == CENTER) { // Center placeX = o3_x+o3_offsetx-(parsedWidth/2); if (placeX < winoffset) placeX = winoffset; } if (o3_hpos == RIGHT) { // Right placeX = o3_x+o3_offsetx; if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) { placeX = iwidth+winoffset - parsedWidth - widthFix; if (placeX < 0) placeX = 0; } } if (o3_hpos == LEFT) { // Left placeX = o3_x-o3_offsetx-parsedWidth; if (placeX < winoffset) placeX = winoffset; } // Snapping! if (o3_snapx > 1) { var snapping = placeX % o3_snapx; if (o3_hpos == LEFT) { placeX = placeX - (o3_snapx+snapping); } else { // CENTER and RIGHT placeX = placeX+(o3_snapx - snapping); } if (placeX < winoffset) placeX = winoffset; } } return placeX; } // was originally in the placeLayer() routine; separated out for future ease function verticalPlacement(browserHeight,verticalScrollAmount) { var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount; var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight)); if (o3_fixy > -1 || o3_rely != null) { // Fixed position placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy); } else { // If VAUTO, decide what to use. if (o3_vauto == 1) { if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos == BELOW && (o3_y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) { o3_vpos = ABOVE; } else if (o3_vpos == ABOVE && (o3_y - (parsedHeight + o3_offsety) - scrolloffset < 0)) { o3_vpos = BELOW; } } // From mouse if (o3_vpos == ABOVE) { if (o3_aboveheight == 0) o3_aboveheight = parsedHeight; placeY = o3_y - (o3_aboveheight+o3_offsety); if (placeY < scrolloffset) placeY = scrolloffset; } else { // BELOW placeY = o3_y+o3_offsety; } // Snapping! if (o3_snapy > 1) { var snapping = placeY % o3_snapy; if (o3_aboveheight > 0 && o3_vpos == ABOVE) { placeY = placeY - (o3_snapy+snapping); } else { placeY = placeY+(o3_snapy - snapping); } if (placeY < scrolloffset) placeY = scrolloffset; } } return placeY; } // checks positioning flags function checkPositionFlags() { if (olHautoFlag) olHautoFlag = o3_hauto=0; if (olVautoFlag) olVautoFlag = o3_vauto=0; return true; } // get Browser window width function windowWidth() { var w; if (o3_frame.innerWidth) w=o3_frame.innerWidth; else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth')) w=eval('o3_frame.'+docRoot+'.clientWidth'); return w; } // create the div container for popup content if it doesn't exist function createDivContainer(id,frm,zValue) { id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000); var objRef, divContainer = layerReference(id); if (divContainer == null) { if (olNs4) { divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm); objRef = divContainer; } else { var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]); if (olIe4&&!document.getElementById) { body.insertAdjacentHTML("beforeEnd",'
'); divContainer=layerReference(id); } else { divContainer = frm.document.createElement("DIV"); divContainer.id = id; body.appendChild(divContainer); } objRef = divContainer.style; } objRef.position = 'absolute'; objRef.visibility = 'hidden'; objRef.zIndex = zValue; if (olIe4&&!olOp) objRef.left = objRef.top = '0px'; else objRef.left = objRef.top = -10000 + (!olNs4 ? 'px' : 0); } return divContainer; } // get reference to a layer with ID=id function layerReference(id) { return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.document.all[id] : o3_frame.document.getElementById(id))); } //////// // UTILITY FUNCTIONS //////// // Checks if something is a function. function isFunction(fnRef) { var rtn = true; if (typeof fnRef == 'object') { for (var i = 0; i < fnRef.length; i++) { if (typeof fnRef[i]=='function') continue; rtn = false; break; } } else if (typeof fnRef != 'function') { rtn = false; } return rtn; } // Converts an array into an argument string for use in eval. function argToString(array, strtInd, argName) { var jS = strtInd, aS = '', ar = array; argName=(argName ? argName : 'ar'); if (ar.length > jS) { for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], '; aS = aS.substring(0, aS.length-2); } return aS; } // Places a hook in the correct position in a hook point. function reOrder(hookPt, fnRef, order) { var newPt = new Array(), match, i, j; if (!order || typeof order == 'undefined' || typeof order == 'number') return hookPt; if (typeof order=='function') { if (typeof fnRef=='object') { newPt = newPt.concat(fnRef); } else { newPt[newPt.length++]=fnRef; } for (i = 0; i < hookPt.length; i++) { match = false; if (typeof fnRef == 'function' && hookPt[i] == fnRef) { continue; } else { for(j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) { match = true; break; } } if (!match) newPt[newPt.length++] = hookPt[i]; } newPt[newPt.length++] = order; } else if (typeof order == 'object') { if (typeof fnRef == 'object') { newPt = newPt.concat(fnRef); } else { newPt[newPt.length++] = fnRef; } for (j = 0; j < hookPt.length; j++) { match = false; if (typeof fnRef == 'function' && hookPt[j] == fnRef) { continue; } else { for (i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) { match = true; break; } } if (!match) newPt[newPt.length++]=hookPt[j]; } for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i]; newPt.length = 0; for (j = 0; j < hookPt.length; j++) { match = false; for (i = 0; i < order.length; i++) { if (hookPt[j] == order[i]) { match = true; break; } } if (!match) newPt[newPt.length++] = hookPt[j]; } newPt = newPt.concat(order); } hookPt = newPt; return hookPt; } //////// // PLUGIN ACTIVATION FUNCTIONS //////// // Runs plugin functions to set runtime variables. function setRunTimeVariables(){ if (typeof runTime != 'undefined' && runTime.length) { for (var k = 0; k < runTime.length; k++) { runTime[k](); } } } // Runs plugin functions to parse commands. function parseCmdLine(pf, i, args) { if (typeof cmdLine != 'undefined' && cmdLine.length) { for (var k = 0; k < cmdLine.length; k++) { var j = cmdLine[k](pf, i, args); if (j >- 1) { i = j; break; } } } return i; } // Runs plugin functions to do things after parse. function postParseChecks(pf,args){ if (typeof postParse != 'undefined' && postParse.length) { for (var k = 0; k < postParse.length; k++) { if (postParse[k](pf,args)) continue; return false; // end now since have an error } } return true; } //////// // PLUGIN REGISTRATION FUNCTIONS //////// // Registers commands and creates constants. function registerCommands(cmdStr) { if (typeof cmdStr!='string') return; var pM = cmdStr.split(','); pms = pms.concat(pM); for (var i = 0; i< pM.length; i++) { eval(pM[i].toUpperCase()+'='+pmCount++); } } // Registers no-parameter commands function registerNoParameterCommands(cmdStr) { if (!cmdStr && typeof cmdStr != 'string') return; pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr; } // Register a function to hook at a certain point. function registerHook(fnHookTo, fnRef, hookType, optPm) { var hookPt, last = typeof optPm; if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return; if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference(); hookPt = hookPts[fnHookTo]; if (hookType != null) { if (hookType == FREPLACE) { hookPt.ovload = fnRef; // replace normal overlib routine if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; } else if (hookType == FBEFORE || hookType == FAFTER) { var hookPt=(hookType == 1 ? hookPt.before : hookPt.after); if (typeof fnRef == 'object') { hookPt = hookPt.concat(fnRef); } else { hookPt[hookPt.length++] = fnRef; } if (optPm) hookPt = reOrder(hookPt, fnRef, optPm); } else if (hookType == FALTERNATE) { if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef; } else if (hookType == FCHAIN) { hookPt = hookPt.chain; if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions else hookPt[hookPt.length++]=fnRef; } return; } } // Register a function that will set runtime variables. function registerRunTimeFunction(fn) { if (isFunction(fn)) { if (typeof fn == 'object') { runTime = runTime.concat(fn); } else { runTime[runTime.length++] = fn; } } } // Register a function that will handle command parsing. function registerCmdLineFunction(fn){ if (isFunction(fn)) { if (typeof fn == 'object') { cmdLine = cmdLine.concat(fn); } else { cmdLine[cmdLine.length++] = fn; } } } // Register a function that does things after command parsing. function registerPostParseFunction(fn){ if (isFunction(fn)) { if (typeof fn == 'object') { postParse = postParse.concat(fn); } else { postParse[postParse.length++] = fn; } } } //////// // PLUGIN REGISTRATION FUNCTIONS //////// // Runs any hooks registered. function runHook(fnHookTo, hookType) { var l = hookPts[fnHookTo], k, rtnVal = null, optPm, arS, ar = runHook.arguments; if (hookType == FREPLACE) { arS = argToString(ar, 2); if (typeof l == 'undefined' || !(l = l.ovload)) rtnVal = eval(fnHookTo+'('+arS+')'); else rtnVal = eval('l('+arS+')'); } else if (hookType == FBEFORE || hookType == FAFTER) { if (typeof l != 'undefined') { l=(hookType == 1 ? l.before : l.after); if (l.length) { arS = argToString(ar, 2); for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')'); } } } else if (hookType == FALTERNATE) { optPm = ar[2]; arS = argToString(ar, 3); if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') { rtnVal = eval(fnHookTo+'('+arS+')'); } else { rtnVal = eval('l('+arS+')'); } } else if (hookType == FCHAIN) { arS=argToString(ar,2); l=l.chain; for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) break; } return rtnVal; } //////// // OBJECT CONSTRUCTORS //////// // Object for handling hooks. function FunctionReference() { this.ovload = null; this.before = new Array(); this.after = new Array(); this.alt = new Array(); this.chain = new Array(); } // Object for simple access to the overLIB version used. // Examples: simpleversion:351 major:3 minor:5 revision:1 function Info(version, prerelease) { this.version = version; this.prerelease = prerelease; this.simpleversion = Math.round(this.version*100); this.major = parseInt(this.simpleversion / 100); this.minor = parseInt(this.simpleversion / 10) - this.major * 10; this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10; this.meets = meets; } // checks for Core Version required function meets(reqdVersion) { return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion)); } //////// // STANDARD REGISTRATIONS //////// registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF); registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF); registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF); registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS); registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS); registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS); registerPostParseFunction(checkPositionFlags); registerHook("hideObject", nbspCleanup, FAFTER); registerHook("horizontalPlacement", horizontalPlacement, FCHAIN); registerHook("verticalPlacement", verticalPlacement, FCHAIN); if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1; registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode'); /////// // ESTABLISH MOUSECAPTURING /////// // Capture events, alt. diffuses the overlib function. var olCheckMouseCapture=true; if ((olNs4 || olNs6 || olIe4)) { olMouseCapture(); } else { overlib = no_overlib; nd = no_overlib; ver3fix = true; } /* * Thickbox 3.1 - One Box To Rule Them All. - updated by NEDIK * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ var tb_pathToImage = HTTP_PATH+"images/common/ajax-loader.gif"; var tb_onUnloadFnc; /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ //on page load call tb_init $(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox imgLoader = new Image();// preload image imgLoader.src = tb_pathToImage; }); //add thickbox to href & area elements that have a class of .thickbox function tb_init(domChunk){ $(domChunk).click(function(){ var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t,a,g); this.blur(); return false; }); } function tb_show(caption, url, imageGroup, cbOnLoad, cbOnUnload) {//function called when the user clicks on a thickbox link try { var callBackOnLoad = cbOnLoad; tb_onUnloadFnc = cbOnUnload; if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 $("body","html").css({height: "100%", width: "100%"}); $("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 $("body").append("
"); $("#TB_overlay").click(tb_remove); } }else{//all others if(document.getElementById("TB_overlay") === null){ $("body").append("
"); $("#TB_overlay").click(tb_remove); } } if(tb_detectMacXFF()){ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} $("body").append("
");//add loader to the page $('#TB_load').show();//show loader var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved baseURL = url.substr(0, url.indexOf("?")); }else{ baseURL = url; } var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if(imageGroup){ TB_TempArray = $("a[@rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "  Next >"; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "  < Prev"; } } else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); } } } imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; // Resizing large images - orginal by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} $("#TB_window").remove(); $("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } $("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext(){ $("#TB_window").remove(); $("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } $("#TB_next").click(goNext); } document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } else if(keycode == 190){ // display previous image if(!(TB_NextHTML == "")){ document.onkeydown = ""; goNext(); } } else if(keycode == 188){ // display next image if(!(TB_PrevHTML == "")){ document.onkeydown = ""; goPrev(); } } }; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"}); //for safari using css instead of show }; imgPreloader.src = url; }else{//code to show html var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal $("#TB_window").append("
"+caption+"
"); }else{//iframe modal $("#TB_overlay").unbind(); $("#TB_window").append(""); } }else{// not an iframe, ajax if($("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){//ajax no modal $("#TB_window").append("
"+caption+"
"); }else{//ajax modal $("#TB_overlay").unbind(); $("#TB_window").append("
"); } }else{//this means the window is already up, we are just loading new content via ajax $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption); } } $("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline') != -1){ $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function () { $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); $("#TB_load").remove(); $("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){//safari needs help because it will not fire iframe onload $("#TB_load").remove(); $("#TB_window").css({display:"block"}); } }else{ $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method tb_position(); $("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); $("#TB_window").css({display:"block"}); if (callBackOnLoad) window.setTimeout(callBackOnLoad, 50); }); } } if(!params['modal']){ document.onkeyup = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } }; } } catch(e) { //nothing here } } //helper functions below function tb_showIframe(){ $("#TB_load").remove(); $("#TB_window").css({display:"block"}); } function tb_remove() { $("#TB_imageOff").unbind("click"); $("#TB_closeWindowButton").unbind("click"); $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); $("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 $("body","html").css({height: "auto", width: "auto"}); $("html").css("overflow",""); } document.onkeydown = ""; document.onkeyup = ""; if (tb_onUnloadFnc) { temp_tb_onUnloadFnc = tb_onUnloadFnc; tb_onUnloadFnc = null; window.setTimeout(temp_tb_onUnloadFnc, 50); } nd(); // overlib end return false; } function tb_position() { $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6 $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}// return empty object var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;} var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } } (function($){ /* hoverIntent by Brian Cherne */ $.fn.hoverIntent = function(f,g) { // default configuration options var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; // override configuration options with user supplied object cfg = $.extend(cfg, g ? { over: f, out: g } : f ); // instantiate variables // cX, cY = current X and Y position of mouse, updated by mousemove event // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval var cX, cY, pX, pY; // A private function for getting mouse position var track = function(ev) { cX = ev.pageX; cY = ev.pageY; }; // A private function for comparing current and previous mouse position var compare = function(ev,ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); // compare mouse positions to see if they've crossed the threshold if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { $(ob).unbind("mousemove",track); // set hoverIntent state to true (so mouseOut can be called) ob.hoverIntent_s = 1; return cfg.over.apply(ob,[ev]); } else { // set previous coordinates for next time pX = cX; pY = cY; // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); } }; // A private function for delaying the mouseOut function var delay = function(ev,ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob,[ev]); }; // A private function for handling mouse 'hovering' var handleHover = function(e) { // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } } if ( p == this ) { return false; } // copy objects to be passed into t (required for event object to be passed in IE) var ev = jQuery.extend({},e); var ob = this; // cancel hoverIntent timer if it exists if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } // else e.type == "onmouseover" if (e.type == "mouseover") { // set "previous" X and Y position based on initial entry point pX = ev.pageX; pY = ev.pageY; // update "current" X and Y position based on mousemove $(ob).bind("mousemove",track); // start polling interval (self-calling timeout) to compare mouse coordinates over time if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} // else e.type == "onmouseout" } else { // unbind expensive mousemove event $(ob).unbind("mousemove",track); // if hoverIntent state is true, then call the mouseOut function after the specified delay if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} } }; // bind the function to the two event listeners return this.mouseover(handleHover).mouseout(handleHover); }; })(jQuery);/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $LastChangedDate: 2007-06-19 20:25:28 -0500 (Tue, 19 Jun 2007) $ * $Rev: 2111 $ * * Version 2.1 */ (function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='', opts.frameWidth, opts.frameHeight); } else { $.get(href, function(data) { _set_content( '
' + data + '
', opts.frameWidth, opts.frameHeight ); }); } }; function _proceed_image() { if (opts.imageScale) { var w = $.fn.fancybox.getViewport(); var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); var width = Math.round(r * imagePreloader.width); var height = Math.round(r * imagePreloader.height); } else { var width = imagePreloader.width; var height = imagePreloader.height; } _set_content('', width, height); }; function _preload_neighbor_images() { if ((opts.itemArray.length -1) > opts.itemCurrent) { var href = opts.itemArray[opts.itemCurrent + 1].href; if (href.match(imageRegExp)) { objNext = new Image(); objNext.src = href; } } if (opts.itemCurrent > 0) { var href = opts.itemArray[opts.itemCurrent -1].href; if (href.match(imageRegExp)) { objNext = new Image(); objNext.src = href; } } }; function _set_content(value, width, height) { busy = true; var pad = opts.padding; if (isIE) { $("#fancy_content")[0].style.removeExpression("height"); $("#fancy_content")[0].style.removeExpression("width"); } if (pad > 0) { width += pad * 2; height += pad * 2; $("#fancy_content").css({ 'top' : pad + 'px', 'right' : pad + 'px', 'bottom' : pad + 'px', 'left' : pad + 'px', 'width' : 'auto', 'height' : 'auto' }); if (isIE) { $("#fancy_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)'); $("#fancy_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)'); } } else { $("#fancy_content").css({ 'top' : 0, 'right' : 0, 'bottom' : 0, 'left' : 0, 'width' : '100%', 'height' : '100%' }); } if ($("#fancy_outer").is(":visible") && width == $("#fancy_outer").width() && height == $("#fancy_outer").height()) { $("#fancy_content").fadeOut("fast", function() { $("#fancy_content").empty().append($(value)).fadeIn("normal", function() { _finish(); }); }); return; } var w = $.fn.fancybox.getViewport(); var itemLeft = (width + 36) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width - 36) / 2)); var itemTop = (height + 50) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height - 50) / 2)); var itemOpts = { 'left': itemLeft, 'top': itemTop, 'width': width + 'px', 'height': height + 'px' }; if ($("#fancy_outer").is(":visible")) { $("#fancy_content").fadeOut("normal", function() { $("#fancy_content").empty(); $("#fancy_outer").animate(itemOpts, opts.zoomSpeedChange, opts.easingChange, function() { $("#fancy_content").append($(value)).fadeIn("normal", function() { _finish(); }); }); }); } else { if (opts.zoomSpeedIn > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { $("#fancy_content").empty().append($(value)); var orig_item = opts.itemArray[opts.itemCurrent].orig; var orig_pos = $.fn.fancybox.getPosition(orig_item); $("#fancy_outer").css({ 'left': (orig_pos.left - 18) + 'px', 'top': (orig_pos.top - 18) + 'px', 'width': $(orig_item).width(), 'height': $(orig_item).height() }); if (opts.zoomOpacity) { itemOpts.opacity = 'show'; } $("#fancy_outer").animate(itemOpts, opts.zoomSpeedIn, opts.easingIn, function() { _finish(); }); } else { $("#fancy_content").hide().empty().append($(value)).show(); $("#fancy_outer").css(itemOpts).fadeIn("normal", function() { _finish(); }); } } }; function _set_navigation() { if (opts.itemCurrent != 0) { $("#fancy_left, #fancy_left_ico").unbind().bind("click", function(e) { e.stopPropagation(); opts.itemCurrent--; _change_item(); return false; }); $("#fancy_left").show(); } if (opts.itemCurrent != ( opts.itemArray.length -1)) { $("#fancy_right, #fancy_right_ico").unbind().bind("click", function(e) { e.stopPropagation(); opts.itemCurrent++; _change_item(); return false; }); $("#fancy_right").show(); } }; function _finish() { _set_navigation(); _preload_neighbor_images(); $(document).keydown(function(e) { if (e.keyCode == 27) { $.fn.fancybox.close(); $(document).unbind("keydown"); } else if(e.keyCode == 37 && opts.itemCurrent != 0) { opts.itemCurrent--; _change_item(); $(document).unbind("keydown"); } else if(e.keyCode == 39 && opts.itemCurrent != (opts.itemArray.length - 1)) { opts.itemCurrent++; _change_item(); $(document).unbind("keydown"); } }); if (opts.centerOnScroll) { $(window).bind("resize scroll", $.fn.fancybox.scrollBox); } else { $("div#fancy_outer").css("position", "absolute"); } if (opts.hideOnContentClick) { $("#fancy_wrap").click($.fn.fancybox.close); } $("#fancy_overlay, #fancy_close").bind("click", $.fn.fancybox.close); $("#fancy_close").show(); if (opts.itemArray[ opts.itemCurrent ].title !== undefined && opts.itemArray[ opts.itemCurrent ].title.length > 0) { $('#fancy_title div').html(opts.itemArray[ opts.itemCurrent ].title); $('#fancy_title').show(); } if (opts.overlayShow && isIE) { $('embed, object, select', $('#fancy_content')).css('visibility', 'visible'); } if ($.isFunction(opts.callbackOnShow)) { opts.callbackOnShow(); } busy = false; }; return this.unbind('click').click(_initialize); }; $.fn.fancybox.scrollBox = function() { var pos = $.fn.fancybox.getViewport(); $("#fancy_outer").css('left', (($("#fancy_outer").width() + 36) > pos[0] ? pos[2] : pos[2] + Math.round((pos[0] - $("#fancy_outer").width() - 36) / 2))); $("#fancy_outer").css('top', (($("#fancy_outer").height() + 50) > pos[1] ? pos[3] : pos[3] + Math.round((pos[1] - $("#fancy_outer").height() - 50) / 2))); }; $.fn.fancybox.getNumeric = function(el, prop) { return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0; }; $.fn.fancybox.getPosition = function(el) { var pos = el.offset(); pos.top += $.fn.fancybox.getNumeric(el, 'paddingTop'); pos.top += $.fn.fancybox.getNumeric(el, 'borderTopWidth'); pos.left += $.fn.fancybox.getNumeric(el, 'paddingLeft'); pos.left += $.fn.fancybox.getNumeric(el, 'borderLeftWidth'); return pos; }; $.fn.fancybox.showIframe = function() { $(".fancy_loading").hide(); $("#fancy_frame").show(); }; $.fn.fancybox.getViewport = function() { return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ]; }; $.fn.fancybox.animateLoading = function() { if (!$("#fancy_loading").is(':visible')){ clearInterval(loadingTimer); return; } $("#fancy_loading > div").css('top', (loadingFrame * -40) + 'px'); loadingFrame = (loadingFrame + 1) % 12; }; $.fn.fancybox.showLoading = function() { clearInterval(loadingTimer); var pos = $.fn.fancybox.getViewport(); $("#fancy_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show(); $("#fancy_loading").bind('click', $.fn.fancybox.close); loadingTimer = setInterval($.fn.fancybox.animateLoading, 66); }; $.fn.fancybox.close = function() { busy = true; $(imagePreloader).unbind(); $("#fancy_overlay, #fancy_close").unbind(); if (opts.hideOnContentClick) { $("#fancy_wrap").unbind(); } $("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide(); if (opts.centerOnScroll) { $(window).unbind("resize scroll"); } __cleanup = function() { $("#fancy_overlay, #fancy_outer").hide(); if (opts.centerOnScroll) { $(window).unbind("resize scroll"); } if (isIE) { $('embed, object, select').css('visibility', 'visible'); } if ($.isFunction(opts.callbackOnClose)) { opts.callbackOnClose(); } $("#fancy_content").empty(); busy = false; }; if ($("#fancy_outer").is(":visible") !== false) { if (opts.zoomSpeedOut > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { var orig_item = opts.itemArray[opts.itemCurrent].orig; var orig_pos = $.fn.fancybox.getPosition(orig_item); var itemOpts = { 'left': (orig_pos.left - 18) + 'px', 'top': (orig_pos.top - 18) + 'px', 'width': $(orig_item).width(), 'height': $(orig_item).height() }; if (opts.zoomOpacity) { itemOpts.opacity = 'hide'; } $("#fancy_outer").stop(false, true).animate(itemOpts, opts.zoomSpeedOut, opts.easingOut, __cleanup); } else { $("#fancy_outer").stop(false, true).fadeOut("fast", __cleanup); } } else { __cleanup(); } return false; }; $.fn.fancybox.build = function() { var html = ''; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; html += ''; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; $(html).appendTo("body"); $('
').appendTo('#fancy_title'); if (isIE) { $("#fancy_inner").prepend(''); $("#fancy_close, .fancy_bg, .fancy_title, .fancy_ico").fixPNG(); } }; $.fn.fancybox.defaults = { padding : 10, imageScale : true, zoomOpacity : false, zoomSpeedIn : 0, zoomSpeedOut : 0, zoomSpeedChange : 300, easingIn : 'swing', easingOut : 'swing', easingChange : 'swing', frameWidth : 425, frameHeight : 355, overlayShow : true, overlayOpacity : 0.5, hideOnContentClick : true, centerOnScroll : true, itemArray : [], callbackOnStart : null, callbackOnShow : null, callbackOnClose : null }; $(document).ready(function() { $.fn.fancybox.build(); }); })(jQuery); /*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Version: 1.0.3 * Requires jQuery 1.1.3+ * Docs: http://docs.jquery.com/Plugins/livequery */ (function($) { $.extend($.fn, { livequery: function(type, fn, fn2) { var self = this, q; // Handle different call patterns if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; // See if Live Query already exists $.each( $.livequery.queries, function(i, query) { if ( self.selector == query.selector && self.context == query.context && type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) ) // Found the query, exit the each loop return (q = query) && false; }); // Create new Live Query if it wasn't found q = q || new $.livequery(this.selector, this.context, type, fn, fn2); // Make sure it is running q.stopped = false; // Run it immediately for the first time q.run(); // Contnue the chain return this; }, expire: function(type, fn, fn2) { var self = this; // Handle different call patterns if ($.isFunction(type)) fn2 = fn, fn = type, type = undefined; // Find the Live Query based on arguments and stop it $.each( $.livequery.queries, function(i, query) { if ( self.selector == query.selector && self.context == query.context && (!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped ) $.livequery.stop(query.id); }); // Continue the chain return this; } }); $.livequery = function(selector, context, type, fn, fn2) { this.selector = selector; this.context = context || document; this.type = type; this.fn = fn; this.fn2 = fn2; this.elements = []; this.stopped = false; // The id is the index of the Live Query in $.livequery.queries this.id = $.livequery.queries.push(this)-1; // Mark the functions for matching later on fn.$lqguid = fn.$lqguid || $.livequery.guid++; if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++; // Return the Live Query return this; }; $.livequery.prototype = { stop: function() { var query = this; if ( this.type ) // Unbind all bound events this.elements.unbind(this.type, this.fn); else if (this.fn2) // Call the second function for all matched elements this.elements.each(function(i, el) { query.fn2.apply(el); }); // Clear out matched elements this.elements = []; // Stop the Live Query from running until restarted this.stopped = true; }, run: function() { // Short-circuit if stopped if ( this.stopped ) return; var query = this; var oEls = this.elements, els = $(this.selector, this.context), nEls = els.not(oEls); // Set elements to the latest set of matched elements this.elements = els; if (this.type) { // Bind events to newly matched elements nEls.bind(this.type, this.fn); // Unbind events to elements no longer matched if (oEls.length > 0) $.each(oEls, function(i, el) { if ( $.inArray(el, els) < 0 ) $.event.remove(el, query.type, query.fn); }); } else { // Call the first function for newly matched elements nEls.each(function() { query.fn.apply(this); }); // Call the second function for elements no longer matched if ( this.fn2 && oEls.length > 0 ) $.each(oEls, function(i, el) { if ( $.inArray(el, els) < 0 ) query.fn2.apply(el); }); } } }; $.extend($.livequery, { guid: 0, queries: [], queue: [], running: false, timeout: null, checkQueue: function() { if ( $.livequery.running && $.livequery.queue.length ) { var length = $.livequery.queue.length; // Run each Live Query currently in the queue while ( length-- ) $.livequery.queries[ $.livequery.queue.shift() ].run(); } }, pause: function() { // Don't run anymore Live Queries until restarted $.livequery.running = false; }, play: function() { // Restart Live Queries $.livequery.running = true; // Request a run of the Live Queries $.livequery.run(); }, registerPlugin: function() { $.each( arguments, function(i,n) { // Short-circuit if the method doesn't exist if (!$.fn[n]) return; // Save a reference to the original method var old = $.fn[n]; // Create a new method $.fn[n] = function() { // Call the original method var r = old.apply(this, arguments); // Request a run of the Live Queries $.livequery.run(); // Return the original methods result return r; } }); }, run: function(id) { if (id != undefined) { // Put the particular Live Query in the queue if it doesn't already exist if ( $.inArray(id, $.livequery.queue) < 0 ) $.livequery.queue.push( id ); } else // Put each Live Query in the queue if it doesn't already exist $.each( $.livequery.queries, function(id) { if ( $.inArray(id, $.livequery.queue) < 0 ) $.livequery.queue.push( id ); }); // Clear timeout if it already exists if ($.livequery.timeout) clearTimeout($.livequery.timeout); // Create a timeout to check the queue and actually run the Live Queries $.livequery.timeout = setTimeout($.livequery.checkQueue, 20); }, stop: function(id) { if (id != undefined) // Stop are particular Live Query $.livequery.queries[ id ].stop(); else // Stop all Live Queries $.each( $.livequery.queries, function(id) { $.livequery.queries[ id ].stop(); }); } }); // Register core DOM manipulation methods $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove'); // Run Live Queries when the Document is ready $(function() { $.livequery.play(); }); // Save a reference to the original init method var init = $.prototype.init; // Create a new init method that exposes two new properties: selector and context $.prototype.init = function(a,c) { // Call the original init and save the result var r = init.apply(this, arguments); // Copy over properties if they exist already if (a && a.selector) r.context = a.context, r.selector = a.selector; // Set properties if ( typeof a == 'string' ) r.context = c || document, r.selector = a; // Return the result return r; }; // Give the init function the jQuery prototype for later instantiation (needed after Rev 4091) $.prototype.init.prototype = $.prototype; })(jQuery);/** * jQuery.ScrollTo * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 5/25/2009 * * @projectDescription Easy element scrolling using jQuery. * http://flesler.blogspot.com/2007/10/jqueryscrollto.html * Works with jQuery +1.2.6. Tested on FF 2/3, IE 6/7/8, Opera 9.5/6, Safari 3, Chrome 1 on WinXP. * * @author Ariel Flesler * @version 1.4.2 * * @id jQuery.scrollTo * @id jQuery.fn.scrollTo * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. * The different options for target are: * - A number position (will be applied to all axes). * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes * - A jQuery/DOM element ( logically, child of the element to scroll ) * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. * - A percentage of the container's dimension/s, for example: 50% to go to the middle. * - The string 'max' for go-to-end. * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead. * @param {Object,Function} settings Optional set of settings or the onAfter callback. * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. * @option {Number} duration The OVERALL length of the animation. * @option {String} easing The easing method for the animation. * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. * @option {Function} onAfter Function to be called after the scrolling ends. * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. * @return {jQuery} Returns the same jQuery object, for chaining. * * @desc Scroll to a fixed position * @example $('div').scrollTo( 340 ); * * @desc Scroll relatively to the actual position * @example $('div').scrollTo( '+=340px', { axis:'y' } ); * * @dec Scroll using a selector (relative to the scrolled element) * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); * * @ Scroll to a DOM element (same for jQuery object) * @example var second_child = document.getElementById('container').firstChild.nextSibling; * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ * alert('scrolled!!'); * }}); * * @desc Scroll on both axes, to different values * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); */ ;(function( $ ){ var $scrollTo = $.scrollTo = function( target, duration, settings ){ $(window).scrollTo( target, duration, settings ); }; $scrollTo.defaults = { axis:'xy', duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1 }; // Returns the element that needs to be animated to scroll the window. // Kept for backwards compatibility (specially for localScroll & serialScroll) $scrollTo.window = function( scope ){ return $(window)._scrollable(); }; // Hack, hack, hack :) // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) $.fn._scrollable = function(){ return this.map(function(){ var elem = this, isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; if( !isWin ) return elem; var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; return $.browser.safari || doc.compatMode == 'BackCompat' ? doc.body : doc.documentElement; }); }; $.fn.scrollTo = function( target, duration, settings ){ if( typeof duration == 'object' ){ settings = duration; duration = 0; } if( typeof settings == 'function' ) settings = { onAfter:settings }; if( target == 'max' ) target = 9e9; settings = $.extend( {}, $scrollTo.defaults, settings ); // Speed is still recognized for backwards compatibility duration = duration || settings.speed || settings.duration; // Make sure the settings are given right settings.queue = settings.queue && settings.axis.length > 1; if( settings.queue ) // Let's keep the overall duration duration /= 2; settings.offset = both( settings.offset ); settings.over = both( settings.over ); return this._scrollable().each(function(){ var elem = this, $elem = $(elem), targ = target, toff, attr = {}, win = $elem.is('html,body'); switch( typeof targ ){ // A number will pass the regex case 'number': case 'string': if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){ targ = both( targ ); // We are done break; } // Relative selector, no break! targ = $(targ,this); case 'object': // DOMElement / jQuery if( targ.is || targ.style ) // Get the real position of the target toff = (targ = $(targ)).offset(); } $.each( settings.axis.split(''), function( i, axis ){ var Pos = axis == 'x' ? 'Left' : 'Top', pos = Pos.toLowerCase(), key = 'scroll' + Pos, old = elem[key], max = $scrollTo.max(elem, axis); if( toff ){// jQuery / DOMElement attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); // If it's a dom element, reduce the margin if( settings.margin ){ attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; } attr[key] += settings.offset[pos] || 0; if( settings.over[pos] ) // Scroll to a fraction of its width/height attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; }else{ var val = targ[pos]; // Handle percentage values attr[key] = val.slice && val.slice(-1) == '%' ? parseFloat(val) / 100 * max : val; } // Number or 'number' if( /^\d+$/.test(attr[key]) ) // Check the limits attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); // Queueing axes if( !i && settings.queue ){ // Don't waste time animating, if there's no need. if( old != attr[key] ) // Intermediate animation animate( settings.onAfterFirst ); // Don't animate this axis again in the next iteration. delete attr[key]; } }); animate( settings.onAfter ); function animate( callback ){ $elem.animate( attr, duration, settings.easing, callback && function(){ callback.call(this, target, settings); }); }; }).end(); }; // Max scrolling position, works on quirks mode // It only fails (not too badly) on IE, quirks mode. $scrollTo.max = function( elem, axis ){ var Dim = axis == 'x' ? 'Width' : 'Height', scroll = 'scroll'+Dim; if( !$(elem).is('html,body') ) return elem[scroll] - $(elem)[Dim.toLowerCase()](); var size = 'client' + Dim, html = elem.ownerDocument.documentElement, body = elem.ownerDocument.body; return Math.max( html[scroll], body[scroll] ) - Math.min( html[size] , body[size] ); }; function both( val ){ return typeof val == 'object' ? val : { top:val, left:val }; }; })( jQuery );/* * jQuery MD plugin 1.7 * Released: July 3, 2011 * * Copyright (c) 2011 Steve Koehler * Email: steve@tiny-threads.com * * Developed: Steve Koehler * http://www.tiny-threads.com/blog/2011/06/07/jquery-modal-dialog-plugin/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * * @license http://www.opensource.org/licenses/mit-license.php * @project jquery.md * * If you have enjoyed MD, then we encourage you to donate at http://www.tiny-threads.com */ (function( $ ){ var bDialogOpened = false; // is dialog opened? $.md = function(msg,options){ if(navigator.appName=='Microsoft Internet Explorer') $.md.ie=true; else $.md.ie=false; $.md.defaults = { timeout: 0 , showClose: true , width: 525 , buttons: {} , type: 'err' , title: '' , cssDir: 'css' , position: 'center' , modal:true , modalBG: '#ffffff' , fullscreen: false , showMinimize: true , showFullscreen: true }; $.md.DialogTypes = new Array("error", "warning", "success", "prompt"); $.md.DialogTitles = { "err": "Error" , "warning": "Upozornění!" , "success": "Success" , "prompt": "Please Choose" }; //set minimized flag to off $.md.minimized=false; // display the whole thing $.md.showDialog(msg,options); bDialogOpened = true; }; $.md.isDialogOpened = function () {return bDialogOpened;} // Creates and shows the modal dialog $.md.showDialog= function (msg, options) { document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; event.stopPropagation(); } else { // mozilla keycode = e.which; e.stopPropagation(); } if(keycode == 27){ // close $.md.hide(); } if(keycode == 13){ // close $.md.hide(); } return false; }; // Merge default title (per type), default settings, and user defined settings var settings = $.extend( $.md.defaults, options); settings.type=settings.type.toLowerCase(); //if an invalid dialog type, default to error if(!$.inArray(settings.type, $.md.DialogTypes) || settings.type=='error') { settings.type='err'; } //if no title is entered, default to selected dialog type if(settings.title=='' || typeof settings.title == 'undefined'){ settings.title=$.md.DialogTitles[settings.type]; } // If there's no timeout, make sure the close button is show (or the dialog can't close) settings.timeout = (typeof(settings.timeout) == "undefined") ? 0 : settings.timeout; settings.showClose = ((typeof(settings.showClose) == "undefined") | !settings.timeout) ? true : !!settings.showClose; // Check if the dialog elements exist and create them if not if (!document.getElementById('md')) { var d = new Date(); //load stylesheet into the page to avoid incorrect displays /*$.ajax({ async: false, type: 'GET', url: settings.cssDir+'/jquery.md.css?'+d.getTime(), success: function(data) {*/ $('body').prepend( //"" + "
 
"+ "
"+ "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "" + "
" + "
"+ "
" ); // } //}); // Set the click events for the icons and mask $("#md-close").click($.md.hide); $('#md-minimize').click($.md.minimize); $('#md-restore').click($.md.restore); $('#md-fullscreen').click($.md.toggleFullscreen); $('#md-mask').click($.md.hide); //set local vars for common elements to increase speed $.md.mask=$('#md-mask'); $.md.dl=$('#md'); $.md.content=$('#md-content'); $('#md').hide(); $('#md-mask').hide(); } //reset the minimized flag and settings $.md.minimized=false; $.md.content.show(); $('#md-restore').hide(); //switch minimize buttons on and off if(!settings.showMinimize) $('#md-minimize').hide(); else $('#md-minimize').show(); //switch fullscreen button on and off if(!settings.showFullscreen) $('#md-fullscreen').hide(); else $('#md-fullscreen').show(); //switch close and buttons on and off if (!settings.showClose) { $('#md-close').hide(); } else { $('#md-close').show(); } //set title and content $('#md-title').html(settings.title); $('#md-content-inner').html(msg); // erase the old buttons $('#md-button-container').html(''); var btn = settings.buttons; // add the new buttons for(x in btn){ $('#md-button-container').append(""); $('#md-button-'+x).click(btn[x]); } //set width $.md.dl.css('width', settings.width); // remove the dialog type classes and replace them with the new type for(i=0;i<$.md.DialogTypes.length;i++){ $('#md-header').removeClass($.md.DialogTypes[i]+ 'header'); $.md.content.removeClass($.md.DialogTypes[i]); } $('#md-header').addClass(settings.type + "header"); $.md.content.addClass(settings.type); $('.md-button').addClass(settings.type + "button"); //set mask color $.md.mask.css('background-color',settings.modalBG); // set timeout if (settings.timeout) { window.setTimeout("$.md.hide();", (settings.timeout * 1000)); } // get the mask height. Use document height unless it's smaller than the window if($(document).height() > $(window).height()) $.md.mask.height($(document).height()); else $.md.mask.height($(window).height()); // fade the dialog in $.md.dl.fadeIn("normal"); $.md.setPosition(settings.position); //only fade in mask if set to true if(settings.modal) $.md.mask.fadeTo("slow",0.8); //adjust dialog box size on window resize $(window).resize($.md.adjustDimensions); //set to fullscreen if set to true if(settings.fullscreen) $.md.fullscreen(); return true; }; //set the position of the dialog box $.md.setPosition=function(position){ var pos = position.split(' ',2); var top; var left; var dl = $.md.dl; //get the vertical if(pos[0] =='top') top = 0; else if(pos[0] =='bottom') top = Math.abs($(window).height() - dl.height()); else if(String(parseInt(pos[0])) == pos[0]) top = pos[0]; else top = Math.abs($(window).height() - dl.height()) / 2; //get the horizontal if(pos[1] =='left') left = 0; else if(pos[1] =='right') left = ($(window).width() - dl.width()); else if(String(parseInt(pos[1])) == pos[1]) left = pos[1]; else left = ($(window).width() - dl.width()) / 2; //set the position dl.css('left', left); dl.css('top', top); //dl.css('top', (top >= 25) ? top : 25); }; //toggle the dialog box between minimized and restored $.md.toggleMinimize=function(){ //if the dialog box is minimized, restore it, or vice versa if($.md.minimized){ $.md.restore(); } else{ $.md.minimize(); } } //hide dialog box content $.md.minimize=function(){ $('#md-restore').show(); $('#md-minimize').hide(); $.md.content.css('min-height','0'); //hide the min-height for sliding to work right $.md.content.slideUp(); $.md.minimized=true; } //restore the dialog box back to original dimensions $.md.restore=function(){ $('#md-restore').hide(); $('#md-minimize').show(); $.md.content.slideDown(); $.md.minimized=false; } //toggle between normal and fullscreen $.md.toggleFullscreen=function(){ if($.md.isFullscreen) $.md.removeFullscreen(); else $.md.fullscreen(); } // make fullscreen $.md.fullscreen=function(){ $.md.isFullscreen=true; $.md.adjustDimensions(); } // restore to previous size $.md.removeFullscreen=function(){ $.md.isFullscreen=false; $.md.adjustDimensions(); } // resizing of the dialog box for fullscreen and normal sizes $.md.adjustDimensions=function(){ if($.md.isFullscreen){ $.md.height=$('#md-content').height(); $.md.width=$.md.dl.width(); $.md.top=$.md.dl.css('top'); $.md.left=$.md.dl.css('left'); $.md.dl.width($(window).width()); $.md.dl.css('top','0'); $.md.dl.css('left','0'); $.md.content.height($(window).height() - $('#md-header').height()); } else{ $.md.content.height($.md.height); $.md.dl.width($.md.width); $.md.dl.css('top',$.md.top); $.md.dl.css('left',$.md.left); } } //hide the dialog window $.md.hide=function () { $.md.dl.fadeOut("normal", function () { $(this).hide(0); }); $.md.mask.fadeOut("normal", function () { $(this).hide(0); }); bDialogOpened = false; document.onkeydown = ""; return true; }; })( jQuery );/** * jQuery Cookie plugin * * Copyright (c) 2010 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ jQuery.cookie = function (key, value, options) { // key and at least value given, set cookie... if (arguments.length > 1 && String(value) !== "[object Object]") { options = jQuery.extend({}, options); if (value === null || value === undefined) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // key and possibly options given, get cookie... options = value || {}; var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; };/** * checkForm * version: 0.95 * author: Nedik * * description: * v. 0.95 * - na spatne vyplnene policko se nyni pekne animuje -- jen graficka uprava * v. 0.94 * - pridana podpora tridy: check_zip * v. 0.93 * - upravena cela trida tak, aby byly veskere promenne a metody private * v. 0.92 * - opraveno skrolování na focus objekt * v. 0.9 * - testuje vsechny formulare, ktere jsou na webu. pokud nějaké políčko formuláře má definovanou třídu class="required", je testován. * - další doplňující podporované třídy: check_email, check_phone * * updates: */ var CheckForm = function () { var aError = new Array(); var aElementsForProcess = new Array('input', 'select', 'textarea'); var aElementsRadioAlreadyChecked = new Array(); var oFocusElement = false; function init () { if (!$) { alert('CheckForm needs JQUERY for operate.'); return true; } // vezmu si vsechny formulare pod kontrolu $('form').bind('submit', function () {return checkFormOnSubmit(this);}); return true; } function checkFormOnSubmit (oForm) { aError = new Array(); aElementsRadioAlreadyChecked = new Array(); oFocusElement = false; // projdu veskere elementy FORMu for (i in aElementsForProcess) { $(oForm).find(aElementsForProcess[i]).each(function () { if ($(this).attr('type') == 'radio') processElementRadio(this); else processElement(this); }); } if (aError.length > 0) { focusElement(); return false; } else { return true; } } function focusElement () { if (oFocusElement) { windowHeight = document.documentElement.clientHeight; offset = $(oFocusElement).offset(); heightHalf = windowHeight/2; scrollTop = offset.top-heightHalf; //window.scrollTo(offset.left, scrollTop); $('html').animate({scrollTop: scrollTop}, 1000, throwError); $(oFocusElement).focus(); } } function processElementRadio (oElement) { // zjistim, jestli uz jsem tento element jednou nezkoumal sElementName = $(oElement).attr('name'); for (i in aElementsRadioAlreadyChecked) { if (aElementsRadioAlreadyChecked[i] == sElementName) return true; } bError = false; if ($(oElement).attr('rel')) sErrorMessage = $(oElement).attr('rel'); else if ($(oElement).attr('title')) sErrorMessage = $(oElement).attr('title'); else sErrorMessage = $(oElement).attr('name')+' musí být zvolen'; if ($(oElement).hasClass('required')) { // najdu vsechy tyto elementy dle jejich NAME a zjistim, jestli je nejaky z nich checked var bChecked = false; $('input[name="'+sElementName+'"]').each( function () { if (this.checked == true) bChecked = true; }); if (bChecked === false) { aError[aError.length] = sErrorMessage; } } aElementsRadioAlreadyChecked[aElementsRadioAlreadyChecked.length] = sElementName; return true; } function processElement (oElement) { bError = false; if ($(oElement).attr('rel')) sErrorMessage = $(oElement).attr('rel'); else if ($(oElement).attr('title')) sErrorMessage = $(oElement).attr('title'); else sErrorMessage = $(oElement).attr('name')+' musí být vypln\u011bn'; // required if ($(oElement).hasClass('required') && $(oElement).val() == '') { aError[aError.length] = sErrorMessage; bError = true; } // check_email if (!bError && $(oElement).hasClass('check_email') && $(oElement).val().length) { if (!validEmail($(oElement).val())) { aError[aError.length] = sErrorMessage; bError = true; } } // check_phone if (!bError && $(oElement).hasClass('check_phone') && $(oElement).val().length) { if (!check_phone($(oElement).val())) { aError[aError.length] = sErrorMessage; bError = true; } } // check_zip_code if (!bError && $(oElement).hasClass('check_zip') && $(oElement).val().length) { if (!check_zip($(oElement).val())) { aError[aError.length] = sErrorMessage; bError = true; } } // oznacim element warningem markElement(oElement, bError); } function check_zip ( pnumber, length ) { if (!length) length = 5; pnumber = pnumber.replace(/^\s+|\s+$/g,""); // TRIM funkce pnumber = pnumber.replace(/\s+/g,""); // odstranim dalsi nepotrebne znaky pnumber = pnumber.replace(/\++/g,""); // odstranim dalsi nepotrebne znaky if( pnumber.length != length ) { return false; } return true; } function check_phone ( pnumber, length ) { if (!length) length = 9; pnumber = pnumber.replace(/^\s+|\s+$/g,""); // TRIM funkce pnumber = pnumber.replace(/\s+/g,""); // odstranim dalsi nepotrebne znaky pnumber = pnumber.replace(/\+420+/g,""); // odstranim dalsi nepotrebne znaky pnumber = pnumber.replace(/00420+/g,""); // odstranim dalsi nepotrebne znaky pnumber = pnumber.replace(/\++/g,""); // odstranim dalsi nepotrebne znaky if( pnumber.length != length ) { return false; } return true; } function markElement (oElement, bError) { if (bError) { $(oElement).addClass('checkFormWarning'); if (!oFocusElement) oFocusElement = oElement; } else $(oElement).removeClass('checkFormWarning'); } function throwError () { sMessage = 'Formulá\u0159 nemohl být odeslán, neboť:'+"\n\n"; for (i in aError) { sMessage += ' -'+aError[i]+"\n"; } sMessage += "\n"+'Opravte chyby a ode\u0161lete formulá\u0159 znovu'; alert(sMessage); } function validEmail(sEmail) { reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if (reg.test(sEmail) == false) return false; else return true } return { init : function() { init(); } } }(); $(document).ready(CheckForm.init); document.write(''); // fancybox $(document).ready(function () { $("#play-multimedia").fancybox({frameWidth:800, frameHeight:600}); // }); // fotogalerie $(document).ready(function() { $("a.fotogalery").fancybox({'overlayOpacity':0.7}); }); // topmenu $(document).ready(function () { $('#top-menu').superfish().find('ul').bgIframe({opacity:false}); }) // overlib $(document).ready(function () { $('a.overlib').livequery('mouseover', function () { sSrc = $(this).attr('href'); overlib('',VAUTO,1, HAUTO,1, DELAY, 500 ); }) $('a.overlib').livequery('mouseout', function () { return nd(); }) $('a.overlib').livequery('click', function () { return false; }) }) function showBasketClearMessage() { $.get(HTTP_PATH+'ajax.php?file=classes/cBasket.php&class=cBasket&method=isBasketFree_AJAX', function (data) { if (data == '0') { if (confirm('Opravdu si přejete odstranit výrobky z nákupního košíku?')) { location.href = HTTP_PATH_SHOP+'?sAction=shop_product_list&bClearBasket=1'; } } else window.location.href = HTTP_PATH_SHOP+"shop_product_list/"; }); return false; } function showBasketClearMessageFromUserOrders() { $.get(HTTP_PATH+'ajax.php?file=classes/cBasket.php&class=cBasket&method=isBasketFree_AJAX', function (data) { var iUseBasket = $('input[name="iUseSendedBasketId"]').val(); if (data == '0') { if (confirm('Opravdu si přejete odstranit výrobky z nákupního košíku?')) { location.href = HTTP_PATH_SHOP+'?sAction=user_orders&iUseSendedBasketId='+iUseBasket; } } else location.href = HTTP_PATH_SHOP+'?sAction=user_orders&iUseSendedBasketId='+iUseBasket; }); return false; } function setCookie(cookieName, cookieValue, expires, path, domain, secure) { if (!expires) { var dnes = new Date(); var expires = new Date(dnes.getTime() + 1000 * 60 * 60 * 24); // za 24 hodin } document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '; path=/') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); //alert(document.cookie) } function getCookie(cookieName) { var cookieValue = ''; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos)); else cookieValue = unescape(document.cookie.substring(posValue)); } return (cookieValue); } window.onload = function(){ if(document.all && navigator.appVersion.indexOf("MSIE")>-1 && navigator.appVersion.indexOf("Windows")>-1) { var a = document.getElementsByTagName("label"); for(var i=0,j=a.length;i iInstock) { alert('Výrobek je ve výprodeji a nelze objednat více kusů, než je právě skladem'); $(obj).val(iInstock); return false; } return true; } function changeMinimalCount(obj) { if (!checkSaleInstockCount(obj)) return false; sClass = $(obj).attr('class'); re = /JSgoodsListMinimalCount_([0-9]*)/; temp = sClass.match(re); goodsId = temp[1]; iVal = parseInt($(obj).val()); if (!iVal) return false; if (aGoodsListMinimalCount[goodsId] > iVal) { $(obj).val(aGoodsListMinimalCount[goodsId]); alert('Minimální množství pro objednání je '+aGoodsListMinimalCount[goodsId]+' ks'); return false; /*if($(obj).parent().find('span').text() == '') $(obj).parent().find('.JSsubmit').after('
min. '+aGoodsListMinimalCount[goodsId]+' ks');*/ } else // jeste kontrola, jestli ma vyrobek definovanou tridu JSuseMultiple, tak pocet musi byt nasobkem minimalniho mnozstvi { if ($(obj).hasClass('JSuseMultiple')) { if (iVal % aGoodsListMinimalCount[goodsId] != 0) { var iCount; iCount = Math.ceil(iVal / aGoodsListMinimalCount[goodsId]); $(obj).val((iCount * aGoodsListMinimalCount[goodsId])); alert('Vkládat do košíku lze pouze násobky balení. ('+aGoodsListMinimalCount[goodsId]+' ks)'); return false; } } } return true; } /************************************************************************************************************ JS Calendar Copyright (C) September 2006 DTHMLGoodies.com, Alf Magne Kalleland This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Dhtmlgoodies.com., hereby disclaims all copyright interest in this script written by Alf Magne Kalleland. Alf Magne Kalleland, 2006 Owner of DHTMLgoodies.com ************************************************************************************************************/ /* Update log: (C) www.dhtmlgoodies.com, September 2005 Version 1.2, November 8th - 2005 - Added