(function(a){a.fn.jHelperTip=function(c){var e=a.extend({},a.fn.jHelperTip.defaults,c);if(a(e.ttC).length==0){a('<div id="'+e.ttC.slice(1)+'"></div>').appendTo("body")}if(a(e.dC).length==0){a('<div id="'+e.dC.slice(1)+'"></div>').appendTo("body")}if(a(e.aC).length==0){a('<div id="'+e.aC.slice(1)+'"></div>').appendTo("body")}a(e.ttC).add(e.aC).css({position:"absolute",display:"inline"}).hide();a(e.dC).hide();var f=function(){if(e.source=="attribute"){a(e.aC).hide().empty()}else{a(e.ttC).hide().empty()}};a(".jHelperTipClose").bind("click",f);a(e.ttC).bind("mouseover",function(){a(e.ttC).show();return false});var b=function(h,g){if(e.source=="ajax"){d(g);a(e.ttC).html('<div><img src="'+e.loadingImg+'"/> '+e.loadingText+"</div>").show();a.ajax({type:e.type,url:e.url,data:e.data,success:function(i){a(e.ttC).html(i);a(".jHelperTipClose").unbind("click",f);a(".jHelperTipClose").bind("click",f)}})}else{if(e.source=="container"){a(e.ttC).show().empty();a(e.dC).clone(true).show().appendTo(e.ttC)}}if(e.source=="attribute"){a(e.aC).html(a(h).attr(e.attrName))}};var d=function(i){var h=i.pageY+e.topOff;var g=i.pageX+e.leftOff;if(e.source=="attribute"){a(e.aC).css({top:h,left:g,opacity:e.opacity}).show()}else{a(e.ttC).css({top:h,left:g,opacity:e.opacity}).show()}};if(e.trigger=="hover"){a(this).bind("mouseover",function(g){g.preventDefault();b(this,g);return false});a(this).bind("mousemove",function(g){d(g);return false});a(this).bind("mouseout",function(g){if(e.source=="attribute"){a(e.aC).hide().empty()}else{a(e.ttC).hide().empty()}return false})}else{if(e.trigger=="click"){a(this).bind("click",function(g){b(this,g);d(g);a(document).bind("click",function(h){if(e.autoClose){if(e.source=="attribute"){a(e.aC).hide().empty()}else{a(e.ttC).hide().empty()}}});return false})}}};a.fn.jHelperTip.defaults={trigger:"click",topOff:3,leftOff:10,source:"container",attrName:"",ttC:"#jHelperTipContainer",dC:"#jHelperTipDataContainer",aC:"#jHelperTipAttrContainer",opacity:1,loadingImg:"ajax-loader.gif",loadingText:"Loading...",type:"GET",autoClose:true}})(jQuery);(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(l,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(l).attr("autocomplete","off").addClass(g.inputClass);var j;var p="";var m=a.Autocompleter.Cache(g);var e=0;var u;var x={mouseDownOnSelect:false};var r=a.Autocompleter.Select(g,l,d,x);var w;a.browser.opera&&a(l.form).bind("submit.autocomplete",function(){if(w){w=false;return false}});b.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(y){u=y.keyCode;switch(y.keyCode){case c.UP:y.preventDefault();if(r.visible()){r.prev()}else{t(0,true)}break;case c.DOWN:y.preventDefault();if(r.visible()){r.next()}else{t(0,true)}break;case c.PAGEUP:y.preventDefault();if(r.visible()){r.pageUp()}else{t(0,true)}break;case c.PAGEDOWN:y.preventDefault();if(r.visible()){r.pageDown()}else{t(0,true)}break;case g.multiple&&a.trim(g.multipleSeparator)==","&&c.COMMA:case c.TAB:case c.RETURN:if(d()){y.preventDefault();w=true;return false}break;case c.ESC:r.hide();break;default:clearTimeout(j);j=setTimeout(t,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!x.mouseDownOnSelect){s()}}).click(function(){if(e++>1&&!r.visible()){t(0,true)}}).bind("search",function(){var y=(arguments.length>1)?arguments[1]:null;function z(D,C){var A;if(C&&C.length){for(var B=0;B<C.length;B++){if(C[B].result.toLowerCase()==D.toLowerCase()){A=C[B];break}}}if(typeof y=="function"){y(A)}else{b.trigger("result",A&&[A.data,A.value])}}a.each(h(b.val()),function(A,B){f(B,z,z)})}).bind("flushCache",function(){m.flush()}).bind("setOptions",function(){a.extend(g,arguments[1]);if("data" in arguments[1]){m.populate()}}).bind("unautocomplete",function(){r.unbind();b.unbind();a(l.form).unbind(".autocomplete")});function d(){var z=r.selected();if(!z){return false}var y=z.result;p=y;if(g.multiple){var A=h(b.val());if(A.length>1){y=A.slice(0,A.length-1).join(g.multipleSeparator)+g.multipleSeparator+y}y+=g.multipleSeparator}b.val(y);v();b.trigger("result",[z.data,z.value]);return true}function t(A,z){if(u==c.DEL){r.hide();return}var y=b.val();if(!z&&y==p){return}p=y;y=i(y);if(y.length>=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){y=y.toLowerCase()}f(y,k,v)}else{n();r.hide()}}function h(z){if(!z){return[""]}var A=z.split(g.multipleSeparator);var y=[];a.each(A,function(B,C){if(a.trim(C)){y[B]=a.trim(C)}});return y}function i(y){if(!g.multiple){return y}var z=h(y);return z[z.length-1]}function q(y,z){if(g.autoFill&&(i(b.val()).toLowerCase()==y.toLowerCase())&&u!=c.BACKSPACE){b.val(b.val()+z.substring(i(p).length));a.Autocompleter.Selection(l,p.length,p.length+z.length)}}function s(){clearTimeout(j);j=setTimeout(v,200)}function v(){var y=r.visible();r.hide();clearTimeout(j);n();if(g.mustMatch){b.search(function(z){if(!z){if(g.multiple){var A=h(b.val()).slice(0,-1);b.val(A.join(g.multipleSeparator)+(A.length?g.multipleSeparator:""))}else{b.val("")}}})}if(y){a.Autocompleter.Selection(l,l.value.length,l.value.length)}}function k(z,y){if(y&&y.length&&e){n();r.display(y,z);q(z,y[0].value);r.show()}else{v()}}function f(z,B,y){if(!g.matchCase){z=z.toLowerCase()}var A=m.load(z);if(A&&A.length){B(z,A)}else{if((typeof g.url=="string")&&(g.url.length>0)){var C={timestamp:+new Date()};a.each(g.extraParams,function(D,E){C[D]=typeof E=="function"?E():E});a.ajax({mode:"abort",port:"autocomplete"+l.name,dataType:g.dataType,url:g.url,data:a.extend({q:i(z),limit:g.max},C),success:function(E){var D=g.parse&&g.parse(E)||o(E);m.add(z,D);B(z,D)}})}else{r.emptyList();y(z)}}}function o(B){var y=[];var A=B.split("\n");for(var z=0;z<A.length;z++){var C=a.trim(A[z]);if(C){C=C.split("|");y[y.length]={data:C,value:C[0],result:g.formatResult&&g.formatResult(C,C[0])||C[0]}}}return y}function n(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function h(l,k){if(!c.matchCase){l=l.toLowerCase()}var j=l.indexOf(k);if(j==-1){return false}return j==0||c.matchContains}function g(j,i){if(d>c.cacheLength){b()}if(!f[j]){d++}f[j]=i}function e(){if(!c.data){return false}var k={},j=0;if(!c.url){c.cacheLength=1}k[""]=[];for(var m=0,l=c.data.length;m<l;m++){var p=c.data[m];p=(typeof p=="string")?[p]:p;var o=c.formatMatch(p,m+1,c.data.length);if(o===false){continue}var n=o.charAt(0).toLowerCase();if(!k[n]){k[n]=[]}var q={value:o,data:p,result:c.formatResult&&c.formatResult(p)||o};k[n].push(q);if(j++<c.max){k[""].push(q)}}a.each(k,function(r,s){c.cacheLength++;g(r,s)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&&c.matchContains){var m=[];for(var j in f){if(j.length>0){var o=f[j];a.each(o,function(p,k){if(h(k.value,n)){m.push(k)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l>=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(p,k){if(h(k.value,n)){m[m.length]=k}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,j,l,p){var i={ACTIVE:"ac_over"};var k,f=-1,r,m="",s=true,c,o;function n(){if(!s){return}c=a("<div/>").hide().addClass(e.resultsClass).css("position","absolute").appendTo(document.body);o=a("<ul/>").appendTo(c).mouseover(function(t){if(q(t).nodeName&&q(t).nodeName.toUpperCase()=="LI"){f=a("li",o).removeClass(i.ACTIVE).index(q(t));a(q(t)).addClass(i.ACTIVE)}}).click(function(t){a(q(t)).addClass(i.ACTIVE);l();j.focus();return false}).mousedown(function(){p.mouseDownOnSelect=true}).mouseup(function(){p.mouseDownOnSelect=false});if(e.width>0){c.css("width",e.width)}s=false}function q(u){var t=u.target;while(t&&t.tagName!="LI"){t=t.parentNode}if(!t){return[]}return t}function h(t){k.slice(f,f+1).removeClass(i.ACTIVE);g(t);var v=k.slice(f,f+1).addClass(i.ACTIVE);if(e.scroll){var u=0;k.slice(0,f).each(function(){u+=this.offsetHeight});if((u+v[0].offsetHeight-o.scrollTop())>o[0].clientHeight){o.scrollTop(u+v[0].offsetHeight-o.innerHeight())}else{if(u<o.scrollTop()){o.scrollTop(u)}}}}function g(t){f+=t;if(f<0){f=k.size()-1}else{if(f>=k.size()){f=0}}}function b(t){return e.max&&e.max<t?e.max:t}function d(){o.empty();var u=b(r.length);for(var v=0;v<u;v++){if(!r[v]){continue}var w=e.formatItem(r[v].data,v+1,u,r[v].value,m);if(w===false){continue}var t=a("<li/>").html(e.highlight(w,m)).addClass(v%2==0?"ac_even":"ac_odd").appendTo(o)[0];a.data(t,"ac_data",r[v])}k=o.find("li");if(e.selectFirst){k.slice(0,1).addClass(i.ACTIVE);f=0}if(a.fn.bgiframe){o.bgiframe()}}return{display:function(u,t){n();r=u;m=t;d()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&&f-8<0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=k.size()-1&&f+8>k.size()){h(k.size()-1-f)}else{h(8)}},hide:function(){c&&c.hide();k&&k.removeClass(i.ACTIVE);f=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(k.filter("."+i.ACTIVE)[0]||e.selectFirst&&k[0])},show:function(){var v=a(j).offset();c.css({width:typeof e.width=="string"||e.width>0?e.width:a(j).width(),top:v.top+j.offsetHeight,left:v.left}).show();if(e.scroll){o.scrollTop(0);o.css({maxHeight:e.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var t=0;k.each(function(){t+=this.offsetHeight});var u=t>e.scrollHeight;o.css("height",u?e.scrollHeight:t);if(!u){k.width(o.width()-parseInt(k.css("padding-left"))-parseInt(k.css("padding-right")))}}}},selected:function(){var t=k&&k.filter("."+i.ACTIVE).removeClass(i.ACTIVE);return t&&t.length&&a.data(t[0],"ac_data")},emptyList:function(){o&&o.empty()},unbind:function(){c&&c.remove()}}};a.Autocompleter.Selection=function(d,e,c){if(d.createTextRange){var b=d.createTextRange();b.collapse(true);b.moveStart("character",e);b.moveEnd("character",c);b.select()}else{if(d.setSelectionRange){d.setSelectionRange(e,c)}else{if(d.selectionStart){d.selectionStart=e;d.selectionEnd=c}}}d.focus()}})(jQuery);var tb_pathToImage="http://backpack.fantasti.cc/templates/images/action.gif";
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(a){$(a).click(function(){var c=this.title||this.name||null;var b=this.href||this.alt;var d=this.rel||false;tb_show(c,b,d);this.blur();return false})}function tb_show(j,b,h){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(j===null){j=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var c;if(b.indexOf("?")!==-1){c=b.substr(0,b.indexOf("?"))}else{c=b}var f=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var k=c.toLowerCase().match(f);if(k==".jpg"||k==".jpeg"||k==".png"||k==".gif"||k==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(h){TB_TempArray=$("a[@rel="+h+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(f);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var n=tb_getPageSize();var l=n[0]-150;var q=n[1]-150;var m=imgPreloader.width;var e=imgPreloader.height;if(m>l){e=e*(l/m);m=l;if(e>q){m=m*(q/e);e=q}}else{if(e>q){m=m*(q/e);e=q;if(m>l){e=e*(l/m);m=l}}}TB_WIDTH=m+30;TB_HEIGHT=e+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+b+"' width='"+m+"' height='"+e+"' alt='"+j+"'/></a><div id='TB_caption'>"+j+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function p(){if($(document).unbind("click",p)){$(document).unbind("click",p)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,h);return false}$("#TB_prev").click(p)}if(!(TB_NextHTML==="")){function o(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,h);return false}$("#TB_next").click(o)}document.onkeydown=function(r){if(r==null){keycode=event.keyCode}else{keycode=r.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";o()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";p()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var a=b.replace(/^[^\?]+\??/,"");var d=tb_parseQuery(a);TB_WIDTH=(d.width*1)+30||630;TB_HEIGHT=(d.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");$("#TB_iframeContent").remove();if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+j+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+j+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(j)}}$("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+d.inlineId).children());$("#TB_window").unload(function(){$("#"+d.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!d.modal){document.onkeyup=function(l){if(l==null){keycode=event.keyCode}else{keycode=l.which}if(keycode==27){tb_remove()}}}}catch(i){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(d){var e={};if(!d){return e}var a=d.split(/[;&]/);for(var c=0;c<a.length;c++){var g=a[c].split("=");if(!g||g.length!=2){continue}var b=unescape(g[0]);var f=unescape(g[1]);f=f.replace(/\+/g," ");e[b]=f}return e}function tb_getPageSize(){var c=document.documentElement;var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}$.fn.prettyComments=function(e){e=jQuery.extend({animate:false,animationSpeed:"fast",maxHeight:500,alreadyAnimated:false,init:true},e);$("body").append('<div id="comment_hidden"></div>');var a=function(f){$("#comment_hidden").css({position:"absolute",top:-10000,left:-10000,width:$(f).width(),"min-height":$(f).height(),"font-family":$(f).css("font-family"),"font-size":$(f).css("font-size"),"line-height":$(f).css("line-height")});if($.browser.msie&&parseFloat($.browser.version)<7){$("#comment_hidden").css("height",$(f).height())}};var d=function(f){theValue=$(f).attr("value")||"";theValue=theValue.replace(/\n/g,"<br />");$("#comment_hidden").html(theValue+"<br />");if(!e.init){if($("#comment_hidden").height()>$(f).height()){if($("#comment_hidden").height()>e.maxHeight){$(f).css("overflow-y","scroll")}else{$(f).css("overflow-y","hidden");c(f)}}else{if($("#comment_hidden").height()<$(f).height()){if($("#comment_hidden").height()>e.maxHeight){$(f).css("overflow-y","scroll")}else{$(f).css("overflow-y","hidden");b(f)}}}}};var c=function(f){if(e.animate&&!e.alreadyAnimated){e.alreadyAnimated=true;$(f).animate({height:$("#comment_hidden").height()},e.animationSpeed,function(){e.alreadyAnimated=false})}else{if(!e.animate&&!e.alreadyAnimated){$(f).height($("#comment_hidden").height())}}};var b=function(f){if(e.animate&&!e.alreadyAnimated){e.alreadyAnimated=true;$(f).animate({height:$("#comment_hidden").height()},e.animationSpeed,function(){e.alreadyAnimated=false})}else{$(f).height($("#comment_hidden").height())}};$(this).each(function(){$(this).css({overflow:"hidden"}).bind("keyup",function(){d($(this))});a(this);d($(this));if($("#comment_hidden").height()>e.maxHeight){$(this).css({"overflow-y":"scroll",height:e.maxHeight})}else{$(this).height($("#comment_hidden").height())}e.init=false})};(function(a){a.fn.charCounter=function(b,c){b=b||100;c=a.extend({container:"<span></span>",classname:"charcounter",format:"(%1 characters remaining)",pulse:true,delay:0},c);var g,f;function e(i,h){i=a(i);if(i.val().length>b){i.val(i.val().substring(0,b));if(c.pulse&&!g){d(h,true)}}if(c.delay>0){if(f){window.clearTimeout(f)}f=window.setTimeout(function(){h.html(c.format.replace(/%1/,(b-i.val().length)))},c.delay)}else{h.html(c.format.replace(/%1/,(b-i.val().length)))}}function d(h,i){if(g){window.clearTimeout(g);g=null}h.animate({opacity:0.1},100,function(){a(this).animate({opacity:1},100)});if(i){g=window.setTimeout(function(){d(h)},200)}}return this.each(function(){var h=(!c.container.match(/^<.+>$/))?a(c.container):a(c.container).insertAfter(this).addClass(c.classname);a(this).bind("keydown",function(){e(this,h)}).bind("keypress",function(){e(this,h)}).bind("keyup",function(){e(this,h)}).bind("focus",function(){e(this,h)}).bind("mouseover",function(){e(this,h)}).bind("mouseout",function(){e(this,h)}).bind("paste",function(){var i=this;setTimeout(function(){e(i,h)},10)});if(this.addEventListener){this.addEventListener("input",function(){e(this,h)},false)}e(this,h)})}})(jQuery);(function(a){a.fn.extend({defaultValue:function(b){return this.each(function(){var d=b||a(this).attr("rel");var h=a(this).attr("type")||null;var f=null;var e=a(this);if(h=="password"){c(this);a(this).blur(function(){if(a(e).val().length<=0){a("#"+f).show();a(e).hide()}})}else{a(this).click(function(){if(a(this).val()==d){a(this).val("")}}).keypress(function(){if(a(this).val().length>0){g(this)}}).blur(function(){g(this)}).focus(function(){if(a(this).val()==d){a(this).val("")}});a.trim(a(this).val());g(this)}function g(i){val=a.trim(a(i).val());if(val.length<=0||val==d){a(i).val(d).addClass("empty")}else{a(i).removeClass("empty")}}function c(i){f=a(i).attr("id")+"Clone";a("<input id='"+f+"' type='text' />").attr("value",d).insertAfter(i).show().focus(function(){a(this).hide();a(e).show();setTimeout(function(){a(e).focus()},10)}).addClass(a(i).attr("class")+" empty").attr("style",a(i).attr("style"));a(e).hide()}})}})})(jQuery);jQuery.fn.inputValue=function(a){var b=jQuery.extend({allow:"",disallow:""},a);return jQuery(this).keypress(function(d){if(!d.charCode){var c=String.fromCharCode(d.which)}else{var c=String.fromCharCode(d.charCode)}if(c&&(typeof(d.keyCode)=="undefined"||(d.keyCode!=8&&d.keyCode!=46))){if(b.allow.length!=0&&b.disallow.length!=0){if(b.allow.indexOf(c)==-1){d.preventDefault()}else{if(b.disallow.indexOf(c)!=-1){d.preventDefault()}}}else{if(b.allow.length!=0){if(b.allow.indexOf(c)==-1){d.preventDefault()}}else{if(b.disallow.length!=0){if(b.disallow.indexOf(c)!=-1){d.preventDefault()}}}}}if(d.ctrlKey&&c=="v"){d.preventDefault()}$(this).bind("contextmenu",function(){return false})})};jQuery.fn.inputEmail=function(){return this.each(function(){jQuery(this).inputValue({allow:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@.0123456789"})})};jQuery.fn.inputInteger=function(){return this.each(function(){jQuery(this).inputValue({allow:"9876543210"})})};jQuery.fn.inputFloat=function(){return this.each(function(){jQuery(this).inputValue({allow:"0123456789."})})};jQuery.fn.inputLetter=function(){return this.each(function(){jQuery(this).inputValue({allow:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"})})};var ddsmoothmenu={arrowimages:{down:["downarrowclass","http://backpack.fantasti.cc/js/css/i/down.gif",23],right:["rightarrowclass","http://backpack.fantasti.cc/js/css/i/right.gif"]},transition:{overtime:200,outtime:200},shadow:{enabled:false},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,getajaxmenu:function(c,b){var a=c("#"+b.contentsource[0]);a.html("Loading Menu...");c.ajax({url:b.contentsource[1],async:true,error:function(d){a.html("Error fetching content. Server Response: "+d.responseText)},success:function(d){a.html(d);ddsmoothmenu.buildmenu(c,b)}})},buildshadow:function(b,a){},buildmenu:function(d,b){var e=ddsmoothmenu;var a=d("#"+b.mainmenuid+">ul");var c=a.find("ul").parent();c.hover(function(f){d(this).children("a:eq(0)").addClass("selected")},function(f){d(this).children("a:eq(0)").removeClass("selected")});c.each(function(g){var j=d(this).css({zIndex:100-g});var f=d(this).find("ul:eq(0)").css({display:"block"});this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:f.outerWidth(),subulh:f.outerHeight()};this.istopheader=j.parents("ul").length==1?true:false;f.css({top:this.istopheader?this._dimensions.h+"px":0});j.children("a:eq(0)").css(this.istopheader?{paddingRight:e.arrowimages.down[2]}:{}).append('<img src="'+(this.istopheader?e.arrowimages.down[1]:e.arrowimages.right[1])+'" class="'+(this.istopheader?e.arrowimages.down[0]:e.arrowimages.right[0])+'" style="border:0;" />');if(e.shadow.enabled){this._shadowoffset={x:(this.istopheader?f.offset().left+e.shadow.offsetx:this._dimensions.w),y:(this.istopheader?f.offset().top+e.shadow.offsety:j.position().top)};if(this.istopheader){$parentshadow=d(document.body)}else{var h=j.parents("li:eq(0)");$parentshadow=h.get(0).$shadow}this.$shadow=d('<div class="ddshadow'+(this.istopheader?" toplevelshadow":"")+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+"px",top:this._shadowoffset.y+"px"})}j.hover(function(m){var l=d(this).children("ul:eq(0)");this._offsets={left:d(this).offset().left,top:d(this).offset().top};var n=this.istopheader?0:this._dimensions.w;n=(this._offsets.left+n+this._dimensions.subulw>d(window).width())?(this.istopheader?-this._dimensions.subulw+this._dimensions.w:-this._dimensions.w):n;if(l.queue().length<=1){l.css({left:n+"px",width:this._dimensions.subulw+"px"}).animate({height:"show",opacity:"show"},ddsmoothmenu.transition.overtime);if(e.shadow.enabled){var k=this.istopheader?l.offset().left+ddsmoothmenu.shadow.offsetx:n;var i=this.istopheader?l.offset().top+e.shadow.offsety:this._shadowoffset.y;if(!this.istopheader&&ddsmoothmenu.detectwebkit){this.$shadow.css({opacity:1})}this.$shadow.css({overflow:"",width:this._dimensions.subulw+"px",left:k+"px",top:i+"px"}).animate({height:this._dimensions.subulh+"px"},ddsmoothmenu.transition.overtime)}}},function(k){var i=d(this).children("ul:eq(0)");i.animate({height:"hide",opacity:"hide"},ddsmoothmenu.transition.outtime);if(e.shadow.enabled){if(ddsmoothmenu.detectwebkit){this.$shadow.children("div:eq(0)").css({opacity:0})}this.$shadow.css({overflow:"hidden"}).animate({height:0},ddsmoothmenu.transition.outtime)}})});a.find("ul").css({display:"none",visibility:"visible"})},init:function(b){if(typeof b.customtheme=="object"&&b.customtheme.length==2){var a="#"+b.mainmenuid;document.write('<style type="text/css">\n'+a+", "+a+" ul li a {background:"+b.customtheme[0]+";}\n"+a+" ul li a:hover {background:"+b.customtheme[1]+";}\n</style>")}jQuery(document).ready(function(c){if(typeof b.contentsource=="object"){ddsmoothmenu.getajaxmenu(c,b)}else{ddsmoothmenu.buildmenu(c,b)}})}};ddsmoothmenu.init({mainmenuid:"smoothmenu1",contentsource:"markup"});jQuery.fn.extend({delayedObserver:function(a,b){$this=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(c){observed=window.delayedObserverStack[c];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj.val(),observed.obj)},observed.delay*1000);observed.oldVal=observed.obj.val()}}window.delayedObserverStack.push({obj:$this,timer:null,delay:a,oldVal:$this.val(),callback:b});stackPos=window.delayedObserverStack.length-1;$this.keyup(function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.val()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}});jQuery.fn.extend({delayedObserver:function(d,c){$this=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(a){observed=window.delayedObserverStack[a];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj.val(),observed.obj)},observed.delay*1000);observed.oldVal=observed.obj.val()}}window.delayedObserverStack.push({obj:$this,timer:null,delay:d,oldVal:$this.val(),callback:c});stackPos=window.delayedObserverStack.length-1;$this.keyup(function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.val()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}});
