Orbit/public/assets/application-d22b654c29be380...

27 lines
359 KiB
JavaScript
Raw Normal View History

2012-03-20 06:38:01 +00:00
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
function r_editor(a,b,c,d){d||(d=new Array),d.width||(d.width=400),d.height||(d.height=300);var e=this;e.filename=c,e.getUrl=a,e.postUrl=b,e.nodeToBeChanged="",e.width=d.width,e.height=d.height;var f="";e.init=function(){return code="<span id='file_editor' style='border:solid; width:"+e.width+"px;height:"+e.height+"px; float:right;' ><textarea style='height:87%;width:97%;resize:none;border:none;' ></textarea><input type='button' class='send' value='Send' ><input type='button' class='discard' value='Discard' ></span>",f=$(code),f.children("textarea").load(e.getUrl),f.children("input.discard").click(function(){e.destroy()}),f.children("input.send").click(function(){e.send()}),f},e.reload=function(){$.get(e.getUrl,function(a){f.children("textarea").text(a)})},e.send=function(){$.post(e.postUrl,{filename:e.filename,context:f.children("textarea").val(),authenticity_token:$("meta[name=csrf-token]").attr("content")},null,"script")},e.destroy=function(){f.remove()}}function resize(){viewportheight=$(window).height(),viewportwidth=$(window).width(),window.navigator.userAgent.indexOf("MSIE")>0&&(windH=document.clientHeight,windW=document.clientWidht)}function mainTablePosition(){var a=$("#main-wrap > .subnav").height(),b=$("#main-wrap > .table");b.stop().animate({marginTop:a},500)}function dropmenu(){if(!$(".rc_dm").length)return;$(".rc_dm").each(function(){$(this).find(".dm_ctrl").click(function(){var a=$(this).attr("rel"),b=$(this).outerWidth(),c=$(this).outerHeight(),d=$(this).position();return $(".dm_list").not("#"+a).hide(),$("#"+a).css({width:b,zIndex:999,left:d.left,top:d.top+c}).toggle(),!1})}),$(document).click(function(){$(".dm_list").hide()})}function tab(){if(!$(".rc_tab").length)return;$(".rc_tab").each(function(){$(this).find(".tab_ctrl:first").addClass("recent"),$(this).find(".tab_content:not(:first)").hide(),$(this).find(".tab_ctrl").click(function(){var a=$(this).attr("href");return $(this).parents(".rc_tab").find(".tab_content").hide().end().find(".tab_ctrl").removeClass("recent"),$(this).addClass("recent"),$(a).show(),!1})})}function tooltip(){if(!$(".rc_tip").length)return;$(".rc_tip").each(function(){$(this).css({position:"relative"});var a=$(this).data("tip");$(this).mouseover(function(){var b=$(this).find(".td").outerHeight(),c=$(this).offset();$(this).append('<span class="td">'+a+"</span>"),$(this).find(".td").show().css("display","inline-block"),$(document).mousemove(function(a){$(this).find(".td").css({left:a.pageX-c.left+16,top:a.pageY-c.top-b-20})})}).mouseout(function(){$(this).find(".td").hide().detach()})})}function accordion(){if(!$(".rc_accor").length)return;$(".rc_accor").each(function(){$(this).find(".ac_ctrl:first").addClass("recent"),$(this).find(".ac_content:not(:first)").hide();if($(this).hasClass("av"))$(this).find(".ac_ctrl").click(function(){var a=$(this).parents(".av").find(".ac_ctrl").index(this);return $(this).siblings(".ac_ctrl").removeClass("recent"),$(this).addClass("recent"),$(this).parents(".rc_accor").find(".ac_content:not(:eq("+a+"))").stop().slideUp(),$(this).parents(".rc_accor").find(".ac_content:eq("+a+")").stop().slideToggle(),!1});else if($(this).hasClass("ah")){var a=$(this).find(".ac_content").css("width");$(this).find(".ac_content:not(:eq(0))").css({width:0}),$(this).find(".ac_ctrl").click(function(){var b=$(this).parents(".ah").find(".ac_ctrl").index(this);return $(this).siblings(".ac_ctrl").removeClass("recent"),$(this).addClass("recent"),$(this).parents(".rc_accor").find(".ac_content:not(:eq("+b+"))").stop().animate({width:0}),$(this).parents(".rc_accor").find(".ac_content:eq("+b+")").stop().show().animate({width:a}),!1})}})}(function(a,b){function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function m(a){for(var b in a){if(b==="data"&&f.isEmptyOb
){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return w&&f.nodeName(a,"button")?w.get(a,b):b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;return h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]),d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);return e||(e=c.createAttribute(d),a.setAttributeNode(e)),e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?
.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].
,fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod(e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverythin
(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active
.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=Math.round((e+.5)*d.columnWidth-a.outerWidth(!0)/2),h=Math.round((f+.5)*d.rowHeight-a.outerHeight(!0)/2);c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function c(a){a.target.src!==h&&b.inArray(this,i)===-1&&(i.push(this),--g<=0&&(setTimeout(d),f.unbind(".imagesLoaded",c)))}function d(){a.call(e,f)}var e=this,f=e.find("img").add(e.filter("img")),g=f.length,h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",i=[];return g||d(),f.bind("load.imagesLoaded error.imagesLoaded",c).each(function(){var a=this.src;this.src=h,this.src=a}),e};var w=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c)w("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");else{if(!b.isFunction(c[a])||a.charAt(0)==="_"){w("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)}})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}}(window,jQuery),function(a){function b(b,c){function d(a){return n.ratio>=1||(v.now=Math.min(p[c.axis]-q[c.axis],Math.max(0,v.start+((r?a.pageX:a.pageY)-w.start))),u=v.now*o.ratio,n.obj.css(s,-u),q.obj.css(s,v.now)),!1}function e(b){return a(document).unbind("mousemove",d),a(document).unbind("mouseup",e),q.obj.unbind("mouseup",e),document.ontouchmove=q.obj[0].ontouchend=document.ontouchend=null,!1}function f(b){if(!(n.ratio>=1)){var b=b||window.event,d=b.wheelDelta?b.wheelDelta/120:-b.detail/3;u-=d*c.wheel,u=Math.min(n[c.axis]-m[c.axis],Math.max(0,u)),q.obj.css(s,u/o.ratio),n.obj.css(s,-u),b=a.event.fix(b),b.preventDefault()}}function g(b){w.start=r?b.pageX:b.pageY;var c=parseInt(q.obj.css(s));return v.start=c=="auto"?0:c,a(document).bind("mousemove",d),document.ontouchmove=function(b){a(document).unbind("mousemove"),d(b.touches[0])},a(document).bind("mouseup",e),q.obj.bind("mouseup",e),q.obj[0].ontouchend=document.ontouchend=function(b){a(document).unbind("mouseup"),q.obj.unbind("mouseup"),e(b.touches[0])},!1}function h(){q.obj.bind("mousedown",g),q.obj[0].ontouchstart=function(a){return a.preventDefault(),q.obj.unbind("mousedown"),g(a.touches[0]),!1},p.obj.bind("mouseup",d),c.scroll&&this.addEventL
),c=j("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls"),e=j("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source"),f=a.extend(j("td,th,iframe,video,audio,object"),e),h=j("pre,script,style,textarea"),i=j("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),a.html.Schema=function(m){function t(a){return new RegExp("^"+a.replace(/([?+*])/g,".$1")+"$")}function u(b){var c,d,e,f,g,h,i,k,m,n,p,r,s,u,v,w,x,y,z,A,B,C,D=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,E=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,F=/[*?+]/;if(b){b=l(b),o["@"]&&(x=o["@"].attributes,y=o["@"].attributesOrder);for(c=0,d=b.length;c<d;c++){h=D.exec(b[c]);if(h){v=h[1],n=h[2],w=h[3],m=h[4],s={},u=[],i={attributes:s,attributesOrder:u},v==="#"&&(i.paddEmpty=!0),v==="-"&&(i.removeEmpty=!0);if(x){for(A in x)s[A]=x[A];u.push.apply(u,y)}if(m){m=l(m,"|");for(e=0,f=m.length;e<f;e++){h=E.exec(m[e]);if(h){k={},r=h[1],p=h[2].replace(/::/g,":"),v=h[3],C=h[4],r==="!"&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(p),k.required=!0);if(r==="-"){delete s[p],u.splice(a.inArray(u,p),1);continue}v&&(v==="="&&(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:p,value:C}),k.defaultValue=C),v===":"&&(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:p,value:C}),k.forcedValue=C),v==="<"&&(k.validValues=j(C,"?"))),F.test(p)?(i.attributePatterns=i.attributePatterns||[],k.pattern=t(p),i.attributePatterns.push(k)):(s[p]||u.push(p),s[p]=k)}}}!x&&n=="@"&&(x=s,y=u),w&&(i.outputName=n,o[w]=i),F.test(n)?(i.pattern=t(n),q.push(i)):o[n]=i}}}}function v(a){o={},q=[],u(a),k(b,function(a,b){p[b]=a.children})}function w(a){var b=/^(~)?(.+)$/;a&&k(l(a),function(a){var c=b.exec(a),e=c[1]==="~",f=e?"span":"div",h=c[2];p[h]=p[f],g[h]=f,e||(d[h]={}),k(p,function(a,b){a[f]&&(a[h]=a[f])})})}function x(a){var b=/^([+\-]?)(\w+)\[([^\]]+)\]$/;a&&k(l(a),function(a){var c=b.exec(a),d,e;c&&(e=c[1],e?d=p[c[2]]:d=p[c[2]]={"#comment":{}},d=p[c[2]],k(l(c[3],"|"),function(a){e==="-"?delete d[a]:d[a]={}}))})}function y(a){var b=o[a],c;if(b)return b;c=q.length;while(c--){b=q[c];if(b.pattern.test(a))return b}}var n=this,o={},p={},q=[],r,s;m=m||{},m.verify_html===!1&&(m.valid_elements="*[*]"),m.valid_styles&&(r={},k(m.valid_styles,function(b,c){r[c]=a.explode(b)})),s=m.whitespace_elements?j(m.whitespace_elements):h,m.valid_elements?v(m.valid_elements):(k(b,function(a,b){o[b]={attributes:a.attributes,attributesOrder:a.attributesOrder},p[b]=a.children}),k(l("strong/b,em/i"),function(a){a=l(a,"/"),o[a[1]].outputName=a[0]}),o.img.attributesDefault=[{name:"alt",value:""}],k(l("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr"),function(a){o[a].removeEmpty=!0}),k(l("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(a){o[a].paddEmpty=!0})),w(m.custom_elements),x(m.valid_children),u(m.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),y("span")||u("span[!data-mce-type|*]"),m.invalid_elements&&a.each(a.explode(m.invalid_elements),function(a){o[a]&&delete o[a]}),n.children=p,n.styles=r,n.getBoolAttrs=function(){return c},n.getBlockElements=function(){return d},n.getShortEndedElements=function(){return e},n.getSelfClosingElements=function(){return i},n.getNonEmptyElements=function(){return f},n.getWhiteSpaceElements=function(){return s},n.isValidChild=function(a,b){var c=p[a];return!!c&&!!c[b]},n.getElementRule=y,n.getCustomElements=function(){return g},n.addValidElements=u,n.setValidElements=v,n.addCustomElements=w,n.addValidChildren=x},a.html.Schema.boolAttrMap=c,a.html.Schema.blockElementsMap=d}(tinymce),function(a){a.html.SaxParser=function(b,c){var d=this,e=function(){};b=b||{},d.schema=c=c||new a.html.Schema,b.fix_self_closing!==!1&&(b.fix_self_closing=!0),a.each("comment cdata text start end pi doctype".split(" "),function(a){a&&(d[a]=b[a]||e)}),d.parse=function(d){function N(a){var b,c;b=j.length;while(b--)if(j[b].name===a)break;if(b>=0){for(c=j.length-1;c>=b;c--)a=j[c],a.valid&&e.end(a.name);j.length=b}}var e=t
f==c[l])return M(b,a);++e}g=e-d,h=c[k];while(g>0)h=h.parentNode,g--;i=c[l];while(g<0)i=i.parentNode,g++;for(j=h.parentNode,m=i.parentNode;j!=m;j=j.parentNode,m=m.parentNode)h=j,i=m;return N(h,i,a)}function K(a){var b,e,i,l,n,o,p;a!=g&&(b=d.createDocumentFragment());if(c[j]==c[m])return b;if(c[k].nodeType==3){e=c[k].nodeValue,i=e.substring(c[j],c[m]),a!=f&&(c[k].deleteData(c[j],c[m]-c[j]),c.collapse(h));if(a==g)return;return b.appendChild(d.createTextNode(i)),b}l=F(c[k],c[j]),n=c[m]-c[j];while(n>0)o=l.nextSibling,p=R(l,a),b&&b.appendChild(p),--n,l=o;return a!=f&&c.collapse(h),b}function L(a,b){var e,h,k,l,m,n;b!=g&&(e=d.createDocumentFragment()),h=O(a,b),e&&e.appendChild(h),k=o(a),l=k-c[j];if(l<=0)return b!=f&&(c.setEndBefore(a),c.collapse(i)),e;h=a.previousSibling;while(l>0)m=h.previousSibling,n=R(h,b),e&&e.insertBefore(n,e.firstChild),--l,h=m;return b!=f&&(c.setEndBefore(a),c.collapse(i)),e}function M(a,b){var e,i,j,k,l,n;b!=g&&(e=d.createDocumentFragment()),j=P(a,b),e&&e.appendChild(j),i=o(a),++i,k=c[m]-i,j=a.nextSibling;while(k>0)l=j.nextSibling,n=R(j,b),e&&e.appendChild(n),--k,j=l;return b!=f&&(c.setStartAfter(a),c.collapse(h)),e}function N(a,b,e){var i,j,k,l,m,n,p,q;e!=g&&(j=d.createDocumentFragment()),i=P(a,e),j&&j.appendChild(i),k=a.parentNode,l=o(a),m=o(b),++l,n=m-l,p=a.nextSibling;while(n>0)q=p.nextSibling,i=R(p,e),j&&j.appendChild(i),p=q,--n;return i=O(b,e),j&&j.appendChild(i),e!=f&&(c.setStartAfter(a),c.collapse(h)),j}function O(a,b){var d=F(c[l],c[m]-1),e,f,j,k,n,o=d!=c[l];if(d==a)return Q(d,o,i,b);e=d.parentNode,f=Q(e,i,i,b);while(e){while(d)j=d.previousSibling,k=Q(d,o,i,b),b!=g&&f.insertBefore(k,f.firstChild),o=h,d=j;if(e==a)return f;d=e.previousSibling,e=e.parentNode,n=Q(e,i,i,b),b!=g&&n.appendChild(f),f=n}}function P(a,b){var d=F(c[k],c[j]),e=d!=c[k],f,l,m,n,o;if(d==a)return Q(d,e,h,b);f=d.parentNode,l=Q(f,i,h,b);while(f){while(d)m=d.nextSibling,n=Q(d,e,h,b),b!=g&&l.appendChild(n),e=h,d=m;if(f==a)return l;d=f.nextSibling,f=f.parentNode,o=Q(f,i,h,b),b!=g&&o.appendChild(l),l=o}}function Q(a,b,d,e){var h,k,l,n,o;if(b)return R(a,e);if(a.nodeType==3){h=a.nodeValue,d?(n=c[j],k=h.substring(n),l=h.substring(0,n)):(n=c[m],k=h.substring(0,n),l=h.substring(n)),e!=f&&(a.nodeValue=l);if(e==g)return;return o=a.cloneNode(i),o.nodeValue=k,o}if(e==g)return;return a.cloneNode(i)}function R(a,b){if(b!=g)return b==f?a.cloneNode(h):a;a.parentNode.removeChild(a)}var c=this,d=a.doc,e=0,f=1,g=2,h=!0,i=!1,j="startOffset",k="startContainer",l="endContainer",m="endOffset",n=tinymce.extend,o=a.nodeIndex;n(c,{startContainer:d,startOffset:0,endContainer:d,endOffset:0,collapsed:h,commonAncestorContainer:d,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:p,setEnd:q,setStartBefore:r,setStartAfter:s,setEndBefore:t,setEndAfter:u,collapse:v,selectNode:w,selectNodeContents:x,compareBoundaryPoints:y,deleteContents:z,extractContents:A,cloneContents:B,insertNode:C,surroundContents:D,cloneRange:E})}a.Range=b}(tinymce.dom),function(){function a(a){function f(b,c){var d,e=0,f,g,h,i,j,k,l=-1,m;d=b.duplicate(),d.collapse(c),m=d.parentElement();if(m.ownerDocument!==a.dom.doc)return;while(m.contentEditable==="false")m=m.parentNode;if(!m.hasChildNodes())return{node:m,inside:1};h=m.children,f=h.length-1;while(e<=f){k=Math.floor((e+f)/2),i=h[k],d.moveToElementText(i),l=d.compareEndPoints(c?"StartToStart":"EndToEnd",b);if(l>0)f=k-1;else{if(!(l<0))return{node:i};e=k+1}}if(l<0){i?d.collapse(!1):(d.moveToElementText(m),d.collapse(!0),i=m,g=!0),d.setEndPoint(c?"EndToStart":"EndToEnd",b);if(d.compareEndPoints(c?"StartToStart":"StartToEnd",b)>0){d=b.duplicate(),d.collapse(c),j=-1;while(m==d.parentElement()){if(d.move("character",-1)==0)break;j++}}j=j||d.text.replace("\r\n"," ").length}else d.collapse(!0),d.setEndPoint(c?"StartToStart":"StartToEnd",b),j=d.text.replace("\r\n"," ").length;return{node:i,position:l,offset:j,inside:g}}function g(){function m(a){var b=f(d,a),c,g,h=0,i,j,k;c=b.node,g=b.offset;if(b.inside&&!c.hasChildNodes()){e[a?"setStart":"setEnd"](c,0);return}if(g===j){e[a?"setStartBefore":"setEndAfter"](c);return}if(b.position<0
a.util.Dispatcher(this)},expand:function(a){var b=this;a&&e(b,function(a){a.expand&&a.expand()},"items",b),b.collapsed=!1},collapse:function(a){var b=this;a&&e(b,function(a){a.collapse&&a.collapse()},"items",b),b.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(b){return b.settings||(b=new a.ui.MenuItem(b.id||c.uniqueId(),b)),this.onAddItem.dispatch(this,b),this.items[b.id]=b},addSeparator:function(){return this.add({separator:!0})},addMenu:function(a){return a.collapse||(a=this.createMenu(a)),this.menuCount++,this.add(a)},hasMenus:function(){return this.menuCount!==0},remove:function(a){delete this.items[a.id]},removeAll:function(){var a=this;e(a,function(a){a.removeAll?a.removeAll():a.remove(),a.destroy()},"items",a),a.items={}},createMenu:function(b){var d=new a.ui.Menu(b.id||c.uniqueId(),b);return d.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),d}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.dom.Event,f=a.dom.Element;a.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(d,e){e=e||{},e.container=e.container||c.doc.body,e.offset_x=e.offset_x||0,e.offset_y=e.offset_y||0,e.vp_offset_x=e.vp_offset_x||0,e.vp_offset_y=e.vp_offset_y||0,b(e.icons)&&!e.icons&&(e["class"]+=" mceNoIcons"),this.parent(d,e),this.onShowMenu=new a.util.Dispatcher(this),this.onHideMenu=new a.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(b){var d=this,e=d.settings,f;return b.container=b.container||e.container,b.parent=d,b.constrain=b.constrain||e.constrain,b["class"]=b["class"]||e["class"],b.vp_offset_x=b.vp_offset_x||e.vp_offset_x,b.vp_offset_y=b.vp_offset_y||e.vp_offset_y,b.keyboard_focus=e.keyboard_focus,f=new a.ui.DropMenu(b.id||c.uniqueId(),b),f.onAddItem.add(d.onAddItem.dispatch,d.onAddItem),f},focus:function(){var a=this;a.keyboardNav&&a.keyboardNav.focus()},update:function(){var a=this,b=a.settings,d=c.get("menu_"+a.id+"_tbl"),e=c.get("menu_"+a.id+"_co"),f,g;f=b.max_width?Math.min(d.clientWidth,b.max_width):d.clientWidth,g=b.max_height?Math.min(d.clientHeight,b.max_height):d.clientHeight,c.boxModel?a.element.setStyles({width:f,height:g}):a.element.setStyles({width:f+2,height:g+2}),b.max_width&&c.setStyle(e,"width",f),b.max_height&&(c.setStyle(e,"height",g),d.clientHeight<b.max_height&&c.setStyle(e,"overflow","hidden"))},showMenu:function(b,g,h){var i=this,j=i.settings,k,l=c.getViewPort(),m,n,o,p,q=2,r,s,t=i.classPrefix;i.collapse(1);if(i.isMenuVisible)return;i.rendered?k=c.get("menu_"+i.id):(k=c.add(i.settings.container,i.renderNode()),d(i.items,function(a){a.postRender()}),i.element=new f("menu_"+i.id,{blocker:1,container:j.container})),a.isOpera||c.setStyles(k,{left:-65535,top:-65535}),c.show(k),i.update(),b+=j.offset_x||0,g+=j.offset_y||0,l.w-=4,l.h-=4,j.constrain&&(m=k.clientWidth-q,n=k.clientHeight-q,o=l.x+l.w,p=l.y+l.h,b+j.vp_offset_x+m>o&&(b=h?h-m:Math.max(0,o-j.vp_offset_x-m)),g+j.vp_offset_y+n>p&&(g=Math.max(0,p-j.vp_offset_y-n))),c.setStyles(k,{left:b,top:g}),i.element.update(),i.isMenuVisible=1,i.mouseClickFunc=e.add(k,"click",function(a){var b;a=a.target;if(a&&(a=c.getParent(a,"tr"))&&!c.hasClass(a,t+"ItemSub")){b=i.items[a.id];if(b.isDisabled())return;r=i;while(r)r.hideMenu&&r.hideMenu(),r=r.settings.parent;return b.settings.onclick&&b.settings.onclick(a),e.cancel(a)}}),i.hasMenus()&&(i.mouseOverFunc=e.add(k,"mouseover",function(a){var b,d,e;a=a.target;if(a&&(a=c.getParent(a,"tr"))){b=i.items[a.id],i.lastMenu&&i.lastMenu.collapse(1);if(b.isDisabled())return;a&&c.hasClass(a,t+"ItemSub")&&(d=c.getRect(a),b.showMenu(d.x+d.w-q,d.y-q,d.x),i.lastMenu=b,c.addClass(c.get(b.id).firstChild,t+"ItemActive"))}})),e.add(k,"keydown",i._keyHandler,i),i.onShowMenu.dispatch(i),j.keyboard_focus&&i._setupKeyboardNav()},hideMenu:function(a){var b=this,d=c.get("menu_"+b.id),f;if(!b.isMenuVisible)return;b.keyboardNav&&b.keyboardNav.destroy(),e.remove(d,"mouseover",b.mouseOverFunc),e.remove(d,"click",b.mouseClickFunc),e.remove(d,"keydown",b._keyHandler),c.hide(d),b.isMenuVisible=0,a||b.collapse(1),b.element&&b.element.hide(),(f=c.get(b.id))&&c.removeClass(f.firstChild,b.class
e.isHidden()&&e.save({format:"raw",no_events:!0})})),a.addUnload(e.destroy,e),g.submit_patch&&e.onBeforeRenderUI.add(function(){var b=e.getElement().form;if(!b)return;if(b._mceOldSubmit)return;!b.submit.nodeType&&!b.submit.length&&(e.formElement=b,b._mceOldSubmit=b.submit,b.submit=function(){return a.triggerSave(),e.isNotDirty=1,e.formElement._mceOldSubmit(e.formElement)}),b=null}),j()},init:function(){function w(b){var c=l.get(b),e=l.urls[b]||a.documentBaseURL.replace(/\/$/,""),g;c&&a.inArray(v,b)===-1&&(f(l.dependencies(b),function(a){w(a)}),g=new c(d,e),d.plugins[b]=g,g.init&&(g.init(d,e),v.push(b)))}var c,d=this,e=d.settings,i,j,m=d.getElement(),n,p,q,r,s,t,u,v=[];a.add(d),e.aria_label=e.aria_label||b.getAttrib(m,"aria-label",d.getLang("aria.rich_text_area")),e.theme&&(e.theme=e.theme.replace(/-/,""),n=k.get(e.theme),d.theme=new n,d.theme.init&&e.init_theme&&d.theme.init(d,k.urls[e.theme]||a.documentBaseURL.replace(/\/$/,""))),f(o(e.plugins.replace(/\-/g,"")),w),e.popup_css!==!1&&(e.popup_css?e.popup_css=d.documentBaseURI.toAbsolute(e.popup_css):e.popup_css=d.baseURI.toAbsolute("themes/"+e.theme+"/skins/"+e.skin+"/dialog.css")),e.popup_css_add&&(e.popup_css+=","+d.documentBaseURI.toAbsolute(e.popup_css_add)),d.controlManager=new a.ControlManager(d),e.custom_undo_redo&&(d.onBeforeExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.beforeChange()}),d.onExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.add()})),d.onExecCommand.add(function(a,b){/^(FontName|FontSize)$/.test(b)||d.nodeChanged()});if(g){function x(a,b){(!b||!b.initial)&&d.execCommand("mceRepaint")}d.onUndo.add(x),d.onRedo.add(x),d.onSetContent.add(x)}d.onBeforeRenderUI.dispatch(d,d.controlManager),e.render_ui&&(i=e.width||m.style.width||m.offsetWidth,j=e.height||m.style.height||m.offsetHeight,d.orgDisplay=m.style.display,t=/^[0-9\.]+(|px)$/i,t.test(""+i)&&(i=Math.max(parseInt(i)+(n.deltaWidth||0),100)),t.test(""+j)&&(j=Math.max(parseInt(j)+(n.deltaHeight||0),100)),n=d.theme.renderUI({targetNode:m,width:i,height:j,deltaWidth:e.delta_width,deltaHeight:e.delta_height}),d.editorContainer=n.editorContainer),document.domain&&location.hostname!=document.domain&&(a.relaxedDomain=document.domain),b.setStyles(n.sizeContainer||n.editorContainer,{width:i,height:j}),e.content_css&&a.each(o(e.content_css),function(a){d.contentCSS.push(d.documentBaseURI.toAbsolute(a))}),j=(n.iframeHeight||j)+(typeof j=="number"?n.deltaHeight||0:""),j<100&&(j=100),d.iframeHTML=e.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',e.document_base_url!=a.documentBaseURL&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),e.ie7_compat?d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />':d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />',d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(u=0;u<d.contentCSS.length;u++)d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+d.contentCSS[u]+'" />';r=e.body_id||"tinymce",r.indexOf("=")!=-1&&(r=d.getParam("body_id","","hash"),r=r[d.id]||r),s=e.body_class||"",s.indexOf("=")!=-1&&(s=d.getParam("body_class","","hash"),s=s[d.id]||""),d.iframeHTML+='</head><body id="'+r+'" class="mceContentBody '+s+'" onload="window.parent.tinyMCE.get(\''+d.id+"').onLoad.dispatch();\"><br></body></html>",a.relaxedDomain&&(h||a.isOpera&&parseFloat(opera.version())<11)&&(q='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'),c=b.add(n.iframeContainer,"iframe",{id:d.id+"_ifr",src:q||'javascript:""',frameBorder:"0",allowTransparency:"true",title:e.aria_label,style:{width:"100%",height:j,display:"block"}}),d.contentAreaContainer=n.iframeContainer,b.get(n.editorContainer).style.display=d.orgDisplay,b.get(d.id).style.display="none",b.setAttrib(d.id,"aria-hidden",!0),(!a.relaxedDomain||!q)&&d.setupIframe(),m=c=n=null},s
.moveToBookmark(a.bookmark),d.onRedo.dispatch(d,a)),a},clear:function(){f=[],e=0,d.typing=!1},hasUndo:function(){return e>0||this.typing},hasRedo:function(){return e<f.length-1&&!this.typing}}}}(tinymce),function(a){function j(a){var b,c,d;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(a.nodeName)&&(b?(c=a.cloneNode(!1),c.appendChild(b),b=c):b=d=a.cloneNode(!1),b.removeAttribute("id"));while(a=a.parentNode);if(b)return{wrapper:b,inner:d}}function k(a,b){var c=b.ownerDocument.createRange();return c.setStart(a.endContainer,a.endOffset),c.setEndAfter(b),c.cloneContents().textContent.length==0}function l(a,b,c){var d,e;return b.isEmpty(c)?(d=b.getParent(c,"ul,ol"),b.getParent(d.parentNode,"ul,ol")||(b.split(d,c),e=b.create("p",0,'<br data-mce-bogus="1" />'),b.replace(e,c),a.select(e,1)),i):h}var b=a.dom.Event,c=a.isIE,d=a.isGecko,e=a.isOpera,f=a.each,g=a.extend,h=!0,i=!1;a.create("tinymce.ForceBlocks",{ForceBlocks:function(a){var b=this,c=a.settings,d;b.editor=a,b.dom=a.dom,d=(c.forced_root_block||"p").toLowerCase(),c.element=d.toUpperCase(),a.onPreInit.add(b.setup,b)},setup:function(){var e=this,f=e.editor,g=f.settings,i=f.dom,k=f.selection,l=f.schema.getBlockElements();if(g.forced_root_block){function m(){var a=k.getStart(),b=f.getBody(),c,d,e,h,j,m,n,o=-16777215;if(!a||a.nodeType!==1)return;while(a!=b){if(l[a.nodeName])return;a=a.parentNode}c=k.getRng(),c.setStart?(d=c.startContainer,e=c.startOffset,h=c.endContainer,j=c.endOffset):(c.item&&(c=f.getDoc().body.createTextRange(),c.moveToElementText(c.item(0))),tmpRng=c.duplicate(),tmpRng.collapse(!0),e=tmpRng.move("character",o)*-1,tmpRng.collapsed||(tmpRng=c.duplicate(),tmpRng.collapse(!1),j=tmpRng.move("character",o)*-1-e));for(a=b.firstChild;a;a)a.nodeType===3||a.nodeType==1&&!l[a.nodeName]?(m||(m=i.create(g.forced_root_block),a.parentNode.insertBefore(m,a)),n=a,a=a.nextSibling,m.appendChild(n)):(m=null,a=a.nextSibling);if(c.setStart)c.setStart(d,e),c.setEnd(h,j),k.setRng(c);else try{c=f.getDoc().body.createTextRange(),c.moveToElementText(b),c.collapse(!0),c.moveStart("character",e),j>0&&c.moveEnd("character",j),c.select()}catch(p){}f.nodeChanged()}f.onKeyUp.add(m),f.onClick.add(m)}g.force_br_newlines&&c&&f.onKeyPress.add(function(a,c){var d;if(c.keyCode==13&&k.getNode().nodeName!="LI")return k.setContent('<br id="__" /> ',{format:"raw"}),d=i.get("__"),d.removeAttribute("id"),k.select(d),k.collapse(),b.cancel(c)}),g.force_p_newlines&&(c?(a.addUnload(function(){e._previousFormats=0}),f.onKeyPress.add(function(a,b){e._previousFormats=0,b.keyCode==13&&!b.shiftKey&&a.selection.isCollapsed()&&g.keep_styles&&(e._previousFormats=j(a.selection.getStart()))}),f.onKeyUp.add(function(a,b){if(b.keyCode==13&&!b.shiftKey){var c=a.selection.getStart(),d=e._previousFormats;!c.hasChildNodes()&&d&&(c=i.getParent(c,i.isBlock),c&&c.nodeName!="LI"&&(c.innerHTML="",e._previousFormats?(c.appendChild(d.wrapper),d.inner.innerHTML=""):c.innerHTML="",k.select(c,1),k.collapse(!0),a.getDoc().execCommand("Delete",!1,null),e._previousFormats=0))}})):f.onKeyPress.add(function(a,c){c.keyCode==13&&!c.shiftKey&&!e.insertPara(c)&&b.cancel(c)}),d&&f.onKeyDown.add(function(a,b){(b.keyCode==8||b.keyCode==46)&&!b.shiftKey&&e.backspaceDelete(b,b.keyCode==8)}));if(a.isWebKit){function n(a){var b=k.getRng(),c,d=i.create("div",null," "),e,f=i.getViewPort(a.getWin()).h;b.insertNode(c=i.create("br")),b.setStartAfter(c),b.setEndAfter(c),k.setRng(b),k.getSel().focusNode==c.previousSibling&&(k.select(i.insertAfter(i.doc.createTextNode(" "),c)),k.collapse(h)),i.insertAfter(d,c),e=i.getPos(d).y,i.remove(d),e>f&&a.getWin().scrollTo(0,e)}f.onKeyPress.add(function(a,c){c.keyCode==13&&(c.shiftKey||g.force_br_newlines&&!i.getParent(k.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul"))&&(n(a),b.cancel(c))})}c&&g.element!="P"&&(f.onKeyPress.add(function(a,b){e.lastElm=k.getNode().nodeName}),f.onKeyUp.add(function(a,b){var c,d=k.getNode(),f=a.getBody();f.childNodes.length===1&&d.nodeName=="P"?(d=i.rename(d,g.element),k.select(d),k.collapse(),a.nodeChanged()):b.keyCode==13&&!b.shiftKey&&e.lastElm!="P"&&(c=i.getParent(d,"p"),c&&(i.rename(
),c),i.apply(e.not(":tinymce"),arguments),e;var h="",j=arguments;return(l?e:e.eq(0)).each(function(b,c){var d=f(c);h+=d?l?d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):d.getContent():i.apply(a(c),j)}),h}}),a.each(["append","prepend"],function(c,d){var e=h[d]=a.fn[d],i=d==="prepend";a.fn[d]=function(a){var c=this;if(!g(c))return e.apply(c,arguments);if(a!==b)return c.filter(":tinymce").each(function(b,c){var d=f(c);d&&d.setContent(i?a+d.getContent():d.getContent()+a)}),e.apply(c.not(":tinymce"),arguments),c}}),a.each(["remove","replaceWith","replaceAll","empty"],function(b,d){var e=h[d]=a.fn[d];a.fn[d]=function(){return c.call(this,d),e.apply(this,arguments)}}),h.attr=a.fn.attr,a.fn.attr=function(c,e,i){var l=this;if(!c||c!=="value"||!g(l))return h.attr.call(l,c,e,i);if(e!==b)return d.call(l.filter(":tinymce"),e),h.attr.call(l.not(":tinymce"),c,e,i),l;var m=l[0],n=f(m);return n?n.getContent():h.attr.call(a(m),c,e,i)}}var b,c,d=[],e=window;a.fn.tinymce=function(b){function o(){var c=[],d=0;f&&(f(),f=null),g.each(function(a,e){var f,h=e.id,i=b.oninit;h||(e.id=h=tinymce.DOM.uniqueId()),f=new tinymce.Editor(h,b),c.push(f),f.onInit.add(function(){var a,b=i;g.css("visibility",""),i&&++d==c.length&&(tinymce.is(b,"string")&&(a=b.indexOf(".")===-1?null:tinymce.resolve(b.replace(/\.\w+$/,"")),b=tinymce.resolve(b)),b.apply(a||tinymce,c))})}),a.each(c,function(a,b){b.render()})}var g=this,h,i,j,k,l,m="",n="";return g.length?b?(g.css("visibility","hidden"),!e.tinymce&&!c&&(h=b.script_url)?(c=1,j=h.substring(0,h.lastIndexOf("/")),/_(src|dev)\.js/g.test(h)&&(n="_src"),k=h.lastIndexOf("?"),k!=-1&&(m=h.substring(k+1)),e.tinyMCEPreInit=e.tinyMCEPreInit||{base:j,suffix:n,query:m},h.indexOf("gzip")!=-1&&(l=b.language||"en",h=h+(/\?/.test(h)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(b.theme)+"&plugins="+escape(b.plugins)+"&languages="+l,e.tinyMCE_GZ||(tinyMCE_GZ={start:function(){function c(a){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(a))}tinymce.suffix=n,c("langs/"+l+".js"),c("themes/"+b.theme+"/editor_template"+n+".js"),c("themes/"+b.theme+"/langs/"+l+".js"),a.each(b.plugins.split(","),function(a,b){b&&(c("plugins/"+b+"/editor_plugin"+n+".js"),c("plugins/"+b+"/langs/"+l+".js"))})},end:function(){}})),a.ajax({type:"GET",url:h,dataType:"script",cache:!0,success:function(){tinymce.dom.Event.domLoaded=1,c=2,b.script_loaded&&b.script_loaded(),o(),a.each(d,function(a,b){b()})}})):c===1?d.push(o):o(),g):tinyMCE.get(g[0].id):g},a.extend(a.expr[":"],{tinymce:function(a){return!!a.id&&!!tinyMCE.get(a.id)}})}(jQuery),$(document).ready(function(){function y(){q.find("li").find(r).html(""),q.find("li").find(s).html(""),q.find("li").find(t).html(""),q.find("li").find(t).attr("href",""),q.find("li").find(u).html("")}function z(a){$.ajax({type:"GET",url:"/static/Other.xml",dataType:"xml",timeout:1e3,error:function(a){q.find(".links_next").addClass("disabled"),q.find(".error_mag").show(),q.find("ul").hide(),q.find(".error_mag").html("讀取錯誤")},success:function(j){k=$(j).find("entry").length,$(j).find("entry").slice(a,a+x).each(function(a){b=$(this).find("title").text(),c=$(this).find("link").attr("href"),d=$(this).find("summary").text(),l=d.indexOf("-"),m=d.indexOf(" "),n=d.indexOf("/"),d=jQuery.trim(d),b=b.slice(0,16),d.length==31?(e=d.slice(0,l),f=e.slice(n+1,n+3),g=e.slice(7),h=d.slice(l+1,m),i=d.slice(m+1)):(e=d.slice(0,m),f=e.slice(n+1,n+3),g=e.slice(7),h="",i=d.slice(m+1)),f.slice(0,1)=="0"?f=o[f.slice(1)-1]:f=o[f-1],q.find("li").eq(a).find(r).html(f),q.find("li").eq(a).find(s).html(g),q.find("li").eq(a).find(t).html(b+"…"),q.find("li").eq(a).find(t).attr("href",c),q.find("li").eq(a).find(u).html("時間:"+i)})}})}var a="",b="",c="",d="",e="",f="",g="",h="",i="",j=0,k="",l="",m="",n="",o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p=1,q=$(".events"),r=$(".events .mon"),s=$(".events .day"),t=$(".events .event_name"),u=$(".events .event_info"),v=$(".events .links_next"),w=$(".events .links_prev"),x=q.find("ul > li").length;v.on("click",function(){return p&&j<k&&