var JSON;JSON||(JSON={});
(function(){function b(b){return b<10?"0"+b:b}function c(b){e.lastIndex=0;return e.test(b)?'"'+b.replace(e,function(b){var d=i[b];return typeof d==="string"?d:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function a(b,d){var e,i,m,p,q=f,n,k=d[b];if(k&&typeof k==="object"&&typeof k.toJSON==="function")return k.toJSON(b);typeof h==="function"&&(k=h.call(d,b,k));switch(typeof k){case "string":return c(k);case "number":return isFinite(k)?String(k):"null";case "boolean":case "null":return String(k);
case "object":if(!k)return"null";f+=g;n=[];if(Object.prototype.toString.apply(k)==="[object Array]"){p=k.length;for(e=0;e<p;e+=1)n[e]=a(e,k)||"null";m=n.length===0?"[]":f?"[\n"+f+n.join(",\n"+f)+"\n"+q+"]":"["+n.join(",")+"]";f=q;return m}if(h&&typeof h==="object"){p=h.length;for(e=0;e<p;e+=1)typeof h[e]==="string"&&(i=h[e],(m=a(i,k))&&n.push(c(i)+(f?": ":":")+m))}else for(i in k)Object.prototype.hasOwnProperty.call(k,i)&&(m=a(i,k))&&n.push(c(i)+(f?": ":":")+m);m=n.length===0?"{}":f?"{\n"+f+n.join(",\n"+
f)+"\n"+q+"}":"{"+n.join(",")+"}";f=q;return m}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?c(this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z"):null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return c(this.valueOf())};var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,i={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;JSON.stringify=function(b,d,e){var c;g=f="";if(typeof e==="number")for(c=0;c<e;c+=1)g+=" ";else typeof e==="string"&&(g=e);if((h=d)&&typeof d!=="function"&&(typeof d!=="object"||typeof d.length!=="number"))throw Error("JSON.stringify");return a("",{"":b})};if(typeof JSON.parse!=="function")JSON.parse=
function(b,e){function a(b,d){var c,f,g=b[d];if(g&&typeof g==="object")for(c in g)Object.prototype.hasOwnProperty.call(g,c)&&(f=a(g,c),f!==void 0?g[c]=f:delete g[c]);return e.call(b,d,g)}var c,b=String(b);d.lastIndex=0;d.test(b)&&(b=b.replace(d,function(b){return"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
"")))return c=eval("("+b+")"),typeof e==="function"?a({"":c},""):c;throw new SyntaxError("JSON.parse");}})();jQuery.noConflict();
(function(b){function c(b){return typeof b=="object"?b:{top:b,left:b}}var a=b.scrollTo=function(d,e,a){b(window).scrollTo(d,e,a)};a.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};a.window=function(){return b(window)._scrollable()};b.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&b.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])==-1)return this;var d=(this.contentWindow||this).document||this.ownerDocument||this;return b.browser.safari||
d.compatMode=="BackCompat"?d.body:d.documentElement})};b.fn.scrollTo=function(d,e,f){typeof e=="object"&&(f=e,e=0);typeof f=="function"&&(f={onAfter:f});d=="max"&&(d=9E9);f=b.extend({},a.defaults,f);e=e||f.speed||f.duration;f.queue=f.queue&&f.axis.length>1;f.queue&&(e/=2);f.offset=c(f.offset);f.over=c(f.over);return this._scrollable().each(function(){function g(b){h.animate(l,e,f.easing,b&&function(){b.call(this,d,f)})}var i=this,h=b(i),j=d,o,l={},t=h.is("html,body");switch(typeof j){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(j)){j=
c(j);break}j=b(j,this);case "object":if(j.is||j.style)o=(j=b(j)).offset()}b.each(f.axis.split(""),function(b,d){var e=d=="x"?"Left":"Top",c=e.toLowerCase(),k="scroll"+e,r=i[k],s=a.max(i,d);o?(l[k]=o[c]+(t?0:r-h.offset()[c]),f.margin&&(l[k]-=parseInt(j.css("margin"+e))||0,l[k]-=parseInt(j.css("border"+e+"Width"))||0),l[k]+=f.offset[c]||0,f.over[c]&&(l[k]+=j[d=="x"?"width":"height"]()*f.over[c])):(e=j[c],l[k]=e.slice&&e.slice(-1)=="%"?parseFloat(e)/100*s:e);/^\d+$/.test(l[k])&&(l[k]=l[k]<=0?0:Math.min(l[k],
s));!b&&f.queue&&(r!=l[k]&&g(f.onAfterFirst),delete l[k])});g(f.onAfter)}).end()};a.max=function(d,e){var a=e=="x"?"Width":"Height",c="scroll"+a;if(!b(d).is("html,body"))return d[c]-b(d)[a.toLowerCase()]();var a="client"+a,i=d.ownerDocument.documentElement,h=d.ownerDocument.body;return Math.max(i[c],h[c])-Math.min(i[a],h[a])}})(jQuery);
jQuery.cookie=function(b,c,a){if(typeof c!="undefined"){a=a||{};if(c===null)c="",a.expires=-1;var d="";if(a.expires&&(typeof a.expires=="number"||a.expires.toUTCString))typeof a.expires=="number"?(d=new Date,d.setTime(d.getTime()+a.expires*864E5)):d=a.expires,d="; expires="+d.toUTCString();var e=a.path?"; path="+a.path:"",f=a.domain?"; domain="+a.domain:"",a=a.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(c),d,e,f,a].join("")}else{c=null;if(document.cookie&&document.cookie!=""){a=
document.cookie.split(";");for(d=0;d<a.length;d++)if(e=jQuery.trim(a[d]),e.substring(0,b.length+1)==b+"="){c=decodeURIComponent(e.substring(b.length+1));break}}return c}};
(function(b,c,a){function d(){g=c[i](function(){e.each(function(){var e=b(this),d=e.width(),a=e.height(),c=b.data(this,j);if(d!==c.w||a!==c.h)e.trigger(h,[c.w=d,c.h=a])});d()},f[o])}var e=b([]),f=b.resize=b.extend(b.resize,{}),g,i="setTimeout",h="resize",j=h+"-special-event",o="delay";f[o]=250;f.throttleWindow=!0;b.event.special[h]={setup:function(){if(!f.throttleWindow&&this[i])return!1;var a=b(this);e=e.add(a);b.data(this,j,{w:a.width(),h:a.height()});e.length===1&&d()},teardown:function(){if(!f.throttleWindow&&
this[i])return!1;var d=b(this);e=e.not(d);d.removeData(j);e.length||clearTimeout(g)},add:function(e){function d(e,f,g){var i=b(this),h=b.data(this,j);h.w=f!==a?f:i.width();h.h=g!==a?g:i.height();c.apply(this,arguments)}if(!f.throttleWindow&&this[i])return!1;var c;if(b.isFunction(e))return c=e,d;else c=e.handler,e.handler=d}}})(jQuery,this);
(function(b,c){var a=b.jQuery||b.Cowboy||(b.Cowboy={}),d;a.throttle=d=function(b,d,g,i){function h(){function a(){o=+new Date;g.apply(m,q)}function h(){j=c}var m=this,p=+new Date-o,q=arguments;i&&!j&&a();j&&clearTimeout(j);i===c&&p>b?a():d!==!0&&(j=setTimeout(i?h:a,i===c?b-p:b))}var j,o=0;typeof d!=="boolean"&&(i=g,g=d,d=c);if(a.guid)h.guid=g.guid=g.guid||a.guid++;return h};a.debounce=function(b,a,g){return g===c?d(b,a,!1):d(b,g,a!==!1)}})(this);
jQuery.fn.topLink=function(b){b=jQuery.extend({min:250,fadeSpeed:250,ieOffset:50},b);return this.each(function(){var c=jQuery(this);jQuery(window).scroll(jQuery.debounce(500,function(){jQuery.support.hrefNormalized||c.css({position:"absolute",top:jQuery(window).scrollTop()+jQuery(window).height()-b.ieOffset});jQuery(window).scrollTop()>=b.min?b.fadeSpeed===!1?c.show():c.fadeIn(b.fadeSpeed):b.fadeSpeed===!1?c.hide():c.fadeOut(b.fadeSpeed)}))})};function $c(b,c){return function(){b(c)}}
var Skinbox=function(){var b={options:{},storage:{},forgets:[],autoloads:[],effects:{animate:{show:function(b,a){b.animate(a.animate,{duration:a.duration,complete:a.complete})},hide:function(c,a){b.effects.animate.show(c,a)}},fade:{show:function(b,a){b.fadeIn({duration:a.duration,complete:a.complete})},hide:function(b,a){b.fadeOut({duration:a.duration,complete:a.complete})}},slide:{show:function(b,a){b.slideDown({duration:a.duration,complete:a.complete})},hide:function(b,a){b.slideUp({duration:a.duration,
complete:a.complete})}},upslide:{show:function(c,a){var d=b.effects._utils.wrap(c);c.css("display")=="none"&&(d.$animation.css({marginTop:-c.outerHeight(),opacity:0}),c.show());d.$animation.animate({marginTop:0,opacity:1},{duration:a.duration,queue:!0,complete:a.complete})},hide:function(c,a){b.effects._utils.wrap(c).$animation.animate({marginTop:-c.outerHeight(),opacity:0},{duration:a.duration,queue:!0,complete:a.complete})}},rightslide:{show:function(){},hide:function(){}},_utils:{wrap:function(b){if(b.parent().hasClass("sb-animation"))return{$animation:b.parent(),
$animationWrapper:b.parent().parent()};if(b.hasClass("sb-animation-wrapper"))return{$animation:b.children(),$animationWrapper:b};var a={};a.$animation=b.wrapAll('<div class="sb-animation" />').parent();a.$animationWrapper=a.$animation.wrap('<div class="sb-animation-wrapper" />').parent();a.$animationWrapper.css({overflow:"hidden"});return a}}},persist:function(){var c=jQuery.extend(!0,{},b.storage);if(b.forgets.length!==0)for(var a=0;a<b.forgets.length;a++)c[b.forgets[a][0]]!==void 0&&c[b.forgets[a][0]][b.forgets[a][1]]!==
void 0&&(c[b.forgets[a][0]][b.forgets[a][1]]=void 0);jQuery.cookie("skinbox_storage_"+b.options.skin,JSON.stringify(c),{expires:10,path:"/"})},forget:function(c,a){b.forgets.push([c,a])},optionsFor:function(c,a,d){b.options[c]===void 0&&(b.options[c]={});return jQuery.extend(!0,a,b.options[c],d)},show:function(c,a){a=b.optionsFor("show",{type:"fade",duration:250,complete:function(){},stop:!1},a);a.stop&&c.stop(!0,!0);if(typeof a.type!="string")a.animate=a.type,a.type="animate";a.queue!==void 0?b.options.animation&&
a.type!=="none"?a.queue.queue(function(d){a.complete=d;b.effects[a.type].show(c,a)}):(c.show(),a.queue.queue(function(b){b()})):b.options.animation&&a.type!=="none"?b.effects[a.type].show(c,a):c.show()},hide:function(c,a){a=b.optionsFor("hide",{type:"fade",duration:250,complete:function(){},stop:!1},a);a.stop&&c.stop(!0,!0);if(typeof a.type!="string")a.animate=a.type,a.type="animate";a.queue!==void 0?b.options.animation&&a.type!=="none"?a.queue.queue(function(d){a.complete=d;b.effects[a.type].hide(c,
a)}):(c.hide(),a.queue.queue(function(b){b()})):b.options.animation&&a.type!=="none"?b.effects[a.type].hide(c,a):c.hide()},sequence:function(c,a){for(var a=jQuery.extend({queue:b.queue()},a),d=c.length,e=0;e<d;e++)c[e][1].stop(!0,!0);for(e=0;e<d;e++)c[e][2].queue=a.queue,c[e][2].stop=!0,b[c[e][0]](c[e][1],c[e][2])},queue:function(){return jQuery("<div />")},autoload:function(c){b.autoloads.push(c)},image:function(b){b.queue.queue(function(a){var d=new Image;d.onload=a;d.src=b.url})}};return{init:function(c){b.options=
jQuery.extend({animation:!0},b.options,c);b.storage=JSON.parse(jQuery.cookie("skinbox_storage_"+b.options.skin));if(!b.storage)b.storage={}},deactivate:function(b){for(var a in b)b[a]=="0"&&(Skinbox[a]=function(){})},module:function(c){c(jQuery,Skinbox,b)},ready:function(c){var a=c.length,d=b.autoloads.length;jQuery(document).ready(function(){for(var e=0;e<a;e++)c[e]();for(e=0;e<d;e++)b.autoloads[e]()})},debug:function(){if(console===void 0)window.console={log:function(b){alert(b)}};console.log("STORAGE:");
console.log(b.storage)},getCore:function(){return b}}}();Skinbox.module(function(b,c,a){c.topLink=function(d){d=a.optionsFor("toplink",{element:"#sb-toplink",min:200,fadeSpeed:500,scrollSpeed:300},d);if(a.options.animation===!1)d.fadeSpeed=!1;b(d.element).topLink({min:d.min,fadeSpeed:d.fadeSpeed});b(d.element).click(function(a){a.preventDefault();b.scrollTo(0,d.scrollSpeed)})}});
Skinbox.module(function(b,c,a){var d=function(b,d){d.length>0&&(d.stop(!0,!0),a.show(d,{type:"fade",duration:250,complete:function(){d.addClass("sb-dropdown-on");d.removeClass("sb-dropdown-off")}}))},e=function(b,d){d.length>0&&a.hide(d,{type:"fade",duration:250,complete:function(){d.addClass("sb-dropdown-off");d.removeClass("sb-dropdown-on")}})};c.dropdowns=function(){b("[data-dropdown]").each(function(){var a=b(this),c=a.children(":eq(1)");c.hide();c.addClass("sb-dropdown-off");a.attr("data-dropdown")==
"click"?a.click(function(i){i.preventDefault();c.is(":visible")?e(a,c,{}):(d(a,c,{}),i.stopPropagation(),b(document).one("click",function(b){b.preventDefault();e(a,c,{})}))}):a.hover(function(){d(a,c,{})},function(){e(a,c,{})})})}});
Skinbox.module(function(b,c,a){c.box=function(d){d=a.optionsFor("box",{width:500,height:500,modal:!1,element:!1,content:"",trigger:!1},d);d.width+="px";d.height+="px";if(d.element)b(d.element).hide(),d.content=b(d.element).html(),b(d.element).remove();var e=new ipb.Popup(d.name,{type:"pane",modal:d.modal,w:d.width,h:d.height,initial:d.content,hideAtStart:!0,close:'[rel="close"]'});d.trigger?b(d.trigger).click(function(b){b.stopPropagation();b.preventDefault();e.show()}):e.show()};c.balloon=function(d){d=
a.optionsFor("balloon",{width:350,height:200,once:!1,reference:"absolute",element:!1,content:"",trigger:!1,modal:!1,position:"auto",name:"balloon1",afterCreation:function(){}},d);d.width+="px";d.height+="px";if(d.element){var e=b(d.element);e.css({display:"none"});d.content=e.html();e.remove()}var e=b(d.trigger),c=Element.extend(e[0]),g,i=function(){g=new ipb.Popup(d.name,{type:"balloon",stem:!0,modal:d.modal,w:d.width,h:d.height,initial:d.content,hideAtStart:!0,close:'[rel="close"]',attach:{target:c,
position:d.position,offset:d.offset||void 0}});d.reference=="fixed"&&b("#"+d.name+"_popup").css({position:"fixed"});d.afterCreation(b)};d.once&&i();e.click(function(a){a.stopPropagation();a.preventDefault();d.once||(b("#"+d.name+"_popup").remove(),i());g.show()});return g};c.boxes=function(a){var e=[];a==void 0&&(a={});b("[data-target-box]").each(function(){var f=b(this).attr("data-target-box");b.inArray(f,e)==-1&&(e.push(f),a[f]==void 0&&(a[f]={}),c.box(b.extend({name:f,element:"[data-box="+f+"]",
trigger:"[data-target-box="+f+"]"},a[f])))})};c.domboxes=function(a){var e=[];a==void 0&&(a={});b("[data-target-dombox]").each(function(){var f=b(this).attr("data-target-dombox");b.inArray(f,e)==-1&&(e.push(f),a[f]==void 0&&(a[f]={}),c.box(b.extend({name:f,content:'<div id="dombox-'+f+'-placeholder"></div>',trigger:"[data-target-dombox="+f+"]",once:!0},a[f])),b("#dombox-"+f+"-placeholder").append(b("[data-dombox="+f+"]").show()))})};c.balloons=function(a){var e=[];a==void 0&&(a={});b("[data-target-balloon]").each(function(){var f=
b(this),g=f.attr("data-target-balloon");b.inArray(g,e)==-1&&(f.attr("id")||f.attr("id","target-balloon-"+g),e.push(g),a[g]==void 0&&(a[g]={}),c.balloon(b.extend({name:g,element:"[data-balloon="+g+"]",trigger:"[data-target-balloon="+g+"]"},a[g])))})};c.domballoons=function(a){var e=[];a==void 0&&(a={});b("[data-target-domballoon]").each(function(){var f=b(this),g=f.attr("data-target-domballoon");b.inArray(g,e)==-1&&(f.attr("id")||f.attr("id","target-domballoon-"+g),e.push(g),a[g]==void 0&&(a[g]={}),
c.balloon(b.extend({name:g,content:'<div id="domballoon-'+g+'-placeholder"></div>',trigger:"[data-target-domballoon="+g+"]",position:"topright",once:!1},a[g])),b("#domballoon-"+g+"-placeholder").append(b("[data-domballoon="+g+"]").show()))})}});
Skinbox.module(function(b,c,a){var d=function(e){a.storage.style=e;a.persist();b("link[title][rel~=stylesheet], style[title]").each(function(){var a=b(this);a.attr("title")==e?a.prop("disabled",!1):a.prop("disabled",!0)})};c.styles=function(){a.optionsFor("stylePicker",{});var e,f;b("link[title][rel~=stylesheet], style[title]").each(function(){var a=b(this);e===void 0&&a.attr("rel").indexOf("alt")!==-1&&(e=a.attr("title"));a.prop("disabled")==!1&&(f=a.attr("title"))});if(a.storage.style!==void 0&&
a.storage.style!=f)f=a.storage.style,d(a.storage.style);c.tip!==void 0&&b("[data-target-style][data-tip]").length!==0&&c.tip({elements:"[data-target-style][data-tip]",content:function(b){return b.attr("data-tip")}});f!==void 0&&b("[data-target-style="+f+"]").addClass("active");b("[data-target-style]").click(function(a){a.preventDefault();f=b(this).attr("data-target-style");b("[data-target-style]").removeClass("active");b(this).addClass("active");d(f)});b(window).unload(function(){var e;b("link[title][rel~=stylesheet], style[title]").each(function(){b(this).prop("disabled")==
!1&&(e=b(this).attr("title"))});if(e!==void 0&&e!==f)a.storage.style=e,a.persist()})}});
Skinbox.module(function(b,c,a){var d=function(a,d){return b("[data-store="+a+"] > [data-key="+d+"]").html()};c.collapsiblePlugins={sidebar:{around:function(b){if(b.animationDuration===void 0)b.animationDuration=200;if(b.marginRight===void 0)b.marginRight=0;b.sidebarWidth=a.options.sidebar_width;return function(a,d,c){d==="shown"&&c==="before"?a.queue(function(a){jQuery(b.contentElement).animate({marginRight:b.sidebarWidth},{duration:b.animationDuration,complete:a})}):d==="hidden"&&c==="after"&&a.queue(function(a){jQuery(b.contentElement).animate({marginRight:b.marginRight},
{duration:b.animationDuration,complete:a})})}}},fade:{init:function(d){(a.storage.collapsibles[d.collapsible]!==void 0&&a.storage.collapsibles[d.collapsible]==!1||b("[data-collapsible="+d.collapsible+"]").length===0)&&b(d.element).fadeTo(0,0.3)},around:function(a){return function(d,c,i){c==="shown"&&i==="before"?b(a.element).fadeTo(250,1):c==="hidden"&&i==="before"&&b(a.element).fadeTo(250,0.3)}}}};c.collapsibles=function(e){if(a.storage.collapsibles==void 0)a.storage.collapsibles={};else for(id in a.storage.collapsibles)if(!a.storage.collapsibles[id]){b("[data-collapsible="+
id+"]").hide();var c=b("[data-target-collapsible="+id+"][data-use-store]");c.length>0&&c.html(d(c.attr("data-use-store"),"show"))}e==void 0&&(e={});b("[data-target-collapsible]").click(function(c){c.preventDefault();var c=b(this),f=c.attr("data-target-collapsible"),h=b("[data-collapsible="+f+"]"),j="";if(e[f]===void 0)e[f]={animation:"upslide",animationDuration:500};else{if(e[f].animationDuration===void 0)e[f].animationDuration=500;if(e[f].around!==void 0)e[f].before=function(b,a){e[f].around(b,a,
"before")},e[f].after=function(b,a){e[f].around(b,a,"after")}}j=a.storage.collapsibles[f]==void 0&&h.is(":visible")||a.storage.collapsibles[f]?"hidden":"shown";a.storage.collapsibles[f]=j==="shown";e[f].before!==void 0&&e[f].before(h,j);j==="hidden"?a.hide(h,{type:e[f].animation,duration:e[f].animationDuration}):a.show(h,{type:e[f].animation,duration:e[f].animationDuration});e[f].after!==void 0&&e[f].after(h,j);h.queue(function(a){b(window).trigger("resize");a()});h.attr("data-persist")&&h.attr("data-persist")==
"false"&&a.forget("collapsibles",f);a.persist();c.attr("data-use-store")&&c.html(d(c.attr("data-use-store"),a.storage.collapsibles[f]?"hide":"show"))})}});Skinbox.module(function(b,c,a){c.placeholders=function(){b("input[placeholder], textarea[placeholder]").placeholder()};a.autoload(c.placeholders)});
(function(b){function c(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}c.prototype={show:function(b){if(this.input[0].value===""||b&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(a){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},
hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(b){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=a[0].outerHTML.replace(/type=(['"])?password\1/gi,
"type=$1text$1");this.fakePassword=b(c).val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()})}}};var a=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return a?this:this.each(function(){var a=b(this),e=new c(a);e.show(!0);a.focus(function(){e.hide()});a.blur(function(){e.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");e.show(!0)}),a.focus(function(){if(this.value==""){var a=
this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery);
Skinbox.module(function(b,c,a){var d;c.tip=function(c){c=a.optionsFor("tip",{hideContent:!0,cachePosition:!0,cacheTip:!0},c);d==void 0&&(d=b('<div id="sb-tipstore" />'),b("body").append(d));b(c.elements).each(function(){var f=b(this),g=c.trigger==void 0?f:f.find(c.trigger);if(c.content==void 0){if(f.attr("title")=="")return}else if(!b.isFunction(c.content)){var i=f.find(c.content);if(i.length==0||i.text()=="")return;else i.css("display","none")}var h=!1;g.hover(function(){h!==!1&&c.cacheTip===!1&&
(h.remove(),h=!1);if(h==!1){h=b('<div class="tooltip"></div>');if(c.content==void 0)h.text(g.attr("title"));else if(b.isFunction(c.content)){var j=c.content(f,c);if(typeof j=="string")h.html(j);else{if(j.length===0){g.unbind("hover");return}h.append(j)}}else h.text(i.text());h.prepend("<span />");h.css("display","none");d.append(h);j=!0}if(j!=void 0||c.cachePosition==!1)j=g.offset(),h.css({position:"absolute",left:j.left+g.width(),top:j.top+g.height()/2-h.height()/2-1}),i=void 0;h.stop(!0,!0);a.show(h,
{type:"fade",duration:200})},function(){h.stop(!0,!0);a.hide(h,{type:"fade",duration:200})})})};c.topicTip=function(){c.tip({elements:".topic_title[title]"})};c.topicAvatarTip=function(a){a==void 0&&(a={});a.frame!=void 0&&a.frame?c.tip({elements:".topic_avatar[title] > span",content:function(a){return a.parent().attr("title")}}):c.tip({elements:".topic_avatar[title]"})};c.tips=function(a){a==void 0&&(a={});b("[data-tip]").length!==0&&c.tip({elements:'[data-tip][data-tip!=""]',content:function(a){return a.attr("data-tip")}})};
a.autoload(c.tips)});





if( jQuery.browser.msie ){
}




Skinbox.init( {
  skin: 'velvet'
} );

Skinbox.module( function($, Skinbox, Core){
	Skinbox.categoryDropdowns = function(){
		var opts = {
			animation: 'slide',
			duration: 250
		};
		var q = Core.queue();
		var $dropdowns = $('.category-dropdown');
		
		$dropdowns.find('span a').click( function(event){
			var $parent = $(this).parent().parent();
						
			if( $parent.attr('id') == 'category-all' )
			{
			  var $category = $('#categories .category_block');
			  
			  if( $category.length != 0 )
			  {
			    event.preventDefault();
			  }
			  else
			  {
			    return;
			  }
			  
				Core.show( $category, {
					type: opts.animation,
					duration: opts.duration,
					queue: q
				} );
				
				$dropdowns.removeClass('active');
				$parent.addClass('active');
			}
			else
			{
				Core.hide( $('#categories .category_block'), {
					type: opts.animation,
					duration: opts.duration,
					queue: q
				} );
				
				var $category = $('#' + $parent.attr('id').split('-').join('_')).parent();
				
				if( $category.length != 0 )
				{
				  event.preventDefault();
				}
				else
				{
				  return;
				}
				
				Core.show( $category, {
					type: opts.animation,
					duration: opts.duration,
					queue: q
				} );
				
				$dropdowns.removeClass('active');
				$parent.addClass('active');
			}
		} );
	};
} );

Skinbox.ready([
 Skinbox.topLink,
 Skinbox.dropdowns,
 Skinbox.boxes,
 $c( Skinbox.domboxes, {
 login: { width: 600, keep: true, modal: true },
 appearance: { width: 300, keep: true, modal: false }
 } ),
 Skinbox.styles,
 Skinbox.categoryDropdowns,
 $c( Skinbox.collapsibles, {
	login: { animation: 'none' }
 } ),
 Skinbox.tip
]);



