var JSON;JSON||(JSON={});
(function(){function b(a){return a<10?"0"+a:a}function e(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var c=g[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function d(a,b){var f,g,o,r,t=c,p,k=b[a];if(k&&typeof k==="object"&&typeof k.toJSON==="function")return k.toJSON(a);typeof h==="function"&&(k=h.call(b,a,k));switch(typeof k){case "string":return e(k);case "number":return isFinite(k)?String(k):"null";case "boolean":case "null":return String(k);
case "object":if(!k)return"null";c+=i;p=[];if(Object.prototype.toString.apply(k)==="[object Array]"){r=k.length;for(f=0;f<r;f+=1)p[f]=d(f,k)||"null";o=p.length===0?"[]":c?"[\n"+c+p.join(",\n"+c)+"\n"+t+"]":"["+p.join(",")+"]";c=t;return o}if(h&&typeof h==="object"){r=h.length;for(f=0;f<r;f+=1)typeof h[f]==="string"&&(g=h[f],(o=d(g,k))&&p.push(e(g)+(c?": ":":")+o))}else for(g in k)Object.prototype.hasOwnProperty.call(k,g)&&(o=d(g,k))&&p.push(e(g)+(c?": ":":")+o);o=p.length===0?"{}":c?"{\n"+c+p.join(",\n"+
c)+"\n"+t+"}":"{"+p.join(",")+"}";c=t;return o}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?e(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 e(this.valueOf())};var a=/[\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,c,i,g={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;JSON.stringify=function(a,b,f){var e;i=c="";if(typeof f==="number")for(e=0;e<f;e+=1)i+=" ";else typeof f==="string"&&(i=f);if((h=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return d("",{"":a})};if(typeof JSON.parse!=="function")JSON.parse=
function(c,b){function f(a,c){var d,e,i=a[c];if(i&&typeof i==="object")for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=f(i,d),e!==void 0?i[d]=e:delete i[d]);return b.call(a,c,i)}var d,c=String(c);a.lastIndex=0;a.test(c)&&(c=c.replace(a,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(c.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("("+c+")"),typeof b==="function"?f({"":d},""):d;throw new SyntaxError("JSON.parse");}})();jQuery.noConflict();
(function(b){function e(a){return typeof a=="object"?a:{top:a,left:a}}var d=b.scrollTo=function(a,f,c){b(window).scrollTo(a,f,c)};d.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};d.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 a=(this.contentWindow||this).document||this.ownerDocument||this;return b.browser.safari||
a.compatMode=="BackCompat"?a.body:a.documentElement})};b.fn.scrollTo=function(a,f,c){typeof f=="object"&&(c=f,f=0);typeof c=="function"&&(c={onAfter:c});a=="max"&&(a=9E9);c=b.extend({},d.defaults,c);f=f||c.speed||c.duration;c.queue=c.queue&&c.axis.length>1;c.queue&&(f/=2);c.offset=e(c.offset);c.over=e(c.over);return this._scrollable().each(function(){function i(b){h.animate(l,f,c.easing,b&&function(){b.call(this,a,c)})}var g=this,h=b(g),j=a,m,l={},n=h.is("html,body");switch(typeof j){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(j)){j=
e(j);break}j=b(j,this);case "object":if(j.is||j.style)m=(j=b(j)).offset()}b.each(c.axis.split(""),function(a,b){var f=b=="x"?"Left":"Top",e=f.toLowerCase(),k="scroll"+f,s=g[k],q=d.max(g,b);m?(l[k]=m[e]+(n?0:s-h.offset()[e]),c.margin&&(l[k]-=parseInt(j.css("margin"+f))||0,l[k]-=parseInt(j.css("border"+f+"Width"))||0),l[k]+=c.offset[e]||0,c.over[e]&&(l[k]+=j[b=="x"?"width":"height"]()*c.over[e])):(f=j[e],l[k]=f.slice&&f.slice(-1)=="%"?parseFloat(f)/100*q:f);/^\d+$/.test(l[k])&&(l[k]=l[k]<=0?0:Math.min(l[k],
q));!a&&c.queue&&(s!=l[k]&&i(c.onAfterFirst),delete l[k])});i(c.onAfter)}).end()};d.max=function(a,f){var c=f=="x"?"Width":"Height",d="scroll"+c;if(!b(a).is("html,body"))return a[d]-b(a)[c.toLowerCase()]();var c="client"+c,e=a.ownerDocument.documentElement,h=a.ownerDocument.body;return Math.max(e[d],h[d])-Math.min(e[c],h[c])}})(jQuery);
jQuery.cookie=function(b,e,d){if(typeof e!="undefined"){d=d||{};if(e===null)e="",d.expires=-1;var a="";if(d.expires&&(typeof d.expires=="number"||d.expires.toUTCString))typeof d.expires=="number"?(a=new Date,a.setTime(a.getTime()+d.expires*864E5)):a=d.expires,a="; expires="+a.toUTCString();var f=d.path?"; path="+d.path:"",c=d.domain?"; domain="+d.domain:"",d=d.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(e),a,f,c,d].join("")}else{e=null;if(document.cookie&&document.cookie!=""){d=
document.cookie.split(";");for(a=0;a<d.length;a++)if(f=jQuery.trim(d[a]),f.substring(0,b.length+1)==b+"="){e=decodeURIComponent(f.substring(b.length+1));break}}return e}};
(function(b,e,d){function a(){i=e[g](function(){f.each(function(){var a=b(this),c=a.width(),f=a.height(),d=b.data(this,j);if(c!==d.w||f!==d.h)a.trigger(h,[d.w=c,d.h=f])});a()},c[m])}var f=b([]),c=b.resize=b.extend(b.resize,{}),i,g="setTimeout",h="resize",j=h+"-special-event",m="delay";c[m]=250;c.throttleWindow=!0;b.event.special[h]={setup:function(){if(!c.throttleWindow&&this[g])return!1;var d=b(this);f=f.add(d);b.data(this,j,{w:d.width(),h:d.height()});f.length===1&&a()},teardown:function(){if(!c.throttleWindow&&
this[g])return!1;var a=b(this);f=f.not(a);a.removeData(j);f.length||clearTimeout(i)},add:function(a){function f(a,c,i){var g=b(this),h=b.data(this,j);h.w=c!==d?c:g.width();h.h=i!==d?i:g.height();e.apply(this,arguments)}if(!c.throttleWindow&&this[g])return!1;var e;if(b.isFunction(a))return e=a,f;else e=a.handler,a.handler=f}}})(jQuery,this);
(function(b,e){var d=b.jQuery||b.Cowboy||(b.Cowboy={}),a;d.throttle=a=function(a,c,b,g){function h(){function d(){m=+new Date;b.apply(o,t)}function h(){j=e}var o=this,r=+new Date-m,t=arguments;g&&!j&&d();j&&clearTimeout(j);g===e&&r>a?d():c!==!0&&(j=setTimeout(g?h:d,g===e?a-r:a))}var j,m=0;typeof c!=="boolean"&&(g=b,b=c,c=e);if(d.guid)h.guid=b.guid=b.guid||d.guid++;return h};d.debounce=function(b,c,d){return d===e?a(b,c,!1):a(b,d,c!==!1)}})(this);
jQuery.fn.topLink=function(b){b=jQuery.extend({min:250,fadeSpeed:250,ieOffset:50},b);return this.each(function(){var e=jQuery(this);jQuery(window).scroll(function(){jQuery.support.hrefNormalized||e.css({position:"absolute",top:jQuery(window).scrollTop()+jQuery(window).height()-b.ieOffset});jQuery(window).scrollTop()>=b.min?b.fadeSpeed===!1?e.show():e.fadeIn(b.fadeSpeed):b.fadeSpeed===!1?e.hide():e.fadeOut(b.fadeSpeed)})})};function $c(b,e){return function(){b(e)}}
var Skinbox=function(){var b={options:{},storage:{},forgets:[],autoloads:[],effects:{animate:{show:function(b,d){b.animate(d.animate,{duration:d.duration,complete:d.complete})},hide:function(e,d){b.effects.animate.show(e,d)}},fade:{show:function(b,d){b.fadeIn({duration:d.duration,complete:d.complete})},hide:function(b,d){b.fadeOut({duration:d.duration,complete:d.complete})}},slide:{show:function(b,d){b.slideDown({duration:d.duration,complete:d.complete})},hide:function(b,d){b.slideUp({duration:d.duration,
complete:d.complete})}},upslide:{show:function(e,d){var a=b.effects._utils.wrap(e);e.css("display")=="none"&&(a.$animation.css({marginTop:-e.outerHeight(),opacity:0}),e.show());a.$animation.animate({marginTop:0,opacity:1},{duration:d.duration,queue:!0,complete:d.complete})},hide:function(e,d){b.effects._utils.wrap(e).$animation.animate({marginTop:-e.outerHeight(),opacity:0},{duration:d.duration,queue:!0,complete:d.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 d={};d.$animation=b.wrapAll('<div class="sb-animation" />').parent();d.$animationWrapper=d.$animation.wrap('<div class="sb-animation-wrapper" />').parent();d.$animationWrapper.css({overflow:"hidden"});return d}}},persist:function(){var e=jQuery.extend(!0,{},b.storage);if(b.forgets.length!==0)for(var d=0;d<b.forgets.length;d++)e[b.forgets[d][0]]!==void 0&&e[b.forgets[d][0]][b.forgets[d][1]]!==
void 0&&(e[b.forgets[d][0]][b.forgets[d][1]]=void 0);jQuery.cookie("skinbox_storage_"+b.options.skin,JSON.stringify(e),{expires:10,path:"/"})},forget:function(e,d){b.forgets.push([e,d])},optionsFor:function(e,d,a){b.options[e]===void 0&&(b.options[e]={});return jQuery.extend(!0,d,b.options[e],a)},show:function(e,d){d=b.optionsFor("show",{type:"fade",duration:250,complete:function(){},stop:!1},d);d.stop&&e.stop(!0,!0);if(typeof d.type!="string")d.animate=d.type,d.type="animate";d.queue!==void 0?b.options.animation&&
d.type!=="none"?d.queue.queue(function(a){d.complete=a;b.effects[d.type].show(e,d)}):(e.show(),d.queue.queue(function(a){a()})):b.options.animation&&d.type!=="none"?b.effects[d.type].show(e,d):e.show()},hide:function(e,d){d=b.optionsFor("hide",{type:"fade",duration:250,complete:function(){},stop:!1},d);d.stop&&e.stop(!0,!0);if(typeof d.type!="string")d.animate=d.type,d.type="animate";d.queue!==void 0?b.options.animation&&d.type!=="none"?d.queue.queue(function(a){d.complete=a;b.effects[d.type].hide(e,
d)}):(e.hide(),d.queue.queue(function(a){a()})):b.options.animation&&d.type!=="none"?b.effects[d.type].hide(e,d):e.hide()},sequence:function(e,d){for(var d=jQuery.extend({queue:b.queue()},d),a=e.length,f=0;f<a;f++)e[f][1].stop(!0,!0);for(f=0;f<a;f++)e[f][2].queue=d.queue,e[f][2].stop=!0,b[e[f][0]](e[f][1],e[f][2])},queue:function(){return jQuery("<div />")},autoload:function(e){b.autoloads.push(e)},image:function(b){b.queue.queue(function(d){var a=new Image;a.onload=d;a.src=b.url})}};return{init:function(e){b.options=
jQuery.extend({animation:!0},b.options,e);b.storage=JSON.parse(jQuery.cookie("skinbox_storage_"+b.options.skin));if(!b.storage)b.storage={}},deactivate:function(b){for(var d in b)b[d]=="0"&&(Skinbox[d]=function(){})},module:function(e){e(jQuery,Skinbox,b)},ready:function(e){var d=e.length,a=b.autoloads.length;jQuery(document).ready(function(){for(var f=0;f<d;f++)e[f]();for(f=0;f<a;f++)b.autoloads[f]()})},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,e,d){e.topLink=function(a){a=d.optionsFor("toplink",{element:"#sb-toplink",min:200,fadeSpeed:500,scrollSpeed:300},a);if(d.options.animation===!1)a.fadeSpeed=!1;b(a.element).topLink({min:a.min,fadeSpeed:a.fadeSpeed});b(a.element).click(function(d){d.preventDefault();b.scrollTo(0,a.scrollSpeed)})}});
Skinbox.module(function(b,e,d){var a=function(a,b){b.length>0&&(b.stop(!0,!0),d.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&&d.hide(b,{type:"fade",duration:250,complete:function(){b.addClass("sb-dropdown-off");b.removeClass("sb-dropdown-on")}})};e.dropdowns=function(){b("[data-dropdown]").each(function(){var c=b(this),d=c.children(":eq(1)");d.hide();d.addClass("sb-dropdown-off");c.attr("data-dropdown")==
"click"?c.click(function(e){e.preventDefault();d.is(":visible")?f(c,d,{}):(a(c,d,{}),e.stopPropagation(),b(document).one("click",function(a){a.preventDefault();f(c,d,{})}))}):c.hover(function(){a(c,d,{})},function(){f(c,d,{})})})}});
Skinbox.module(function(b,e,d){e.box=function(a){a=d.optionsFor("box",{width:500,height:500,modal:!1,element:!1,content:"",trigger:!1},a);a.width+="px";a.height+="px";if(a.element)b(a.element).hide(),a.content=b(a.element).html(),b(a.element).remove();var f=new ipb.Popup(a.name,{type:"pane",modal:a.modal,w:a.width,h:a.height,initial:a.content,hideAtStart:!0,close:'[rel="close"]'});a.trigger?b(a.trigger).click(function(a){a.stopPropagation();a.preventDefault();f.show()}):f.show()};e.balloon=function(a){a=
d.optionsFor("balloon",{width:350,height:200,once:!1,reference:"absolute",element:!1,content:"",trigger:!1,modal:!1,position:"auto",name:"balloon1",afterCreation:function(){}},a);a.width+="px";a.height+="px";if(a.element){var f=b(a.element);f.css({display:"none"});a.content=f.html();f.remove()}var f=b(a.trigger),c=Element.extend(f[0]),e,g=function(){e=new ipb.Popup(a.name,{type:"balloon",stem:!0,modal:a.modal,w:a.width,h:a.height,initial:a.content,hideAtStart:!0,close:'[rel="close"]',attach:{target:c,
position:a.position,offset:a.offset||void 0}});a.reference=="fixed"&&b("#"+a.name+"_popup").css({position:"fixed"});a.afterCreation(b)};a.once&&g();f.click(function(c){c.stopPropagation();c.preventDefault();a.once||(b("#"+a.name+"_popup").remove(),g());e.show()});return e};e.boxes=function(a){var d=[];a==void 0&&(a={});b("[data-target-box]").each(function(){var c=b(this).attr("data-target-box");b.inArray(c,d)==-1&&(d.push(c),a[c]==void 0&&(a[c]={}),e.box(b.extend({name:c,element:"[data-box="+c+"]",
trigger:"[data-target-box="+c+"]"},a[c])))})};e.domboxes=function(a){var d=[];a==void 0&&(a={});b("[data-target-dombox]").each(function(){var c=b(this).attr("data-target-dombox");b.inArray(c,d)==-1&&(d.push(c),a[c]==void 0&&(a[c]={}),e.box(b.extend({name:c,content:'<div id="dombox-'+c+'-placeholder"></div>',trigger:"[data-target-dombox="+c+"]",once:!0},a[c])),b("#dombox-"+c+"-placeholder").append(b("[data-dombox="+c+"]").show()))})};e.balloons=function(a){var d=[];a==void 0&&(a={});b("[data-target-balloon]").each(function(){var c=
b(this),i=c.attr("data-target-balloon");b.inArray(i,d)==-1&&(c.attr("id")||c.attr("id","target-balloon-"+i),d.push(i),a[i]==void 0&&(a[i]={}),e.balloon(b.extend({name:i,element:"[data-balloon="+i+"]",trigger:"[data-target-balloon="+i+"]"},a[i])))})};e.domballoons=function(a){var d=[];a==void 0&&(a={});b("[data-target-domballoon]").each(function(){var c=b(this),i=c.attr("data-target-domballoon");b.inArray(i,d)==-1&&(c.attr("id")||c.attr("id","target-domballoon-"+i),d.push(i),a[i]==void 0&&(a[i]={}),
e.balloon(b.extend({name:i,content:'<div id="domballoon-'+i+'-placeholder"></div>',trigger:"[data-target-domballoon="+i+"]",position:"topright",once:!1},a[i])),b("#domballoon-"+i+"-placeholder").append(b("[data-domballoon="+i+"]").show()))})}});
Skinbox.module(function(b,e,d){var a=function(a,c){return b("[data-store="+a+"] > [data-key="+c+"]").html()};e.collapsiblePlugins={sidebar:{around:function(a){if(a.animationDuration===void 0)a.animationDuration=200;if(a.marginRight===void 0)a.marginRight=0;a.sidebarWidth=d.options.sidebar_width;return function(b,d,e){d==="shown"&&e==="before"?b.queue(function(b){jQuery(a.contentElement).animate({marginRight:a.sidebarWidth},{duration:a.animationDuration,complete:b})}):d==="hidden"&&e==="after"&&b.queue(function(b){jQuery(a.contentElement).animate({marginRight:a.marginRight},
{duration:a.animationDuration,complete:b})})}}},fade:{init:function(a){(d.storage.collapsibles[a.collapsible]!==void 0&&d.storage.collapsibles[a.collapsible]==!1||b("[data-collapsible="+a.collapsible+"]").length===0)&&b(a.element).fadeTo(0,0.3)},around:function(a){return function(c,d,e){d==="shown"&&e==="before"?b(a.element).fadeTo(250,1):d==="hidden"&&e==="before"&&b(a.element).fadeTo(250,0.3)}}}};e.collapsibles=function(e){if(d.storage.collapsibles==void 0)d.storage.collapsibles={};else for(id in d.storage.collapsibles)if(!d.storage.collapsibles[id]){b("[data-collapsible="+
id+"]").hide();var c=b("[data-target-collapsible="+id+"][data-use-store]");c.length>0&&c.html(a(c.attr("data-use-store"),"show"))}e==void 0&&(e={});b("[data-target-collapsible]").click(function(c){c.preventDefault();var c=b(this),g=c.attr("data-target-collapsible"),h=b("[data-collapsible="+g+"]"),j="";if(e[g]===void 0)e[g]={animation:"upslide",animationDuration:500};else{if(e[g].animationDuration===void 0)e[g].animationDuration=500;if(e[g].around!==void 0)e[g].before=function(a,b){e[g].around(a,b,
"before")},e[g].after=function(a,b){e[g].around(a,b,"after")}}j=d.storage.collapsibles[g]==void 0&&h.is(":visible")||d.storage.collapsibles[g]?"hidden":"shown";d.storage.collapsibles[g]=j==="shown";e[g].before!==void 0&&e[g].before(h,j);j==="hidden"?d.hide(h,{type:e[g].animation,duration:e[g].animationDuration}):d.show(h,{type:e[g].animation,duration:e[g].animationDuration});e[g].after!==void 0&&e[g].after(h,j);h.queue(function(a){b(window).trigger("resize");a()});h.attr("data-persist")&&h.attr("data-persist")==
"false"&&d.forget("collapsibles",g);d.persist();c.attr("data-use-store")&&c.html(a(c.attr("data-use-store"),d.storage.collapsibles[g]?"hide":"show"))})}});Skinbox.module(function(b,e,d){e.placeholders=function(){b("input[placeholder], textarea[placeholder]").placeholder()};d.autoload(e.placeholders)});
(function(b){function e(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=""})}e.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){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 a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var d=a[0].outerHTML.replace(/type=(['"])?password\1/gi,
"type=$1text$1");this.fakePassword=b(d).val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()})}}};var d=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return d?this:this.each(function(){var a=b(this),d=new e(a);d.show(!0);a.focus(function(){d.hide()});a.blur(function(){d.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");d.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,e,d){var a;e.tip=function(e){e=d.optionsFor("tip",{hideContent:!0,cachePosition:!0,cacheTip:!0},e);a==void 0&&(a=b('<div id="sb-tipstore" />'),b("body").append(a));b(e.elements).each(function(){var c=b(this),i=e.trigger==void 0?c:c.find(e.trigger);if(e.content==void 0){if(c.attr("title")=="")return}else if(!b.isFunction(e.content)){var g=c.find(e.content);if(g.length==0||g.text()=="")return;else g.css("display","none")}var h=!1;i.hover(function(){h!==!1&&e.cacheTip===!1&&
(h.remove(),h=!1);if(h==!1){h=b('<div class="tooltip"></div>');if(e.content==void 0)h.text(i.attr("title"));else if(b.isFunction(e.content)){var j=e.content(c,e);if(typeof j=="string")h.html(j);else{if(j.length===0){i.unbind("hover");return}h.append(j)}}else h.text(g.text());h.prepend("<span />");h.css("display","none");a.append(h);j=!0}if(j!=void 0||e.cachePosition==!1)j=i.offset(),h.css({position:"absolute",left:j.left+i.width(),top:j.top+i.height()/2-h.height()/2-1}),g=void 0;h.stop(!0,!0);d.show(h,
{type:"fade",duration:200})},function(){h.stop(!0,!0);d.hide(h,{type:"fade",duration:200})})})};e.topicTip=function(){e.tip({elements:".topic_title[title]"})};e.topicAvatarTip=function(a){a==void 0&&(a={});a.frame!=void 0&&a.frame?e.tip({elements:".topic_avatar[title] > span",content:function(a){return a.parent().attr("title")}}):e.tip({elements:".topic_avatar[title]"})};e.tips=function(a){a==void 0&&(a={});b("[data-tip]").length!==0&&e.tip({elements:'[data-tip][data-tip!=""]',content:function(a){return a.attr("data-tip")}})};
d.autoload(e.tips)});
(function(b,e){function d(a,c,d){if((c.empty||d)&&a==null)return null;if(c.def&&a==null)return c.def;c.type==="int"&&(a=~~a);c.mod&&(a=(a<0?a+c.mod*(1+~~(-a/c.mod)):a)%c.mod);c.type==="float"&&(a=parseFloat(a));if(b.isNaN(a))a=c.def;return c.min>a?c.min:c.max<a?c.max:a}function a(a,b,c){c=(c+1)%1;if(c*6<1)return a+(b-a)*6*c;if(c*2<1)return b;if(c*3<2)return a+(b-a)*(2/3-c)*6;return a}var f="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),c=
/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],g=b.Color=function(a,c,d,e){return new b.Color.fn.parse(a,c,d,e)},h={rgba:{cache:"_rgba",props:{red:{idx:0,min:0,max:255,type:"int",empty:!0},green:{idx:1,min:0,max:255,type:"int",empty:!0},blue:{idx:2,min:0,max:255,type:"int",
empty:!0},alpha:{idx:3,min:0,max:1,type:"float",def:1}}},hsla:{cache:"_hsla",props:{hue:{idx:0,mod:360,type:"int",empty:!0},saturation:{idx:1,min:0,max:1,type:"float",empty:!0},lightness:{idx:2,min:0,max:1,type:"float",empty:!0}}}},j=h.rgba.props,m=g.support={},l,n=b.each;h.hsla.props.alpha=j.alpha;g.fn=g.prototype={constructor:g,parse:function(a,c,f,p){if(a===e)return this._rgba=[null,null,null,null],this;if(a instanceof b||a.nodeType)a=a instanceof b?a.css(c):b(a).css(c),c=e;var k=this,s=b.type(a),
q=this._rgba=[];c!==e&&(a=[a,c,f,p],s="array");if(s==="string"){a=a.toLowerCase();n(i,function(b,c){var d=c.re.exec(a),e=d&&c.parse(d),d=c.space||"rgba",g=h[d].cache;if(e)return e=k[d](e),d!="rgba"&&(k[g]=e[g]),q=k._rgba=e._rgba,!1});if(q.length!==0)return Math.max.apply(Math,q)===0&&$.extend(q,l.transparent),this;a=l[a]||l._default;return this.parse(a)}if(s==="array")return n(j,function(c,b){q[b.idx]=d(a[b.idx],b)}),this;if(s==="object")return a instanceof g?n(h,function(b,c){a[c.cache]&&(k[c.cache]=
a[c.cache].slice())}):n(h,function(c,b){n(b.props,function(c,e){var g=b.cache;if(!k[g]&&b.to){if(a[c]==null||c==="alpha")return;k[g]=b.to(k._rgba)}k[g][e.idx]=d(a[c],e,!0)})}),this},is:function(a){var c=g(a),b=!0,d=this;n(h,function(a,e){var g=c[e.cache],f;g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],n(e.props,function(a,c){if(g[c.idx]!=null)return b=g[c.idx]==f[c.idx]}));return b});return b},_space:function(){var a=[],c=this;n(h,function(b,d){c[d.cache]&&a.push(b)});return a.pop()},transition:function(a,
c){var b=g(a),e=b._space(),f=h[e],i=this[f.cache]||f.to(this._rgba),j=i.slice(),b=b[f.cache];n(f.props,function(a,e){var g=i[e.idx],f=b[e.idx];f!==null&&(g===null?j[e.idx]=f:(e.mod&&(f-g>e.mod/2?g+=e.mod:g-f>e.mod/2&&(g-=e.mod)),j[e.idx]=d((f-g)*c+g,e)))});return this[e](j)},blend:function(a){if(this._rgba[3]===1)return this;var c=this._rgba.slice(),d=c.pop(),e=g(a)._rgba;return g(b.map(c,function(a,c){return(1-d)*e[c]+d*a}))},toRgbaString:function(){var a=b.map(this._rgba,function(a,c){return a==
null?c>2?1:0:a});if(a[3]===1)a.length=3;return(a.length===3?"rgb(":"rgba(")+a.join(",")+")"},toHslaString:function(){var a=b.map(this.hsla(),function(a,c){a=a==null?c>2?1:0:a;if(c===1||c===2)a=Math.round(a*100)+"%";return a});if(a[3]===1)a.length=3;return(a.length===3?"hsl(":"hsla(")+a.join(",")+")"},toHexString:function(a){var c=this._rgba.slice();if(!a)c.length=3;return"#"+b.map(c,function(a,c){var b=(a*(c===3?255:1)).toString(16);return b.length===1?"0"+b:b.substr(0,2)}).join("")},toString:function(){if(this._rgba[3]===
0)return"transparent";return this.toRgbaString()}};g.fn.parse.prototype=g.fn;h.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var c=a[0]/255,b=a[1]/255,d=a[2]/255,a=a[3],e=Math.max(c,b,d),g=Math.min(c,b,d),f=e-g,i=e+g,h=i*0.5;return[Math.round(g===e?0:c===e?60*(b-d)/f+360:b===e?60*(d-c)/f+120:60*(c-b)/f+240)%360,h===0||h===1?h:h<=0.5?f/i:f/(2-i),h,a==null?1:a]};h.hsla.from=function(c){if(c[0]==null||c[1]==null||c[2]==null)return[null,null,null,c[3]];var b=c[0]/
360,d=c[1],e=c[2],c=c[3],d=e<=0.5?e*(1+d):e+d-e*d,e=2*e-d;return[Math.round(a(e,d,b+1/3)*255),Math.round(a(e,d,b)*255),Math.round(a(e,d,b-1/3)*255),c]};n(h,function(a,f){var i=f.props,h=f.cache,j=f.to,m=f.from;g.fn[a]=function(a){j&&!this[h]&&(this[h]=j(this._rgba));if(a===e)return this[h].slice();var c=b.type(a),f=c==="array"||c==="object"?a:arguments,l=this[h].slice(),o;n(i,function(a,b){var e=f[c==="object"?a:b.idx];e==null&&(e=l[b.idx]);l[b.idx]=d(e,b)});return m?(o=g(m(l)),o[h]=l,o):g(l)};n(i,
function(d,e){g.fn[d]||(g.fn[d]=function(g){var f=b.type(g),i=d==="alpha"?this._hsla?"hsla":"rgba":a,h=this[i](),j=h[e.idx];if(f==="undefined")return j;f==="function"&&(g=g.call(this,j),f=b.type(g));if(g==null&&e.empty)return this;f==="string"&&(f=c.exec(g))&&(g=j+parseFloat(f[2])*(f[1]==="+"?1:-1));h[e.idx]=g;return this[i](h)})})});n(f,function(a,c){b.cssHooks[c]={set:function(a,d){d=g(d);if(!m.rgba&&d._rgba[3]!==1){var e=c==="backgroundColor"?a.parentNode:a,f;do if(f=b.curCSS(e,"backgroundColor"),
f!==""&&f!=="transparent")break;while((a=a.parentNode)&&a.style);d=d.blend(g(f||"_default"))}d=d.toRgbaString();a.style[c]=d}};b.fx.step[c]=function(a){if(!a.colorInit)a.start=g(a.elem,c),a.end=g(a.end),a.colorInit=!0;b.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}});b(function(){var a=document.createElement("div").style;a.cssText="background-color:rgba(150,255,150,.5)";m.rgba=a.backgroundColor.indexOf("rgba")>-1});l=b.Color.names={aqua:"#00ffff",azure:"#f0ffff",beige:"#f5f5dc",black:"#000000",
blue:"#0000ff",brown:"#a52a2a",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkviolet:"#9400d3",fuchsia:"#ff00ff",gold:"#ffd700",green:"#008000",indigo:"#4b0082",khaki:"#f0e68c",lightblue:"#add8e6",lightcyan:"#e0ffff",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightyellow:"#ffffe0",lime:"#00ff00",
magenta:"#ff00ff",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",violet:"#800080",red:"#ff0000",silver:"#c0c0c0",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);
(function(b){jQuery.fn.farbtastic=function(e){b.farbtastic(this,e);return this};jQuery.farbtastic=function(e,d){e=b(e).get(0);return e.farbtastic||(e.farbtastic=new jQuery._farbtastic(e,d))};jQuery._farbtastic=function(e,d){var a=this;b(e).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var f=b(".farbtastic",e);a.wheel=b(".wheel",e).get(0);a.radius=84;a.square=
100;a.width=194;navigator.appVersion.match(/MSIE [0-6]\./)&&b("*",f).each(function(){if(this.currentStyle.backgroundImage!="none"){var a=this.currentStyle.backgroundImage,a=this.currentStyle.backgroundImage.substring(5,a.length-2);b(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"})}});a.linkTo=function(c){typeof a.callback=="object"&&b(a.callback).unbind("keyup",a.updateValue);a.color=null;if(typeof c=="function")a.callback=
c;else if(typeof c=="object"||typeof c=="string")a.callback=b(c),a.callback.bind("keyup",a.updateValue),a.callback.get(0).value&&a.setColor(a.callback.get(0).value);return this};a.updateValue=function(){this.value&&this.value!=a.color&&a.setColor(this.value)};a.setColor=function(c){var b=a.unpack(c);if(a.color!=c&&b)a.color=c,a.rgb=b,a.hsl=a.RGBToHSL(a.rgb),a.updateDisplay();return this};a.setHSL=function(c){a.hsl=c;a.rgb=a.HSLToRGB(c);a.color=a.pack(a.rgb);a.updateDisplay();return this};a.widgetCoords=
function(c){var d,e,f=c.target||c.srcElement,j=a.wheel;if(typeof c.offsetX!="undefined"){for(var m={x:c.offsetX,y:c.offsetY},c=f;c;)c.mouseX=m.x,c.mouseY=m.y,m.x+=c.offsetLeft,m.y+=c.offsetTop,c=c.offsetParent;c=j;for(j={x:0,y:0};c;){if(typeof c.mouseX!="undefined"){d=c.mouseX-j.x;e=c.mouseY-j.y;break}j.x+=c.offsetLeft;j.y+=c.offsetTop;c=c.offsetParent}for(c=f;c;)c.mouseX=void 0,c.mouseY=void 0,c=c.offsetParent}else m=a.absolutePosition(j),d=(c.pageX||0*(c.clientX+b("html").get(0).scrollLeft))-m.x,
e=(c.pageY||0*(c.clientY+b("html").get(0).scrollTop))-m.y;return{x:d-a.width/2,y:e-a.width/2}};a.mousedown=function(c){if(!document.dragging)b(document).bind("mousemove",a.mousemove).bind("mouseup",a.mouseup),document.dragging=!0;var d=a.widgetCoords(c);a.circleDrag=Math.max(Math.abs(d.x),Math.abs(d.y))*2>a.square;a.mousemove(c);b(a.callback).change();return!1};a.mousemove=function(c){c=a.widgetCoords(c);a.circleDrag?(c=Math.atan2(c.x,-c.y)/6.28,c<0&&(c+=1),a.setHSL([c,a.hsl[1],a.hsl[2]])):a.setHSL([a.hsl[0],
Math.max(0,Math.min(1,-(c.x/a.square)+0.5)),Math.max(0,Math.min(1,-(c.y/a.square)+0.5))]);return!1};a.mouseup=function(){b(document).unbind("mousemove",a.mousemove);b(document).unbind("mouseup",a.mouseup);document.dragging=!1;b(a.callback).change()};a.updateDisplay=function(){var c=a.hsl[0]*6.28;b(".h-marker",f).css({left:Math.round(Math.sin(c)*a.radius+a.width/2)+"px",top:Math.round(-Math.cos(c)*a.radius+a.width/2)+"px"});b(".sl-marker",f).css({left:Math.round(a.square*(0.5-a.hsl[1])+a.width/2)+
"px",top:Math.round(a.square*(0.5-a.hsl[2])+a.width/2)+"px"});b(".color",f).css("backgroundColor",a.pack(a.HSLToRGB([a.hsl[0],1,0.5])));typeof a.callback=="object"?(b(a.callback).css({backgroundColor:a.color,color:a.hsl[2]>0.5?"#000":"#fff"}),b(a.callback).each(function(){if(this.value&&this.value!=a.color)this.value=a.color,b.browser.msie||b(this).change()})):typeof a.callback=="function"&&a.callback.call(a,a.color)};a.absolutePosition=function(c){var b={x:c.offsetLeft,y:c.offsetTop};c.offsetParent&&
(c=a.absolutePosition(c.offsetParent),b.x+=c.x,b.y+=c.y);return b};a.pack=function(a){var b=Math.round(a[0]*255),d=Math.round(a[1]*255),a=Math.round(a[2]*255);return"#"+(b<16?"0":"")+b.toString(16)+(d<16?"0":"")+d.toString(16)+(a<16?"0":"")+a.toString(16)};a.unpack=function(a){if(a.length==7)return[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255];else if(a.length==4)return[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/
15,parseInt("0x"+a.substring(3,4))/15]};a.HSLToRGB=function(a){var b,d=a[0];b=a[1];a=a[2];b=a<=0.5?a*(b+1):a+b-a*b;a=a*2-b;return[this.hueToRGB(a,b,d+0.33333),this.hueToRGB(a,b,d),this.hueToRGB(a,b,d-0.33333)]};a.hueToRGB=function(a,b,d){d=d<0?d+1:d>1?d-1:d;if(d*6<1)return a+(b-a)*d*6;if(d*2<1)return b;if(d*3<2)return a+(b-a)*(0.66666-d)*6;return a};a.RGBToHSL=function(a){var b,d,e,f,m=a[0],l=a[1],n=a[2];b=Math.min(m,Math.min(l,n));a=Math.max(m,Math.max(l,n));d=a-b;f=(b+a)/2;e=0;f>0&&f<1&&(e=d/(f<
0.5?2*f:2-2*f));b=0;d>0&&(a==m&&a!=l&&(b+=(l-n)/d),a==l&&a!=n&&(b+=2+(n-m)/d),a==n&&a!=m&&(b+=4+(m-l)/d),b/=6);return[b,e,f]};b("*",f).mousedown(a.mousedown);a.setColor("#000000");d&&a.linkTo(d)}})(jQuery);
Skinbox.module(function(b,e,d){var a=function(a,c,e,g){b("#dynamicsheet").remove();b("head").append('<style type="text/css" id="dynamicsheet">'+e.background+" { background-color: "+g+"; } "+e.border+" { border-color: "+g+"; } "+e.text+" { color: "+g+"; }</style>");g=b.Color(g).toHexString();a.setColor(g);c.val(g);d.storage.color=g;d.persist()};e.colors=function(d){var c=b.Color(b(d.background).css("background-color")).toHexString(),e=b(d.element),g=b.farbtastic(e),h=b("#color-input");g.linkTo(h);
g.setColor(c);h.val(c);h.change(function(){a(g,h,d,h.val())});b("[data-target-color]").click(function(c){a(g,h,d,b(this).attr("data-target-color"));c.preventDefault()})}});
Skinbox.module(function(b,e,d){e.panels=function(){b("body").click(function(){b("[data-panel]:visible").hide()});b("[data-panel]").click(function(a){a.stopPropagation()});b("[data-target-panel]").click(function(a){a.stopPropagation();a=b(this).attr("data-target-panel");b("[data-panel][data-panel!="+a+"]").hide();a=b("[data-panel="+a+"]");a.is(":visible")?d.hide(a,{type:"fade",duration:250}):d.show(a,{type:"fade",duration:250})})}});





if( jQuery.browser.msie ){
}




Skinbox.init( {
  skin: 'delight'
} );
 
Skinbox.ready([
 Skinbox.topLink,
 Skinbox.dropdowns,
 Skinbox.tip,
 Skinbox.boxes,
 Skinbox.panels,
 $c( Skinbox.colors, {
   element: '#color-picker',
   background: 'body, #ipboard_body .maintitle, #branding, #primary_nav, .tab_bar.no_title.mini li.active, .tab_bar li.active',
   border: '#ipboard_body .maintitle, .tab_bar.no_title.mini li.active, .tab_bar li.active',
   text: 'a'
 } ),
  $c( Skinbox.domboxes, {
  login: { width: 600, keep: true, modal: true },
  appearance: { width: 300, keep: true, modal: false }
  } ),
 $c( Skinbox.collapsibles, {
 login: { animation: 'none' }
 } )
]);



