(function(){var I=window.jQuery,J=window.$,c=window.jQuery=window.$=function(a,b){return new c.fn.init(a,b)},K=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,D=/^.[^:#\[\.]*$/,p;c.fn=c.prototype={init:function(a,b){a=a||document;if(a.nodeType){this[0]=a;this.length=1;return this}if(typeof a=="string"){var d=K.exec(a);if(d&&(d[1]||!b))if(d[1])a=c.clean([d[1]],b);else{if(b=document.getElementById(d[3])){if(b.id!=d[3])return c().find(a);return c(b)}a=[]}else return c(b).find(a)}else if(c.isFunction(a))return c(document)[c.fn.ready?
"ready":"load"](a);return this.setArray(c.makeArray(a))},jquery:"1.2.6",size:function(){return this.length},length:0,get:function(a){return a==p?c.makeArray(this):this[a]},pushStack:function(a){a=c(a);a.prevObject=this;return a},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},index:function(a){return c.inArray(a&&a.jquery?a[0]:a,this)},attr:function(a,b,d){var e=a;if(a.constructor==String)if(b===p)return this[0]&&c[d||
"attr"](this[0],a);else{e={};e[a]=b}return this.each(function(g){for(a in e)c.attr(d?this.style:this,a,c.prop(this,e[a],d,g,a))})},css:function(a,b){if((a=="width"||a=="height")&&parseFloat(b)<0)b=p;return this.attr(a,b,"curCSS")},text:function(a){if(typeof a!="object"&&a!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a));var b="";c.each(a||this,function(){c.each(this.childNodes,function(){if(this.nodeType!=8)b+=this.nodeType!=1?this.nodeValue:c.fn.text([this])})});
return b},wrapAll:function(a){this[0]&&c(a,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){for(var b=this;b.firstChild;)b=b.firstChild;return b}).append(this);return this},wrapInner:function(a){return this.each(function(){c(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,false,function(a){this.nodeType==1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,
true,true,function(a){this.nodeType==1&&this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,false,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,true,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||c([])},find:function(a){var b=c.map(this,function(d){return c.find(a,d)});return this.pushStack(/[^+>] [^+>]/.test(a)||a.indexOf("..")>-1?c.unique(b):
b)},clone:function(a){var b=this.map(function(){if(c.browser.msie&&!c.isXMLDoc(this)){var e=this.cloneNode(true),g=document.createElement("div");g.appendChild(e);return c.clean([g.innerHTML])[0]}else return this.cloneNode(true)}),d=b.find("*").andSelf().each(function(){if(this[r]!=p)this[r]=null});a===true&&this.find("*").andSelf().each(function(e){if(this.nodeType!=3){var g=c.data(this,"events");for(var f in g)for(var h in g[f])c.event.add(d[e],f,g[f][h],g[f][h].data)}});return b},filter:function(a){return this.pushStack(c.isFunction(a)&&
c.grep(this,function(b,d){return a.call(b,d)})||c.multiFilter(a,this))},not:function(a){if(a.constructor==String)if(D.test(a))return this.pushStack(c.multiFilter(a,this,true));else a=c.multiFilter(a,this);var b=a.length&&a[a.length-1]!==p&&!a.nodeType;return this.filter(function(){return b?c.inArray(this,a)<0:this!=a})},add:function(a){return this.pushStack(c.unique(c.merge(this.get(),typeof a=="string"?c(a):c.makeArray(a))))},is:function(a){return!!a&&c.multiFilter(a,this).length>0},hasClass:function(a){return this.is("."+
a)},val:function(a){if(a==p){if(this.length){var b=this[0];if(c.nodeName(b,"select")){var d=b.selectedIndex,e=[],g=b.options;b=b.type=="select-one";if(d<0)return null;var f=b?d:0;for(d=b?d+1:g.length;f<d;f++){var h=g[f];if(h.selected){a=c.browser.msie&&!h.attributes.value.specified?h.text:h.value;if(b)return a;e.push(a)}}return e}else return(this[0].value||"").replace(/\r/g,"")}}else{if(a.constructor==Number)a+="";return this.each(function(){if(this.nodeType==1)if(a.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=
c.inArray(this.value,a)>=0||c.inArray(this.name,a)>=0;else if(c.nodeName(this,"select")){var i=c.makeArray(a);c("option",this).each(function(){this.selected=c.inArray(this.value,i)>=0||c.inArray(this.text,i)>=0});if(!i.length)this.selectedIndex=-1}else this.value=a})}},html:function(a){return a==p?this[0]?this[0].innerHTML:null:this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,
arguments))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},andSelf:function(){return this.add(this.prevObject)},data:function(a,b){var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===p){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===p&&this.length)e=c.data(this[0],a);return e===p&&d[1]?this.data(d[0]):e}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
a)})},domManip:function(a,b,d,e){var g=this.length>1,f;return this.each(function(){if(!f){f=c.clean(a,this.ownerDocument);d&&f.reverse()}var h=this;if(b&&c.nodeName(this,"table")&&c.nodeName(f[0],"tr"))h=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var i=c([]);c.each(f,function(){var j=g?c(this).clone(true)[0]:this;if(c.nodeName(j,"script"))i=i.add(j);else{if(j.nodeType==1)i=i.add(c("script",j).remove());e.call(h,j)}});i.each(L)})}};c.fn.init.prototype=
c.fn;function L(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function u(){return+new Date}c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,e=false,g;if(a.constructor==Boolean){e=a;a=arguments[1]||{};b=2}if(typeof a!="object"&&typeof a!="function")a={};if(d==b){a=this;--b}for(;b<d;b++)if((g=arguments[b])!=null)for(var f in g){var h=a[f],i=g[f];if(a!==i)if(e&&i&&
typeof i=="object"&&!i.nodeType)a[f]=c.extend(e,h||(i.length!=null?[]:{}),i);else if(i!==p)a[f]=i}return a};var r="jQuery"+u(),M=0,E={},N=/z-?index|font-?weight|opacity|zoom|line-?height/i,B=document.defaultView||{};c.extend({noConflict:function(a){window.$=J;if(a)window.jQuery=I;return c},isFunction:function(a){return!!a&&typeof a!="string"&&!a.nodeName&&a.constructor!=Array&&/^[\s[]?function/.test(a+"")},isXMLDoc:function(a){return a.documentElement&&!a.body||a.tagName&&a.ownerDocument&&!a.ownerDocument.body},
globalEval:function(a){if(a=c.trim(a)){var b=document.getElementsByTagName("head")[0]||document.documentElement,d=document.createElement("script");d.type="text/javascript";if(c.browser.msie)d.text=a;else d.appendChild(document.createTextNode(a));b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},cache:{},data:function(a,b,d){a=a==window?E:a;var e=a[r];e||(e=a[r]=++M);if(b&&!c.cache[e])c.cache[e]={};if(d!==p)c.cache[e][b]=
d;return b?c.cache[e][b]:e},removeData:function(a,b){a=a==window?E:a;var d=a[r];if(b){if(c.cache[d]){delete c.cache[d][b];b="";for(b in c.cache[d])break;b||c.removeData(a)}}else{try{delete a[r]}catch(e){a.removeAttribute&&a.removeAttribute(r)}delete c.cache[d]}},each:function(a,b,d){var e,g=0,f=a.length;if(d)if(f==p)for(e in a){if(b.apply(a[e],d)===false)break}else for(;g<f;){if(b.apply(a[g++],d)===false)break}else if(f==p)for(e in a){if(b.call(a[e],e,a[e])===false)break}else for(d=a[0];g<f&&b.call(d,
g,d)!==false;d=a[++g]);return a},prop:function(a,b,d,e,g){if(c.isFunction(b))b=b.call(a,e);return b&&b.constructor==Number&&d=="curCSS"&&!N.test(g)?b+"px":b},className:{add:function(a,b){c.each((b||"").split(/\s+/),function(d,e){if(a.nodeType==1&&!c.className.has(a.className,e))a.className+=(a.className?" ":"")+e})},remove:function(a,b){if(a.nodeType==1)a.className=b!=p?c.grep(a.className.split(/\s+/),function(d){return!c.className.has(b,d)}).join(" "):""},has:function(a,b){return c.inArray(b,(a.className||
a).toString().split(/\s+/))>-1}},swap:function(a,b,d){var e={};for(var g in b){e[g]=a.style[g];a.style[g]=b[g]}d.call(a);for(g in b)a.style[g]=e[g]},css:function(a,b,d){if(b=="width"||b=="height"){var e;d={position:"absolute",visibility:"hidden",display:"block"};var g=b=="width"?["Left","Right"]:["Top","Bottom"];function f(){e=b=="width"?a.offsetWidth:a.offsetHeight;var h=0,i=0;c.each(g,function(){h+=parseFloat(c.curCSS(a,"padding"+this,true))||0;i+=parseFloat(c.curCSS(a,"border"+this+"Width",true))||
0});e-=Math.round(h+i)}c(a).is(":visible")?f():c.swap(a,d,f);return Math.max(0,e)}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var e,g=a.style;function f(i){if(!c.browser.safari)return false;i=B.getComputedStyle(i,null);return!i||i.getPropertyValue("color")==""}if(b=="opacity"&&c.browser.msie){e=c.attr(g,"opacity");return e==""?"1":e}if(c.browser.opera&&b=="display"){var h=g.outline;g.outline="0 solid black";g.outline=h}if(b.match(/float/i))b=z;if(!d&&g&&g[b])e=g[b];else if(B.getComputedStyle){if(b.match(/float/i))b=
"float";b=b.replace(/([A-Z])/g,"-$1").toLowerCase();if((e=B.getComputedStyle(a,null))&&!f(a))e=e.getPropertyValue(b);else{g=[];d=[];h=a;for(a=0;h&&f(h);h=h.parentNode)d.unshift(h);for(;a<d.length;a++)if(f(d[a])){g[a]=d[a].style.display;d[a].style.display="block"}e=b=="display"&&g[d.length-1]!=null?"none":e&&e.getPropertyValue(b)||"";for(a=0;a<g.length;a++)if(g[a]!=null)d[a].style.display=g[a]}if(b=="opacity"&&e=="")e="1"}else if(a.currentStyle){e=b.replace(/\-(\w)/g,function(i,j){return j.toUpperCase()});
e=a.currentStyle[b]||a.currentStyle[e];if(!/^\d+(px)?$/i.test(e)&&/^\d/.test(e)){b=g.left;d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;g.left=e||0;e=g.pixelLeft+"px";g.left=b;a.runtimeStyle.left=d}}return e},clean:function(a,b){var d=[];b=b||document;if(typeof b.createElement=="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||document;c.each(a,function(e,g){if(g){if(g.constructor==Number)g+="";if(typeof g=="string"){g=g.replace(/(<(\w+)[^>]*?)\/>/g,function(i,j,k){return k.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?
i:j+"></"+k+">"});var f=c.trim(g).toLowerCase();e=b.createElement("div");var h=!f.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!f.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||f.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!f.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!f.indexOf("<td")||!f.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!f.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||c.browser.msie&&
[1,"div<div>","</div>"]||[0,"",""];for(e.innerHTML=h[1]+g+h[2];h[0]--;)e=e.lastChild;if(c.browser.msie){f=!f.indexOf("<table")&&f.indexOf("<tbody")<0?e.firstChild&&e.firstChild.childNodes:h[1]=="<table>"&&f.indexOf("<tbody")<0?e.childNodes:[];for(h=f.length-1;h>=0;--h)c.nodeName(f[h],"tbody")&&!f[h].childNodes.length&&f[h].parentNode.removeChild(f[h]);/^\s/.test(g)&&e.insertBefore(b.createTextNode(g.match(/^\s*/)[0]),e.firstChild)}g=c.makeArray(e.childNodes)}if(!(g.length===0&&!c.nodeName(g,"form")&&
!c.nodeName(g,"select")))if(g[0]==p||c.nodeName(g,"form")||g.options)d.push(g);else d=c.merge(d,g)}});return d},attr:function(a,b,d){if(!(!a||a.nodeType==3||a.nodeType==8)){var e=!c.isXMLDoc(a),g=d!==p,f=c.browser.msie;b=e&&c.props[b]||b;if(a.tagName){var h=/href|src|style/.test(b);if(b in a&&e&&!h){if(g){if(b=="type"&&c.nodeName(a,"input")&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;return a[b]}if(f&&
e&&b=="style")return c.attr(a.style,"cssText",d);g&&a.setAttribute(b,""+d);a=f&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?p:a}if(f&&b=="opacity"){if(g){a.zoom=1;a.filter=(a.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(d)+""=="NaN"?"":"alpha(opacity="+d*100+")")}return a.filter&&a.filter.indexOf("opacity=")>=0?parseFloat(a.filter.match(/opacity=([^)]*)/)[1])/100+"":""}b=b.replace(/-([a-z])/ig,function(i,j){return j.toUpperCase()});if(g)a[b]=d;return a[b]}},trim:function(a){return(a||
"").replace(/^\s+|\s+$/g,"")},makeArray:function(a){var b=[];if(a!=null){var d=a.length;if(d==null||a.split||a.setInterval||a.call)b[0]=a;else for(;d;)b[--d]=a[d]}return b},inArray:function(a,b){for(var d=0,e=b.length;d<e;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=0,e,g=a.length;if(c.browser.msie)for(;e=b[d++];){if(e.nodeType!=8)a[g++]=e}else for(;e=b[d++];)a[g++]=e;return a},unique:function(a){var b=[],d={};try{for(var e=0,g=a.length;e<g;e++){var f=c.data(a[e]);if(!d[f]){d[f]=true;
b.push(a[e])}}}catch(h){b=a}return b},grep:function(a,b,d){for(var e=[],g=0,f=a.length;g<f;g++)!d!=!b(a[g],g)&&e.push(a[g]);return e},map:function(a,b){for(var d=[],e=0,g=a.length;e<g;e++){var f=b(a[e],e);if(f!=null)d[d.length]=f}return d.concat.apply([],d)}});var t=navigator.userAgent.toLowerCase();c.browser={version:(t.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(t),opera:/opera/.test(t),msie:/msie/.test(t)&&!/opera/.test(t),mozilla:/mozilla/.test(t)&&!/(compatible|webkit)/.test(t)};
var z=c.browser.msie?"styleFloat":"cssFloat";c.extend({boxModel:!c.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":z,cssFloat:z,styleFloat:z,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});c.each({parent:function(a){return a.parentNode},parents:function(a){return c.dir(a,"parentNode")},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},
prevAll:function(a){return c.dir(a,"previousSibling")},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d){var e=c.map(this,b);if(d&&typeof d=="string")e=c.multiFilter(d,e);return this.pushStack(c.unique(e))}});c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",
insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(){var d=arguments;return this.each(function(){for(var e=0,g=d.length;e<g;e++)c(d[e])[b](this)})}});c.each({removeAttr:function(a){c.attr(this,a,"");this.nodeType==1&&this.removeAttribute(a)},addClass:function(a){c.className.add(this,a)},removeClass:function(a){c.className.remove(this,a)},toggleClass:function(a){c.className[c.className.has(this,a)?"remove":"add"](this,a)},remove:function(a){if(!a||c.filter(a,[this]).r.length){c("*",
this).add(this).each(function(){c.event.remove(this);c.removeData(this)});this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(c(">*",this).remove();this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn[d]=function(e){return this[0]==window?c.browser.opera&&document.body["client"+b]||c.browser.safari&&window["inner"+b]||document.compatMode=="CSS1Compat"&&
document.documentElement["client"+b]||document.body["client"+b]:this[0]==document?Math.max(Math.max(document.body["scroll"+b],document.documentElement["scroll"+b]),Math.max(document.body["offset"+b],document.documentElement["offset"+b])):e==p?this.length?c.css(this[0],d):null:this.css(d,e.constructor==String?e:e+"px")}});function s(a,b){return a[0]&&parseInt(c.curCSS(a[0],b,true),10)||0}var v=c.browser.safari&&parseInt(c.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uffff*_-]|\\\\.)",
O=new RegExp("^>\\s*("+v+"+)"),P=new RegExp("^("+v+"+)(#)("+v+"+)"),Q=new RegExp("^([#.]?)("+v+"*)");c.extend({expr:{"":function(a,b,d){return d[2]=="*"||c.nodeName(a,d[2])},"#":function(a,b,d){return a.getAttribute("id")==d[2]},":":{lt:function(a,b,d){return b<d[3]-0},gt:function(a,b,d){return b>d[3]-0},nth:function(a,b,d){return d[3]-0==b},eq:function(a,b,d){return d[3]-0==b},first:function(a,b){return b==0},last:function(a,b,d,e){return b==e.length-1},even:function(a,b){return b%2==0},odd:function(a,
b){return b%2},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a},"last-child":function(a){return c.nth(a.parentNode.lastChild,1,"previousSibling")==a},"only-child":function(a){return!c.nth(a.parentNode.lastChild,2,"previousSibling")},parent:function(a){return a.firstChild},empty:function(a){return!a.firstChild},contains:function(a,b,d){return(a.textContent||a.innerText||c(a).text()||"").indexOf(d[3])>=0},visible:function(a){return"hidden"!=a.type&&c.css(a,"display")!=
"none"&&c.css(a,"visibility")!="hidden"},hidden:function(a){return"hidden"==a.type||c.css(a,"display")=="none"||c.css(a,"visibility")=="hidden"},enabled:function(a){return!a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked},selected:function(a){return a.selected||c.attr(a,"selected")},text:function(a){return"text"==a.type},radio:function(a){return"radio"==a.type},checkbox:function(a){return"checkbox"==a.type},file:function(a){return"file"==a.type},password:function(a){return"password"==
a.type},submit:function(a){return"submit"==a.type},image:function(a){return"image"==a.type},reset:function(a){return"reset"==a.type},button:function(a){return"button"==a.type||c.nodeName(a,"button")},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},has:function(a,b,d){return c.find(d[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},animated:function(a){return c.grep(c.timers,function(b){return a==b.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+v+"+)")],multiFilter:function(a,b,d){for(var e,g=[];a&&a!=e;){e=a;var f=c.filter(a,b,d);a=f.t.replace(/^\s*,\s*/,"");g=d?(b=f.r):c.merge(g,f.r)}return g},find:function(a,b){if(typeof a!="string")return[a];if(b&&b.nodeType!=1&&b.nodeType!=9)return[];b=b||document;for(var d=[b],e=[],g,f;a&&g!=a;){var h=[];g=a;a=c.trim(a);f=false;var i=O,j=i.exec(a);if(j){f=j[1].toUpperCase();for(var k=0;d[k];k++)for(j=d[k].firstChild;j;j=j.nextSibling)if(j.nodeType==
1&&(f=="*"||j.nodeName.toUpperCase()==f))h.push(j);d=h;a=a.replace(i,"");if(a.indexOf(" ")==0)continue;f=true}else{i=/^([>+~])\s*(\w*)/i;if((j=i.exec(a))!=null){h=[];k={};f=j[2].toUpperCase();j=j[1];for(var l=0,n=d.length;l<n;l++)for(var o=j=="~"||j=="+"?d[l].nextSibling:d[l].firstChild;o;o=o.nextSibling)if(o.nodeType==1){var m=c.data(o);if(j=="~"&&k[m])break;if(!f||o.nodeName.toUpperCase()==f){if(j=="~")k[m]=true;h.push(o)}if(j=="+")break}d=h;a=c.trim(a.replace(i,""));f=true}}if(a&&!f)if(a.indexOf(",")){i=
P;if(j=i.exec(a))j=[0,j[2],j[3],j[1]];else{i=Q;j=i.exec(a)}j[2]=j[2].replace(/\\/g,"");f=d[d.length-1];if(j[1]=="#"&&f&&f.getElementById&&!c.isXMLDoc(f)){h=f.getElementById(j[2]);if((c.browser.msie||c.browser.opera)&&h&&typeof h.id=="string"&&h.id!=j[2])h=c('[@id="'+j[2]+'"]',f)[0];d=h=h&&(!j[3]||c.nodeName(h,j[3]))?[h]:[]}else{for(k=0;d[k];k++){f=j[1]=="#"&&j[3]?j[3]:j[1]!=""||j[0]==""?"*":j[2];if(f=="*"&&d[k].nodeName.toLowerCase()=="object")f="param";h=c.merge(h,d[k].getElementsByTagName(f))}if(j[1]==
".")h=c.classFilter(h,j[2]);if(j[1]=="#"){d=[];for(k=0;h[k];k++)if(h[k].getAttribute("id")==j[2]){d=[h[k]];break}h=d}d=h}a=a.replace(i,"")}else{b==d[0]&&d.shift();e=c.merge(e,d);h=d=[b];a=" "+a.substr(1,a.length)}if(a){a=c.filter(a,h);d=h=a.r;a=c.trim(a.t)}}if(a)d=[];d&&b==d[0]&&d.shift();return e=c.merge(e,d)},classFilter:function(a,b,d){b=" "+b+" ";for(var e=[],g=0;a[g];g++){var f=(" "+a[g].className+" ").indexOf(b)>=0;if(!d&&f||d&&!f)e.push(a[g])}return e},filter:function(a,b,d){for(var e;a&&a!=
e;){e=a;for(var g=c.parse,f,h=0;g[h];h++)if(f=g[h].exec(a)){a=a.substring(f[0].length);f[2]=f[2].replace(/\\/g,"");break}if(!f)break;if(f[1]==":"&&f[2]=="not")b=D.test(f[3])?c.filter(f[3],b,true).r:c(b).not(f[3]);else if(f[1]==".")b=c.classFilter(b,f[2],d);else if(f[1]=="["){g=[];var i=f[3];h=0;for(var j=b.length;h<j;h++){var k=b[h],l=k[c.props[f[2]]||f[2]];if(l==null||/href|src|selected/.test(f[2]))l=c.attr(k,f[2])||"";if((i==""&&!!l||i=="="&&l==f[5]||i=="!="&&l!=f[5]||i=="^="&&l&&!l.indexOf(f[5])||
i=="$="&&l.substr(l.length-f[5].length)==f[5]||(i=="*="||i=="~=")&&l.indexOf(f[5])>=0)^d)g.push(k)}b=g}else if(f[1]==":"&&f[2]=="nth-child"){i={};g=[];e=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(f[3]=="even"&&"2n"||f[3]=="odd"&&"2n+1"||!/\D/.test(f[3])&&"0n+"+f[3]||f[3]);k=e[1]+(e[2]||1)-0;e=e[3]-0;h=0;for(j=b.length;h<j;h++){l=b[h];var n=l.parentNode,o=c.data(n);if(!i[o]){var m=1;for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=m++;i[o]=true}o=false;if(k==0){if(l.nodeIndex==e)o=true}else if((l.nodeIndex-
e)%k==0&&(l.nodeIndex-e)/k>=0)o=true;o^d&&g.push(l)}b=g}else{var q=c.expr[f[1]];if(typeof q=="object")q=q[f[2]];if(typeof q=="string")q=eval("false||function(a,i){return "+q+";}");b=c.grep(b,function(w,x){return q(w,x,f,b)},d)}}return{r:b,t:a}},dir:function(a,b){var d=[];for(a=a[b];a&&a!=document;){a.nodeType==1&&d.push(a);a=a[b]}return d},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType==1&&++e==b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType==1&&a!=
b&&d.push(a);return d}});c.event={add:function(a,b,d,e){if(!(a.nodeType==3||a.nodeType==8)){if(c.browser.msie&&a.setInterval)a=window;if(!d.guid)d.guid=this.guid++;if(e!=p){var g=d;d=this.proxy(g,function(){return g.apply(this,arguments)});d.data=e}var f=c.data(a,"events")||c.data(a,"events",{}),h=c.data(a,"handle")||c.data(a,"handle",function(){if(typeof c!="undefined"&&!c.event.triggered)return c.event.handle.apply(arguments.callee.elem,arguments)});h.elem=a;c.each(b.split(/\s+/),function(i,j){i=
j.split(".");j=i[0];d.type=i[1];i=f[j];if(!i){i=f[j]={};if(!c.event.special[j]||c.event.special[j].setup.call(a)===false)if(a.addEventListener)a.addEventListener(j,h,false);else a.attachEvent&&a.attachEvent("on"+j,h)}i[d.guid]=d;c.event.global[j]=true});a=null}},guid:1,global:{},remove:function(a,b,d){if(!(a.nodeType==3||a.nodeType==8)){var e=c.data(a,"events"),g;if(e){if(b==p||typeof b=="string"&&b.charAt(0)==".")for(var f in e)this.remove(a,f+(b||""));else{if(b.type){d=b.handler;b=b.type}c.each(b.split(/\s+/),
function(h,i){h=i.split(".");i=h[0];if(e[i]){if(d)delete e[i][d.guid];else for(d in e[i])if(!h[1]||e[i][d].type==h[1])delete e[i][d];for(g in e[i])break;if(!g){if(!c.event.special[i]||c.event.special[i].teardown.call(a)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));g=null;delete e[i]}}})}for(g in e)break;if(!g){if(b=c.data(a,"handle"))b.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},
trigger:function(a,b,d,e,g){b=c.makeArray(b);if(a.indexOf("!")>=0){a=a.slice(0,-1);var f=true}if(d){if(d.nodeType==3||d.nodeType==8)return;var h,i=c.isFunction(d[a]||null),j=!b[0]||!b[0].preventDefault;if(j){b.unshift({type:a,target:d,preventDefault:function(){},stopPropagation:function(){},timeStamp:u()});b[0][r]=true}b[0].type=a;if(f)b[0].exclusive=true;if(f=c.data(d,"handle"))h=f.apply(d,b);if((!i||c.nodeName(d,"a")&&a=="click")&&d["on"+a]&&d["on"+a].apply(d,b)===false)h=false;j&&b.shift();if(g&&
c.isFunction(g)){b=g.apply(d,h==null?b:b.concat(h));if(b!==p)h=b}if(i&&e!==false&&h!==false&&!(c.nodeName(d,"a")&&a=="click")){this.triggered=true;try{d[a]()}catch(k){}}this.triggered=false}else this.global[a]&&c("*").add([window,document]).trigger(a,b);return h},handle:function(a){var b,d,e,g,f;a=arguments[0]=c.event.fix(a||window.event);e=a.type.split(".");a.type=e[0];e=e[1];g=!e&&!a.exclusive;f=(c.data(this,"events")||{})[a.type];for(var h in f){d=f[h];if(g||d.type==e){a.handler=d;a.data=d.data;
d=d.apply(this,arguments);if(b!==false)b=d;if(d===false){a.preventDefault();a.stopPropagation()}}}return b},fix:function(a){if(a[r]==true)return a;var b=a;a={originalEvent:b};for(var d="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 timeStamp toElement type view wheelDelta which".split(" "),
e=d.length;e;e--)a[d[e]]=b[d[e]];a[r]=true;a.preventDefault=function(){b.preventDefault&&b.preventDefault();b.returnValue=false};a.stopPropagation=function(){b.stopPropagation&&b.stopPropagation();b.cancelBubble=true};a.timeStamp=a.timeStamp||u();if(!a.target)a.target=a.srcElement||document;if(a.target.nodeType==3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement==a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){d=document.documentElement;
e=document.body;a.pageX=a.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d.clientLeft||0);a.pageY=a.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},proxy:function(a,b){b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:function(){F()},teardown:function(){}},
mouseenter:{setup:function(){if(c.browser.msie)return false;c(this).bind("mouseover",c.event.special.mouseenter.handler);return true},teardown:function(){if(c.browser.msie)return false;c(this).unbind("mouseover",c.event.special.mouseenter.handler);return true},handler:function(a){if(G(a,this))return true;a.type="mouseenter";return c.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(c.browser.msie)return false;c(this).bind("mouseout",c.event.special.mouseleave.handler);return true},
teardown:function(){if(c.browser.msie)return false;c(this).unbind("mouseout",c.event.special.mouseleave.handler);return true},handler:function(a){if(G(a,this))return true;a.type="mouseleave";return c.event.handle.apply(this,arguments)}}}};c.fn.extend({bind:function(a,b,d){return a=="unload"?this.one(a,b,d):this.each(function(){c.event.add(this,a,d||b,d&&b)})},one:function(a,b,d){var e=c.event.proxy(d||b,function(g){c(this).unbind(g,e);return(d||b).apply(this,arguments)});return this.each(function(){c.event.add(this,
a,e,d&&b)})},unbind:function(a,b){return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b,d){return this.each(function(){c.event.trigger(a,b,this,true,d)})},triggerHandler:function(a,b,d){return this[0]&&c.event.trigger(a,b,this[0],false,d)},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.event.proxy(a,b[d++]);return this.click(c.event.proxy(a,function(e){this.lastToggle=(this.lastToggle||0)%d;e.preventDefault();return b[this.lastToggle++].apply(this,arguments)||false}))},
hover:function(a,b){return this.bind("mouseenter",a).bind("mouseleave",b)},ready:function(a){F();c.isReady?a.call(document,c):c.readyList.push(function(){return a.call(this,c)});return this}});c.extend({isReady:false,readyList:[],ready:function(){if(!c.isReady){c.isReady=true;if(c.readyList){c.each(c.readyList,function(){this.call(document)});c.readyList=null}c(document).triggerHandler("ready")}}});var H=false;function F(){if(!H){H=true;document.addEventListener&&!c.browser.opera&&document.addEventListener("DOMContentLoaded",
c.ready,false);c.browser.msie&&window==top&&function(){if(!c.isReady){try{document.documentElement.doScroll("left")}catch(b){setTimeout(arguments.callee,0);return}c.ready()}}();c.browser.opera&&document.addEventListener("DOMContentLoaded",function(){if(!c.isReady){for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].disabled){setTimeout(arguments.callee,0);return}c.ready()}},false);if(c.browser.safari){var a;(function(){if(!c.isReady)if(document.readyState!="loaded"&&document.readyState!=
"complete")setTimeout(arguments.callee,0);else{if(a===p)a=c("style, link[rel=stylesheet]").length;document.styleSheets.length!=a?setTimeout(arguments.callee,0):c.ready()}})()}c.event.add(window,"load",c.ready)}}c.each("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error".split(","),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)}});function G(a,b){for(a=a.relatedTarget;a&&a!=
b;)try{a=a.parentNode}catch(d){a=b}return a==b}c(window).bind("unload",function(){c("*").add(document).unbind()});c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!="string")return this._load(a);var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}d=d||function(){};e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else{b=c.param(b);e="POST"}var f=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(h,i){if(i=="success"||i=="notmodified")f.html(g?c("<div/>").append(h.responseText.replace(/<script(.|\s)*?\/script>/g,
"")).find(g):h.responseText);f.each(d,[h.responseText,i,h])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return c.nodeName(this,"form")?c.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(a,b){a=c(this).val();return a==null?null:a.constructor==Array?c.map(a,function(d){return{name:b.name,
value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});var R=u();c.extend({get:function(a,b,d,e){if(c.isFunction(b)){d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){d=b;b={}}return c.ajax({type:"POST",
url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,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(a){a=c.extend(true,a,c.extend(true,
{},c.ajaxSettings,a));var b,d=/=\?(&|$)/g,e,g,f=a.type.toUpperCase();if(a.data&&a.processData&&typeof a.data!="string")a.data=c.param(a.data);if(a.dataType=="jsonp"){if(f=="GET")a.url.match(d)||(a.url+=(a.url.match(/\?/)?"&":"?")+(a.jsonp||"callback")+"=?");else if(!a.data||!a.data.match(d))a.data=(a.data?a.data+"&":"")+(a.jsonp||"callback")+"=?";a.dataType="json"}if(a.dataType=="json"&&(a.data&&a.data.match(d)||a.url.match(d))){b="jsonp"+R++;if(a.data)a.data=(a.data+"").replace(d,"="+b+"$1");a.url=
a.url.replace(d,"="+b+"$1");a.dataType="script";window[b]=function(A){g=A;n();l();window[b]=p;try{delete window[b]}catch(S){}i&&i.removeChild(j)}}if(a.dataType=="script"&&a.cache==null)a.cache=false;if(a.cache===false&&f=="GET"){d=u();var h=a.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+d+"$2");a.url=h+(h==a.url?(a.url.match(/\?/)?"&":"?")+"_="+d:"")}if(a.data&&f=="GET"){a.url+=(a.url.match(/\?/)?"&":"?")+a.data;a.data=null}a.global&&!c.active++&&c.event.trigger("ajaxStart");d=/^(?:\w+:)?\/\/([^\/?#]+)/;
if(a.dataType=="script"&&f=="GET"&&d.test(a.url)&&d.exec(a.url)[1]!=location.host){var i=document.getElementsByTagName("head")[0],j=document.createElement("script");j.src=a.url;if(a.scriptCharset)j.charset=a.scriptCharset;if(!b){var k=false;j.onload=j.onreadystatechange=function(){if(!k&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){k=true;n();l();i.removeChild(j)}}}i.appendChild(j)}else{function l(){a.complete&&a.complete(m,e);a.global&&c.event.trigger("ajaxComplete",
[m,a]);a.global&&!--c.active&&c.event.trigger("ajaxStop")}function n(){a.success&&a.success(g,e);a.global&&c.event.trigger("ajaxSuccess",[m,a])}var o=false,m=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;a.username?m.open(f,a.url,a.async,a.username,a.password):m.open(f,a.url,a.async);try{a.data&&m.setRequestHeader("Content-Type",a.contentType);if(a.ifModified)m.setRequestHeader("If-Modified-Since",c.lastModified[a.url]||"Thu, 01 Jan 1970 00:00:00 GMT");m.setRequestHeader("X-Requested-With",
"XMLHttpRequest");m.setRequestHeader("Accept",a.dataType&&a.accepts[a.dataType]?a.accepts[a.dataType]+", */*":a.accepts._default)}catch(q){}if(a.beforeSend&&a.beforeSend(m,a)===false){a.global&&c.active--;m.abort();return false}a.global&&c.event.trigger("ajaxSend",[m,a]);var w=function(A){if(!o&&m&&(m.readyState==4||A=="timeout")){o=true;if(x){clearInterval(x);x=null}e=A=="timeout"&&"timeout"||!c.httpSuccess(m)&&"error"||a.ifModified&&c.httpNotModified(m,a.url)&&"notmodified"||"success";if(e=="success")try{g=
c.httpData(m,a.dataType,a.dataFilter)}catch(S){e="parsererror"}if(e=="success"){var C;try{C=m.getResponseHeader("Last-Modified")}catch(U){}if(a.ifModified&&C)c.lastModified[a.url]=C;b||n()}else c.handleError(a,m,e);l();if(a.async)m=null}};if(a.async){var x=setInterval(w,13);a.timeout>0&&setTimeout(function(){if(m){m.abort();o||w("timeout")}},a.timeout)}try{m.send(a.data)}catch(T){c.handleError(a,m,null,T)}a.async||w();return m}},handleError:function(a,b,d,e){a.error&&a.error(b,d,e);a.global&&c.event.trigger("ajaxError",
[b,a,e])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol=="file:"||a.status>=200&&a.status<300||a.status==304||a.status==1223||c.browser.safari&&a.status==p}catch(b){}return false},httpNotModified:function(a,b){try{var d=a.getResponseHeader("Last-Modified");return a.status==304||d==c.lastModified[b]||c.browser.safari&&a.status==p}catch(e){}return false},httpData:function(a,b,d){var e=a.getResponseHeader("content-type");a=(e=b=="xml"||!b&&e&&e.indexOf("xml")>=0)?a.responseXML:
a.responseText;if(e&&a.documentElement.tagName=="parsererror")throw"parsererror";if(d)a=d(a,b);b=="script"&&c.globalEval(a);if(b=="json")a=eval("("+a+")");return a},param:function(a){var b=[];if(a.constructor==Array||a.jquery)c.each(a,function(){b.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))});else for(var d in a)a[d]&&a[d].constructor==Array?c.each(a[d],function(){b.push(encodeURIComponent(d)+"="+encodeURIComponent(this))}):b.push(encodeURIComponent(d)+"="+encodeURIComponent(c.isFunction(a[d])?
a[d]():a[d]));return b.join("&").replace(/%20/g,"+")}});c.fn.extend({show:function(a,b){return a?this.animate({height:"show",width:"show",opacity:"show"},a,b):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(c.css(this,"display")=="none"){var d=c("<"+this.tagName+" />").appendTo("body");this.style.display=d.css("display");if(this.style.display=="none")this.style.display="block";d.remove()}}).end()},hide:function(a,b){return a?this.animate({height:"hide",width:"hide",
opacity:"hide"},a,b):this.filter(":visible").each(function(){this.oldblock=this.oldblock||c.css(this,"display");this.style.display="none"}).end()},_toggle:c.fn.toggle,toggle:function(a,b){return c.isFunction(a)&&c.isFunction(b)?this._toggle.apply(this,arguments):a?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},a,b):this.each(function(){c(this)[c(this).is(":hidden")?"show":"hide"]()})},slideDown:function(a,b){return this.animate({height:"show"},a,b)},slideUp:function(a,b){return this.animate({height:"hide"},
a,b)},slideToggle:function(a,b){return this.animate({height:"toggle"},a,b)},fadeIn:function(a,b){return this.animate({opacity:"show"},a,b)},fadeOut:function(a,b){return this.animate({opacity:"hide"},a,b)},fadeTo:function(a,b,d){return this.animate({opacity:b},a,d)},animate:function(a,b,d,e){var g=c.speed(b,d,e);return this[g.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var f=c.extend({},g),h,i=c(this).is(":hidden"),j=this;for(h in a){if(a[h]=="hide"&&i||a[h]=="show"&&
!i)return f.complete.call(this);if(h=="height"||h=="width"){f.display=c.css(this,"display");f.overflow=this.style.overflow}}if(f.overflow!=null)this.style.overflow="hidden";f.curAnim=c.extend({},a);c.each(a,function(k,l){var n=new c.fx(j,f,k);if(/toggle|show|hide/.test(l))n[l=="toggle"?i?"show":"hide":l](a);else{var o=l.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),m=n.cur(true)||0;if(o){l=parseFloat(o[2]);var q=o[3]||"px";if(q!="px"){j.style[k]=(l||1)+q;m=(l||1)/n.cur(true)*m;j.style[k]=m+q}if(o[1])l=
(o[1]=="-="?-1:1)*l+m;n.custom(m,l,q)}else n.custom(m,l,"")}});return true})},queue:function(a,b){if(c.isFunction(a)||a&&a.constructor==Array){b=a;a="fx"}if(!a||typeof a=="string"&&!b)return y(this[0],a);return this.each(function(){if(b.constructor==Array)y(this,a,b);else{y(this,a).push(b);y(this,a).length==1&&b.call(this)}})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem==this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();
return this}});function y(a,b,d){if(a){b=b||"fx";var e=c.data(a,b+"queue");if(!e||d)e=c.data(a,b+"queue",c.makeArray(d))}return e}c.fn.dequeue=function(a){a=a||"fx";return this.each(function(){var b=y(this,a);b.shift();b.length&&b[0].call(this)})};c.extend({speed:function(a,b,d){var e=a&&a.constructor==Object?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&b.constructor!=Function&&b};e.duration=(e.duration&&e.duration.constructor==Number?e.duration:c.fx.speeds[e.duration])||c.fx.speeds.def;
e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*Math.PI)/2+0.5)*e+d}},timers:[],timerId:null,fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if(this.prop==
"height"||this.prop=="width")this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){this.startTime=u();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var e=this;function g(f){return e.step(f)}g.elem=this.elem;c.timers.push(g);
if(c.timerId==null)c.timerId=setInterval(function(){for(var f=c.timers,h=0;h<f.length;h++)f[h]()||f.splice(h--,1);if(!f.length){clearInterval(c.timerId);c.timerId=null}},13)},show:function(){this.options.orig[this.prop]=c.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.attr(this.elem.style,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=u();if(a||b>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();a=this.options.curAnim[this.prop]=true;for(var d in this.options.curAnim)if(this.options.curAnim[d]!==true)a=false;if(a){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(c.css(this.elem,"display")=="none")this.elem.style.display="block"}if(this.options.hide)this.elem.style.display=
"none";if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.attr(this.elem.style,e,this.options.orig[e])}a&&this.options.complete.call(this.elem);return false}else{d=b-this.startTime;this.state=d/this.options.duration;this.pos=c.easing[this.options.easing||(c.easing.swing?"swing":"linear")](this.state,d,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(a){a.elem.scrollLeft=
a.now},scrollTop:function(a){a.elem.scrollTop=a.now},opacity:function(a){c.attr(a.elem.style,"opacity",a.now)},_default:function(a){a.elem.style[a.prop]=a.now+a.unit}}});c.fn.offset=function(){var a=0,b=0,d=this[0],e;if(d)with(c.browser){var g=d.parentNode,f=d,h=d.offsetParent;e=d.ownerDocument;var i=safari&&parseInt(version)<522&&!/adobeair/i.test(t),j=c.curCSS,k=j(d,"position")=="fixed";if(d.getBoundingClientRect){d=d.getBoundingClientRect();n(d.left+Math.max(e.documentElement.scrollLeft,e.body.scrollLeft),
d.top+Math.max(e.documentElement.scrollTop,e.body.scrollTop));n(-e.documentElement.clientLeft,-e.documentElement.clientTop)}else{for(n(d.offsetLeft,d.offsetTop);h;){n(h.offsetLeft,h.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(h.tagName)||safari&&!i)l(h);if(!k&&j(h,"position")=="fixed")k=true;f=/^body$/i.test(h.tagName)?f:h;h=h.offsetParent}for(;g&&g.tagName&&!/^body|html$/i.test(g.tagName);){/^inline|table.*$/i.test(j(g,"display"))||n(-g.scrollLeft,-g.scrollTop);mozilla&&j(g,"overflow")!="visible"&&
l(g);g=g.parentNode}if(i&&(k||j(f,"position")=="absolute")||mozilla&&j(f,"position")!="absolute")n(-e.body.offsetLeft,-e.body.offsetTop);k&&n(Math.max(e.documentElement.scrollLeft,e.body.scrollLeft),Math.max(e.documentElement.scrollTop,e.body.scrollTop))}e={top:b,left:a}}function l(o){n(c.curCSS(o,"borderLeftWidth",true),c.curCSS(o,"borderTopWidth",true))}function n(o,m){a+=parseInt(o,10)||0;b+=parseInt(m,10)||0}return e};c.fn.extend({position:function(){var a;if(this[0]){a=this.offsetParent();var b=
this.offset(),d=/^body|html$/i.test(a[0].tagName)?{top:0,left:0}:a.offset();b.top-=s(this,"marginTop");b.left-=s(this,"marginLeft");d.top+=s(a,"borderTopWidth");d.left+=s(a,"borderLeftWidth");a={top:b.top-d.top,left:b.left-d.left}}return a},offsetParent:function(){for(var a=this[0].offsetParent;a&&!/^body|html$/i.test(a.tagName)&&c.css(a,"position")=="static";)a=a.offsetParent;return c(a)}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){if(this[0])return e!=p?this.each(function(){this==
window||this==document?window.scrollTo(!a?e:c(window).scrollLeft(),a?e:c(window).scrollTop()):(this[d]=e)}):this[0]==window||this[0]==document?self[a?"pageYOffset":"pageXOffset"]||c.boxModel&&document.documentElement[d]||document.body[d]:this[0][d]}});c.each(["Height","Width"],function(a,b){var d=a?"Left":"Top",e=a?"Right":"Bottom";c.fn["inner"+b]=function(){return this[b.toLowerCase()]()+s(this,"padding"+d)+s(this,"padding"+e)};c.fn["outer"+b]=function(g){return this["inner"+b]()+s(this,"border"+
d+"Width")+s(this,"border"+e+"Width")+(g?s(this,"margin"+d)+s(this,"margin"+e):0)}})})();
String.prototype.blank=function(){return/^\s*$/.test(this)};String.prototype.isJSON=function(){var b=this;if(b.blank())return false;b=this.charAt(0);return b=="{"||b=="["};if(!Array.prototype.filter)Array.prototype.filter=function(b,a){var c=this.length;if(typeof b!="function")throw new TypeError;var d=[];a=a;for(var e=0;e<c;e++)if(e in this){var f=this[e];b.call(a,f,e,this)&&d.push(f)}return d};
if(!Array.prototype.map)Array.prototype.map=function(b,a){var c=this.length;if(typeof b!="function")throw new TypeError;var d=new Array(c);a=a;for(var e=0;e<c;e++)if(e in this)d[e]=b.call(a,this[e],e,this);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(b,a){var c=this.length;a=Number(a)||0;a=a<0?Math.ceil(a):Math.floor(a);if(a<0)a+=c;for(;a<c;a++)if(a in this&&this[a]===b)return a;return-1};
if(!Array.prototype.clean)Array.prototype.clean=function(b){for(var a=0;a<this.length;a++)if(this[a]==b){this.splice(a,1);a--}return this};if(!Array.prototype.max)Array.prototype.max=function(){return Math.max.apply(Math,this)};if(!Array.prototype.min)Array.prototype.min=function(){return Math.min.apply(Math,this)};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.truncate=function(b,a){if(this.length<=b)return this;else{b=this.substr(0,b-a.length);return b+a}};
String.prototype.lineSplit=function(b,a){txt=this.split(" ");for(var c=0,d=[],e=0,f=0;f<txt.length;f++){var g=txt[f];if(c+g.length<=b){if(typeof d[e]=="undefined")d[e]=[];d[e].push(g);c+=g.length}else{e++;if(g.length>b)g=g.truncate(b,"...");d[e]=[g];c=g.length}}for(f=0;f<d.length;f++)if(typeof d[f]!="undefined")d[f]=d[f].join(" ");return d.join(a)};Array.prototype.in_array=function(b){for(var a=0,c=this.length;a<c;a++)if(this[a]==b)return true;return false};
if(typeof Array.prototype.map=="undefined")Array.prototype.map=function(b,a){a=a||window;for(var c=[],d=0,e=this.length;d<e;++d)c.push(b.call(a,this[d],d,this));return c};if(!Array.indexOf)Array.prototype.indexOf=function(b){for(var a=0;a<this.length;a++)if(this[a]==b)return a;return-1};Array.prototype.foreach=function(b,a){a=a||window;for(var c=0,d=this.length;c<d;++c)b.call(a,c,this[c],this)};function cloneObject(b){for(i in b)this[i]=typeof b[i]=="object"?new cloneObject(b[i]):b[i]}
jQuery.fn.getSelectedText=function(){var b;this.each(function(){if(this.tagName=="SELECT"){var a=this;b=a.options[a.options.selectedIndex].text}});return b};function removeHTMLTags(b){b=b.replace(/&(lt|gt);/g,function(a,c){return c=="lt"?"<":">"});return b=b.replace(/<\/?[^>]+(>|$)/g,"")};
$.browser.chrome=typeof navigator.vendor!="undefined"&&navigator.vendor.indexOf("Google")!=-1;if(typeof console=="undefined")console=document.location.host=="cghub.localhost"?{log:function(a){alert(a)}}:{log:function(){}};else if(typeof console.log=="undefined")console.log=document.location.host=="cghub.localhost"?function(a){alert(a)}:function(){};
function getTopDomain(){var a=document.location.hostname;a=a.split(".");var b=a.length,c;if(a[b-1]=="com")c=a[b-2]=="shakuro"?b==3?false:true:b==2?false:true;else if(a[b-1]=="localhost")c=b==2?false:true;if(c)a=a.slice(1);return a.join(".")}var siteTopDomain=getTopDomain();jQuery.fn.getSelectedText=function(){var a;this.each(function(){if(this.tagName=="SELECT"){var b=this;a=b.options[b.options.selectedIndex].text}});return a};
$.fn.ajaxSubmit=function(){this.submit(function(){var a={};$(this).find("input[@checked], input[@type='text'], input[@type='file'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea").filter(":enabled").each(function(){a[this.name||this.id||this.parentNode.name||this.parentNode.id]=this.value});$("body").addClass("curWait");$.post(this.getAttribute("action")+"?call=ajax",a,function(b){$("body").removeClass("curWait");strError="Unable to submit form. Please try again later.";
oFocus=null;strRedirect=$("#redirecturl",$(b)).text();strError=$("#error",$(b)).text();strMsg=$("#msg",$(b)).text();msgDiv=$("#msgdiv",$(b)).text();oFocus=$("#focus",$(b)).text();if(strError.length>0){var c=new RegExp("(|)(.+)","g");$("div.formErrors").html("<h3>Error</h3><ul><li>"+strError.replace(c,"<li>$2</li>")+"</ul>").filter(":hidden").fadeIn("normal")}else{if(strError.length==0&&strRedirect.length>0)window.location=strRedirect;strMsg.length>0&&msgDiv.length>0&&$("div."+msgDiv).html("<ul><li>"+
strMsg.replace(c,"<li>$2</li>")+"</ul>").filter(":hidden").fadeIn("normal")}oFocus&&$("#"+oFocus).get(0).focus()});return false});return this};function createCookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+c*24*60*60*1000);c="; expires="+d.toGMTString()}else c="";document.cookie=a+"="+b+c+"; path=/; domain=."+siteTopDomain}
function readCookie(a){a=a+"=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)==0)return d.substring(a.length,d.length)}return null}function eraseCookie(a){createCookie(a,"",-1)}function setBackgroundColor(a,b){setTimeout('$("#'+a+'").css("background-color", "'+b+'")',50)}
function changeSort(a){a=$(a).val();a=a==0?"":a.indexOf(" ")!=-1?"sort:"+a.substr(0,a.indexOf(" "))+"/direction:"+a.substr(a.indexOf(" ")+1):"sort:"+a;var b=location.href,c=/http:\/\/([^\/]*)\//;b=b.replace(c,"/");c=/(sort:[^\/]*)/;b=b.replace(c,"");c=/(direction:[^\/]*)/;b=b.replace(c,"");c=new RegExp("//","g");b=b.replace(c,"/");if(b[b.length-1]!="/")b+="/";location.href=b+a}var cghub={};cghub.url={};
cghub.url.removeParams=function(a){var b=/https?:\/\/([^\/]*)\//;a=a.replace(b,"/");b=/([^\/]+:[^\/]+)/;a=a.replace(b,"");b=/\/?.*\//;b=a.replace(b,"");a=a.replace(b,"");b=new RegExp("//","g");return a=a.replace(b,"/")};cghub.url.current=function(a){var b=document.location.href;if(typeof a=="undefined")a=true;return a?cghub.url.removeParams(b):b};
cghub.url.getNamedParam=function(a,b,c){b=new RegExp(b+":([^/?]+)");a=a.match(b);return a===null||typeof a[1]=="undefined"?typeof c!="undefined"?c:null:a[1]};cghub.url.changeNamedParam=function(a,b,c){var d=cghub.url.getNamedParam(a,b);if(d!==null)return a.replace(b+":"+d,b+":"+c);else if(a.indexOf("?")==-1){if(a.charAt(a.length-1)!="/")a+="/";return a+b+":"+c+"/"}else{d=a.substr(0,a.indexOf("?"));a=a.substr(a.indexOf("?"));if(d.charAt(d.length-1)!="/")d+="/";return d+b+":"+c+"/"+a}};
cghub.invalidateFields=function(a){$(".error-message").remove();function b(f,e){$(f).after('<div class="error-message">'+e+"</div>")}for(field in a)if(field.indexOf(".")!=-1){var c=field.split("."),d="data["+c[0]+"]["+c[1]+"]";if(c.length==3)d+="["+c[2]+"]";c=["submit","reset","radio","password","image","file","checkbox","button","text"];var g="";c.foreach(function(f,e){g+='input[@name="'+d+'"][type="'+e+'"],'});b(g+'textarea[@name="'+d+'"],select[@name="'+d+'"]',a[field])}};
cghub.tree={moveElementData:{from:{pk:0,name:""},to:{pk:0,name:""}}};
cghub.tree.moveElement=function(a,b,c){if(c.charAt(c.length-1)!="/")c+="/";if(cghub.tree.moveElementData.from.name==""){if(a!=0){cghub.tree.moveElementData.from={pk:a,name:b};alert("You have selected '"+b+"' element to move.\n Now select destination element.")}}else if(cghub.tree.moveElementData.to.name==""){cghub.tree.moveElementData.to={pk:a,name:b};if(a=confirm("Move element '"+cghub.tree.moveElementData.from.name+"' to '"+cghub.tree.moveElementData.to.name+"'?")){c+=cghub.tree.moveElementData.from.pk+
"/"+cghub.tree.moveElementData.to.pk+"/";$.ajax({url:c,type:"GET",dataType:"json",success:function(d){d.result=="success"?cghub.refreshPage(true):alert(d.message)},cache:false})}cghub.tree.moveElementData={from:{pk:0,name:""},to:{pk:0,name:""}}}};cghub.user={id:null,avatarUrl:{large:null,thumb:null}};
cghub.user.liveAvatarUrl=function(){if(cghub.user.id===null||cghub.user.avatarUrl.thumb===null||cghub.user.avatarUrl.large===null)return false;$('img[@longdesc^="avatar_'+cghub.user.id+'_"]').each(function(){this.src=this.src.indexOf("thumb")!=-1?cghub.user.avatarUrl.thumb:cghub.user.avatarUrl.large})};$(function(){var a=readCookie("liveAvatarUrl");if(a==null)return false;a=JSON.parse(unescape(a));cghub.user.id=a.id;cghub.user.avatarUrl=a.avatarUrl;cghub.user.liveAvatarUrl()});
cghub.ajaxResponse=function(a){if(typeof a=="object")cghub.parseJsonResponse(a);else a.isJSON()&&cghub.parseJsonResponse(JSON.parse(a))};cghub.parseJsonResponse=function(a){if(typeof a.execute!="undefined"&&cghub.allowedToExecute.in_array(a.execute)){var b=typeof a.params!="undefined"?a.params:[];cghub.execute("cghub.executeMethods."+a.execute,b)}typeof a.invalidate!="undefined"&&cghub.invalidateFields(a.invalidate);typeof a.redirect!="undefined"&&cghub.redirect(a.redirect)};
cghub.execute=function(a,b){if(typeof b[0]=="undefined")b=[b];method=eval(a);$.browser.msie?setTimeout(function(){method.apply(this,b)},100):method.apply(this,b)};cghub.redirect=function(a){document.location.href=a};cghub.refreshPage=function(a){document.location.reload(a)};
(function(d){var f=[];function g(a,e,c){var b=f[a]||(f[a]={loaded:false,callbacks:[]});if(b.loaded)return e.apply(c);b.callbacks.push({fn:e,context:c});b.callbacks.length==1&&d.ajax({type:"GET",url:a,dataType:"script",cache:true,success:function(){b.loaded=true;d.each(b.callbacks,function(){this.fn.apply(this.context)});b.callbacks.length=0}})}d.requireScript=function(a,e,c,b){if(typeof b==="undefined"&&c&&c.hasOwnProperty("parallel")){b=c;c=window}b=d.extend({parallel:true},b);if(typeof a!="string")return g(a,
e,c);var h=0;if(b.parallel)return d.each(a,function(){g(this,function(){++h==a.length&&e.apply(c)})});(function(){if(h==a.length)return e.apply(c);g(a[h++],arguments.callee)})()};d.requireScript.registerLoaded=function(a){d.each(d.makeArray(a),function(){(f[a]||(f[a]={})).loaded=true})}})(jQuery);
this.JSON||(JSON={});
(function(){function k(a){return a<10?"0"+a:a}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+k(this.getUTCMonth()+1)+"-"+k(this.getUTCDate())+"T"+k(this.getUTCHours())+":"+k(this.getUTCMinutes())+":"+k(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var n=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=
/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,l,q={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},i;function p(a){o.lastIndex=0;return o.test(a)?'"'+a.replace(o,function(c){var d=q[c];return typeof d==="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function m(a,c){var d,g,j=f,e,b=c[a];if(b&&typeof b==="object"&&typeof b.toJSON==="function")b=b.toJSON(a);
if(typeof i==="function")b=i.call(c,a,b);switch(typeof b){case "string":return p(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);case "object":if(!b)return"null";f+=l;e=[];if(Object.prototype.toString.apply(b)==="[object Array]"){g=b.length;for(a=0;a<g;a+=1)e[a]=m(a,b)||"null";c=e.length===0?"[]":f?"[\n"+f+e.join(",\n"+f)+"\n"+j+"]":"["+e.join(",")+"]";f=j;return c}if(i&&typeof i==="object"){g=i.length;for(a=0;a<g;a+=1){d=i[a];if(typeof d==="string")if(c=
m(d,b))e.push(p(d)+(f?": ":":")+c)}}else for(d in b)if(Object.hasOwnProperty.call(b,d))if(c=m(d,b))e.push(p(d)+(f?": ":":")+c);c=e.length===0?"{}":f?"{\n"+f+e.join(",\n"+f)+"\n"+j+"}":"{"+e.join(",")+"}";f=j;return c}}if(typeof JSON.stringify!=="function")JSON.stringify=function(a,c,d){var g;l=f="";if(typeof d==="number")for(g=0;g<d;g+=1)l+=" ";else if(typeof d==="string")l=d;if((i=c)&&typeof c!=="function"&&(typeof c!=="object"||typeof c.length!=="number"))throw new Error("JSON.stringify");return m("",
{"":a})};if(typeof JSON.parse!=="function")JSON.parse=function(a,c){function d(g,j){var e,b,h=g[j];if(h&&typeof h==="object")for(e in h)if(Object.hasOwnProperty.call(h,e)){b=d(h,e);if(b!==undefined)h[e]=b;else delete h[e]}return c.call(g,j,h)}n.lastIndex=0;if(n.test(a))a=a.replace(n,function(g){return"\\u"+("0000"+g.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){a=eval("("+a+")");return typeof c==="function"?d({"":a},""):a}throw new SyntaxError("JSON.parse");}})();
(function(c){var a={},f,l,j,k=c.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),m=false;c.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip",alwaysViewportTop:false},block:function(){c.tooltip.blocked=!c.tooltip.blocked}};c.fn.extend({tooltip:function(b){b=c.extend({},c.tooltip.defaults,b);p(b);return this.each(function(){c.data(this,"tooltip",b);this.tOpacity=a.parent.css("opacity");this.tooltipText=this.title;c(this).removeAttr("title");
this.alt=""}).mouseover(q).mouseout(n).click(n)},fixPNG:k?function(){return this.each(function(){var b=c(this).css("backgroundImage");if(b.match(/^url\(["']?(.*\.png)["']?\)$/i)){b=RegExp.$1;c(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+b+"')"}).each(function(){var e=c(this).css("position");e!="absolute"&&e!="relative"&&c(this).css("position","relative")})}})}:function(){return this},unfixPNG:k?function(){return this.each(function(){c(this).css({filter:"",
backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){c(this)[c(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function p(b){if(!a.parent){a.parent=c('<div id="'+b.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();c.fn.bgiframe&&a.parent.bgiframe();a.title=c("h3",a.parent);a.body=c("div.body",a.parent);a.url=c("div.url",a.parent)}}function d(b){return c.data(b,
"tooltip")}function r(b){if(d(this).delay)j=setTimeout(o,d(this).delay);else o();m=!!d(this).track;c(document.body).bind("mousemove",i);i(b)}function q(){if(!(c.tooltip.blocked||this==f||!this.tooltipText&&!d(this).bodyHandler)){f=this;l=this.tooltipText;if(d(this).bodyHandler){a.title.hide();var b=d(this).bodyHandler.call(this);b.nodeType||b.jquery?a.body.empty().append(b):a.body.html(b);a.body.show()}else if(d(this).showBody){b=l.split(d(this).showBody);a.title.html(b.shift()).show();a.body.empty();
for(var e=0,g;g=b[e];e++){e>0&&a.body.append("<br/>");a.body.append(g)}a.body.hideWhenEmpty()}else{a.title.html(l).show();a.body.hide()}d(this).showURL&&c(this).url()?a.url.html(c(this).url().replace("http://","")).show():a.url.hide();a.parent.addClass(d(this).extraClass);d(this).fixPNG&&a.parent.fixPNG();r.apply(this,arguments)}}function o(){j=null;if((!k||!c.fn.bgiframe)&&d(f).fade)if(a.parent.is(":animated"))a.parent.stop().show().fadeTo(d(f).fade,f.tOpacity);else a.parent.is(":visible")?a.parent.fadeTo(d(f).fade,
f.tOpacity):a.parent.fadeIn(d(f).fade);else a.parent.show();i()}function i(b){if(!c.tooltip.blocked)if(!(b&&b.target.tagName=="OPTION")){!m&&a.parent.is(":visible")&&c(document.body).unbind("mousemove",i);if(f==null)c(document.body).unbind("mousemove",i);else{a.parent.removeClass("viewport-right").removeClass("viewport-bottom");var e=a.parent[0].offsetLeft,g=a.parent[0].offsetTop;if(b){e=b.pageX+d(f).left;g=b.pageY+d(f).top;b="auto";if(d(f).positionLeft){b=c(window).width()-e;e="auto"}a.parent.css({left:e,
right:b,top:g})}b=s();var h=a.parent[0];if(b.x+b.cx<h.offsetLeft+h.offsetWidth){e-=h.offsetWidth+20+d(f).left;a.parent.css({left:e+"px"}).addClass("viewport-right")}if(!d(f).alwaysViewportTop&&b.y+b.cy<h.offsetTop+h.offsetHeight){g-=h.offsetHeight+20+d(f).top;a.parent.css({top:g+"px"}).addClass("viewport-bottom")}}}}function s(){return{x:c(window).scrollLeft(),y:c(window).scrollTop(),cx:c(window).width(),cy:c(window).height()}}function n(){if(!c.tooltip.blocked){function b(){a.parent.removeClass(e.extraClass).hide().css("opacity",
"")}j&&clearTimeout(j);f=null;var e=d(this);if((!k||!c.fn.bgiframe)&&e.fade)a.parent.is(":animated")?a.parent.stop().fadeTo(e.fade,0,b):a.parent.stop().fadeOut(e.fade,b);else b();d(this).fixPNG&&a.parent.unfixPNG()}}})(jQuery);
(function(c){var r=c.fn.height,s=c.fn.width;c.fn.extend({height:function(){if(this[0]==window)return self.innerHeight||c.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max(document.body.scrollHeight,document.body.offsetHeight);return r.apply(this,arguments)},width:function(){if(this[0]==window)return self.innerWidth||c.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)return Math.max(document.body.scrollWidth,
document.body.offsetWidth);return s.apply(this,arguments)},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-b(this,"borderTopWidth")-b(this,"borderBottomWidth"):this.height()+b(this,"paddingTop")+b(this,"paddingBottom")},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-b(this,"borderLeftWidth")-b(this,"borderRightWidth"):this.width()+b(this,"paddingLeft")+b(this,
"paddingRight")},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight:this.height()+b(this,"borderTopWidth")+b(this,"borderBottomWidth")+b(this,"paddingTop")+b(this,"paddingBottom")},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth:this.width()+b(this,"borderLeftWidth")+b(this,"borderRightWidth")+b(this,"paddingLeft")+b(this,"paddingRight")},scrollLeft:function(a){if(a!=
undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(a,c(window).scrollTop());else this.scrollLeft=a});if(this[0]==window||this[0]==document)return self.pageXOffset||c.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft},scrollTop:function(a){if(a!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(c(window).scrollLeft(),a);else this.scrollTop=a});if(this[0]==window||this[0]==document)return self.pageYOffset||
c.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop},position:function(a,h){var d=this[0],f=d.parentNode,j=d.offsetParent;a=c.extend({margin:false,border:false,padding:false,scroll:false},a||{});var i=d.offsetLeft,e=d.offsetTop,g=d.scrollLeft,k=d.scrollTop;if(c.browser.mozilla||c.browser.msie){i+=b(d,"borderLeftWidth");e+=b(d,"borderTopWidth")}if(c.browser.mozilla){do{if(c.browser.mozilla&&f!=d&&c.css(f,"overflow")!="visible"){i+=b(f,"borderLeftWidth");
e+=b(f,"borderTopWidth")}if(f==j)break}while((f=f.parentNode)&&(f.tagName.toLowerCase()!="body"||f.tagName.toLowerCase()!="html"))}a=o(d,a,i,e,g,k);if(h){c.extend(h,a);return this}else return a},offset:function(a,h){var d=0,f=0,j=0,i=0,e=this[0],g=this[0],k,n=c.css(e,"position"),l=c.browser.mozilla,m=c.browser.msie,t=c.browser.safari;k=c.browser.opera;var p=false,q=false;a=c.extend({margin:true,border:false,padding:false,scroll:true,lite:false},a||{});if(a.lite)return this.offsetLite(a,h);if(e.tagName.toLowerCase()==
"body"){d=e.offsetLeft;f=e.offsetTop;if(l){d+=b(e,"marginLeft")+b(e,"borderLeftWidth")*2;f+=b(e,"marginTop")+b(e,"borderTopWidth")*2}else if(k){d+=b(e,"marginLeft");f+=b(e,"marginTop")}else if(m&&jQuery.boxModel){d+=b(e,"borderLeftWidth");f+=b(e,"borderTopWidth")}}else{do{k=c.css(g,"position");d+=g.offsetLeft;f+=g.offsetTop;if(l||m){d+=b(g,"borderLeftWidth");f+=b(g,"borderTopWidth");if(l&&k=="absolute")p=true;if(m&&k=="relative")q=true}k=g.offsetParent;if(a.scroll||l){do{if(a.scroll){j+=g.scrollLeft;
i+=g.scrollTop}if(l&&g!=e&&c.css(g,"overflow")!="visible"){d+=b(g,"borderLeftWidth");f+=b(g,"borderTopWidth")}g=g.parentNode}while(g!=k)}g=k;if(g.tagName.toLowerCase()=="body"||g.tagName.toLowerCase()=="html"){if((t||m&&c.boxModel)&&n!="absolute"&&n!="fixed"){d+=b(g,"marginLeft");f+=b(g,"marginTop")}if(l&&!p&&n!="fixed"||m&&n=="static"&&!q){d+=b(g,"borderLeftWidth");f+=b(g,"borderTopWidth")}break}}while(g)}a=o(e,a,d,f,j,i);if(h){c.extend(h,a);return this}else return a},offsetLite:function(a,h){var d=
0,f=0,j=0,i=0,e=this[0],g;a=c.extend({margin:true,border:false,padding:false,scroll:true},a||{});do{d+=e.offsetLeft;f+=e.offsetTop;g=e.offsetParent;if(a.scroll){do{j+=e.scrollLeft;i+=e.scrollTop;e=e.parentNode}while(e!=g)}e=g}while(e&&e.tagName.toLowerCase()!="body"&&e.tagName.toLowerCase()!="html");a=o(this[0],a,d,f,j,i);if(h){c.extend(h,a);return this}else return a}});function b(a,h){return parseInt(c.css(a.jquery?a[0]:a,h))||0}function o(a,h,d,f,j,i){if(!h.margin){d-=b(a,"marginLeft");f-=b(a,"marginTop")}if(h.border&&
(c.browser.safari||c.browser.opera)){d+=b(a,"borderLeftWidth");f+=b(a,"borderTopWidth")}else if(!h.border&&!(c.browser.safari||c.browser.opera)){d-=b(a,"borderLeftWidth");f-=b(a,"borderTopWidth")}if(h.padding){d+=b(a,"paddingLeft");f+=b(a,"paddingTop")}if(h.scroll){j-=a.scrollLeft;i-=a.scrollTop}return h.scroll?{top:f-i,left:d-j,scrollTop:i,scrollLeft:j}:{top:f,left:d}}})(jQuery);
function akst_share(d,a,b,c){var e=jQuery("#akst_form"),g=document.getElementById("akst_post_id");if(e.css("display")=="block"&&g.value==d)e.css("display","none");else{var f=jQuery("#akst_link_"+d);g.value=d;document.getElementById("akst_reddit").href=akst_share_url("http://reddit.com/submit?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_digg").href=akst_share_url("http://digg.com/submit?phase=2&url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_facebook").href=
akst_share_url("http://www.facebook.com/share.php?u={url}&ts={ts}",a,b,c);document.getElementById("akst_myspace").href=akst_share_url("http://www.myspace.com/Modules/PostTo/Pages/?l=3&u={url}&t={title}&ts={ts}",a,b,c);document.getElementById("akst_delicious").href=akst_share_url("http://del.icio.us/post?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_stumbleupon").href=akst_share_url("http://www.stumbleupon.com/submit?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_technorati").href=
akst_share_url("http://www.technorati.com/faves?add={url}&ts={ts}",a,b,c);document.getElementById("akst_google_bmarks").href=akst_share_url("http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_yahoo_bmarks").href=akst_share_url("http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u={url}&t={title}&ts={ts}",a,b,c);document.getElementById("akst_yahoo_myweb").href=akst_share_url("http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}&ts={ts}",
a,b,c);document.getElementById("akst_windows_live").href=akst_share_url("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1&ts={ts}",a,b,c);document.getElementById("akst_propeller").href=akst_share_url("http://www.propeller.com/submit/?U={url}&T={title}&ts={ts}",a,b,c);document.getElementById("akst_friendfeed").href=akst_share_url("http://friendfeed.com/share?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_newsvine").href=akst_share_url("http://www.newsvine.com/_tools/seed&save?popoff=0&u={url}&h={title}&ts={ts}",
a,b,c);document.getElementById("akst_n4g").href=akst_share_url("http://www.n4g.com/tips.aspx?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_mixx").href=akst_share_url("http://www.mixx.com/submit?page_url={url}&ts={ts}",a,b,c);document.getElementById("akst_blinklist").href=akst_share_url("http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}&ts={ts}",a,b,c);document.getElementById("akst_furl").href=akst_share_url("http://furl.net/storeIt.jsp?u={url}&t={title}&ts={ts}",
a,b,c);document.getElementById("akst_magnolia").href=akst_share_url("http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_mister_wong").href=akst_share_url("http://www.mister-wong.com/index.php?action=addurl&bm_url={url}&bm_description={title}&ts={ts}",a,b,c);document.getElementById("akst_blogmarks").href=akst_share_url("http://blogmarks.net/my/new.php?mini=1&url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_faves").href=akst_share_url("http://www.faves.com/Authoring.aspx?u={url}&t={title}&ts={ts}",
a,b,c);document.getElementById("akst_current").href=akst_share_url("http://current.com/clipper.htm?url={url}&title={title}&src=st&ts={ts}",a,b,c);document.getElementById("akst_simpy").href=akst_share_url("http://www.simpy.com/simpy/LinkAdd.do?href={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_slashdot").href=akst_share_url("http://slashdot.org/bookmark.pl?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_meneame").href=akst_share_url("http://meneame.net/submit.php?url={url}&ts={ts}",
a,b,c);document.getElementById("akst_yigg").href=akst_share_url("http://www.yigg.de/neu?exturl={url}&exttitle={title}&ts={ts}",a,b,c);document.getElementById("akst_oknotizie").href=akst_share_url("http://oknotizie.alice.it/post?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_fresqui").href=akst_share_url("http://ocio.fresqui.com/post?url={url}&title={title}&ts={ts}",a,b,c);document.getElementById("akst_diigo").href=akst_share_url("http://secure.diigo.com/post?url={url}&title={title}&ts={ts}",
a,b,c);document.getElementById("akst_care2").href=akst_share_url("http://www.care2.com/news/compose?share[link_url]={url}&share[title]={title}&ts={ts}",a,b,c);document.getElementById("akst_funp").href=akst_share_url("http://funp.com/pages/submit/add.php?title={title}&url={url}&via=tools&ts={ts}",a,b,c);document.getElementById("akst_kirtsy").href=akst_share_url("http://www.kirtsy.com/submit.php?url={url}&ts={ts}",a,b,c);document.getElementById("akst_hugg").href=akst_share_url("http://www.hugg.com/node/add/storylink?edit[title]={title}&edit[url]={url}&ts={ts}",
a,b,c);document.getElementById("akst_sphinn").href=akst_share_url("http://sphinn.com/submit.php?url={url}&ts={ts}",a,b,c);f.parent().is("li")?f.parent().parent().after(e):f.after(e);e.slideDown("fast")}}function akst_share_url(d,a,b,c){d=d.replace("{url}",a);d=d.replace("{title}",b);return d.replace("{ts}",c)}
function akst_share_tab(d){var a=document.getElementById("akst_tab1"),b=document.getElementById("akst_tab2"),c=document.getElementById("akst_tab3"),e=document.getElementById("akst_social"),g=document.getElementById("akst_email"),f=document.getElementById("akst_post");switch(d){case "1":b.className="";c.className="";a.className="selected";f.style.display="none";g.style.display="none";e.style.display="block";break;case "2":a.className="";c.className="";b.className="selected";e.style.display="none";
f.style.display="none";g.style.display="block";break;case "3":a.className="";b.className="";c.className="selected";e.style.display="none";g.style.display="none";f.style.display="block";break}}function akst_morelinks(){var d=$("#akst_more_link").html();if($("#akst_morelinks").is(":visible")){$("#akst_morelinks").hide();d=d.replace("less","more","g")}else{$("#akst_morelinks").show();d=d.replace("more","less","g")}$("#akst_more_link").html(d)};
function saveCollapsedBoxState(a,b,c,e){boxes=readCookie(c);if(boxes==null){createCookie(c,"",999);boxesArray=[]}else boxesArray=boxes.split(",");found=false;for(i=0;i<boxesArray.length;i++){oneBoxArray=boxesArray[i].split(":");if(oneBoxArray[0]==e&&oneBoxArray[1]==a){oneBoxArray[2]=b;found=true;boxesArray[i]=oneBoxArray.join(":");break}}if(!found){oneBoxArray=[];oneBoxArray[0]=e;oneBoxArray[1]=a;oneBoxArray[2]=b;boxesArray[i]=oneBoxArray.join(":")}createCookie(c,boxesArray.join(","))}
function collapseBoxesOnReady(a,b,c){boxes=readCookie(a);if(boxes!=null){boxesArray=boxes.split(",");for(i=0;i<boxesArray.length;i++){oneBoxArray=boxesArray[i].split(":");oneBoxArray[0]==b&&oneBoxArray[2]==0&&document.getElementById(oneBoxArray[1])&&c(oneBoxArray[1])}}}function collapseBox(a,b,c){if($(a).attr("src")=="/img/openit.gif"){$(a).attr("src","/img/closeit.gif");c(a)}else{$(a).attr("src","/img/openit.gif");b(a)}}
$(".side").ready(function(){var a="s",b="colBoxes";function c(d){$("#"+d).find(".boxbody").hide();$("#"+d).find("img.collapser").attr("src","/img/openit.gif")}collapseBoxesOnReady(b,a,c);function e(d){$(d).parents(".box").find(".boxbody").slideUp();saveCollapsedBoxState($(d).parents(".box").attr("id"),0,b,a)}function f(d){$(d).parents(".box").find(".boxbody").slideDown();saveCollapsedBoxState($(d).parents(".box").attr("id"),1,b,a)}$("#sidebar1 img.collapser, #sidebar img.collapser").click(function(){collapseBox(this,
e,f)})});
$("#si_8").ready(function(){var a="f",b="colBoxes";function c(e){$("#"+e).hide();$("#"+e).addClass("closed")}collapseBoxesOnReady(b,a,c);$(".collapser_userfinder").click(function(){if($(this).parents(".boxbody_userfinder").attr("id")=="si_9"){$("#si_9").hide();$("#si_33").show();saveCollapsedBoxState("si_9",0,b,a);saveCollapsedBoxState("si_33",1,b,a);$("#si_9").addClass("closed");$("#si_33").removeClass("closed")}else if($(this).parents(".boxbody_userfinder").attr("id")=="si_33"){$("#si_33").hide();$("#si_9").show();
saveCollapsedBoxState("si_9",1,b,a);saveCollapsedBoxState("si_33",0,b,a);$("#si_33").addClass("closed");$("#si_9").removeClass("closed")}return false});if(!$("#si_9").hasClass("closed")){$("#si_33").hide();$("#si_33").addClass("closed")}});
var generalFeedPage=1,currentFeedType=null;function changeGeneralFeedPage(a){var b;b=a=="next"?generalFeedPage<9?generalFeedPage+1:1:a=="prev"?generalFeedPage>1?generalFeedPage-1:9:1;currentFeedType="general";$.get("/feeds/generalFeed/"+b+"?call=ajax",function(c){if(c!="false"){$("#recentFeedItem").html(c);generalFeedPage=b}})}
function switchFeed(a){if(a=="user"){currentFeedType="user";$.get("/feeds/userFeed/?call=ajax",function(b){if(b!="false"){$("#recentFeedItem").html(b);$("#changeGeneralFeedPageNext").hide();$("#changeGeneralFeedPagePrev").hide();$(".switchfeeds").hide();$("#switchFeedUser img").show();$("#switchFeedGeneral img").hide()}})}else if(a=="general"){currentFeedType="general";$.get("/feeds/generalFeed/1?call=ajax",function(b){if(b!="false"){$("#recentFeedItem").html(b);generalFeedPage=0;$("#changeGeneralFeedPageNext").show();
$("#changeGeneralFeedPagePrev").show();$(".switchfeeds").show();$("#switchFeedGeneral img").show();$("#switchFeedUser img").hide()}})}}function closeFeedBar(){if($("#recentFeedItem").is(":visible")){$("#recentFeedItem").hide();$("img.closefeedsbar").hide();$(".switchfeeds").hide();$(".feedview").hide();$(".openfeedsbar").show();$.get("/feeds/recentClose/close:1/?rand="+Math.random()+"&call=ajax",function(a){})}}
function openFeedBar(a){if(currentFeedType!="")a=currentFeedType;$("#feedloading").show();$(".closefeedsbar").show();$(".openfeedsbar").hide();$.get("/feeds/recentClose/close:0?rand="+Math.random()+"&call=ajax",function(b){setTimeout("openFeedResponse('"+escape(b)+"', '"+a+"')",50)})}
function openFeedResponse(a,b){a=unescape(a);$("#feedloading").hide();if(a!=""){$("#feedloading").remove();$(".closefeedsbar").remove();$("#recentFeedItem").remove();$(".intromenu:first").remove();$("#container").prepend(a);if(b=="user"){$("#changeGeneralFeedPageNext").hide();$("#changeGeneralFeedPagePrev").hide();$("#switchFeedUser img").show();$("#switchFeedGeneral img").hide()}else if(b=="general"){generalFeedPage=0;$("#changeGeneralFeedPageNext").show();$("#changeGeneralFeedPagePrev").show();
$("#switchFeedGeneral img").show();$("#switchFeedUser img").hide()}}};
function expandAllComments(a){var b,c,d,e;a||(a=1);var f=$(".expandLink.closed"),h=0;if(a<=3){for(var g=0;g<f.length;g++){b=$(f[g]).attr("id").split("_");c=b[1];d=b[2];e=b[3];canDeleteComments=b[4];setTimeout("commentExpandThread('"+c+"', "+d+", "+e+", "+canDeleteComments+");",h);h+=100}h+=200;setTimeout("expandAllComments("+(a+1)+")",h);h+=100}if(a==1){a=$("#expandCollapseSpan").html();a=a.replace(/expandAllComments/,"collapseAllComments").replace(/expand\.gif/,"collapse.gif").replace(/Expand all/,
"Collapse All");$("#expandCollapseSpan").html(a)}}function collapseAllComments(){for(var a,b,c,d,e=$(".expandLink.opened"),f=0;f<e.length;f++){a=$(e[f]).attr("id").split("_");b=a[1];c=a[2];d=a[3];canDeleteComments=a[4];commentCollapseThread(b,c,d,canDeleteComments)}a=$("#expandCollapseSpan").html();a=a.replace(/collapseAllComments/,"expandAllComments").replace(/collapse\.gif/,"expand.gif").replace(/Collapse All/,"Expand all");$("#expandCollapseSpan").html(a)}
function addReplyForm(a){var b=$(a).attr("id").split("_");a=b[1];var c=b[2];b=b[3];var d=$("#addCommentFormDiv").html(),e="http://"+siteTopDomain+"/comments/add/"+a+"/"+c+"/"+b;a="comment_textarea_"+a+"_"+c+"_"+b;if(d.indexOf("<form")!=-1||d.indexOf("<FORM")!=-1)d='<form method="post" action="'+e+'" class="nopad"><fieldset style="display: none;"><input name="_method" value="POST" type="hidden"></fieldset><h3>Leave a new comment</h3><div class="clear"></div><textarea name="data[Comment][text]" cols="30" rows="6" style="width: 350px; margin-bottom: 5px;" id="'+
a+'"></textarea><div><input class="btn" value="Submit" type="submit"></div></form>';else if(d.indexOf("to add comment")!=-1){alert("Please log in or sign up to add comment.");return false}else d='<h4>Please <a href="https://cghub.com/login" id="login_link">Log in</a> or <a href="https://cghub.com/registration">Sign up</a> to add comment.</h4>';if($('form[@action="'+e+'"]').length==0){$("#comment_thread_"+b).show();$("#comment_thread_"+b).append(d);$('form[@action="'+e+'"]').show();addWysiwygToTextarea(a);
focusWysiwyg(a);setTimeout("onReadyTooltipSpan()",500)}else if($("#comment_thread_"+b).is(":visible")&&$('form[@action="'+e+'"]').is(":visible"))$('form[@action="'+e+'"]').hide();else{$("#comment_thread_"+b).show();$('form[@action="'+e+'"]').show();focusWysiwyg(a)}return false}
function editCommentForm(a){var b=$(a).attr("id").split("_"),c=b[1],d=$("#addCommentFormDiv").html(),e="http://"+siteTopDomain+"/comments/edit/"+c,f="comment_textarea_"+c,h=$(a).find("img").attr("src");$(a).find("img").attr("src","/img/ajax-loader2.gif");$.ajax({url:"/comments/getCommentTextForEdit/"+c+"/?call=ajax",type:"GET",cache:false,success:function(g){g=g;editCommentAddForm(g,f,d,e,c);$(a).find("img").attr("src",h)}});return false}
function editCommentAddForm(a,b,c,d,e){if(c.indexOf("<form")!=-1||c.indexOf("<FORM")!=-1)c='<form method="post" action="'+d+'" class="nopad"><fieldset style="display: none;"><input name="_method" value="POST" type="hidden"></fieldset><h3>Edit comment</h3><div class="clear"></div><textarea name="data[Comment][text]" cols="30" rows="6" style="width: 350px; margin-bottom: 5px;" id="'+b+'">'+a+'</textarea><div><input class="btn" value="Submit" type="submit"></div></form>';else if(c.indexOf("to edit comment")!=
-1){alert("Please log in or sign up to edit comment.");return false}else c='<h4>Please <a href="https://cghub.com/login" id="login_link">Log in</a> or <a href="https://cghub.com/registration">Sign up</a> to edit comment.</h4>';if($('form[@action="'+d+'"]').length==0){$("#editLink_"+e).parents("li.comment").append(c);$('form[@action="'+d+'"]').show();addWysiwygToTextarea(b);focusWysiwyg(b);setTimeout("onReadyTooltipSpan()",500)}else if($('form[@action="'+d+'"]').is(":visible"))$('form[@action="'+d+
'"]').hide();else{$('form[@action="'+d+'"]').show();focusWysiwyg(b)}}function commentExpandCollapse(a){var b=$(a).attr("id").split("_");a=b[1];var c=b[2],d=b[3];b=b[4];$("#comment_thread_"+d).is(":visible")?commentCollapseThread(a,c,d,b):commentExpandThread(a,c,d,b)}
function commentExpandThread(a,b,c,d){var e=$("#expandLink_"+a+"_"+b+"_"+c+"_"+d),f=$("#comment_thread_"+c).html();if(f=$.browser.msie?f.toLowerCase().trim()!="<div class=clear></div>":f.indexOf('div id="comment_')!=-1){$("#comment_thread_"+c).show();$(e).find("img").attr("src",$("#comment_"+c+" .reply_toggle").attr("src").replace("closed","open"));$(e).removeClass("closed").addClass("opened")}else{$(e).removeClass("closed").addClass("opened");f=$(e).contents()[1].data.trim();var h=/([0-9]+)/;f=h.exec(f)[1];
if(f!=0){var g=$(e).children("img");if($(g).attr("src").indexOf("working2.gif")==-1){$(g).attr("src",$(g).attr("src").replace("toggle/closed.gif","working2.gif"));$.get("/comments/expand/"+a+"/"+b+"/"+c+"/1/"+d+"?call=ajax&rand="+Math.random(),function(i){$(g).attr("src",$(g).attr("src").replace("working2.gif","toggle/open.gif"));if(i!="empty"){$("#comment_thread_"+c).prepend(i);$("#comment_thread_"+c).show();if(!onReadyUserpicTooltipInUse){onReadyUserpicTooltipInUse=true;setTimeout("onReadyUserpicTooltip();onReadyUserpicTooltipInUse = false;",
5000)}}})}}}}function commentCollapseThread(a,b,c,d){a=$("#expandLink_"+a+"_"+b+"_"+c+"_"+d);$(a).removeClass("opened").addClass("closed");$("#comment_thread_"+c).hide();$("#comment_"+c+" .reply_toggle").attr("src",$("#comment_"+c+" .reply_toggle").attr("src").replace("open","closed"))}
function getCommentPage(a){a=$(a).attr("id").split("_");var b=a[1],c=a[2],d=a[3],e=a[4],f=a[5];$.get("/comments/expand/"+b+"/"+c+"/"+d+"/"+e+"/"+f+"?call=ajax&rand="+Math.random(),function(h){$("#getCommentPageDiv_"+b+"_"+c+"_"+d+"_"+e+"_"+f).replaceWith(h);if(!onReadyUserpicTooltipInUse){onReadyUserpicTooltipInUse=true;setTimeout("onReadyUserpicTooltip();onReadyUserpicTooltipInUse = false;",2000)}})}
function commentPreview(a){var b=$(a).parents("form").attr("action");b=b.substr(b.indexOf("/add/")+5);if(b.charAt(b.length-1)!="/")b+="/";var c=$(a).parent("p").siblings("textarea").val();$.post("/comments/preview/"+b+"?call=ajax&rand="+Math.random(),{"data[Comment][text]":c},function(d){d='<div class="preview"><h4>Preview:</h4>'+d+"</div>";$("div.preview").remove();$(a).parents("form").find("h3").after(d)})}var wysiwygEditors=[],wysiwygFramesIds=[];
function addWysiwygToTextarea(a){wysiwygEditors[a]=(new nicEditor({buttonList:["bold","italic","underline","strikethrough","link","unlink","forecolor",,"quote","image","smile","removeformat"]})).panelInstance(a);wysiwygFramesIds[a]=window.frames.length-1}function focusWysiwyg(a){if(typeof window.frames[wysiwygFramesIds[a]]!="undefined")window.frames[wysiwygFramesIds[a]].focus();else typeof window.frames[a]!="undefined"?window.frames[a].focus():$('iframe[@name="'+a+'"]').focus()};
function followUser(b){var a=$("#followLink");a.html("Please wait...");if(a.attr("rel")=="follow")$.post("/followers/follow/"+b+"?call=ajax",{},function(c){c.result=="success"&&a.attr("rel","unfollow").attr("title",c.title);a.html(c.message)},"json");else a.attr("rel")=="unfollow"&&$.post("/followers/unfollow/"+b+"?call=ajax",{},function(c){c.result=="success"&&a.attr("rel","follow").attr("title",c.title);a.html(c.message)},"json");return false}
function subscribeToComments(b,a){$("#subscribeLink_"+b+"_"+a).html("Please wait...");$.post("/subscribes/subscribe/"+b+"/"+a+"?call=ajax",{},function(c){$("#subscribeLink_"+b+"_"+a).html(c)})}function unsubscribeFromComments(b,a){$("#subscribeLink_"+b+"_"+a).html("Please wait...");$.post("/subscribes/unsubscribe/"+b+"/"+a+"?call=ajax",{},function(c){$("#subscribeLink_"+b+"_"+a).html(c)})}
function showFollowers(b){$("#followersDiv").length>0?$("#followersDiv").show():$.get("/feeds/followers/"+b+"?call=ajax&_="+Math.random(),function(a){$(".followmenu li:first").append(a);$("#followersDiv").show()})}function showFollowed(b){$("#followedDiv").length>0?$("#followedDiv").show():$.get("/feeds/followed/"+b+"?call=ajax&_="+Math.random(),function(a){$(".followmenu li:eq(1)").append(a);$("#followedDiv").show()})}
function changeImageSet(b){var a=$(b).attr("id").split("_")[1],c=$(b).val();$(b).after('<img src="http://'+siteTopDomain+'/img/working.gif" class="ajaxWorking" />');$.post("/images/changeSet?call=ajax&_="+Math.random(),{"data[Image][id]":a,"data[Image][image_set_id]":c},function(d){$(".ajaxWorking").remove();if(d=="forbidden")alert("This action is forbidden. Please log in.");else d=="error"&&alert("Error while saving")})}
function switch_theme(b){$.post("/systems/switchTheme/?call=ajax",{theme:b},function(a){window.location.reload(false)})}
function saveStatus(){var b=$("div.editsubmenu div.statusbox input").val();$('div.editsubmenu div.statusbox img[alt="Ok"]').attr("src","/img/load_dark.gif");$.post("/profiles/saveStatus/?call=ajax",{"data[Profile][status]":b},function(a){$('div.editsubmenu div.statusbox img[alt="Ok"]').attr("src","/img/statusok.gif");$(".savedSpan").length==0&&$('div.editsubmenu div.statusbox img[alt="Ok"]').after('<span class="savedSpan"><img src="/img/saved.gif" class="floatleft" style="padding-left:4px;" alt="Saved" /></span>');setTimeout("$('div.editsubmenu div.statusbox .savedSpan').remove()",
5000)})}function showFavorites(b,a){var c=$("#favoriteByDiv");if(c.is(":visible"))c.hide();else{if(c.html().trim()==""){c.html('<img src="/img/load_dark.gif">');$.ajax({url:"/favorites/getUsersByFavorite/"+b+"/"+a,type:"GET",cache:true,success:function(d){c.html(d)}})}c.slideDown("fast")}return false};
function showSubmenu(a){$("#"+a+" .subnavigation").show();$("#"+a+" img.editprofile_popup").attr("src",document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu_show.gif")}function hideSubmenu(a){if(mouseOverMenu!=a){$("#"+a+" .subnavigation").hide();$("#"+a+" img.editprofile_popup").attr("src",document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu.gif")}}
function toggleSubmenuElem(a){if($("#"+a+" .subnavigation").is(":visible")){$("#"+a+" .subnavigation").hide();$("#"+a+" img.editprofile_popup").attr("src",document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu.gif")}else{$("#"+a+" .subnavigation").show();$("#"+a+" img.editprofile_popup").attr("src",document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu_over.gif")}}
function changeSubmenuIcon(a,b){a=$(a);if(b=="opensubmenu_over.gif"){if(a.attr("src")==document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu_show.gif")return false;a.attr("src",document.location.protocol+"//"+siteTopDomain+"/img/opensubmenu_over.gif");return true}a.attr("src",document.location.protocol+"//"+siteTopDomain+"/img/"+b);return true}
function addSubmenuHover(a){$("#"+a+" img.editprofile_popup").bind("mouseenter",function(){mouseOverMenu=a;showSubmenu(a)}).bind("click",function(){toggleSubmenuElem(a)});$("#"+a).bind("mouseenter",function(){mouseOverMenu=a;setTimeout("changeSubmenuIcon('#"+a+" img.editprofile_popup', 'opensubmenu_over.gif')",30)}).bind("mouseleave",function(){mouseOverMenu="";setTimeout("hideSubmenu('"+a+"')",500)})}var mouseOverMenu;
$("#navigation").ready(function(){addSubmenuHover("gallery");addSubmenuHover("forums");addSubmenuHover("users");addSubmenuHover("more");addSubmenuHover("jobs");addSubmenuHover("challenge")});
$("#editprofile_li").ready(function(){$("#editprofile_li img.editprofile_popup").bind("mouseenter",function(){mouseOverMenu="editprofile_li";$("div.editsubmenu").show()}).bind("click",function(){$("div.editsubmenu").toggle()});$("#editprofile_li").bind("mouseenter",function(){mouseOverMenu="editprofile_li"}).bind("mouseleave",function(){mouseOverMenu="";setTimeout("if(mouseOverMenu != 'editprofile_li'){$('div.editsubmenu').hide();}",500)});$("div.editsubmenu").bind("mouseenter",function(){mouseOverMenu=
"editprofile_li"}).bind("mouseleave",function(){mouseOverMenu="";setTimeout("if(mouseOverMenu != 'editprofile_li'){$('div.editsubmenu').hide();}",500)})});$(document).ready(function(){if(!onReadyUserpicTooltipInUse){onReadyUserpicTooltipInUse=true;setTimeout("onReadyUserpicTooltip();onReadyUserpicTooltipInUse = false;",500)}onReadyTooltipSpan()});var onReadyUserpicTooltipInUse=false;
function onReadyUserpicTooltip(){$("a.userpic").tooltip({bodyHandler:function(){var a=$(this).find("img"),b=a.attr("src");b=b.replace("thumb","large");var d=a.attr("alt");b='<img src="'+b+'"><br />'+d;try{var c=$.browser.chrome?a.attr("longdesc").replace(/\|/g,"<br />","g").replace(/avatar_[0-9]+_/,""):a.attr("longdesc").replace("|","<br />","g").replace(/avatar_[0-9]+_/,"");if(c)b+="<br />Status: "+c}catch(e){}return b},track:true,delay:0,showURL:false,showBody:" - ",opacity:1})}
function onReadyTooltipSpan(){$("span.tooltip_span").tooltip({bodyHandler:function(){return $(this).find("span.tooltip_content").html()},track:true,delay:0,showBody:" - ",opacity:0.9})};
cghub.allowedToExecute=["tb_remove","alert","invalidateFields","reloadCaptcha","resizeEnd","pictureRemoved"];cghub.executeMethods=[];cghub.executeMethods.tb_remove=function(b,a,c){typeof c!="undefined"&&c&&alert(c);typeof b!="undefined"&&b=="refresh"&&self.parent.cghub.refreshPage();typeof a!="undefined"&&a!=null&&a!="null"&&a!=false&&a!="false"&&self.parent.cghub.redirect(a);self.parent.tb_remove()};cghub.executeMethods.alert=function(b){typeof b!="undefined"&&b&&alert(b)};
cghub.executeMethods.invalidateFields=function(b){cghub.invalidateFields(b)};cghub.executeMethods.reloadCaptcha=function(){$('img[src*="/captcha/"]').each(function(){$(this).attr("src","/captcha/?"+Math.random())})};cghub.executeMethods.pictureRemoved=function(b,a,c,d){setTimeout(function(){cghub.executeMethods.pictureRemoved[b][a](c,d)},1000)};
cghub.executeMethods.pictureRemoved.Profile={avatar:function(b){var a={id:b,avatarUrl:{thumb:"/img/no_avatar.gif",large:"/img/no_avatar100.gif"}};a=escape(JSON.stringify(a));createCookie("liveAvatarUrl",a,7);a="/resizes/reloadIframe/Profile/avatar/"+b+"/";$(self.parent.document).find("body").append('<iframe src="'+a+'" width="1" height="1" style="width:1px;height:1px;position:absolute;top:-10000px;"></iframe>');self.parent.setTimeout("self.parent.frames[0].window.location.reload(true)",3500);self.parent.setTimeout("$(self.parent.document).find('iframe').remove();",
10000);$(self.parent.document).find("#avatar_for_change").attr("src","/img/no_avatar100.gif");self.parent.cghub.user.id=b;self.parent.cghub.user.avatarUrl={thumb:"/img/no_avatar.gif",large:"/img/no_avatar100.gif"};cghub.user.liveAvatarUrl();cghub.executeMethods.tb_remove(false)},company_image:function(b,a){$(self.parent.document).find('img[@src="'+a.large+'"]').hide();$(self.parent.document).find("#ProfileCompanyImage").val("");cghub.executeMethods.tb_remove(false)},photo:function(b,a){$(self.parent.document).find('img[@src="'+
a.large+'"]').attr("src","/img/no_avatar100.gif");cghub.executeMethods.tb_remove(false)},company_image_big:function(b,a){$(self.parent.document).find('img[@src="'+a.large+'"]').hide();cghub.executeMethods.tb_remove(false)},profile_image:function(b,a){$(self.parent.document).find('img[@src="'+a.large+'"]').hide();$(self.parent.document).find("#profile_image_for_change").hide();cghub.executeMethods.tb_remove(false)}};
cghub.executeMethods.resizeEnd=function(d,a,b,c,e){setTimeout(function(){cghub.executeMethods.resizeEndSpecified[d][a](b,c,e)},1000)};cghub.executeMethods.resizeEndSpecified={};
cghub.executeMethods.resizeEndSpecified.CurrentChallenge={image:function(d,a,b){$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));typeof a.thumbnail!="undefined"&&a.thumbnail!=null&&$(self.parent.document).find("#"+b.thumbImageId).attr("src",a.thumbnail).show();self.parent.tb_remove()}};
cghub.executeMethods.resizeEndSpecified.BlogPost={image:function(d,a,b){$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));typeof a.thumbnail!="undefined"&&a.thumbnail!=null&&$(self.parent.document).find("#"+b.thumbImageId).attr("src",a.thumbnail).show();self.parent.tb_remove()}};
cghub.executeMethods.resizeEndSpecified.ChallengesUser={last_image:function(d,a,b){$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));typeof a.thumbnail!="undefined"&&a.thumbnail!=null&&$(self.parent.document).find("#"+b.thumbImageId).attr("src",a.thumbnail).show();self.parent.tb_remove()}};
cghub.executeMethods.resizeEndSpecified.Editorpick={image:function(d,a,b){if(typeof b.additionalInfo!="undefined"&&b.additionalInfo!=null){d=JSON.parse(unescape(b.additionalInfo));$.ajax({url:"/editorpicks/replaceStep3/"+d.editorpickId+"/",type:"POST",cache:false,data:{thumb:a.versionsHidden.thumb,large:a.versionsHidden.large,crop_x:a.outDimensions.thumb.crop.x,crop_y:a.outDimensions.thumb.crop.y,crop_width:a.outDimensions.thumb.crop.width,crop_height:a.outDimensions.thumb.crop.height,additionalInfo:b.additionalInfo},
success:function(){self.parent.cghub.redirect("/editorpicks/")}})}else{$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));typeof a.thumbnail!="undefined"&&a.thumbnail!=null&&$(self.parent.document).find("#"+b.thumbImageId).attr("src",a.thumbnail).show();self.parent.tb_remove()}}};
cghub.executeMethods.resizeEndSpecified.EditorpickArchive={image:function(d,a,b){$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));typeof a.thumbnail!="undefined"&&a.thumbnail!=null&&$(self.parent.document).find("#"+b.thumbImageId).attr("src",a.thumbnail).show();self.parent.tb_remove()}};
cghub.executeMethods.resizeEndSpecified.Group={avatar:function(d,a){function b(c){c=JSON.parse(c);$(self.parent.document).find('img[longdesc="group_avatar_large"]').attr("src",c.group.avatar.large).show();$(self.parent.document).find('img[longdesc="group_avatar_thumb"]').attr("src",c.group.avatar.thumb).show();cghub.ajaxResponse(c);cghub.executeMethods.tb_remove(false)}$.ajax({url:"/groups/uploadImageOrAvatar/avatar/"+d+"/large:"+a.large+"/thumb:"+a.thumb+"/",type:"GET",cache:false,success:b})},image:function(d,
a){function b(c){c=JSON.parse(c);$(self.parent.document).find('img[longdesc="group_image"]').attr("src",c.group.image.large).show();cghub.ajaxResponse(c);cghub.executeMethods.tb_remove(false)}$.ajax({url:"/groups/uploadImageOrAvatar/image/"+d+"/large:"+a.large+"/",type:"GET",cache:false,success:b})}};
cghub.executeMethods.resizeEndSpecified.GroupImage={image:function(d,a,b){d=b.versionsHiddenId;b=a.versionsHidden;b=escape(JSON.stringify(b));$(self.parent.document).find("#"+d).val(b);$(self.parent.document).find("#thumbnailImage").attr("src",a.thumbnail);cghub.executeMethods.tb_remove(false)}};
cghub.executeMethods.resizeEndSpecified.Image={image:function(d,a,b){$(self.parent.document).find("#"+b.versionsHiddenId).val(escape(JSON.stringify(a.versionsHidden)));$(self.parent.document).find("#"+b.outDimensionsId).val(escape(JSON.stringify(a.outDimensions)));$(self.parent.document).find("#thumbnailImage").attr("src",a.thumbnail);cghub.executeMethods.tb_remove(false)}};
cghub.executeMethods.resizeEndSpecified.Script={image:function(d,a,b){d=b.versionsHiddenId;b=a.versionsHidden;b=escape(JSON.stringify(b));$(self.parent.document).find("#"+d).val(b);$(self.parent.document).find("#thumbnailImage").attr("src",a.thumbnail);cghub.executeMethods.tb_remove(false)}};
cghub.executeMethods.resizeEndSpecified.SplashImage={image:function(d,a){$.ajax({type:"POST",url:"/splash_images/versionsEnd/"+d+"/",data:{"data[SplashImage][outDimensions]":JSON.stringify(a.outDimensions),"data[SplashImage][largeVersionFile]":a.versionsHidden.large},cache:false,success:function(){cghub.executeMethods.tb_remove(false)}})}};
cghub.executeMethods.resizeEndSpecified.Profile={avatar:function(d,a){function b(c){var e={id:d,avatarUrl:{thumb:c.profile.avatar.thumb,large:c.profile.avatar.large}};e=escape(JSON.stringify(e));createCookie("liveAvatarUrl",e,7);e="/resizes/reloadIframe/Profile/avatar/"+c.id+"/";$(self.parent.document).find("body").append('<iframe src="'+e+'" width="1" height="1" style="width:1px;height:1px;position:absolute;top:-10000px;"></iframe>');self.parent.setTimeout("self.parent.frames[0].window.location.reload(true)",
3500);self.parent.setTimeout("$(self.parent.document).find('iframe').remove();",10000);$(self.parent.document).find("#avatar_for_change").attr("src",c.profile.avatar.large);self.parent.cghub.user.id=c.id;self.parent.cghub.user.avatarUrl={thumb:"/profiles/avatar/"+c.id+"/thumb/",large:"/profiles/avatar/"+c.id+"/large/"};cghub.user.liveAvatarUrl();cghub.ajaxResponse(c);cghub.executeMethods.tb_remove(false)}$.ajax({url:"/profiles/upload/avatar/"+d+"/large:"+a.large+"/thumb:"+a.thumb+"/",type:"GET",cache:false,
dataType:"json",success:function(c){b(c)}})},photo:function(d,a){function b(c){$(self.parent.document).find("#photo_for_change").attr("src",c.profile.photo.large);cghub.ajaxResponse(c);cghub.executeMethods.tb_remove(false)}$.ajax({url:"/profiles/upload/photo/"+d+"/large:"+a.large+"/",type:"GET",cache:false,dataType:"json",success:b})},company_image_big:function(d,a){function b(c){cghub.ajaxResponse(c);$(self.parent.document).find("#company_image_big_for_change").attr("src",c.profile.company_image_big.large).show();
cghub.executeMethods.tb_remove(false)}$.ajax({url:"/profiles/upload/company_image_big/"+d+"/large:"+a.large+"/",type:"GET",cache:false,dataType:"json",success:b})},profile_image:function(d,a){function b(c){cghub.ajaxResponse(c);$(self.parent.document).find("#profile_image_for_change").attr("src",c.profile.profile_image.large).show();cghub.executeMethods.tb_remove(false)}$.ajax({url:"/profiles/upload/profile_image/"+d+"/large:"+a.large+"/",type:"GET",cache:false,dataType:"json",success:b})}};
