/*
 * jQuery JavaScript Library v1.3.1
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009)
 * Revision: 6158
 */
(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.makeArray(E))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(E){return E===g?o.makeArray(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,find:function(E){if(this.length===1&&!/,/.test(E)){var G=this.pushStack([],"find",E);G.length=0;o.find(E,this[0],G);return G}else{var F=o.map(this,function(H){return o.find(E,H)});return this.pushStack(/[^+>] [^+>]/.test(E)?o.unique(F):F,"find",E)}},clone:function(F){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.cloneNode(true),H=document.createElement("div");H.appendChild(I);return o.clean([H.innerHTML])[0]}else{return this.cloneNode(true)}});var G=E.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(F===true){this.find("*").andSelf().each(function(I){if(this.nodeType==3){return}var H=o.data(this,"events");for(var K in H){for(var J in H[K]){o.event.add(G[I],K,H[K][J],H[K][J].data)}}})}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 F=o.expr.match.POS.test(E)?o(E):null;return this.map(function(){var G=this;while(G&&G.ownerDocument){if(F?F.index(G)>-1:o(G).is(E)){return G}G=G.parentNode}})},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<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=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: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(K,N,M){if(this[0]){var J=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=o.clean(K,(this[0].ownerDocument||this[0]),J),I=J.firstChild,E=this.length>1?J.cloneNode(true):J;if(I){for(var H=0,F=this.length;H<F;H++){M.call(L(this[H],I),H>0?E.cloneNode(true):J)}}if(G){o.each(G,z)}}return this;function L(O,P){return N&&o.nodeName(O,"table")&&o.nodeName(P,"tr")?(O.getElementsByTagName("tbody")[0]||O.appendChild(O.ownerDocument.createElement("tbody"))):O}}};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<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){G=o.trim(G);if(G){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-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(G,E,I){if(E=="width"||E=="height"){var K,F={position:"absolute",visibility:"hidden",display:"block"},J=E=="width"?["Left","Right"]:["Top","Bottom"];function H(){K=E=="width"?G.offsetWidth:G.offsetHeight;var M=0,L=0;o.each(J,function(){M+=parseFloat(o.curCSS(G,"padding"+this,true))||0;L+=parseFloat(o.curCSS(G,"border"+this+"Width",true))||0});K-=Math.round(M+L)}if(o(G).is(":visible")){H()}else{o.swap(G,F,H)}return Math.max(0,K)}return o.curCSS(G,E,I)},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,R){if(typeof R==="number"){R+=""}if(!R){return}if(typeof R==="string"){R=R.replace(/(<(\w+)[^>]*?)\/>/g,function(T,U,S){return S.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?T:U+"></"+S+">"});var O=o.trim(R).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+R+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var N=!O.indexOf("<table")&&O.indexOf("<tbody")<0?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&O.indexOf("<tbody")<0?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(R)){L.insertBefore(K.createTextNode(R.match(/^\s*/)[0]),L.firstChild)}R=o.makeArray(L.childNodes)}if(R.nodeType){G.push(R)}else{G=o.merge(G,R)}});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;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(){var G=arguments;return this.each(function(){for(var H=0,I=G.length;H<I;H++){o(G[H])[F](this)}})}});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).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 Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,K=0,G=Object.prototype.toString;var F=function(X,T,aa,ab){aa=aa||[];T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[]}if(!X||typeof X!=="string"){return aa}var Y=[],V,ae,ah,S,ac,U,W=true;Q.lastIndex=0;while((V=Q.exec(X))!==null){Y.push(V[1]);if(V[2]){U=RegExp.rightContext;break}}if(Y.length>1&&L.exec(X)){if(Y.length===2&&H.relative[Y[0]]){ae=I(Y[0]+Y[1],T)}else{ae=H.relative[Y[0]]?[T]:F(Y.shift(),T);while(Y.length){X=Y.shift();if(H.relative[X]){X+=Y.shift()}ae=I(X,ae)}}}else{var ad=ab?{expr:Y.pop(),set:E(ab)}:F.find(Y.pop(),Y.length===1&&T.parentNode?T.parentNode:T,P(T));ae=F.filter(ad.expr,ad.set);if(Y.length>0){ah=E(ae)}else{W=false}while(Y.length){var ag=Y.pop(),af=ag;if(!H.relative[ag]){ag=""}else{af=Y.pop()}if(af==null){af=T}H.relative[ag](ah,af,P(T))}}if(!ah){ah=ae}if(!ah){throw"Syntax error, unrecognized expression: "+(ag||X)}if(G.call(ah)==="[object Array]"){if(!W){aa.push.apply(aa,ah)}else{if(T.nodeType===1){for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&(ah[Z]===true||ah[Z].nodeType===1&&J(T,ah[Z]))){aa.push(ae[Z])}}}else{for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&ah[Z].nodeType===1){aa.push(ae[Z])}}}}}else{E(ah,aa)}if(U){F(U,T,aa,ab)}return aa};F.matches=function(S,T){return F(S,null,null,T)};F.find=function(Z,S,aa){var Y,W;if(!Z){return[]}for(var V=0,U=H.order.length;V<U;V++){var X=H.order[V],W;if((W=H.match[X].exec(Z))){var T=RegExp.leftContext;if(T.substr(T.length-1)!=="\\"){W[1]=(W[1]||"").replace(/\\/g,"");Y=H.find[X](W,S,aa);if(Y!=null){Z=Z.replace(H.match[X],"");break}}}}if(!Y){Y=S.getElementsByTagName("*")}return{set:Y,expr:Z}};F.filter=function(ab,aa,ae,V){var U=ab,ag=[],Y=aa,X,S;while(ab&&aa.length){for(var Z in H.filter){if((X=H.match[Z].exec(ab))!=null){var T=H.filter[Z],af,ad;S=false;if(Y==ag){ag=[]}if(H.preFilter[Z]){X=H.preFilter[Z](X,Y,ae,ag,V);if(!X){S=af=true}else{if(X===true){continue}}}if(X){for(var W=0;(ad=Y[W])!=null;W++){if(ad){af=T(ad,X,W,Y);var ac=V^!!af;if(ae&&af!=null){if(ac){S=true}else{Y[W]=false}}else{if(ac){ag.push(ad);S=true}}}}}if(af!==g){if(!ae){Y=ag}ab=ab.replace(H.match[Z],"");if(!S){return[]}break}}}ab=ab.replace(/\s*,\s*/,"");if(ab==U){if(S==null){throw"Syntax error, unrecognized expression: "+ab}else{break}}U=ab}return Y};var H=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(S){return S.getAttribute("href")}},relative:{"+":function(W,T){for(var U=0,S=W.length;U<S;U++){var V=W[U];if(V){var X=V.previousSibling;while(X&&X.nodeType!==1){X=X.previousSibling}W[U]=typeof T==="string"?X||false:X===T}}if(typeof T==="string"){F.filter(T,W,true)}},">":function(X,T,Y){if(typeof T==="string"&&!/\W/.test(T)){T=Y?T:T.toUpperCase();for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){var V=W.parentNode;X[U]=V.nodeName===T?V:false}}}else{for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){X[U]=typeof T==="string"?W.parentNode:W.parentNode===T}}if(typeof T==="string"){F.filter(T,X,true)}}},"":function(V,T,X){var U="done"+(K++),S=R;if(!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("parentNode",T,U,V,W,X)},"~":function(V,T,X){var U="done"+(K++),S=R;if(typeof T==="string"&&!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("previousSibling",T,U,V,W,X)}},find:{ID:function(T,U,V){if(typeof U.getElementById!=="undefined"&&!V){var S=U.getElementById(T[1]);return S?[S]:[]}},NAME:function(S,T,U){if(typeof T.getElementsByName!=="undefined"&&!U){return T.getElementsByName(S[1])}},TAG:function(S,T){return T.getElementsByTagName(S[1])}},preFilter:{CLASS:function(V,T,U,S,Y){V=" "+V[1].replace(/\\/g,"")+" ";var X;for(var W=0;(X=T[W])!=null;W++){if(X){if(Y^(" "+X.className+" ").indexOf(V)>=0){if(!U){S.push(X)}}else{if(U){T[W]=false}}}}return false},ID:function(S){return S[1].replace(/\\/g,"")},TAG:function(T,S){for(var U=0;S[U]===false;U++){}return S[U]&&P(S[U])?T[1]:T[1].toUpperCase()},CHILD:function(S){if(S[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(S[2]=="even"&&"2n"||S[2]=="odd"&&"2n+1"||!/\D/.test(S[2])&&"0n+"+S[2]||S[2]);S[2]=(T[1]+(T[2]||1))-0;S[3]=T[3]-0}S[0]="done"+(K++);return S},ATTR:function(T){var S=T[1].replace(/\\/g,"");if(H.attrMap[S]){T[1]=H.attrMap[S]}if(T[2]==="~="){T[4]=" "+T[4]+" "}return T},PSEUDO:function(W,T,U,S,X){if(W[1]==="not"){if(W[3].match(Q).length>1){W[3]=F(W[3],null,null,T)}else{var V=F.filter(W[3],T,U,true^X);if(!U){S.push.apply(S,V)}return false}}else{if(H.match.POS.test(W[0])){return true}}return W},POS:function(S){S.unshift(true);return S}},filters:{enabled:function(S){return S.disabled===false&&S.type!=="hidden"},disabled:function(S){return S.disabled===true},checked:function(S){return S.checked===true},selected:function(S){S.parentNode.selectedIndex;return S.selected===true},parent:function(S){return !!S.firstChild},empty:function(S){return !S.firstChild},has:function(U,T,S){return !!F(S[3],U).length},header:function(S){return/h\d/i.test(S.nodeName)},text:function(S){return"text"===S.type},radio:function(S){return"radio"===S.type},checkbox:function(S){return"checkbox"===S.type},file:function(S){return"file"===S.type},password:function(S){return"password"===S.type},submit:function(S){return"submit"===S.type},image:function(S){return"image"===S.type},reset:function(S){return"reset"===S.type},button:function(S){return"button"===S.type||S.nodeName.toUpperCase()==="BUTTON"},input:function(S){return/input|select|textarea|button/i.test(S.nodeName)}},setFilters:{first:function(T,S){return S===0},last:function(U,T,S,V){return T===V.length-1},even:function(T,S){return S%2===0},odd:function(T,S){return S%2===1},lt:function(U,T,S){return T<S[3]-0},gt:function(U,T,S){return T>S[3]-0},nth:function(U,T,S){return S[3]-0==T},eq:function(U,T,S){return S[3]-0==T}},filter:{CHILD:function(S,V){var Y=V[1],Z=S.parentNode;var X=V[0];if(Z&&(!Z[X]||!S.nodeIndex)){var W=1;for(var T=Z.firstChild;T;T=T.nextSibling){if(T.nodeType==1){T.nodeIndex=W++}}Z[X]=W-1}if(Y=="first"){return S.nodeIndex==1}else{if(Y=="last"){return S.nodeIndex==Z[X]}else{if(Y=="only"){return Z[X]==1}else{if(Y=="nth"){var ab=false,U=V[2],aa=V[3];if(U==1&&aa==0){return true}if(U==0){if(S.nodeIndex==aa){ab=true}}else{if((S.nodeIndex-aa)%U==0&&(S.nodeIndex-aa)/U>=0){ab=true}}return ab}}}}},PSEUDO:function(Y,U,V,Z){var T=U[1],W=H.filters[T];if(W){return W(Y,V,U,Z)}else{if(T==="contains"){return(Y.textContent||Y.innerText||"").indexOf(U[3])>=0}else{if(T==="not"){var X=U[3];for(var V=0,S=X.length;V<S;V++){if(X[V]===Y){return false}}return true}}}},ID:function(T,S){return T.nodeType===1&&T.getAttribute("id")===S},TAG:function(T,S){return(S==="*"&&T.nodeType===1)||T.nodeName===S},CLASS:function(T,S){return S.test(T.className)},ATTR:function(W,U){var S=H.attrHandle[U[1]]?H.attrHandle[U[1]](W):W[U[1]]||W.getAttribute(U[1]),X=S+"",V=U[2],T=U[4];return S==null?V==="!=":V==="="?X===T:V==="*="?X.indexOf(T)>=0:V==="~="?(" "+X+" ").indexOf(T)>=0:!U[4]?S:V==="!="?X!=T:V==="^="?X.indexOf(T)===0:V==="$="?X.substr(X.length-T.length)===T:V==="|="?X===T||X.substr(0,T.length+1)===T+"-":false},POS:function(W,T,U,X){var S=T[2],V=H.setFilters[S];if(V){return V(W,U,T,X)}}}};var L=H.match.POS;for(var N in H.match){H.match[N]=RegExp(H.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(T,S){T=Array.prototype.slice.call(T);if(S){S.push.apply(S,T);return S}return T};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(M){E=function(W,V){var T=V||[];if(G.call(W)==="[object Array]"){Array.prototype.push.apply(T,W)}else{if(typeof W.length==="number"){for(var U=0,S=W.length;U<S;U++){T.push(W[U])}}else{for(var U=0;W[U];U++){T.push(W[U])}}}return T}}(function(){var T=document.createElement("form"),U="script"+(new Date).getTime();T.innerHTML="<input name='"+U+"'/>";var S=document.documentElement;S.insertBefore(T,S.firstChild);if(!!document.getElementById(U)){H.find.ID=function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?V.id===W[1]||typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id").nodeValue===W[1]?[V]:g:[]}};H.filter.ID=function(X,V){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&W&&W.nodeValue===V}}S.removeChild(T)})();(function(){var S=document.createElement("div");S.appendChild(document.createComment(""));if(S.getElementsByTagName("*").length>0){H.find.TAG=function(T,X){var W=X.getElementsByTagName(T[1]);if(T[1]==="*"){var V=[];for(var U=0;W[U];U++){if(W[U].nodeType===1){V.push(W[U])}}W=V}return W}}S.innerHTML="<a href='#'></a>";if(S.firstChild&&S.firstChild.getAttribute("href")!=="#"){H.attrHandle.href=function(T){return T.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var S=F,T=document.createElement("div");T.innerHTML="<p class='TEST'></p>";if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return}F=function(X,W,U,V){W=W||document;if(!V&&W.nodeType===9&&!P(W)){try{return E(W.querySelectorAll(X),U)}catch(Y){}}return S(X,W,U,V)};F.find=S.find;F.filter=S.filter;F.selectors=S.selectors;F.matches=S.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){H.order.splice(1,0,"CLASS");H.find.CLASS=function(S,T){return T.getElementsByClassName(S[1])}}function O(T,Z,Y,ac,aa,ab){for(var W=0,U=ac.length;W<U;W++){var S=ac[W];if(S){S=S[T];var X=false;while(S&&S.nodeType){var V=S[Y];if(V){X=ac[V];break}if(S.nodeType===1&&!ab){S[Y]=W}if(S.nodeName===Z){X=S;break}S=S[T]}ac[W]=X}}}function R(T,Y,X,ab,Z,aa){for(var V=0,U=ab.length;V<U;V++){var S=ab[V];if(S){S=S[T];var W=false;while(S&&S.nodeType){if(S[X]){W=ab[S[X]];break}if(S.nodeType===1){if(!aa){S[X]=V}if(typeof Y!=="string"){if(S===Y){W=true;break}}else{if(F.filter(Y,[S]).length>0){W=S;break}}}S=S[T]}ab[V]=W}}}var J=document.compareDocumentPosition?function(T,S){return T.compareDocumentPosition(S)&16}:function(T,S){return T!==S&&(T.contains?T.contains(S):true)};var P=function(S){return S.nodeType===9&&S.documentElement.nodeName!=="HTML"||!!S.ownerDocument&&P(S.ownerDocument)};var I=function(S,Z){var V=[],W="",X,U=Z.nodeType?[Z]:Z;while((X=H.match.PSEUDO.exec(S))){W+=X[0];S=S.replace(H.match.PSEUDO,"")}S=H.relative[S]?S+"*":S;for(var Y=0,T=U.length;Y<T;Y++){F(S,U[Y],V)}return F.filter(W,V)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(S){return"hidden"===S.type||o.css(S,"display")==="none"||o.css(S,"visibility")==="hidden"};F.selectors.filters.visible=function(S){return"hidden"!==S.type&&o.css(S,"display")!=="none"&&o.css(S,"visibility")!=="hidden"};F.selectors.filters.animated=function(S){return o.grep(o.timers,function(T){return S===T.elem}).length};o.multiFilter=function(U,S,T){if(T){U=":not("+U+")"}return F.matches(U,S)};o.dir=function(U,T){var S=[],V=U[T];while(V&&V!=document){if(V.nodeType==1){S.push(V)}V=V[T]}return S};o.nth=function(W,S,U,V){S=S||1;var T=0;for(;W;W=W[U]){if(W.nodeType==1&&++T==S){break}}return W};o.sibling=function(U,T){var S=[];for(;U;U=U.nextSibling){if(U.nodeType==1&&U!=T){S.push(U)}}return S};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);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<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){G=false}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&typeof l.frameElement==="undefined"){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width="1px";L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L)})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=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("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/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/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();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<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}this[H].style.display=o.data(this[H],"olddisplay",K)}}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;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)==1){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n)}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=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='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';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(H,F){var E=H?"Left":"Top",G=H?"Right":"Bottom";o.fn["inner"+F]=function(){return this[F.toLowerCase()]()+j(this,"padding"+E)+j(this,"padding"+G)};o.fn["outer"+F]=function(J){return this["inner"+F]()+j(this,"border"+E+"Width")+j(this,"border"+G+"Width")+(J?j(this,"margin"+E)+j(this,"margin"+G):0)};var I=F.toLowerCase();o.fn[I]=function(J){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+F]||document.body["client"+F]:this[0]==document?Math.max(document.documentElement["client"+F],document.body["scroll"+F],document.documentElement["scroll"+F],document.body["offset"+F],document.documentElement["offset"+F]):J===g?(this.length?o.css(this[0],I):null):this.css(I,typeof J==="string"?J:J+"px")}})})();

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * 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
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/*
 * jQuery.hotkeys
 * jQuery(document).bind('keydown', 'ctrl+s', save);
 */
(function(jQuery){jQuery.fn.__bind__=jQuery.fn.bind;jQuery.fn.__unbind__=jQuery.fn.unbind;jQuery.fn.__find__=jQuery.fn.find;var hotkeys={version:'0.7.9',override:/keypress|keydown|keyup/g,triggersMap:{},specialKeys:{27:'esc',9:'tab',32:'space',13:'return',8:'backspace',145:'scroll',20:'capslock',144:'numlock',19:'pause',45:'insert',36:'home',46:'del',35:'end',33:'pageup',34:'pagedown',37:'left',38:'up',39:'right',40:'down',109:'-',112:'f1',113:'f2',114:'f3',115:'f4',116:'f5',117:'f6',118:'f7',119:'f8',120:'f9',121:'f10',122:'f11',123:'f12',191:'/'},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"},newTrigger:function(type,combi,callback){var result={};result[type]={};result[type][combi]={cb:callback,disableInInput:false};return result;}};hotkeys.specialKeys=jQuery.extend(hotkeys.specialKeys,{96:'0',97:'1',98:'2',99:'3',100:'4',101:'5',102:'6',103:'7',104:'8',105:'9',106:'*',107:'+',109:'-',110:'.',111:'/'});jQuery.fn.find=function(selector){this.query=selector;return jQuery.fn.__find__.apply(this,arguments);};jQuery.fn.unbind=function(type,combi,fn){if(jQuery.isFunction(combi)){fn=combi;combi=null;}
if(combi&&typeof combi==='string'){var selectorId=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var hkTypes=type.split(' ');for(var x=0;x<hkTypes.length;x++){delete hotkeys.triggersMap[selectorId][hkTypes[x]][combi];}}
return this.__unbind__(type,fn);};jQuery.fn.bind=function(type,data,fn){var handle=type.match(hotkeys.override);if(jQuery.isFunction(data)||!handle){return this.__bind__(type,data,fn);}
else{var result=null,pass2jq=jQuery.trim(type.replace(hotkeys.override,''));if(pass2jq){result=this.__bind__(pass2jq,data,fn);}
if(typeof data==="string"){data={'combi':data};}
if(data.combi){for(var x=0;x<handle.length;x++){var eventType=handle[x];var combi=data.combi.toLowerCase(),trigger=hotkeys.newTrigger(eventType,combi,fn),selectorId=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();trigger[eventType][combi].disableInInput=data.disableInInput;if(!hotkeys.triggersMap[selectorId]){hotkeys.triggersMap[selectorId]=trigger;}
else if(!hotkeys.triggersMap[selectorId][eventType]){hotkeys.triggersMap[selectorId][eventType]=trigger[eventType];}
var mapPoint=hotkeys.triggersMap[selectorId][eventType][combi];if(!mapPoint){hotkeys.triggersMap[selectorId][eventType][combi]=[trigger[eventType][combi]];}
else if(mapPoint.constructor!==Array){hotkeys.triggersMap[selectorId][eventType][combi]=[mapPoint];}
else{hotkeys.triggersMap[selectorId][eventType][combi][mapPoint.length]=trigger[eventType][combi];}
this.each(function(){var jqElem=jQuery(this);if(jqElem.attr('hkId')&&jqElem.attr('hkId')!==selectorId){selectorId=jqElem.attr('hkId')+";"+selectorId;}
jqElem.attr('hkId',selectorId);});result=this.__bind__(handle.join(' '),data,hotkeys.handler)}}
return result;}};hotkeys.findElement=function(elem){if(!jQuery(elem).attr('hkId')){if(jQuery.browser.opera||jQuery.browser.safari){while(!jQuery(elem).attr('hkId')&&elem.parentNode){elem=elem.parentNode;}}}
return elem;};hotkeys.handler=function(event){var target=hotkeys.findElement(event.currentTarget),jTarget=jQuery(target),ids=jTarget.attr('hkId');if(ids){ids=ids.split(';');var code=event.which,type=event.type,special=hotkeys.specialKeys[code],character=!special&&String.fromCharCode(code).toLowerCase(),shift=event.shiftKey,ctrl=event.ctrlKey,alt=event.altKey||event.originalEvent.altKey,mapPoint=null;for(var x=0;x<ids.length;x++){if(hotkeys.triggersMap[ids[x]][type]){mapPoint=hotkeys.triggersMap[ids[x]][type];break;}}
if(mapPoint){var trigger;if(!shift&&!ctrl&&!alt){trigger=mapPoint[special]||(character&&mapPoint[character]);}
else{var modif='';if(alt)modif+='alt+';if(ctrl)modif+='ctrl+';if(shift)modif+='shift+';trigger=mapPoint[modif+special];if(!trigger){if(character){trigger=mapPoint[modif+character]||mapPoint[modif+hotkeys.shiftNums[character]]||(modif==='shift+'&&mapPoint[hotkeys.shiftNums[character]]);}}}
if(trigger){var result=false;for(var x=0;x<trigger.length;x++){if(trigger[x].disableInInput){var elem=jQuery(event.target);if(jTarget.is("input")||jTarget.is("textarea")||jTarget.is("select")||elem.is("input")||elem.is("textarea")||elem.is("select")){return true;}}
result=result||trigger[x].cb.apply(this,[event]);}
return result;}}}};window.hotkeys=hotkeys;return jQuery;})(jQuery);


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
*/
jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});

/**
 * jQuery sound plugin (no flash)
 * 
 * port of script.aculo.us' sound.js (http://script.aculo.us), based on code by Jules Gravinese (http://www.webveteran.com/) 
 * 
 * Copyright (c) 2007 Jörn Zaefferer (http://bassistance.de) 
 * 
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * $Id$
 */

/**
 * API Documentation
 * 
 * // play a sound from the url
 * $.sound.play(url)
 * 
 * // play a sound from the url, on a track, stopping any sound already running on that track
 * $.sound.play(url, {
 * track: "track1"
 * });
 * 
 * // increase the timeout to four seconds before removing the sound object from the dom for longer sounds
 * $.sound.play(url, {
 * timeout: 4000
 * });
 * 
 * // stop a sound by removing the element returned by play
 * var sound = $.sound.play(url);
 * sound.remove();
 * 
 * // disable playing sounds
 * $.sound.enabled = false;
 * 
 * // enable playing sounds
 * $.sound.enabled = true
 */
(function(a){a.sound={tracks:{},enabled:true,template:function(b){return'<embed style="height:0" loop="false" src="'+b+'" autostart="true" hidden="true"/>'},play:function(c,b){if(!this.enabled){return}var e=a.extend({url:c,timeout:2000},b);if(e.track){if(this.tracks[e.track]){var f=this.tracks[e.track];f.Stop&&f.Stop();f.remove()}}var d=a.browser.msie?a("<bgsound/>").attr({src:e.url,loop:1,autostart:true}):a(this.template(e.url));d.appendTo("body");if(e.track){this.tracks[e.track]=d}return d}}})(jQuery);

/* Copyright (c) 2009 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.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * Version: 3.0.2
 * 
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);


/*
 * Fade Slider Toggle plugin
 * 
 * Copyright(c) 2009, Cedric Dugas
 * http://www.position-relative.net
 * 
 * A sliderToggle() with opacity
 * Licenced under the MIT Licence
 */


jQuery.fn.fadeSliderToggle=function(a){a=jQuery.extend({speed:500,easing:"swing"},a);caller=this;if($(caller).css("display")=="none"){$(caller).animate({opacity:1,height:"toggle"},a.speed,a.easing)}else{$(caller).animate({opacity:0,height:"toggle"},a.speed,a.easing)}};

/*
 * AJAX Upload
 * Project page - http://valums.com/ajax-upload/
 * Copyright (c) 2008 Andris Valums, http://valums.com
 * Licensed under the MIT license (http://valums.com/mit-license/)
 */
(function(){var i=document,m=window;function b(d){if(typeof d=="string"){d=i.getElementById(d)}return d}function e(r,q,d){if(m.addEventListener){r.addEventListener(q,d,false)}else{if(m.attachEvent){var s=function(){d.call(r,m.event)};r.attachEvent("on"+q,s)}}}var c=function(){var d=i.createElement("div");return function(q){d.innerHTML=q;var r=d.childNodes[0];d.removeChild(r);return r}}();function f(q,d){return q.className.match(new RegExp("(\\s|^)"+d+"(\\s|$)"))}function h(q,d){if(!f(q,d)){q.className+=" "+d}}function n(r,d){var q=new RegExp("(\\s|^)"+d+"(\\s|$)");r.className=r.className.replace(q," ")}if(document.documentElement.getBoundingClientRect){var o=function(d){var u=d.getBoundingClientRect(),y=d.ownerDocument,v=y.body,q=y.documentElement,t=q.clientTop||v.clientTop||0,w=q.clientLeft||v.clientLeft||0,z=1;if(v.getBoundingClientRect){var s=v.getBoundingClientRect();z=(s.right-s.left)/v.clientWidth}if(z>1){t=0;w=0}var x=u.top/z+(window.pageYOffset||q&&q.scrollTop/z||v.scrollTop/z)-t,r=u.left/z+(window.pageXOffset||q&&q.scrollLeft/z||v.scrollLeft/z)-w;return{top:x,left:r}}}else{var o=function(d){if(m.jQuery){return jQuery(d).offset()}var r=0,q=0;do{r+=d.offsetTop||0;q+=d.offsetLeft||0}while(d=d.offsetParent);return{left:q,top:r}}}function a(r){var t,q,s,d;var u=o(r);t=u.left;s=u.top;q=t+r.offsetWidth;d=s+r.offsetHeight;return{left:t,right:q,top:s,bottom:d}}function k(s){if(!s.pageX&&s.clientX){var r=1;var d=document.body;if(d.getBoundingClientRect){var q=d.getBoundingClientRect();r=(q.right-q.left)/d.clientWidth}return{x:s.clientX/r+i.body.scrollLeft+i.documentElement.scrollLeft,y:s.clientY/r+i.body.scrollTop+i.documentElement.scrollTop}}return{x:s.pageX,y:s.pageY}}var j=function(){var d=0;return function(){return"ValumsAjaxUpload"+d++}}();function p(d){return d.replace(/.*(\/|\\)/,"")}function l(d){return(/[.]/.exec(d))?/[^.]+$/.exec(d.toLowerCase()):""}var g=function(){var d;return function(){if(d){return d}if(typeof XMLHttpRequest!=="undefined"){d=new XMLHttpRequest()}else{var q=["Microsoft.XmlHttp","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0"];for(var r=0;r<q.length;r++){try{d=new ActiveXObject(q[r]);break}catch(s){}}}return d}}();Ajax_upload=AjaxUpload=function(r,d){if(r.jquery){r=r[0]}else{if(typeof r=="string"&&/^#.*/.test(r)){r=r.slice(1)}}r=b(r);this._input=null;this._button=r;this._disabled=false;this._submitting=false;this._justClicked=false;this._parentDialog=i.body;if(window.jQuery&&jQuery.ui&&jQuery.ui.dialog){var s=jQuery(this._button).parents(".ui-dialog");if(s.length){this._parentDialog=s[0]}}this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:true,responseType:false,closeConnection:"",hoverClass:"hover",onChange:function(t,u){},onSubmit:function(t,u){},onComplete:function(u,t){}};for(var q in d){this._settings[q]=d[q]}this._createInput();this._rerouteClicks()};AjaxUpload.prototype={setData:function(d){this._settings.data=d},disable:function(){this._disabled=true},enable:function(){this._disabled=false},destroy:function(){if(this._input){if(this._input.parentNode){this._input.parentNode.removeChild(this._input)}this._input=null}},_createInput:function(){var q=this;var d=i.createElement("input");d.setAttribute("type","file");d.setAttribute("name",this._settings.name);var s={position:"absolute",margin:"-5px 0 0 -175px",padding:0,width:"220px",height:"30px",fontSize:"14px",opacity:0,cursor:"pointer",display:"none",zIndex:2147483583};for(var r in s){d.style[r]=s[r]}if(!(d.style.opacity==="0")){d.style.filter="alpha(opacity=0)"}this._parentDialog.appendChild(d);e(d,"change",function(){var t=p(this.value);if(q._settings.onChange.call(q,t,l(t))==false){return}if(q._settings.autoSubmit){q.submit()}});e(d,"click",function(){q._justClicked=true;setTimeout(function(){q._justClicked=false},2500)});this._input=d},_rerouteClicks:function(){var q=this;var r,d={top:0,left:0},s=false;e(q._button,"mouseover",function(t){if(!q._input||s){return}s=true;r=a(q._button);if(q._parentDialog!=i.body){d=o(q._parentDialog)}});e(document,"mousemove",function(v){var u=q._input;if(!u||!s){return}if(q._disabled){n(q._button,q._settings.hoverClass);u.style.display="none";return}var w=k(v);if((w.x>=r.left)&&(w.x<=r.right)&&(w.y>=r.top)&&(w.y<=r.bottom)){u.style.top=w.y-d.top+"px";u.style.left=w.x-d.left+"px";u.style.display="block";h(q._button,q._settings.hoverClass)}else{s=false;var t=setInterval(function(){if(q._justClicked){return}if(!s){u.style.display="none"}clearInterval(t)},25);n(q._button,q._settings.hoverClass)}})},_createIframe:function(){var q=j();var d=c('<iframe src="javascript:false;" name="'+q+'" />');d.id=q;d.style.display="none";i.body.appendChild(d);return d},submit:function(){var d=this,s=this._settings;if(this._input.value===""){return}var q=p(this._input.value);if(!(s.onSubmit.call(this,q,l(q))==false)){var r=this._createIframe();var u=this._createForm(r);u.appendChild(this._input);if(s.closeConnection&&/AppleWebKit|MSIE/.test(navigator.userAgent)){var v=g();v.open("GET",s.closeConnection,false);v.send("")}u.submit();i.body.removeChild(u);u=null;this._input=null;this._createInput();var t=false;e(r,"load",function(y){if(r.src=="javascript:'%3Chtml%3E%3C/html%3E';"||r.src=="javascript:'<html></html>';"){if(t){setTimeout(function(){i.body.removeChild(r)},0)}return}var x=r.contentDocument?r.contentDocument:frames[r.id].document;if(x.readyState&&x.readyState!="complete"){return}if(x.body&&x.body.innerHTML=="false"){return}var w;if(x.XMLDocument){w=x.XMLDocument}else{if(x.body){w=x.body.innerHTML;if(s.responseType&&s.responseType.toLowerCase()=="json"){if(x.body.firstChild&&x.body.firstChild.nodeName.toUpperCase()=="PRE"){w=x.body.firstChild.firstChild.nodeValue}if(w){w=window["eval"]("("+w+")")}else{w={}}}}else{var w=x}}s.onComplete.call(d,q,w);t=true;r.src="javascript:'<html></html>';"})}else{i.body.removeChild(this._input);this._input=null;this._createInput()}},_createForm:function(r){var q=this._settings;var s=c('<form method="post" enctype="multipart/form-data"></form>');s.style.display="none";s.action=q.action;s.target=r.name;i.body.appendChild(s);for(var t in q.data){var d=i.createElement("input");d.type="hidden";d.name=t;d.value=q.data[t];s.appendChild(d)}return s}}})();


/*
 * jQuery highlight
 * http://www.keyframesandcode.com/resources/javascript/jQuery/demos/highlight-demo.html
 */
jQuery.fn.highlight=function(c,e,d,b){var e=e||"highlight";if(d==undefined&&b==undefined){var d="mouseover";var b="mouseout"}else{if(d==b||d!=undefined&&b==undefined){var a=true}}this.each(function(){var f=this.tagName.toLowerCase();if(f=="form"){c=c||"li";var g=jQuery("textarea, select, multi-select, :text, :image, :password, :radio, :checkbox, :file",this);g.bind("focus",function(){var h=jQuery(this).parents(c);var i=jQuery(h.get(0));i.addClass(e)});g.bind("blur",function(){var h=jQuery(this).parents(c);var i=jQuery(h.get(0));i.removeClass(e)})}else{if(f.match(/^(table|tbody)$/)!=null){c=c||"tr"}else{if(f.match(/^(ul|ol)$/)!=null){c=c||"li"}else{c="*"}}var g=jQuery(c,this);if(a){g.bind(d,function(){if(jQuery(this).hasClass(e)){jQuery(this).removeClass(e)}else{jQuery(this).addClass(e)}})}else{g.bind(d,function(){jQuery(this).addClass(e)});g.bind(b,function(){jQuery(this).removeClass(e)})}}})};


/**
 * @author Alexander Farkas
 * v. 1.21
 */
(function(e){if(!document.defaultView||!document.defaultView.getComputedStyle){var f=jQuery.curCSS;jQuery.curCSS=function(a,b,c){if(b==='background-position'){b='backgroundPosition'}if(b!=='backgroundPosition'||!a.currentStyle||a.currentStyle[b]){return f.apply(this,arguments)}var d=a.style;if(!c&&d&&d[b]){return d[b]}return f(a,'backgroundPositionX',c)+' '+f(a,'backgroundPositionY',c)}}var h=e.fn.animate;e.fn.animate=function(a){if('background-position'in a){a.backgroundPosition=a['background-position'];delete a['background-position']}if('backgroundPosition'in a){a.backgroundPosition='('+a.backgroundPosition}return h.apply(this,arguments)};function g(a){a=a.replace(/left|top/g,'0px');a=a.replace(/right|bottom/g,'100%');a=a.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var b=a.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(b[1],10),b[2],parseFloat(b[3],10),b[4]]}e.fx.step.backgroundPosition=function(a){if(!a.bgPosReady){var b=e.curCSS(a.elem,'backgroundPosition');if(!b){b='0px 0px'}b=g(b);a.start=[b[0],b[2]];var c=g(a.options.curAnim.backgroundPosition);a.end=[c[0],c[2]];a.unit=[c[1],c[3]];a.bgPosReady=true}var d=[];d[0]=((a.end[0]-a.start[0])*a.pos)+a.start[0]+a.unit[0];d[1]=((a.end[1]-a.start[1])*a.pos)+a.start[1]+a.unit[1];a.elem.style.backgroundPosition=d[0]+' '+d[1]}})(jQuery);

/*
 * jQuery blockUI plugin
 * Version 2.23 (21-JUN-2009)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */

;(function($) {

if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
 alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
 return;
}

$.fn._fadeIn = $.fn.fadeIn;

// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
// retarded userAgent strings on Vista)
var mode = document.documentMode || 0;
var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;

// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };

// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
$.growlUI = function(title, message, timeout, onClose) {
 var $m = $('<div class="growlUI"></div>');
 if (title) $m.append('<h1>'+title+'</h1>');
 if (message) $m.append('<h2>'+message+'</h2>');
 if (timeout == undefined) timeout = 3000;
 $.blockUI({
 message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
 timeout: timeout, showOverlay: false,
 onUnblock: onClose, 
 css: $.blockUI.defaults.growlCSS
 });
};

// plugin method for blocking element content
$.fn.block = function(opts) {
 return this.unblock({ fadeOut: 0 }).each(function() {
 if ($.css(this,'position') == 'static')
 this.style.position = 'relative';
 if ($.browser.msie)
 this.style.zoom = 1; // force 'hasLayout'
 install(this, opts);
 });
};

// plugin method for unblocking element content
$.fn.unblock = function(opts) {
 return this.each(function() {
 remove(this, opts);
 });
};

$.blockUI.version = 2.23; // 2nd generation blocking at no extra cost!

// override these in your code to change the default behavior and style
$.blockUI.defaults = {
 // message displayed when blocking (use null for no message)
 message: '<h1>Please wait...</h1>',

 // styles for the message when blocking; if you wish to disable
 // these and use an external stylesheet then do this in your code:
 // $.blockUI.defaults.css = {};
 css: {
 padding: 0,
 margin: 0,
 width: '30%',
 top: '40%',
 left: '35%',
 textAlign: 'left',
 color: '#333',
 border: '1px solid #aaa',
 backgroundColor:'#fff',
 fontSize: '12px'
 },

 // styles for the overlay
 overlayCSS: {
 backgroundColor: '#000',
 opacity: 0.6,
 cursor: 'pointer'
 },

 // styles applied when using $.growlUI
 growlCSS: {
 width: '350px',
 top: '10px',
 left: '',
 right: '10px',
 border: 'none',
 padding: '5px',
 opacity: 0.6,
 cursor: null,
 color: '#fff',
 backgroundColor: '#000',
 '-webkit-border-radius': '10px',
 '-moz-border-radius': '10px'
 },
 
 // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
 // (hat tip to Jorge H. N. de Vasconcelos)
 iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',

 // force usage of iframe in non-IE browsers (handy for blocking applets)
 forceIframe: false,

 // z-index for the blocking overlay
 baseZ: 1000,

 // set these to true to have the message automatically centered
 centerX: true, // <-- only effects element blocking (page block controlled via css above)
 centerY: true,

 // allow body element to be stetched in ie6; this makes blocking look better
 // on "short" pages. disable if you wish to prevent changes to the body height
 allowBodyStretch: true,

 // enable if you want key and mouse events to be disabled for content that is blocked
 bindEvents: true,

 // be default blockUI will supress tab navigation from leaving blocking content
 // (if bindEvents is true)
 constrainTabKey: true,

 // fadeIn time in millis; set to 0 to disable fadeIn on block
 fadeIn: 200,

 // fadeOut time in millis; set to 0 to disable fadeOut on unblock
 fadeOut: 400,

 // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
 timeout: 0,

 // disable if you don't want to show the overlay
 showOverlay: true,

 // if true, focus will be placed in the first available input field when
 // page blocking
 focusInput: true,

 // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
 applyPlatformOpacityRules: true,

 // callback method invoked when unblocking has completed; the callback is
 // passed the element that has been unblocked (which is the window object for page
 // blocks) and the options that were passed to the unblock call:
 // onUnblock(element, options)
 onUnblock: null,

 // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
 quirksmodeOffsetHack: 4
};

// private data and functions follow...

var pageBlock = null;
var pageBlockEls = [];

function install(el, opts) {
 var full = (el == window);
 var msg = opts && opts.message !== undefined ? opts.message : undefined;
 opts = $.extend({}, $.blockUI.defaults, opts || {});
 opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
 var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
 msg = msg === undefined ? opts.message : msg;

 // remove the current block (if there is one)
 if (full && pageBlock)
 remove(window, {fadeOut:0});

 // if an existing element is being used as the blocking content then we capture
 // its current place in the DOM (and current display style) so we can restore
 // it when we unblock
 if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
 var node = msg.jquery ? msg[0] : msg;
 var data = {};
 $(el).data('blockUI.history', data);
 data.el = node;
 data.parent = node.parentNode;
 data.display = node.style.display;
 data.position = node.style.position;
 if (data.parent)
 data.parent.removeChild(node);
 }

 var z = opts.baseZ;

 // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
 // layer1 is the iframe layer which is used to supress bleed through of underlying content
 // layer2 is the overlay layer which has opacity and a wait cursor (by default)
 // layer3 is the message content that is displayed while blocking

 var lyr1 = ($.browser.msie || opts.forceIframe) 
 ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
 : $('<div class="blockUI" style="display:none"></div>');
 var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
 var lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:absolute"></div>')
 : $('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');

 // if we have a message, style it
 if (msg) {
 lyr3.css(css);
 }

 // style the overlay
 if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
 lyr2.css(opts.overlayCSS);
 lyr2.css('position', full ? 'fixed' : 'absolute');

 // make iframe layer transparent in IE
 if ($.browser.msie || opts.forceIframe)
 lyr1.css('opacity',0.0);

 $([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);

 // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
 var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
 if (ie6 || expr) {
 // give body 100% height
 if (full && opts.allowBodyStretch && $.boxModel)
 $('html,body').css('height','100%');

 // fix ie6 issue when blocked element has a border width
 if ((ie6 || !$.boxModel) && !full) {
 var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
 var fixT = t ? '(0 - '+t+')' : 0;
 var fixL = l ? '(0 - '+l+')' : 0;
 }

 // simulate fixed position
 $.each([lyr1,lyr2,lyr3], function(i,o) {
 var s = o[0].style;
 s.position = 'absolute';
 if (i < 2) {
 full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
 : s.setExpression('height','this.parentNode.offsetHeight + "px"');
 full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
 : s.setExpression('width','this.parentNode.offsetWidth + "px"');
 if (fixL) s.setExpression('left', fixL);
 if (fixT) s.setExpression('top', fixT);
 }
 else if (opts.centerY) {
 //if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
 s.marginTop = 0;
 s.top=$(window).scrollTop()+50+"px";
 }
 else if (!opts.centerY && full) {
 var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
 var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
 s.setExpression('top',expression);
 }
 });
 }

 // show the message
 if (msg) {
 lyr3.append(msg);
 if (msg.jquery || msg.nodeType)
 $(msg).show();
 }

 if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
 lyr1.show(); // opacity is zero
 if (opts.fadeIn) {
 if (opts.showOverlay)
 lyr2._fadeIn(opts.fadeIn);
 if (msg) {
 lyr3.fadeIn(opts.fadeIn);
 
 t=$(window).scrollTop()+$(window).height()/2-lyr3.height()/2;
 if(t<$(window).scrollTop()) t=$(window).scrollTop()+10;
 t=$(window).scrollTop()+10;
 lyr3.css("top", t+"px");
 
 l = ($(window).width() - lyr3.width())/2;
 lyr3.css("left", l+"px");
 }
 }
 else {
 if (opts.showOverlay)
 lyr2.show();
 if (msg)
 lyr3.show();
 }

 // bind key and mouse events
 bind(1, el, opts);

 if (full) {
 pageBlock = lyr3[0];
 pageBlockEls = $(':input:enabled:visible',pageBlock);
 if (opts.focusInput)
 setTimeout(focus, 20);
 }
 else
 center(lyr3[0], opts.centerX, opts.centerY);

 if (opts.timeout) {
 // auto-unblock
 var to = setTimeout(function() {
 full ? $.unblockUI(opts) : $(el).unblock(opts);
 }, opts.timeout);
 $(el).data('blockUI.timeout', to);
 }
};

// remove the block
function remove(el, opts) {
 var full = el == window;
 var $el = $(el);
 var data = $el.data('blockUI.history');
 var to = $el.data('blockUI.timeout');
 if (to) {
 clearTimeout(to);
 $el.removeData('blockUI.timeout');
 }
 opts = $.extend({}, $.blockUI.defaults, opts || {});
 bind(0, el, opts); // unbind events
 var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);

 if (full)
 pageBlock = pageBlockEls = null;

 if (opts.fadeOut) {
 els.fadeOut(opts.fadeOut);
 setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
 }
 else
 reset(els, data, opts, el);
};

// move blocking element back into the DOM where it started
function reset(els,data,opts,el) {
 els.each(function(i,o) {
 // remove via DOM calls so we don't lose event handlers
 if (this.parentNode)
 this.parentNode.removeChild(this);
 });

 if (data && data.el) {
 data.el.style.display = data.display;
 data.el.style.position = data.position;
 if (data.parent)
 data.parent.appendChild(data.el);
 $(data.el).removeData('blockUI.history');
 }

 if (typeof opts.onUnblock == 'function')
 opts.onUnblock(el,opts);
};

// bind/unbind the handler
function bind(b, el, opts) {
 var full = el == window, $el = $(el);

 // don't bother unbinding if there is nothing to unbind
 if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
 return;
 if (!full)
 $el.data('blockUI.isBlocked', b);

 // don't bind events when overlay is not in use or if bindEvents is false
 if (!opts.bindEvents || (b && !opts.showOverlay)) 
 return;

 // bind anchors and inputs for mouse and key events
 var events = 'mousedown mouseup keydown keypress';
 b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);

// former impl...
// var $e = $('a,:input');
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
};

// event handler to suppress keyboard/mouse events when blocking
function handler(e) {
 // allow tab navigation (conditionally)
 if (e.keyCode && e.keyCode == 9) {
 if (pageBlock && e.data.constrainTabKey) {
 var els = pageBlockEls;
 var fwd = !e.shiftKey && e.target == els[els.length-1];
 var back = e.shiftKey && e.target == els[0];
 if (fwd || back) {
 setTimeout(function(){focus(back)},10);
 return false;
 }
 }
 }
 // allow events within the message content
 if ($(e.target).parents('div.blockMsg').length > 0)
 return true;

 // allow events for content that is not being blocked
 return $(e.target).parents().children().filter('div.blockUI').length == 0;
};

function focus(back) {
 if (!pageBlockEls)
 return;
 var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
 if (e)
 e.focus();
};

function center(el, x, y) {
 var p = el.parentNode, s = el.style;
 var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
 var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
 if (x) s.left = l > 0 ? (l+'px') : '0';
 if (y) s.top = t > 0 ? (t+'px') : '0';
};

function sz(el, p) {
 return parseInt($.css(el,p))||0;
};

})(jQuery);


(function($) {
 $.fn.loadArticlesList = function(user, limit, order, p) {
 if(typeof(order)=="undefined") order="id";
 if(order=="commented") order="comments";
 if(order=="loved") order="favs";
 $el=$(this);
 $el.css("visibility", "hidden");
 $.post(
 "/inc/ajax/loadArticlesList.php",
 {
 user: user,
 limit: limit,
 order: order,
 p: p
 },
 function (data) {
 $el.html(data);
 $el.css("visibility", "visible");
 $(".articles-list").highlight();
 }
 );
 }
})(jQuery);

var md5=function(M){function t(h,g){return(h<<g)|(h>>>(32-g))}function l(h,g){var i,j,m,n,k;m=(h&0x80000000);n=(g&0x80000000);i=(h&0x40000000);j=(g&0x40000000);k=(h&0x3FFFFFFF)+(g&0x3FFFFFFF);if(i&j){return(k^0x80000000^m^n)}if(i|j){if(k&0x40000000){return(k^0xC0000000^m^n)}else{return(k^0x40000000^m^n)}}else{return(k^m^n)}}function R(h,g,i){return(h&g)|((~h)&i)}function S(h,g,i){return(h&i)|(g&(~i))}function T(h,g,i){return(h^g^i)}function U(h,g,i){return(g^(h|(~i)))}function o(h,g,i,j,m,n,k){h=l(h,l(l(R(g,i,j),m),k));return l(t(h,n),g)};function p(h,g,i,j,m,n,k){h=l(h,l(l(S(g,i,j),m),k));return l(t(h,n),g)};function q(h,g,i,j,m,n,k){h=l(h,l(l(T(g,i,j),m),k));return l(t(h,n),g)};function r(h,g,i,j,m,n,k){h=l(h,l(l(U(g,i,j),m),k));return l(t(h,n),g)};function V(h){var g;var i=h.length;var j=i+8;var m=(j-(j%64))/64;var n=(m+1)*16;var k=Array(n-1);var u=0;var s=0;while(s<i){g=(s-(s%4))/4;u=(s%4)*8;k[g]=(k[g]|(h.charCodeAt(s)<<u));s++}g=(s-(s%4))/4;u=(s%4)*8;k[g]=k[g]|(0x80<<u);k[n-2]=i<<3;k[n-1]=i>>>29;return k};function v(h){var g="",i="",j,m;for(m=0;m<=3;m++){j=(h>>>(m*8))&255;i="0"+j.toString(16);g=g+i.substr(i.length-2,2)}return g};function W(h){h=h.replace(/\r\n/g,"\n");var g="";for(var i=0;i<h.length;i++){var j=h.charCodeAt(i);if(j<128){g+=String.fromCharCode(j)}else if((j>127)&&(j<2048)){g+=String.fromCharCode((j>>6)|192);g+=String.fromCharCode((j&63)|128)}else{g+=String.fromCharCode((j>>12)|224);g+=String.fromCharCode(((j>>6)&63)|128);g+=String.fromCharCode((j&63)|128)}}return g};var f=Array();var e,N,O,P,Q,a,b,c,d;var w=7,x=12,y=17,z=22;var A=5,B=9,C=14,D=20;var E=4,F=11,G=16,H=23;var I=6,J=10,K=15,L=21;M=W(M);f=V(M);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(e=0;e<f.length;e+=16){N=a;O=b;P=c;Q=d;a=o(a,b,c,d,f[e+0],w,0xD76AA478);d=o(d,a,b,c,f[e+1],x,0xE8C7B756);c=o(c,d,a,b,f[e+2],y,0x242070DB);b=o(b,c,d,a,f[e+3],z,0xC1BDCEEE);a=o(a,b,c,d,f[e+4],w,0xF57C0FAF);d=o(d,a,b,c,f[e+5],x,0x4787C62A);c=o(c,d,a,b,f[e+6],y,0xA8304613);b=o(b,c,d,a,f[e+7],z,0xFD469501);a=o(a,b,c,d,f[e+8],w,0x698098D8);d=o(d,a,b,c,f[e+9],x,0x8B44F7AF);c=o(c,d,a,b,f[e+10],y,0xFFFF5BB1);b=o(b,c,d,a,f[e+11],z,0x895CD7BE);a=o(a,b,c,d,f[e+12],w,0x6B901122);d=o(d,a,b,c,f[e+13],x,0xFD987193);c=o(c,d,a,b,f[e+14],y,0xA679438E);b=o(b,c,d,a,f[e+15],z,0x49B40821);a=p(a,b,c,d,f[e+1],A,0xF61E2562);d=p(d,a,b,c,f[e+6],B,0xC040B340);c=p(c,d,a,b,f[e+11],C,0x265E5A51);b=p(b,c,d,a,f[e+0],D,0xE9B6C7AA);a=p(a,b,c,d,f[e+5],A,0xD62F105D);d=p(d,a,b,c,f[e+10],B,0x2441453);c=p(c,d,a,b,f[e+15],C,0xD8A1E681);b=p(b,c,d,a,f[e+4],D,0xE7D3FBC8);a=p(a,b,c,d,f[e+9],A,0x21E1CDE6);d=p(d,a,b,c,f[e+14],B,0xC33707D6);c=p(c,d,a,b,f[e+3],C,0xF4D50D87);b=p(b,c,d,a,f[e+8],D,0x455A14ED);a=p(a,b,c,d,f[e+13],A,0xA9E3E905);d=p(d,a,b,c,f[e+2],B,0xFCEFA3F8);c=p(c,d,a,b,f[e+7],C,0x676F02D9);b=p(b,c,d,a,f[e+12],D,0x8D2A4C8A);a=q(a,b,c,d,f[e+5],E,0xFFFA3942);d=q(d,a,b,c,f[e+8],F,0x8771F681);c=q(c,d,a,b,f[e+11],G,0x6D9D6122);b=q(b,c,d,a,f[e+14],H,0xFDE5380C);a=q(a,b,c,d,f[e+1],E,0xA4BEEA44);d=q(d,a,b,c,f[e+4],F,0x4BDECFA9);c=q(c,d,a,b,f[e+7],G,0xF6BB4B60);b=q(b,c,d,a,f[e+10],H,0xBEBFBC70);a=q(a,b,c,d,f[e+13],E,0x289B7EC6);d=q(d,a,b,c,f[e+0],F,0xEAA127FA);c=q(c,d,a,b,f[e+3],G,0xD4EF3085);b=q(b,c,d,a,f[e+6],H,0x4881D05);a=q(a,b,c,d,f[e+9],E,0xD9D4D039);d=q(d,a,b,c,f[e+12],F,0xE6DB99E5);c=q(c,d,a,b,f[e+15],G,0x1FA27CF8);b=q(b,c,d,a,f[e+2],H,0xC4AC5665);a=r(a,b,c,d,f[e+0],I,0xF4292244);d=r(d,a,b,c,f[e+7],J,0x432AFF97);c=r(c,d,a,b,f[e+14],K,0xAB9423A7);b=r(b,c,d,a,f[e+5],L,0xFC93A039);a=r(a,b,c,d,f[e+12],I,0x655B59C3);d=r(d,a,b,c,f[e+3],J,0x8F0CCC92);c=r(c,d,a,b,f[e+10],K,0xFFEFF47D);b=r(b,c,d,a,f[e+1],L,0x85845DD1);a=r(a,b,c,d,f[e+8],I,0x6FA87E4F);d=r(d,a,b,c,f[e+15],J,0xFE2CE6E0);c=r(c,d,a,b,f[e+6],K,0xA3014314);b=r(b,c,d,a,f[e+13],L,0x4E0811A1);a=r(a,b,c,d,f[e+4],I,0xF7537E82);d=r(d,a,b,c,f[e+11],J,0xBD3AF235);c=r(c,d,a,b,f[e+2],K,0x2AD7D2BB);b=r(b,c,d,a,f[e+9],L,0xEB86D391);a=l(a,N);b=l(b,O);c=l(c,P);d=l(d,Q)}var X=v(a)+v(b)+v(c)+v(d);return X.toLowerCase()}
function rolloverImg(b,a){doc=document;el=doc.getElementById(b);if(!el.oldSrc){el.oldSrc=el.src}el.src=a;el.onmouseout=function(){restoreImg()};doc.currentHover=b}
function restoreImg(){doc=document;id=doc.currentHover;el=doc.getElementById(id);el.src=el.oldSrc}
function trim(a){return a.replace(/^\s+|\s+$/g,"")}String.prototype.ucfirst=function(){var a=this.split(/\s+/g);for(var b=0;b<a.length;b++){var c=a[b].match(/(\w)(\w*)/);a[b]=c[1].toUpperCase()+c[2].toLowerCase()}return a.join(" ")};
function urlencode(a){return escape(a).replace(/\+/g,"%2B").replace(/%20/g,"+").replace(/\*/g,"%2A").replace(/\//g,"%2F").replace(/@/g,"%40")}
function check_email(a){at=a.indexOf("@");dot=a.indexOf(".",at);last_at=a.lastIndexOf("@");last_dot=a.lastIndexOf(".");if(at>0&&dot>0&&(dot-at)>1&&a.length-dot>1&&last_at==at&&a.length>5){valid="1"}else{valid="0"}return valid}
function pop_up(c,b,d,a){w=(document.body.clientWidth-d)/2;h=(document.body.clientHeight)/2;window.open(c,b,"width="+d+",height="+a+",menubar=no,left="+w+",top=200,screenX="+w+",screenY=200,scrollbars=1")}
function show_hide(a){if(jQuery("#"+a).css("display")=="none"){jQuery("#"+a).css("display","block")}else{jQuery("#"+a).css("display","none")}}
function show(a){document.getElementById(a).style.display="block"}
function hide(a){document.getElementById(a).style.display="none"}
function browser_detection(){browser_version=parseInt(navigator.appVersion);browser_type=navigator.appName;if(browser_type=="Microsoft Internet Explorer"&&(browser_version>=4)){var a="ie"}else{var a="other"}return a};
function preload_images(folder,pics){pics=pics.split(";");for(i=0;i<pics.length;i++){img=new Image();img.src=folder+pics[i];}}
function changeValue(id){d=document;el=d.getElementById(id);if(!el.oldValue){el.oldValue=el.value;}val=el.oldValue;if(el.value==el.oldValue){el.focus();el.value='';el.onblur=function(){returnValue(id)};}}
function returnValue(id){d=document;el=d.getElementById(id);if(el.value=='')el.value=el.oldValue;}
function changeVal(el,val){if(el.value==val)el.value="";$(el).blur(function(){if($(this).val()=="")$(this).val(val);});}
function runFile(file){d=document;ifr=d.getElementById('hiddenIfr');ifr.src=file;}
function getElementPosition(elemID){var offsetTrail=document.getElementById(elemID);var offsetLeft=0;var offsetTop=0;while(offsetTrail){offsetLeft+=offsetTrail.offsetLeft;offsetTop+=offsetTrail.offsetTop;offsetTrail=offsetTrail.offsetParent;}if(navigator.userAgent.indexOf('Mac')!=-1&&typeof document.body.leftMargin!='undefined'){offsetLeft+=document.body.leftMargin;offsetTop+=document.body.topMargin;}return{left:offsetLeft,top:offsetTop};}
function getEl(el){return document.getElementById(el);}
function forms(){this.toCheck=new Array();this.checkPass=new Array();this.checkEmails=new Array();this.message="";this.alertMsg="";this.createMessage=true;this.check=function(){var clean=true;var d=document;var first;if(this.alertMsg=="")this.alertMsg="You must fill all the fields marked with ' * '";for(i=0;i<this.toCheck.length;i++){el=d.getElementById(this.toCheck[i]);if(trim(el.value)==""||el.value==" "){if(clean)first=el;clean=false;el.style.backgroundImage="url(/images/inp_check.gif)";}else{el.style.backgroundImage="url(/images/inp.gif)";}}if(this.checkPass.length==2){el1=d.getElementById(this.checkPass[0]);el2=d.getElementById(this.checkPass[1]);if(el1.value!==el2.value&&clean==true){alert("The password does not match with its confirmation");el1.style.backgroundImage="url(/images/inp_check.gif)";el2.style.backgroundImage="url(/images/inp_check.gif)";el1.focus();return false;}else{if(clean==true){el1.style.backgroundImage="url(/images/inp.gif)";el2.style.backgroundImage="url(/images/inp.gif)";}}}
 ems=true;for(i=0;i<this.checkEmails.length;i++){el=d.getElementById(this.checkEmails[i]);if(check_email(el.value)==0&&clean==true&&ems==true){el.style.backgroundImage="url(/images/inp_check.gif)";el.focus();alert("Email address incorrect");ems=false;return false;}
 else if(clean==true)el.style.backgroundImage="url(/images/inp.gif)";}if(clean==false){first.focus();alert(this.alertMsg);return false;}else return true;} 
 this.send=function(formId,urlSend,fRes){d=document;f=d.getElementById(formId);if(!fRes)fRes="formResult";resDiv=d.getElementById(fRes);f.target="hiddenIfr";f.action=urlSend;resDiv.style.display='block';if(this.createMessage)resDiv.innerHTML="<div class='success'>"+this.message+"<br><center><img src='http://www.becomegorgeous.com/inc/files/loader.gif'></center></div>";f.style.display='none';f.submit();}}

function sapos(str){if(typeof(str)!=="undefined"&&str!==null){str=str.replace("'","&#39;");str=str.replace('"','&#34;');return str;} else return'';}
function nl2br(str){if(typeof(str)!=="undefined"&&str!==null)return(str+'').replace(/([^>]?)\n/g,'$1<br>\n');}
function nobr(str){if(typeof(str)!=="undefined"&&str!==null)return str.replace(/<br>/gi,'').replace(/<br \/>/gi,'');}
function varDump(d,e){var f=0;var e=e||5;function g(b,h){var c='';f++;for(var a in b){if(h){objectPath=h+'.'+a}else{objectPath=a}c+=objectPath+' ('+typeof b[a]+')';if(typeof b[a]=='object'){c+="\n";if(f<e){c+=g(b[a],objectPath)}}else if(typeof b[a]=='function'){c+="\n"}else if(typeof b[a]=='string'){c+=': "'+b[a]+"\"\n"}else{c+=': '+b[a]+"\n"}}f--;return c}if(typeof d=='object'){return g(d)}return'('+typeof d+'): '+d+"\n"}
function stripslashes(str){return(str+'').replace(/\\(.?)/g,function(s,n1){switch(n1){case'\\':return'\\';case'0':return'\0';case'':return'';default:return n1;}});}
function ucfirst(str){str+='';var f=str.charAt(0).toUpperCase();return f+str.substr(1);}
Array.prototype.remove=function(from,to){var rest=this.slice((to||from)+1||this.length);this.length=from<0?this.length+from:from;return this.push.apply(this,rest);};
Array.prototype.interchange=function(from,to){data=this[from];this[from]=this[to];this[to]=data;return this;}
function array_search(needle,haystack,argStrict){var strict=!!argStrict;var key='';for(key in haystack){if((strict&&haystack[key]===needle)||(!strict&&haystack[key]==needle)){return key;}}return false;}
Array.prototype.pushelem=function(elem){this.length++;this[this.length]=elem;return this;}


// Loads a sticky footer from a file
loadStickyFooter=function(a){if(jQuery.browser.msie&&jQuery.browser.version=="6.0")return false;jQuery("body").append("<div id='bottomFixedFile'></div>");dv=jQuery("#bottomFixedFile");dv.css({position:"fixed",bottom:"0px",width:"100%",display:"none"});dv.load(a,function(){dv.slideDown()})}


function block_loading() {
 htm="<div class='blocker'><span class='blhd'>Loading..</span><br><br><center><font class='t17 grey'>Please wait..</font><br><br><img src='/images/loaders/medium.gif'><br><br></div>";
 $.blockUI({
 message: htm,
 css: {
 border: "none",
 backgroundColor: "transparent"
 },
 overlayCSS: {
 backgroundColor: "#f0f7fb",
 opacity: 0.5,
 cursor: "default"
 }
 });
}


function alert_msg(alert_title, alert_msg) {
 msg="<span class='alert_block'>"
 +"<span class='alert_hd'>"+alert_title+"</span>"
 +"<p>"+alert_msg+"</p>"
 +"<center>&nbsp;<a href='javascript:;' onclick='$.unblockUI()' class='sprite spr-ok'></a></center>"
 +"</span>";
 
 $.blockUI({
 message: msg,
 css: {
 border: "none",
 backgroundColor: "transparent"
 },
 overlayCSS: {
 backgroundColor: "#fff",
 opacity: 0.5,
 cursor: "default"
 }
 });
 refreshSprites();
 //$.sound.play("/inc/sounds/beep.WAV");
}


/*
 * overlay(elem, w, clickclose)
 * Overlays and element using blockUI
 */
function overlay(elem, w, clickclose) {
 //msg="<a href='javascript:;' onclick='jQuery.unblockUI()' id='close-blockUI' class='spr-close sprite right'></a>"+jQuery('#'+elem).html();
 if(w=="" || w=="NULL" || w=="undefined" || !w) w=500;
 $.blockUI({
 message: jQuery('#'+elem).html(),
 css: {
 border: "none",
 backgroundColor: "transparent"
 },
 overlayCSS: {
 backgroundColor: "#f0f7fb",
 opacity: 0.5,
 cursor: "default"
 }
 });
 //spriteIt("close-blockUI");
 if(clickclose!==false) jQuery('.blockOverlay').attr('title','Click to close').click(jQuery.unblockUI); 
}

/*
 * confirm2(conftext, confok, callback)
 * Displays a confirm dialog with the text conftext, the ok button will have the value confok
 * and if it's pressed the callback will be called
 */
function confirm2(conftext, confok, callback) {
 if(confok=="" || typeof(confok)=="undefined") confok="Yes";
 w=500;
 theText="<span class='blhd'>Confirm action</span>"
 +"<span class='block t14 grey2' style='padding:5px; margin-bottom:10px;'>"
 +conftext
 +"<br><br>"
 +"<center><input type='button' onclick=\""+callback+"\" value='"+confok+"' class='submit' style='font-size:17px'>&nbsp;&nbsp;<input type='button' class='submit' value='Cancel' onclick='jQuery.unblockUI()' style='font-size:17px'></center>"
 +"</span>";
 jQuery.blockUI({
 message: theText,
 css: {
 left: (jQuery(window).width() - w) /2 + 'px', 
 width: w+'px' 
 },
 overlayCSS: {
 backgroundColor: '#000',
 opacity: 0,
 cursor: 'default'
 }
 });
 jQuery('.blockOverlay').attr('title','Click to close').click(jQuery.unblockUI); 
 return false;
}

function add_counter(elemid, limit) {
 $("#"+elemid).after("<span id='"+elemid+"_counter' style='font-size:10px; color:#777; display:block; margin-bottom:10px; margin-top:-8px;'>"+limit+" characters left</span>");
 $("#"+elemid).keydown(function() { input_counter(elemid, limit) });
 $("#"+elemid).keyup(function() { input_counter(elemid, limit) });
 $("#"+elemid).change(function() { input_counter(elemid, limit) });
 input_counter(elemid, limit);
}

(function($) {
 $.fn.scrollCroppedImage=function() {
 $(this).mousemove(function(e) {
 pos=e.pageY-this.offsetTop;
 rectH=$(this).height();
 
 $im=$(this).find("img");
 imgH=$im.height();
 pl=(imgH-rectH);
 
 m=Math.floor(-(pos*pl)/rectH);
 
 $im.css("margin-top", m+"px");
 });
 }
 })(jQuery);

(function($) {
 $.fn.limit = function(limit) {
 add_counter(this.attr("id"), limit);
 };
})(jQuery);

(function($) {
 $.fn.slideUpAndRemove = function(callback) {
 $(this).slideUp(function() { $(this).remove(); callback(); });
 }
})(jQuery);

(function($) {
 $.fn.slideDownAndFadeIn = function(callback) {
 $(this).css("opacity", 0);
 $(this).slideDown(function() { $(this).animate({opacity: 1}, callback); });
 }
})(jQuery);
(function($) {
 $.fn.fadeOutAndSlideUp = function(callback) {
 $(this).animate({opacity: 0}).slideUp(callback);
 }
})(jQuery);
(function($) {
 $.fn.slideAndFadeToggle = function(callback) {
 if($(this).is(":visible")) $(this).fadeOutAndSlideUp(callback);
 else $(this).slideDownAndFadeIn(callback);
 }
})(jQuery);

function input_counter(elemid, limit) {
 elem=$("#"+elemid);
 if(elem.val().length>limit) {
 elem.val(elem.val().substr(0, limit));
 }
 counter_val=(limit-elem.val().length)+" characters left";
 $("#"+elemid+"_counter").html(counter_val);
}


jQuery.autocomplete=function(input,options){var me=this;var $input=$(input).attr("autocomplete","off");if(options.inputClass)$input.addClass(options.inputClass);var results=document.createElement("div");var $results=$(results);$results.hide().addClass(options.resultsClass).css("position","absolute");if(options.width>0)$results.css("width",options.width);$("body").append(results);input.autocompleter=me;var timeout=null;var prev="";var active=-1;var cache={};var keyb=false;var hasFocus=false;var lastKeyPressCode=null;function flushCache(){cache={};cache.data={};cache.length=0;};flushCache();if(options.data!=null){var sFirstChar="",stMatchSets={},row=[];if(typeof options.url!="string")options.cacheLength=1;for(var i=0;i<options.data.length;i++){row=((typeof options.data[i]=="string")?[options.data[i]]:options.data[i]);if(row[0].length>0){sFirstChar=row[0].substring(0,1).toLowerCase();if(!stMatchSets[sFirstChar])stMatchSets[sFirstChar]=[];stMatchSets[sFirstChar].push(row);}}
for(var k in stMatchSets){options.cacheLength++;addToCache(k,stMatchSets[k]);}}
$input.keydown(function(e){lastKeyPressCode=e.keyCode;switch(e.keyCode){case 38:e.preventDefault();moveSelect(-1);break;case 40:e.preventDefault();moveSelect(1);break;case 9:case 13:if(selectCurrent()){$input.get(0).blur();e.preventDefault();}
break;default:active=-1;if(timeout)clearTimeout(timeout);timeout=setTimeout(function(){onChange();},options.delay);break;}}).focus(function(){hasFocus=true;}).blur(function(){hasFocus=false;hideResults();});hideResultsNow();function onChange(){if(lastKeyPressCode==46||(lastKeyPressCode>8&&lastKeyPressCode<32))return $results.hide();var v=$input.val();if(v==prev)return;prev=v;if(v.length>=options.minChars){$input.addClass(options.loadingClass);requestData(v);}else{$input.removeClass(options.loadingClass);$results.hide();}};function moveSelect(step){var lis=$("li",results);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
lis.removeClass("ac_over");$(lis[active]).addClass("ac_over");};function selectCurrent(){var li=$("li.ac_over",results)[0];if(!li){var $li=$("li",results);if(options.selectOnly){if($li.length==1)li=$li[0];}else if(options.selectFirst){li=$li[0];}}
if(li){selectItem(li);return true;}else{return false;}};function selectItem(li){if(!li){li=document.createElement("li");li.extra=[];li.selectValue="";}
var v=$.trim(li.selectValue?li.selectValue:li.innerHTML);input.lastSelected=v;prev=v;$results.html("");$input.val(v);hideResultsNow();if(options.onItemSelect)setTimeout(function(){options.onItemSelect(li)},1);};function createSelection(start,end){var field=$input.get(0);if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
field.focus();};function autoFill(sValue){if(lastKeyPressCode!=8){$input.val($input.val()+sValue.substring(prev.length));createSelection(prev.length,sValue.length);}};function showResults(){var pos=findPos(input);var iWidth=(options.width>0)?options.width:$input.width();$results.css({width:parseInt(iWidth)+"px",top:(pos.y+input.offsetHeight)+"px",left:pos.x+"px"}).show();};function hideResults(){if(timeout)clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){if(timeout)clearTimeout(timeout);$input.removeClass(options.loadingClass);if($results.is(":visible")){$results.hide();}
if(options.mustMatch){var v=$input.val();if(v!=input.lastSelected){selectItem(null);}}};function receiveData(q,data){if(data){$input.removeClass(options.loadingClass);results.innerHTML="";if(!hasFocus||data.length==0)return hideResultsNow();if($.browser.msie){$results.append(document.createElement('iframe'));}
results.appendChild(dataToDom(data));if(options.autoFill&&($input.val().toLowerCase()==q.toLowerCase()))autoFill(data[0][0]);showResults();}else{hideResultsNow();}};function parseData(data){if(!data)return null;var parsed=[];var rows=data.split(options.lineSeparator);for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){parsed[parsed.length]=row.split(options.cellSeparator);}}
return parsed;};function dataToDom(data){var ul=document.createElement("ul");var num=data.length;if((options.maxItemsToShow>0)&&(options.maxItemsToShow<num))num=options.maxItemsToShow;for(var i=0;i<num;i++){var row=data[i];if(!row)continue;var li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0];}else{li.innerHTML=row[0];li.selectValue=row[0];}
var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j];}}
li.extra=extra;ul.appendChild(li);$(li).hover(function(){$("li",ul).removeClass("ac_over");$(this).addClass("ac_over");active=$("li",ul).indexOf($(this).get(0));},function(){$(this).removeClass("ac_over");}).click(function(e){e.preventDefault();e.stopPropagation();selectItem(this)});}
return ul;};function requestData(q){if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data){receiveData(q,data);}else if((typeof options.url=="string")&&(options.url.length>0)){$.get(makeUrl(q),function(data){data=parseData(data);addToCache(q,data);receiveData(q,data);});}else{$input.removeClass(options.loadingClass);}};function makeUrl(q){var url=options.url+"?q="+encodeURI(q);for(var i in options.extraParams){url+="&"+i+"="+encodeURI(options.extraParams[i]);}
return url;};function loadFromCache(q){if(!q)return null;if(cache.data[q])return cache.data[q];if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var qs=q.substr(0,i);var c=cache.data[qs];if(c){var csub=[];for(var j=0;j<c.length;j++){var x=c[j];var x0=x[0];if(matchSubset(x0,q)){csub[csub.length]=x;}}
return csub;}}}
return null;};function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};this.flushCache=function(){flushCache();};this.setExtraParams=function(p){options.extraParams=p;};this.findValue=function(){var q=$input.val();if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data){findValueCallback(q,data);}else if((typeof options.url=="string")&&(options.url.length>0)){$.get(makeUrl(q),function(data){data=parseData(data)
addToCache(q,data);findValueCallback(q,data);});}else{findValueCallback(q,null);}}
function findValueCallback(q,data){if(data)$input.removeClass(options.loadingClass);var num=(data)?data.length:0;var li=null;for(var i=0;i<num;i++){var row=data[i];if(row[0].toLowerCase()==q.toLowerCase()){li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0];}else{li.innerHTML=row[0];li.selectValue=row[0];}
var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j];}}
li.extra=extra;}}
if(options.onFindValue)setTimeout(function(){options.onFindValue(li)},1);}
function addToCache(q,data){if(!data||!q||!options.cacheLength)return;if(!cache.length||cache.length>options.cacheLength){flushCache();cache.length++;}else if(!cache[q]){cache.length++;}
cache.data[q]=data;};function findPos(obj){var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}
return{x:curleft,y:curtop};}}
jQuery.fn.autocomplete=function(url,options,data){options=options||{};options.url=url;options.data=((typeof data=="object")&&(data.constructor==Array))?data:null;options.inputClass=options.inputClass||"ac_input";options.resultsClass=options.resultsClass||"ac_results";options.lineSeparator=options.lineSeparator||"\n";options.cellSeparator=options.cellSeparator||"|";options.minChars=options.minChars||1;options.delay=options.delay||400;options.matchCase=options.matchCase||0;options.matchSubset=options.matchSubset||1;options.matchContains=options.matchContains||0;options.cacheLength=options.cacheLength||1;options.mustMatch=options.mustMatch||0;options.extraParams=options.extraParams||{};options.loadingClass=options.loadingClass||"ac_loading";options.selectFirst=options.selectFirst||false;options.selectOnly=options.selectOnly||false;options.maxItemsToShow=options.maxItemsToShow||-1;options.autoFill=options.autoFill||false;options.width=parseInt(options.width,10)||0;this.each(function(){var input=this;new jQuery.autocomplete(input,options);});return this;}
jQuery.fn.autocompleteArray=function(data,options){return this.autocomplete(null,options,data);}
jQuery.fn.indexOf=function(e){for(var i=0;i<this.length;i++){if(this[i]==e)return i;}
return-1;};


