/*
 *
 *	JELLY JavaScript Library (c) 2008 Pete Boere --/ v. 1.14 /--
 *
 */
var JELLY=function(){return{addClass:function(B,C){B.className+=B.className?" "+C:C},removeClass:function(B,D){var C=new RegExp("(^|\\s|\\b)"+D+"(\\s|$)","g");B.className=B.className.replace(C," ").normalize()},hasClass:function(B,D){var C=new RegExp("(^|\\s)"+D+"(\\s|$)");return C.test(B.className)},toggleClass:function(B,C){JELLY.hasClass(B,C)?JELLY.removeClass(B,C):JELLY.addClass(B,C)},createElement:function(E,B){var D=document.createElement(E);for(var C in B){switch(C){case"setHTML":D.innerHTML=B[C];break;case"class":D.className=B[C];break;case"style":D.style.cssText=B[C];break;default:D.setAttribute(C,B[C])}}return D},insertElement:function(D,B,C){C=C||"bottom";switch(C){case"before":return B.parentNode.insertBefore(D,B);case"after":return B.parentNode.insertBefore(D,B.nextSibling);case"top":return B.insertBefore(D,B.firstChild);default:return B.appendChild(D)}},replaceElement:function(C,B){return C.parentNode.replaceChild(B,C)},removeElement:function(B){return B.parentNode.removeChild(B)},getRelative:function(D,C,B){switch(C){case"next":return A(D,"sibling",{type:"next",factor:B});case"previous":return A(D,"sibling",{type:"previous",factor:B});case"first":return A(D,"child",{type:"first"});case"last":return A(D,"child",{type:"last"});case"parent":return A(D,"parent",{factor:B})}},getXY:function(B){var C=[0,0];while(B!=null){C[0]+=B.offsetLeft;C[1]+=B.offsetTop;B=B.offsetParent}return C},setXY:function(B,E,D,C){C=C||"px";B.style.left=E+C;B.style.top=D+C},getStyle:function(C,E,B){E=E.toCamelCase();var D;if(E=="opacity"){if(C.__opacity==undefined){C.__opacity=1}return C.__opacity}if(C.style[E]){D=C.style[E]}else{if("getComputedStyle" in window){D=window.getComputedStyle(C,null)[E]}else{if("currentStyle" in C){D=C.currentStyle[E]}}}if(/color/i.test(E)){return D.cssColorToArray()}return B!==false?parseInt(D,10):D},setOpacity:function(B,C){if(B.filters){JELLY.setOpacity=function(D,E){if(D.__opacity==undefined){D.__opacity=1}D.style.filter=(E==1)?"":"alpha(opacity="+E*100+")";D.__opacity=E}}else{JELLY.setOpacity=function(D,E){if(D.__opacity==undefined){D.__opacity=1}D.style.opacity=D.__opacity=E}}JELLY.setOpacity(B,C)},getByClass:function(G,E){var C=[],E=E||document.getElementsByTagName("*"),F=new RegExp("(^|\\s)"+G+"(\\s|$)");for(var D=0,B=E.length;D<B;D++){if(F.test(E[D].className)){C[C.length]=E[D]}}return C},Q:function(C){var P=JELLY.getByClass;function Q(E){return document.getElementById(E)}function R(E,S){return G((S||document).getElementsByTagName(E))}function G(U){var T,S=U.length,E=[];for(T=0;T<S;T++){E[T]=U[T]}return E}if(C.item&&typeof C.length!="undefined"){return G(C)}else{C.normalize()}if(!C.has(" ")){if(C.has("#")){return Q(C.split("#")[1])}if(!C.has(".")){return R(C)}else{if(C.split(".")[0]!=""){return P(C.split(".")[1],R(C.split(".")[0]))}else{return P(C.split(".")[1])}}}else{var D=C.split(" "),B=D[0].has("#")?B=Q(D[0].split("#")[1]):false;if(B){if(!D[1].has(".")){return R(D[1],B)}else{if(D[1].split(".")[0]!=""){return P(D[1].split(".")[1],R(D[1].split(".")[0],B))}else{return P(D[1].split(".")[1],R("*",B))}}}else{var O,M,L=[],J=[];if(D[0].has(".")){O=D[0].split(".")[0]?P(D[0].split(".")[1],R(D[0].split(".")[0])):P(D[0].split(".")[1])}else{O=R(D[0])}M=!D[1].has(".")?"tag":D[1].split(".")[0]!=""?"tag.class":".class";var H=O.length,F=0,I,K,N;switch(M){case"tag":for(F;F<H;F++){I=R(D[1],O[F]);if(I.length!==0){J=J.concat(I)}}break;case"tag.class":K=D[1].split(".")[1];N=D[1].split(".")[0];for(F;F<H;F++){I=P(K,R(N,O[F]));if(I.length!==0){J=J.concat(I)}}break;case".class":K=D[1].split(".")[1];for(F;F<H;F++){I=P(K,R("*",O[F]));if(I.length!==0){J=J.concat(I)}}}while(J[0]){I=J.pop();if(I.__Q_marked==undefined){I.__Q_marked=true;L[L.length]=I}}for(F=0;L[F];F++){L[F].__Q_marked=undefined}return L}}},addEvent:function(E,G,H){var D=!!E.addEventListener,F=G.has("mouseenter"),I=G.has("mouseleave"),J=arguments.callee,B,C;J.log=J.log||[];if(!D){B=function(K){K=JELLY.fixEvent(K);H.call(E,K)}}if(F||I){B=function(K){K=JELLY.fixEvent(K);if(!JELLY.mouseEnterLeave.call(E,K)){return }H.call(E,K)};G=F?"mouseover":"mouseout"}C=[E,G,B||H];J.log.push(C);if(D){E.addEventListener(G,B||H,false)}else{E.attachEvent("on"+G,B)}return C},removeEvent:function(B){B[0].removeEventListener?B[0].removeEventListener(B[1],B[2],false):B[0].detachEvent("on"+B[1],B[2])},purgeEventLog:function(){if(JELLY.addEvent.log.length>1){var B=JELLY.addEvent.log,C,D;for(C=0;B[C];C++){D=B[C];if(D[0]==window&&D[1]=="unload"){continue}JELLY.removeEvent(D)}}},fixEvent:function(B){B=B||window.event;if(window.event&&!window.opera){B.target=B.srcElement;B.relatedTarget=(function(){switch(B.type){case"mouseover":return B.fromElement;case"mouseout":return B.toElement}})();B.stopPropagation=function(){B.cancelBubble=true};B.preventDefault=function(){B.returnValue=false};B.pageX=B.clientX+document.documentElement.scrollLeft;B.pageY=B.clientY+document.documentElement.scrollTop}return B},mouseEnterLeave:function(E){var D,C;if(E.relatedTarget){D=E.relatedTarget;if(D.nodeType!=1||D==this){return false}var B=this.getElementsByTagName("*");for(C=0;B[C];C++){if(D==B[C]){return false}}}return true},stopEvent:function(B){B=JELLY.fixEvent(B);B.stopPropagation();B.preventDefault()},getCookie:function(C){var B=new RegExp(C+"=([^; ]+)").exec(document.cookie);if(!B){return null}return unescape(B[1])},setCookie:function(C,E,B,G,D,F){if(B){B=new Date(new Date().getTime()+((1000*60*60*24)*B)).toGMTString()}document.cookie=C+"="+escape(E)+(B?";expires="+B:"")+(G?";path="+G:"")+(D?";domain="+D:"")+(F?";secure":"")},removeCookie:function(B,D,C){if(JELLY.getCookie(B)){document.cookie=B+"="+(D?";path="+D:"")+(C?";domain="+C:"")+(";expires="+new Date(0))}},getViewport:(function(){var D=window,C=document.documentElement,B="undefined";if(typeof D.innerWidth!=B){return function(){return[D.innerWidth,D.innerHeight]}}else{if(typeof C!=B&&typeof C.clientWidth!=B&&C.clientWidth!=0){return function(){return[C.clientWidth,C.clientHeight]}}}return function(){return[document.body.clientWidth||0,document.body.clientHeight||0]}})(),getWindowScroll:(function(){var D=window,C=document.documentElement,B="undefined";if(typeof D.pageYOffset!=B){return function(){return[D.pageXOffset,D.pageYOffset]}}return function(){if(typeof C.scrollTop!=B&&(C.scrollTop>0||C.scrollLeft>0)){return[C.scrollLeft,C.scrollTop]}return[document.body.scrollLeft,document.body.scrollTop]}})(),parseQueryString:function(D){D=D||window;if(D.href.has("?")){var B=D.href.split("?")[1].split("&"),C=B.length-1,E={};do{var F=B[C].split("=");E[F[0]]=F[1]}while(C--);return E}return false},extend:function(E,B,C){var D;if(C!==false){for(D in B){E[D]=B[D]}}else{for(D in B){if(!E[D]){E[D]=B[D]}}}return E},defined:function(B){return typeof B!="undefined"},browser:(function(){var G=window,B=navigator,I="ActiveXObject" in G,F="XMLHttpRequest" in G,H="securityPolicy" in B,J="taintEnabled" in B,D=B.userAgent,K=/opera/i.test(D),E=/firefox/i.test(D),C=/webkit/i.test(D);return{ie:I,ie6:I&&!F,ie7:I&&F,opera:K,firefox:E||(H&&!I&&!K),webkit:C||(!J&&!I&&!K)}})(),local:"for(var i in JELLY){if(i!='local')eval('var '+i+'=JELLY.'+i)};"};function A(D,E,C){var B=C.factor||1;switch(E){case"sibling":do{do{D=D[C.type+"Sibling"]}while(D&&D.nodeType!=1)}while(D&&--B);break;case"child":if(C.type=="first"){D=D.firstChild;while(D&&D.nodeType!=1){D=D.nextSibling}}else{if(C.type=="last"){D=D.lastChild;while(D&&D.nodeType!=1){D=D.previousSibling}}}break;case"parent":do{D=D.parentNode}while(D&&--B)}return D||false}}();JELLY.extend(Array.prototype,{forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this)}}},false);Array.prototype.each=Array.prototype.forEach;JELLY.extend(String.prototype,{has:function(A){return this.indexOf(A)!=-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},normalize:function(){return this.replace(/\s{2,}/g," ").trim()},toCssCase:function(){return this.replace(/([A-Z])/g,"-$1").toLowerCase()},toCamelCase:function(){return this.replace(/-\D/gi,function(A){return A.charAt(A.length-1).toUpperCase()})},cssRgbToHex:function(){var A=this.match(/[\d]{1,3}/g),C=[],B;for(B=0;B<3;B++){var D=(A[B]-0).toString(16);C.push(D.length==1?"0"+D:D)}return"#"+C.join("")},cssHexToArray:function(){var C=this.match(/^#([\w]{1,2})([\w]{1,2})([\w]{1,2})$/),A=[],B;for(B=1;B<C.length;B++){if(C[B].length==1){C[B]+=C[B]}A.push(parseInt(C[B],16))}return A},cssColorToArray:function(){if(this.has("#")){return this.cssHexToArray()}return this.cssRgbToHex().cssHexToArray()}},false);if(JELLY.browser.ie6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}JELLY.addClass(document.documentElement,"js");JELLY.addEvent(window,"unload",JELLY.purgeEventLog);

