m.benefitsedge.com Open in urlscan Pro
216.145.105.7  Public Scan

Submitted URL: http://m.benefitsedge.com/js/mobile-js.js
Effective URL: https://m.benefitsedge.com/js/mobile-js.js
Submission: On February 12 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

//Get Address from Google
var infowindow = new google.maps.InfoWindow({ 
    size: new google.maps.Size(150,50)
});
function codeAddress(id,address) {

    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map, 
            position: results[0].geometry.location,			
			title:address

        });
		google.maps.event.addListener(map, 'click', function() {
			infowindow.close();
        });
		google.maps.event.addListener(marker, 'click', function() {
			infowindow.setContent('<a href="http://maps.google.com/maps?q='+address+'&hl=en&t=m&z=13" target="_blank">'+address+'</a>'); 
			infowindow.open(map,marker);
        });
      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
    });
  }
function validateEmail(a){
		//testing regular expression
		var filter = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
		//if it's valid email
		if(filter.test(a)){
			//input.removeClass("error");
			return true;
		}
		//if it's NOT valid
		else{
			//input.addClass("error");
			return false;
		}
	}

	$(document).bind('pageinit' , function() {
 
		$('.widget-type-accordion').die();
		$('.widget-type-accordion').live('click',function() {	
			$('.widget-type-accordion').removeClass('on');			  
		 	$('.widget-type-accordionContent').slideUp('normal');	   
			if($(this).next().is(':hidden') == true) {				
				$(this).addClass('on');				  
				$(this).next().slideDown(200, function() {
				    $('html, body').animate({
				    scrollTop: $(this).offset().top - ($(window).height() / 2)
				    }, 200);
				});
			 }		  
		 });

		$('.widget-type-advAccordion').die();
		$('.widget-type-advAccordion').live('click',function() {	
			$('.widget-type-advAccordion').removeClass('on');			  
		 	$('.widget-type-advAccordionContent').slideUp('normal');
			$('.advAccOpen').hide();
			$('.advAccClose').show();
			if($(this).next().is(':hidden') == true) {
				$(this).children('.widget-content').children('.advAccOpen').show();
				$(this).children('.widget-content').children('.advAccClose').hide();
				$(this).addClass('on');
				parentUI = $(this);				  
				$(this).nextAll().each( function(){
					if (!$(this).hasClass("widget-type-advAccordionContent")) {
						return false;
					}
					else
					{
						$(this).slideDown(200, function() {
					    $('html, body').animate({
					    scrollTop: $(this).offset().top - ($(window).height() / 2)
					    }, 200);
					    });
					}
				});
			 }		  
		 });		 
 
	$(".frm-bldr").submit(function(e){
		var fail = false;
		$(".required").each(function(e){

			var parentId = $(this).attr("id");
			var childId = parentId.substr(4,100);
			
			if( $(this).hasClass('input_text') )
			{
				if( !$("#" + childId).val() )
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}
				else
				{
					$("#" + parentId).css("background-color", "inherit");					
				}
			}

			if( $(this).hasClass('input_eml') )
			{
				if( !$("#" + childId).val() )
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}
				else
				{
					if(validateEmail($("#" + childId).val()))
					{
						$("#" + parentId).css("background-color", "inherit");
					}
					else
					{
						$("#" + parentId).css("background-color", "#FAC8C8");
						fail = true;
					}
					
				}
			}			

			if( $(this).hasClass('textarea') )
			{
				
				if( ! $("#" + childId).val() )
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}
				else
				{
					$("#" + parentId).css("background-color", "inherit");
				}				 
			}

			if( $(this).hasClass('checkbox') )
			{
				if ( $('input:checked').length > 0)
				{
					$("#" + parentId).css("background-color", "inherit");
				}
				else
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}				

			}

			if( $(this).hasClass('select') )
			{

				if($("#" + childId + " option:selected").text() == 'Selection Required')
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}
				else
				{
					$("#" + parentId).css("background-color", "inherit");
				}
			}

			if( $(this).hasClass('radio') )
			{
				if (!$("input[name='" + childId + "']:checked").val())
				{
					$("#" + parentId).css("background-color", "#FAC8C8");
					fail = true;
				}
				else
				{
					$("#" + parentId).css("background-color", "inherit");
				}

			}			
			
		});
		
		if(fail)
		{
			if($('#error_msg').length > 0)
			{
				$("#error_msg").remove();
			}
			$('<p id="error_msg"><span style="color:RED;">Higlighted fileds are required.</span></p>').insertBefore('.btn-submit');
			return false;
		}
		else
		{
			return true;
		}
	}); 
}); 
/* ImageMapster
   Version: 1.2.6.xxx (development)

Copyright 2011-2012 James Treworgy
http://www.outsharked.com/imagemapster
https://github.com/jamietre/ImageMapster

A jQuery plugin to enhance image maps.

Versions 1.2.4.067+ include "when.js": http://github.com/cujos/when in the
distribution build.

*/
/*

/// LICENSE (MIT License)
///
/// Permission is hereby granted, free of charge, to any person obtaining
/// a copy of this software and associated documentation files (the
/// "Software"), to deal in the Software without restriction, including
/// without limitation the rights to use, copy, modify, merge, publish,
/// distribute, sublicense, and/or sell copies of the Software, and to
/// permit persons to whom the Software is furnished to do so, subject to
/// the following conditions:
///
/// The above copyright notice and this permission notice shall be
/// included in all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
/// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
/// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
/// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
/// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
/// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
/// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
///
/// January 19, 2011

*/
/** @license MIT License (c) copyright B Cavalier & J Hann */
/**
* when
* A lightweight CommonJS Promises/A and when() implementation
*
* when is part of the cujo.js family of libraries (http://cujojs.com/)
*
* Licensed under the MIT License at:
* http://www.opensource.org/licenses/mit-license.php
*
* @version 1.2.0
*/
/*lint-ignore-start*/
(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.6.007",render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:null,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,windowLoaded:!1,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){e.style.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.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 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={},removeMap,addMap;return 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--},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.addSelection(s);break;case!1:t.removeSelection(!0);break;default:t.toggleSelection(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=document.namespaces&&document.namespaces.g_vml_?!1:$("<canvas></canvas>")[0].getContext?!0:!1,m.isTouch="ontouchstart"in document.documentElement;if(!m.hasCanvas&&!document.namespaces){$.fn.mapster=function(){return this};return}u.isBool($.mapster.defaults.highlight)||(m.render_defaults.highlight=!m.isTouch),$.extend(m.defaults,m.render_defaults,m.shared_defaults),$.extend(m.area_defaults,m.render_defaults,m.shared_defaults),u.isBool(e)&&(m.hasCanvas=e),$.browser.msie&&!m.hasCanvas&&!document.namespaces.v&&(document.namespaces.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")}))},me.test=function(obj){return eval(obj)},me}(),$.mapster.impl.init()}(jQuery),function(e){function i(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}var t,n=e.mapster,r=n.utils;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,s,o){var a=this,f,l,c,h=this.map_data,p=t.effectiveRenderOptions(s);o&&e.extend(p,o),s==="select"?(l="static_"+t.areaId.toString(),c=h.base_canvas):c=h.overlay_canvas,a.begin(c,l),p.includeKeys&&(f=r.split(p.includeKeys),e.each(f,function(e,t){var n=h.getDataForKey(t.toString());i(a,n,n.effectiveRenderOptions(s))})),i(a,t,p),a.render(),p.fade&&r.fader(n.hasCanvas?c:e(c).find("._fill").not(".mapster_mask"),0,n.hasCanvas?1:p.fillOpacity,p.fadeDuration)}},n.hasCanvas?(t.hex_to_decimal=function(e){return Math.max(0,Math.min(parseInt(e,16),255))},t.css3color=function(e,t){return"rgba("+this.hex_to_decimal(e.substr(0,2))+","+this.hex_to_decimal(e.substr(2,2))+","+this.hex_to_decimal(e.substr(4,2))+","+t+")"},t.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)}},t.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)},t.render=function(){var t,n,r=this,i=r.map_data,s=r.masks.length,o=r.createCanvasFor(i),u=o.getContext("2d"),a=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=r.css3color(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=r.css3color(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),a.drawImage(t,0,0)):a.drawImage(o,0,0),r.active=!1,r.canvas},t.createCanvasFor=function(t){return e('<canvas width="'+t.scaleInfo.width+'" height="'+t.scaleInfo.height+'"></canvas>')[0]},t.clearHighlight=function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},t.removeSelections=function(){},t.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()}):(r.setOpacity=function(t,n){e(t).each(function(t,r){typeof r.opacity!="undefined"?r.opacity=n:e(r).css("opacity",n)})},t.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},t.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},t.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]},t.clearHighlight=function(){e(this.map_data.overlay_canvas).children().remove()},t.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()},t.refreshSelections=function(){return null})}(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 i(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 s(e,t){e.options=r.updateProps({},n.defaults,t)}function o(e){return[e,e.render_highlight,e.render_select]}function u(t){var i=t.options,s=t.images;e.mapster.hasCanvas&&(e.each(i.altImages||{},function(e,t){s.add(t,e)}),e.each([i].concat(i.areas),function(t,n){e.each(o(n),function(e,t){t&&t.altImage&&(t.altImageId=s.add(t.altImage))})})),t.area_options=r.updateProps({},n.area_defaults,i)}var t,n=e.mapster,r=n.utils;n.MapData=function(t,o){function a(e,t,n){function r(e){u.currentAreaId!==e&&u.highlightId>=0&&n()}u.activeAreaEvent&&(window.clearTimeout(u.activeAreaEvent),u.activeAreaEvent=0);if(e<0)return;t.owner.currentAction||e?u.activeAreaEvent=window.setTimeout(function(){return function(){a(0,t,n)}}(t),e||100):r(t.areaId)}var u=this;u.image=t,u.imgCssText=t.style.cssText||null,u.images=new n.MapImages(u),i(u),s(u,o),this.mousedown=function(t){e.mapster.hasCanvas||this.blur(),t.preventDefault()},this.mouseover=function(t){var n=u.getAllDataForArea(this),r=n.length?n[0]:null;if(!r||r.isNotRendered()||r.owner.currentAction)return;if(u.currentAreaId===r.areaId)return;u.highlightId!==r.areaId&&(u.clearEffects(),r.highlight(),u.options.showToolTip&&e.each(n,function(e,t){t.effectiveOptions().toolTip&&t.showTooltip()})),u.currentAreaId=r.areaId,e.isFunction(u.options.onMouseover)&&u.options.onMouseover.call(this,{e:t,options:r.effectiveOptions(),key:r.key,selected:r.isSelected()})},this.mouseout=function(t){var n,r=u.getDataForArea(this),i=u.options;if(u.currentAreaId<0||!r)return;n=u.getDataForArea(t.relatedTarget);if(n===r)return;u.currentAreaId=-1,r.area=null,a(i.mouseoutDelay,r,u.clearEffects),e.isFunction(i.onMouseout)&&i.onMouseout.call(this,{e:t,options:i,key:r.key,selected:r.isSelected()})},this.clearEffects=function(){var t=u.options;u.ensureNoHighlight(),t.toolTipClose&&e.inArray("area-mouseout",t.toolTipClose)>=0&&u.activeToolTip&&u.clearTooltip()},this.click=function(t){function v(p){var g;f=p.isSelectable()&&(p.isDeselectable()||!p.isSelected()),f?a=!p.isSelected():a=p.isSelected(),o=n.getBoundList(d,p.key);if(e.isFunction(d.onClick)){l=d.onClick.call(h,{e:t,listTarget:o,key:p.key,selected:a});if(r.isBool(l)){if(!l)return!1;c=e(p.area).attr("href");if(c!=="#")return window.location.href=c,!1}}f&&(i=p.toggleSelection()),d.boundList&&d.boundList.length>0&&n.setBoundListProperties(d,o,p.isSelected()),g=p.effectiveOptions(),g.includeKeys&&(s=r.split(g.includeKeys),e.each(s,function(e,t){var n=u.getDataForKey(t.toString());n.options.isMask||v(n)}))}var i,s,o,a,f,l,c,h=this,p=u.getDataForArea(this),d=u.options;u.mousedown.call(this,t);if(d.clickNavigate&&p.href){window.location.href=p.href;return}p&&!p.owner.currentAction&&(d=u.options,v(p))},this.graphics=new n.Graphics(this)},t=n.MapData.prototype,t.configureOptions=function(e){s(this,e)},t.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)),u(e),e.images.bind()},t.isActive=function(){return!this.complete||this.currentAction},t.state=function(){return{complete:this.complete,resizing:this.currentAction==="resizing",zoomed:this.zoomed,zoomedArea:this.zoomedArea,scaleInfo:this.scaleInfo}},t.wrapId=function(){return"mapster_wrap_"+this.index},t._idFromKey=function(e){return typeof e=="string"&&this._xref.hasOwnProperty(e)?this._xref[e]:-1},t.getSelected=function(){var t="";return e.each(this.data,function(e,n){n.isSelected()&&(t+=(t?",":"")+this.key)}),t},t.getAllDataForArea=function(t,n){var i,s,o,u=this,a=e(t).filter("area").attr(u.options.mapKey);if(a){o=[],a=r.split(a);for(i=0;i<(n||a.length);i++)s=u.data[u._idFromKey(a[i])],s.area=t.length?t[0]:t,o.push(s)}return o},t.getDataForArea=function(e){var t=this.getAllDataForArea(e,1);return t?t[0]||null:null},t.getDataForKey=function(e){return this.data[this._idFromKey(e)]},t.getKeysForGroup=function(e){var t=this.getDataForKey(e);return t?t.isPrimary?t.key:this.getPrimaryKeysForMapAreas(t.areas()).join(","):""},t.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},t.getData=function(e){return typeof e=="string"?this.getDataForKey(e):e&&e.mapster||r.isElement(e)?this.getDataForArea(e):null},t.ensureNoHighlight=function(){var e;this.highlightId>=0&&(this.graphics.clearHighlight(),e=this.data[this.highlightId],e.changeState("highlight",!1),this.setHighlightId(-1))},t.setHighlightId=function(e){this.highlightId=e},t.clearSelections=function(){e.each(this.data,function(e,t){t.selected&&t.removeSelection(!0)}),this.removeSelectionFinish()},t.setAreaOptions=function(e){var t,n,i;e=e||[];for(t=e.length-1;t>=0;t--)n=e[t],n&&(i=this.getDataForKey(n.key),i&&(r.updateProps(i.options,n),r.isBool(n.selected)&&(i.selected=n.selected)))},t.drawSelections=function(e){var t,n=r.asArray(e);for(t=n.length-1;t>=0;t--)this.data[n[t]].drawSelection()},t.redrawSelections=function(){e.each(this.data,function(e,t){t.isSelectedOrStatic()&&t.drawSelection()})},t.initialize=function(){var t,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=r.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),t=e(v.images[1]).addClass("mapster_el "+v.images[0].className).attr({id:null,usemap:null}),l=r.size(v.images[0]),l.complete&&t.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(n.canvas_style)),r.setOpacity(v.images[0],0),e(v.images[1]).show(),r.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)},t.buildDataset=function(t){function E(e,t){var r=new n.AreaData(y,e,t);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=[],t||(y.mapAreas=[]),w=!b.mapKey,w&&(b.mapKey="data-mapster-key"),r=e.browser.msie&&e.browser.version<=7?"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),t?(l=y.mapAreas[u.data("mapster")-1],l.configure(f)):(l=new n.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("mouseover.mapster",y.mouseover).bind("mouseout.mapster",y.mouseout).bind("click.mapster",y.click).bind("mousedown.mapster",y.mousedown),u.data("mapster",p+1)}y.setAreaOptions(b.areas),y.redrawSelections()},t.processCommandQueue=function(){var e,t=this;while(!t.currentAction&&t.commands.length)e=t.commands[0],t.commands.splice(0,1),n.impl[e.command].apply(e.that,e.args)},t.clearEvents=function(){e(this.map).find("area").unbind(".mapster"),e(this.images).unbind(".mapster")},t._clearCanvases=function(t){t||e(this.base_canvas).remove(),e(this.overlay_canvas).remove()},t.clearMapData=function(t){var n=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()),n.images.clear(),this.image=null,r.ifFunction(this.clearTooltip,this)},t.removeSelectionFinish=function(){var e=this.graphics;e.refreshSelections(),e.clearHighlight()}}(jQuery),function(e){var t,n=e.mapster,r=n.utils;n.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=n.AreaData.prototype,t.areas=function(){var e,t=[];for(e=0;e<this.areasXref.length;e++)t.push(this.owner.mapAreas[this.areasXref[e]]);return t},t.coords=function(t){var n=[];return e.each(this.areas(),function(e,r){n=n.concat(r.coords(t))}),n},t.reset=function(){e.each(this.areas(),function(e,t){t.reset()}),this.areasXref=[],this.options=null},t.isSelectedOrStatic=function(){var e=this.effectiveOptions();return r.isBool(e.staticState)?e.staticState:this.isSelected()},t.isSelected=function(){return r.isBool(this.selected)?this.selected:r.isBool(this.owner.area_options.selected)?this.owner.area_options.selected:!1},t.isSelectable=function(){return r.isBool(this.effectiveOptions().staticState)?!1:r.isBool(this.owner.options.staticState)?!1:r.boolOrDefault(this.effectiveOptions().isSelectable,!0)},t.isDeselectable=function(){return r.isBool(this.effectiveOptions().staticState
)?!1:r.isBool(this.owner.options.staticState)?!1:r.boolOrDefault(this.effectiveOptions().isDeselectable,!0)},t.isNotRendered=function(){var t=e(this.area);return t.attr("nohref")||!t.attr("href")||this.effectiveOptions().isMask},t.effectiveOptions=function(e){var t=r.updateProps({},this.owner.area_options,this.options,e||{},{id:this.areaId});return t.selected=this.isSelected(),t},t.effectiveRenderOptions=function(t,n){var i,s=this.optsCache;if(!s||t==="highlight")i=this.effectiveOptions(n),s=r.updateProps({},i,i["render_"+t]),t!=="highlight"&&(this.optsCache=s);return e.extend({},s)},t.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})},t.highlight=function(e){var t=this.owner;this.effectiveOptions().highlight&&t.graphics.addShapeGroup(this,"highlight",e),t.setHighlightId(this.areaId),this.changeState("highlight",!0)},t.drawSelection=function(){this.owner.graphics.addShapeGroup(this,"select")},t.addSelection=function(t){var n=this.owner;n.options.singleSelect&&n.clearSelections(),this.isSelected()||(t&&(this.optsCache=e.extend(this.effectiveRenderOptions("select"),t,{altImageId:n.images.add(t.altImage)})),this.drawSelection(),this.selected=!0,this.changeState("select",!0)),n.options.singleSelect&&n.graphics.refreshSelections()},t.removeSelection=function(e){this.selected=!1,this.changeState("select",!1),this.optsCache=null,this.owner.graphics.removeSelections(this.areaId),e||this.owner.removeSelectionFinish()},t.toggleSelection=function(e){return this.isSelected()?this.removeSelection():this.addSelection(e),this.isSelected()},n.MapArea=function(t,n,i){if(!t)return;var s=this;s.owner=t,s.area=n,s.areaDataXref=[],s.originalCoords=[],e.each(r.split(n.coords),function(e,t){s.originalCoords.push(parseFloat(t))}),s.length=s.originalCoords.length,s.shape=n.shape.toLowerCase(),s.nohref=n.nohref||!n.href,s.configure(i)},n.MapArea.prototype.configure=function(e){this.keys=r.split(e)},n.MapArea.prototype.reset=function(){this.area=null},n.MapArea.prototype.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){var s,o,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x=[];for(y=0;y<n.length;y++){S=n[y],b=t.split(S.coords,parseInt);switch(S.shape){case"circle":v=b[0],m=b[1],w=b[2],x=[];for(y=0;y<360;y+=20)E=y*Math.PI/180,x.push(v+w*Math.cos(E),m+w*Math.sin(E));break;case"rect":x.push(b[0],b[1],b[2],b[1],b[2],b[3],b[0],b[3]);break;default:x=x.concat(b)}}o=a=c=p=999999,f=l=h=d=-1;for(y=x.length-2;y>=0;y-=2)v=parseInt(x[y],10),m=parseInt(x[y+1],10),v<o&&(o=v,d=m),v>f&&(f=v,p=m),m<a&&(a=m,h=v),m>l&&(l=m,c=v);return r&&i&&(s=!1,e.each([[h-r,a-i],[c,a-i],[o-r,d-i],[o-r,p],[f,d-i],[f,p],[h-r,l],[c,l]],function(e,t){if(!s&&t[0]>0&&t[1]>0)return g=t,s=!0,!1}),s||(g=[f,l])),{tl:[o,a],br:[f,l],tt:g}}}(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(t,r,i,s){function y(t,n,r){e.mapster.hasCanvas?(t.width=n,t.height=r):(e(t).width(n),e(t).height(r))}function b(){g.currentAction="",e.isFunction(d.callback)&&d.callback(),g.processCommandQueue()}function w(){y(g.overlay_canvas,c,h);if(d.highlight&&f>=0){var e=g.data[f];e.tempOptions={fade:!1},g.getDataForKey(e.key).highlight(),e.tempOptions=null}y(g.base_canvas,c,h),g.redrawSelections(),b()}function E(){e(g.image).css(v),g.scaleInfo=n.getScaleInfo({width:c,height:h},{width:g.scaleInfo.realWidth,height:g.scaleInfo.realHeight}),e.each(g.data,function(t,n){e.each(n.areas(),function(e,t){t.resize()})})}var o,a,f,l,c,h,p,d={callback:s||i},v,m,g=this;typeof t=="object"?d=t:(d.width=t,d.height=r,d.duration=i||0),c=d.width,h=d.height,p=d.duration;if(g.scaleInfo.width===c&&g.scaleInfo.height===h)return;f=g.highlightId,c||(l=h/g.scaleInfo.realHeight,c=Math.round(g.scaleInfo.realWidth*l)),h||(l=c/g.scaleInfo.realWidth,h=Math.round(g.scaleInfo.realHeight*l)),v={width:String(c)+"px",height:String(h)+"px"},e.mapster.hasCanvas||e(g.base_canvas).children().remove(),m=e(g.wrapper).find(".mapster_el").add(g.wrapper),p?(a=[],g.currentAction="resizing",m.each(function(t,r){o=n.defer(),a.push(o),e(r).animate(v,{duration:p,complete:o.resolve,easing:"linear"})}),o=n.defer(),a.push(o),n.when.all(a).then(w),E(),o.resolve()):(m.css(v),E(),w())},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){if(!e&&!n)return!1;var i=(new t.Method(this,function(){this.resize(e,n,r)},null,{name:"resize",args:arguments})).go();return i},t.impl.zoom=function(n,r){function s(t){var n,r,s,o,u,a,f,l,c,h,p,d,v,m,g,y=i.padding||0,b=t?20:0,w=this,E=!1;if(t)w.zoomed||(w.zoomed=!0,w.preZoomWidth=w.scaleInfo.width,w.preZoomHeight=w.scaleInfo.height,w.zoomedArea=t,i.scroll&&w.wrapper.css({overflow:"auto"})),r=e.mapster.utils.areaCorners(t.coords(1,0)),o=w.wrapper.innerWidth()-b-y*2,s=w.wrapper.innerHeight()-b-y*2,a=r.maxX-r.minX,f=r.maxY-r.minY,l=o/a,c=s/f,u=Math.min(l,c),h=(o-a*u)/2,p=(s-f*u)/2,d=w.scaleInfo.realWidth*u,v=w.scaleInfo.realHeight*u,m=r.minX*u-y-h,g=r.minY*u-y-p;else{if(!w.zoomed)return;E=!0,d=w.preZoomWidth,v=w.preZoomHeight,m=null,g=null}this.resize({width:d,height:v,duration:i.duration,scroll:n,scrollLeft:m,scrollTop:g,callback:function(){var e=E,n=i.scroll,r=t;return function(){e?(w.preZoomWidth=null,w.preZoomHeight=null,w.zoomed=!1,w.zoomedArea=!1,n&&w.wrapper.css({overflow:"inherit"})):w.zoomedArea=r}}()})}var i=r||{};return(new t.Method(this,function(e){s.call(this)},function(){s.call(this.owner,this)},{name:"zoom",args:arguments,first:!0,key:n})).go()}}(jQuery),function(e){var t=e.mapster,n=t.utils;e.extend(t.defaults,{toolTipContainer:'<div style="border: 2px solid black; background: #EEEEEE; position:absolute; 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;"></div>',showToolTip:!1,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout"],onShowToolTip:null,onCreateTooltip:null}),e.extend(t.area_defaults,{toolTip:null}),t.MapData.prototype.clearTooltip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=-1),e.each(this._tooltip_events,function(e,t){t.object.unbind(t.event)})},t.MapData.prototype.bindTooltipClose=function(t,n,r,i){var s=n+".mapster-tooltip",o=this;e.inArray(t,this.options.toolTipClose)>=0&&(r.unbind(s).bind(s,function(e){(!i||i.call(this,e))&&o.clearTooltip()}),this._tooltip_events.push({object:r,event:s,callback:i}))},t.AreaData.prototype.showTooltip=function(){var t,r,i,s,o,a,f=this.effectiveOptions(),l=this.owner,c=l.options,h=l.options.toolTipContainer;l.cancelClear=!0;if(l.activeToolTipID===this.areaId)return;typeof h=="string"?a=e(h):a=e(h).clone(),r=a.html(f.toolTip).hide(),l.clearTooltip(),e("body").append(r),l.activeToolTip=r,l.activeToolTipID=this.areaId,n.setOpacity(r[0],0),r.show(),o=this.area?[this.area]:e.map(this.areas(),function(e){return e.area}),s=n.areaCorners(o,r.outerWidth(!0),r.outerHeight(!0)),t=e(l.image).offset(),i={left:t.left+s.tt[0]+"px",top:t.top+s.tt[1]+"px"};if(parseInt(r.css("z-index"),10)===0||r.css("z-index")==="auto")i["z-index"]=9999;r.css(i).addClass("mapster_tooltip"),l.bindTooltipClose("area-click","click",e(l.map)),l.bindTooltipClose("tooltip-click","click",r),l.bindTooltipClose("image-mouseout","mouseout",e(l.image),function(e){return e.relatedTarget.nodeName!=="AREA"&&e.relatedTarget!==this}),l.options.toolTipFade?n.fader(r[0],0,1,f.fadeDuration):n.setOpacity(r[0],1),n.ifFunction(c.onShowToolTip,this.area||null,{toolTip:r,areaOptions:f,key:this.key,selected:this.isSelected()})},t.impl.tooltip=function(e){return(new t.Method(this,function(){this.clearTooltip()},function(){this.effectiveOptions().toolTip&&this.showTooltip()},{name:"tooltip",args:arguments,key:e})).go()}}(jQuery);

//Thumbnails
(function($){var DEBUG=false;var version="1.1";$.fn.nailthumb=function(options){var opts=$.extend({},$.fn.nailthumb.defaults,options);return this.each(function(){var $this=$(this);var o=$.metadata?$.extend({},opts,$this.metadata()):opts;thumbize($this,o);});};function thumbize(element,options){var image=setImage(element,options);var container=setContainer(element,options);if(options.serverSideParams){$.fn.nailthumb.setServerSideParams(image,container,options);}debugObject("image",image);debugObject("container",container);if(options.onStart){options.onStart(container,options);}if(options.loadingClass){container.addClass(options.loadingClass);}if(options.preload||image.data("nailthumb.replaceto")){debug("wait on load");image.one("load",function(){debugObject("before check",image);if(!image.data("nailthumb.working")&&!image.data("nailthumb.replacing")){image.data("nailthumb.working",true);debugObject("inside check",image);doThumb(image,container,options);}});var src=image.attr("src");image.attr("src",null).attr("src",src);}else{debug("nail thumb directly");image.data("nailthumb.working",true);doThumb(image,container,options);}}function doThumb(image,container,options){resetImage(image,options);resetContainer(container,options);var imageDims=getImageDims(image,options);debugObject("image",image);debugObject("imageDims",imageDims);if(imageDims.width==0||imageDims.height==0){imageDims=getHiddenCloneDims(image);debugObject("imageCloneDims",imageDims);}var containerDims=getContainerDims(container,options);debugObject("container",container);debugObject("containerDims",containerDims);var prop=getProportion(containerDims,imageDims,options);debug("proportions",prop);resize(image,imageDims,container,containerDims,prop,options);}function setImage(element,options){var image=element.find("img").first();var finder=options.imageCustomFinder;if(!finder&&options.imageUrl){finder=imageUrlFinder;}else{if(!finder&&options.imageFromWrappingLink){finder=imageFromWrappingLinkFinder;}}if(finder){var img=finder(element,options);debugObject("finder",img);if(!img){img=[];}if(img.length>0){image=img;image.css("display","none");if(!image.data("nailthumb.replaceto")){image.data("nailthumb.replaceto",element);}image.data("nailthumb.originalImageDims",null);}}if(image.length==0){if(element.is("img")){image=element;}}return image;}function imageUrlFinder(element,options){var image=$("<img />").attr("src",options.imageUrl).css("display","none").data("nailthumb.replaceto",element);element.append(image);return image;}function imageFromWrappingLinkFinder(element,options){var image;var link=element.find("a").first();if(link.length==0&&element.is("a")){link=element;}if(link.attr("href")){image=$("<img />").attr("src",link.attr("href")).css("display","none").data("nailthumb.replaceto",link);if(link.attr("title")){image.attr("title",link.attr("title"));}link.append(image);}return image;}function resetImage(image,options){if(!options.nostyle){image.css({"position":"relative"});}if(!image.data("nailthumb.originalImageDims")){image.css({"width":"auto","height":"auto","top":0,"left":0}).removeAttr("width").removeAttr("height");}}function setContainer(element,options){var container=element;if(element.is("img")){if(options.ifImageAddContainer){var c=$("<div></div>");element.wrap(c);}container=element.parent();}return container;}function resetContainer(container,options){if(options.containerClass){container.addClass(options.containerClass);}if(!options.nostyle){container.css({"overflow":"hidden","padding":"0px"});}if(options.replaceAnimation=="animate"){if(options.width||options.height){container.animate({"width":options.width,"height":options.height},options.animationTime,options.animation);}}else{if(options.width){container.width(options.width);}if(options.height){container.height(options.height);}}container.find("span."+options.titleClass).remove();}function resize(image,imageDims,container,containerDims,prop,options){var iw=imageDims.width*prop;var ih=imageDims.height*prop;var top=0,left=0,diff;var direction=getDirections(options.fitDirection);if(ih<containerDims.innerHeight){switch(direction.v){case"center":top=-(ih-containerDims.innerHeight)/2;break;case"bottom":top=-(ih-containerDims.innerHeight);diff="bottom";break;case"top":top=0;diff="top";break;default:break;}}else{if(ih>containerDims.innerHeight){switch(direction.v){case"center":top=-(ih-containerDims.innerHeight)/2;break;case"bottom":top=-(ih-containerDims.innerHeight);break;default:break;}}}if(iw<containerDims.innerWidth){switch(direction.h){case"center":left=-(iw-containerDims.innerWidth)/2;break;case"right":left=-(iw-containerDims.innerWidth);break;default:break;}}else{if(iw>containerDims.innerWidth){switch(direction.h){case"center":left=-(iw-containerDims.innerWidth)/2;break;case"right":left=-(iw-containerDims.innerWidth);break;default:break;}}}image.addClass(options.imageClass);if(image.data("nailthumb.replaceto")){replaceImage(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}else{showImage(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}}function replaceImage(image,imageDims,container,containerDims,ih,iw,left,top,diff,options){var element=image.data("nailthumb.replaceto");var replaceto=findReplaceTo(element,options);image.data("nailthumb.replacing",true);image.load(function(){image.data("nailthumb.replacing",null);});if(replaceto){replaceto.replaceWith(image);}else{element.append(image);}if(options.afterReplace){options.afterReplace(container,image,options);}showImage(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}function showImage(image,imageDims,container,containerDims,ih,iw,left,top,diff,options){if(options.replaceAnimation=="animate"){image.css("display","inline");container.animate({"width":containerDims.innerWidth,"height":containerDims.innerHeight},options.animationTime,options.animation);image.animate({"width":iw,"height":ih,"top":top,"left":left},options.animationTime,options.animation,function(){afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);});}else{container.css({"width":containerDims.innerWidth,"height":containerDims.innerHeight});if(options.replaceAnimation){image.css("display","none");}image.css({"width":iw,"height":ih,"top":top,"left":left});if(options.replaceAnimation=="fade"){image.fadeIn(options.animationTime,options.animation,function(){afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);});}else{if(options.replaceAnimation=="slide"){image.slideDown(options.animationTime,options.animation,function(){afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);});}else{if(options.replaceAnimation&&options.replaceAnimation instanceof Function){options.replaceAnimation(image,function(){afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);},options);if(!options.selfStartAfterAppear){afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}}else{image.css("display","inline");afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}}}}}function afterAppear(image,imageDims,container,containerDims,ih,iw,left,top,diff,options){if(options.afterAppear){options.afterAppear(container,image,options);}image.data("nailthumb.replaceto",null);decorate(image,imageDims,container,containerDims,ih,iw,left,top,diff,options);}function findReplaceTo(element,options){var rep=null;element.find("img").each(function(){if(!rep&&!$(this).data("nailthumb.replaceto")){rep=$(this);}});return rep;}function decorate(image,imageDims,container,containerDims,ih,iw,left,top,diff,options){if(options.title||(options.titleAttr&&image.attr(options.titleAttr))){var title=options.title?options.title:image.attr(options.titleAttr);if(title){var span=$('<span class="'+options.titleClass+'">'+title+"</span>");if(containerDims.innerHeight>ih){span.css("top",containerDims.innerHeight-ih);}else{span.css("top","0px");}container.append(span);
var tit=getHiddenDims(span);var im=getHiddenDims(image);debugObject("decorate containerDims",containerDims);debugObject("decorate imageDims",imageDims);debugObject("decorate imageDims",im);debugObject("decorate tit",tit);var outbound=containerDims.offsetTop+containerDims.innerHeight-tit.offsetTop;if(containerDims.height>containerDims.innerHeight){outbound+=(containerDims.height-containerDims.innerHeight)/2;}span.css("top","+="+outbound);if(iw<tit.width){span.css("width",iw);}if(left>0){span.css("left",left);}var delta=tit.height;if(containerDims.innerHeight>ih&&diff!="bottom"){delta+=(containerDims.innerHeight-ih)/((diff=="top")?1:2);}var clone=span.clone();clone.css("width","auto").css("display","none").css("position","absolute");container.append(clone);var cloneDims=getHiddenDims(clone);clone.remove();debugObject("decorate cloneDims",cloneDims);if(options.titleWhen=="hover"){container.unbind("mouseenter mouseleave").hover(function(){span.find("span."+options.titleScrollerClass).css("left",0);containerDims=getHiddenDims(container);tit=getHiddenDims(span);outbound=containerDims.offsetTop+containerDims.innerHeight-tit.offsetTop;if(containerDims.height>containerDims.innerHeight){outbound+=(containerDims.height-containerDims.innerHeight)/2;}debugObject("decorate hover tit",tit);debug("decorate hover outbound",tit);var doubleDelta=0;if(outbound<0){span.css("top","+="+outbound);doubleDelta=delta;}else{doubleDelta=delta-outbound;}if(options.animateTitle){resetScrollTitle(span,options);span.stop(true).animate({top:"-="+doubleDelta},options.titleAnimationTime,options.titleAnimation,function(){scrollTitle(span,cloneDims.width,containerDims.innerWidth,options);});}else{span.css({top:"-="+doubleDelta});scrollTitle(span,cloneDims.width,containerDims.innerWidth,options);}},function(){if(options.animateTitle){resetScrollTitle(span,options);span.animate({top:"+="+delta},options.titleAnimationTime,options.titleAnimation,function(){resetScrollTitle(span,options);});}else{resetScrollTitle(span,options);span.css({top:"+="+delta});}});}else{if(options.animateTitle){span.animate({top:"-="+delta},options.titleAnimationTime,options.titleAnimation,function(){scrollTitle(span,cloneDims.width,containerDims.innerWidth,options);});}else{span.css({top:"-="+delta});scrollTitle(span,cloneDims.width,containerDims.innerWidth,options);}}}}if(options.onFinish){options.onFinish(container,options);}if(options.loadingClass){container.removeClass(options.loadingClass);}image.data("nailthumb.working",null);}function resetScrollTitle(span,options){span.find("span."+options.titleScrollerClass).stop();}function scrollTitle(span,width,visibleWidth,options){if(width>visibleWidth&&options.titleScrolling){if(span.find("span."+options.titleScrollerClass).length==0){span.wrapInner('<span class="'+options.titleScrollerClass+'" />');span.find("span."+options.titleScrollerClass).width(width).css("position","relative").css("white-space","nowrap");}span.find("span."+options.titleScrollerClass).css("left",0);setTimeout(scrollFunction(span,width,visibleWidth,options),1000);}}function scrollFunction(span,width,visibleWidth,options){return function(){var indent=Number(span.find("span."+options.titleScrollerClass).css("left").replace(/[^-\d]/g,""));debug("indent",indent);debug("width",width);debug("visibleWidth",visibleWidth);debug("width <= -indent",(width<=-indent));var delta=width+indent;if(delta<=0){span.find("span."+options.titleScrollerClass).css("left",visibleWidth);delta=width+visibleWidth;}delta+=10;span.find("span."+options.titleScrollerClass).animate({"left":"-="+delta},width*1000/30,"linear",scrollFunction(span,width,visibleWidth,options));};}function getProportion(containerDims,imageDims,options){if(options.proportions!=null&&options.proportions>0){return options.proportions;}else{var prop=containerDims.innerWidth/imageDims.width;if(options.method&&options.method=="resize"){if(containerDims.innerHeight/imageDims.height<prop){prop=containerDims.innerHeight/imageDims.height;}}else{if(containerDims.innerHeight/imageDims.height>prop){prop=containerDims.innerHeight/imageDims.height;}}if(options.maxEnlargement&&options.maxEnlargement<prop){prop=options.maxEnlargement;}if(options.maxShrink&&options.maxShrink>prop){prop=options.maxShrink;}return prop;}}function getDirections(option){var dir={h:"center",v:"center"};if(option){var opts=option.split(" ");if(opts.length>0){dir=getDirection(opts[0],dir);}if(opts.length>1){dir=getDirection(opts[1],dir);}}return dir;}function getDirection(str,d){switch(str){case"top":d.v="top";break;case"bottom":d.v="bottom";break;case"left":d.h="left";break;case"right":d.h="right";break;default:break;}return d;}function getImageDims(image,options){var imageDims;if(!image.data("nailthumb.originalImageDims")){imageDims=getHiddenDims(image);image.data("nailthumb.originalImageDims",imageDims);if(!options.keepImageDimensions){image.one("load",function(){image.data("nailthumb.originalImageDims",null);});}}else{imageDims=image.data("nailthumb.originalImageDims");}return imageDims;}function getContainerDims(container,options){var containerDims=getHiddenDims(container);if(options.width){containerDims.innerWidth=options.width;}if(options.height){containerDims.innerHeight=options.height;}return containerDims;}function getDims(elem){var offset=$(elem).offset();return{offsetTop:offset.top,offsetLeft:offset.left,width:$(elem).outerWidth(),height:$(elem).outerHeight(),innerWidth:$(elem).innerWidth(),innerHeight:$(elem).innerHeight()};}function getHiddenDims(elems){var dims=null,i=0,offset,elem;while((elem=elems[i++])){var hiddenElems=$(elem).parents().andSelf().filter(":hidden");if(!hiddenElems.length){dims=getDims(elem);}else{var backupStyle=[];hiddenElems.each(function(){var style=$(this).attr("style");style=typeof style=="undefined"?"":style;backupStyle.push(style);$(this).attr("style",style+" display: block !important;");});hiddenElems.eq(0).css("left",-10000);dims=getDims(elem);hiddenElems.each(function(){$(this).attr("style",backupStyle.shift());});}}return dims;}function getHiddenCloneDims(elems){var dims=null,i=0,offset,elem;while((elem=elems[i++])){var hiddenElems=$(elem).parents().andSelf().filter(":hidden");if(!hiddenElems.length){dims=getDims(elem);}else{var backupStyle=[];hiddenElems.each(function(){var style=$(this).attr("style");style=typeof style=="undefined"?"":style;backupStyle.push(style);$(this).attr("style",style+" display: block !important;");});hiddenElems.eq(0).css("left",-10000);var clone=hiddenElems.eq(0).clone();$("body").append(clone);dims=getDims(clone);hiddenElems.each(function(){$(this).attr("style",backupStyle.shift());});clone.remove();}}return dims;}$.fn.nailthumb.evalServerSideParams=function(image,container,options){if(options.serverSideParams){var params={};if(!options.serverSideParams.noServerResize){var w=null,h=null;if(options.serverSideParams.width){w=options.serverSideParams.width;}else{if(options.width){w=options.width;}}if(options.serverSideParams.height){h=options.serverSideParams.height;}else{if(options.height){h=options.height;}}if(!(w&&h)){resetContainer(container,options);var containerDims=getContainerDims(container,options);w=containerDims.innerWidth;h=containerDims.innerHeight;}if(w&&h){params.w=w;params.h=h;if(options.serverSideParams.mode!="resize"){if(options.method=="crop"){params.mode="crop";}if(options.serverSideParams.mode){params.mode=options.serverSideParams.mode;}}}}$.each(options.serverSideParams,function(key,val){if(key!="width"&&key!="height"&&key!="mode"&&key!="noServerResize"&&val){params[key]=val;}});var pars="";$.each(params,function(key,val){pars+=";"+key+"="+val;});debug(pars,params);return pars;}else{return"";}};$.fn.nailthumb.setServerSideParams=function(image,container,options){if(options.serverSideParams){var url=image.attr("src");if(image.data("nailthumb.originalImageUrl")){url=image.data("nailthumb.originalImageUrl");}image.data("nailthumb.originalImageUrl",url);var pars=$.fn.nailthumb.evalServerSideParams(image,container,options);
url+=pars;image.attr("src",url);}};$.fn.nailthumb.toggleDebug=function(){DEBUG=!DEBUG;};$.fn.nailthumb.doThumb=function(image,container,options){doThumb(image,container,options);};$.fn.nailthumb.defaults={onStart:null,onFinish:null,loadingClass:"nailthumb-loading",imageUrl:null,imageFromWrappingLink:false,imageCustomFinder:null,imageClass:"nailthumb-image",afterReplace:null,afterAppear:null,replaceAnimation:"fade",selfStartAfterAppear:false,animationTime:1000,animation:"swing",keepImageDimensions:false,method:"crop",fitDirection:null,proportions:null,ifImageAddContainer:true,containerClass:"nailthumb-container",maxEnlargement:null,maxShrink:null,preload:true,nostyle:false,width:null,height:null,title:null,titleClass:"nailthumb-title",titleAttr:"title",titleWhen:"hover",titleScrolling:true,titleScrollerClass:"nailthumb-title-scroller",animateTitle:true,titleAnimationTime:500,titleAnimation:"swing",serverSideParams:null};function log(log,jQueryobj){try{debug(log,jQueryobj,true);}catch(ex){}}function debug(log,jQueryobj,force){try{if((DEBUG&&window.console&&window.console.log)||force){window.console.log(log+": "+jQueryobj);}}catch(ex){}}function debugObject(log,jQueryobj,force){try{if(!jQueryobj){jQueryobj=log;}debug(log,jQueryobj);if((DEBUG&&window.console&&window.console.log)||force){window.console.debug(jQueryobj);}}catch(ex){}}})(jQuery);