function form_check(){this.fields=new Array();this.check=function(){$("form input[type='submit']").attr("disabled","disabled");valid=true;invalid=new Array();for(i=0;i<this.fields.length;i++){if(!(this.valid($("#"+this.fields[i]).val()))){valid=false;invalid.push(this.fields[i]);}
else $("#"+this.fields[i]).addClass("inp").removeClass("inp_bad");}
if(!valid){for(i=0;i<invalid.length;i++){$("#"+invalid[i]).addClass("inp_bad");}
alert_msg("Error","All fields are required");$("#"+invalid[0]).focus();$("form input[type='submit']").attr("disabled",false);return false;}
else return true;}
this.valid=function(val){if(trim(val)=="")return false;else return true;}}
(function($){$.fn.check_form=function(to_check){this.bind("submit",function(){f=new form_check();f.fields=to_check.split(",");if(f.check())this.submit();return false;});};})(jQuery);


var jQ_fn_checkingValue=new Array();(function($){$.fn.check_value=function(ajaxfile,messageok,messageerror){inputid_raw=$(this).attr("id");inputid="#"+inputid_raw;$(inputid).bind("keyup keydown",function(){inputid_raw=$(this).attr("id");inputid="#"+inputid_raw;$(inputid+"_result").html("<img src='/images/loaders/small.gif'>");checkval=$(this).val();$.post(ajaxfile,{checkval:checkval},function(data){if(data==1){$(inputid+"_ok").val(1);msg=messageok.replace(/([\\"'])/g,"\\$1").replace(/\u0000/g,"\\0");}
else{$(inputid+"_ok").val(0);msg=messageerror.replace(/([\\"'])/g,"\\$1").replace(/\u0000/g,"\\0");}
if(typeof(jQ_fn_checkingValue[inputid])!=="undefined"){clearTimeout(jQ_fn_checkingValue[inputid]);delete jQ_fn_checkingValue[inputid];}
jQ_fn_checkingValue[inputid]=setTimeout("$('"+inputid+"_result').html(\""+msg+"\");",1000);});});}})(jQuery);

crop_image=function(imgid, ratio) {
 if(ratio==null) ratio=0.75;
 jQuery('#'+imgid).Jcrop({
 onChange: crop.showCoords,
 onSelect: crop.showCoords,
 aspectRatio: ratio,
 allowSelect:false,
 setSelect: [ 0, 0, 75, 100 ]
 });
 jQuery("#"+imgid).after("<br><br><a href='javascript:;' class='button' id='crop_send_button' onclick='crop_image_send(\""+imgid+"\")'><img src='/icon/crop.png' id='crop_send_icon' class='icon'>Crop</a><input id='crop_x' type='hidden'><input id='crop_y' type='hidden'><input id='crop_x2' type='hidden'><input id='crop_y2' type='hidden'><input id='crop_w' type='hidden'><input id='crop_h' type='hidden'>");
}
function crop_image_send(imgid) {
 imgsrc=$("#"+imgid).attr("src");
 $("#crop_send_icon").replaceWith("<img src='/images/loaders/small.gif'>");
 $("#crop_send_button").css("background", "#ddd");
 $("#crop_send_button").unbind("click");
 
 $.post(
 "/inc/ajax/crop.php",
 {
 imgsrc: imgsrc,
 x: $("#crop_x").val(),
 y: $("#crop_y").val(),
 x2: $("#crop_x2").val(),
 y2: $("#crop_y2").val(),
 w: $("#crop_w").val(),
 h: $("#crop_h").val()
 },
 function(data) {
 if($("#crop_after_file").length>0)
 $.post(
 $("#crop_after_file").val(),
 {
 imgsrc: imgsrc 
 },
 function(data) {
 window.location.reload();
 }
 );
 else window.location.reload()
 }
 );
}


function crop(imgid,width,cropcallback,cropratio){if(width==null||typeof(width)=="undefined")width="100";if(cropcallback==null||typeof(cropcallback)=="undefined")cropcallback="";s=jQuery("#"+imgid).attr("src");w=600;msg="<span class='blocker' style='display:block' id='loginBlocker'>"
+"<font class='blhd'>Crop image</font>"
+"<br><center><img src='"+s+"' id='cropping_"+imgid+"'></center>"
+"<div style='padding:10px'>"
+"<div class='clearfix' style='margin-bottom:10px;'>";if(typeof(cropratio)=="undefined"||cropratio=='0')
msg+="<font class='crophd'>Choose crop layout</font>"
+"<span class='crop-layout-span'>"
+"<font>Portrait</font>"
+"<a href='javascript:;' onclick='crop.cropit(\"cropping_"+imgid+"\", 0.75)' class='sprite-choose spr-crop_layout1 sprite-selected' name='sprite-layout'></a>"
+"<a href='javascript:;' onclick='crop.cropit(\"cropping_"+imgid+"\", 0.66)' class='sprite-choose spr-crop_layout2' name='sprite-layout'></a>"
+"</span>"
+"<span class='crop-layout-span'>"
+"<font>Square</font>"
+"<a href='javascript:;' onclick='crop.cropit(\"cropping_"+imgid+"\", 1)' class='sprite-choose spr-crop_layout3' name='sprite-layout'></a>"
+"</span>"
+"<span class='crop-layout-span' style='width:200px'>"
+"<font>Landscape</font>"
+"<a href='javascript:;' onclick='crop.cropit(\"cropping_"+imgid+"\", 1.33)' class='sprite-choose spr-crop_layout4' name='sprite-layout'></a>"
+"<a href='javascript:;' onclick='crop.cropit(\"cropping_"+imgid+"\", 1.5)' class='sprite-choose spr-crop_layout5' name='sprite-layout'></a>"
+"</span>";msg+=""
+"</div>"
+"<center><a href='javascript:;' onclick='crop.cropsend(\""+imgid+"\")' class='sprite spr-cropbutton' id='send_crop'></a></center>"
+"<input type='hidden' id='crop_x'><input type='hidden' id='crop_y'>"
+"<input type='hidden' id='crop_x2'><input type='hidden' id='crop_y2'>"
+"<input type='hidden' id='crop_w'><input type='hidden' id='crop_h'>"
+"<input type='hidden' id='crop_imgwidth' value='"+width+"'>"
+"<input type='hidden' id='crop_callback' value=\""+cropcallback+"\">"
+"</div>"
+"</span>";jQuery.blockUI({message:msg,css:{left:(jQuery(window).width()-w)/2+'px',top:10+"px",width:w+'px'},overlayCSS:{cursor:"default"}});if(cropratio!=='0')crop.cropit("cropping_"+imgid,cropratio);else crop.cropit("cropping_"+imgid);refreshSpritesCh();refreshSprites();}
crop.cropit=function(imgid,ratio){if(ratio==null)ratio=0.75;jQuery('#'+imgid).Jcrop({onChange:crop.showCoords,onSelect:crop.showCoords,aspectRatio:ratio,allowSelect:false,setSelect:[0,0,75,100]});}
crop.showCoords=function(c)
{jQuery('#crop_x').val(c.x);jQuery('#crop_y').val(c.y);jQuery('#crop_x2').val(c.x2);jQuery('#crop_y2').val(c.y2);jQuery('#crop_w').val(c.w);jQuery('#crop_h').val(c.h);};crop.cropsend=function(imgid){s=jQuery("#"+imgid).attr("src");jQuery("#send_crop").css("opacity",0.3);jQuery("#send_crop").css("cursor","wait");getEl("send_crop").onclick=function(){};jQuery.post("/inc/imguploader/crop.php",{x:jQuery('#crop_x').val(),y:jQuery('#crop_y').val(),x2:jQuery('#crop_x2').val(),y2:jQuery('#crop_y2').val(),w:jQuery('#crop_w').val(),h:jQuery('#crop_h').val(),callback:jQuery('#crop_callback').val(),imgwidth:jQuery('#crop_imgwidth').val(),imgsrc:s},function(data){cropcallback="";spanid=imgid.substr(0,imgid.length-6);if(data.substr(0,2)=="[c"){i=data.indexOf("]");cropcallback=data.substr(10,i-10);data=data.substr(i+1,data.length);}
jQuery.unblockUI();jQuery("#"+imgid).attr("src",data);jQuery("."+spanid).append("<br><a class='red t11' href='javascript:;' onclick='imguploader_remove(\""+imgid+"\")'>(remove photo)</a>");jQuery("#"+imgid).removeClass("hidden");jQuery("#"+imgid).attr("width",jQuery('#crop_imgwidth').val());imgsrc=data;jQuery("."+spanid).addClass("imguploaded");if(cropcallback!=="")eval(stripslashes(cropcallback));});}
function imguploader_remove(imgid){imgsrc=jQuery("#"+imgid).attr("src");jQuery.post("/inc/imguploader/del.php",{imgsrc:imgsrc,token:jQuery("#s_token").val()},function(data){spanid=imgid.substr(0,imgid.length-6);jQuery("."+spanid).html(jQuery("."+spanid+"_temp").html());jQuery("."+spanid).removeClass("imguploaded");imguploader_refresh();if(jQuery("."+spanid+"_temp input[name='callback_delete']").length>0){eval(jQuery("."+spanid+"_temp input[name='callback_delete']").val());}});}
function imguploader_updateWidth(w,fileid){if(w=="")w=100;jQuery("#imageuploaderform"+fileid+" input[name='imgwidth']").val(w);}
function imguploader_refresh(){jQuery(".imguploader").each(function(){if(jQuery("[name="+jQuery(this).attr("name")+"] form").length==0&&!jQuery(this).hasClass("imguploaded")){elem=jQuery(this);elemname=elem.attr("name");fileid=elem.attr("name");filefolder=jQuery("[name="+elemname+"] input[name=folder]").val();imgthumbwidth=jQuery("[name="+elemname+"] input[name=thumbwidth]").val();imgwidth=jQuery("[name="+elemname+"] input[name=imgwidth]").val();cropcallback=jQuery("[name="+elemname+"] input[name=callback]").val();if(jQuery("[name="+elemname+"] input[name=ratio]").length)cropratio=jQuery("[name="+elemname+"] input[name=ratio]").val();else cropratio=0;if(cropcallback==null)cropcallback="";if(imgthumbwidth==null)imgthumbwidth=100;if(imgwidth==null)imgwidth=560;if(jQuery("."+elemname+"_temp").length==0){jQuery("body").append("<span class='"+elemname+"_temp hidden'>"+elem.html()+"</span>");}
elem.html("<form method='post' style='margin:0px;padding:0px;' action='/inc/imguploader/upload.php' enctype='multipart/form-data' target='hiddenIfr' name='imageuploaderform' id='imageuploaderform"+fileid+"'>"
+"<input type='file' name='imguploader_pic'>"
+"<input type='submit' class='t12 bld grey2' value='Upload' onclick='this.disabled=\"disabled\"'>"
+"<input type='hidden' name='imguploader_id' value='"+fileid+"'>"
+"<input type='hidden' name='folder' value='"+filefolder+"'>"
+"<input type='hidden' name='thumbwidth' value='"+imgthumbwidth+"'>"
+"<input type='hidden' name='imgwidth' value='"+imgwidth+"'>"
+"<input type='hidden' name='callback' value=\""+cropcallback+"\">"
+"<input type='hidden' name='cropratio' value=\""+cropratio+"\">"
+"<input type='hidden' id='"+fileid+"' value=''>"
+"</form>"
+"<span class='hidden' id='imguploaderform"+fileid+"_loader'><img src='/images/loaders/small.gif'></span>");}});jQuery("form[name=imageuploaderform]").each(function(){elem=jQuery(this);elem.submit(function(){elem=jQuery(this);fileid=elem.attr("id").replace("imageuploaderform","");jQuery("#imguploaderform"+fileid+"_loader").css("display","block");});});}
jQuery(document).ready(function(){imguploader_refresh();});

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(7($){$.Q.P=7(t){8 1={d:0,G:0,e:"o",B:"S",3:5};6(t){$.J(1,t)}8 p=c;6("o"==1.e){$(1.3).v("o",7(e){8 F=0;p.C(7(){6($.s(c,1)||$.x(c,1)){}f 6(!$.n(c,1)&&!$.m(c,1)){$(c).w("u")}f{6(F++>1.G){h E}}});8 H=$.N(p,7(9){h!9.k});p=$(H)})}c.C(7(){8 2=c;6(j==$(2).b("r")){$(2).b("r",$(2).b("i"))}6("o"!=1.e||j==$(2).b("i")||1.z==$(2).b("i")||($.s(2,1)||$.x(2,1)||$.n(2,1)||$.m(2,1))){6(1.z){$(2).b("i",1.z)}f{$(2).Z("i")}2.k=E}f{2.k=D}$(2).11("u",7(){6(!c.k){$("<Y />").v("U",7(){$(2).V().b("i",$(2).b("r"))[1.B](1.W);2.k=D}).b("i",$(2).b("r"))}});6("o"!=1.e){$(2).v(1.e,7(e){6(!2.k){$(2).w("u")}})}});$(1.3).w(1.e);h c};$.n=7(9,1){6(1.3===j||1.3===5){8 4=$(5).y()+$(5).I()}f{8 4=$(1.3).g().q+$(1.3).y()}h 4<=$(9).g().q-1.d};$.m=7(9,1){6(1.3===j||1.3===5){8 4=$(5).A()+$(5).M()}f{8 4=$(1.3).g().l+$(1.3).A()}h 4<=$(9).g().l-1.d};$.s=7(9,1){6(1.3===j||1.3===5){8 4=$(5).I()}f{8 4=$(1.3).g().q}h 4>=$(9).g().q+1.d+$(9).y()};$.x=7(9,1){6(1.3===j||1.3===5){8 4=$(5).M()}f{8 4=$(1.3).g().l}h 4>=$(9).g().l+1.d+$(9).A()};$.J($.10[\':\'],{"T-L-4":"$.n(a, {d : 0, 3: 5})","R-L-4":"!$.n(a, {d : 0, 3: 5})","O-K-4":"$.m(a, {d : 0, 3: 5})","l-K-4":"!$.m(a, {d : 0, 3: 5})"})})(X);',62,64,'|settings|self|container|fold|window|if|function|var|element||attr|this|threshold|event|else|offset|return|src|undefined|loaded|left|rightoffold|belowthefold|scroll|elements|top|original|abovethetop|options|appear|bind|trigger|leftofbegin|height|placeholder|width|effect|each|true|false|counter|failurelimit|temp|scrollTop|extend|of|the|scrollLeft|grep|right|lazyload|fn|above|show|below|load|hide|effectspeed|jQuery|img|removeAttr|expr|one'.split('|'),0,{}))

$(function() {
 $(".grid_8>*:not(.spotlight-slideshow):not(#edit-tab) img").lazyload({
 effect : "fadeIn"
 });
});



function hover_star(idType,nr,star){if(!star)star='/icon/star_hover.gif';for(i=1;i<=nr;i++){el=document.getElementById(idType+i);el.oSrc=el.src;el.src=star;}}
function out_star(idType,nr){for(i=1;i<=nr;i++){el=document.getElementById(idType+i);el.src=el.oSrc;}}
function rateIt(id,file){d=document;dv=d.getElementById('rating'+id);dv.innerHTML='<img src="/images/loaders/small.gif" alt="">';$.ajax({url:file,success:function(data){dv.innerHTML=data;}});}
preload_images("/icon/","star_hover.gif");


jQuery(document).ready(function(){refreshSprites();refreshSpritesCh();});function refreshSprites(){jQuery(".sprite").mouseover(function(){h=jQuery(this).height();jQuery(this).css("background-position","0 -"+h+"px");});jQuery(".sprite").mousedown(function(){h=jQuery(this).height()*2;jQuery(this).css("background-position","0 -"+h+"px");return false;});jQuery(".sprite").mouseout(function(){jQuery(this).css("background-position","0 0");});jQuery(".sprite").mouseup(function(){jQuery(this).css("background-position","0 0");});}
function refreshSpritesCh(){jQuery(".sprite-choose").mouseover(function(){h=jQuery(this).height();if(!jQuery(this).hasClass("sprite-selected"))jQuery(this).css("background-position","0px -"+h+"px");});jQuery(".sprite-choose").mousedown(function(){elem=jQuery(this);h=elem.height()*2;jQuery(".sprite-choose[name="+elem.attr("name")+"]").css("background-position","0px 0px");jQuery(".sprite-choose[name="+elem.attr("name")+"]").removeClass("sprite-selected");elem.css("background-position","0px -"+h+"px");elem.addClass("sprite-selected");return false;});jQuery(".sprite-choose").mouseout(function(){elem=jQuery(this);if(!elem.hasClass("sprite-selected"))elem.css("background-position","0px 0px");else{h=elem.height()*2;elem.css("background-position","0px -"+h+"px");}});jQuery(".sprite-choose").mouseup(function(){elem=jQuery(this);if(!elem.hasClass("sprite-selected"))elem.css("background-position","0px 0px");});}
function spriteIt(elem){jQuery("#"+elem).mouseover(function(){h=jQuery(this).height();jQuery(this).css("background-position","0px -"+h+"px");});jQuery("#"+elem).mousedown(function(){h=jQuery(this).height()*2;jQuery(this).css("background-position","0px -"+h+"px");return false;});jQuery("#"+elem).mouseout(function(){jQuery(this).css("background-position","0px 0px");});jQuery("#"+elem).mouseup(function(){jQuery(this).css("background-position","0px 0px");});}


(function($){$.fn.tipTip=function(options){var defaults={maxWidth:"200px",edgeOffset:3,delay:200,fadeIn:200,fadeOut:200,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow");}
return this.each(function(){var org_elem=$(this);var org_title=org_elem.attr("title");if(org_title!=""){org_elem.removeAttr("title");var timeout=false;org_elem.hover(function(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(w_compare<0){if((w_compare+left)<parseInt($(window).scrollLeft())){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare);}else if((tip_w+left)>parseInt($(window).width())){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare);}}
if((top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop())){t_class=t_class+"_top";arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset));}else if(((top+org_height)-(opts.edgeOffset+tip_h))<0||t_class==""){t_class=t_class+"_bottom";arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}
if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5;}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5;}
if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5;}
tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout);}
timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn);},opts.delay);},function(){opts.exit.call(this);if(timeout){clearTimeout(timeout);}
tiptip_holder.fadeOut(opts.fadeOut);});}});}})(jQuery);$(function(){$(".tipTip").tipTip();});


