/*! This file is auto-generated */
window.wpCookies={each:function(e,t,n){var i,s;if(!e)return 0;if(n=n||e,void 0!==e.length){for(i=0,s=e.length;i<s;i++)if(!1===t.call(n,e[i],i,e))return 0}else for(i in e)if(e.hasOwnProperty(i)&&!1===t.call(n,e[i],i,e))return 0;return 1},getHash:function(e){var t,e=this.get(e);return e&&this.each(e.split("&"),function(e){e=e.split("="),(t=t||{})[e[0]]=e[1]}),t},setHash:function(e,t,n,i,s,r){var o="";this.each(t,function(e,t){o+=(o?"&":"")+t+"="+e}),this.set(e,o,n,i,s,r)},get:function(e){var t,n,i=document.cookie,e=e+"=";if(i){if(-1===(n=i.indexOf("; "+e))){if(0!==(n=i.indexOf(e)))return null}else n+=2;return-1===(t=i.indexOf(";",n))&&(t=i.length),decodeURIComponent(i.substring(n+e.length,t))}},set:function(e,t,n,i,s,r){var o=new Date;n="object"==typeof n&&n.toGMTString?n.toGMTString():parseInt(n,10)?(o.setTime(o.getTime()+1e3*parseInt(n,10)),o.toGMTString()):"",document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+n:"")+(i?"; path="+i:"")+(s?"; domain="+s:"")+(r?"; secure":"")},remove:function(e,t,n,i){this.set(e,"",-1e3,t,n,i)}},window.getUserSetting=function(e,t){var n=getAllUserSettings();return n.hasOwnProperty(e)?n[e]:void 0!==t?t:""},window.setUserSetting=function(e,t,n){var i,s,r,o;return"object"==typeof userSettings&&(i=userSettings.uid,s=wpCookies.getHash("wp-settings-"+i),r=userSettings.url,o=!!userSettings.secure,e=e.toString().replace(/[^A-Za-z0-9_-]/g,""),t="number"==typeof t?parseInt(t,10):t.toString().replace(/[^A-Za-z0-9_-]/g,""),s=s||{},n?delete s[e]:s[e]=t,wpCookies.setHash("wp-settings-"+i,s,31536e3,r,"",o),wpCookies.set("wp-settings-time-"+i,userSettings.time,31536e3,r,"",o),e)},window.deleteUserSetting=function(e){return setUserSetting(e,"",1)},window.getAllUserSettings=function(){return"object"==typeof userSettings&&wpCookies.getHash("wp-settings-"+userSettings.uid)||{}};
;/* ImageMapster
   Version: 1.2.10 (2/25/2013)

Copyright 2011-2012 James Treworgy

http://www.outsharked.com/imagemapster
https://github.com/jamietre/ImageMapster

A jQuery plugin to enhance image maps.

*/
(function(e){e(function(){function i(){}function s(t){var n=new i;return n.then=function(e){var n;try{return e&&(n=e(t)),c(n===r?t:n)}catch(i){return o(i)}},e(n)}function o(t){var n=new i;return n.then=function(e,n){var i;try{return n?(i=n(t),c(i===r?t:i)):o(t)}catch(s){return o(s)}},e(n)}function u(e){return l(e,function(e){return o(e)})}function a(){function p(e,t,n){return l(e,t,n)}function d(e){h(s(e))}function v(e){h(o(e))}function m(e){c(e)}var t,n,u,f,l,c,h;return u=[],f=[],l=function(t,n,r){var i=a();return u.push(function(e){e.then(t,n).then(i.resolve,i.reject,i.progress)}),r&&f.push(r),i.promise},c=function(e){var t,n=0;while(t=f[n++])t(e)},h=function(e){var t,n=0;l=e.then,h=c=function(){throw new Error("already completed")},f=r;while(t=u[n++])t(e);u=[]},t={},n=new i,n.then=t.then=p,t.promise=e(n),t.resolver=e({resolve:t.resolve=d,reject:t.reject=v,progress:t.progress=m}),t}function f(e){return e&&typeof e.then=="function"}function l(e,t,n,r){var i=c(e);return i.then(t,n,r)}function c(e){var t,n;return e instanceof i?t=e:(n=a(),f(e)?(e.then(n.resolve,n.reject,n.progress),t=n.promise):(n.resolve(e),t=n.promise)),t}function h(e,t,n,r,i){return E(2,arguments),l(e,function(e){function m(e){c(e)}function g(e){h(e)}function y(e){p(e)}function b(){c=h=p=S}var s,o,u,f,c,h,p,d,v;d=e.length>>>0,s=Math.max(0,Math.min(t,d)),o=[],f=a(),u=l(f,n,r,i);if(!s)f.resolve(o);else{c=function(e){o.push(e),--s||(b(),f.resolve(o))},h=function(e){b(),f.reject(e)},p=f.progress;for(v=0;v<d;++v)v in e&&l(e[v],m,g,y)}return u})}function p(e,t,n,r){return E(1,arguments),l(e,function(e){return b(e,d,[])}).then(t,n,r)}function d(e,t,n){return e[n]=t,e}function v(e,t,n,r){function i(e){return t?t(e[0]):e[0]}return h(e,1,i,n,r)}function m(e,t){return l(e,function(e){return g(e,t)})}function g(e,t){var n,r,i;r=e.length>>>0,n=new Array(r);for(i=0;i<r;i++)i in e&&(n[i]=l(e[i],t));return b(n,d,n)}function y(e,t,i){var s=n.call(arguments,1);return l(e,function(e){return b.apply(r,[e].concat(s))})}function b(e,n,r){var i,s;return i=e.length,s=[function(e,t,r){return l(e,function(e){return l(t,function(t){return n(e,t,r,i)})})}],arguments.length>2&&s.push(r),t.apply(e,s)}function w(e,t,n){var r=arguments.length>2;return l(e,function(e){return r&&(e=n),t.resolve(e),e},function(e){return t.reject(e),o(e)},t.progress)}function E(e,t){var n,r=t.length;while(r>e){n=t[--r];if(n!=null&&typeof n!="function")throw new Error("callback is not a function")}}function S(){}var e,t,n,r;return l.defer=a,l.reject=u,l.isPromise=f,l.all=p,l.some=h,l.any=v,l.map=m,l.reduce=y,l.chain=w,e=Object.freeze||function(e){return e},i.prototype=e({always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(r,e)}}),n=[].slice,t=[].reduce||function(e){var t,n,r,i,s;s=0,t=Object(this),i=t.length>>>0,n=arguments;if(n.length<=1)for(;;){if(s in t){r=t[s++];break}if(++s>=i)throw new TypeError}else r=n[1];for(;s<i;++s)s in t&&(r=e(r,t[s],s,t));return r},l})})(typeof define=="function"?define:function(e){typeof module!="undefined"?module.exports=e():jQuery.mapster_when=e()}),function($){$.fn.mapster=function(e){var t=$.mapster.impl;if($.isFunction(t[e]))return t[e].apply(this,Array.prototype.slice.call(arguments,1));if(typeof e=="object"||!e)return t.bind.apply(this,arguments);$.error("Method "+e+" does not exist on jQuery.mapster")},$.mapster={version:"1.2.10",render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{}},defaults:{clickNavigate:!1,wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,listenToList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,safeLoad:!1,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,isTouch:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,t){$.each(this.hooks[e]||[],function(e,n){n.apply(t)})},utils:{when:$.mapster_when,defer:$.mapster_when.defer,subclass:function(e,t){var n=function(){var n=this,r=Array.prototype.slice.call(arguments,0);n.base=e.prototype,n.base.init=function(){e.prototype.constructor.apply(n,r)},t.apply(n,r)};return n.prototype=new e,n.prototype.constructor=n,n},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){var n,r,i=e.split(",");for(n=0;n<i.length;n++)r=$.trim(i[n]),r===""?i.splice(n,1):i[n]=t?t(r):r;return i},updateProps:function(e,t){var n,r=e||{},i=$.isEmptyObject(r)?t:e;return n=[],$.each(i,function(e){n.push(e)}),$.each(Array.prototype.slice.call(arguments,1),function(e,t){$.each(t||{},function(e){if(!n||$.inArray(e,n)>=0){var i=t[e];$.isPlainObject(i)?r[e]=$.extend(r[e]||{},i):i&&i.constructor===Array?r[e]=i.slice(0):typeof i!="undefined"&&(r[e]=t[e])}})}),r},isElement:function(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string"},indexOfProp:function(e,t,n){var r=e.constructor===Array?-1:null;return $.each(e,function(e,i){if(i&&(t?i[t]:i)===n)return r=e,!1}),r},boolOrDefault:function(e,t){return this.isBool(e)?e:t||!1},isBool:function(e){return typeof e=="boolean"},isUndef:function(e){return typeof e=="undefined"},ifFunction:function(e,t,n){$.isFunction(e)&&e.call(t,n)},size:function(e,t){var n=$.mapster.utils;return{width:t?e.width||e.naturalWidth:n.imgWidth(e,!0),height:t?e.height||e.naturalHeight:n.imgHeight(e,!0),complete:function(){return!!this.height&&!!this.width}}},setOpacity:function(e,t){$.mapster.hasCanvas()?e.style.opacity=t:$(e).each(function(e,n){typeof n.opacity!="undefined"?n.opacity=t:$(n).css("opacity",t)})},fader:function(){var e={},t=0,n=function(r,i,s,o){var u,a=o/15,f,l=$.mapster.utils;if(typeof r=="number"){f=e[r];if(!f)return}else u=l.indexOfProp(e,null,r),u&&delete e[u],e[++t]=f=r,r=t;s=s||1,i=i+s/a>s-.01?s:i+s/a,l.setOpacity(f,i),i<s&&setTimeout(function(){n(r,i,s,o)},15)};return n}()},getBoundList:function(e,t){if(!e.boundList)return null;var n,r,i=$(),s=$.mapster.utils.split(t);return e.boundList.each(function(t,o){for(n=0;n<s.length;n++)r=s[n],$(o).is("["+e.listKey+'="'+r+'"]')&&(i=i.add(o))}),i},setBoundListProperties:function(e,t,n){t.each(function(t,r){e.listSelectedClass&&(n?$(r).addClass(e.listSelectedClass):$(r).removeClass(e.listSelectedClass)),e.listSelectedAttribute&&$(r).attr(e.listSelectedAttribute,n)})},getMapDataIndex:function(e){var t,n;switch(e.tagName&&e.tagName.toLowerCase()){case"area":n=$(e).parent().attr("name"),t=$("img[usemap='#"+n+"']")[0];break;case"img":t=e}return t?this.utils.indexOfProp(this.map_cache,"image",t):-1},getMapData:function(e){var t=this.getMapDataIndex(e.length?e[0]:e);if(t>=0)return t>=0?this.map_cache[t]:null},queueCommand:function(e,t,n,r){return e?!e.complete||e.currentAction?(e.commands.push({that:t,command:n,args:r}),!0):!1:!1},unload:function(){this.impl.unload(),this.utils=null,this.impl=null,$.fn.mapster=null,$.mapster=null,$("*").unbind()}};var m=$.mapster,u=m.utils,ap=Array.prototype;$.each(["width","height"],function(e,t){var n=t.substr(0,1).toUpperCase()+t.substr(1);u["img"+n]=function(e,r){return(r?$(e)[t]():0)||e[t]||e["natural"+n]||e["client"+n]||e["offset"+n]}}),m.Method=function(e,t,n,r){var i=this;i.name=r.name,i.output=e,i.input=e,i.first=r.first||!1,i.args=r.args?ap.slice.call(r.args,0):[],i.key=r.key,i.func_map=t,i.func_area=n,i.name=r.name,i.allowAsync=r.allowAsync||!1},m.Method.prototype={constructor:m.Method,go:function(){var e,t,n,r,i,s=this.input,o=[],u=this;r=s.length;for(e=0;e<r;e++){t=$.mapster.getMapData(s[e]);if(t){if(!u.allowAsync&&m.queueCommand(t,u.input,u.name,u.args)){this.first&&(i="");continue}n=t.getData(s[e].nodeName==="AREA"?s[e]:this.key),n?$.inArray(n,o)<0&&o.push(n):i=this.func_map.apply(t,u.args);if(this.first||typeof i!="undefined")break}}return $(o).each(function(e,t){i=u.func_area.apply(t,u.args)}),typeof i!="undefined"?i:this.output}},$.mapster.impl=function(){function hasVml(){var e=$("<div />").appendTo("body");e.html('<v:shape id="vml_flag1" adj="1" />');var t=e[0].firstChild;t.style.behavior="url(#default#VML)";var n=t?typeof t.adj=="object":!0;return e.remove(),n}function namespaces(){return typeof document.namespaces=="object"?document.namespaces:null}function hasCanvas(){var e=namespaces();return e&&e.g_vml_?!1:$("<canvas />")[0].getContext?!0:!1}function merge_areas(e,t){var n,r,i=e.options.areas;t&&$.each(t,function(t,s){if(!s||!s.key)return;r=u.indexOfProp(i,"key",s.key),r>=0?$.extend(i[r],s):i.push(s),n=e.getDataForKey(s.key),n&&$.extend(n.options,s)})}function merge_options(e,t){var n=u.updateProps({},t);delete n.areas,u.updateProps(e.options,n),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}var me={},addMap=function(e){return m.map_cache.push(e)-1},removeMap=function(e){m.map_cache.splice(e.index,1);for(var t=m.map_cache.length-1;t>=this.index;t--)m.map_cache[t].index--};return me.get=function(e){var t=m.getMapData(this);if(!t||!t.complete)throw"Can't access data until binding complete.";return(new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""})).go()},me.data=function(e){return(new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e})).go()},me.highlight=function(e){return(new m.Method(this,function(){if(e!==!1){var t=this.highlightId;return t>=0?this.data[t].key:null}this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:e,first:!0})).go()},me.keys=function(e,t){function i(e){var r,i=[];t?(r=e.areas(),$.each(r,function(e,t){i=i.concat(t.keys)})):i.push(e.key),$.each(i,function(e,t){$.inArray(t,n)<0&&n.push(t)})}var n=[],r=m.getMapData(this);if(!r||!r.complete)throw"Can't access data until binding complete.";return!r||!r.complete?"":(typeof e=="string"?t?i(r.getDataForKey(e)):n=[r.getKeysForGroup(e)]:(t=e,this.each(function(e,t){t.nodeName==="AREA"&&i(r.getDataForArea(t))})),n.join(","))},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(e,t,n){function f(t){if(t)switch(e){case!0:t.select(s);break;case!1:t.deselect(!0);break;default:t.toggle(s)}}function l(e){e&&$.inArray(e,a)<0&&(a.push(e),o+=(o===""?"":",")+e.key)}function c(t){$.each(a,function(e,t){f(t)}),e||t.removeSelectionFinish(),t.options.boundList&&m.setBoundListProperties(t.options,m.getBoundList(t.options,o),e)}var r,i,s=n,o,a;return this.filter("img,area").each(function(n,f){var h;i=m.getMapData(f),i!==r&&(r&&c(r),a=[],o=""),i&&(h="",f.nodeName.toUpperCase()==="IMG"?m.queueCommand(i,$(f),"set",[e,t,s])||(t instanceof Array?t.length&&(h=t.join(",")):h=t,h&&$.each(u.split(h),function(e,t){l(i.getDataForKey(t.toString())),r=i})):(s=t,m.queueCommand(i,$(f),"set",[e,s])||(l(i.getDataForArea(f)),r=i)))}),i&&c(i),this},me.unbind=function(e){return(new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments})).go()},me.rebind=function(e){return(new m.Method(this,function(){var t=this;t.complete=!1,t.configureOptions(e),t.bindImages().then(function(){t.buildDataset(!0),t.complete=!0})},null,{name:"rebind",args:arguments})).go()},me.get_options=function(e,t){var n=u.isBool(e)?e:t;return(new m.Method(this,function(){var e=$.extend({},this.options);return n&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return n?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e})).go()},me.set_options=function(e){return(new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments})).go()},me.unload=function(){var e;for(e=m.map_cache.length-1;e>=0;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return(new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"})).go()},me.state=function(){var e,t=null;return $(this).each(function(n,r){if(r.nodeName==="IMG")return e=m.getMapData(r),e&&(t=e.state()),!1}),t},me.bind=function(e){return this.each(function(t,n){var r,i,s,o;r=$(n),o=m.getMapData(n);if(o){me.unbind.apply(r);if(!o.complete)return r.bind(),!0;o=null}s=this.getAttribute("usemap"),i=s&&$('map[name="'+s.substr(1)+'"]');if(!(r.is("img")&&s&&i.size()>0))return!0;r.css("border",0),o||(o=new m.MapData(this,e),o.index=addMap(o),o.map=i,o.bindImages().then(function(){o.initialize()}))})},me.init=function(e){var t,n;m.hasCanvas=function(){return u.isBool(m.hasCanvas.value)||(m.hasCanvas.value=u.isBool(e)?e:hasCanvas()),m.hasCanvas.value},m.hasVml=function(){if(!u.isBool(m.hasVml.value)){var e=namespaces();e&&!e.v&&(e.add("v","urn:schemas-microsoft-com:vml"),t=document.createStyleSheet(),n=["shape","rect","oval","circ","fill","stroke","imagedata","group","textbox"],$.each(n,function(e,n){t.addRule("v\\:"+n,"behavior: url(#default#VML); antialias:true")})),m.hasVml.value=hasVml()}return m.hasVml.value},m.isTouch=!!document.documentElement.ontouchstart,$.extend(m.defaults,m.render_defaults,m.shared_defaults),$.extend(m.area_defaults,m.render_defaults,m.shared_defaults)},me.test=function(obj){return eval(obj)},me}(),$.mapster.impl.init()}(jQuery),function(e){function o(t,n,r){var i=t,s=i.map_data,o=r.isMask;e.each(n.areas(),function(e,t){r.isMask=o||t.nohref&&s.options.noHrefIsMask,i.addShape(t,r)}),r.isMask=o}function u(e){return Math.max(0,Math.min(parseInt(e,16),255))}function a(e,t){return"rgba("+u(e.substr(0,2))+","+u(e.substr(2,2))+","+u(e.substr(4,2))+","+t+")"}function f(){}var t,n=e.mapster,r=n.utils,i,s;n.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},t=n.Graphics.prototype={constructor:n.Graphics,begin:function(t,n){var r=e(t);this.elementName=n,this.canvas=t,this.width=r.width(),this.height=r.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){var n=t.isMask?this.masks:this.shapes;n.push({mapArea:e,options:t})},createVisibleCanvas:function(t){return e(this.createCanvasFor(t)).addClass("mapster_el").css(n.canvas_style)[0]},addShapeGroup:function(t,i,s){var u=this,a,f,l,c=this.map_data,h=t.effectiveRenderOptions(i);s&&e.extend(h,s),i==="select"?(f="static_"+t.areaId.toString(),l=c.base_canvas):l=c.overlay_canvas,u.begin(l,f),h.includeKeys&&(a=r.split(h.includeKeys),e.each(a,function(e,t){var n=c.getDataForKey(t.toString());o(u,n,n.effectiveRenderOptions(i))})),o(u,t,h),u.render(),h.fade&&r.fader(n.hasCanvas()?l:e(l).find("._fill").not(".mapster_mask"),0,n.hasCanvas()?1:h.fillOpacity,h.fadeDuration)}},i={renderShape:function(e,t,n){var r,i=t.coords(null,n);switch(t.shape){case"rect":e.rect(i[0],i[1],i[2]-i[0],i[3]-i[1]);break;case"poly":e.moveTo(i[0],i[1]);for(r=2;r<t.length;r+=2)e.lineTo(i[r],i[r+1]);e.lineTo(i[0],i[1]);break;case"circ":case"circle":e.arc(i[0],i[1],i[2],0,Math.PI*2,!1)}},addAltImage:function(e,t,n,r){e.beginPath(),this.renderShape(e,n),e.closePath(),e.clip(),e.globalAlpha=r.altImageOpacity||r.fillOpacity,e.drawImage(t,0,0,n.owner.scaleInfo.width,n.owner.scaleInfo.height)},render:function(){var t,n,r=this,i=r.map_data,s=r.masks.length,o=r.createCanvasFor(i),u=o.getContext("2d"),f=r.canvas.getContext("2d");return s&&(t=r.createCanvasFor(i),n=t.getContext("2d"),n.clearRect(0,0,t.width,t.height),e.each(r.masks,function(e,t){n.save(),n.beginPath(),r.renderShape(n,t.mapArea),n.closePath(),n.clip(),n.lineWidth=0,n.fillStyle="#000",n.fill(),n.restore()})),e.each(r.shapes,function(e,t){u.save(),t.options.fill&&(t.options.altImageId?r.addAltImage(u,i.images[t.options.altImageId],t.mapArea,t.options):(u.beginPath(),r.renderShape(u,t.mapArea),u.closePath(),u.fillStyle=a(t.options.fillColor,t.options.fillOpacity),u.fill())),u.restore()}),e.each(r.shapes.concat(r.masks),function(e,t){var n=t.options.strokeWidth===1?.5:0;t.options.stroke&&(u.save(),u.strokeStyle=a(t.options.strokeColor,t.options.strokeOpacity),u.lineWidth=t.options.strokeWidth,u.beginPath(),r.renderShape(u,t.mapArea,n),u.closePath(),u.stroke(),u.restore())}),s?(n.globalCompositeOperation="source-out",n.drawImage(o,0,0),f.drawImage(t,0,0)):f.drawImage(o,0,0),r.active=!1,r.canvas},createCanvasFor:function(t){return e('<canvas width="'+t.scaleInfo.width+'" height="'+t.scaleInfo.height+'"></canvas>')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var t,n=this.map_data;t=n.base_canvas,n.base_canvas=this.createVisibleCanvas(n),e(n.base_canvas).hide(),e(t).before(n.base_canvas),n.redrawSelections(),e(n.base_canvas).show(),e(t).remove()}},s={renderShape:function(t,n,r){var i=this,s,o,u,a,f,l,c,h=t.coords();f=i.elementName?'name="'+i.elementName+'" ':"",l=r?'class="'+r+'" ':"",a='<v:fill color="#'+n.fillColor+'" class="_fill" opacity="'+(n.fill?n.fillOpacity:0)+'" /><v:stroke class="_fill" opacity="'+n.strokeOpacity+'"/>',o=n.stroke?" strokeweight="+n.strokeWidth+' stroked="t" strokecolor="#'+n.strokeColor+'"':' stroked="f"',s=n.fill?' filled="t"':' filled="f"';switch(t.shape){case"rect":c="<v:rect "+l+f+s+o+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+h[0]+"px;top:"+h[1]+"px;width:"+(h[2]-h[0])+"px;height:"+(h[3]-h[1])+'px;">'+a+"</v:rect>";break;case"poly":c="<v:shape "+l+f+s+o+' coordorigin="0,0" coordsize="'+i.width+","+i.height+'" path="m '+h[0]+","+h[1]+" l "+h.slice(2).join(",")+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+i.width+"px;height:"+i.height+'px;">'+a+"</v:shape>";break;case"circ":case"circle":c="<v:oval "+l+f+s+o+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+(h[0]-h[2])+"px;top:"+(h[1]-h[2])+"px;width:"+h[2]*2+"px;height:"+h[2]*2+'px;">'+a+"</v:oval>"}return u=e(c),e(i.canvas).append(u),u},render:function(){var t,n=this;return e.each(this.shapes,function(e,t){n.renderShape(t.mapArea,t.options)}),this.masks.length&&e.each(this.masks,function(e,i){t=r.updateProps({},i.options,{fillOpacity:1,fillColor:i.options.fillColorMask}),n.renderShape(i.mapArea,t,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(t){var n=t.scaleInfo.width,r=t.scaleInfo.height;return e('<var width="'+n+'" height="'+r+'" style="zoom:1;overflow:hidden;display:block;width:'+n+"px;height:"+r+'px;"></var>')[0]},clearHighlight:function(){e(this.map_data.overlay_canvas).children().remove()},removeSelections:function(t){t>=0?e(this.map_data.base_canvas).find('[name="static_'+t.toString()+'"]').remove():e(this.map_data.base_canvas).children().remove()}},e.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,r){t[r]=function(e){return function(){return t[e]=(n.hasCanvas()?i[e]:s[e])||f,t[e].apply(this,arguments)}}(r)})}(jQuery),function(e){var t=e.mapster,n=t.utils,r=[];t.MapImages=function(e){this.owner=e,this.clear()},t.MapImages.prototype={constructor:t.MapImages,slice:function(){return r.slice.apply(this,arguments)},splice:function(){r.slice.apply(this.status,arguments);var e=r.slice.apply(this,arguments);return e},complete:function(){return e.inArray(!1,this.status)<0},_add:function(e){var t=r.push.call(this,e)-1;return this.status[t]=!1,t},indexOf:function(t){return e.inArray(t,this)},clear:function(){var t=this;t.ids&&t.ids.length>0&&e.each(t.ids,function(e,n){delete t[n]}),t.ids=[],t.length=0,t.status=[],t.splice(0)},add:function(t,n){var r,i,s=this;if(!t)return;if(typeof t=="string"){i=t,t=s[i];if(typeof t=="object")return s.indexOf(t);t=e("<img />").addClass("mapster_el").hide(),r=s._add(t[0]),t.bind("load",function(e){s.imageLoaded.call(s,e)}).bind("error",function(e){s.imageLoadError.call(s,e)}),t.attr("src",i)}else r=s._add(e(t)[0]);if(n){if(this[n])throw n+" is already used or is not available as an altImage alias.";s.ids.push(n),s[n]=s[r]}return r},bind:function(e){var t=this,r,i=t.owner.options.configTimeout/200,s=function(){var e;e=t.length;while(e-->0)if(!t.isLoaded(e))break;t.complete()?t.resolve():i-->0?t.imgTimeout=window.setTimeout(function(){s.call(t,!0)},50):t.imageLoadError.call(t)};return r=t.deferred=n.defer(),s(),r},resolve:function(){var e=this,t=e.deferred;t&&(e.deferred=null,t.resolve())},imageLoaded:function(t){var n=this,r=n.indexOf(t.target);r>=0&&(n.status[r]=!0,e.inArray(!1,n.status)<0&&n.resolve())},imageLoadError:function(e){clearTimeout(this.imgTimeout),this.triesLeft=0;var t=e?"The image "+e.target.src+" failed to load.":"The images never seemed to finish loading. You may just need to increase the configTimeout if images could take a long time to load.";throw t},isLoaded:function(e){var t,r=this,i=r.status;return i[e]?!0:(t=r[e],typeof t.complete!="undefined"?i[e]=t.complete:i[e]=!!n.imgWidth(t),i[e])}}}(jQuery),function(e){function r(t){e.extend(t,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null})}function i(e){return[e,e.render_highlight,e.render_select]}function s(r){var s=r.options,o=r.images;t.hasCanvas()&&(e.each(s.altImages||{},function(e,t){o.add(t,e)}),e.each([s].concat(s.areas),function(t,n){e.each(i(n),function(e,t){t&&t.altImage&&(t.altImageId=o.add(t.altImage))})})),r.area_options=n.updateProps({},t.area_defaults,s)}function o(e,t,r,i){function s(t){e.currentAreaId!==t&&e.highlightId>=0&&i.resolve()}i=i||n.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0);if(t<0)return;return r.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){return function(){o(e,0,r,i)}}(r),t||100):s(r.areaId),i}function u(e){t.hasCanvas()||this.blur(),e.preventDefault()}function a(t,n){var r=t.getAllDataForArea(this),i=r.length?r[0]:null;if(!i||i.isNotRendered()||i.owner.currentAction)return;if(t.currentAreaId===i.areaId)return;t.highlightId!==i.areaId&&(t.clearEffects(),i.highlight(),t.options.showToolTip&&e.each(r,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()})),t.currentAreaId=i.areaId,e.isFunction(t.options.onMouseover)&&t.options.onMouseover.call(this,{e:n,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}function f(t,n){var r,i=t.getDataForArea(this),s=t.options;if(t.currentAreaId<0||!i)return;r=t.getDataForArea(n.relatedTarget);if(r===i)return;t.currentAreaId=-1,i.area=null,o(t,s.mouseoutDelay,i).then(t.clearEffects),e.isFunction(s.onMouseout)&&s.onMouseout.call(this,{e:n,options:s,key:i.key,selected:i.isSelected()})}function l(t){var n=t.options;t.ensureNoHighlight(),n.toolTipClose&&e.inArray("area-mouseout",n.toolTipClose)>=0&&t.activeToolTip&&t.clearToolTip()}function c(r,i){function v(u){var p,g;l=u.isSelectable()&&(u.isDeselectable()||!u.isSelected()),l?f=!u.isSelected():f=u.isSelected(),a=t.getBoundList(d,u.key);if(e.isFunction(d.onClick)){c=d.onClick.call(h,{e:i,listTarget:a,key:u.key,selected:f});if(n.isBool(c)){if(!c)return!1;g=e(u.area).attr("href");if(g!=="#")return window.location.href=g,!1}}l&&(s=u.toggle()),d.boundList&&d.boundList.length>0&&t.setBoundListProperties(d,a,u.isSelected()),p=u.effectiveOptions(),p.includeKeys&&(o=n.split(p.includeKeys),e.each(o,function(e,t){var n=r.getDataForKey(t.toString());n.options.isMask||v(n)}))}var s,o,a,f,l,c,h=this,p=r.getDataForArea(this),d=r.options;u.call(this,i);if(d.clickNavigate&&p.href){window.location.href=p.href;return}p&&!p.owner.currentAction&&(d=r.options,v(p))}var t=e.mapster,n=t.utils;t.MapData=function(e,n){var i=this;i.image=e,i.images=new t.MapImages(i),i.graphics=new t.Graphics(i),i.imgCssText=e.style.cssText||null,r(i),i.configureOptions(n),i.mouseover=function(e){a.call(this,i,e)},i.mouseout=function(e){f.call(this,i,e)},i.click=function(e){c.call(this,i,e)},i.clearEffects=function(e){l.call(this,i,e)}},t.MapData.prototype={constructor:t.MapData,configureOptions:function(e){this.options=n.updateProps({},t.defaults,e)},bindImages:function(){var e=this,t=e.images;return t.length>2?t.splice(2):t.length===0&&(t.add(e.image),t.add(e.image.src)),s(e),e.images.bind()},isActive:function(){return!this.complete||this.currentAction},state:function(){return{complete:this.complete,resizing:this.currentAction==="resizing",zoomed:this.zoomed,zoomedArea:this.zoomedArea,scaleInfo:this.scaleInfo}},wrapId:function(){return"mapster_wrap_"+this.index},_idFromKey:function(e){return typeof e=="string"&&this._xref.hasOwnProperty(e)?this._xref[e]:-1},getSelected:function(){var t="";return e.each(this.data,function(e,n){n.isSelected()&&(t+=(t?",":"")+this.key)}),t},getAllDataForArea:function(t,r){var i,s,o,u=this,a=e(t).filter("area").attr(u.options.mapKey);if(a){o=[],a=n.split(a);for(i=0;i<(r||a.length);i++)s=u.data[u._idFromKey(a[i])],s.area=t.length?t[0]:t,o.push(s)}return o},getDataForArea:function(e){var t=this.getAllDataForArea(e,1);return t?t[0]||null:null},getDataForKey:function(e){return this.data[this._idFromKey(e)]},getKeysForGroup:function(e){var t=this.getDataForKey(e);return t?t.isPrimary?t.key:this.getPrimaryKeysForMapAreas(t.areas()).join(","):""},getPrimaryKeysForMapAreas:function(t){var n=[];return e.each(t,function(t,r){e.inArray(r.keys[0],n)<0&&n.push(r.keys[0])}),n},getData:function(e){return typeof e=="string"?this.getDataForKey(e):e&&e.mapster||n.isElement(e)?this.getDataForArea(e):null},ensureNoHighlight:function(){var e;this.highlightId>=0&&(this.graphics.clearHighlight(),e=this.data[this.highlightId],e.changeState("highlight",!1),this.setHighlightId(-1))},setHighlightId:function(e){this.highlightId=e},clearSelections:function(){e.each(this.data,function(e,t){t.selected&&t.deselect(!0)}),this.removeSelectionFinish()},setAreaOptions:function(e){var t,r,i;e=e||[];for(t=e.length-1;t>=0;t--)r=e[t],r&&(i=this.getDataForKey(r.key),i&&(n.updateProps(i.options,r),n.isBool(r.selected)&&(i.selected=r.selected)))},drawSelections:function(e){var t,r=n.asArray(e);for(t=r.length-1;t>=0;t--)this.data[r[t]].drawSelection()},redrawSelections:function(){e.each(this.data,function(e,t){t.isSelectedOrStatic()&&t.drawSelection()})},initialize:function(){var r,i,s,o,u,a,f,l,c,h,p,d,v=this,g=v.options;if(v.complete)return;c=e(v.image),u=c.parent().attr("id"),u&&u.length>=12&&u.substring(0,12)==="mapster_wrap"?(o=c.parent(),o.attr("id",v.wrapId())):(o=e('<div id="'+v.wrapId()+'"></div>'),g.wrapClass&&(g.wrapClass===!0?o.addClass(c[0].className):o.addClass(g.wrapClass))),v.wrapper=o,v.scaleInfo=d=n.scaleMap(v.images[0],v.images[1],g.scaleMap),v.base_canvas=i=v.graphics.createVisibleCanvas(v),v.overlay_canvas=s=v.graphics.createVisibleCanvas(v),r=e(v.images[1]).addClass("mapster_el "+v.images[0].className).attr({id:null,usemap:null}),l=n.size(v.images[0]),l.complete&&r.css({width:l.width,height:l.height}),v.buildDataset(),a={display:"block",position:"relative",padding:0,width:d.width,height:d.height},g.wrapCss&&e.extend(a,g.wrapCss),c.parent()[0]!==v.wrapper[0]&&c.before(v.wrapper),o.css(a),e(v.images.slice(2)).hide();for(f=1;f<v.images.length;f++)o.append(v.images[f]);o.append(i).append(s).append(c.css(t.canvas_style)),n.setOpacity(v.images[0],0),e(v.images[1]).show(),n.setOpacity(v.images[1],1),g.isSelectable&&g.onGetList&&(p=v.data.slice(0),g.sortList&&(g.sortList==="desc"?h=function(e,t){return e===t?0:e>t?-1:1}:h=function(e,t){return e===t?0:e<t?-1:1},p.sort(function(e,t){return e=e.value,t=t.value,h(e,t)})),v.options.boundList=g.onGetList.call(v.image,p)),v.complete=!0,v.processCommandQueue(),g.onConfigured&&typeof g.onConfigured=="function"&&g.onConfigured.call(c,!0)},buildDataset:function(n){function E(e,n){var r=new t.AreaData(y,e,n);return r.areaId=y._xref[e]=y.data.push(r)-1,r.areaId}var r,i,s,o,u,a,f,l,c,h,p,d,v,g,y=this,b=y.options,w;y._xref={},y.data=[],n||(y.mapAreas=[]),w=!b.mapKey,w&&(b.mapKey="data-mapster-key"),r=t.hasVml()?"area":w?"area[coords]":"area["+b.mapKey+"]",i=e(y.map).find(r).unbind(".mapster");for(p=0;p<i.length;p++){o=0,a=i[p],u=e(a);if(!a.coords)continue;w?(f=String(p),u.attr("data-mapster-key",f)):f=a.getAttribute(b.mapKey),n?(l=y.mapAreas[u.data("mapster")-1],l.configure(f)):(l=new t.MapArea(y,a,f),y.mapAreas.push(l)),h=l.keys;for(s=h.length-1;s>=0;s--)c=h[s],b.mapValue&&(d=u.attr(b.mapValue)),w?(o=E(y.data.length,d),v=y.data[o],v.key=c=o.toString()):(o=y._xref[c],o>=0?(v=y.data[o],d&&!y.data[o].value&&(v.value=d)):(o=E(c,d),v=y.data[o],v.isPrimary=s===0)),l.areaDataXref.push(o),v.areasXref.push(p);g=u.attr("href"),g&&g!=="#"&&!v.href&&(v.href=g),l.nohref||(u.bind("click.mapster",y.click),t.isTouch||u.bind("mouseover.mapster",y.mouseover).bind("mouseout.mapster",y.mouseout).bind("mousedown.mapster",y.mousedown)),u.data("mapster",p+1)}y.setAreaOptions(b.areas),y.redrawSelections()},processCommandQueue:function(){var e,n=this;while(!n.currentAction&&n.commands.length)e=n.commands[0],n.commands.splice(0,1),t.impl[e.command].apply(e.that,e.args)},clearEvents:function(){e(this.map).find("area").unbind(".mapster"),e(this.images).unbind(".mapster")},_clearCanvases:function(t){t||e(this.base_canvas).remove(),e(this.overlay_canvas).remove()},clearMapData:function(t){var r=this;this._clearCanvases(t),e.each(this.data,function(e,t){t.reset()}),this.data=null,t||(this.image.style.cssText=this.imgCssText,e(this.wrapper).before(this.image).remove()),r.images.clear(),this.image=null,n.ifFunction(this.clearTooltip,this)},removeSelectionFinish:function(){var e=this.graphics;e.refreshSelections(),e.clearHighlight()}}}(jQuery),function(e){function r(t){var n=this,r=n.owner;r.options.singleSelect&&r.clearSelections(),n.isSelected()||(t&&(n.optsCache=e.extend(n.effectiveRenderOptions("select"),t,{altImageId:r.images.add(t.altImage)})),n.drawSelection(),n.selected=!0,n.changeState("select",!0)),r.options.singleSelect&&r.graphics.refreshSelections()}function i(e){var t=this;t.selected=!1,t.changeState("select",!1),t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish()}function s(e){var t=this;return t.isSelected()?t.deselect():t.select(e),t.isSelected()}var t=e.mapster,n=t.utils;t.AreaData=function(t,n,r){e.extend(this,{owner:t,key:n||"",isPrimary:!0,areaId:-1,href:"",value:r||"",options:{},selected:null,areasXref:[],area:null,optsCache:null})},t.AreaData.prototype={constuctor:t.AreaData,select:r,deselect:i,toggle:s,areas:function(){var e,t=[];for(e=0;e<this.areasXref.length;e++)t.push(this.owner.mapAreas[this.areasXref[e]]);return t},coords:function(t){var n=[];return e.each(this.areas(),function(e,r){n=n.concat(r.coords(t))}),n},reset:function(){e.each(this.areas(),function(e,t){t.reset()}),this.areasXref=[],this.options=null},isSelectedOrStatic:function(){var e=this.effectiveOptions();return n.isBool(e.staticState)?e.staticState:this.isSelected()},isSelected:function(){return n.isBool(this.selected)?this.selected:n.isBool(this.owner.area_options.selected)?this.owner.area_options.selected:!1},isSelectable:function(){return n.isBool(this.effectiveOptions().staticState)?!1:n.isBool(this.owner.options.staticState)?!1:n.boolOrDefault(this.effectiveOptions().isSelectable,!0)},isDeselectable:function(){return n.isBool(this.effectiveOptions().staticState)?!1:n.isBool(this.owner.options.staticState)?!1:n.boolOrDefault(this.effectiveOptions().isDeselectable,!0)},isNotRendered:function(){var t=e(this.area);return t.attr("nohref")||!t.attr("href")||this.effectiveOptions().isMask},effectiveOptions:function(e){var t=n.updateProps({},this.owner.area_options,this.options,e||{},{id:this.areaId});return t.selected=this.isSelected(),t},effectiveRenderOptions:function(t,r){var i,s=this.optsCache;if(!s||t==="highlight")i=this.effectiveOptions(r),s=n.updateProps({},i,i["render_"+t]),t!=="highlight"&&(this.optsCache=s);return e.extend({},s)},changeState:function(t,n){e.isFunction(this.owner.options.onStateChange
)&&this.owner.options.onStateChange.call(this.owner.image,{key:this.key,state:t,selected:n})},highlight:function(e){var t=this.owner;this.effectiveOptions().highlight&&t.graphics.addShapeGroup(this,"highlight",e),t.setHighlightId(this.areaId),this.changeState("highlight",!0)},drawSelection:function(){this.owner.graphics.addShapeGroup(this,"select")}},t.MapArea=function(t,r,i){if(!t)return;var s=this;s.owner=t,s.area=r,s.areaDataXref=[],s.originalCoords=[],e.each(n.split(r.coords),function(e,t){s.originalCoords.push(parseFloat(t))}),s.length=s.originalCoords.length,s.shape=r.shape.toLowerCase(),s.nohref=r.nohref||!r.href,s.configure(i)},t.MapArea.prototype={constructor:t.MapArea,configure:function(e){this.keys=n.split(e)},reset:function(){this.area=null},coords:function(t){return e.map(this.originalCoords,function(e){return t?e:e+t})}}}(jQuery),function(e){var t=e.mapster.utils;t.areaCorners=function(n,r,i,s,o){var a,f,l,c,h,p,d,v,m,g,y,b,w,E,S=0,x=0,T,N,C,k,L,A,O=[];n=n.length?n:[n],i=i?e(i):e(document.body),a=i.offset(),T=a.left,N=a.top,r&&(a=e(r).offset(),S=a.left,x=a.top);for(E=0;E<n.length;E++){A=n[E];if(A.nodeName==="AREA"){C=t.split(A.coords,parseInt);switch(A.shape){case"circle":y=C[0],b=C[1],k=C[2],O=[];for(E=0;E<360;E+=20)L=E*Math.PI/180,O.push(y+k*Math.cos(L),b+k*Math.sin(L));break;case"rect":O.push(C[0],C[1],C[2],C[1],C[2],C[3],C[0],C[3]);break;default:O=O.concat(C)}for(E=0;E<O.length;E+=2)O[E]=parseInt(O[E],10)+S,O[E+1]=parseInt(O[E+1],10)+x}else A=e(A),a=A.position(),O.push(a.left,a.top,a.left+A.width(),a.top,a.left+A.width(),a.top+A.height(),a.left,a.top+A.height())}l=c=d=m=999999,h=p=v=g=-1;for(E=O.length-2;E>=0;E-=2)y=O[E],b=O[E+1],y<l&&(l=y,g=b),y>h&&(h=y,m=b),b<c&&(c=b,v=y),b>p&&(p=b,d=y);return s&&o&&(f=!1,e.each([[v-s,c-o],[d,c-o],[l-s,g-o],[l-s,m],[h,g-o],[h,m],[v-s,p],[d,p]],function(e,t){if(!f&&t[0]>T&&t[1]>N)return w=t,f=!0,!1}),f||(w=[h,p])),w}}(jQuery),function(e){var t=e.mapster,n=t.utils,r=t.MapArea.prototype;t.utils.getScaleInfo=function(e,t){var n;return t?(n=e.width/t.width||e.height/t.height,n>.98&&n<1.02&&(n=1)):(n=1,t=e),{scale:n!==1,scalePct:n,realWidth:t.width,realHeight:t.height,width:e.width,height:e.height,ratio:e.width/e.height}},t.utils.scaleMap=function(e,t,r){var i=n.size(e),s=n.size(t,!0);if(!s.complete())throw"Another script, such as an extension, appears to be interfering with image loading. Please let us know about this.";return i.complete()||(i=s),this.getScaleInfo(i,r?s:null)},t.MapData.prototype.resize=function(r,i,s,o){function v(n,r,i){t.hasCanvas()?(n.width=r,n.height=i):(e(n).width(r),e(n).height(i))}function g(){d.currentAction="",e.isFunction(o)&&o(),d.processCommandQueue()}function y(){v(d.overlay_canvas,r,i);if(h>=0){var e=d.data[h];e.tempOptions={fade:!1},d.getDataForKey(e.key).highlight(),e.tempOptions=null}v(d.base_canvas,r,i),d.redrawSelections(),g()}function b(){e(d.image).css(l),d.scaleInfo=n.getScaleInfo({width:r,height:i},{width:d.scaleInfo.realWidth,height:d.scaleInfo.realHeight}),e.each(d.data,function(t,n){e.each(n.areas(),function(e,t){t.resize()})})}var a,f,l,c,h,p,d=this;o=o||s;if(d.scaleInfo.width===r&&d.scaleInfo.height===i)return;h=d.highlightId,r||(p=i/d.scaleInfo.realHeight,r=Math.round(d.scaleInfo.realWidth*p)),i||(p=r/d.scaleInfo.realWidth,i=Math.round(d.scaleInfo.realHeight*p)),l={width:String(r)+"px",height:String(i)+"px"},t.hasCanvas()||e(d.base_canvas).children().remove(),c=e(d.wrapper).find(".mapster_el").add(d.wrapper),s?(f=[],d.currentAction="resizing",c.each(function(t,r){a=n.defer(),f.push(a),e(r).animate(l,{duration:s,complete:a.resolve,easing:"linear"})}),a=n.defer(),f.push(a),n.when.all(f).then(y),b(),a.resolve()):(c.css(l),b(),y())},t.MapArea=n.subclass(t.MapArea,function(){this.base.init(),this.owner.scaleInfo.scale&&this.resize()}),r.coords=function(e,t){var n,r=[],i=e||this.owner.scaleInfo.scalePct,s=t||0;if(i===1&&t===0)return this.originalCoords;for(n=0;n<this.length;n++)r.push(Math.round(this.originalCoords[n]*i)+s);return r},r.resize=function(){this.area.coords=this.coords().join(",")},r.reset=function(){this.area.coords=this.coords(1).join(",")},t.impl.resize=function(e,n,r,i){if(!e&&!n)return!1;var s=(new t.Method(this,function(){this.resize(e,n,r,i)},null,{name:"resize",args:arguments})).go();return s}}(jQuery),function(e){function r(t,n,r){var i;return n?(i=typeof n=="string"?e(n):e(n).clone(),i.append(t)):i=e(t),i.css(e.extend(r||{},{display:"block",position:"absolute"})).hide(),e("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function i(e,t){var r={left:t.left+"px",top:t.top+"px"},i=e.attr("data-opacity")||0,s=e.css("z-index");if(parseInt(s,10)===0||s==="auto")r["z-index"]=9999;e.css(r).addClass("mapster_tooltip"),t.fadeDuration&&t.fadeDuration>0?n.fader(e[0],0,i,t.fadeDuration):n.setOpacity(e[0],i)}function s(t,n,r,i,s,o){var u=r+".mapster-tooltip";if(e.inArray(n,t)>=0)return i.unbind(u).bind(u,function(e){if(!s||s.call(this,e))i.unbind(".mapster-tooltip"),o&&o.call(this)}),{object:i,event:u}}function o(e,t,r,s,o){var u,a={};return o=o||{},t?(u=n.areaCorners(t,r,s,e.outerWidth(!0),e.outerHeight(!0)),a.left=u[0],a.top=u[1]):(a.left=o.left,a.top=o.top),a.left+=o.offsetx||0,a.top+=o.offsety||0,a.css=o.css,a.fadeDuration=o.fadeDuration,i(e,a),e}function u(e){return e?typeof e=="string"||e.jquery?e:e.content:null}var t=e.mapster,n=t.utils;e.extend(t.defaults,{toolTipContainer:'<div style="border: 2px solid black; background: #EEEEEE; width:160px; padding:4px; margin: 4px; -moz-box-shadow: 3px 3px 5px #535353; -webkit-box-shadow: 3px 3px 5px #535353; box-shadow: 3px 3px 5px #535353; -moz-border-radius: 6px 6px 6px 6px; -webkit-border-radius: 6px; border-radius: 6px 6px 6px 6px; opacity: 0.9;"></dteniv>',showToolTip:!1,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout"],onShowToolTip:null,onHideToolTip:null}),e.extend(t.area_defaults,{toolTip:null,toolTipClose:null}),t.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,n.ifFunction(this.options.onHideToolTip,this))},t.AreaData.prototype.showToolTip=function(t,i){var u,a,f,l,c,h={},p=this,d=p.owner,v=p.effectiveOptions();i=i?e.extend({},i):{},t=t||v.toolTip,a=i.closeEvents||v.toolTipClose||d.options.toolTipClose||"tooltip-click",c=typeof i.template!="undefined"?i.template:d.options.toolTipContainer,i.closeEvents=typeof a=="string"?a=n.split(a):a,i.fadeDuration=i.fadeDuration||(d.options.toolTipFade?d.options.fadeDuration||v.fadeDuration:0),f=p.area?p.area:e.map(p.areas(),function(e){return e.area});if(d.activeToolTipID===p.areaId)return;return d.clearToolTip(),d.activeToolTip=u=r(t,c,i.css),d.activeToolTipID=p.areaId,l=function(){d.clearToolTip()},s(a,"area-click","click",e(d.map),null,l),s(a,"tooltip-click","click",u,null,l),s(a,"image-mouseout","mouseout",e(d.image),function(e){return e.relatedTarget&&e.relatedTarget.nodeName!=="AREA"&&e.relatedTarget!==p.area},l),o(u,f,d.image,i.container,c,i),n.ifFunction(d.options.onShowToolTip,p.area,{toolTip:u,options:h,areaOptions:v,key:p.key,selected:p.isSelected()}),u},t.impl.tooltip=function(n,i){return(new t.Method(this,function(){var a,f,l=this;if(!n)l.clearToolTip();else{f=e(n);if(l.activeToolTipID===f[0])return;l.clearToolTip(),l.activeToolTip=a=r(u(i),i.template||l.options.toolTipContainer,i.css),l.activeToolTipID=f[0],s(["tooltip-click"],"tooltip-click","click",a,null,function(){l.clearToolTip()}),l.activeToolTip=a=o(a,f,l.image,i.container,i)}},function(){e.isPlainObject(n)&&!i&&(i=n),this.showToolTip(u(i),i)},{name:"tooltip",args:arguments,key:n})).go()}}(jQuery);

;var Image;var Canvas,Ctx;jQuery(function($){$('img[usemap]').each(function(){var areas=[];$('map[name="'+$(this).attr('usemap').substr(1)+'"]').find('area').each(function(){areas.push({'key':$(this).attr('data-mapkey'),'toolTip':$(this).attr('data-tooltip'),'isSelectable':false,'render_highlight':{'fillColor':$(this).attr('data-fill-color'),'fillOpacity':$(this).attr('data-fill-opacity'),'strokeColor':$(this).attr('data-stroke-color'),'strokeOpacity':$(this).attr('data-stroke-opacity'),'stroke':$(this).attr('data-stroke-width')>0,'strokeWidth':$(this).attr('data-stroke-width'),'fade':true,'fadeDuration':300}});});var map=this;$(this).mapster({clickNavigate:true,showToolTip:true,toolTipContainer:$('<div class="imagemapper-tooltip"></div>'),toolTipClose:['area-click'],mapKey:'data-mapkey',onClick:AreaClicked,onMouseover:function(m){if(!m.options.toolTip.length)
$(map).mapster('tooltip',false);clearTimeout($(map).data('mapster-highlight-timeout'));$(map).mapster('highlight',false);$(map).mapster('highlight',m.key);},singleSelect:true,render_select:{fillOpacity:0},areas:areas});if(imgmap.pulseOption&&imgmap.pulseOption!='never'){$(this).mouseenter(function(e){if($(e.fromElement).hasClass('imagemapper-tooltip')||$(e.fromElement).is('area'))
return;if(!$(this).attr('data-first-mouseenter')){if(imgmap.pulseOption=='first_time')
$(this).attr('data-first-mouseenter',true);$(this).mapster('highlight',false);for(var area in areas){$(this).mapster('highlight',areas[area].key);}
var map=this;clearTimeout($(this).data('mapster-highlight-timeout'));$(this).data('mapster-highlight-timeout',setTimeout(function(){$(map).closest('.imgmap-frontend-image').find('canvas').each(function(){$(this).stop().animate({opacity:0},300,function(){$(map).mapster('highlight',false);});});},500));}});}
$('body').click(function(e){if(!$(e.target).is('.imagemapper-tooltip')&&!$(e.target).closest('.imagemapper-tooltip').length&&$(e.target).attr('data-type')!='tooltip')
$(map).mapster('tooltip',false);if(!$(e.target).is('.imgmap-dialog-alt')&&!$(e.target).closest('.imgmap-dialog-alt').length)
$('.imgmap-dialog-alt').hide(200);});});if(!imgmap.alt_dialog){if($().dialog){$('.imgmap-dialog-wrapper').dialog({autoOpen:false,zIndex:10000,maxWidth:700,width:'auto',show:300,dialogClass:'imgmap-dialog'});$('body').click(function(e){if(!$(e.target).is('.ui-dialog, a')&&!$(e.target).closest('.ui-dialog').length)
$('.imgmap-dialog-wrapper').each(function(e){$(this).dialog('close');});});}
else{if($('area[data-type="popup"]').length){if(imgmap.admin_logged){var close=$('<a>');close.text('Close').css({cursor:'pointer',float:'right',fontSize:'0.9em'});close.click(function(){$('.imgmap-dialog-wrapper').text('');});$('.imgmap-dialog-wrapper').html("There was a problem loading jQuery UI Dialog widget. A plugin or a theme you're using might be including its own copy of jQuery library which causes conflict with the copy included in Wordpress. Because of this ImageMapper isn't able to use jQuery UI Dialog widget causing the popup window function incorrectly or not at all.<br />This message is shown only to an admin. This message is shown because some of the image map areas on this page are using the popup functionality and thus not working properly.").css({color:'red',padding:'5px',fontSize:'0.8em'}).append(close);}}}}
$('.alternative-links-imagemap').click(AlternativeLinkClicked).mouseenter(function(){var mapster=$($(this).attr('data-parent').replace('imgmap','#imagemap')).get(0);jQuery(mapster).mapster('highlight',false);jQuery(mapster).mapster('highlight',$(this).attr('data-key'));}).mouseleave(function(){var mapster=$($(this).attr('data-parent').replace('imgmap','#imagemap')).get(0);jQuery(mapster).mapster('highlight',false);});$('.altlinks-toggle').click(function(){$('#altlinks-container-'+$(this).attr('data-parent')).toggle(200);});});function AlternativeLinkClicked(){var key=jQuery(this).attr('data-key');var type=jQuery(this).attr('data-type');var parent=jQuery(this).attr('data-parent');AlternativeLinkAction(key,type,parent);}
function AlternativeLinkAction(areaKey,areaType,imagemap){switch(areaType){case'popup':OpenImgmapDialog(areaKey,jQuery('map[name="'+imagemap+'"]').get(0));break;case'tooltip':imagemap=jQuery('img[usemap="#'+imagemap+'"]').get(0);jQuery(imagemap).mapster('tooltip',areaKey);break;}}
function AreaClicked(data){var type=jQuery('area[data-mapKey='+data.key+']').attr('data-type');if(type=='popup'||type==''){OpenImgmapDialog(data.key,jQuery(this).parent()[0]);}}
function OpenImgmapDialog(key,parent){var image=jQuery('#'+parent.name.replace('imgmap','imagemap'));var dialog=parent.name.replace('imgmap','#imgmap-dialog');jQuery.post(imgmap.ajaxurl,{action:'imgmap_load_dialog_post',id:key.replace('area-','')},function(response){if(response.length<=0)return;if(!imgmap.alt_dialog){jQuery(dialog).dialog('option','title',jQuery('area[data-mapkey='+key+']').attr('title'));jQuery(dialog).html(response).dialog('open');}else{jQuery(dialog).replaceWith('<div class="imgmap-dialog-wrapper" id="'+dialog.replace('#','')+'" style="visibility:hidden"></div>').hide(0);jQuery(dialog).addClass('imgmap-dialog-alt').html(response);setTimeout(function(){jQuery(dialog).position({my:'center',at:'center',of:image}).hide().css({visibility:'visible'}).show(200);},0);}});};;(function($){$.flexslider=function(el,options){var slider=$(el),vars=$.extend({},$.flexslider.defaults,options),namespace=vars.namespace,touch=("ontouchstart"in window)||window.DocumentTouch&&document instanceof DocumentTouch,eventType=(touch)?"touchend":"click",vertical=vars.direction==="vertical",reverse=vars.reverse,carousel=(vars.itemWidth>0),fade=vars.animation==="fade",asNav=vars.asNavFor!=="",methods={};$.data(el,"flexslider",slider);methods={init:function(){slider.animating=false;slider.currentSlide=vars.startAt;slider.animatingTo=slider.currentSlide;slider.atEnd=(slider.currentSlide===0||slider.currentSlide===slider.last);slider.containerSelector=vars.selector.substr(0,vars.selector.search(' '));slider.slides=$(vars.selector,slider);slider.container=$(slider.containerSelector,slider);slider.count=slider.slides.length;slider.syncExists=$(vars.sync).length>0;if(vars.animation==="slide")vars.animation="swing";slider.prop=(vertical)?"top":"marginLeft";slider.args={};slider.manualPause=false;slider.transitions=!vars.video&&!fade&&vars.useCSS&&(function(){var obj=document.createElement('div'),props=['perspectiveProperty','WebkitPerspective','MozPerspective','OPerspective','msPerspective'];for(var i in props){if(obj.style[props[i]]!==undefined){slider.pfx=props[i].replace('Perspective','').toLowerCase();slider.prop="-"+slider.pfx+"-transform";return true;}}
return false;}());if(vars.controlsContainer!=="")slider.controlsContainer=$(vars.controlsContainer).length>0&&$(vars.controlsContainer);if(vars.manualControls!=="")slider.manualControls=$(vars.manualControls).length>0&&$(vars.manualControls);if(vars.randomize){slider.slides.sort(function(){return(Math.round(Math.random())-0.5);});slider.container.empty().append(slider.slides);}
slider.doMath();if(asNav)methods.asNav.setup();slider.setup("init");if(vars.controlNav)methods.controlNav.setup();if(vars.directionNav)methods.directionNav.setup();if(vars.keyboard&&($(slider.containerSelector).length===1||vars.multipleKeyboard)){$(document).bind('keyup',function(event){var keycode=event.keyCode;if(!slider.animating&&(keycode===39||keycode===37)){var target=(keycode===39)?slider.getTarget('next'):(keycode===37)?slider.getTarget('prev'):false;slider.flexAnimate(target,vars.pauseOnAction);}});}
if(vars.mousewheel){slider.bind('mousewheel',function(event,delta,deltaX,deltaY){event.preventDefault();var target=(delta<0)?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,vars.pauseOnAction);});}
if(vars.pausePlay)methods.pausePlay.setup();if(vars.slideshow){if(vars.pauseOnHover){slider.hover(function(){if(!slider.manualPlay&&!slider.manualPause)slider.pause();},function(){if(!slider.manualPause&&!slider.manualPlay)slider.play();});}
(vars.initDelay>0)?setTimeout(slider.play,vars.initDelay):slider.play();}
if(touch&&vars.touch)methods.touch();if(!fade||(fade&&vars.smoothHeight))$(window).bind("resize focus",methods.resize);setTimeout(function(){vars.start(slider);},200);},asNav:{setup:function(){slider.asNav=true;slider.animatingTo=Math.floor(slider.currentSlide/slider.move);slider.currentItem=slider.currentSlide;slider.slides.removeClass(namespace+"active-slide").eq(slider.currentItem).addClass(namespace+"active-slide");slider.slides.click(function(e){e.preventDefault();var $slide=$(this),target=$slide.index();if(!$(vars.asNavFor).data('flexslider').animating&&!$slide.hasClass('active')){slider.direction=(slider.currentItem<target)?"next":"prev";slider.flexAnimate(target,vars.pauseOnAction,false,true,true);}});}},controlNav:{setup:function(){if(!slider.manualControls){methods.controlNav.setupPaging();}else{methods.controlNav.setupManual();}},setupPaging:function(){var type=(vars.controlNav==="thumbnails")?'control-thumbs':'control-paging',j=1,item;slider.controlNavScaffold=$('<ol class="'+namespace+'control-nav '+namespace+type+'"></ol>');if(slider.pagingCount>1){for(var i=0;i<slider.pagingCount;i++){item=(vars.controlNav==="thumbnails")?'<img src="'+slider.slides.eq(i).attr("data-thumb")+'"/>':'<a>'+j+'</a>';slider.controlNavScaffold.append('<li>'+item+'</li>');j++;}}
(slider.controlsContainer)?$(slider.controlsContainer).append(slider.controlNavScaffold):slider.append(slider.controlNavScaffold);methods.controlNav.set();methods.controlNav.active();slider.controlNavScaffold.delegate('a, img',eventType,function(event){event.preventDefault();var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){slider.direction=(target>slider.currentSlide)?"next":"prev";slider.flexAnimate(target,vars.pauseOnAction);}});if(touch){slider.controlNavScaffold.delegate('a',"click touchstart",function(event){event.preventDefault();});}},setupManual:function(){slider.controlNav=slider.manualControls;methods.controlNav.active();slider.controlNav.live(eventType,function(event){event.preventDefault();var $this=$(this),target=slider.controlNav.index($this);if(!$this.hasClass(namespace+'active')){(target>slider.currentSlide)?slider.direction="next":slider.direction="prev";slider.flexAnimate(target,vars.pauseOnAction);}});if(touch){slider.controlNav.live("click touchstart",function(event){event.preventDefault();});}},set:function(){var selector=(vars.controlNav==="thumbnails")?'img':'a';slider.controlNav=$('.'+namespace+'control-nav li '+selector,(slider.controlsContainer)?slider.controlsContainer:slider);},active:function(){slider.controlNav.removeClass(namespace+"active").eq(slider.animatingTo).addClass(namespace+"active");},update:function(action,pos){if(slider.pagingCount>1&&action==="add"){slider.controlNavScaffold.append($('<li><a>'+slider.count+'</a></li>'));}else if(slider.pagingCount===1){slider.controlNavScaffold.find('li').remove();}else{slider.controlNav.eq(pos).closest('li').remove();}
methods.controlNav.set();(slider.pagingCount>1&&slider.pagingCount!==slider.controlNav.length)?slider.update(pos,action):methods.controlNav.active();}},directionNav:{setup:function(){var directionNavScaffold=$('<ul class="'+namespace+'direction-nav"><li><a class="'+namespace+'prev" href="#">'+vars.prevText+'</a></li><li><a class="'+namespace+'next" href="#">'+vars.nextText+'</a></li></ul>');if(slider.controlsContainer){$(slider.controlsContainer).append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider.controlsContainer);}else{slider.append(directionNavScaffold);slider.directionNav=$('.'+namespace+'direction-nav li a',slider);}
methods.directionNav.update();slider.directionNav.bind(eventType,function(event){event.preventDefault();var target=($(this).hasClass(namespace+'next'))?slider.getTarget('next'):slider.getTarget('prev');slider.flexAnimate(target,vars.pauseOnAction);});if(touch){slider.directionNav.bind("click touchstart",function(event){event.preventDefault();});}},update:function(){var disabledClass=namespace+'disabled';if(slider.pagingCount===1){slider.directionNav.addClass(disabledClass);}else if(!vars.animationLoop){if(slider.animatingTo===0){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"prev").addClass(disabledClass);}else if(slider.animatingTo===slider.last){slider.directionNav.removeClass(disabledClass).filter('.'+namespace+"next").addClass(disabledClass);}else{slider.directionNav.removeClass(disabledClass);}}else{slider.directionNav.removeClass(disabledClass);}}},pausePlay:{setup:function(){var pausePlayScaffold=$('<div class="'+namespace+'pauseplay"><a></a></div>');if(slider.controlsContainer){slider.controlsContainer.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider.controlsContainer);}else{slider.append(pausePlayScaffold);slider.pausePlay=$('.'+namespace+'pauseplay a',slider);}
methods.pausePlay.update((vars.slideshow)?namespace+'pause':namespace+'play');slider.pausePlay.bind(eventType,function(event){event.preventDefault();if($(this).hasClass(namespace+'pause')){slider.manualPause=true;slider.manualPlay=false;slider.pause();}else{slider.manualPause=false;slider.manualPlay=true;slider.play();}});if(touch){slider.pausePlay.bind("click touchstart",function(event){event.preventDefault();});}},update:function(state){(state==="play")?slider.pausePlay.removeClass(namespace+'pause').addClass(namespace+'play').text(vars.playText):slider.pausePlay.removeClass(namespace+'play').addClass(namespace+'pause').text(vars.pauseText);}},touch:function(){var startX,startY,offset,cwidth,dx,startT,scrolling=false;el.addEventListener('touchstart',onTouchStart,false);function onTouchStart(e){if(slider.animating){e.preventDefault();}else if(e.touches.length===1){slider.pause();cwidth=(vertical)?slider.h:slider.w;startT=Number(new Date());offset=(carousel&&reverse&&slider.animatingTo===slider.last)?0:(carousel&&reverse)?slider.limit-(((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo):(carousel&&slider.currentSlide===slider.last)?slider.limit:(carousel)?((slider.itemW+vars.itemMargin)*slider.move)*slider.currentSlide:(reverse)?(slider.last-slider.currentSlide+slider.cloneOffset)*cwidth:(slider.currentSlide+slider.cloneOffset)*cwidth;startX=(vertical)?e.touches[0].pageY:e.touches[0].pageX;startY=(vertical)?e.touches[0].pageX:e.touches[0].pageY;el.addEventListener('touchmove',onTouchMove,false);el.addEventListener('touchend',onTouchEnd,false);}}
function onTouchMove(e){dx=(vertical)?startX-e.touches[0].pageY:startX-e.touches[0].pageX;scrolling=(vertical)?(Math.abs(dx)<Math.abs(e.touches[0].pageX-startY)):(Math.abs(dx)<Math.abs(e.touches[0].pageY-startY));if(!scrolling||Number(new Date())-startT>500){e.preventDefault();if(!fade&&slider.transitions){if(!vars.animationLoop){dx=dx/((slider.currentSlide===0&&dx<0||slider.currentSlide===slider.last&&dx>0)?(Math.abs(dx)/cwidth+2):1);}
slider.setProps(offset+dx,"setTouch");}}}
function onTouchEnd(e){el.removeEventListener('touchmove',onTouchMove,false);if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){var updateDx=(reverse)?-dx:dx,target=(updateDx>0)?slider.getTarget('next'):slider.getTarget('prev');if(slider.canAdvance(target)&&(Number(new Date())-startT<550&&Math.abs(updateDx)>50||Math.abs(updateDx)>cwidth/2)){slider.flexAnimate(target,vars.pauseOnAction);}else{if(!fade)slider.flexAnimate(slider.currentSlide,vars.pauseOnAction,true);}}
el.removeEventListener('touchend',onTouchEnd,false);startX=null;startY=null;dx=null;offset=null;}},resize:function(){if(!slider.animating&&slider.is(':visible')){if(!carousel)slider.doMath();if(fade){methods.smoothHeight();}else if(carousel){slider.slides.width(slider.computedW);slider.update(slider.pagingCount);slider.setProps();}
else if(vertical){slider.viewport.height(slider.h);slider.setProps(slider.h,"setTotal");}else{if(vars.smoothHeight)methods.smoothHeight();slider.newSlides.width(slider.computedW);slider.setProps(slider.computedW,"setTotal");}}},smoothHeight:function(dur){if(!vertical||fade){var $obj=(fade)?slider:slider.viewport;(dur)?$obj.animate({"height":slider.slides.eq(slider.animatingTo).height()},dur):$obj.height(slider.slides.eq(slider.animatingTo).height());}},sync:function(action){var $obj=$(vars.sync).data("flexslider"),target=slider.animatingTo;switch(action){case"animate":$obj.flexAnimate(target,vars.pauseOnAction,false,true);break;case"play":if(!$obj.playing&&!$obj.asNav){$obj.play();}break;case"pause":$obj.pause();break;}}}
slider.flexAnimate=function(target,pause,override,withSync,fromNav){if(asNav&&slider.pagingCount===1)slider.direction=(slider.currentItem<target)?"next":"prev";if(!slider.animating&&(slider.canAdvance(target,fromNav)||override)&&slider.is(":visible")){if(asNav&&withSync){var master=$(vars.asNavFor).data('flexslider');slider.atEnd=target===0||target===slider.count-1;master.flexAnimate(target,true,false,true,fromNav);slider.direction=(slider.currentItem<target)?"next":"prev";master.direction=slider.direction;if(Math.ceil((target+1)/slider.visible)-1!==slider.currentSlide&&target!==0){slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");target=Math.floor(target/slider.visible);}else{slider.currentItem=target;slider.slides.removeClass(namespace+"active-slide").eq(target).addClass(namespace+"active-slide");return false;}}
slider.animating=true;slider.animatingTo=target;vars.before(slider);if(pause)slider.pause();if(slider.syncExists&&!fromNav)methods.sync("animate");if(vars.controlNav)methods.controlNav.active();if(!carousel)slider.slides.removeClass(namespace+'active-slide').eq(target).addClass(namespace+'active-slide');slider.atEnd=target===0||target===slider.last;if(vars.directionNav)methods.directionNav.update();if(target===slider.last){vars.end(slider);if(!vars.animationLoop)slider.pause();}
if(!fade){var dimension=(vertical)?slider.slides.filter(':first').height():slider.computedW,margin,slideString,calcNext;if(carousel){margin=(vars.itemWidth>slider.w)?vars.itemMargin*2:vars.itemMargin;calcNext=((slider.itemW+margin)*slider.move)*slider.animatingTo;slideString=(calcNext>slider.limit&&slider.visible!==1)?slider.limit:calcNext;}else if(slider.currentSlide===0&&target===slider.count-1&&vars.animationLoop&&slider.direction!=="next"){slideString=(reverse)?(slider.count+slider.cloneOffset)*dimension:0;}else if(slider.currentSlide===slider.last&&target===0&&vars.animationLoop&&slider.direction!=="prev"){slideString=(reverse)?0:(slider.count+1)*dimension;}else{slideString=(reverse)?((slider.count-1)-target+slider.cloneOffset)*dimension:(target+slider.cloneOffset)*dimension;}
slider.setProps(slideString,"",vars.animationSpeed);if(slider.transitions){if(!vars.animationLoop||!slider.atEnd){slider.animating=false;slider.currentSlide=slider.animatingTo;}
slider.container.unbind("webkitTransitionEnd transitionend");slider.container.bind("webkitTransitionEnd transitionend",function(){slider.wrapup(dimension);});}else{slider.container.animate(slider.args,vars.animationSpeed,vars.easing,function(){slider.wrapup(dimension);});}}else{if(!touch){slider.slides.eq(slider.currentSlide).fadeOut(vars.animationSpeed,vars.easing);slider.slides.eq(target).fadeIn(vars.animationSpeed,vars.easing,slider.wrapup);}else{slider.slides.eq(slider.currentSlide).css({"opacity":0,"zIndex":1});slider.slides.eq(target).css({"opacity":1,"zIndex":2});slider.slides.unbind("webkitTransitionEnd transitionend");slider.slides.eq(slider.currentSlide).bind("webkitTransitionEnd transitionend",function(){vars.after(slider);});slider.animating=false;slider.currentSlide=slider.animatingTo;}}
if(vars.smoothHeight)methods.smoothHeight(vars.animationSpeed);}}
slider.wrapup=function(dimension){if(!fade&&!carousel){if(slider.currentSlide===0&&slider.animatingTo===slider.last&&vars.animationLoop){slider.setProps(dimension,"jumpEnd");}else if(slider.currentSlide===slider.last&&slider.animatingTo===0&&vars.animationLoop){slider.setProps(dimension,"jumpStart");}}
slider.animating=false;slider.currentSlide=slider.animatingTo;vars.after(slider);}
slider.animateSlides=function(){if(!slider.animating)slider.flexAnimate(slider.getTarget("next"));}
slider.pause=function(){clearInterval(slider.animatedSlides);slider.playing=false;if(vars.pausePlay)methods.pausePlay.update("play");if(slider.syncExists)methods.sync("pause");}
slider.play=function(){slider.animatedSlides=setInterval(slider.animateSlides,vars.slideshowSpeed);slider.playing=true;if(vars.pausePlay)methods.pausePlay.update("pause");if(slider.syncExists)methods.sync("play");}
slider.canAdvance=function(target,fromNav){var last=(asNav)?slider.pagingCount-1:slider.last;return(fromNav)?true:(asNav&&slider.currentItem===slider.count-1&&target===0&&slider.direction==="prev")?true:(asNav&&slider.currentItem===0&&target===slider.pagingCount-1&&slider.direction!=="next")?false:(target===slider.currentSlide&&!asNav)?false:(vars.animationLoop)?true:(slider.atEnd&&slider.currentSlide===0&&target===last&&slider.direction!=="next")?false:(slider.atEnd&&slider.currentSlide===last&&target===0&&slider.direction==="next")?false:true;}
slider.getTarget=function(dir){slider.direction=dir;if(dir==="next"){return(slider.currentSlide===slider.last)?0:slider.currentSlide+1;}else{return(slider.currentSlide===0)?slider.last:slider.currentSlide-1;}}
slider.setProps=function(pos,special,dur){var target=(function(){var posCheck=(pos)?pos:((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo,posCalc=(function(){if(carousel){return(special==="setTouch")?pos:(reverse&&slider.animatingTo===slider.last)?0:(reverse)?slider.limit-(((slider.itemW+vars.itemMargin)*slider.move)*slider.animatingTo):(slider.animatingTo===slider.last)?slider.limit:posCheck;}else{switch(special){case"setTotal":return(reverse)?((slider.count-1)-slider.currentSlide+slider.cloneOffset)*pos:(slider.currentSlide+slider.cloneOffset)*pos;case"setTouch":return(reverse)?pos:pos;case"jumpEnd":return(reverse)?pos:slider.count*pos;case"jumpStart":return(reverse)?slider.count*pos:pos;default:return pos;}}}());return(posCalc*-1)+"px";}());if(slider.transitions){target=(vertical)?"translate3d(0,"+target+",0)":"translate3d("+target+",0,0)";dur=(dur!==undefined)?(dur/1000)+"s":"0s";slider.container.css("-"+slider.pfx+"-transition-duration",dur);}
slider.args[slider.prop]=target;if(slider.transitions||dur===undefined)slider.container.css(slider.args);}
slider.setup=function(type){if(!fade){var sliderOffset,arr;if(type==="init"){slider.viewport=$('<div class="'+namespace+'viewport"></div>').css({"overflow":"hidden","position":"relative"}).appendTo(slider).append(slider.container);slider.cloneCount=0;slider.cloneOffset=0;if(reverse){arr=$.makeArray(slider.slides).reverse();slider.slides=$(arr);slider.container.empty().append(slider.slides);}}
if(vars.animationLoop&&!carousel){slider.cloneCount=2;slider.cloneOffset=1;if(type!=="init")slider.container.find('.clone').remove();slider.container.append(slider.slides.first().clone().addClass('clone')).prepend(slider.slides.last().clone().addClass('clone'));}
slider.newSlides=$(vars.selector,slider);sliderOffset=(reverse)?slider.count-1-slider.currentSlide+slider.cloneOffset:slider.currentSlide+slider.cloneOffset;if(vertical&&!carousel){slider.container.height((slider.count+slider.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){slider.newSlides.css({"display":"block"});slider.doMath();slider.viewport.height(slider.h);slider.setProps(sliderOffset*slider.h,"init");},(type==="init")?100:0);}else{slider.container.width((slider.count+slider.cloneCount)*200+"%");slider.setProps(sliderOffset*slider.computedW,"init");setTimeout(function(){slider.doMath();slider.newSlides.css({"width":slider.computedW,"float":"left","display":"block"});if(vars.smoothHeight)methods.smoothHeight();},(type==="init")?100:0);}}else{slider.slides.css({"width":"100%","float":"left","marginRight":"-100%","position":"relative"});if(type==="init"){if(!touch){slider.slides.eq(slider.currentSlide).fadeIn(vars.animationSpeed,vars.easing);}else{slider.slides.css({"opacity":0,"display":"block","webkitTransition":"opacity "+vars.animationSpeed/1000+"s ease","zIndex":1}).eq(slider.currentSlide).css({"opacity":1,"zIndex":2});}}
if(vars.smoothHeight)methods.smoothHeight();}
if(!carousel)slider.slides.removeClass(namespace+"active-slide").eq(slider.currentSlide).addClass(namespace+"active-slide");}
slider.doMath=function(){var slide=slider.slides.first(),slideMargin=vars.itemMargin,minItems=vars.minItems,maxItems=vars.maxItems;slider.w=slider.width();slider.h=slide.height();slider.boxPadding=slide.outerWidth()-slide.width();if(carousel){slider.itemT=vars.itemWidth+slideMargin;slider.minW=(minItems)?minItems*slider.itemT:slider.w;slider.maxW=(maxItems)?maxItems*slider.itemT:slider.w;slider.itemW=(slider.minW>slider.w)?(slider.w-(slideMargin*minItems))/minItems:(slider.maxW<slider.w)?(slider.w-(slideMargin*maxItems))/maxItems:(vars.itemWidth>slider.w)?slider.w:vars.itemWidth;slider.visible=Math.floor(slider.w/(slider.itemW+slideMargin));slider.move=(vars.move>0&&vars.move<slider.visible)?vars.move:slider.visible;slider.pagingCount=Math.ceil(((slider.count-slider.visible)/slider.move)+1);slider.last=slider.pagingCount-1;slider.limit=(slider.pagingCount===1)?0:(vars.itemWidth>slider.w)?((slider.itemW+(slideMargin*2))*slider.count)-slider.w-slideMargin:((slider.itemW+slideMargin)*slider.count)-slider.w-slideMargin;}else{slider.itemW=slider.w;slider.pagingCount=slider.count;slider.last=slider.count-1;}
slider.computedW=slider.itemW-slider.boxPadding;}
slider.update=function(pos,action){slider.doMath();if(!carousel){if(pos<slider.currentSlide){slider.currentSlide+=1;}else if(pos<=slider.currentSlide&&pos!==0){slider.currentSlide-=1;}
slider.animatingTo=slider.currentSlide;}
if(vars.controlNav&&!slider.manualControls){if((action==="add"&&!carousel)||slider.pagingCount>slider.controlNav.length){methods.controlNav.update("add");}else if((action==="remove"&&!carousel)||slider.pagingCount<slider.controlNav.length){if(carousel&&slider.currentSlide>slider.last){slider.currentSlide-=1;slider.animatingTo-=1;}
methods.controlNav.update("remove",slider.last);}}
if(vars.directionNav)methods.directionNav.update();}
slider.addSlide=function(obj,pos){var $obj=$(obj);slider.count+=1;slider.last=slider.count-1;if(vertical&&reverse){(pos!==undefined)?slider.slides.eq(slider.count-pos).after($obj):slider.container.prepend($obj);}else{(pos!==undefined)?slider.slides.eq(pos).before($obj):slider.container.append($obj);}
slider.update(pos,"add");slider.slides=$(vars.selector+':not(.clone)',slider);slider.setup();vars.added(slider);}
slider.removeSlide=function(obj){var pos=(isNaN(obj))?slider.slides.index($(obj)):obj;slider.count-=1;slider.last=slider.count-1;if(isNaN(obj)){$(obj,slider.slides).remove();}else{(vertical&&reverse)?slider.slides.eq(slider.last).remove():slider.slides.eq(obj).remove();}
slider.doMath();slider.update(pos,"remove");slider.slides=$(vars.selector+':not(.clone)',slider);slider.setup();vars.removed(slider);}
methods.init();}
$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:false,animationLoop:true,smoothHeight:false,startAt:0,slideshow:true,slideshowSpeed:7000,animationSpeed:600,initDelay:0,randomize:false,pauseOnAction:true,pauseOnHover:false,useCSS:true,touch:true,video:false,controlNav:true,directionNav:true,prevText:"Previous",nextText:"Next",keyboard:true,multipleKeyboard:false,mousewheel:false,pausePlay:false,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}}
$.fn.flexslider=function(options){if(options===undefined)options={};if(typeof options==="object"){return this.each(function(){var $this=$(this),selector=(options.selector)?options.selector:".slides > li",$slides=$this.find(selector);if($slides.length===1){$slides.fadeIn(400);if(options.start)options.start($this);}else if($this.data('flexslider')==undefined){new $.flexslider(this,options);}});}else{var $slider=$(this).data('flexslider');switch(options){case"play":$slider.play();break;case"pause":$slider.pause();break;case"next":$slider.flexAnimate($slider.getTarget("next"),true);break;case"prev":case"previous":$slider.flexAnimate($slider.getTarget("prev"),true);break;default:if(typeof options==="number")$slider.flexAnimate(options,true);}}}})(jQuery);;if(window.location.pathname.indexOf('neighborhood-news')>-1||window.location.pathname.indexOf('neighborhoodnews')>-1){let windowParams=new URLSearchParams(window.location.search);$('.language_switch').each(function(){let linkParams=new URLSearchParams(this.search);windowParams.forEach(function(val,key){if(!linkParams.has(key)){linkParams.append(key,val);}});this.search='?'+linkParams;});};jQuery(document).on('click','a.uabb-tab-link',function(){let resizeEvent=new Event('resize');window.dispatchEvent(resizeEvent);});;
/*!
 * clipboard.js v2.0.11
 * https://clipboardjs.com/
 *
 * Licensed MIT © Zeno Rocha
 */
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object')
module.exports=factory();else if(typeof define==='function'&&define.amd)
define([],factory);else if(typeof exports==='object')
exports["ClipboardJS"]=factory();else
root["ClipboardJS"]=factory();})(this,function(){return(function(){var __webpack_modules__=({686:(function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{"default":function(){return clipboard;}});var tiny_emitter=__webpack_require__(279);var tiny_emitter_default=__webpack_require__.n(tiny_emitter);var listen=__webpack_require__(370);var listen_default=__webpack_require__.n(listen);var src_select=__webpack_require__(817);var select_default=__webpack_require__.n(src_select);;function command(type){try{return document.execCommand(type);}catch(err){return false;}};var ClipboardActionCut=function ClipboardActionCut(target){var selectedText=select_default()(target);command('cut');return selectedText;};var actions_cut=(ClipboardActionCut);;function createFakeElement(value){var isRTL=document.documentElement.getAttribute('dir')==='rtl';var fakeElement=document.createElement('textarea');fakeElement.style.fontSize='12pt';fakeElement.style.border='0';fakeElement.style.padding='0';fakeElement.style.margin='0';fakeElement.style.position='absolute';fakeElement.style[isRTL?'right':'left']='-9999px';var yPosition=window.pageYOffset||document.documentElement.scrollTop;fakeElement.style.top="".concat(yPosition,"px");fakeElement.setAttribute('readonly','');fakeElement.value=value;return fakeElement;};var fakeCopyAction=function fakeCopyAction(value,options){var fakeElement=createFakeElement(value);options.container.appendChild(fakeElement);var selectedText=select_default()(fakeElement);command('copy');fakeElement.remove();return selectedText;};var ClipboardActionCopy=function ClipboardActionCopy(target){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};var selectedText='';if(typeof target==='string'){selectedText=fakeCopyAction(target,options);}else if(target instanceof HTMLInputElement&&!['text','search','url','tel','password'].includes(target===null||target===void 0?void 0:target.type)){selectedText=fakeCopyAction(target.value,options);}else{selectedText=select_default()(target);command('copy');}
return selectedText;};var actions_copy=(ClipboardActionCopy);;function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}
var ClipboardActionDefault=function ClipboardActionDefault(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var _options$action=options.action,action=_options$action===void 0?'copy':_options$action,container=options.container,target=options.target,text=options.text;if(action!=='copy'&&action!=='cut'){throw new Error('Invalid "action" value, use either "copy" or "cut"');}
if(target!==undefined){if(target&&_typeof(target)==='object'&&target.nodeType===1){if(action==='copy'&&target.hasAttribute('disabled')){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');}
if(action==='cut'&&(target.hasAttribute('readonly')||target.hasAttribute('disabled'))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');}}else{throw new Error('Invalid "target" value, use a valid Element');}}
if(text){return actions_copy(text,{container:container});}
if(target){return action==='cut'?actions_cut(target):actions_copy(target,{container:container});}};var actions_default=(ClipboardActionDefault);;function clipboard_typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){clipboard_typeof=function _typeof(obj){return typeof obj;};}else{clipboard_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return clipboard_typeof(obj);}
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}
function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}
function _possibleConstructorReturn(self,call){if(call&&(clipboard_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}
function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}
function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}
function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}
function getAttributeValue(suffix,element){var attribute="data-clipboard-".concat(suffix);if(!element.hasAttribute(attribute)){return;}
return element.getAttribute(attribute);}
var Clipboard=function(_Emitter){_inherits(Clipboard,_Emitter);var _super=_createSuper(Clipboard);function Clipboard(trigger,options){var _this;_classCallCheck(this,Clipboard);_this=_super.call(this);_this.resolveOptions(options);_this.listenClick(trigger);return _this;}
_createClass(Clipboard,[{key:"resolveOptions",value:function resolveOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof options.action==='function'?options.action:this.defaultAction;this.target=typeof options.target==='function'?options.target:this.defaultTarget;this.text=typeof options.text==='function'?options.text:this.defaultText;this.container=clipboard_typeof(options.container)==='object'?options.container:document.body;}},{key:"listenClick",value:function listenClick(trigger){var _this2=this;this.listener=listen_default()(trigger,'click',function(e){return _this2.onClick(e);});}},{key:"onClick",value:function onClick(e){var trigger=e.delegateTarget||e.currentTarget;var action=this.action(trigger)||'copy';var text=actions_default({action:action,container:this.container,target:this.target(trigger),text:this.text(trigger)});this.emit(text?'success':'error',{action:action,text:text,trigger:trigger,clearSelection:function clearSelection(){if(trigger){trigger.focus();}
window.getSelection().removeAllRanges();}});}},{key:"defaultAction",value:function defaultAction(trigger){return getAttributeValue('action',trigger);}},{key:"defaultTarget",value:function defaultTarget(trigger){var selector=getAttributeValue('target',trigger);if(selector){return document.querySelector(selector);}}},{key:"defaultText",value:function defaultText(trigger){return getAttributeValue('text',trigger);}},{key:"destroy",value:function destroy(){this.listener.destroy();}}],[{key:"copy",value:function copy(target){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{container:document.body};return actions_copy(target,options);}},{key:"cut",value:function cut(target){return actions_cut(target);}},{key:"isSupported",value:function isSupported(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:['copy','cut'];var actions=typeof action==='string'?[action]:action;var support=!!document.queryCommandSupported;actions.forEach(function(action){support=support&&!!document.queryCommandSupported(action);});return support;}}]);return Clipboard;}((tiny_emitter_default()));var clipboard=(Clipboard);}),828:(function(module){var DOCUMENT_NODE_TYPE=9;if(typeof Element!=='undefined'&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector;}
function closest(element,selector){while(element&&element.nodeType!==DOCUMENT_NODE_TYPE){if(typeof element.matches==='function'&&element.matches(selector)){return element;}
element=element.parentNode;}}
module.exports=closest;}),438:(function(module,__unused_webpack_exports,__webpack_require__){var closest=__webpack_require__(828);function _delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);element.addEventListener(type,listenerFn,useCapture);return{destroy:function(){element.removeEventListener(type,listenerFn,useCapture);}}}
function delegate(elements,selector,type,callback,useCapture){if(typeof elements.addEventListener==='function'){return _delegate.apply(null,arguments);}
if(typeof type==='function'){return _delegate.bind(null,document).apply(null,arguments);}
if(typeof elements==='string'){elements=document.querySelectorAll(elements);}
return Array.prototype.map.call(elements,function(element){return _delegate(element,selector,type,callback,useCapture);});}
function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector);if(e.delegateTarget){callback.call(element,e);}}}
module.exports=delegate;}),879:(function(__unused_webpack_module,exports){exports.node=function(value){return value!==undefined&&value instanceof HTMLElement&&value.nodeType===1;};exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return value!==undefined&&(type==='[object NodeList]'||type==='[object HTMLCollection]')&&('length'in value)&&(value.length===0||exports.node(value[0]));};exports.string=function(value){return typeof value==='string'||value instanceof String;};exports.fn=function(value){var type=Object.prototype.toString.call(value);return type==='[object Function]';};}),370:(function(module,__unused_webpack_exports,__webpack_require__){var is=__webpack_require__(879);var delegate=__webpack_require__(438);function listen(target,type,callback){if(!target&&!type&&!callback){throw new Error('Missing required arguments');}
if(!is.string(type)){throw new TypeError('Second argument must be a String');}
if(!is.fn(callback)){throw new TypeError('Third argument must be a Function');}
if(is.node(target)){return listenNode(target,type,callback);}
else if(is.nodeList(target)){return listenNodeList(target,type,callback);}
else if(is.string(target)){return listenSelector(target,type,callback);}
else{throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');}}
function listenNode(node,type,callback){node.addEventListener(type,callback);return{destroy:function(){node.removeEventListener(type,callback);}}}
function listenNodeList(nodeList,type,callback){Array.prototype.forEach.call(nodeList,function(node){node.addEventListener(type,callback);});return{destroy:function(){Array.prototype.forEach.call(nodeList,function(node){node.removeEventListener(type,callback);});}}}
function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback);}
module.exports=listen;}),817:(function(module){function select(element){var selectedText;if(element.nodeName==='SELECT'){element.focus();selectedText=element.value;}
else if(element.nodeName==='INPUT'||element.nodeName==='TEXTAREA'){var isReadOnly=element.hasAttribute('readonly');if(!isReadOnly){element.setAttribute('readonly','');}
element.select();element.setSelectionRange(0,element.value.length);if(!isReadOnly){element.removeAttribute('readonly');}
selectedText=element.value;}
else{if(element.hasAttribute('contenteditable')){element.focus();}
var selection=window.getSelection();var range=document.createRange();range.selectNodeContents(element);selection.removeAllRanges();selection.addRange(range);selectedText=selection.toString();}
return selectedText;}
module.exports=select;}),279:(function(module){function E(){}
E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});(e[name]||(e[name]=[])).push({fn:callback,ctx:ctx});return this;},once:function(name,callback,ctx){var self=this;function listener(){self.off(name,listener);callback.apply(ctx,arguments);};listener._=callback
return this.on(name,listener,ctx);},emit:function(name){var data=[].slice.call(arguments,1);var evtArr=((this.e||(this.e={}))[name]||[]).slice();var i=0;var len=evtArr.length;for(i;i<len;i++){evtArr[i].fn.apply(evtArr[i].ctx,data);}
return this;},off:function(name,callback){var e=this.e||(this.e={});var evts=e[name];var liveEvents=[];if(evts&&callback){for(var i=0,len=evts.length;i<len;i++){if(evts[i].fn!==callback&&evts[i].fn._!==callback)
liveEvents.push(evts[i]);}}
(liveEvents.length)?e[name]=liveEvents:delete e[name];return this;}};module.exports=E;module.exports.TinyEmitter=E;})});var __webpack_module_cache__={};function __webpack_require__(moduleId){if(__webpack_module_cache__[moduleId]){return __webpack_module_cache__[moduleId].exports;}
var module=__webpack_module_cache__[moduleId]={exports:{}};__webpack_modules__[moduleId](module,module.exports,__webpack_require__);return module.exports;}
!function(){__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module['default'];}:function(){return module;};__webpack_require__.d(getter,{a:getter});return getter;};}();!function(){__webpack_require__.d=function(exports,definition){for(var key in definition){if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){Object.defineProperty(exports,key,{enumerable:true,get:definition[key]});}}};}();!function(){__webpack_require__.o=function(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}}();return __webpack_require__(686);})().default;});
;/*! This file is auto-generated */
(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>P,addAction:()=>A,addFilter:()=>m,applyFilters:()=>w,applyFiltersAsync:()=>I,createHooks:()=>h,currentAction:()=>x,currentFilter:()=>T,defaultHooks:()=>f,didAction:()=>j,didFilter:()=>z,doAction:()=>g,doActionAsync:()=>k,doingAction:()=>O,doingFilter:()=>S,filters:()=>Z,hasAction:()=>_,hasFilter:()=>v,removeAction:()=>p,removeAllActions:()=>F,removeAllFilters:()=>b,removeFilter:()=>y});const n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const r=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const o=function(t,e){return function(o,i,s,c=10){const l=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:i};if(l[o]){const t=l[o].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}else l[o]={handlers:[a],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};const i=function(t,e,o=!1){return function(i,s){const c=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return 0;let l=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};const s=function(t,e){return function(n,r){const o=t[e];return void 0!==r?n in o&&o[n].handlers.some((t=>t.namespace===r)):n in o}};const c=function(t,e,n,r){return function(o,...i){const s=t[e];s[o]||(s[o]={handlers:[],runs:0}),s[o].runs++;const c=s[o].handlers;if(!c||!c.length)return n?i[0]:void 0;const l={name:o,currentIndex:0};return(r?async function(){try{s.__current.add(l);let t=n?i[0]:void 0;for(;l.currentIndex<c.length;){const e=c[l.currentIndex];t=await e.callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}return n?t:void 0}finally{s.__current.delete(l)}}:function(){try{s.__current.add(l);let t=n?i[0]:void 0;for(;l.currentIndex<c.length;){t=c[l.currentIndex].callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}return n?t:void 0}finally{s.__current.delete(l)}})()}};const l=function(t,e){return function(){var n;const r=t[e],o=Array.from(r.__current);return null!==(n=o.at(-1)?.name)&&void 0!==n?n:null}};const a=function(t,e){return function(n){const r=t[e];return void 0===n?r.__current.size>0:Array.from(r.__current).some((t=>t.name===n))}};const u=function(t,e){return function(n){const o=t[e];if(r(n))return o[n]&&o[n].runs?o[n].runs:0}};class d{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions",!1,!1),this.doActionAsync=c(this,"actions",!1,!0),this.applyFilters=c(this,"filters",!0,!1),this.applyFiltersAsync=c(this,"filters",!0,!0),this.currentAction=l(this,"actions"),this.currentFilter=l(this,"filters"),this.doingAction=a(this,"actions"),this.doingFilter=a(this,"filters"),this.didAction=u(this,"actions"),this.didFilter=u(this,"filters")}}const h=function(){return new d},f=h(),{addAction:A,addFilter:m,removeAction:p,removeFilter:y,hasAction:_,hasFilter:v,removeAllActions:F,removeAllFilters:b,doAction:g,doActionAsync:k,applyFilters:w,applyFiltersAsync:I,currentAction:x,currentFilter:T,doingAction:O,doingFilter:S,didAction:j,didFilter:z,actions:P,filters:Z}=f;(window.wp=window.wp||{}).hooks=e})();
;/*! This file is auto-generated */
(()=>{var t={2058:(t,e,r)=>{var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(t){return function(t,e){var r,n,o,s,l,u,p,c,f,d=1,h=t.length,g="";for(n=0;n<h;n++)if("string"==typeof t[n])g+=t[n];else if("object"==typeof t[n]){if((s=t[n]).keys)for(r=e[d],o=0;o<s.keys.length;o++){if(null==r)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));r=r[s.keys[o]]}else r=s.param_no?e[s.param_no]:e[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(a("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(c=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=r:(!i.number.test(s.type)||c&&!s.sign?f="":(f=c?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(f+r).length,l=s.width&&p>0?u.repeat(p):"",g+=s.align?f+r+l:"0"===u?f+l+r:l+f+r)}return g}(function(t){if(s[t])return s[t];var e,r=t,n=[],a=0;for(;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){a|=1;var o=[],l=e[2],u=[];if(null===(u=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else{if(null===(u=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}e[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function o(t,e){return a.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=a,e.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(e,r,e,t))||(t.exports=n))}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{__:()=>F,_n:()=>j,_nx:()=>L,_x:()=>S,createI18n:()=>x,defaultI18n:()=>_,getLocaleData:()=>v,hasTranslation:()=>D,isRTL:()=>T,resetLocaleData:()=>w,setLocaleData:()=>m,sprintf:()=>a,subscribe:()=>k});var t=r(2058),e=r.n(t);const i=function(t,e){var r,n,i=0;function a(){var a,o,s=r,l=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(o=0;o<l;o++)if(s.args[o]!==arguments[o]){s=s.next;continue t}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];return s={args:a,val:t.apply(null,a)},r?(r.prev=s,s.next=r):n=s,i===e.maxSize?(n=n.prev).next=null:i++,r=s,s.val}return e=e||{},a.clear=function(){r=null,n=null,i=0},a}(console.error);function a(t,...r){try{return e().sprintf(t,...r)}catch(e){return e instanceof Error&&i("sprintf error: \n\n"+e.toString()),t}}var o,s,l,u;o={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},s=["(","?"],l={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var p={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function c(t){var e=function(t){for(var e,r,n,i,a=[],p=[];e=t.match(u);){for(r=e[0],(n=t.substr(0,e.index).trim())&&a.push(n);i=p.pop();){if(l[r]){if(l[r][0]===i){r=l[r][1]||r;break}}else if(s.indexOf(i)>=0||o[i]<o[r]){p.push(i);break}a.push(i)}l[r]||p.push(r),t=t.substr(e.index+r.length)}return(t=t.trim())&&a.push(t),a.concat(p.reverse())}(t);return function(t){return function(t,e){var r,n,i,a,o,s,l=[];for(r=0;r<t.length;r++){if(o=t[r],a=p[o]){for(n=a.length,i=Array(n);n--;)i[n]=l.pop();try{s=a.apply(null,i)}catch(t){return t}}else s=e.hasOwnProperty(o)?e[o]:+o;l.push(s)}return l[0]}(e,t)}}var f={contextDelimiter:"",onMissingKey:null};function d(t,e){var r;for(r in this.data=t,this.pluralForms={},this.options={},f)this.options[r]=void 0!==e&&r in e?e[r]:f[r]}d.prototype.getPluralForm=function(t,e){var r,n,i,a=this.pluralForms[t];return a||("function"!=typeof(i=(r=this.data[t][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(t){var e,r,n;for(e=t.split(";"),r=0;r<e.length;r++)if(0===(n=e[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(t){var e=c(t);return function(t){return+e({n:t})}}(n)),a=this.pluralForms[t]=i),a(e)},d.prototype.dcnpgettext=function(t,e,r,n,i){var a,o,s;return a=void 0===i?0:this.getPluralForm(t,i),o=r,e&&(o=e+this.options.contextDelimiter+r),(s=this.data[t][o])&&s[a]?s[a]:(this.options.onMissingKey&&this.options.onMissingKey(r,t),0===a?r:n)};const h={plural_forms:t=>1===t?0:1},g=/^i18n\.(n?gettext|has_translation)(_|$)/,x=(t,e,r)=>{const n=new d({}),i=new Set,a=()=>{i.forEach((t=>t()))},o=(t,e="default")=>{n.data[e]={...n.data[e],...t},n.data[e][""]={...h,...n.data[e]?.[""]},delete n.pluralForms[e]},s=(t,e)=>{o(t,e),a()},l=(t="default",e,r,i,a)=>(n.data[t]||o(void 0,t),n.dcnpgettext(t,e,r,i,a)),u=(t="default")=>t,p=(t,e,n)=>{let i=l(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+u(n),i,t,e,n)):i};if(t&&s(t,e),r){const t=t=>{g.test(t)&&a()};r.addAction("hookAdded","core/i18n",t),r.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>n.data[t],setLocaleData:s,addLocaleData:(t,e="default")=>{n.data[e]={...n.data[e],...t,"":{...h,...n.data[e]?.[""],...t?.[""]}},delete n.pluralForms[e],a()},resetLocaleData:(t,e)=>{n.data={},n.pluralForms={},s(t,e)},subscribe:t=>(i.add(t),()=>i.delete(t)),__:(t,e)=>{let n=l(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+u(e),n,t,e)):n},_x:p,_n:(t,e,n,i)=>{let a=l(i,void 0,t,e,n);return r?(a=r.applyFilters("i18n.ngettext",a,t,e,n,i),r.applyFilters("i18n.ngettext_"+u(i),a,t,e,n,i)):a},_nx:(t,e,n,i,a)=>{let o=l(a,i,t,e,n);return r?(o=r.applyFilters("i18n.ngettext_with_context",o,t,e,n,i,a),r.applyFilters("i18n.ngettext_with_context_"+u(a),o,t,e,n,i,a)):o},isRTL:()=>"rtl"===p("ltr","text direction"),hasTranslation:(t,e,i)=>{const a=e?e+""+t:t;let o=!!n.data?.[null!=i?i:"default"]?.[a];return r&&(o=r.applyFilters("i18n.has_translation",o,t,e,i),o=r.applyFilters("i18n.has_translation_"+u(i),o,t,e,i)),o}}},y=window.wp.hooks,b=x(void 0,void 0,y.defaultHooks),_=b,v=b.getLocaleData.bind(b),m=b.setLocaleData.bind(b),w=b.resetLocaleData.bind(b),k=b.subscribe.bind(b),F=b.__.bind(b),S=b._x.bind(b),j=b._n.bind(b),L=b._nx.bind(b),T=b.isRTL.bind(b),D=b.hasTranslation.bind(b)})(),(window.wp=window.wp||{}).i18n=n})();
;(function(domain,translations){var localeData=translations.locale_data[domain]||translations.locale_data.messages;localeData[""].domain=domain;wp.i18n.setLocaleData(localeData,domain);})("moxiworks",{"domain":"moxiworks","locale_data":{"moxiworks":{"":{"domain":"moxiworks","plural-forms":"nplurals=2; plural=(n > 1);"},"translations of moxiworks":["this test means that client text translation for matrix should be working properly."]}}});
;/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={},r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});

;function powerpress_subscribe_widget_change(event){switch(jQuery(event).val())
{case'channel':{jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-post_type').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-channel').show();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-category').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-ttid').hide();};break;case'post_type':{jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-post_type').show();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-channel').show();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-category').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-ttid').hide();};break;case'category':{jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-post_type').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-channel').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-category').show();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-ttid').hide();};break;case'ttid':{jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-post_type').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-channel').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-category').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-ttid').show();};break;default:{jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-post_type').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-channel').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-category').hide();jQuery(event).closest('.widget-content').find('.pp-sub-widget-p-ttid').hide();};break;}};+function($){'use strict';var Validator=function(element,options){this.$element=$(element)
this.options=options
options.errors=$.extend({},Validator.DEFAULTS.errors,options.errors)
for(var custom in options.custom){if(!options.errors[custom])throw new Error('Missing default error message for custom validator: '+custom)}
$.extend(Validator.VALIDATORS,options.custom)
this.$element.attr('novalidate',true)
this.toggleSubmit()
this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator',$.proxy(this.validateInput,this))
this.$element.on('submit.bs.validator',$.proxy(this.onSubmit,this))
this.$element.find('[data-match]').each(function(){var $this=$(this)
var target=$this.data('match')
$(target).on('input.bs.validator',function(e){$this.val()&&$this.trigger('input.bs.validator')})})}
Validator.INPUT_SELECTOR=':input:not([type="submit"], [type="hidden"], button):enabled'
Validator.DEFAULTS={delay:500,html:false,disable:true,custom:{},errors:{match:'Does not match',minlength:'Not long enough'},feedback:{success:'glyphicon-ok',error:'glyphicon-remove'}}
Validator.VALIDATORS={'native':function($el){var el=$el[0]
return el.checkValidity?el.checkValidity():true},'match':function($el){var target=$el.data('match')
return!$el.val()||$el.val()===$(target).val()},'minlength':function($el){var minlength=$el.data('minlength')
return!$el.val()||$el.val().length>=minlength}}
Validator.prototype.validateInput=function(e){var $el=$(e.target)
var prevErrors=$el.data('bs.validator.errors')
var errors
if($el.is('[type="radio"]'))$el=this.$element.find('input[name="'+$el.attr('name')+'"]')
this.$element.trigger(e=$.Event('validate.bs.validator',{relatedTarget:$el[0]}))
if(e.isDefaultPrevented())return
var self=this
this.runValidators($el).done(function(errors){$el.data('bs.validator.errors',errors)
errors.length?self.showErrors($el):self.clearErrors($el)
if(!prevErrors||errors.toString()!==prevErrors.toString()){e=errors.length?$.Event('invalid.bs.validator',{relatedTarget:$el[0],detail:errors}):$.Event('valid.bs.validator',{relatedTarget:$el[0],detail:prevErrors})
self.$element.trigger(e)}
self.toggleSubmit()
self.$element.trigger($.Event('validated.bs.validator',{relatedTarget:$el[0]}))})}
Validator.prototype.runValidators=function($el){var errors=[]
var deferred=$.Deferred()
var options=this.options
$el.data('bs.validator.deferred')&&$el.data('bs.validator.deferred').reject()
$el.data('bs.validator.deferred',deferred)
function getErrorMessage(key){return $el.data(key+'-error')||$el.data('error')||key=='native'&&$el[0].validationMessage||options.errors[key]}
$.each(Validator.VALIDATORS,$.proxy(function(key,validator){if(($el.data(key)||key=='native')&&!validator.call(this,$el)){var error=getErrorMessage(key)
!~errors.indexOf(error)&&errors.push(error)}},this))
if(!errors.length&&$el.val()&&$el.data('remote')){this.defer($el,function(){var data={}
data[$el.attr('name')]=$el.val()
$.get($el.data('remote'),data).fail(function(jqXHR,textStatus,error){errors.push(getErrorMessage('remote')||error)}).always(function(){deferred.resolve(errors)})})}else deferred.resolve(errors)
return deferred.promise()}
Validator.prototype.validate=function(){var delay=this.options.delay
this.options.delay=0
this.$element.find(Validator.INPUT_SELECTOR).trigger('input.bs.validator')
this.options.delay=delay
return this}
Validator.prototype.showErrors=function($el){var method=this.options.html?'html':'text'
this.defer($el,function(){var $group=$el.closest('.form-group')
var $block=$group.find('.help-block.with-errors')
var $feedback=$group.find('.form-control-feedback')
var errors=$el.data('bs.validator.errors')
if(!errors.length)return
var errorsUl=$('<ul/>').addClass('list-unstyled')
errors.forEach(function(error){errorsUl.append($('<li/>')[method](error))});$block.data('bs.validator.originalContent')===undefined&&$block.data('bs.validator.originalContent',$block.html())
$block.empty().append(errorsUl)
$group.addClass('has-error')
$feedback.length&&$feedback.removeClass(this.options.feedback.success)&&$feedback.addClass(this.options.feedback.error)&&$group.removeClass('has-success')})}
Validator.prototype.clearErrors=function($el){var $group=$el.closest('.form-group')
var $block=$group.find('.help-block.with-errors')
var $feedback=$group.find('.form-control-feedback')
$block.html($block.data('bs.validator.originalContent'))
$group.removeClass('has-error')
$feedback.length&&$feedback.removeClass(this.options.feedback.error)&&$el.val().trim()&&$feedback.addClass(this.options.feedback.success)&&$group.addClass('has-success')||$feedback.removeClass(this.options.feedback.success)&&$group.removeClass('has-success')}
Validator.prototype.hasErrors=function(){function fieldErrors(){return!!($(this).data('bs.validator.errors')||[]).length}
return!!this.$element.find(Validator.INPUT_SELECTOR).filter(fieldErrors).length}
Validator.prototype.isIncomplete=function(){function fieldIncomplete(){return this.type==='checkbox'?!this.checked:this.type==='radio'?!$('[name="'+this.name+'"]:checked').length:$.trim(this.value)===''}
return!!this.$element.find(Validator.INPUT_SELECTOR).filter('[required]').filter(fieldIncomplete).length}
Validator.prototype.onSubmit=function(e){this.validate()
if(this.isIncomplete()||this.hasErrors())e.preventDefault()}
Validator.prototype.toggleSubmit=function(){if(!this.options.disable)return
var $btn=$('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr('id')+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]'))
$btn.toggleClass('disabled',this.isIncomplete()||this.hasErrors())}
Validator.prototype.defer=function($el,callback){callback=$.proxy(callback,this)
if(!this.options.delay)return callback()
window.clearTimeout($el.data('bs.validator.timeout'))
$el.data('bs.validator.timeout',window.setTimeout(callback,this.options.delay))}
Validator.prototype.destroy=function(){this.$element.removeAttr('novalidate').removeData('bs.validator').off('.bs.validator')
this.$element.find(Validator.INPUT_SELECTOR).off('.bs.validator').removeData(['bs.validator.errors','bs.validator.deferred']).each(function(){var $this=$(this)
var timeout=$this.data('bs.validator.timeout')
window.clearTimeout(timeout)&&$this.removeData('bs.validator.timeout')})
this.$element.find('.help-block.with-errors').each(function(){var $this=$(this)
var originalContent=$this.data('bs.validator.originalContent')
$this.removeData('bs.validator.originalContent').html(originalContent)})
this.$element.find('input[type="submit"], button[type="submit"]').removeClass('disabled')
this.$element.find('.has-error').removeClass('has-error')
return this}
function Plugin(option){return this.each(function(){var $this=$(this)
var options=$.extend({},Validator.DEFAULTS,$this.data(),typeof option=='object'&&option)
var data=$this.data('bs.validator')
if(!data&&option=='destroy')return
if(!data)$this.data('bs.validator',(data=new Validator(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.validator
$.fn.validator=Plugin
$.fn.validator.Constructor=Validator
$.fn.validator.noConflict=function(){$.fn.validator=old
return this}
$(window).on('load',function(){$('form[data-toggle="validator"]').each(function(){var $form=$(this)
Plugin.call($form,$form.data())})})}(jQuery);;jQuery.fn.extend({everyTime:function(interval,label,fn,times){return this.each(function(){jQuery.timer.add(this,interval,label,fn,times);});},oneTime:function(interval,label,fn){return this.each(function(){jQuery.timer.add(this,interval,label,fn,1);});},stopTime:function(label,fn){return this.each(function(){jQuery.timer.remove(this,label,fn);});}});jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{'ms':1,'cs':10,'ds':100,'s':1000,'das':10000,'hs':100000,'ks':1000000},timeParse:function(value){if(value==undefined||value==null)
return null;var result=this.regex.exec(jQuery.trim(value.toString()));if(result[2]){var num=parseFloat(result[1]);var mult=this.powers[result[2]]||1;return num*mult;}else{return value;}},add:function(element,interval,label,fn,times){var counter=0;if(jQuery.isFunction(label)){if(!times)
times=fn;fn=label;label=interval;}
interval=jQuery.timer.timeParse(interval);if(typeof interval!='number'||isNaN(interval)||interval<0)
return;if(typeof times!='number'||isNaN(times)||times<0)
times=0;times=times||0;var timers=jQuery.data(element,this.dataKey)||jQuery.data(element,this.dataKey,{});if(!timers[label])
timers[label]={};fn.timerID=fn.timerID||this.guid++;var handler=function(){if((++counter>times&&times!==0)||fn.call(element,counter)===false)
jQuery.timer.remove(element,label,fn);};handler.timerID=fn.timerID;if(!timers[label][fn.timerID])
timers[label][fn.timerID]=window.setInterval(handler,interval);this.global.push(element);},remove:function(element,label,fn){var timers=jQuery.data(element,this.dataKey),ret;if(timers){if(!label){for(label in timers)
this.remove(element,label,fn);}else if(timers[label]){if(fn){if(fn.timerID){window.clearInterval(timers[label][fn.timerID]);delete timers[label][fn.timerID];}}else{for(var fn in timers[label]){window.clearInterval(timers[label][fn]);delete timers[label][fn];}}
for(ret in timers[label])break;if(!ret){ret=null;delete timers[label];}}
for(ret in timers)break;if(!ret)
jQuery.removeData(element,this.dataKey);}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(index,item){jQuery.timer.remove(item);});});;jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;var window_loaded=false;var panels_width=new Array();var panels_height=new Array();var current_panel=0;jQuery(window).load(function(){window_loaded=true;});(function($){$.fn.galleryView=function(options){var opts=$.extend($.fn.galleryView.defaults,options);var id;var iterator=0;var item_count=0;var slide_method;var paused=false;var pointer_speed=0;var animate_panels=true;var current=1;var gallery_images;var image_count=0;var loaded_images=0;var gallery_width;var gallery_height;var pointer_height;var pointer_width;var strip_width;var strip_height;var wrapper_width;var wrapper_height;var f_frame_width;var f_frame_height;var filmstrip_orientation;var frame_img_scale={};var panel_img_scale={};var img_h={};var img_w={};var scale_panel_images=true;var panel_nav_displayed=false;var j_gallery;var j_filmstrip;var j_frames;var j_frame_img_wrappers;var j_panels;var j_pointer;var j_panel_wrapper;panels_width.push(opts.panel_width);panels_height.push(opts.panel_height);function showItem(i,speed,callback){var mod_i=i%item_count;var distance;var diststr;$('.gv-nav-next, .gv-panel-nav-next, .gv-nav-prev, .gv-panel-nav-prev',j_gallery).unbind('click');j_frames.unbind('click');$(document).oneTime(speed,'bindNavButtons',function(){$('.gv-nav-next, .gv-panel-nav-next',j_gallery).click(showNextItem);$('.gv-nav-prev, .gv-panel-nav-prev',j_gallery).click(showPrevItem);enableFrameClicking();});if(opts.show_filmstrip){j_frames.removeClass('current').find('img').stop().animate({opacity:opts.frame_opacity},speed);j_frames.eq(i).addClass('current').find('img').stop().animate({opacity:1},speed);}
if(opts.show_panels){if(animate_panels){if(opts.panel_animation=='slide'){j_panels.eq(mod_i).css({left:getInt($('.gv-panel.current').eq(0).css('left'))+opts.panel_width+'px',zIndex:50}).show().animate({left:'-='+opts.panel_width+'px'},speed,opts.easing,function(){$(this).addClass('current');});$('.gv-panel.current').css({zIndex:49}).animate({left:'-='+opts.panel_width+'px'},speed,opts.easing,function(){$(this).removeClass('current').hide();});}else if(opts.panel_animation=='zoomOut'){$(document).oneTime(speed,'setCurrentFrame',function(){j_panels.eq(mod_i).addClass('current').css('zIndex',50);});j_panels.eq(mod_i).show().css('zIndex',49);$('.gv-panel.current img').animate({top:'-='+opts.panel_height/2+'px',left:'-='+opts.panel_width/2+'px'},speed,'swing',function(){$(this).animate({top:'+='+opts.panel_height/2+'px',left:'+='+opts.panel_width/2+'px'},0);});$('.gv-panel.current').animate({top:'+='+opts.panel_height/2+'px',left:'+='+opts.panel_width/2+'px',height:0,width:0},speed,'swing',function(){$(this).removeClass('current').hide().css({top:getPos(j_panels[mod_i]).top+'px',left:getPos(j_panels[mod_i]).left+'px',height:opts.panel_height+'px',width:opts.panel_width+'px'});});}else if(opts.panel_animation=='crossfade'){j_panels.removeClass('current').fadeOut(speed,function(){$(this).css('filter','');}).eq(mod_i).addClass('current').fadeIn(speed,function(){$(this).css('filter','');});}else{j_panels.removeClass('current').stop().fadeOut(speed/2);$(document).oneTime(speed/2,'fadeInPanel',function(){j_panels.eq(mod_i).addClass('current').stop().fadeIn(speed/2);});}}else{$(document).oneTime(speed,'switch_panels',function(){j_panels.hide().eq(mod_i).show();});}}
if(opts.show_filmstrip){if(opts.filmstrip_style=='scroll'&&slide_method=='strip'){j_filmstrip.stop();if(filmstrip_orientation=='horizontal'){distance=getPos(j_frames[i]).left-(getPos(j_pointer[0]).left+(pointer_width/2)-(f_frame_width/2));diststr=(distance>=0?'-=':'+=')+Math.abs(distance)+'px';j_filmstrip.animate({left:diststr},speed,opts.easing,function(){var old_i=i;if(i>item_count){i=mod_i;iterator=i;j_filmstrip.css('left','-'+((f_frame_width+opts.frame_gap)*i)+'px');}else if(i<=(item_count-strip_size)){i=(mod_i)+item_count;iterator=i;j_filmstrip.css('left','-'+((f_frame_width+opts.frame_gap)*i)+'px');}
if(old_i!=i){j_frames.eq(old_i).removeClass('current').find('img').css({opacity:opts.frame_opacity});j_frames.eq(i).addClass('current').find('img').css({opacity:1});}});}else{distance=getPos(j_frames[i]).top-getPos($('.gv-strip_wrapper',j_gallery)[0]).top;diststr=(distance>=0?'-=':'+=')+Math.abs(distance)+'px';j_filmstrip.animate({'top':diststr},speed,opts.easing,function(){var old_i=i;if(i>item_count){i=mod_i;iterator=i;j_filmstrip.css('top','-'+((f_frame_height+opts.frame_gap)*i)+'px');}else if(i<=(item_count-strip_size)){i=(mod_i)+item_count;iterator=i;j_filmstrip.css('top','-'+((f_frame_height+opts.frame_gap)*i)+'px');}
if(old_i!=i){j_frames.eq(old_i).removeClass('current').find('img').css({opacity:opts.frame_opacity});j_frames.eq(i).addClass('current').find('img').css({opacity:1});}
if(!animate_panels){j_panels.hide().eq(mod_i).show();}});}}else if(slide_method=='pointer'){j_pointer.stop();var pos=getPos(j_frames[i]);if(filmstrip_orientation=='horizontal'){j_pointer.animate({left:pos.left+(f_frame_width/2)-(pointer_width/2)+'px'},pointer_speed,opts.easing,function(){if(!animate_panels){j_panels.hide().eq(mod_i).show();}});}else{j_pointer.animate({top:pos.top+(f_frame_height/2)-(pointer_height)+'px'},pointer_speed,opts.easing,function(){if(!animate_panels){j_panels.hide().eq(mod_i).show();}});}}}
if(callback){$(document).oneTime(speed,'showItemCallback',callback);}
current=i;};function extraWidth(el){if(!el){return 0;}
if(el.length==0){return 0;}
el=el.eq(0);var ew=0;ew+=getInt(el.css('paddingLeft'));ew+=getInt(el.css('paddingRight'));ew+=getInt(el.css('borderLeftWidth'));ew+=getInt(el.css('borderRightWidth'));return ew;};function extraHeight(el){if(!el){return 0;}
if(el.length==0){return 0;}
el=el.eq(0);var eh=0;eh+=getInt(el.css('paddingTop'));eh+=getInt(el.css('paddingBottom'));eh+=getInt(el.css('borderTopWidth'));eh+=getInt(el.css('borderBottomWidth'));return eh;};function showNextItem(){$(document).stopTime("transition");if(++iterator==j_frames.length){iterator=0;}
showItem(iterator,opts.transition_speed);if(!paused&&opts.transition_interval>0){$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});}};function showPrevItem(){$(document).stopTime("transition");if(--iterator<0){iterator=item_count-1;}
showItem(iterator,opts.transition_speed);if(!paused&&opts.transition_interval>0){$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});}};function getPos(el){if(!el)return{top:0,left:0};var left=0,top=0;var el_id=el.id;if(el.offsetParent){do{left+=el.offsetLeft;top+=el.offsetTop;}while(el=el.offsetParent);}
if(el_id==id){return{'left':left,'top':top};}
else{var gPos=getPos(j_gallery[0]);var gLeft=gPos.left;var gTop=gPos.top;return{'left':left-gLeft,'top':top-gTop};}};function enableFrameClicking(){j_frames.each(function(i){if($('a',this).length==0){$(this).click(function(){if(iterator!=i){$(document).stopTime("transition");showItem(i,opts.transition_speed);iterator=i;if(!paused&&opts.transition_interval>0){$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});}}});}});};function buildPanels(){j_panels.each(function(i){if($('.gv-panel-overlay',this).length>0){$(this).append('<div class="gv-overlay-background"></div>');}});if(opts.show_panel_nav){$('<div></div>').addClass('gv-panel-nav-next').appendTo(j_gallery).css({position:'absolute',zIndex:'1100',top:((opts.filmstrip_position=='top'?opts.frame_gap+wrapper_height:0)+(panels_height[current_panel]-22)/2)+'px',right:((opts.filmstrip_position=='right'?opts.frame_gap+wrapper_width:0)+10)+'px',display:'none'}).click(showNextItem);$('<div></div>').addClass('gv-panel-nav-prev').appendTo(j_gallery).css({position:'absolute',zIndex:'1100',top:((opts.filmstrip_position=='top'?opts.frame_gap+wrapper_height:0)+(panels_height[current_panel]-22)/2)+'px',left:((opts.filmstrip_position=='left'?opts.frame_gap+wrapper_width:0)+10)+'px',display:'none'}).click(showPrevItem);}
j_panel_wrapper.css({width:panels_width[current_panel]+'px',height:panels_height[current_panel]+'px',position:'absolute',overflow:'hidden'});if(opts.show_filmstrip){switch(opts.filmstrip_position){case'top':j_panel_wrapper.css({top:wrapper_height+opts.frame_gap+'px'});break;case'left':j_panel_wrapper.css({left:wrapper_width+opts.frame_gap+'px'});break;default:break;}}
j_panels.each(function(i){$(this).css({width:(panels_width[current_panel]-extraWidth(j_panels))+'px',height:(panels_height[current_panel]-extraHeight(j_panels))+'px',position:'absolute',top:0,left:0,display:'none'});});$('.gv-panel-overlay',j_panels).css({position:'absolute',zIndex:'999',width:(opts.panel_width-extraWidth($('.gv-panel-overlay',j_panels)))+'px',left:0});$('.gv-overlay-background',j_panels).css({position:'absolute',zIndex:'998',width:opts.panel_width+'px',left:0,opacity:opts.overlay_opacity});if(opts.overlay_position=='top'){$('.gv-panel-overlay',j_panels).css('top',0);$('.gv-overlay-background',j_panels).css('top',0);}else{$('.gv-panel-overlay',j_panels).css('bottom',0);$('.gv-overlay-background',j_panels).css('bottom',0);}
$('.gv-panel iframe',j_panels).css({width:opts.panel_width+'px',height:opts.panel_height+'px',border:0});if(scale_panel_images){$('img',j_panels).each(function(i){$(this).css({height:panel_img_scale[i%item_count]*img_h[i%item_count],width:panel_img_scale[i%item_count]*img_w[i%item_count],position:'relative',top:((panels_height[current_panel])-(panel_img_scale[i%item_count]*img_h[i%item_count]))/2+'px',left:((panels_width[current_panel])-(panel_img_scale[i%item_count]*img_w[i%item_count]))/2+'px'});});}};function buildFilmstrip(){j_filmstrip.wrap('<div class="gv-strip_wrapper"></div>');if(opts.filmstrip_style=='scroll'&&slide_method=='strip'){j_frames.clone().appendTo(j_filmstrip);j_frames.clone().appendTo(j_filmstrip);j_frames=$('li',j_filmstrip);}
if(opts.show_captions){j_frames.append('<div class="gv-caption"></div>').each(function(i){$(this).find('.gv-caption').html($(this).find('img').attr('title'));});}
j_filmstrip.css({listStyle:'none',margin:0,padding:0,width:strip_width+'px',position:'absolute',zIndex:'900',top:(filmstrip_orientation=='vertical'&&opts.filmstrip_style=='scroll'&&slide_method=='strip'?-((f_frame_height+opts.frame_gap)*iterator):0)+'px',left:(filmstrip_orientation=='horizontal'&&opts.filmstrip_style=='scroll'&&slide_method=='strip'?-((f_frame_width+opts.frame_gap)*iterator):0)+'px',height:strip_height+'px'});j_frames.css({float:'left',position:'relative',height:f_frame_height+(opts.show_captions?f_caption_height:0)+'px',width:f_frame_width+'px',zIndex:'901',padding:0,cursor:'pointer',marginBottom:opts.frame_gap+'px',marginRight:opts.frame_gap+'px'});$('.gv-img_wrap',j_frames).each(function(i){$(this).css({height:Math.min(opts.frame_height,img_h[i%item_count]*frame_img_scale[i%item_count])+'px',width:Math.min(opts.frame_width,img_w[i%item_count]*frame_img_scale[i%item_count])+'px',position:'relative',top:(opts.show_captions&&opts.filmstrip_position=='top'?f_caption_height:0)+Math.max(0,(opts.frame_height-(frame_img_scale[i%item_count]*img_h[i%item_count]))/2)+'px',left:Math.max(0,(opts.frame_width-(frame_img_scale[i%item_count]*img_w[i%item_count]))/2)+'px',overflow:'hidden'});});$('img',j_frames).each(function(i){$(this).css({opacity:opts.frame_opacity,height:img_h[i%item_count]*frame_img_scale[i%item_count]+'px',width:img_w[i%item_count]*frame_img_scale[i%item_count]+'px',position:'relative',top:Math.min(0,(opts.frame_height-(frame_img_scale[i%item_count]*img_h[i%item_count]))/2)+'px',left:Math.min(0,(opts.frame_width-(frame_img_scale[i%item_count]*img_w[i%item_count]))/2)+'px'}).mouseover(function(){$(this).stop().animate({opacity:1},300);}).mouseout(function(){if(!$(this).parent().parent().hasClass('current')){$(this).stop().animate({opacity:opts.frame_opacity},300);}});});$('.gv-strip_wrapper',j_gallery).css({position:'absolute',overflow:'hidden'});if(filmstrip_orientation=='horizontal'){$('.gv-strip_wrapper',j_gallery).css({top:opts.show_panels?opts.filmstrip_position=='top'?0:opts.panel_height+opts.frame_gap+'px':0,left:((gallery_width-wrapper_width)/2)+'px',width:wrapper_width+'px',height:wrapper_height+'px'});}else{$('.gv-strip_wrapper',j_gallery).css({left:opts.show_panels?opts.filmstrip_position=='left'?0:opts.panel_width+opts.frame_gap+'px':0,top:0,width:wrapper_width+'px',height:wrapper_height+'px'});}
$('.gv-caption',j_gallery).css({position:'absolute',top:(opts.filmstrip_position=='bottom'?f_frame_height:0)+'px',left:0,margin:0,width:f_caption_width+'px',overflow:'hidden'});var pointer=$('<div></div>');pointer.addClass('gv-pointer').appendTo(j_gallery).css({position:'absolute',zIndex:'1000',width:0,fontSize:0,lineHeight:0,borderTopWidth:pointer_height+'px',borderRightWidth:(pointer_width/2)+'px',borderBottomWidth:pointer_height+'px',borderLeftWidth:(pointer_width/2)+'px',borderStyle:'solid'});var transColor=$.browser.msie&&$.browser.version.substr(0,1)=='6'?'pink':'transparent';if(!opts.show_panels){pointer.css('borderColor',transColor);}
switch(opts.filmstrip_position){case'top':pointer.css({top:wrapper_height+'px',left:((gallery_width-wrapper_width)/2)+(slide_method=='strip'?0:((f_frame_width+opts.frame_gap)*iterator))+((f_frame_width/2)-(pointer_width/2))+'px',borderBottomColor:transColor,borderRightColor:transColor,borderLeftColor:transColor});break;case'bottom':pointer.css({bottom:wrapper_height+'px',left:((gallery_width-wrapper_width)/2)+(slide_method=='strip'?0:((f_frame_width+opts.frame_gap)*iterator))+((f_frame_width/2)-(pointer_width/2))+'px',borderTopColor:transColor,borderRightColor:transColor,borderLeftColor:transColor});break;case'left':pointer.css({left:wrapper_width+'px',top:(f_frame_height/2)-(pointer_height)+(slide_method=='strip'?0:((f_frame_height+opts.frame_gap)*iterator))+'px',borderBottomColor:transColor,borderRightColor:transColor,borderTopColor:transColor});break;case'right':pointer.css({right:wrapper_width+'px',top:(f_frame_height/2)-(pointer_height)+(slide_method=='strip'?0:((f_frame_height+opts.frame_gap)*iterator))+'px',borderBottomColor:transColor,borderLeftColor:transColor,borderTopColor:transColor});break;}
j_pointer=$('.gv-pointer',j_gallery);if(opts.show_filmstrip_nav){var navNext=$('<div></div>');navNext.addClass('gv-nav-next').appendTo(j_gallery).css({position:'absolute'}).click(showNextItem);var navPrev=$('<div></div>');navPrev.addClass('gv-nav-prev').appendTo(j_gallery).css({position:'absolute'}).click(showPrevItem);if(filmstrip_orientation=='horizontal'){navNext.css({top:(opts.show_panels?(opts.filmstrip_position=='top'?0:opts.panel_height+opts.frame_gap):0)+((strip_height-22)/2)+'px',right:((gallery_width)/2)-(wrapper_width/2)-opts.frame_gap-22+'px'});navPrev.css({top:(opts.show_panels?(opts.filmstrip_position=='top'?0:opts.panel_height+opts.frame_gap):0)+((strip_height-22)/2)+'px',left:((gallery_width)/2)-(wrapper_width/2)-opts.frame_gap-22+'px'});}else{navNext.css({left:(opts.show_panels?(opts.filmstrip_position=='left'?0:opts.panel_width+opts.frame_gap):0)+((strip_width-22)/2)+13+'px',top:wrapper_height+opts.frame_gap+'px'});navPrev.css({left:(opts.show_panels?(opts.filmstrip_position=='left'?0:opts.panel_width+opts.frame_gap):0)+((strip_width-22)/2)-13+'px',top:wrapper_height+opts.frame_gap+'px'});}}};function mouseIsOverGallery(x,y){var pos=getPos(j_gallery[0]);var top=pos.top;var left=pos.left;return x>left&&x<left+j_gallery.outerWidth()&&y>top&&y<top+j_gallery.outerHeight();};function mouseIsOverPanel(x,y){var pos=getPos($('#'+id+' .gv-panel_wrap')[0]);var gPos=getPos(j_gallery[0]);var top=pos.top+gPos.top;var left=pos.left+gPos.left;return x>left&&x<left+j_panels.outerWidth()&&y>top&&y<top+j_panels.outerHeight();};function getInt(i){i=parseInt(i,10);if(isNaN(i)){i=0;}
return i;};function buildGallery(){if(jQuery.browser.msie){gallery_images=opts.show_filmstrip?$('img',j_frames):$('img',j_panels);}gallery_images.each(function(i){img_h[i]=$(this).attr("height");img_w[i]=$(this).attr("width");if(opts.frame_scale=='nocrop'){frame_img_scale[i]=Math.min(opts.frame_height/img_h[i],opts.frame_width/img_w[i]);}else{frame_img_scale[i]=Math.max(opts.frame_height/img_h[i],opts.frame_width/img_w[i]);}
if(opts.panel_scale=='nocrop'){panel_img_scale[i]=Math.min((parseInt(panels_height[current_panel])/img_h[i]),(parseInt(panels_width[current_panel])/img_w[i]));}else{panel_img_scale[i]=Math.max(opts.panel_height/img_h[i],opts.panel_width/img_w[i]);}});j_gallery.css({position:'relative',width:gallery_width+'px',height:gallery_height+'px'});if(opts.show_filmstrip){buildFilmstrip();enableFrameClicking();}
if(!opts.show_overlays){$('.gv-panel-overlay',j_gallery).remove();}
if(opts.show_panels){buildPanels();}
if(opts.pause_on_hover||opts.show_panel_nav){$(document).mousemove(function(e){if(opts.pause_on_hover){if(mouseIsOverGallery(e.pageX,e.pageY)&&!paused){$(document).oneTime(500,"animation_pause",function(){$(document).stopTime("transition");paused=true;});}else{$(document).stopTime("animation_pause");if(paused&&opts.transition_interval>0){$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});paused=false;}}}
if(opts.show_panel_nav){if(mouseIsOverPanel(e.pageX,e.pageY)&&!panel_nav_displayed){$('.gv-panel-nav-next, .gv-panel-nav-prev',j_gallery).show();panel_nav_displayed=true;}else if(!mouseIsOverPanel(e.pageX,e.pageY)&&panel_nav_displayed){$('.gv-panel-nav-next, .gv-panel-nav-prev',j_gallery).hide();panel_nav_displayed=false;}}});}
j_filmstrip.css('visibility','visible');j_gallery.css('visibility','visible');showItem(iterator,10,function(){$('.gv-loader',j_gallery).fadeOut('1000',function(){if(item_count>1&&opts.transition_interval>0){$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});}});});current_panel++};return this.each(function(){var _t=$(this);_t.css('visibility','hidden');gallery_images=$('img',_t);image_count=gallery_images.length;current=opts.start_frame-1;_t.wrap("<div></div>");j_gallery=_t.parent();j_gallery.css('visibility','hidden').attr('id',_t.attr('id')).addClass('gv-gallery').addClass(_t.attr('class'));_t.removeAttr('id').addClass('gv-filmstrip');$(document).stopTime("transition");$(document).stopTime("animation_pause");id=j_gallery.attr('id');scale_panel_images=$('.gv-panel-content',j_gallery).length==0;animate_panels=(opts.panel_animation!='none');filmstrip_orientation=(opts.filmstrip_position=='top'||opts.filmstrip_position=='bottom'?'horizontal':'vertical');if(filmstrip_orientation=='vertical'){opts.show_captions=false;}
if(filmstrip_orientation=='horizontal'&&opts.pointer_size>opts.frame_width/2){opts.pointer_size=opts.frame_width/2;}
if(filmstrip_orientation=='vertical'&&opts.pointer_size>opts.frame_height/2){opts.pointer_size=opts.frame_height/2;}
j_filmstrip=$('.gv-filmstrip',j_gallery);j_frames=$('li',j_filmstrip);j_frames.addClass('gv-frame');j_panel_wrapper=$('<div>');j_panel_wrapper.addClass('gv-panel_wrap').prependTo(j_gallery);if(opts.show_panels){for(i=j_frames.length-1;i>=0;i--){jf=j_frames.eq(i);if(jf.find('.gv-panel-content').length>0){jf.find('.gv-panel-content').remove().prependTo(j_panel_wrapper).addClass('gv-panel').addClass(jf.attr('class')).removeClass('gv-frame');}else{p=$('<div>');p.addClass('gv-panel');p.addClass(jf.attr('class')).removeClass('gv-frame');im=$('<img />');jfimg=jf.find('img').eq(0)
im.attr('src',jfimg.attr('src'));if(jfimg.parent('a').length>0){ima=$('<a></a>');ima.attr('href',jfimg.parent('a').eq(0).attr('href'));ima.attr('target',jfimg.parent('a').eq(0).attr('target'));ima.append(im);ima.appendTo(p);}else{im.appendTo(p);}
p.prependTo(j_panel_wrapper);j_frames.eq(i).find('.gv-panel-overlay').remove().appendTo(p);}}}else{$('.gv-panel-overlay',j_frames).remove();$('.gv-panel-content',j_frames).remove();}
if(!opts.show_filmstrip){j_filmstrip.remove();}
else{j_frames.each(function(i){if($(this).find('a').length>0){$(this).find('a').wrap('<div class="gv-img_wrap"></div>');}else{$(this).find('img').wrap('<div class="gv-img_wrap"></div>');}});j_frame_img_wrappers=$('.gv-img_wrap',j_frames);}
j_panels=$('.gv-panel',j_gallery);if(!opts.show_panels){opts.panel_height=0;opts.panel_width=0;}
$('<div class="gv-caption"></div>').appendTo(j_frames);f_frame_width=opts.frame_width+extraWidth(j_frame_img_wrappers);f_frame_height=opts.frame_height+extraHeight(j_frame_img_wrappers);frame_caption_size=getInt($('.gv-caption',j_gallery).css('height'));f_caption_width=f_frame_width-extraWidth($('.gv-caption',j_gallery));f_caption_height=frame_caption_size+extraHeight($('.gv-caption',j_gallery));$('.gv-caption',j_gallery).remove();item_count=opts.show_panels?j_panels.length:j_frames.length;if(filmstrip_orientation=='horizontal'){strip_size=opts.show_panels?Math.floor((opts.panel_width+opts.frame_gap-(!opts.show_filmstrip_nav?0:(opts.frame_gap+22)*2))/(f_frame_width+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);}else{strip_size=opts.show_panels?Math.floor((opts.panel_height+opts.frame_gap-(!opts.show_filmstrip_nav?0:opts.frame_gap+22))/(f_frame_height+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);}
if(strip_size>=item_count){slide_method='pointer';strip_size=item_count;}
else{slide_method='strip';}
if(Math.ceil(item_count/strip_size)>1){opts.pointer_size=0;}
pointer_height=opts.pointer_size;pointer_width=opts.pointer_size*2;iterator=opts.start_frame-1;if(opts.filmstrip_style=='scroll'&&strip_size<item_count){iterator+=item_count;}
j_filmstrip.css('margin',0);if(filmstrip_orientation=='horizontal'){if(opts.filmstrip_style=='show all'||(opts.filmstrip_style=='scroll'&&slide_method=='pointer')){strip_width=(f_frame_width*strip_size)+(opts.frame_gap*(strip_size));}
else{strip_width=(f_frame_width*item_count*3)+(opts.frame_gap*((item_count*3)));}}else{if(opts.filmstrip_style=='show all'){strip_width=(f_frame_width*Math.ceil(item_count/strip_size))+(opts.frame_gap*(Math.ceil(item_count/strip_size)));}else{strip_width=(f_frame_width);}}
if(filmstrip_orientation=='horizontal'){if(opts.filmstrip_style=='show all'){strip_height=((f_frame_height+(opts.show_captions?f_caption_height:0))*Math.ceil(item_count/strip_size))+(opts.frame_gap*(Math.ceil(item_count/strip_size)-1));}else{strip_height=(f_frame_height+(opts.show_captions?f_caption_height:0));}}else{if(opts.filmstrip_style=='show all'||(opts.filmstrip_style=='scroll'&&slide_method=='pointer')){strip_height=((f_frame_height*strip_size)+opts.frame_gap*(strip_size-1));}
else{strip_height=(f_frame_height*item_count*3)+(opts.frame_gap*((item_count*3)-1));}}
if(filmstrip_orientation=='horizontal'){wrapper_width=((strip_size*f_frame_width)+((strip_size-1)*opts.frame_gap));if(opts.filmstrip_style=='show all'){wrapper_height=((f_frame_height+(opts.show_captions?f_caption_height:0))*Math.ceil(item_count/strip_size))+(opts.frame_gap*(Math.ceil(item_count/strip_size)-1));}else{wrapper_height=(f_frame_height+(opts.show_captions?f_caption_height:0));}}else{wrapper_height=((strip_size*f_frame_height)+((strip_size-1)*opts.frame_gap));if(opts.filmstrip_style=='show all'){wrapper_width=(f_frame_width*Math.ceil(item_count/strip_size))+(opts.frame_gap*(Math.ceil(item_count/strip_size)-1));}else{wrapper_width=f_frame_width;}}
j_gallery.css('padding',0);if(filmstrip_orientation=='horizontal'){gallery_width=opts.show_panels?opts.panel_width:wrapper_width+44+(opts.frame_gap*2);gallery_height=(opts.show_panels?opts.panel_height+(opts.show_filmstrip?opts.frame_gap:0):0)+(opts.show_filmstrip?wrapper_height:0);}else{gallery_height=opts.show_panels?opts.panel_height:wrapper_height+22;gallery_width=(opts.show_panels?opts.panel_width+(opts.show_filmstrip?opts.frame_gap:0):0)+(opts.show_filmstrip?wrapper_width:0);}
galleryPos=getPos(j_gallery[0]);$('<div>').addClass('gv-loader').css({position:'absolute',zIndex:'32666',opacity:1,top:0,left:0,width:gallery_width+'px',height:gallery_height+'px'}).appendTo(j_gallery);if(opts.transition_speed>opts.transition_interval&&opts.transition_interval>0){opts.transition_speed=opts.transition_interval;}
pointer_speed=opts.animate_pointer?opts.transition_speed:0;if(!window_loaded){gallery_images.each(function(i){if($(this).attr('complete')){loaded_images++;if(loaded_images==image_count){buildGallery();}}else{$(this).load(function(){loaded_images++;if(loaded_images==image_count){buildGallery();}});}});}else{buildGallery();}});};$.fn.galleryView.defaults={transition_speed:800,transition_interval:4000,easing:'swing',pause_on_hover:false,show_panels:true,panel_width:600,panel_height:400,panel_animation:'crossfade',overlay_opacity:0.7,overlay_position:'bottom',panel_scale:'crop',show_panel_nav:true,show_overlays:false,show_filmstrip:true,frame_width:60,frame_height:40,start_frame:1,filmstrip_size:3,frame_opacity:0.3,filmstrip_style:'scroll',filmstrip_position:'bottom',show_filmstrip_nav:true,frame_scale:'crop',frame_gap:5,show_captions:false,pointer_size:8,animate_pointer:true};})(jQuery);;if(typeof String.prototype.trim!=='function'){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');}}
if(typeof jQuery.browser=='undefined'){jQuery.browser={};jQuery.browser.mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase());jQuery.browser.opera=/opera/.test(navigator.userAgent.toLowerCase());jQuery.browser.msie=/msie/.test(navigator.userAgent.toLowerCase());}
window.isTouch="ontouchstart"in window||window.navigator.msMaxTouchPoints||typeof document.documentElement.ontouchstart!="undefined";jQuery.fn.getDefaultWidgetData=function(){let data={};if(window.WMS&&WMS.options&&WMS.options.currency){data.currency=WMS.options.currency;}
return data;}
jQuery(document).ready(function($){jQuery('#curTemp').html(jQuery('div.wrapper').attr('id'));if(jQuery('div#searchWrapper').length==0){jQuery("body").append('<div id="loading_map_over"></div>');jQuery('body').append('<div id="loading_message"></div><div id="loading_icon_container"><div id="loading_icon"></div></div>');}
jQuery('a.mxCloseDialog, a.mxCancelDialog').click(function(){jQuery(this).closest('div.mxDialog').fadeOut('fast');return false;});if(jQuery.browser.mozilla){var menuItems=jQuery('div.fresh div.menu ul li a');menuItems.css('display','inline');var overflowitems=jQuery('div.wrapper div.featuredProperties div.name strong, div.menu ul li a');overflowitems.each(function(index,elm){var item=jQuery(elm);var pwidth=item.parent().width();if(pwidth>0&&item.width()>pwidth){var text=item.html();item.attr('title',text);var width=item.width();var curtext=text;while(width>pwidth&&curtext!=''){curtext=curtext.substr(0,curtext.length-1);item.html(curtext+'&#0133;');width=item.width();}}});menuItems.css('display','block');}
var overflowitems=jQuery('div.homepage div.aboutanagent div.email a');overflowitems.each(function(index,elm){var item=jQuery(elm);var pwidth=item.parent().width();if(pwidth>0&&item.width()>pwidth){var text=item.html();item.html('Email Me');}});add_view_site_link();jQuery('div.menu ul li a.menuitem, div.submenu ul li a.menuitem').click(function(){jQuery(this).MenuItemClicked();return false;});var pageurl=window.location.href;if(pageurl.indexOf("preview=true")==-1){if((jQuery('div.menu ul.sf-menu, .nav-bar ul.nav.navbar-nav').length>0)&&(jQuery('div.menu ul.sf-menu > li.current, .nav-bar ul.nav.navbar-nav > li.current').length==0)&&(jQuery('div#searchPage').length>0)){var noSearchHighlight=true;if(pageurl.substr(-7)==='search/'||pageurl.substr(-7)==='/search'){jQuery('a.search').closest('li').addClass('current');jQuery('a.search').closest('div.menu > ul > li').has('a.menuitem').addClass('current');jQuery('a.search').closest('.nav-bar ul.nav.navbar-nav > li').has('a.menuitem').addClass('current');noSearchHighlight=false;}
if(noSearchHighlight){jQuery('a.search, a.customsearch').each(function(c){var onclickStr=jQuery(this).attr('onclick').toString();if(onclickStr.indexOf(pageurl)>=0){jQuery(this).closest('li').addClass('current');jQuery(this).closest('div.menu > ul > li').has('a.menuitem').addClass('current');jQuery(this).closest('.nav-bar ul.nav.navbar-nav > li').has('a.menuitem').addClass('current');noSearchHighlight=false;}});}
if(noSearchHighlight){jQuery('a.search').closest('li').addClass('current');jQuery('a.search').closest('div.menu > ul > li').has('a.menuitem').addClass('current');jQuery('a.search').closest('.nav-bar ul.nav.navbar-nav > li').has('a.menuitem').addClass('current');noSearchHighlight=false;}}else if(jQuery('div#wrapper div#listingsDetail').length>0){jQuery('a.search').closest('div.menu > ul > li').has('a.menuitem').addClass('current');jQuery('a.search').closest('.nav-bar ul.nav.navbar-nav > li').has('a.menuitem').addClass('current');}
if((jQuery('div.menu ul.sf-menu').length>0)&&(jQuery('div.menu ul.sf-menu > li.current').length==0)&&(jQuery('div#wrapper div#listingsDetail').length==0)&&(jQuery('div#searchPage').length==0)){jQuery('div.menu a.blog:first').closest('div.menu > ul > li.nav-menu-item').addClass('current');jQuery('div.menu a.blog:first').closest('.nav-bar ul.nav.navbar-nav > li.nav-menu-item').addClass('current');}}else{jQuery('div.submenu').hide();}
jQuery('input[type="text"].mxPlaceholder').each(function(){if(jQuery(this).val().length==0){jQuery(this).val(jQuery(this).attr('data-placeholder'));}else{jQuery(this).removeClass('mxPlaceholder');}});jQuery('input[type="text"].mxPlaceholder').bind('focus',function(){if(jQuery(this).val()==jQuery(this).attr('data-placeholder')){jQuery(this).val('').removeClass('mxPlaceholder');}});if(jQuery('body.logged-in').length>0){var profilename=jQuery('div#respond form#commentform a[href*="profile.php"]').text();jQuery('div#respond form#commentform a[href*="profile.php"]').replaceWith(profilename);}
if(jQuery('body#media-upload').length>0){jQuery('.media-upload-form input.button[value="Insert into Post"]').attr('value','Insert').addClass('button-primary');jQuery('.media-upload-form input.button[value="Save all changes"]').addClass('button-primary');}
if(jQuery('body.upload-php').length>0){jQuery('div#icon-upload.icon32').addClass('mxMediaLibraryIconOverride');jQuery('table.media th.column-parent, table.media td.column-parent').hide();}
if(jQuery('body.media-new-php, body.media-php').length>0){jQuery('div#icon-upload.icon32').addClass('mxMediaLibraryIconOverride');jQuery('form.media-upload-form tr.image_alt, form.media-upload-form tr.post_content').hide();}
if(jQuery('body.link-php, body.link-add-php').length>0){jQuery('p:contains("Example: Nifty blogging software")').text('Example: Google');jQuery('p:contains("Example: http://wordpress.org/")').html('Example: <code>http://www.google.com/</code>  &mdash; do not forget the <code>http://</code>');jQuery('div#linkcategorydiv h3.hndle span').append('<span id="link_cat_add_text" class="help_tip" style="font-weight: normal;">&nbsp;&nbsp;&nbsp;(All links must have at least one category. Changes to link categories will not be saved if no categories are checked.)</span>');}
if(jQuery('body.options-general-php').length>0){jQuery('input#new_admin_email').closest('tr').hide();jQuery('a[href*="wordpress.org/Formatting_Date_and_Time"]').closest('p').hide();}
if(jQuery('body.import-php').length>0){jQuery('p:contains("If you have posts or comments")').text('If you have posts or comments in another blog, you can import them into your blog on this website. To get started, choose the importer that will work for you:');var btext=jQuery('td').find('strong').text();jQuery('td').find('strong').replaceWith(btext);}
if(jQuery('body.admin-php').length>0){jQuery('p:contains("Howdy! This importer allows you to import posts and comments from your Blogger account")').replaceWith('<p>This importer allows you to import posts and comments from your Blogger account into your blog on this website.</p>');jQuery('p:contains("Howdy! Upload your WordPress eXtended")').replaceWith('<p>This importer allows you to import posts, pages, comments, custom fields, categories, and tags from another WordPress blog into your blog on this website.</p>');jQuery('p:contains("Choose a WXR file to upload,")').replaceWith('<p>Choose a WordPress eXtended (WXR) file to upload and then click <strong>Upload file and import</strong>.</p>');jQuery('p:contains("Howdy! This importer allows you to connect directly to LiveJournal")').replaceWith('<p>This importer allows you to connect directly to LiveJournal and download all your entries and comments into your blog on this website.</p>');jQuery('p:contains("Howdy! This importer allows you to extract posts from an RSS 2.0 file")').replaceWith('<p>If we do not have a custom blog importer for your existing blog system, fear not! This importer allows you to extract posts from an RSS 2.0 file into your blog on this website. First, export your existing blog to an RSS 2.0 file. Then, choose that file from your computer below and click <strong>Upload file and import</strong>.</p>');jQuery('p:contains("Howdy! We are about to begin importing all of your Movable Type")').replaceWith('<p>This importer allows you to import all of your Movable Type or TypePad entries into your blog on this website. Choose an export file from your computer and click <strong>Upload file and import</strong>.</p>');jQuery('p:contains("Hey there. Here you can selectively convert existing categories to tags.")').replaceWith('<p>Here you can selectively convert existing categories to tags. To get started, check the categories you wish to convert and click <strong>Convert Categories to Tags</stong>.</p>');jQuery('p:contains("Keep in mind that if you convert a category with child categories, the children become top-level orphans.")').replaceWith('<p>If you convert a category that has child categories, the children will become top-level categories; they will not become tags. The newly created tags will still be associated with the same posts.</p>');jQuery('p:contains("Here you can selectively convert existing tags to categories.")').replaceWith('<p>Here you can selectively convert existing tags to categories. To get started, check the tags you wish to convert and click <strong>Convert Tags to Categories</stong>.</p>');jQuery('p:contains("If a program or website you use allows you to export your links or subscriptions as OPML you may import them here.")').replaceWith('<p>This importer allows you to bring links and subscriptions over from another program or website and add them to your blog on this website. You must be able to export your links or subscriptions as OPML. To get started, specify the OPML URL or choose the OPML file to upload from your computer, then select a link category for these links, and then click <strong>Import OPML File</strong>.</p>');jQuery('form:has(input[value="Import mt-export.txt"])').hide();}
if(jQuery('body.admin-php').length>0){jQuery('p:contains("A new version of this")').hide();jQuery('p:contains("There is a new version of")').hide();}
if(jQuery('body.wp-admin').length>0){if(Branding&&Branding.result_list){jQuery('div.wp-submenu a:contains("Contact Support")').attr('href',Branding.result_list['support_url']);}
if(jQuery.fn.IsSiteOwnerWindermereAgent()){jQuery('div.wp-submenu a:contains("Training Videos")').attr({target:'_blank',href:'https://www.youtube.com/playlist?list=PLc13JuWdUfyAeG5cvsLe5FLEFvtgb12C9'});}else{jQuery('div.wp-submenu a:contains("Training Videos")').attr({target:'_blank',href:'https://www.youtube.com/playlist?list=PLc13JuWdUfyAeG5cvsLe5FLEFvtgb12C9'});}}
if(jQuery('body.wp-admin').length>0){jQuery('div#screen-options-wrap h5:contains("Screen Layout")').hide();jQuery('div#screen-options-wrap div.columns-prefs').hide();jQuery('div#post-body-content div#postexcerpt div.inside a').hide();var hrefstr=jQuery('div#post-body-content div#trackbacksdiv div.inside a').text();jQuery('div#post-body-content div#trackbacksdiv div.inside a').replaceWith(hrefstr);var hrefstr=jQuery('div#post-body-content div#commentstatusdiv div.inside a').text();jQuery('div#post-body-content div#commentstatusdiv div.inside a').replaceWith(hrefstr);var posttype=jQuery('input#post_type').val();if(posttype==="page"){jQuery('div.misc-pub-section.curtime').hide();}}
jQuery('div.mxSearch a.mx-preview-link, div.mxCustomSearch a.mx-preview-link').click(function(){var previewPath=jQuery('div.mxAdmin textarea#url').val();if(previewPath.substring(0,7)!="search/"){alert("The path must begin with search/.");return false;}
var previewSiteBase=jQuery('input#adminData').attr('data-sitebase');var previewURL='#';if(previewPath.indexOf("://")>=0){previewURL=previewPath;}else if(previewPath.substring(0,1)=="/"){previewURL=previewSiteBase+previewPath;}else{previewURL=previewSiteBase+'/'+previewPath;}
window.open(previewURL);return false;});jQuery('div.mxMenuLink a.mx-preview-link').click(function(){var previewPath=jQuery('div.mxAdmin textarea#url').val();var previewSiteBase=jQuery('input#adminData').attr('data-sitebase');var previewURL;if(previewPath.indexOf("://")>=0){previewURL=previewPath;}else if(previewPath.substring(0,1)=="/"){previewURL=previewSiteBase+previewPath;}else{previewURL=previewSiteBase+'/'+previewPath;}
window.open(previewURL);return false;});var safariVersion=9999;if(navigator.userAgent.indexOf('Safari')!=-1&&navigator.userAgent.indexOf('Chrome')==-1&&navigator.userAgent.indexOf('Mobile')==-1){if(/Version[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var safariVersion=new Number(RegExp.$1);}}
if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)||safariVersion<6){var ieVersion=new Number(RegExp.$1);var tridentVersion=0;if(/trident\/(\d+\.\d+);/i.test(navigator.userAgent)){tridentVersion=new Number(RegExp.$1);}
var adminUpgradeMsg="You are running an outdated version of Internet Explorer. Please upgrade your browser for improved speed and functionality on this web site.";var publicUpgradeMsg="You are running an outdated version of Internet Explorer. Please upgrade your browser for improved speed and functionality on this web site.";var adminUpgradeMsgSoft="Please upgrade your browser for improved speed and overall user experience on this web site.";var publicUpgradeMsgSoft="Please upgrade your browser for improved speed and overall user experience on this web site.";var adminCompatMsg="Your browser is set to an older compatibility mode, which can cause slowness and a degraded experience. Please disable in Tools > Compatibility View Settings.";var publicCompatMsg="Your browser is set to an older compatibility mode, which can cause slowness and a degraded experience. Please disable in Tools > Compatibility View Settings.";var ieCompatMode=false;var softMessage=false;var hideMessageHTML="";var upgrade_msg_hidden=null;var upgrade_msg_hidden_date=null;var current_date=new Date;var upgrade_msg_expired=false;var msg_expiry_days=60;var days_diff=null;var htmlMargin=0;var bodyMargin=0;var wrapPadding=0;var wrapPaddingAdmin=0;var wrapPaddingMenu=0;if(safariVersion<6){softMessage=true;}
if(ieVersion<=8){if(ieVersion<8&&tridentVersion>=4){ieCompatMode=true;}
if(ieVersion<9&&tridentVersion>=5){ieCompatMode=true;}
if(softMessage){adminUpgradeMsg=adminUpgradeMsgSoft;publicUpgradeMsg=publicUpgradeMsgSoft;if(hasLocalStorage()){hideMessageHTML="<a class='close_msg_text' href='#'>Hide this message</a>";}}
if(hasLocalStorage()){upgrade_msg_hidden=localStorage.getItem("upgrade_msg_hidden");upgrade_msg_hidden_date=localStorage.getItem("upgrade_msg_hidden_date");if(upgrade_msg_hidden_date!==null){days_diff=(Date.parse(current_date)-Date.parse(upgrade_msg_hidden_date))/1000/60/60/24;if(days_diff>msg_expiry_days){upgrade_msg_expired=true;}}}
if(upgrade_msg_hidden===null||upgrade_msg_expired||ieVersion===8){if(window.location==window.parent.location){jQuery('body').append('<script src="wp-content/plugins/matrix/js/browser_upgrade.js" type="text/javascript" charset="utf-8"></script>');if(jQuery('div#wpadminbar div.quicklinks').length>0){htmlMargin=parseInt(jQuery('html').css('margin-top'));bodyMargin=parseInt(jQuery('body').css('margin-top'));wrapPadding=parseInt(jQuery('div#wpcontent').css('padding-top'));wrapPaddingAdmin=parseInt(jQuery('body.wp-admin div#wphead').css('padding-top'));wrapPaddingMenu=parseInt(jQuery('body.admin-bar ul#adminmenu').css('padding-top'));if(wrapPadding==28){jQuery('div#wpcontent').attr('style','padding-top: 56px !important');}
if(wrapPaddingAdmin==28){jQuery('body.wp-admin div#wphead').attr('style','padding-top: 56px !important');}
if(wrapPaddingMenu==28){jQuery('body.admin-bar ul#adminmenu').attr('style','padding-top: 56px !important');}
if(htmlMargin==28){jQuery('html').attr('style','margin-top: 56px !important');}else if(bodyMargin==28){jQuery('body').attr('style','margin-top: 56px !important');}
jQuery('div#wpadminbar').css('top','28px');if(ieCompatMode){jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+adminCompatMsg+'</span></div></div>');}else{jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+adminUpgradeMsg+'</span><span class="browser-upgrade-button">Upgrade</span>'+hideMessageHTML+'</div></div>');}}else{jQuery('html').css('margin-top','28px');jQuery('* html body').css('margin-top','28px');if(jQuery('body.wp-admin').length>0){jQuery('body.wp-admin div#wphead').attr('style','padding-top: 28px !important');jQuery('body.admin-bar #adminmenu').attr('style','padding-top: 28px !important');if(ieCompatMode){jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+adminCompatMsg+'</span></div></div>');}else{jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+adminUpgradeMsg+'</span><span class="browser-upgrade-button">Upgrade</span>'+hideMessageHTML+'</div></div>');}}else{if(ieCompatMode){jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+publicCompatMsg+'</span></div></div>');}else{jQuery('body').prepend('<div id="alertbar"><div id="alertbar_inner"><span class="browser-upgrade-msg">'+publicUpgradeMsg+'</span><span class="browser-upgrade-button">Upgrade</span>'+hideMessageHTML+'</div></div>');}}}
if(!ieCompatMode){jQuery('span.browser-upgrade-button').click(function(){browserUpgrade("wp-content/plugins/matrix/images/");});}}}
jQuery("div#alertbar a.close_msg_text").click(function(){if(hasLocalStorage()){localStorage.setItem("upgrade_msg_hidden",true);localStorage.setItem("upgrade_msg_hidden_date",current_date);}
jQuery("div#alertbar").fadeOut("fast");if(jQuery('div#wpadminbar div.quicklinks').length>0){htmlMargin=parseInt(jQuery('html').css('margin-top'));bodyMargin=parseInt(jQuery('body').css('margin-top'));wrapPadding=parseInt(jQuery('div#wpcontent').css('padding-top'));wrapPaddingAdmin=parseInt(jQuery('body.wp-admin div#wphead').css('padding-top'));wrapPaddingMenu=parseInt(jQuery('body.admin-bar #adminmenu').css('padding-top'));if(wrapPadding==56){jQuery('div#wpcontent').attr('style','padding-top: 28px !important');}
if(wrapPaddingAdmin==56){jQuery('body.wp-admin div#wphead').attr('style','padding-top: 28px !important');}
if(wrapPaddingMenu==56){jQuery('body.admin-bar #adminmenu').attr('style','padding-top: 28px !important');}
if(htmlMargin==56){jQuery('html').attr('style','margin-top: 28px !important');}
if(bodyMargin==56){jQuery('body').attr('style','margin-top: 28px !important');}
jQuery('div#wpadminbar').css('top','0');}else{jQuery('html').css('margin-top','0');jQuery('* html body').css('margin-top','0');}
return false;});}}
SetupForSiteToolsPage();jQuery('#post').submit(function(){if(jQuery("#title").length&&jQuery("#title").val().trim()==''){setTimeout(function(){jQuery('div#edit-slug-box:contains("Permalink")').hide();alert("Please enter a title in the Title field.");},300);return false;}});jQuery('#addlink').submit(function(){if(jQuery("#link_url").val().trim()==''){setTimeout(function(){jQuery('input#link_url').css("border","2px solid red");alert("Please enter a full URL in the Web Address field.");},300);return false;}});if(typeof(Iframelogin)=="function"){var body=jQuery('body');var ifl=new Iframelogin({agent_uuid:jQuery('body').attr('data-agenttoken'),company_uuid:jQuery('body').attr('data-companytoken'),privacy_policy_link:body.attr('data-sitebase')+'/privacy-policy/'});};if($("#wpadminbar").length){var auth_url=jQuery.fn.GetAutheBaseUrl();if(auth_url.indexOf("undefined")>=0){return;}
var logout_url=window.top.location.toString().match("[^/]+//[^/]+")[0]+"/login?action=logout&from=single_signout";var json_url=auth_url+'/auth/users/add_logout_url?logout_url='+encodeURIComponent(logout_url)+"&callback=?";$.getJSON(json_url);}
var getwidget_ajaxcalls=[];var ProcessGetWidgets=function(is_initial_load){jQuery('[data-get-widget]:not(.get-widget-processed)').each(function(){var self=jQuery(this);var target=jQuery(this).data('target-parent')!="yes"?self:jQuery(this.parentNode);self.addClass('get-widget-processed');let defaultWidgetData=jQuery.fn.getDefaultWidgetData();var widget_call=wp.hooks.applyFilters('get-widget-override',null,self,target);if(!widget_call){widget_call=jQuery.ajax({url:jQuery('body').attr('data-sitebase-lang')+'/services/get-widget/',data:jQuery.extend(defaultWidgetData,self.data('get-widget')),success:function(html){if(self.data('widget-check')){if(jQuery(html).find(self.data('widget-check')).length>0){target.html(html);}}else{target.html(html);}}});}
if(is_initial_load){getwidget_ajaxcalls.push(widget_call);}});}
jQuery(document).on('flbuilder-render-updated',function(){ProcessGetWidgets();});ProcessGetWidgets(true);jQuery.when.apply(jQuery,getwidget_ajaxcalls).done(function(){jQuery(document).trigger('get-widgets-ajax-complete');});});jQuery.fn.MenuItemClicked=function(){if(jQuery(this).siblings('ul').length>0){jQuery(this).siblings('ul:first').find('a:not(.menuitem):first').each(function(){if(jQuery(this).attr('onclick')!==null&&jQuery(this).attr('onclick')!==undefined&&jQuery(this).attr('onclick')!==''){jQuery(this).click();}else{window.location.href=jQuery(this).attr('href');}});}
return false;};jQuery.fn.IsInFrame=function(){return typeof(document.frameElement)!='undefined'||typeof(document.contentWindow)!='undefined'||(window.parent&&(window!=window.parent));};jQuery.fn.AttachToFrameLoad=function(fnref){var hasFrameElem=typeof(document.frameElement)!='undefined';var hasContentWindow=typeof(document.contentWindow)!='undefined';var frameElem=hasFrameElem?document.frameElement:(hasContentWindow?document.contentWindow:window);if(typeof(frameElem.document.readyState)!='undefined'){if(frameElem.document.readyState=='complete'||frameElem.document.readyState==4)
fnref(jQuery(frameElem));else
jQuery(frameElem).load(fnref);}else{fnref(jQuery(window));}};jQuery(window).load(function($){if(jQuery('div#wrapper').length>0){jQuery('.scroll-pane').jScrollPane({showArrows:false,verticalDragMinHeight:10,verticalDragMaxHeight:50});}
jQuery('div.mxImageResizeWrapper img').each(function(index,elm){var img=new Image();var jimg=jQuery(img);img.el=elm;jimg.attr('mxresized','2');img.onload=function(){if(typeof(jQuery(this.el).attr('naturalWidth'))!='undefined'){}
else if(this.width==0||this.height==0){var elem=document.createElement('div');elem.style.display='block';elem.style.width='1px';elem.style.height='1px';document.appendChild(elem);elem.innerHTML=this.outerHTML;var img2=jQuery(elem).children('img').get(0);jQuery(this.el).attr('naturalWidth',img2.width);jQuery(this.el).attr('naturalHeight',img2.height);elem.removeNode(true);}else{jQuery(this.el).attr('naturalWidth',this.width);jQuery(this.el).attr('naturalHeight',this.height);}
jQuery(this.el).attr('mxresized','0');var wrapperparent=jQuery(this.el).parents('div.mxImageResizeWrapper');if(wrapperparent)
{jQuery.fn.DoImageResize(wrapperparent);}};if(jQuery.browser.msie)
jQuery.fn.MonitorImageForChanges(img);img.src=elm.src;});});setTimeout('jQuery(\'div.mxImageLoading\').removeClass(\'mxImageLoading\')',5000);jQuery.fn.DoImageResizeFinalize=function(elm){if(!elm)
return false;var jelm=jQuery(elm);if(jelm.hasClass('mxImageLoading')){var img=jelm.find('img');img.hide();img.addClass('mxImageFadingIn');img.fadeIn('slow',function(){var img=jQuery(this);img.parents('div.mxImageLoading').removeClass('mxImageLoading');img.removeClass('mxImageFadingIn');});}
return true;};jQuery.fn.DoImageResize=function(elm){var photo_width,photo_height,div_width,div_height,img_width,img_height;var natural_width,natural_height,resize_type;var div=jQuery(elm);var img=jQuery(div.find('img:first'));resize_type=img.parent().attr('resizetype')-0;if(resize_type!=5)
return jQuery.fn.DoImageResizeFinalize(elm);var mxresized=(img.attr('mxresized')||0)-0;if(isNaN(mxresized))
mxresized=0;if(mxresized==1||mxresized==2)
return jQuery.fn.DoImageResizeFinalize(elm);img.attr('mxresized','1');if(img.parents('.gv-gallery').length>0)
return jQuery.fn.DoImageResizeFinalize(elm);if(img.get(0).naturalWidth){natural_width=img.get(0).naturalWidth;natural_height=img.get(0).naturalHeight;}else if(jQuery.browser.msie){natural_width=img.attr('naturalWidth')||-1;natural_height=img.attr('naturalHeight')||-1;}else
natural_width=natural_height=-1;if(natural_width<1||natural_height<1){natural_width=img.width()||-1;natural_height=img.height()||-1;}
if(natural_width<1||natural_height<1)
return jQuery.fn.DoImageResizeFinalize(elm);div_width=div.width();div_height=div.height();if(jQuery.browser.msie&&(div_width==100||div_height==100)){div_width=div.get(0).offsetWidth;div_height=div.get(0).offsetHeight;}
if(div_width<1||div_height<1)
return jQuery.fn.DoImageResizeFinalize(elm);var image_aspect=natural_width/natural_height;var div_aspect=div_width/div_height;var image_width,image_height;if(div_aspect>image_aspect){image_height=div_height;image_width=image_height*image_aspect;}else{image_width=div_width;image_height=image_width/image_aspect;}
img.css('width',image_width+'px');img.css('height',image_height+'px');return jQuery.fn.DoImageResizeFinalize(elm);};jQuery.fn.m_GlobalImageLoadCache=new Array();jQuery.fn.MonitorImageForChanges=function(img){if(jQuery.browser.msie)
jQuery.fn.m_GlobalImageLoadCache.push(img);};jQuery.fn.DoImageMonitorLoop=function(){if(!jQuery.browser.msie)
return;var complete=new Array();for(var i=0;i<jQuery.fn.m_GlobalImageLoadCache.length;i++)
if(jQuery.fn.m_GlobalImageLoadCache[i]!=null)
if(jQuery.fn.m_GlobalImageLoadCache[i].complete){complete.push(jQuery.fn.m_GlobalImageLoadCache[i]);jQuery.fn.m_GlobalImageLoadCache[i]=null;}
for(var i=0;i<complete.length;i++){if(complete[i].onload)
complete[i].onload();if(complete[i].onreadystatechange)
complete[i].onreadystatechange();}};jQuery(window).load(function(){if(jQuery.browser.msie)
setInterval('jQuery.fn.DoImageMonitorLoop();',100);});jQuery.fn.nastyPause=function(milli){var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<millis);};jQuery.fn.doneloading=function(){jQuery('div#mxLoading').hide();jQuery(this).show();};jQuery.fn.startloading=function(){jQuery('div#mxLoading').show();jQuery(this).hide();};jQuery.fn.NumberToPrice=function(number){var NumberAsString=''+number;var rgx=/(\d+)(\d{3})/;while(rgx.test(NumberAsString)){NumberAsString=NumberAsString.replace(rgx,'$1'+','+'$2');}
return'$'+NumberAsString;};jQuery.fn.GetSiteBaseUrl=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-sitebase');}
else{return jQuery('#adminData').attr('data-sitebase');}};jQuery.fn.GetSiteBaseLangUrl=function(){var body=jQuery('body');if(body.attr('data-sitebase-lang')!==undefined){return body.attr('data-sitebase-lang');}
else{return jQuery('#adminData').attr('data-sitebase-lang');}};jQuery.fn.GetServiceBaseUrl=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-servicebase');}
else{return jQuery('#adminData').attr('data-servicebase');}};jQuery.fn.GetWwwBaseUrl=function(){return jQuery('body').attr('data-www');};jQuery.fn.GetServiceUrl=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-servicebase')+'/service/'+
body.attr('data-serviceversion');}
else{var tag=jQuery('#adminData');return tag.attr('data-servicebase')+'/service/'+
tag.attr('data-serviceversion');}};jQuery.fn.GetAutheBaseUrl=function(){var body=jQuery('body');if(body.attr('data-authbase')!==undefined){return body.attr('data-authbase')+'/service/'+
body.attr('data-authversion');}
else{var tag=jQuery('#adminData');return tag.attr('data-authbase')+'/service/'+
tag.attr('data-authversion');}};jQuery.fn.GetServiceVersion=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-serviceversion');}
else{return jQuery('#adminData').attr('data-serviceversion');}};jQuery.fn.GetSiteMlsId=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-sitemlsid');}
else{return jQuery('#adminData').attr('data-sitemlsid');}};jQuery.fn.GetCompanyToken=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-companytoken');}else{return jQuery('#adminData').attr('data-companytoken');}};jQuery.fn.IsSiteOwnerWindermereAgent=function(){var windermereCompanyId="1234567";return(jQuery.fn.GetCompanyToken()==windermereCompanyId);};jQuery.fn.GetAgentToken=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-agenttoken');}
else{return jQuery('#adminData').attr('data-agenttoken');}};jQuery.fn.GetUserToken=function(){var body=jQuery('body');if(body.attr('data-sitebase')!==undefined){return body.attr('data-usertoken');}
else{return jQuery('#adminData').attr('data-usertoken');}};add_view_site_link=function(){var originalText=jQuery('#site-heading a:first span').text();jQuery('#site-heading a:first span').text(originalText+' - View Site');};jQuery.fn.PlaceSubNav=function(){var subnav=jQuery(this).children('ul');var offset=subnav.offset();if(offset.left+220>screen.width){subnav.css('left','-220px');}};jQuery.fn.PrintThis=function(obj,title){var jobj=jQuery(obj);if(!jobj.hasClass('mxPrintable'))
jobj.addClass('mxPrintable');var parents=jobj.parents('#TB_ajaxContent');if(parents.length>0)
parents.addClass('mxPrintNoScroll');var oldTitle=window.title;if(title)
window.title=title;window.print();if(title)
window.title=oldTitle;return false;};post=function(URL,PARAMS,NEW_WINDOW){var temp=document.createElement("form");temp.setAttribute('style','display:none;');temp.action=URL;temp.method="POST";if(NEW_WINDOW){temp.target="_blank";}
for(var x in PARAMS){var opt=document.createElement("textarea");opt.name=x;opt.value=PARAMS[x];temp.appendChild(opt);}
document.body.appendChild(temp);temp.submit();return temp;};jQuery(window).load(function(){jQuery('.mxPrintButton').click(function(){var rootObj=jQuery(this).parents('.mxPrintable,#TB_ajaxContent');if(rootObj.length>1)
rootObj=rootObj[rootObj.length-1];var win=window.open('');win.document.write('<html><head>');win.document.write('<style>.mxNoPrint { display: none; }</style>');win.document.write('</head><body>');win.document.write(jQuery(rootObj).html());win.document.write('</body></html>');win.document.close();if(jQuery.browser.msie)
win.focus();win.print();win.close();return false;});});function SetupForSiteToolsPage(){jQuery("button#regeneratecss").click(function(){jQuery('div#mxLoading').show();var serviceBase=jQuery.fn.GetSiteBaseUrl();var serviceUrl=serviceBase+"/services/regenerate-css";jQuery.ajax({type:"POST",url:serviceUrl,data:{wpSiteId:0,startSiteId:jQuery('#start_site').val(),endSiteId:jQuery('#end_site').val()},dataType:"json",timeout:1800000,error:function(jqXHR,textStatus,errorThrown){$("#result_text").text("A "+textStatus+" error occurred making call to regenerate the CSS.");jQuery('div#mxLoading').hide();},success:function(data){if("success"===data.status){$("#result_text").text(data.data+" site(s)'s CSS have been regenerated.");}
else{$("#result_text").text("An error was returned attempting to regenerate the CSS: "+data.message);}
jQuery('div#mxLoading').hide();}});});}
function openPhotoGallery(listing_id){var url=jQuery.fn.GetSiteBaseUrl()+"/listing/"+listing_id+"/gallery";window.open(url,'_self');return false;}
function checkEmail(n){if(!Validator.isEmail(n)){alert('Please enter a valid e-mail address.');return false}}
function isValidEmailAddress(emailAddress){var pattern=new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);return pattern.test(emailAddress);}
function isValidMultipleEmailAddresses(emailAddress){var emails=emailAddress.split(/[ ,]+/);return emails.every(function(email){return isValidEmailAddress(email);});}
function hasLocalStorage(){try{return'localStorage'in window&&window['localStorage']!==null;}catch(e){return false;}}
function trackEventListTrac(eventType,mlsnumber,zip,mlsagentid){mlsagentid=mlsagentid||null;if(typeof(_LT)!='undefined'&&_LT!=null){_LT.initListTrac('wind_100462');_LT._trackEvent(_eventType[eventType],mlsnumber,zip,mlsagentid);}}
if(navigator.userAgent.match(/IEMobile\/10\.0/)){var msViewportStyle=document.createElement("style");msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}"));document.getElementsByTagName("head")[0].appendChild(msViewportStyle);}
function isJWTRequiredURL(url){if(/(\?|&)authorization=/.test(url)){return false;}
return /\/service\/v1\/profile\/web_user/.test(url)||/\/service\/v1\/profile\/[a-fA-F0-9-]+\/(favorites|associatedagent|listing)/.test(url)||/\/service\/v1\/profile\/session/.test(url)||false;}
function sreUserJWT(){if(window.SRE&&SRE.auth&&SRE.auth.web_user_jwt){return SRE.auth.web_user_jwt;}
return null;}
jQuery.ajaxPrefilter(function(options,originalOptions,jqXHR){if(options.crossDomain){var sep=options.url.indexOf('?')>-1?'&':'?';options.url+=(sep+"send_from_agent=true&from_aws=true&"+"from_app="+encodeURIComponent("aws:"+jQuery().GetSiteBaseUrl())+"&source=agent website&source_display_name="+jQuery('body').attr('data-sitetype')+"&site_type="+jQuery('body').attr('data-sitetype'));if(sreUserJWT()&&isJWTRequiredURL(options.url)){options.url+='&authorization='+encodeURIComponent(sreUserJWT());}}
if(options.url.indexOf("create_lead")!==-1){options.formData=originalOptions.data;}});function isSpam(form){var message=form.find("textarea[name=wms_ec_message]").val()||"";var checkChineseChar=/[\u3400-\u9FBF]/.test(message);var protocolURLMatch=/https?:/.test(message);var looseURLMatch=/([a-zA-Z]{2,}\.[a-zA-Z]{2,})/.test(message);var weirdCharMatch=/[\u3010-\u3011]|[\uff00-\uffef]|[\u2600-\u26ff]/.test(message);var senderName=form.find("input[name=wms_ec_your_name]").val();var checkChineseCharName=/[\u3400-\u9FBF]/.test(senderName);if(checkChineseCharName||checkChineseChar||protocolURLMatch){return true;}
var yenohY=form.find('.yenoh-y').is(':checked');var yenohN=form.find('.yenoh-n').is(':checked');var yenohSet=form.find('.yenoh-set-y').is(':checked');if(!yenohY||yenohN||!yenohSet){return true;}
return false;}
function queryStringToJSON(params){var pairs=params.split('&');var result={};pairs.forEach(function(pair){pair=pair.split('=');result[pair[0]]=decodeURIComponent(pair[1]||'');});return JSON.parse(JSON.stringify(result));};
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
(H?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==r)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case"inline":case"ajax":case"html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case"image":e=a.tpl.image.replace("{href}",g);break;case"swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x","hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c<m&&(c=m,j=l(c/E)),j<u&&(j=u,c=l(j*E))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,v)));if(h.fitToView)if(g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height(),h.aspectRatio)for(;(a>A||p>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(v,j-10)),c=l(j*E),c<m&&(c=m,j=l(c/E)),c>n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&j<B&&c+y+
q<A)&&(c+=q);g.width(c).height(j);e.width(c+y);a=e.width();p=e.height();e=(a>A||p>r)&&c>m&&j>u;c=h.aspectRatio?c<G&&j<C&&c<D&&j<B:(c<G||j<C)&&(c<D||j<B);f.extend(h,{dim:{width:x(a),height:x(p)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:z,wrapSpace:p-k.outerHeight(!0),skinSpace:k.height()-j});!w&&(h.autoHeight&&j>u&&j<v&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-j*a.leftRatio),width:x(f+j),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(l(e[g])-200),c[g]="+=200px"):(e[g]=x(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case"inside":c=b.skin;break;case"outside":c=b.wrap;break;case"over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),H&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);;var wwwHelper={trackGA4:function(event_name,parameters){if(window.dataLayer&&window.gtag&&event_name){gtag('event',event_name,parameters||{});}},trackEvent:function(category,action,label,val){if(typeof ga!="undefined"){category=category||"";action=action||"";label=label||"";val=val||null;if(category===""||action===""){return false;}
ga(function(){var t=ga.getByName('altTracker');var altTrackerExists=typeof t!="undefined";if(val===null){ga('send','event',category,action,label);if(altTrackerExists){ga('altTracker.send','event',category,action,label);}}else{ga('send','event',category,action,label,val);if(altTrackerExists){ga('altTracker.send','event',category,action,label,val);}}});}
if('Click - Share Facebook'==action){BOAT.facebookShareCallbacks.forEach(function(callback){callback();});}else if('Click - Share Twitter'==action){BOAT.twitterShareCallbacks.forEach(function(callback){callback();});}else if('Click Calculate Commute'==action){BOAT.driveTimeCallbacks.forEach(function(callback){callback(val);});}},socialShare:function(service,url,addr,display_name){display_name=encodeURIComponent(display_name||"");if(service==="facebook"){return window.open("https://www.facebook.com/sharer.php?u="+url,"NewFBWin","width=580,height=410,left=10,top=10,resizable=yes,scrollbars=yes");}else{if(service==="twitter"){return window.open("https://twitter.com/share?text="+display_name+" - "+addr+"&url="+url,"TwitterWin","width=580,height=410,left=10,top=10,resizable=yes");}}},facebookShare:function(url){return window.open("https://www.facebook.com/sharer.php?u="+encodeURIComponent(url),"NewFBWin","width=580,height=410,left=10,top=10,resizable=yes,scrollbars=yes");},dollarFormat:function(number){if(number===null){return"";}
var sStr=""+number;var moneyval="";var i;for(i=0;i<sStr.length;i++){j=i+1;moneyval+=sStr.substring(i,j);if(number==Math.round(number)){pos=sStr.length-j;}else{pos=sStr.length-3-j;}
tmp=Math.round(pos/3);if(pos==tmp*3&&pos!=0){moneyval+=",";}}
return moneyval;},returnBaseUrlForMapDirections:function(){if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&/iemobile/i.test(navigator.userAgent)===false){return'https://maps.apple.com/';}else if(/Android/i.test(navigator.userAgent)&&/iemobile/i.test(navigator.userAgent)===false){return'https://maps.google.com/';}else if(/iemobile/i.test(navigator.userAgent)){return'https://www.bing.com/mapspreview';}else{return'https://maps.google.com/';}},analyticsString:function(str,paramType){if(Wx.data.listing_detail.listing_agent_uuid!=="")opt_value=1;str=str||"";paramType=paramType||"action";paramType=$.trim(paramType.toLowerCase());if(paramType==="action"){var opt_overlay=/\/overlay/.test(window.location.pathname)?" on Overlay":"";str=str+opt_overlay;}
return str;},listingDetailGA4Params:function(){let listing_detail=Wx.data?Wx.data.listing_detail:null;let params={};if(listing_detail){params.listingid=listing_detail.listingid;params.is_overlay=/\/overlay/.test(window.location.pathname);}
return params;},toggleAgentCard:function(){var agentCard=$("#contact-agent-modal");if($(agentCard).is(":visible")){$("#contact-agent-modal").hide();}else{$("#contact-agent-modal").show();}},bubbleMessage:function(m,loader,instant,container){if(!m){m="There has been an error.";}
jQuery("#loading_message").html(m);var con='';if(typeof container==='string'){con=container;}else if(Search.context==='map'){con='wms_map';}else{con='wms_list_view';}
if(container==='window'){var x=0;var y=0;var w=jQuery(window).width();var h=jQuery(window).height();var s=jQuery(window).scrollTop();var e_w=jQuery("#loading_message").width()/2;var e_h=jQuery("#loading_message").height()/2;}else{var x=jQuery("#"+con).offset().left;var y=jQuery("#"+con).offset().top;var w=jQuery("#"+con).width();var h=jQuery("#"+con).height();var s=0;var e_w=jQuery("#loading_message").width()/2;var e_h=jQuery("#loading_message").height()/2;}
jQuery("#loading_map_over").css({"display":"block","top":y,"left":x,"width":jQuery("#wms_search").width()-360,"height":jQuery("#wms_search").height()-40});jQuery("#loading_message").css({"top":(y+h/2)-e_h+s,"left":(x+w/2)-e_w});if(h>1000){jQuery("#loading_message").css({"top":440});}
if(loader){jQuery("#loading_message").addClass("loading_message_loader");}else{jQuery("#loading_message").removeClass("loading_message_loader");}
if(typeof container===undefined){jQuery("#loading_map_over").css({display:"block"});}else{jQuery("#loading_map_over").css({display:"none"});}
jQuery("#loading_message").addClass("shadow");if(instant){jQuery("#loading_message").css({display:"block"});}else{jQuery("#loading_message").fadeIn();}},hideBubbleMessage:function(){$("#loading_message, #loading_map_over").fadeOut();},isBubbleMessageShowing:function(){return $("#loading_message").is(':visible');}};var WxHideListing={hideListings:{},create_hideListing:function(lid){if(wwwHelper.isBubbleMessageShowing())return;var user_uuid=SRE.auth.uuid;if(!user_uuid)return;wwwHelper.bubbleMessage("Excluding Listing...",true,false,'window');var l_url=WMS.profile_service+'/web_user/'+user_uuid+'/listing/'+lid+'/do_not_show?callback=?';$(".tipsy").remove();$.getJSON(l_url,function(data){if(data.status==="success"){$(".hide_"+lid).attr("data-listingid",data.data.result_list[0].hideListingid);$(".hide_"+lid).attr("data-hidelisting","true");WxHideListing.style_hideListing(lid);WxHideListing.hideListings[lid]={hideListingid:data.data.result_list[0].hideListingid};if(typeof hideListingCallback==="function"){hideListingCallback(parseInt(lid),"x-out",true);}}else{alert("We're sorry, this feature is not working at this time.");$(".hide_"+lid).attr("data-hidelisting","false");WxHideListing.style_unhideListing(lid);delete WxHideListing.hideListings[lid];}
wwwHelper.hideBubbleMessage();});},delete_hideListing:function(lid){if(wwwHelper.isBubbleMessageShowing())return;var user_uuid=SRE.auth.uuid;if(!user_uuid)return;wwwHelper.bubbleMessage("Restoring Listing...",true,false,'window');var hideListing_id=$(".hide_"+lid).attr("data-listingid");var l_url=WMS.profile_service+'/web_user/'+user_uuid+'/listing/'+hideListing_id+'/unknown?callback=?';$(".tipsy").remove();$.getJSON(l_url,function(data){if(data.status==="success"){$(".hide_"+lid).attr("data-hidelisting","false");WxHideListing.style_unhideListing(lid);delete WxHideListing.hideListings[lid];if(typeof hideListingCallback==="function"){hideListingCallback(parseInt(lid),"x-on",false);}}else{alert("We're sorry, this feature is not working at this time.");$(".hide_"+lid).attr("data-hidelisting","true");WxHideListing.style_hideListing(lid);}
wwwHelper.hideBubbleMessage();});},set_hideListings:function(user_uuid,tag){var l_url=WMS.profile_service+'/web_user/'+user_uuid+'/listing/do_not_show'+'?callback=?';jQuery.getJSON(l_url,function(obj){switch(obj.status){case"success":if(obj.data){$.each(obj.data.result_list,function(i,v){var hides={};hides.listingid=v.listing.listingid;hides.hideListingid=v.hideListingid;hides.legacy_listingid=v.legacy_listingid;hides.uuid=v.uuid;hides.mlsnumber=v.listing.mlsnumber;WxHideListing.hideListings[v.listing.listingid]=hides;});WxHideListing.style_tag(tag);jQuery(document).trigger('hiddenListingsRetrieved',WxHideListing.hideListings);}
break;case"error":console.log(l_url);console.log(obj.message);break;default:console.log("An error occurred making call to retrieve the user's favorites.");break;}});},toggle_hideListing:function(lid){SRE.auth.checkCurrentUser(function(data){if(data.success){var hide=$(".hide_"+lid);if(hide.attr("data-hidelisting")==="true"){WxHideListing.delete_hideListing(lid);}else{WxHideListing.create_hideListing(lid);}}else{WMS.redirect="WxHideListing.toggle_hideListing("+lid+")";return SRE.auth.ifl.open();}});},style_tag:function(tag){$(tag).each(function(){var lid=$(this).attr("data-listingid");if(WxHideListing.is_hideListing(lid)){WxHideListing.style_hideListing(lid);$(".hide_"+lid).attr("data-hidelisting","true");$(".hide_"+lid).attr("data-listingid",WxHideListing.hideListings[lid].hideListingid);}});},style_hideListing:function(lid){var hide=$(".hide_"+lid);hide.removeClass("make-hideListing").addClass("is-hideListing");hide.attr("original-title","Restore Listing");hide.children("span.hide-show-listing").text(" Show ")},style_unhideListing:function(lid){var hide=$(".hide_"+lid);hide.removeClass("is-hideListing").addClass("make-hideListing");hide.attr("original-title","Exclude Listing");hide.children("span.hide-show-listing").text(" Hide ")},is_hideListing:function(lid){if(WxHideListing.hideListings[lid]){return true;}else{return false;}},set_click:function(tag,elem_bind){var listing_id;$(tag).each(function(){var lid=$(this).attr("data-listingid");if(WxHideListing.is_hideListing(lid)){WxHideListing.style_hideListing(lid);$(".hide_"+lid).attr("data-hidelisting","true");$(".hide_"+lid).attr("data-listingid",WxHideListing.hideListings[lid].hideListingid);}
if(elem_bind){$(this).bind('click',function(){WxHideListing.toggle_hideListing(lid);});}});}};var WxFavorite={favorites:{},create_favorite:function(lid){if(wwwHelper.isBubbleMessageShowing())return;var user_uuid=SRE.auth.uuid;if(!user_uuid)return;wwwHelper.bubbleMessage("Adding Favorite...",true,false,'window');var l_url=WMS.profile_service+'/'+user_uuid+'/favorites/new?favorite_listingid='+lid+'&callback=?';$(".tipsy").remove();$.getJSON(l_url,function(data){if(data.status==="success"){$(".fav_"+lid).attr("data-favorite_id",data.data.result_list[0].favoriteid);$(".fav_"+lid).attr("data-favorite","true");$(".fav_"+lid).attr("aria-checked","true");WxFavorite.style_favorite(lid);WxFavorite.favorites[lid]={favoriteid:data.data.result_list[0].favoriteid};if(typeof createFavoriteCallback==="function"){createFavoriteCallback({listing_id:parseInt(lid),favorite_id:data.data.result_list[0].favoriteid,is_create:true});}}else{alert("We're sorry, this feature is not working at this time.");$(".fav_"+lid).attr("data-favorite","false");WxFavorite.style_unfavorite(lid);delete WxFavorite.favorites[lid];}
wwwHelper.hideBubbleMessage();});},delete_favorite:function(lid){if(wwwHelper.isBubbleMessageShowing())return;var user_uuid=SRE.auth.uuid;if(!user_uuid)return;wwwHelper.bubbleMessage("Removing Favorite...",true,false,'window');var favorite_id=$(".fav_"+lid).attr("data-favorite_id");var l_url=WMS.profile_service+'/'+user_uuid+'/favorites/'+favorite_id+'/delete?callback=?';$(".tipsy").remove();$.getJSON(l_url,function(data){if(data.status==="success"){$(".fav_"+lid).attr("data-favorite","false");$(".fav_"+lid).attr("aria-checked","false");WxFavorite.style_unfavorite(lid);delete WxFavorite.favorites[lid];if(typeof deleteFavoriteCallback==="function"){deleteFavoriteCallback({listing_id:parseInt(lid),favorite_id:favorite_id,is_create:false});}}else{alert("We're sorry, this feature is not working at this time.");$(".fav_"+lid).attr("data-favorite","true");WxFavorite.style_favorite(lid);}
wwwHelper.hideBubbleMessage();});},set_favorites:function(user_uuid,tag){var l_url=WMS.profile_service+'/'+user_uuid+'/favorites'+'?callback=?';$.ajax({type:'GET',url:l_url,dataType:'json',async:false,success:function(data){if(data.status==="success"){$.each(data.data.result_list,function(i,v){var favs={};favs.listingid=v.listing.listingid;favs.favoriteid=v.favoriteid;favs.legacy_listingid=v.legacy_listingid;favs.uuid=v.uuid;favs.mlsnumber=v.listing.mlsnumber;WxFavorite.favorites[v.listing.listingid]=favs;});WxFavorite.style_tag(tag);}else{WxFavorite.favorites={};}}});},toggle_favorite:function(lid){SRE.auth.checkCurrentUser(function(data){if(data.success){var fav=$(".fav_"+lid);if(fav.attr("data-favorite")==="true"){WxFavorite.delete_favorite(lid);}else{WxFavorite.create_favorite(lid);}}else{WMS.redirect="WxFavorite.toggle_favorite("+lid+")";return SRE.auth.ifl.open();}});},style_tag:function(tag){$(tag).each(function(){var lid=$(this).attr("data-listingid");if(WxFavorite.is_favorite(lid)){WxFavorite.style_favorite(lid);$(".fav_"+lid).attr("data-favorite","true");$(".fav_"+lid).attr("aria-checked","true");$(".fav_"+lid).attr("data-favorite_id",WxFavorite.favorites[lid].favoriteid);}});},style_favorite:function(lid){var fav=$(".fav_"+lid);fav.removeClass("make-favorite").addClass("is-favorite");fav.attr("original-title","Remove Favorite");},style_unfavorite:function(lid){var fav=$(".fav_"+lid);fav.removeClass("is-favorite").addClass("make-favorite");fav.attr("original-title","Add Favorite");},is_favorite:function(lid){if(WxFavorite.favorites[lid]){return true;}else{return false;}},set_click:function(tag,elem_bind){var listing_id;$(tag).each(function(){var lid=$(this).attr("data-listing_id");if(WxFavorite.is_favorite(lid)){WxFavorite.style_favorite(lid);$(".fav_"+lid).attr("data-favorite","true");$(".fav_"+lid).attr("aria-checked","true");$(".fav_"+lid).attr("data-favorite_id",WxFavorite.favorites[lid].favoriteid);}
if(elem_bind){$(this).bind('click',function(){WxFavorite.toggle_favorite($(this).attr("data-listing_id"));});}});}};(function($){var trailing_whitespace=true;$.fn.truncate=function(options){var opts=$.extend({},$.fn.truncate.defaults,options);$(this).each(function(){var content_length=$.trim(squeeze($(this).text())).length;if(content_length<=opts.max_length)
return;var actual_max_length=opts.max_length-opts.more.length-3;var truncated_node=recursivelyTruncate(this,actual_max_length);truncated_node.attr("class",truncated_node.attr("class").replace("long","short"));var full_node=$(this).hide();truncated_node.insertAfter(full_node);findNodeForMore(truncated_node).append(' <a class="truncator-link" href="#show more content">'
+opts.more+'</a>');findNodeForLess(full_node).append(' <br/><a class="truncator-link" href="#show less content">'
+opts.less+'</a>');truncated_node.find('a:last').click(function(e){e.preventDefault();truncated_node.hide();full_node.slideDown("slow");});full_node.find('a:last').click(function(e){e.preventDefault();truncated_node.show();full_node.slideUp("slow");});});};$.fn.truncate.defaults={max_length:100,more:'…more',less:'less'};function recursivelyTruncate(node,max_length){return(node.nodeType==3)?truncateText(node,max_length):truncateNode(node,max_length);}
function truncateNode(node,max_length){var node=$(node);var new_node=node.clone().empty();var truncatedChild;node.contents().each(function(){var remaining_length=max_length-new_node.text().length;if(remaining_length==0)
return;truncatedChild=recursivelyTruncate(this,remaining_length);if(truncatedChild)
new_node.append(truncatedChild);});return new_node;}
function truncateText(node,max_length){var text=squeeze(node.data);if(trailing_whitespace)
text=text.replace(/^ /,'');trailing_whitespace=!!text.match(/ $/);var text=text.slice(0,max_length);text=$('<div/>').text(text).html();return text;}
function squeeze(string){return string.replace(/\s+/g,' ');}
function findNodeForMore(node){var $node=$(node);var last_child=$node.children(":last");if(!last_child)
return node;var display=last_child.css('display');if(!display||display=='inline')
return $node;return findNodeForMore(last_child);}
function findNodeForLess(node){var $node=$(node);var last_child=$node.children(":last");if(last_child&&last_child.is('p'))
return last_child;return node;}})(jQuery);
;(function(g,f){'use strict';var h=function(e){if("object"!==typeof e.document)throw Error("Cookies.js requires a `window` with a `document` object");var b=function(a,d,c){return 1===arguments.length?b.get(a):b.set(a,d,c)};b._document=e.document;b._cacheKeyPrefix="cookey.";b._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC");b.defaults={path:"/",secure:!1};b.get=function(a){b._cachedDocumentCookie!==b._document.cookie&&b._renewCache();a=b._cache[b._cacheKeyPrefix+a];return a===f?f:decodeURIComponent(a)};
b.set=function(a,d,c){c=b._getExtendedOptions(c);c.expires=b._getExpiresDate(d===f?-1:c.expires);b._document.cookie=b._generateCookieString(a,d,c);return b};b.expire=function(a,d){return b.set(a,f,d)};b._getExtendedOptions=function(a){return{path:a&&a.path||b.defaults.path,domain:a&&a.domain||b.defaults.domain,expires:a&&a.expires||b.defaults.expires,secure:a&&a.secure!==f?a.secure:b.defaults.secure}};b._isValidDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)&&!isNaN(a.getTime())};
b._getExpiresDate=function(a,d){d=d||new Date;"number"===typeof a?a=Infinity===a?b._maxExpireDate:new Date(d.getTime()+1E3*a):"string"===typeof a&&(a=new Date(a));if(a&&!b._isValidDate(a))throw Error("`expires` parameter cannot be converted to a valid Date instance");return a};b._generateCookieString=function(a,b,c){a=a.replace(/[^#$&+\^`|]/g,encodeURIComponent);a=a.replace(/\(/g,"%28").replace(/\)/g,"%29");b=(b+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent);c=c||{};a=a+"="+b+(c.path?";path="+
c.path:"");a+=c.domain?";domain="+c.domain:"";a+=c.expires?";expires="+c.expires.toUTCString():"";return a+=c.secure?";secure":""};b._getCacheFromString=function(a){var d={};a=a?a.split("; "):[];for(var c=0;c<a.length;c++){var e=b._getKeyValuePairFromCookieString(a[c]);d[b._cacheKeyPrefix+e.key]===f&&(d[b._cacheKeyPrefix+e.key]=e.value)}return d};b._getKeyValuePairFromCookieString=function(a){var b=a.indexOf("="),b=0>b?a.length:b,c=a.substr(0,b),e;try{e=decodeURIComponent(c)}catch(f){console&&"function"===
typeof console.error&&console.error('Could not decode cookie with key "'+c+'"',f)}return{key:e,value:a.substr(b+1)}};b._renewCache=function(){b._cache=b._getCacheFromString(b._document.cookie);b._cachedDocumentCookie=b._document.cookie};b._areEnabled=function(){var a="1"===b.set("cookies.js",1).get("cookies.js");b.expire("cookies.js");return a};b.enabled=b._areEnabled();return b},e="object"===typeof g.document?h(g):h;"function"===typeof define&&define.amd?define(function(){return e}):"object"===typeof exports?
("object"===typeof module&&"object"===typeof module.exports&&(exports=module.exports=e),exports.Cookies=e):g.Cookies=e})("undefined"===typeof window?this:window);
;var wms_ld_root="/wp-content/plugins/mx_pages/listingsdetail/";var wms_root="/wp-content/plugins/mx_pages/searchpage/";var $j=jQuery;var ver='3.3.20141202.0';var BOAT={onLoginCallbacks:[],onWebuserUpdateCallbacks:[],onRegisterCallbacks:[],ajaxBeforeSendCallbacks:[],ajaxSuccessCallbacks:[],facebookShareCallbacks:[],twitterShareCallbacks:[],driveTimeCallbacks:[]}
if(typeof WMS=='undefined'){window.WMS={options:{},optout:[]}}
var attr={}
var first_run=true;if(typeof wms_root!='undefined'){WMS.root=wms_root;WMS.options.root=wms_root;}else{WMS.root='';}
if(typeof wms_ld_root!='undefined'){WMS.ld_root=wms_ld_root;}else{WMS.ld_root='';}
if(typeof wms_debug!='undefined'){WMS.debug=wms_debug;}else{WMS.debug=false;}
goog={}
goog.provide=function(){}
jq=jQuery.noConflict();$=jQuery.noConflict();$_=$;function log(){};$.ajaxSetup({beforeSend:function(jqXHR,settings){BOAT.ajaxBeforeSendCallbacks.forEach(function(callback){callback(jqXHR,settings);});var origSuccess=settings.success;settings.success=function(response,textStatus,jqXHR){if(typeof origSuccess=='function'){origSuccess.apply(this,arguments);}
BOAT.ajaxSuccessCallbacks.forEach(function(callback){callback(settings,response,textStatus,jqXHR);});}
return true;}});;(function($){var Tipsy,isElementInDOM,maybeCall;maybeCall=function(thing,ctx){if(typeof thing==="function"){return thing.call(ctx);}else{return thing;}};isElementInDOM=function(ele){if((function(){var _results;_results=[];while(ele=ele.parentNode){_results.push(ele===document);}
return _results;})()){return true;}
return false;};Tipsy=function(element,options){this.$element=$(element);this.options=options;this.enabled=true;return this.fixTitle();};Tipsy.prototype={show:function(){var $tip,actualHeight,actualWidth,gravity,pos,title,tp;title=this.getTitle();if(title&&this.enabled){$tip=this.tip();$tip.find(".tipsy-inner")[(this.options.html?"html":"text")](title);$tip[0].className="tipsy";$tip.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);pos=$.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});actualWidth=$tip[0].offsetWidth;actualHeight=$tip[0].offsetHeight;gravity=maybeCall(this.options.gravity,this.$element[0]);tp=void 0;switch(gravity.charAt(0)){case"n":tp={top:pos.top+pos.height+this.options.offset,left:pos.left+pos.width/2-actualWidth/2};break;case"s":tp={top:pos.top-actualHeight-this.options.offset,left:pos.left+pos.width/2-actualWidth/2};break;case"e":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth-this.options.offset};break;case"w":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width+this.options.offset};}
if(gravity.length===2){if(gravity.charAt(1)==="w"){tp.left=pos.left+pos.width/2-15;}else{tp.left=pos.left+pos.width/2-actualWidth+15;}}
$tip.css(tp).addClass("tipsy-"+gravity);$tip.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+gravity.charAt(0);if(this.options.className){$tip.addClass(maybeCall(this.options.className,this.$element[0]));}
if(this.options.fade){return $tip.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity});}else{return $tip.css({visibility:"visible",opacity:this.options.opacity});}}},hide:function(){if(this.options.fade){return this.tip().stop().fadeOut(function(){return $(this).remove();});}else{return this.tip().remove();}},fixTitle:function(){var $e;$e=this.$element;if($e.attr("title")||typeof($e.attr("original-title"))!=="string"){return $e.attr("original-title",$e.attr("title")||"").removeAttr("title");}},getTitle:function(){var $e,o,title;title=void 0;$e=this.$element;o=this.options;this.fixTitle();title=void 0;o=this.options;if(typeof o.title==="string"){title=$e.attr((o.title==="title"?"original-title":o.title));}else{if(typeof o.title==="function"){title=o.title.call($e[0]);}}
title=(""+title).replace(/(^\s*|\s*$)/,"");return title||o.fallback;},tip:function(){if(!this.$tip){this.$tip=$_("<div class=\"tipsy\"></div>").html("<div class=\"tipsy-arrow\"></div><div class=\"tipsy-inner\"></div>");this.$tip.data("tipsy-pointee",this.$element[0]);}
return this.$tip;},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;return this.options=null;}},enable:function(){return this.enabled=true;},disable:function(){return this.enabled=false;},toggleEnabled:function(){return this.enabled=!this.enabled;}};$.fn.tipsy=function(options){var binder,enter,eventIn,eventOut,get,leave,tipsy;get=function(ele){var tipsy;tipsy=$.data(ele,"tipsy");if(!tipsy){tipsy=new Tipsy(ele,$.fn.tipsy.elementOptions(ele,options));$.data(ele,"tipsy",tipsy);}
return tipsy;};enter=function(){var tipsy;tipsy=get(this);tipsy.hoverState="in";if(options.delayIn===0){return tipsy.show();}else{tipsy.fixTitle();return setTimeout((function(){if(tipsy.hoverState==="in"){return tipsy.show();}}),options.delayIn);}};leave=function(){var tipsy;tipsy=get(this);tipsy.hoverState="out";if(options.delayOut===0){return tipsy.hide();}else{return setTimeout((function(){if(tipsy.hoverState==="out"){return tipsy.hide();}}),options.delayOut);}};if(options===true){return this.data("tipsy");}else if(typeof options==="string"){tipsy=this.data("tipsy");if(tipsy){tipsy[options]();}
return this;}
options=$.extend({},$.fn.tipsy.defaults,options);if(!options.live){this.each(function(){return get(this);});}
if(options.trigger!=="manual"){binder=(options.live?"live":"bind");eventIn=(options.trigger==="hover"?"mouseenter":"focus");eventOut=(options.trigger==="hover"?"mouseleave":"blur");this[binder](eventIn,enter)[binder](eventOut,leave);}
return this;};$.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};$.fn.tipsy.revalidate=function(){return $_(".tipsy").each(function(){var pointee;pointee=$.data(this,"tipsy-pointee");if(!pointee||!isElementInDOM(pointee)){return $(this).remove();}});};$.fn.tipsy.elementOptions=function(ele,options){if($.metadata){return $.extend({},options,$(ele).metadata());}else{return options;}};$.fn.tipsy.autoNS=function(){if($(this).offset().top>($(document).scrollTop()+$(window).height()/2)){return"s";}else{return"n";}};$.fn.tipsy.autoWE=function(){if($(this).offset().left>($(document).scrollLeft()+$(window).width()/2)){return"e";}else{return"w";}};return $.fn.tipsy.autoBounds=function(margin,prefer){return function(){var $this,boundLeft,boundTop,dir;dir={ns:prefer[0],ew:(prefer.length>1?prefer[1]:false)};boundTop=$(document).scrollTop()+margin;boundLeft=$(document).scrollLeft()+margin;$this=$(this);if($this.offset().top<boundTop){dir.ns="n";}
if($this.offset().left<boundLeft){dir.ew="w";}
if($(window).width()+$(document).scrollLeft()-$this.offset().left<margin){dir.ew="e";}
if($(window).height()+$(document).scrollTop()-$this.offset().top<margin){dir.ns="s";}
return dir.ns+(dir.ew?dir.ew:"");};};})(jQuery);;(function($,setTimeout){function noop(){}
function genericCallback(data){lastValue=[data];}
function appendScript(node){head.insertBefore(node,head.firstChild);}
function callIfDefined(method,object,parameters){return method&&method.apply(object.context||object,parameters);}
function qMarkOrAmp(url){return /\?/.test(url)?"&":"?";}
var
STR_ASYNC="async",STR_CHARSET="charset",STR_EMPTY="",STR_ERROR="error",STR_JQUERY_JSONP="_jqjsp",STR_ON="on",STR_ONCLICK=STR_ON+"click",STR_ONERROR=STR_ON+STR_ERROR,STR_ONLOAD=STR_ON+"load",STR_ONREADYSTATECHANGE=STR_ON+"readystatechange",STR_REMOVE_CHILD="removeChild",STR_SCRIPT_TAG="<script/>",STR_SUCCESS="success",STR_TIMEOUT="timeout",browser=$.browser,head=$("head")[0]||document.documentElement,pageCache={},count=0,lastValue,xOptionsDefaults={callback:STR_JQUERY_JSONP,url:location.href};function jsonp(xOptions){xOptions=$.extend({},xOptionsDefaults,xOptions);var completeCallback=xOptions.complete,dataFilter=xOptions.dataFilter,callbackParameter=xOptions.callbackParameter,successCallbackName=xOptions.callback,cacheFlag=xOptions.cache,pageCacheFlag=xOptions.pageCache,charset=xOptions.charset,url=xOptions.url,data=xOptions.data,timeout=xOptions.timeout,pageCached,done=0,cleanUp=noop;xOptions.abort=function(){!done++&&cleanUp();};if(callIfDefined(xOptions.beforeSend,xOptions,[xOptions])===false||done){return xOptions;}
url=url||STR_EMPTY;data=data?((typeof data)=="string"?data:$.param(data,xOptions.traditional)):STR_EMPTY;url+=data?(qMarkOrAmp(url)+data):STR_EMPTY;callbackParameter&&(url+=qMarkOrAmp(url)+encodeURIComponent(callbackParameter)+"=?");!cacheFlag&&!pageCacheFlag&&(url+=qMarkOrAmp(url)+"_"+(new Date()).getTime()+"=");url=url.replace(/=\?(&|$)/,"="+successCallbackName+"$1");function notifySuccess(json){!done++&&setTimeout(function(){cleanUp();pageCacheFlag&&(pageCache[url]={s:[json]});dataFilter&&(json=dataFilter.apply(xOptions,[json]));callIfDefined(xOptions.success,xOptions,[json,STR_SUCCESS]);callIfDefined(completeCallback,xOptions,[xOptions,STR_SUCCESS]);},0);}
function notifyError(type){!done++&&setTimeout(function(){cleanUp();pageCacheFlag&&type!=STR_TIMEOUT&&(pageCache[url]=type);callIfDefined(xOptions.error,xOptions,[xOptions,type]);callIfDefined(completeCallback,xOptions,[xOptions,type]);},0);}
pageCacheFlag&&(pageCached=pageCache[url])?(pageCached.s?notifySuccess(pageCached.s[0]):notifyError(pageCached)):setTimeout(function(script,scriptAfter,timeoutTimer){if(!done){timeoutTimer=timeout>0&&setTimeout(function(){notifyError(STR_TIMEOUT);},timeout);cleanUp=function(){timeoutTimer&&clearTimeout(timeoutTimer);script[STR_ONREADYSTATECHANGE]=script[STR_ONCLICK]=script[STR_ONLOAD]=script[STR_ONERROR]=null;head[STR_REMOVE_CHILD](script);scriptAfter&&head[STR_REMOVE_CHILD](scriptAfter);};window[successCallbackName]=genericCallback;script=$(STR_SCRIPT_TAG)[0];script.id=STR_JQUERY_JSONP+count++;if(charset){script[STR_CHARSET]=charset;}
function callback(result){(script[STR_ONCLICK]||noop)();result=lastValue;lastValue=undefined;result?notifySuccess(result[0]):notifyError(STR_ERROR);}
if(browser.msie){script.event=STR_ONCLICK;script.htmlFor=script.id;script[STR_ONREADYSTATECHANGE]=function(){/loaded|complete/.test(script.readyState)&&callback();};}else{script[STR_ONERROR]=script[STR_ONLOAD]=callback;browser.opera?((scriptAfter=$(STR_SCRIPT_TAG)[0]).text="jQuery('#"+script.id+"')[0]."+STR_ONERROR+"()"):script[STR_ASYNC]=STR_ASYNC;;}
script.src=url;appendScript(script);scriptAfter&&appendScript(scriptAfter);}},0);return xOptions;}
jsonp.setup=function(xOptions){$.extend(xOptionsDefaults,xOptions);};$.jsonp=jsonp;})(jQuery,setTimeout);;var SreHelper;SreHelper=(function(){SreHelper.prototype.spinner=null;SreHelper.prototype.lockSearchString=false;SreHelper.prototype.sumulateOptions={pointerX:0,pointerY:0,button:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,bubbles:true,cancelable:true,randomCount:0};SreHelper.prototype.eventMatchers={HTMLEvents:/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvents:/^(?:click|dblclick|mouse(?:down|up|over|move|out))$/,TouchEvent:/^(?:touch)$/};function SreHelper(name){this.name=name;}
SreHelper.prototype.simulate=function(element,eventName){var eventType,evt,name,oEvent,options;options=SRE.helper.extendSimulate(SRE.helper.sumulateOptions,arguments[2]||{});oEvent=void 0;eventType=null;for(name in SRE.helper.eventMatchers){if(SRE.helper.eventMatchers[name].test(eventName)){eventType=name;break;}}
if(!eventType){throw new SyntaxError("Only HTMLEvents and MouseEvents interfaces are supported");}
if(document.createEvent!=null){oEvent=document.createEvent(eventType);if(eventType==="HTMLEvents"){oEvent.initEvent(eventName,options.bubbles,options.cancelable);}else if(eventType==="TouchEvent"){oEvent.initUIEvent('touchstart',true,true);}else{oEvent.initMouseEvent(eventName,options.bubbles,options.cancelable,document.defaultView,options.button,options.pointerX,options.pointerY,options.pointerX,options.pointerY,options.ctrlKey,options.altKey,options.shiftKey,options.metaKey,options.button,element);}
element.dispatchEvent(oEvent);}else{options.clientX=options.pointerX;options.clientY=options.pointerY;evt=document.createEventObject();oEvent=SRE.helper.extendSimulate(evt,options);element.fireEvent("on"+eventName,oEvent);}
return element;};SreHelper.prototype.extendSimulate=function(destination,source){var property;for(property in source){destination[property]=source[property];}
return destination;};SreHelper.prototype.addStyleSheet=function(url){if(document.createStyleSheet!=null){return document.createStyleSheet(url);}else{return $_("<link/>",{rel:"stylesheet",type:"text/css",href:url}).appendTo("head");}};SreHelper.prototype.returnMoney=function(number,dollarsign){var nStr,rgx,x,x1,x2;if(number==="No Max Price"||number==="No Min Price"){return"";}
if(!is_.number(parseInt(number))){return"";}
nStr=""+Math.round(parseFloat(number)*100)/100;x=nStr.split(".");x1=x[0];x2=(x.length>1?"."+x[1]:"");rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,"$1"+","+"$2");}
if(dollarsign){return"$"+x1+x2;}else{return x1+x2;}};SreHelper.prototype.returnAddress=function(addr){if(addr===""||addr===null){addr="Address not disclosed";}
return addr;};SreHelper.prototype.logLoaderError=function(){if(!SRE.search){return false;}
this.googleTrackEvent("Search Interaction","Error - Infinite Spinner");return this.hideLoader();};SreHelper.prototype.presentLoader=function(){var htmlStr,show_loader,wH,wW,_map_div,_map_height,_map_left,_map_top,_map_width,_offset,_this,_top;_this=this;if($_("#wsllc-loader").css("display")==="block"){return false;}
this.long_loader_error=setTimeout(function(){return _this.logLoaderError();},30000);if(window.location.toString().indexOf("listing/new")===-1&&WMS.options.cma){show_loader=false;}else{show_loader=true;}
if(show_loader){wH=$(window).outerHeight(true);wW=$(window).outerWidth(true);if($_("#wsllc-loader").length===0){htmlStr="<div id =\"wsllc-loader\"></div>";$_("body").append(htmlStr);}
_top=$(window).scrollTop()+($(window).height()/2-60);_map_div=$_("#search_right_col");_offset=_map_div.offset();_map_top=_offset.top;_map_left=_offset.left;_map_height=_map_div.outerHeight(true);_map_width=_map_div.outerWidth(true);$_("#wsllc-loader").css({top:_top,left:wW/2-60});$_("#spinner-bg").css({top:_map_top,left:_map_left,width:_map_width,height:_map_height,"z-index":1999});return $_("#wsllc-loader,#spinner-bg").show();}};SreHelper.prototype.hideLoader=function(){clearTimeout(this.long_loader_error);return $_("#wsllc-loader,#spinner-bg").hide();};SreHelper.prototype.collapseHiddenFormFields=function(){var _cma_continue;_cma_continue=$_("#add_comps");SRE.visual.disablePaginationSize(true);$_("#map-interface-options-container").css("display","block");if(WMS.options.cma){_cma_continue.css("visibility","visible");}
$_(".up_arrow").hide();$_('.down_arrow').show();$_("#hidden_search_fields_container, #hidden_search_fields").css("display","none");$_("#more-options-lnk").html("More");return $_("#mls_num").clearInputReset(true);};SreHelper.prototype.expandHiddenFormFields=function(){var _cma_continue;_cma_continue=$_("#add_comps");if($_("#wsllc-tab-favorites").parent().attr("class")==="active"){SRE.visual.disablePaginationSize(true);}
if(WMS.options.cma){_cma_continue.css("visibility","hidden");}
$_(".down_arrow").hide();$_('.up_arrow').show();$_("#hidden_search_fields_container, #hidden_search_fields").css("display","block");$_("#map-interface-options-container").css("display","none");$_("#more-options-lnk").html("Less");return $_("#mls_num").clearInputReset(true);};SreHelper.prototype.setAlert=function(title,message,type,resetButton,displayLength){var htm;if(type==null){type="info";}
if(resetButton==null){resetButton=false;}
if(displayLength==null){displayLength=50000;}
if(this.current_alert_timeout!==undefined){clearTimeout(this.current_alert_timeout);}
$("#hidden_search_fields").hide();$("#search_left_col").scrollTop(0);htm="<div class=\"wsllc-alert alert alert-"+type+"\">";htm+="<button type=\"button\" class=\"alert-modal-close\" data-dismiss=\"alert\">×</button>";htm+="<strong>"+title+"</strong><br /><br />"+message;if(resetButton){htm+="<div id=\"alert_search_reset\"><div id=\"alert_search_reset_icon\"></div><div id=\"alert_search_reset_text\">Reset Options</div></div>";}
htm+="</div>";$("#alert_container").html(htm);$("body").on("click",function(event){var _target;_target=event.target||event.srcElement;if(_target.id==="btn-map-boundary"){return false;}
$(".wsllc-alert").slideUp("fast");return $(this).off(event);});return this.current_alert_timeout=setTimeout(function(){return $(".wsllc-alert").slideUp("fast");},displayLength);};SreHelper.prototype.isTouch=function(){return window.navigator.msMaxTouchPoints||typeof document.documentElement.ontouchstart!=="undefined";};SreHelper.prototype.hasLocalStorage=function(){var e;try{return"localStorage"in window&&window["localStorage"]!==null;}catch(_error){e=_error;return false;}};SreHelper.prototype.setLocalStorageLastGeo=function(v){var key;if(this.hasLocalStorage()){if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-last-geo";}else{key="last_geo";}
return localStorage.setItem(key,v.replace(/-/g," "));}};SreHelper.prototype.setLocalStorageLastSearched=function(v){var key,key_base;if(this.hasLocalStorage()){if(WMS.options.cma){key_base="cma-"+$_("body").attr("data-cmaid")+"-last-searched";key=SRE.search.searchType!=='drive'?key_base:key_base+"-drive-time";}else{key="last-searched";}
return localStorage.setItem(key,v.replace(/-/g," "));}};SreHelper.prototype.setLocalStorageCustomGeo=function(v){var key;if(this.hasLocalStorage()){if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-custom-geo";}else{key="customGeo";}
localStorage.setItem(key,v);return localStorage.setItem(key+"-timestamp",+new Date());}};SreHelper.prototype.removeLocalStorageCustomGeo=function(){var key;if(this.hasLocalStorage()){if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-custom-geo";}else{key="customGeo";}
return localStorage.removeItem(key);}};SreHelper.prototype.returnLocalStorageSpecial=function(x){var bucket,customGeo,last_geo;if(this.hasLocalStorage()){switch(x){case"last_geo":if(WMS.options.cma){last_geo="cma-"+$_("body").attr("data-cmaid")+"-last-geo";return localStorage[last_geo];}else{return localStorage["last_geo"];}
break;case"customGeo":if(WMS.options.cma){bucket=JSON.parse(localStorage["cma-"+$_("body").attr("data-cmaid")+"-search-params"]);if($.isEmptyObject(bucket.bucket)){customGeo="cma-"+$_("body").attr("data-cmaid")+"-custom-geo";return localStorage[customGeo];}else{localStorage.setItem("cma-"+$_("body").attr("data-cmaid")+"-custom-geo",bucket.bucket.geolayer);return bucket.bucket.geolayer;}}else{return localStorage["customGeo"];}}}};SreHelper.prototype.returnLocalStorageCustomGeoTimeStamp=function(){var key;if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-custom-geo"+"-timestamp";}else{key="customGeo-timestamp";}
return localStorage[key];};SreHelper.prototype.lotSizeDisplay=function(acres,sqft){var a,s;if((acres!=null)&&(sqft!=null)){a=parseFloat(acres.toString().replace(/[^\d\.eE-]/g,""));s=parseFloat(sqft.toString().replace(/[^\d\.eE-]/g,""));if(isNaN(a||isNaN(s))){return"";}else if(a>=0.25){return a+" Acres";}else{return Math.round(s)+" SF";}}else{return"";}};SreHelper.prototype.acresToSqft=function(n){if(n!=null){n=n.toString().replace(/[^\d\.eE-]/g,"");if(n*43560!==0){return n*43560;}}};SreHelper.prototype.sqftToAcres=function(n){if(n!=null){n=n.toString().replace(/[^\d\.eE-]/g,"");if(n/43560!==0){return n/43560;}}};SreHelper.prototype.sqftDisplay=function(number){var nStr,num,rgx;num=number||null;if(isNaN(parseFloat(num))){return"";}
nStr=""+Math.round(parseFloat(num));rgx=/(\d+)(\d{3})/;while(rgx.test(nStr)){nStr=nStr.replace(rgx,"$1"+","+"$2");}
return nStr+" SF";};SreHelper.prototype.roundNumber=function(num,dec){var result;result=Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);return result;};SreHelper.prototype.displayModal=function(show,title,message,confirm,hideFooter){if(show){$_("#wsllc-modal").css({margin:0,top:0,left:0});if(confirm){$_(".wsllc-modal-footer a").css("visibility","visible");}else{$_(".wsllc-modal-footer a").css("visibility","hidden");}
if(hideFooter){$_(".wsllc-modal-footer").hide();}else{$_(".wsllc-modal-footer").show();}
$_("#wsllc-modal").reveal({animation:"none",animationspeed:300,closeonbackgroundclick:true,dismissmodalclass:"close"});$_("#modal_title").html(title);if(message!=null){$_("#modal_body").html(message);}
$_("#wsllc-modal").css({top:($(window).height()/2)-($_("#wsllc-modal").outerHeight(true)/2)-50,left:($(window).width()/2)-250});return $_("#wsllc-modal,.reveal-modal-bg").css({display:"block"});}else{return $_("#wsllc-modal,.reveal-modal-bg").css({display:"none"});}};SreHelper.prototype.toQueryString=function(args){return decodeURIComponent(jQuery.param(args));};SreHelper.prototype.unserialize=function(serializedString){var i,idx,ind,n,obj,p,pairs,str,val;str=decodeURI(serializedString);pairs=str.split("&");obj={};p=void 0;idx=void 0;val=void 0;i=0;n=pairs.length;while(i<n){p=pairs[i].split("=");idx=p[0];if(idx.indexOf("[]")===(idx.length-2)){ind=idx.substring(0,idx.length-2);if(obj[ind]==null){obj[ind]=[];}
obj[ind].push(p[1]);}else{obj[idx]=p[1];}
i++;}
return obj;};SreHelper.prototype.objToQueryString=function(obj){var p,str;str=[];for(p in obj){if(obj.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(obj[p]));}}
return str.join("&");};SreHelper.prototype.setSearchString=function(str){var key,_obj,_search_string;if(SRE.search.searchType==="mls"){return false;}
_obj=this;if(!SRE.draw){SRE.draw={};}
if(!this.lockSearchString){this.lockSearchString=true;if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-search-params";}else{key="search-string";}
_search_string=localStorage[key];localStorage.setItem(key,str);if(!SRE.draw.draw){localStorage.setItem(key+"-timestamp",+new Date());}
localStorage.setItem("previous-"+key,_search_string);return setTimeout(function(){return _obj.lockSearchString=false;},1000);}};SreHelper.prototype.returnSearchString=function(){var key;if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-search-params";}else{key="search-string";}
return localStorage[key];};SreHelper.prototype.returnPreviousSearchString=function(){var key;if(WMS.options.cma){key="previous-cma-"+$_("body").attr("data-cmaid")+"-search-params";}else{key="previous-search-string";}
return localStorage[key];};SreHelper.prototype.returnLocalStorageSearchStringTimeStamp=function(){var key;if(WMS.options.cma){key="cma-"+$_("body").attr("data-cmaid")+"-search-params"+"-timestamp";}else{key="search-string-timestamp";}
return localStorage[key];};SreHelper.prototype.setHashFromLocalStorage=function(){if(window.location.hash===""){if(!WMS.options.cma){return window.location.hash=SRE.helper.returnSearchString();}}};SreHelper.prototype.triggerLocationBarEnter=function(){var e;e=jq.Event("keypress");e.which=13;e.keyCode=13;return $_("#location_search_field").trigger(e);};SreHelper.prototype.disableEventPropagation=function(event){if(event.stopPropagation!=null){return event.stopPropagation();}else{if(window.event!=null){return window.event.cancelBubble=true;}}};SreHelper.prototype.parseSearchString=function(ss){var _argument_obj,_ss;if(!ss){return{};}
_ss=ss;_ss=_ss.replace(/#!\//g,"");if(_ss.substring(_ss.length-1,_ss.length)==="/"){_ss=_ss.replace(/(\s+)?.$/,"");}
_ss=_ss.replace(/\//g,",");_ss=_ss.split(",");_argument_obj={};$.each(_ss,function(index,key){var _tmp_key,_tmp_value;if(index>1){_tmp_key=key.replace(/:/g,",").split(",")[0];_tmp_value=key.replace(/:/g,",").split(",")[1];return _argument_obj[_tmp_key]=_tmp_value;}});return _argument_obj;};SreHelper.prototype.setFormComboBoxes=function(){var sqft_top;$_(".mcb_outer_container").remove();$("input[name=pricemin], input[name=pricemax]").moxiComboBox({destroy:true});if($("input#ptyp_ren").is(":checked")){$_("input[name=pricemin]").moxiComboBox({livequery:true,prelabel:"No Min",postlabel:"No Min",integer:{start:500,end:5000,prepend:"$"}});$_("input[name=pricemax]").moxiComboBox({livequery:true,prelabel:"No Max",postlabel:"No Max",integer:{start:500,end:5000,prepend:"$"}});}else{$_("input[name=pricemin]").moxiComboBox({livequery:true,prelabel:"No Min",postlabel:"No Min",integer:{start:10000,end:10000000,prepend:"$"}});$_("input[name=pricemax]").moxiComboBox({livequery:true,prelabel:"No Max",postlabel:"No Max",integer:{start:10000,end:10000000,prepend:"$"}});}
$_("input[name=bed_min]").moxiComboBox({livequery:true,prelabel:"No Min",postlabel:"No Min",integer:{start:1,end:7,append:"+ Beds"}});$_("input[name=bath_min]").moxiComboBox({livequery:true,prelabel:"No Min",postlabel:"No Min",data:wsllc_ls_bathmin});if($("input[name=ls_conversion]:checked").val()==="sqft"){$_("input[name=lotsize_min], input[name=lotsize_max]").moxiComboBox({livequery:true,prelabel:"No Max",postlabel:"No Max",data:wsllc_ls_sqft});}else{$_("input[name=lotsize_min], input[name=lotsize_max]").moxiComboBox({livequery:true,prelabel:"No Max",postlabel:"No Max",data:wsllc_ls_acres});}
sqft_top=WMS.options.cma?28:58;$_("input[name=sqft_min], input[name=sqft_max]").moxiComboBox({livequery:true,prelabel:"No Max",postlabel:"No Max",containercss:{top:sqft_top},integer:{start:100,end:10000,append:" SF"}});return false;};SreHelper.prototype.socialShare=function(service,url,addr){if(service==="facebook"){return window.open("http://www.facebook.com/sharer.php?u="+url,"NewFBWin","width=580,height=410,left=10,top=10,resizable=yes,scrollbars=yes");}else{if(service==="twitter"){return window.open("http://twitter.com/share?text=Windermere - Listing Detail - "+addr+"&url="+url,"TwitterWin","width=580,height=410,left=10,top=10,resizable=yes");}}};SreHelper.prototype.facebookShare=function(url,clickedObj,title,image){var summary;title="Windermere | Listing Detail | "+title;summary=$(clickedObj).children("div").html();return window.open("http://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(url)+"&p[title]="+encodeURIComponent(title)+"&p[images][0]="+encodeURIComponent(image)+"&p[summary]="+encodeURIComponent(summary),"NewFBWin","width=580,height=410,left=10,top=10,resizable=yes,scrollbars=yes");};SreHelper.prototype.shareByListingId=function(id,service){var base_qs,uuid,_ths,_this=this;_ths=this;uuid=SRE.auth.uuid!=null?SRE.auth.uuid:"";base_qs=(!WMS.options.cma?"":"/"+$_("body").attr("data-agenttoken")+"/cma");return $.ajax({url:WMS.listing_service+base_qs+'/'+id+"?user_uuid="+uuid+"&company_uuid="+$_("body").attr("data-companytoken"),async:false,success:function(res){var image,summary,title,url,_addr,_listing,_meta_found;_listing=res.data.result_list[0];url=$_("body").attr("data-sitebase")+'/listing/'+id;if(service==="twitter"){_addr=_listing.location.address+" "+_listing.location.city+", "+_listing.location.state;return _ths.openShareWindow("http://twitter.com/share?text=Windermere - Listing Detail - "+_addr+"&url="+url);}else if(service==="google+"){return _ths.openShareWindow('https://plus.google.com/share?url='+url);}else if(service==="facebook"){image=_listing.images[0].full_url+"&h=300&bg=353940";title="Windermere | Listing Detail | "+_listing.title;summary=_listing.sqr_footage+"sqft, "+_listing.bedrooms+"bd, "+_listing.bathrooms+"bth, MLS#"+_listing.mlsnumber+", "+_listing.comments;_meta_found=false;$.each($_("meta"),function(i,o){if($(o).attr("property")==="og:image"){return _meta_found=true;}});if(!_meta_found){$_("head").append('<meta property="og:image" content="'+image+'"/>');}
if(_meta_found){$_("meta[property='og:image']").attr("content",image);}
return _ths.openShareWindow("http://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(url)+"&p[title]="+encodeURIComponent(title)+"&p[images][0]="+encodeURIComponent(image)+"&p[summary]="+encodeURIComponent(summary));}}});};SreHelper.prototype.openShareWindow=function(uri){return window.open(uri,"SearchPopUpWindow","width=580,height=410,left=10,top=10,resizable=yes");};SreHelper.prototype.googleTrackEvent=function(arg1,arg2,arg3){var tracking_array,_arg1,_arg2,_arg3;tracking_array=[arg1,arg2,arg3];log("Google Analytics Tracking",tracking_array);if(typeof _gaq!=="undefined"){_arg1=arg1||"";_arg2=arg2||"";_arg3=arg3||"";return _gaq.push(['_trackEvent',_arg1,_arg2,_arg3]);}};SreHelper.prototype.toBoolean=function(str){str=str||"";str=$.trim(str.toString().toLowerCase());switch(str){case"true":return true;case"yes":return true;case"1":return true;case"false":return false;case"no":return false;case"0":return false;case"":return false;case null:return false;default:return Boolean(str);}};SreHelper.prototype.isMLSPattern=function(str){var digitLength,regEx,strLength;regEx=new RegExp("^[a-z0-9-_]+$");str=str||"";str=str.toLowerCase();strLength=str.length;digitLength=str.replace(/[^0-9]/g,"").length;if(regEx.test(str)){if(strLength===digitLength&&digitLength===5){return false;}else if(digitLength>=4&&strLength>=5){return true;}else{return false;}}else{return false;}};SreHelper.prototype.preLoadImages=function(files,cb){var i,img,_count,_counter,_interval;_count=files.length;_counter=0;i=0;while(i<files.length){img=new Image();img.src=files[i];$(img).load(function(){return _counter++;});i++;}
return _interval=setInterval(function(){if(_count===_counter){clearInterval(_interval);return cb();}},50);};SreHelper.prototype.arrayRemove=function(array,str){array.splice($.inArray(str,array),1);return array;};SreHelper.prototype.dateToUTC=function(thisDate){var myDate,stringDate;myDate=void 0;if(thisDate!=null){myDate=thisDate;}else{myDate=new Date();}
stringDate="";stringDate+=thisDate.getYear()+"-";stringDate+=thisDate.getMonth()+1+"-";stringDate+=thisDate.getDate();stringDate+="T"+thisDate.getHours()+":";stringDate+=thisDate.getMinutes()+":";stringDate+=thisDate.getSeconds()+"Z";return stringDate;};SreHelper.prototype.returnDecimalFromString=function(str){if(str===""){return"";}
return parseFloat(str.match(/\d+([\/.]\d+)?/)[0]);};SreHelper.prototype.checkObjectLength=function(obj){var key,size;size=0;key=void 0;for(key in obj){if(obj.hasOwnProperty(key)){size++;}}
return size;};SreHelper.prototype.isMobileBrowser=function(str){var check;check=false;(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))){return check=true;}})(str);return check;};SreHelper.prototype.isMobile=function(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)){return true;}else{return false;}};SreHelper.prototype.trimLocationSearchField=function(){var val;val=$_("#location_search_field").val();if(val[0]===" "){val=val.substring(1);}
if(val[val.length-1]===" "){val=val.slice(0,-1);}
return $_("#location_search_field").val(val);};SreHelper.prototype.hashToObject=function(hash){var index,key,obj,tmp_key,tmp_value;obj={};hash=hash.replace(/#!\//g,"");if(hash.substring(hash.length-1,hash.length)==="/"){hash=hash.replace(/(\s+)?.$/,"");}
hash=hash.split("/");index=0;while(index<hash.length){key=hash[index];tmp_key=key.replace(/:/g,"^").split("^")[0];tmp_value=key.replace(/:/g,"^").split("^")[1];obj[tmp_key]=tmp_value;index++;}
return obj;};SreHelper.prototype.objToHash=function(obj){var i,ss;ss="#!/";for(i in obj){ss+=i+":"+obj[i]+"/";}
return ss;};SreHelper.prototype.scrubLocalStorageSearchString=function(){var ss;if(localStorage["search-string"]==null){return false;}
ss=localStorage["search-string"];ss=this.hashToObject(ss);ss.pagination_index=0;ss=this.objToHash(ss);return localStorage.setItem("search-string",ss);};SreHelper.prototype.exportMethod=function(name,method){if(typeof window.SRE==="undefined"||window.SRE===null||typeof window.SRE!=="object"){window.SRE={};}
return window.SRE[name]=method;};SreHelper.prototype.logObject=function(obj){var member,_results;_results=[];for(member in obj){if(typeof obj[member]!=="function"){_results.push(console.log(member+": "+obj[member]));}else{_results.push(void 0);}}
return _results;};SreHelper.prototype.colorLuminance=function(hex,lum){var c,i,rgb;hex=String(hex.toLowerCase()).replace(/[^0-9a-f]/g,"");if(hex.length<6){hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];}
lum=lum||0;rgb="#";c=void 0;i=void 0;i=0;while(i<3){c=parseInt(hex.substr(i*2,2),16);c=Math.round(Math.min(Math.max(0,c+(c*lum)),255)).toString(16);rgb+=("00"+c).substr(c.length);i++;}
return rgb;};SreHelper.prototype.getObjectLength=function(obj){var count,key;count=0;for(key in obj){count++;}
return count;};SreHelper.prototype.queryStringToObject=function(qs){var pairs,result;pairs=qs.slice(1).split("&");result={};pairs.forEach(function(pair){pair=pair.split("=");result[pair[0]]=decodeURIComponent(pair[1]||"");});return JSON.parse(JSON.stringify(result));};SreHelper.prototype.encodeURI=function(str){return encodeURIComponent(decodeURIComponent(str));};SreHelper.prototype.decodeURI=function(str){return decodeURIComponent(str);};SreHelper.prototype.debugMobile=function(str){if($_('#mobile-debug').length===0){$_('body').append('<div id="mobile-debug"></div>');}
return $_("#mobile-debug").append(str+"<br />");};SreHelper.prototype.isAgentSite=function(){var agent_site;return agent_site=$_("body").attr("data-agenttoken")!==undefined&&$_("body").attr("data-agenttoken")!==""?true:false;};SreHelper.prototype.showDriveTimeInfoModal=function(){var _this_message,_this_title;$_("#modal_body").empty();$_("#wsllc-modal").off("show");_this_title="Learn more about searching for homes by Drive Time:";_this_message="Home buyers have a new way to search for homes – by drive time! Customize the search criteria with your work address,      time of day that you commute, and maximum amount of time you want to spend driving to and from work;      the results will show you only homes for sale within your preferred drive time."+"<br><br>"+"Search by Drive Time uses INRIX&reg;      Drive Time technology which collects and analyzes real-time data from a community of      100 million drivers, as well as traffic congestion, road construction, accidents, events, police activity, and historical traffic patterns."+"<br><br>"+"INRIX&reg;      provides the most accurate traffic information available, but there are times when drive times may be inaccurate. Drive times do not include      ferry waits or travel times, or other transportation methods.";SRE.helper.displayModal(true,_this_title,_this_message,false,true);return SRE.helper.googleTrackEvent('Search Form Interaction','Click What is Drive time','');};return SreHelper;})();;var SreHttp;SreHttp=(function(){function SreHttp(name){this.queue=new $.ajQueue();this.name=name;}
SreHttp.prototype.post=function(options){var _ths;_ths=this;if(options.queue==null){options.queue=true;}
options.timeout=options.timeout||30000;if(options.queue){return this.queue.add({url:options.url,method:"POST",data:options.data,timeout:options.timeout,success:function(res){if(!options.mute){log(options.name,[options.url],[res]);}
if(typeof options.success==="function"){return options.success(res);}},error:function(x,y,z){log("ERROR",options,x,y,z);return _ths.displayError(options.url);}});}};SreHttp.prototype.ajax=function(options){var _ths;_ths=this;options.dataType=options.dataType||"jsonp";if(options.queue==null){options.queue=true;}
options.timeout=options.timeout||30000;if(options.queue){return this.queue.add({url:options.url,dataType:options.dataType,timeout:options.timeout,success:function(res){if(!options.mute){log(options.name,[options.url],[res]);}
if(typeof options.success==="function"){return options.success(res);}},error:function(x,y,z){return _ths.displayError(options.url);}});}else{return $.ajax({url:options.url,dataType:options.dataType,timeout:options.timeout,success:function(res){if(!options.mute){log(options.name,options.url,res);}
if(typeof options.success==="function"){return options.success(res);}},error:function(x,y,z){return _ths.displayError(options.url);}});}};SreHttp.prototype.displayError=function(url){SRE.helper.hideLoader();SRE.helper.setAlert("Error","It looks as though there was an error with your request. Please try again.","error");return SRE.helper.googleTrackEvent('So So Sad Search Query','Gateway Timeout',url);};SreHttp.prototype.addStyleSheet=function(url){if(document.createStyleSheet!=null){return document.createStyleSheet(url);}else{return $("<link/>",{rel:"stylesheet",type:"text/css",href:url}).appendTo("head");}};return SreHttp;})();;(function($){$.ajQueue=function(){this.reqs=[];return this.requesting=false;};return $.ajQueue.prototype={add:function(req){this.reqs.push(req);return this.next();},next:function(){var complete,req,self;if(this.reqs.length===0){return;}
if(this.requesting===true){return;}
req=this.reqs.splice(0,1)[0];complete=req.complete;self=this;if(req._run){req._run(req);}
req.complete=function(){if(complete){complete.apply(this,arguments);}
self.requesting=false;return self.next();};this.requesting=true;return $.ajax(req);}};})(jq);jq.ajaxTransport('+*',function(options){var queuedOptions;if(options.queue){queuedOptions=$.extend({},options);queuedOptions.queue=false;queuedOptions.processData=false;return{send:function(headers,complete){return push(options.queue,queuedOptions).done(function(data,textStatus,jqXHR){return complete(jqXHR.status,jqXHR.statusText,{text:jqXHR.responseText},jqXHR.getAllResponseHeaders());}).fail(function(jqXHR,textStatus,errorThrown){return complete(jqXHR.status,jqXHR.statusText,{text:jqXHR.responseText},jqXHR.getAllResponseHeaders());});},abort:function(){return remove(options.queue,queuedOptions);}};}});;var SreServices;SreServices=(function(){function SreServices(name){this.name=name;}
SreServices.prototype.init=function(callback){var base,clbk,_body;clbk=callback;_body=$_("body");if(typeof _body.attr("data-servicebase")!=="undefined"&&_body.attr("data-servicebase")!==""&&typeof _body.attr("data-serviceversion")!=="undefined"&&_body.attr("data-serviceversion")!==""){base=_body.attr("data-servicebase")+"/service/";WMS.listing_service=base+_body.attr("data-serviceversion")+"/listing";WMS.profile_service=base+_body.attr("data-serviceversion")+"/profile";WMS.message_service=base+_body.attr("data-serviceversion")+"/message";if((_body.attr("data-authbase")!=null)&&(_body.attr("data-authversion")!=null)){WMS.auth_service=_body.attr("data-authbase")+"/service/"+_body.attr("data-authversion")+"/auth";}else{WMS.auth_service=_body.attr("data-servicebase")+"/service/"+_body.attr("data-serviceversion")+"/auth";}}else{_body.html("We're sorry but the listing service wasn't defined.");return false;}
if(typeof clbk==="function"){return clbk.call(this);}};return SreServices;})();;var SreAuth;window.web_user_social_registration=function(){if(WMS.options.loggedInUser){var data=new Object()
data.uuid=WMS.options.loggedInUser.uuid;data.email=WMS.options.loggedInUser.email;data.firstname=WMS.options.loggedInUser.first_name;data.lastname=WMS.options.loggedInUser.last_name;var response=new Object()
response.data=data;BOAT.onRegisterCallbacks.forEach(function(callback){callback(response);});BOAT.onLoginCallbacks.forEach(function(callback){callback(response);});}};SreAuth=(function(){function SreAuth(name){this.name=name;}
SreAuth.prototype.init=function(callback){var display_name,this_callback,_this=this;_this=this;$("#wms-iframe-loader").addClass("hideiflloader");this_callback=callback;display_name=Branding.result_list.myaccount_name;let agent_uuid=jQuery('body').attr('data-companytoken')==="1234567"&&jQuery('body').attr('data-sitetype')==="Brokerage Website"?'':jQuery('body').attr('data-agenttoken');SRE.auth.ifl=new window.Iframelogin({agent_uuid:agent_uuid,company_uuid:jQuery('body').attr('data-companytoken'),source:"agent website",source_display_name:jQuery('body').attr('data-sitetype'),cas_url:WMS.auth_service,company_name:display_name,replace_bullet_text:Branding.result_list.bullet_list,login_url:$("body").attr("data-sitebase-lang"),locale:WMS.options.locale,on_closed:function(response){$("#wms-iframelogin-container").css("display","none");return SRE.auth.checkCurrentUser(function(res){if(!res.success){if(jq("#loginDiv, .login-register").length>0){return attachLogin();}}});},on_login:function(response){if(response.success){var user_uuid=response.data.uuid;if(response.data.company_uuid&&response.data.company_uuid==1234567){wwwHelper.trackEvent('Header','Login',user_uuid);wwwHelper.trackGA4('login');}
_this.setUserData(response);_this.exportToWmsObject(SRE.auth);$("input[name=user_uuid]").val(user_uuid);$("body").attr("data-clienttoken",user_uuid);BOAT.onLoginCallbacks.forEach(function(callback){callback(response);});_this.setAssociatedAgent();if(jq("#loginDiv, .login-register").length>0){attachLogin();}
if(WMS.redirect!=null){_this.redirectLogin();return false;}}},on_register:function(response){if(response.success){BOAT.onRegisterCallbacks.forEach(function(callback){callback(response);});}},on_update:function(response){if(response.success){_this.setUserData(response);_this.exportToWmsObject(SRE.auth);if(jq("#loginDiv, .login-register").length>0){attachLogin();}
BOAT.onWebuserUpdateCallbacks.forEach(function(callback){callback(response);});}},on_logout:function(response){$("body").removeAttr("data-clienttoken");$("input[name=user_uuid]").val("");_this.first_name=null;_this.last_name=null;_this.email=null;_this.permissions=null;_this.username=null;_this.uuid=null;WMS.options.loggedInUser=null;return SRE.helper.simulate(document.getElementById('wsllc-tab-search'),"click");}});SRE.auth.checkCurrentUser(function(response){var user_id_interval;if(response.success){_this.setUserData(response);_this.exportToWmsObject(SRE.auth);_this.setAssociatedAgent();return user_id_interval=setInterval(function(){if($("input[name=user_uuid]").length>0){clearInterval(user_id_interval);if($("#loginDiv, .login-register").length>0){attachLogin();}
$("input[name=user_uuid]").val(response.data.uuid);return $("body").attr("data-clienttoken",response.data.uuid);}},100);}});if(typeof this_callback==="function"){return this_callback.call(this);}};SreAuth.prototype.setUserData=function(response){this.first_name=response.data.firstname;this.last_name=response.data.lastname;this.email=response.data.email;this.permissions=response.data.permissions;this.metauser_type_id=response.data.metauser_type_id,this.username=response.data.username;this.web_user_jwt=response.data.web_user_jwt;return this.uuid=response.data.uuid;};SreAuth.prototype.exportToWmsObject=function(obj){return WMS.options.loggedInUser={first_name:obj.first_name,last_name:obj.last_name,email:obj.email,permissions:obj.permissions,metauser_type_id:obj.metauser_type_id,username:obj.username,uuid:obj.uuid};};SreAuth.prototype.checkProfile=function(callback){var _this;_this=this;return $.ajax({url:WMS.profile_service+"/login/"+SRE.auth.uuid,dataType:"jsonp",success:function(res){if(res.status!=="success"){return SRE.helper.setAlert("Log In Error","There was an error with your login. Please log out and try logging in again. Thank you.","error");}else{if(typeof callback==="function"){return callback();}}}});};SreAuth.prototype.logOut=function(reset){if(reset==null){reset=false;}
this.associatedagent=null;if((SRE.map!=null)&&(SRE.map.pin_collection!=null)){SRE.map.pin_collection.associated_agent={};}
return this.ifl.open("logout_path");};SreAuth.prototype.redirectLogin=function(){eval(WMS.redirect);return WMS.redirect=null;};SreAuth.prototype.checkCurrentUser=function(callback){var _ths=this;callback=callback||function(){};if(_ths.ifl===undefined){return _ths.init(function(){return _ths.ifl.current_user(function(data){return callback(data);});});}else{return _ths.ifl.current_user(function(data){return callback(data);});}};SreAuth.prototype.setAssociatedAgent=function(){var _this=this;return SRE.http.ajax({url:WMS.profile_service+"/"+SRE.auth.uuid+"/associatedagent",name:"Set Associated Agent",queue:false,success:function(res){var agent;if(res.status==="success"){agent=res.data.result_list[0].user_info[0];_this.associatedagent={name:agent.display_name,email:agent.email,phone:agent.mainphone,cellphone:agent.cellphone,alt_phone:agent.alt_phone,office:agent.office,url:agent.url,accredidations:agent.accredidations,title:agent.title,user_id:agent.user_id,image:agent.image};WMS.options.loggedInUser.associatedAgent=_this.associatedagent;$.event.trigger({type:"associatedAgentSet"});if((SRE.map!=null)&&(SRE.map.pin_collection!=null)){return SRE.map.pin_collection.associated_agent=_this.associatedagent;}}}});};return SreAuth;})();;var SreFavorites;SreFavorites=(function(){function SreFavorites(name){this.name=name;}
SreFavorites.prototype.setFavoriteIcon=function(favorite_id,clicked_obj){setTimeout(function(){return SRE.favorites.lastSavedFavorite=null;},2000);$(clicked_obj).attr("data-favoriteid",favorite_id);$(clicked_obj).removeAttr("onclick").unbind("click").bind("click",function(){SRE.helper.googleTrackEvent('Search Interaction','Favorite | Remove | Generic',favorite_id+'');return SRE.favorites.removeFavorite(favorite_id,this);});$(clicked_obj).removeClass("make-favorite").addClass("is-favorite");$(clicked_obj).attr("original-title","Remove Favorite");$(clicked_obj).attr("aria-checked","true");if(jq("#wsllc-tab-favorites").parent().attr("class")==="active"){return SRE.favorites.getFavorites();}};SreFavorites.prototype.removeFavoriteIcon=function(favorite_id,clicked_obj){var i,o;$(clicked_obj).removeAttr("onclick").unbind("click").bind("click",function(){SRE.helper.googleTrackEvent('Search Interaction','Favorite | Make | Generic',$(clicked_obj).attr("data-listingid"));return SRE.favorites.addFavorite($(clicked_obj).attr("data-listingid"),this);});i=0;while(i<$_(".is-favorite").length){o=$_(".is-favorite")[i];if(parseInt($(o).attr("data-listingid"))===parseInt($(clicked_obj).attr("data-listingid"))){$(o).removeClass("is-favorite").addClass("make-favorite");$(o).removeAttr("onclick").unbind("click").bind("click",function(){SRE.helper.googleTrackEvent('Search Interaction','Favorite | Make | Generic',$(this).attr("data-listingid"));return SRE.favorites.addFavorite($(this).attr("data-listingid"),this);});$(o).attr("original-title","Add Favorite");$(o).attr("aria-checked","false");}
i++;}
$(clicked_obj).removeClass("is-favorite").addClass("make-favorite");$(clicked_obj).attr("aria-checked","false");return $(clicked_obj).attr("original-title","Add Favorite");};SreFavorites.prototype.setFavoriteIconByExternalResource=function(options){var i,o,_from,_tipsy,_to;if((options.listing_id!=null)&&(options.favorite_id!=null)){_from="make-favorite";_to="is-favorite";_tipsy="Remove";}else if(options.listing_id!=null){_from="is-favorite";_to="make-favorite";_tipsy="Add";}
i=0;while(i<$_("."+_from).length){o=$_("."+_from)[i];if(parseInt($(o).attr("data-listingid"))===parseInt(options.listing_id)){$(o).removeClass(_from).addClass(_to);if(_from==="make-favorite"){$(o).attr("data-favoriteid",options.favorite_id);}
if(_from==="is-favorite"){$(o).removeAttr("data-favoriteid");}
$(o).removeAttr("onclick").unbind("click").bind("click",function(){if(_from==="make-favorite"){SRE.favorites.removeFavorite($(this).attr("data-favoriteid"),this);}
if(_from==="is-favorite"){return SRE.favorites.addFavorite($(this).attr("data-listingid"),this);}});$(o).attr("original-title",_tipsy+" Favorite");}
i++;}
if(SRE.search.searchType==="favorites"){return SRE.favorites.getFavorites();}};SreFavorites.prototype.addFavorite=function(listing_id,clickedObj){SRE.helper.presentLoader();if(clickedObj==="bypass"){clickedObj=WMS.clickedFav;WMS.clickedFav=null;}
return SRE.auth.checkCurrentUser(function(data){if(data.success){return SRE.http.ajax({url:WMS.profile_service+"/"+SRE.auth.uuid+"/favorites/new?favorite_listingid="+listing_id,name:"Add Favorite",success:function(response){SRE.favorites.setFavoriteIcon(response.data.result_list[0].favoriteid,clickedObj);SRE.favorites.lastSavedFavorite=response.data.result_list[0].favoriteid;return SRE.helper.hideLoader();}});}else{SRE.helper.hideLoader();WMS.clickedFav=clickedObj;WMS.redirect="SRE.favorites.addFavorite("+listing_id+",'bypass')";$_("#wms-iframelogin-container").css("display","block");return SRE.auth.ifl.open();}});};SreFavorites.prototype.removeFavorite=function(favorite_id,clickedObj){SRE.helper.presentLoader();return SRE.http.ajax({url:WMS.profile_service+"/"+SRE.auth.uuid+"/favorites/"+favorite_id+"/delete",name:"Remove Favorite",success:function(response){SRE.helper.hideLoader();SRE.favorites.removeFavoriteIcon(favorite_id,clickedObj);if(jq("#wsllc-tab-favorites").parent().attr("class")==="active"){SRE.map.removeEntities();SRE.favorites.getFavorites();return $_(".tipsy").remove();}}});};SreFavorites.prototype.getFavorites=function(){var _ths;_ths=this;SRE.helper.presentLoader();return SRE.auth.checkCurrentUser(function(data){if(data.success){return Q.fcall(function(){var mioc;mioc=$_("#map-interface-options-container");if(mioc.css("display")==="none"){mioc.css({display:"block"});}
SRE.draw.drawOff(true);return SRE.search.setPaginationIndex(0);}).then(function(){SRE.helper.hideLoader();SRE.search.setSearchType("favorites");$_("#wsllc-listing-detail").fadeOut("fast");$_("#wsllc-picklist-container").empty();return SRE.map.removeEntities();}).then(function(){return SRE.http.ajax({url:WMS.profile_service+'/'+SRE.auth.uuid+'/favorites'+'?pgsize=500',name:'Get Favorites'});}).then(function(res){if(res.status==='fail'){SRE.helper.setAlert("Favorites Message","You currently don't have any saved favorites. Go back to search and click on any heart icon to save a listing as a favorite.","info");SRE.map.removeEntities();return $_("#wsllc-count-holder").css({"display":"none"});}else{SRE.search.setCount(res);SRE.favorites.print(res);SRE.visual.enableBoundaryButton(false);SRE.visual.enableDrawButton(false);SRE.visual.setSavedSearchNamingContainer("none");SRE.visual.disableBufferMiles(true);window.SEARCH_LISTINGID_ARRAY=[];$.each(res.data.result_list,function(i,o){if(o.listing!==undefined){return window.SEARCH_LISTINGID_ARRAY.push(o.listing.listingid);}});google.maps.event.addListener(SRE.map.map,"idle",function(){return SRE.map.pin_collection.print();});if(SRE.search.context==="tiles"){$_("#wsllc-tiles").empty();return SRE.listing.appendTileView();}}}).delay(500).done(function(){google.maps.event.addListener(SRE.map.map,"idle",function(){if(SRE.map.pin_collection!==undefined){SRE.map.pin_collection.removeMapMarkers(true);SRE.map.pin_collection.setProjection();return SRE.map.pin_collection.print();}});return _ths.setCommentClickEvent();});}else{SRE.search.setSearchType("favorites");SRE.helper.hideLoader();WMS.redirect='SRE.favorites.getFavorites()';$_('#wms-iframelogin-container').css('display','block');return SRE.auth.ifl.open();}});};SreFavorites.prototype.print=function(response){var agent_comment_array,list_view_obj,off_market_agent_comment_array,off_market_listing_array,off_market_user_comment_array,tmp_listing_array,user_comment_array;$_("#wsllc-picklist-container").empty();SRE.map.removeMapBindings();if(typeof response.data!=="undefined"){tmp_listing_array=[];user_comment_array=[];agent_comment_array=[];off_market_user_comment_array=[];off_market_agent_comment_array=[];off_market_listing_array=[];jq.each(response.data.result_list,function(i,o){if(o.listing.location==null){o.listing.location={address:"Off Market Listing",city:"",county:"",latitude:null,longitude:null,state:"",zip:""};}
if(typeof o.listing.image[0]==="undefined"){o.listing.image=[o.listing.image];}
o.list_price="Off Market";if(o.listing.location.address!=="Off Market Listing"){tmp_listing_array.push(o.listing);user_comment_array.push(o.user_comments.replace(/</g,"[").replace(/>/g,"]").replace(/\[br \/\]/g,'<br />').replace(/\n/g,"<br />"));return agent_comment_array.push(o.agent_comments.replace(/</g,"[").replace(/>/g,"]").replace(/\[br \/\]/g,'<br />').replace(/\n/g,"<br />"));}else{off_market_listing_array.push(o.listing);off_market_user_comment_array.push(o.user_comments.replace(/</g,"[").replace(/>/g,"]").replace(/\[br \/\]/g,'<br />').replace(/\n/g,"<br />"));return off_market_agent_comment_array.push(o.agent_comments.replace(/</g,"[").replace(/>/g,"]").replace(/\[br \/\]/g,'<br />').replace(/\n/g,"<br />"));}});tmp_listing_array=tmp_listing_array.concat(off_market_listing_array);user_comment_array=user_comment_array.concat(off_market_user_comment_array);agent_comment_array=agent_comment_array.concat(off_market_agent_comment_array);if(tmp_listing_array.length===0){$_("#wsllc-picklist-container").empty();$_("#wsllc-picklist-container").fadeIn();SRE.helper.setAlert("Alert!","You don't have any saved favorites! Go back to search and click the 'heart' on any listing to begin.","error");return false;}
list_view_obj={data:{number_available:tmp_listing_array.length,number_found:response.data.number_available,number_returned:tmp_listing_array.length,result_list:tmp_listing_array,user_comment_array:user_comment_array,agent_comment_array:agent_comment_array}};SRE.favorites.number_returned=response.data.number_returned;SRE.search.response=list_view_obj;return setTimeout(function(){SRE.map.setMapPins(list_view_obj);SRE.listing.buildPickList(list_view_obj,true);if(SRE.map.pin_collection!==undefined){SRE.map.pin_collection.setMapViewBasedOnCollection();}
if(SRE.search.searchType==="favorites"&&SRE.search.context==="list"){return $_("#wms_form_ss").hide();}},500);}};SreFavorites.prototype.setCommentClickEvent=function(){SRE.layout.brandSearchButton();$_(".favorite-notes").off("click");$_(".favorite-notes").on("click",function(){if($(this).next().css("display")==="none"){if(SRE.search.context==="tiles"){$_("#wsllc-tiles").css("height",$_("#wsllc-tiles").outerHeight()+300);}
$(this).next().css("display","block");if(SRE.search.searchType==="favorites"&&SRE.search.context==="tiles"){return $_("#wsllc-tiles").masonry('reload');}}else{$(this).next().css("display","none");if(SRE.search.searchType==="favorites"&&SRE.search.context==="tiles"){return $_("#wsllc-tiles").masonry('reload');}}});return $.each($_(".btn-add-note"),function(i,o){var thsId;thsId=$(this).attr("data-favoriteid");$(this).off("click");return $(this).on("click",function(){var thsComment;if($_("#list-view-layer").css("display")==="block"){thsComment=$_('#list-view-layer .note-'+thsId).val();}else{thsComment=$_('.note-'+thsId).val();}
SRE.favorites.addComment(thsId,thsComment);return SRE.helper.googleTrackEvent('Search Interaction','Favorite | Add Comment | From Favorites List',thsId+'');});});};SreFavorites.prototype.addComment=function(favorite_id,comment){comment=comment.replace(/</g,"[").replace(/>/g,"]");return SRE.http.ajax({url:WMS.profile_service+"/"+SRE.auth.uuid+"/favorites/"+favorite_id+"?fav_user_comment="+encodeURIComponent(comment.replace(/\n\r?/g,"<br />")),name:"Add Listing Comment",success:function(res){return SRE.favorites.getFavorites();}});};return SreFavorites;})();
;var Toast=function(){"use strict";function e(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(){function n(){e(this,n)}var r,a,o;return r=n,(a=[{key:"createContainer",value:function(e){var t=this,n=document.createElement("div");if(n.id="vp-toast-container",e.centered){var r=document.createElement("div");return r.className="vp-toast-wrapper",n.className="centered",r.appendChild(n),r.addEventListener("click",function(){this.parentNode&&this.parentNode.removeChild(this),t.checkCenteredContainer()}),r}return n}},{key:"createToast",value:function(e){var t=this,n=document.createElement("div"),r=document.createElement("div"),a=document.createElement("i"),o=document.createElement("div"),c=document.createElement("div"),i=document.createElement("p");return a.className="v-icon-check-circle","info"===e.type?a.className="v-icon-info-circle info":"error"===e.type&&(a.className="v-icon-info-circle error"),o.className="vp-toast-message",c.className="font-bold mb-5",n.className="vp-toast show",c.innerHTML=e.header||"",i.innerHTML=e.message||"",r.appendChild(a),e.header&&o.appendChild(c),o.appendChild(i),n.appendChild(r),n.appendChild(o),n.addEventListener("click",function(){this.parentNode.removeChild(this),t.checkContainer()}),e.removeIn&&!isNaN(e.removeIn)&&(t.elemTimeout=setTimeout(function(){n.parentNode&&n.parentNode.removeChild(n),t.checkCenteredContainer()},e.removeIn)),n}},{key:"initContainer",value:function(e){null===document.querySelector("#vp-toast-container")&&document.body.appendChild(this.createContainer(e))}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"success",header:null,message:null,removeIn:null};this.initContainer(e),document.querySelector("#vp-toast-container").appendChild(this.createToast(e)),document.querySelector("#vp-toast-container").style.display="block"}},{key:"checkContainer",value:function(){if(!document.querySelectorAll(".vp-toast").length){var e=document.querySelector("#vp-toast-container");e.parentNode.removeChild(e)}this.checkCenteredContainer()}},{key:"checkCenteredContainer",value:function(){if(document.querySelectorAll(".vp-toast-wrapper").length){var e=document.querySelector(".vp-toast-wrapper");e.parentNode.removeChild(e)}this.elemTimeout&&clearTimeout(this.elemTimeout)}}])&&t(r.prototype,a),o&&t(r,o),n}()}();