var JSON;JSON||(JSON={});
(function(){function b(a){return 10>a?"0"+a:a}function e(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var d=g[a];return"string"===typeof d?d:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,b){var f,g,o,r,s=d,q,l=b[a];if(l&&"object"===typeof l&&"function"===typeof l.toJSON)return l.toJSON(a);"function"===typeof h&&(l=h.call(b,a,l));switch(typeof l){case "string":return e(l);case "number":return isFinite(l)?""+l:"null";case "boolean":case "null":return""+l;
case "object":if(!l)return"null";d+=j;q=[];if("[object Array]"===Object.prototype.toString.apply(l)){r=l.length;for(f=0;f<r;f+=1)q[f]=c(f,l)||"null";o=0===q.length?"[]":d?"[\n"+d+q.join(",\n"+d)+"\n"+s+"]":"["+q.join(",")+"]";d=s;return o}if(h&&"object"===typeof h){r=h.length;for(f=0;f<r;f+=1)"string"===typeof h[f]&&(g=h[f],(o=c(g,l))&&q.push(e(g)+(d?": ":":")+o))}else for(g in l)Object.prototype.hasOwnProperty.call(l,g)&&(o=c(g,l))&&q.push(e(g)+(d?": ":":")+o);o=0===q.length?"{}":d?"{\n"+d+q.join(",\n"+
d)+"\n"+s+"}":"{"+q.join(",")+"}";d=s;return o}}if("function"!==typeof Date.prototype.toJSON)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,d,j,g={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;JSON.stringify=function(a,b,e){var f;j=d="";if("number"===typeof e)for(f=0;f<e;f+=1)j+=" ";else"string"===typeof e&&(j=e);if((h=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})};if("function"!==typeof JSON.parse)JSON.parse=
function(d,b){function c(a,d){var e,f,j=a[d];if(j&&"object"===typeof j)for(e in j)Object.prototype.hasOwnProperty.call(j,e)&&(f=c(j,e),void 0!==f?j[e]=f:delete j[e]);return b.call(a,d,j)}var e,d=""+d;a.lastIndex=0;a.test(d)&&(d=d.replace(a,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(d.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
"")))return e=eval("("+d+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");}})();jQuery.noConflict();
jQuery.cookie=function(b,e,c){if("undefined"!=typeof e){c=c||{};if(null===e)e="",c.expires=-1;var a="";if(c.expires&&("number"==typeof c.expires||c.expires.toUTCString))"number"==typeof c.expires?(a=new Date,a.setTime(a.getTime()+864E5*c.expires)):a=c.expires,a="; expires="+a.toUTCString();var f=c.path?"; path="+c.path:"",d=c.domain?"; domain="+c.domain:"",c=c.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(e),a,f,d,c].join("")}else{e=null;if(document.cookie&&""!=document.cookie){c=
document.cookie.split(";");for(a=0;a<c.length;a++)if(f=jQuery.trim(c[a]),f.substring(0,b.length+1)==b+"="){e=decodeURIComponent(f.substring(b.length+1));break}}return e}};
(function(b,e,c){function a(){j=e[g](function(){f.each(function(){var a=b(this),d=a.width(),e=a.height(),c=b.data(this,m);if(d!==c.w||e!==c.h)a.trigger(h,[c.w=d,c.h=e])});a()},d[i])}var f=b([]),d=b.resize=b.extend(b.resize,{}),j,g="setTimeout",h="resize",m=h+"-special-event",i="delay";d[i]=250;d.throttleWindow=!0;b.event.special[h]={setup:function(){if(!d.throttleWindow&&this[g])return!1;var e=b(this);f=f.add(e);b.data(this,m,{w:e.width(),h:e.height()});1===f.length&&a()},teardown:function(){if(!d.throttleWindow&&
this[g])return!1;var a=b(this);f=f.not(a);a.removeData(m);f.length||clearTimeout(j)},add:function(a){function e(a,d,j){var f=b(this),g=b.data(this,m);g.w=d!==c?d:f.width();g.h=j!==c?j:f.height();o.apply(this,arguments)}if(!d.throttleWindow&&this[g])return!1;var o;if(b.isFunction(a))return o=a,e;o=a.handler;a.handler=e}}})(jQuery,this);
(function(b,e){var c=b.jQuery||b.Cowboy||(b.Cowboy={}),a;c.throttle=a=function(a,d,b,g){function h(){function c(){i=+new Date;b.apply(o,s)}function h(){m=e}var o=this,r=+new Date-i,s=arguments;g&&!m&&c();m&&clearTimeout(m);g===e&&r>a?c():!0!==d&&(m=setTimeout(g?h:c,g===e?a-r:a))}var m,i=0;"boolean"!==typeof d&&(g=b,b=d,d=e);if(c.guid)h.guid=b.guid=b.guid||c.guid++;return h};c.debounce=function(b,d,c){return c===e?a(b,d,!1):a(b,c,!1!==d)}})(this);function $c(b,e){return function(){b(e)}}
var Platform=function(){var b={options:{},storage:{},forgets:[],autoloads:[],effects:{animate:{show:function(b,c){b.animate(c.animate,{duration:c.duration,complete:c.complete})},hide:function(e,c){b.effects.animate.show(e,c)}},fade:{show:function(b,c){b.fadeIn({duration:c.duration,complete:c.complete})},hide:function(b,c){b.fadeOut({duration:c.duration,complete:c.complete})}},slide:{show:function(b,c){b.slideDown({duration:c.duration,complete:c.complete})},hide:function(b,c){b.slideUp({duration:c.duration,
complete:c.complete})}},upslide:{show:function(e,c){var a=b.effects._utils.wrap(e);"none"==e.css("display")&&(a.$animation.css({marginTop:-e.outerHeight(),opacity:0}),e.show());a.$animation.animate({marginTop:0,opacity:1},{duration:c.duration,queue:!0,complete:c.complete})},hide:function(e,c){b.effects._utils.wrap(e).$animation.animate({marginTop:-e.outerHeight(),opacity:0},{duration:c.duration,queue:!0,complete:c.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 c={};c.$animation=b.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 e=jQuery.extend(!0,{},b.storage);if(0!==b.forgets.length)for(var c=0;c<b.forgets.length;c++)void 0!==e[b.forgets[c][0]]&&void 0!==e[b.forgets[c][0]][b.forgets[c][1]]&&
(e[b.forgets[c][0]][b.forgets[c][1]]=void 0);jQuery.cookie("platform_storage_"+b.options.skin,JSON.stringify(e),{expires:10,path:"/"})},forget:function(e,c){b.forgets.push([e,c])},optionsFor:function(e,c,a){void 0===b.options[e]&&(b.options[e]={});return jQuery.extend(!0,c,b.options[e],a)},setOption:function(e,c,a){void 0===b.options[e]&&(b.options[e]={});b.options[e][c]=a},show:function(e,c){c=b.optionsFor("show",{type:"fade",duration:250,complete:function(){},stop:!1},c);c.stop&&e.stop(!0,!0);if("string"!=
typeof c.type)c.animate=c.type,c.type="animate";void 0!==c.queue?b.options.animation&&"none"!==c.type?c.queue.queue(function(a){c.complete=a;b.effects[c.type].show(e,c)}):(e.show(),c.queue.queue(function(a){a()})):b.options.animation&&"none"!==c.type?b.effects[c.type].show(e,c):e.show()},hide:function(e,c){c=b.optionsFor("hide",{type:"fade",duration:250,complete:function(){},stop:!1},c);c.stop&&e.stop(!0,!0);if("string"!=typeof c.type)c.animate=c.type,c.type="animate";void 0!==c.queue?b.options.animation&&
"none"!==c.type?c.queue.queue(function(a){c.complete=a;b.effects[c.type].hide(e,c)}):(e.hide(),c.queue.queue(function(a){a()})):b.options.animation&&"none"!==c.type?b.effects[c.type].hide(e,c):e.hide()},sequence:function(e,c){for(var c=jQuery.extend({queue:b.queue()},c),a=e.length,f=0;f<a;f++)jQuery.isArray(e[f])&&e[f][1].stop(!0,!0);for(f=0;f<a;f++)jQuery.isArray(e[f])?(e[f][2].queue=c.queue,e[f][2].stop=!0,b[e[f][0]](e[f][1],e[f][2])):c.queue.queue(e[f])},queue:function(){return jQuery("<div />")},
autoload:function(e){b.autoloads.push(e)},image:function(b){b.queue.queue(function(c){var a=new Image;a.onload=c;a.src=b.url})}};return{init:function(e){b.options=jQuery.extend({animation:!0,skin:window.skinName},b.options,e);b.storage=JSON.parse(jQuery.cookie("platform_storage_"+b.options.skin));if(!b.storage)b.storage={}},deactivate:function(b){for(var c in b)"0"==b[c]&&(Platform[c]=function(){})},module:function(e){e(jQuery,Platform,b)},ready:function(e){var c=e.length,a=b.autoloads.length;jQuery(document).ready(function(){for(var f=
0;f<c;f++)e[f]();for(f=0;f<a;f++)b.autoloads[f]()})},debug:function(){if(void 0===console)window.console={log:function(b){alert(b)}};console.log("STORAGE:");console.log(b.storage)},getCore:function(){return b}}}();
Platform.module(function(b,e,c){var a=function(a,b){0<b.length&&(b.stop(!0,!0),c.show(b,{type:"fade",duration:250}))},f=function(a,b){0<b.length&&c.hide(b,{type:"fade",duration:250})};Platform.dropdowns=function(){b("[data-dropdown]").each(function(){var d=b(this),c=d.children(":eq(1)");c.hide();c.addClass("sb-dropdown-off");-1!==d.attr("data-dropdown").indexOf("click")?d.click(function(e){e.preventDefault();c.is(":visible")||(a(d,c,{}),e.stopPropagation(),b(document).bind("click",function(a){a.preventDefault();
!b(a.target).is(c)&&!b(a.target).parentsUntil(c).parent().is("ul")&&(b(document).unbind("click"),f(d,c,{}))}))}):d.hover(function(){a(d,c,{})},function(){f(d,c,{})})})};c.autoload(Platform.dropdowns)});
Platform.prototypeExtension=function(){Element.addMethods({platformTooltip:function(b,e){var e=Object.extend({template:new Template("<div class='ipsTooltip ptTooltip' id='#{id}' style='display: none'><div class='ipsTooltip_inner'>#{content}</div></div>"),position:"auto",content:$(b).readAttribute("data-tooltip"),animate:!0,overrideBrowser:!0,delay:0.4},e),c=function(){if(!e.delay||e._still_going){var a=$(b).identify();$(a+"_tooltip")||$(document.body).insert({bottom:e.template.evaluate({id:a+"_tooltip",
content:e.content(b)})});e.overrideBrowser&&$(b).hasAttribute("title")&&$(b).writeAttribute("data-title",$(b).readAttribute("title")).writeAttribute("title",!1);var d=$(a+"_tooltip").setStyle({position:"absolute"}),c=$(b).getLayout(),g=$(b).cumulativeOffset(),a=$(a+"_tooltip").getDimensions(),h=$(document.body).getLayout();if("auto"==e.position)e.position=0>g.left+c.get("width")/2-a.width/2?"right":g.left+a.width/2>h.get("width")?"left":"top";Debug.write(a);switch(e.position){case "top":$(d).setStyle({top:g.top-
a.height-1+"px",left:g.left+c.get("width")/2-a.width/2+"px"}).addClassName("top");break;case "bottom":$(d).setStyle({top:g.top+c.get("height")+1+"px",left:g.left+c.get("width")/2-a.width/2+"px"}).addClassName("bottom");break;case "left":$(d).setStyle({top:g.top-c.get("height")/2+"px",left:g.left-a.width-3+"px"}).addClassName("left");break;case "right":$(d).setStyle({top:g.top+c.get("height")/2-a.height/2+"px",left:g.left+c.get("width")+"px"}).addClassName("right")}e.animate?new Effect.Appear($(d),
{duration:0.3,queue:"end"}):$(d).show()}},a=function(){var a=$(b).identify();$(a+"_tooltip")&&(e.animate?new Effect.Fade($(a+"_tooltip"),{duration:0.2,queue:"end"}):$(a+"_tooltip").hide())};$(b).observe("mouseenter",function(a){e.delay?(e._still_going=!0,c.delay(e.delay,a)):c(a)}).observe("click",function(){e._still_going=!1;a()}).observe("mouseleave",function(){e._still_going=!1;a()})}})};
Platform.module(function(b,e,c){e.tooltips=function(){var a={};if(b("body").hasClass("feature-excerpts_as_tooltip-on")&&0!==b(".ptExcerpt").length)a.excerpt={elements:"#categories .tpAvatarFrame ",content:function(a){return b(a).parents(".col_c_post:first").find(".ptExcerpt li").html()}};a.stdWithImage={elements:"[data-tip] > img",content:function(a){return b(a).parent().attr("data-tip")}};a=c.optionsFor("tooltips",{rules:a});for(k in a.rules)$$(a.rules[k].elements).invoke("platformTooltip",{position:"right",
content:a.rules[k].content})};c.autoload(e.prototypeExtension);c.autoload(e.tooltips)});
Platform.module(function(b,e,c){Platform.box=function(a){a=c.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 e=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();e.show()}):e.show()};Platform.balloon=
function(a){a=c.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 e=b(a.element);e.css({display:"none"});a.content=e.html();e.remove()}var e=b(a.trigger),d=Element.extend(e[0]),j,g=function(){j=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:d,position:a.position,offset:a.offset||void 0}});"fixed"==a.reference&&b("#"+a.name+"_popup").css({position:"fixed"});a.afterCreation(b)};a.once&&g();e.click(function(d){d.stopPropagation();d.preventDefault();a.once||(b("#"+a.name+"_popup").remove(),g());j.show()});return j};Platform.boxes=function(a){var c=[];void 0==a&&(a={});b("[data-target-box]").each(function(){var d=b(this).attr("data-target-box");-1==b.inArray(d,c)&&(c.push(d),void 0==a[d]&&(a[d]={}),Platform.box(b.extend({name:d,
element:"[data-box="+d+"]",trigger:"[data-target-box="+d+"]"},a[d])))})};Platform.domboxes=function(a){var c=[];void 0==a&&(a={});b("[data-target-dombox]").each(function(){var d=b(this).attr("data-target-dombox");-1==b.inArray(d,c)&&(c.push(d),void 0==a[d]&&(a[d]={}),Platform.box(b.extend({name:d,content:'<div id="dombox-'+d+'-placeholder"></div>',trigger:"[data-target-dombox="+d+"]",once:!0},a[d])),b("#dombox-"+d+"-placeholder").append(b("[data-dombox="+d+"]").show()))})};Platform.balloons=function(a){var c=
[];void 0==a&&(a={});b("[data-target-balloon]").each(function(){var d=b(this),e=d.attr("data-target-balloon");-1==b.inArray(e,c)&&(d.attr("id")||d.attr("id","target-balloon-"+e),c.push(e),void 0==a[e]&&(a[e]={}),Platform.balloon(b.extend({name:e,element:"[data-balloon="+e+"]",trigger:"[data-target-balloon="+e+"]"},a[e])))})};Platform.domballoons=function(a){var e=[];void 0==a&&(a="cielo"==c.options.skin?{bgpicker:{trigger:"[data-target-domballoon=bgpicker] img",position:"topleft",reference:"fixed"}}:
{});b("[data-target-domballoon]").each(function(){var d=b(this),c=d.attr("data-target-domballoon");-1==b.inArray(c,e)&&(d.attr("id")||d.attr("id","target-domballoon-"+c),e.push(c),void 0==a[c]&&(a[c]={}),Platform.balloon(b.extend({name:c,content:'<div id="domballoon-'+c+'-placeholder"></div>',trigger:"[data-target-domballoon="+c+"]",position:"bottomright",once:!0},a[c])),b("#domballoon-"+c+"-placeholder").append(b("[data-domballoon="+c+"]").show()))})};c.autoload(Platform.domballoons)});
(function(b,e){function c(a,d,c){if((d.empty||c)&&null==a)return null;if(d.def&&null==a)return d.def;"int"===d.type&&(a=~~a);d.mod&&(a=(0>a?a+d.mod*(1+~~(-a/d.mod)):a)%d.mod);"float"===d.type&&(a=parseFloat(a));if(!b.isNumeric(a))a=d.def;return d.min>a?d.min:d.max<a?d.max:a}function a(a,d,b){b=(b+1)%1;return 1>6*b?a+6*(d-a)*b:1>2*b?d:2>3*b?a+6*(d-a)*(2/3-b):a}var f="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),d=/^([\-+])=\s*(\d+\.?\d*)/,
j=[{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,d,c,e){return new b.Color.fn.parse(a,d,c,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}}}},m=h.rgba.props,i=g.support={},p,n=b.each;h.hsla.props.alpha=m.alpha;g.fn=g.prototype={constructor:g,parse:function(a,d,f,q){if(a===e)return this._rgba=[null,null,null,null],this;if(a instanceof b||a.nodeType)a=a instanceof b?a.css(d):b(a).css(d),d=e;var l=this,i=b.type(a),
u=this._rgba=[];d!==e&&(a=[a,d,f,q],i="array");if("string"===i){a=a.toLowerCase();n(j,function(d,b){var c=b.re.exec(a),e=c&&b.parse(c),c=b.space||"rgba",g=h[c].cache;if(e)return e=l[c](e),"rgba"!=c&&(l[g]=e[g]),u=l._rgba=e._rgba,!1});if(0!==u.length)return 0===Math.max.apply(Math,u)&&$.extend(u,p.transparent),this;a=p[a]||p._default;return this.parse(a)}if("array"===i)return n(m,function(d,b){u[b.idx]=c(a[b.idx],b)}),this;if("object"===i)return a instanceof g?n(h,function(d,b){a[b.cache]&&(l[b.cache]=
a[b.cache].slice())}):n(h,function(d,b){n(b.props,function(d,e){var g=b.cache;if(!l[g]&&b.to){if(null==a[d]||"alpha"===d)return;l[g]=b.to(l._rgba)}l[g][e.idx]=c(a[d],e,!0)})}),this},is:function(a){var d=g(a),b=!0,c=this;n(h,function(a,e){var g=d[e.cache],f;g&&(f=c[e.cache]||e.to&&e.to(c._rgba)||[],n(e.props,function(a,d){if(null!=g[d.idx])return b=g[d.idx]==f[d.idx]}));return b});return b},_space:function(){var a=[],d=this;n(h,function(b,c){d[c.cache]&&a.push(b)});return a.pop()},transition:function(a,
d){var b=g(a),e=b._space(),f=h[e],j=this[f.cache]||f.to(this._rgba),i=j.slice(),b=b[f.cache];n(f.props,function(a,e){var g=j[e.idx],f=b[e.idx];null!==f&&(null===g?i[e.idx]=f:(e.mod&&(f-g>e.mod/2?g+=e.mod:g-f>e.mod/2&&(g-=e.mod)),i[e.idx]=c((f-g)*d+g,e)))});return this[e](i)},blend:function(a){if(1===this._rgba[3])return this;var d=this._rgba.slice(),c=d.pop(),e=g(a)._rgba;return g(b.map(d,function(a,d){return(1-c)*e[d]+c*a}))},toRgbaString:function(){var a=b.map(this._rgba,function(a,d){return null==
a?2<d?1:0:a});if(1===a[3])a.length=3;return(3===a.length?"rgb(":"rgba(")+a.join(",")+")"},toHslaString:function(){var a=b.map(this.hsla(),function(a,d){a=null==a?2<d?1:0:a;if(1===d||2===d)a=Math.round(100*a)+"%";return a});if(1===a[3])a.length=3;return(3===a.length?"hsl(":"hsla(")+a.join(",")+")"},toHexString:function(a){var d=this._rgba.slice();if(!a)d.length=3;return"#"+b.map(d,function(a,d){var b=(a*(3===d?255:1)).toString(16);return 1===b.length?"0"+b:b.substr(0,2)}).join("")},toString:function(){return 0===
this._rgba[3]?"transparent":this.toRgbaString()}};g.fn.parse.prototype=g.fn;h.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var d=a[0]/255,b=a[1]/255,c=a[2]/255,a=a[3],e=Math.max(d,b,c),g=Math.min(d,b,c),f=e-g,j=e+g,h=0.5*j;return[Math.round(g===e?0:d===e?60*(b-c)/f+360:b===e?60*(c-d)/f+120:60*(d-b)/f+240)%360,0===h||1===h?h:0.5>=h?f/j:f/(2-j),h,null==a?1:a]};h.hsla.from=function(d){if(null==d[0]||null==d[1]||null==d[2])return[null,null,null,d[3]];var b=d[0]/
360,c=d[1],e=d[2],d=d[3],c=0.5>=e?e*(1+c):e+c-e*c,e=2*e-c;return[Math.round(255*a(e,c,b+1/3)),Math.round(255*a(e,c,b)),Math.round(255*a(e,c,b-1/3)),d]};n(h,function(a,f){var j=f.props,h=f.cache,i=f.to,m=f.from;g.fn[a]=function(a){i&&!this[h]&&(this[h]=i(this._rgba));if(a===e)return this[h].slice();var d=b.type(a),f="array"===d||"object"===d?a:arguments,o=this[h].slice(),p;n(j,function(a,b){var e=f["object"===d?a:b.idx];null==e&&(e=o[b.idx]);o[b.idx]=c(e,b)});return m?(p=g(m(o)),p[h]=o,p):g(o)};n(j,
function(c,e){g.fn[c]||(g.fn[c]=function(g){var f=b.type(g),j="alpha"===c?this._hsla?"hsla":"rgba":a,h=this[j](),i=h[e.idx];if("undefined"===f)return i;"function"===f&&(g=g.call(this,i),f=b.type(g));if(null==g&&e.empty)return this;"string"===f&&(f=d.exec(g))&&(g=i+parseFloat(f[2])*("+"===f[1]?1:-1));h[e.idx]=g;return this[j](h)})})});n(f,function(a,d){b.cssHooks[d]={set:function(a,c){c=g(c);if(!i.rgba&&1!==c._rgba[3]){var e="backgroundColor"===d?a.parentNode:a,f;do if(f=b.curCSS(e,"backgroundColor"),
""!==f&&"transparent"!==f)break;while((a=a.parentNode)&&a.style);c=c.blend(g(f||"_default"))}c=c.toRgbaString();a.style[d]=c}};b.fx.step[d]=function(a){if(!a.colorInit)a.start=g(a.elem,d),a.end=g(a.end),a.colorInit=!0;b.cssHooks[d].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)";i.rgba=-1<a.backgroundColor.indexOf("rgba")});p=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,c){e=b(e).get(0);return e.farbtastic||(e.farbtastic=new jQuery._farbtastic(e,c))};jQuery._farbtastic=function(e,c){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("none"!=this.currentStyle.backgroundImage){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(d){"object"==typeof a.callback&&b(a.callback).unbind("keyup",a.updateValue);a.color=null;if("function"==typeof d)a.callback=
d;else if("object"==typeof d||"string"==typeof d)a.callback=b(d),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(d){var b=a.unpack(d);if(a.color!=d&&b)a.color=d,a.rgb=b,a.hsl=a.RGBToHSL(a.rgb),a.updateDisplay();return this};a.setHSL=function(d){a.hsl=d;a.rgb=a.HSLToRGB(d);a.color=a.pack(a.rgb);a.updateDisplay();return this};a.widgetCoords=
function(d){var c,e,f=d.target||d.srcElement,m=a.wheel;if("undefined"!=typeof d.offsetX){for(var i={x:d.offsetX,y:d.offsetY},d=f;d;)d.mouseX=i.x,d.mouseY=i.y,i.x+=d.offsetLeft,i.y+=d.offsetTop,d=d.offsetParent;d=m;for(i=m=0;d;){if("undefined"!=typeof d.mouseX){c=d.mouseX-m;e=d.mouseY-i;break}m+=d.offsetLeft;i+=d.offsetTop;d=d.offsetParent}for(d=f;d;)d.mouseX=void 0,d.mouseY=void 0,d=d.offsetParent}else i=a.absolutePosition(m),c=(d.pageX||0*(d.clientX+b("html").get(0).scrollLeft))-i.x,e=(d.pageY||
0*(d.clientY+b("html").get(0).scrollTop))-i.y;return{x:c-a.width/2,y:e-a.width/2}};a.mousedown=function(d){if(!document.dragging)b(document).bind("mousemove",a.mousemove).bind("mouseup",a.mouseup),document.dragging=!0;var c=a.widgetCoords(d);a.circleDrag=2*Math.max(Math.abs(c.x),Math.abs(c.y))>a.square;a.mousemove(d);b(a.callback).change();return!1};a.mousemove=function(d){var b=a.widgetCoords(d);a.circleDrag?(d=Math.atan2(b.x,-b.y)/6.28,0>d&&(d+=1),a.setHSL([d,a.hsl[1],a.hsl[2]])):(d=Math.max(0,
Math.min(1,-(b.x/a.square)+0.5)),b=Math.max(0,Math.min(1,-(b.y/a.square)+0.5)),a.setHSL([a.hsl[0],d,b]));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 d=6.28*a.hsl[0];b(".h-marker",f).css({left:Math.round(Math.sin(d)*a.radius+a.width/2)+"px",top:Math.round(-Math.cos(d)*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])));"object"==typeof a.callback?(b(a.callback).css({backgroundColor:a.color,color:0.5<a.hsl[2]?"#000":"#fff"}),b(a.callback).each(function(){if(this.value&&this.value!=a.color)this.value=a.color,b.browser.msie||b(this).change()})):"function"==typeof a.callback&&a.callback.call(a,a.color)};a.absolutePosition=function(d){var b={x:d.offsetLeft,y:d.offsetTop};
d.offsetParent&&(d=a.absolutePosition(d.offsetParent),b.x+=d.x,b.y+=d.y);return b};a.pack=function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),a=Math.round(255*a[2]);return"#"+(16>b?"0":"")+b.toString(16)+(16>c?"0":"")+c.toString(16)+(16>a?"0":"")+a.toString(16)};a.unpack=function(a){if(7==a.length)return[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255];if(4==a.length)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,c=a[0];b=a[1];a=a[2];b=0.5>=a?a*(b+1):a+b-a*b;a=2*a-b;return[this.hueToRGB(a,b,c+0.33333),this.hueToRGB(a,b,c),this.hueToRGB(a,b,c-0.33333)]};a.hueToRGB=function(a,b,c){c=0>c?c+1:1<c?c-1:c;return 1>6*c?a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(0.66666-c):a};a.RGBToHSL=function(a){var b,c,e,f,i=a[0],p=a[1],n=a[2];b=Math.min(i,Math.min(p,n));a=Math.max(i,Math.max(p,n));c=a-b;f=(b+a)/2;e=0;0<f&&1>f&&(e=c/(0.5>f?2*f:2-2*f));b=0;0<c&&
(a==i&&a!=p&&(b+=(p-n)/c),a==p&&a!=n&&(b+=2+(n-i)/c),a==n&&a!=i&&(b+=4+(i-p)/c),b/=6);return[b,e,f]};b("*",f).mousedown(a.mousedown);a.setColor("#000000");c&&a.linkTo(c)}})(jQuery);
Platform.module(function(b,e,c){var a=function(a,d,e,g){b("#dynamicsheet").remove();var h="",m={background:"background-color",text:"color",border:"border-color"},i,p;for(t in m){i=e[t].split(",");p=i.length;for(var n=0;n<p;n++)h+=i[n]+" { "+m[t]+": "+g+"; } "}b("head").append('<style type="text/css" id="dynamicsheet">'+h+"</style>");g=b.Color(g).toHexString();a.setColor(g);d.val(g);c.storage.color=g;c.persist()};Platform.colors=function(e){var e=c.optionsFor("colors",{element:"#ptColorPicker",input:"#ptColorInput"}),
d=b.Color(b(e.background).css("background-color")).toHexString(),j=b(e.element),g=b.farbtastic(j),h=b(e.input);g.linkTo(h);g.setColor(d);h.val(d);h.change(function(){a(g,h,e,h.val())});b("[data-target-color]").click(function(c){a(g,h,e,b(this).attr("data-target-color"));c.preventDefault()})};c.autoload(Platform.colors)});



window.skinName = "elegant"; window.skinBaseUrl = "http://www.skinbox.net/dev32/public/style_images/elegant";

Platform.backgroundPicker = function(){};



Platform.getCore().options.colors = { background: 'html, body, #branding, #ipbwrapper, .maintitle, .ipsBox, .bar, .ipsSideBlock h3, .general_box h3, .statistics_head, .header, #vnc_filter_popup_close, body#ipboard_body fieldset.submit, body#ipboard_body p.submit, .ipsForm_submit, .post_block h3, .column_view .post_wrap, .pagination .pages li.active, ul.post_controls, ul.post_controls a, .pagination .page a, .pagination .back a, .pagination .forward a, .topic_buttons li a, .ipsButton, ul.mini_pagination li a, #backtotop, #bottomScroll, #board_stats .value, #primary_nav', border: '.maintitle', text: '.ipsSideBlock h3, .ipsSideBlock h3 a, .general_box h3, .general_box h3 a, .bar, .bar a, .post_block h3,	.post_block h3 a' };

Platform.init();

Platform.ready([]);