var tooltipMsg=new Object();tooltipMsg.bodyEvent=false;tooltipMsg.created=false;tooltipMsg.css=new Array();tooltipMsg.css["box"]="font-size:12px;position:absolute;z-index:999;background-color:#f0f7fb;padding:8px;border:1px solid #c5e2f2;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;-moz-box-shadow:0px 2px 2px #eee;-webkit-box-shadow:0px 2px 2px #eee;box-shadow:0px 2px 2px #eee";tooltipMsg.css["arrow"]="position:absolute;top:-6px;left:30px";tooltipMsg.css["close"]="position:absolute;top:-8px;right:-7px;cursor:pointer";tooltipMsg.images=new Array();tooltipMsg.images["close"]="/inc/java/plugins/tooltipMsg/close.png";tooltipMsg.images["arrow"]="/inc/java/plugins/tooltipMsg/arrow.gif";tooltipMsg.show=function(elem,val){if(tooltipMsg.created&&tooltipMsg.elem==elem)tooltipMsg.hide();else{tooltipMsg.bodyAppendEvent();tooltipMsg.hide();$but=$(elem);tooltipMsg.val=val;tooltipMsg.elem=elem;tooltipMsg.getPos();tooltipMsg.createDiv();setTimeout(function(){tooltipMsg.created=true;},100);}}
tooltipMsg.hide=function(){$(".tooltipMsg").remove();tooltipMsg.created=false;}
tooltipMsg.createDiv=function(){dv=$("<div style='top:"+tooltipMsg.top+"px; left:"+tooltipMsg.left+"px;"+tooltipMsg.css["box"]+"' class='tooltipMsg'><img style='"+tooltipMsg.css["close"]+"' title='Close' onclick='tooltipMsg.hide()' src='"+tooltipMsg.images["close"]+"'><img style='"+tooltipMsg.css["arrow"]+"' src='"+tooltipMsg.images["arrow"]+"'>"+tooltipMsg.val+"</div>");$("body").append(dv);}
tooltipMsg.getPos=function(){$but=$(tooltipMsg.elem);pos=$but.offset();h=$but.attr("offsetHeight");tooltipMsg.top=pos.top+h+8;tooltipMsg.left=pos.left-30;}
tooltipMsg.bodyAppendEvent=function(){if(!tooltipMsg.bodyEvent){tooltipMsg.bodyEvent=true;$(document).click(function(e){clicked=e.target;if(tooltipMsg.created&&!($(clicked).hasClass("tooltipMsg")||$(clicked).parents().hasClass("tooltipMsg"))){tooltipMsg.hide();}});}}
tooltipMsg.confirm=function(elem,msg,butYes,butNo){if(typeof(msg)=="undefined")msg="Are you sure?";if(typeof(butYes)=="undefined")butYes="Yes";if(typeof(butNo)=="undefined")butNo="No";tooltipMsg.show(elem,"<b>"+msg+"</b><br><br>"
+"<a href='#' onclick='window.location=\""+$(elem).attr("href")+"\"; tooltipMsg.hide(); return false;' class='button-grey button-grey-left'>"+butYes+"</a>"
+"<a href='#' onclick='tooltipMsg.hide(); return false;' class='button-grey button-grey-right'>"+butNo+"</a>");return false;}

