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





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' }
 } ),
 $c( Skinbox.tip, { elements: '.category_block h4 a[title]' } )
]);