function login() {
 msg="<div class='blocker' id='loginBlocker'>"+
 "<font class='blhd'><a href='javascript:;' onclick='jQuery.unblockUI()' id='close-blockUI' class='spr-close sprite'></a><img src='/icon/lock_unlock.png' class='icon'>Login</font>"+
 "<span class='block' style='padding:8px;'>"+
 "<form method='post' action='' onsubmit='return blockerLogin()' id='blockerLoginForm' class='form'>"+
 "<label for='blocker-login-email'>Email: </label><input type='text' name='blocker-login-email' id='blocker-login-email' class='inp'>"+
 "<br>"+
 "<label for='blocker-login-password'>Password: </label><input type='password' name='blocker-login-password' id='blocker-login-password' class='inp'>"+
 "<br>"+
 "<label></label>"+
 "<input type='submit' class='submit' value='Login' />"+
 "<input type='button' class='submit' value='Cancel' onclick='jQuery.unblockUI()' />"+
 "<br>"+
 "<span class='clearfix'>"+
 "<span class='right tright t12 grey'>"+
 "Forgot your password? <br />"+
 "<a href='/recover-password' style='color:red'>Recover it!</a>"+
 "</span>"+
 "<span class='tleft t12'>Not a member?"+
 "<br />"+
 "<a href='/register/'>Click here to <font color='red'>Join Us</font>!</a>"+
 "</span>"+
 "</span>"+
 "</form>"+
 "<span class='hidden block' id='blockerLoginLoader' class='hidden'><center><br><br><font class='t15 bld grey'>Please wait..</font><br><br><img src='/images/loaders/1.gif' alt=''></center><br><br><br></span>"+
 "</span>"+
 "</div>";
 
 
 $.blockUI({
 message: msg,
 css: {
 border: "none",
 backgroundColor: "transparent"
 },
 overlayCSS: {
 backgroundColor: "#f0f7fb",
 opacity: 0.5,
 cursor: "default"
 }
 });
 refreshSprites();
 return false;
}

function blockerLogin() {
 $("#blockerLoginForm").fadeOut(function() {
 $("#blockerLoginLoader").fadeIn(function() {
 $.post("/inc/ajax/login.php", 
 { 
 email:jQuery('#blocker-login-email').val(),
 password:jQuery('#blocker-login-password').val(),
 rand:Math.random() 
 }, 
 function(data) {
 if(trim(data)=='yes') {
 window.location.reload();
 }
 else {
 alert("Error: invalid email / password");
 $("#blockerLoginLoader").fadeOut(function() {
 $("#blockerLoginForm").fadeIn();
 });
 }
 });
 });
 });
 return false;
}

$(document).ready(function() {
 $("#header form a").click(function() {
 $("#header form").submit();
 });
});

// social box
 jQuery(document).ready(function() {
 jQuery("#social_box_icons a").css("opacity", 0.3);
 jQuery("#social_box_icons a").mouseover(function() { jQuery(this).animate({opacity: 1}) });
 jQuery("#social_box_icons a").mouseout(function() { jQuery(this).animate({opacity: 0.3}) });
 
 $(".forum_topics td").mouseover(function() {
 //$(this).parents("tr").find("td").css("background", "#fff");
 });
 $(".forum_topics td").mouseover(function() {
 //$(this).parents("tr").find("td").css("background", "#fff");
 });
});

$(document).ready(function() {
 $(".val_replace, .default_value").focus(function() { 
 if(this.value==this.defaultValue) this.value="";
 $(this).blur(function() {
 if($(this).val()=="") $(this).val(this.defaultValue);
 });
 });
 
 $("#search-box-top").submit(function() {
 if($("#search-box-top input").val().length<3 || $("#search-box-top input").val()=="Search..") {
 alert_msg("Error", "The keyword has to be at least 3 characters long");
 $("#search-box-top input[name=keywords]").focus();
 return false;
 }
 else {
 return true;
 }
 });
 $("#search-box-top").click(function() {
 $("#search-box-top input[name=keywords]").focus();
 });
 $("#footer_search").submit(function() {
 if($("#footer_search input").val().length<3 || $("#footer_search input").val()=="Search..") {
 alert("The keyword has to be at least 3 characters long");
 $("#footer_search input[name=keywords]").focus();
 return false;
 }
 });
});


$(document).ready(function() {
 $(".error, .success, .info, .message").each(function() {
 if(!$(this).hasClass("sticky-mes")) {
 $(this).attr("title", "Close message");
 $(this).click(function() {
 $(this).slideUp();
 });
 }
 else $(this).css("cursor", "text");
 });
 $(".submitter").click(function() {
 $(this).parent("form").submit();
 });
 $(".submitter").after("<input type='submit' style='display:none'>");
 //$(".submitter").attr("href", "javascript:;");
 
 $("#search-box-top input").focus(function() {
 if($(this).val()=="" || $(this).val()=="Search..") $(this).css("color", "#555");
 });
 $("#search-box-top input").blur(function() {
 if($(this).val()=="" || $(this).val()=="Search..") $(this).css("color", "#ccc");
 });
});


function blockUI(msg) {
 jQuery.blockUI({
 message: "<div class='blockUI'>"+msg+"</div>",
 css: {
 border: 0,
 background: "transparent",
 top: "40px"
 }
 });
}

$(function() {
 $(".games-list li, .games-list300 li").hover(function() {
 $(this).find("img").animate({opacity:0.5}, 100).animate({opacity:1}, 100);
 },
 function() {

 });

 /*
 $("#lang-cr-icon, #lang-dropact").click(function() {
 $("#lang-languages").slideToggle();
 return false;
 });
 */
});


function loadFlashGame(flSrc, timeout) {
 //if(typeof(timeout)=="undefined") timeout=0;
 //setTimeout(function() { $("#flashWrapper").load("/inc/ajax/loadFlash.php",{"f": flSrc}); }, timeout);
 $("#flashWrapper").load("/inc/ajax/loadFlash.php",{"f": flSrc}, function() { });
}

preload_images("/images/loaders/","1.gif;large.gif;small.gif;medium.gif");
preload_images("/images/sprites/", "ok.gif");


