(function(a){a.fn.addOption=function(){var h=function(q,l,n,r){var p=document.createElement("option");p.value=l,p.text=n;var s=q.options;var j=s.length;if(!q.cache){q.cache={};for(var m=0;m<j;m++){q.cache[s[m].value]=m}}if(typeof q.cache[l]=="undefined"){q.cache[l]=j}q.options[q.cache[l]]=p;if(r){p.selected=true}};var c=arguments;if(c.length==0){return this}var g=true;var b=false;var e,d,f;if(typeof(c[0])=="object"){b=true;e=c[0]}if(c.length>=2){if(typeof(c[1])=="boolean"){g=c[1]}else{if(typeof(c[2])=="boolean"){g=c[2]}}if(!b){d=c[0];f=c[1]}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}if(b){for(var j in e){h(this,j,e[j],g)}}else{h(this,d,f,g)}});return this};a.fn.ajaxAddOption=function(d,f,b,e,c){if(typeof(d)!="string"){return this}if(typeof(f)!="object"){f={}}if(typeof(b)!="boolean"){b=true}this.each(function(){var g=this;a.getJSON(d,f,function(h){a(g).addOption(h,b);if(typeof e=="function"){if(typeof c=="object"){e.apply(g,c)}else{e.call(g)}}})});return this};a.fn.removeOption=function(){var c=arguments;if(c.length==0){return this}var e=typeof(c[0]);var d,f;if(e=="string"||e=="object"||e=="function"){d=c[0];if(d.constructor==Array){var b=d.length;for(var g=0;g<b;g++){this.removeOption(d[g],c[1])}return this}}else{if(e=="number"){f=c[0]}else{return this}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}if(this.cache){this.cache=null}var h=false;var m=this.options;if(!!d){var j=m.length;for(var l=j-1;l>=0;l--){if(d.constructor==RegExp){if(m[l].value.match(d)){h=true}}else{if(m[l].value==d){h=true}}if(h&&c[1]===true){h=m[l].selected}if(h){m[l]=null}h=false}}else{if(c[1]===true){h=m[f].selected}else{h=true}if(h){this.remove(f)}}});return this};a.fn.sortOptions=function(c){var d=a(this).selectedValues();var b=typeof(c)=="undefined"?true:!!c;this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}var g=this.options;var e=g.length;var h=[];for(var f=0;f<e;f++){h[f]={v:g[f].value,t:g[f].text}}h.sort(function(l,j){o1t=l.t.toLowerCase(),o2t=j.t.toLowerCase();if(o1t==o2t){return 0}if(b){return o1t<o2t?-1:1}else{return o1t>o2t?-1:1}});for(var f=0;f<e;f++){g[f].text=h[f].t;g[f].value=h[f].v}}).selectOptions(d,true);return this};a.fn.selectOptions=function(e,b){var d=e;var g=typeof(e);if(g=="object"&&d.constructor==Array){var f=this;a.each(d,function(){f.selectOptions(this,b)})}var h=b||false;if(g!="string"&&g!="function"&&g!="object"){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var l=this.options;var c=l.length;for(var j=0;j<c;j++){if(d.constructor==RegExp){if(l[j].value.match(d)){l[j].selected=true}else{if(h){l[j].selected=false}}}else{if(l[j].value==d){l[j].selected=true}else{if(h){l[j].selected=false}}}}});return this};a.fn.copyOptions=function(d,c){var b=c||"selected";if(a(d).size()==0){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var g=this.options;var e=g.length;for(var f=0;f<e;f++){if(b=="all"||(b=="selected"&&g[f].selected)){a(d).addOption(g[f].value,g[f].text)}}});return this};a.fn.containsOption=function(e,c){var d=false;var b=e;var f=typeof(b);var g=typeof(c);if(f!="string"&&f!="function"&&f!="object"){return g=="function"?this:d}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}if(d&&g!="function"){return false}var l=this.options;var h=l.length;for(var j=0;j<h;j++){if(b.constructor==RegExp){if(l[j].value.match(b)){d=true;if(g=="function"){c.call(l[j],j)}}}else{if(l[j].value==b){d=true;if(g=="function"){c.call(l[j],j)}}}}});return g=="function"?this:d};a.fn.selectedValues=function(){var b=[];this.selectedOptions().each(function(){b[b.length]=this.value});return b};a.fn.selectedTexts=function(){var b=[];this.selectedOptions().each(function(){b[b.length]=this.text});return b};a.fn.selectedOptions=function(){return this.find("option:selected")}})(jQuery);WE.sport={ORGANIZATIONS:{}};(function(a){a.fn.filterOrganizations=function(){return this.each(function(){var f=a(this);var e=f.find("select[id*=organization]");var b=f.find("select[id*=sport]");function d(j){var h=null;if(j&&e.val()){h=e.find("option:selected")}e.removeOption(/./).addOption("Select association","Select association").addOption("separator1","--").addOption("No association","No association").addOption("Other","Other").addOption("separator2","--");if(h!=null&&parseInt(h.val(),10)>0){e.addOption(h.val(),h.html()).val(h.val());h=null}else{e.val("Select association")}}function g(h){return a.grep(WE.sport.ORGANIZATIONS,function(l,j){return l.sport.id==h})[0].sport.organizations}function c(){var l=e.val();var j=b.val();if(j){d();var h=g(j);var m=a.grep(h,function(o,n){return o.featured}).length>0;a.each(h,function(){if(m&&this.featured==false){e.addOption("separator2","--")}e.addOption(this.id,this.short_name)});if(h.length==0){e.attr("disabled",true)}else{if(l!=""){e.val(l)}else{e.val("Select association")}e.attr("disabled",false)}}else{e.attr("disabled",true)}}d(true);b.change(c).change()})}})(jQuery);function MarkerFilter(b){var a=this;a.form_=b;a.values_={};a.val=function(c,d){if(c){if(d){a.values_[c]=d}else{return a.values_[c]}return}else{return values_}};a.onValueChange=function(){var c=$(this).attr("id").replace(/^group_/,"");if($(this).val().length){a.val(c,$(this).val())}else{a.val(c,null)}a.refreshMarkers();WE.mapping.log("Filter values: sport "+a.values_.sport_id+", group_type "+a.values_.group_type+", organization "+a.values_.organization_id)};a.reset=function(){a.form_.find("select").find("option:first").attr("selected",true);a.form_.find("select").change();a.values_={};return false}}MarkerFilter.prototype.matches=function(c){var b=this;if(!b.INDEX){return true}if(c.cluster){for(var a=0;a<c.cluster.length;a++){var d=c.cluster[a];if(b.matchesMarker_(b.INDEX[d])){return true}}return false}else{return b.matchesMarker_(b.INDEX[c.id])}};MarkerFilter.prototype.matchesMarker_=function(a){if(!a){return true}var c=this;for(var d in c.values_){var e=c.val(d);var b=a[d];if(e&&e!=b){return false}}return true};MarkerFilter.prototype.load=function(a){var b=this;b.form_.filterOrganizations();b.form_.find("select").change(b.onValueChange);$(".reset").click(b.reset);$.ajax({type:"GET",url:a,dataType:"script",cache:true})};MarkerFilter.prototype.completeLoad=function(){var b=this;if(WE.mapping.displayStartMarker()){var a=WE.mapping.processor.getStartMarker();b.INDEX[a.attr("id")]=a.attr("value")}if(WE.mapping.displayMyMarkers()){$.each(WE.mapping.processor.getMyMarkers(),function(){var c=this;b.INDEX[c.attr("id")]=null})}$("div[id*=filter]").fadeIn()};MarkerFilter.prototype.filterBy=function(a,c){var b=this;WE.mapping.log("Filter by "+a+": "+c);if(c){b.form_.find("select[id*="+a+"]").val(c).change()}b.refreshMarkers()};MarkerFilter.prototype.refreshMarkers=function(){WE.mapping.refreshFilteredMarkers()};function MarkerManager(d,e){var b=this;b.map_=d;b.mapZoom_=d.getZoom();b.projection_=d.getCurrentMapType().getProjection();e=e||{};b.tileSize_=MarkerManager.DEFAULT_TILE_SIZE_;var a=MarkerManager.DEFAULT_MAX_ZOOM_;if(e.maxZoom!=undefined){a=e.maxZoom}b.maxZoom_=a;b.trackMarkers_=e.trackMarkers;var c;if(typeof e.borderPadding=="number"){c=e.borderPadding}else{c=MarkerManager.DEFAULT_BORDER_PADDING_}b.swPadding_=new GSize(-c,c);b.nePadding_=new GSize(c,-c);b.borderPadding_=c;b.gridWidth_=[];b.grid_=[];b.grid_[a]=[];b.numMarkers_=[];b.numMarkers_[a]=0;GEvent.bind(d,"moveend",b,b.onMapMoveEnd_);b.removeOverlay_=function(f){d.removeOverlay(f);b.shownMarkers_--};b.addOverlay_=function(f){if(f.passesFilter()){d.addOverlay(f);b.shownMarkers_++}};b.resetManager_();b.shownMarkers_=0;b.shownBounds_=b.getMapGridBounds_()}MarkerManager.DEFAULT_TILE_SIZE_=1024;MarkerManager.DEFAULT_MAX_ZOOM_=17;MarkerManager.DEFAULT_BORDER_PADDING_=100;MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE=256;MarkerManager.prototype.resetManager_=function(){var c=this;var a=MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE;for(var b=0;b<=c.maxZoom_;++b){c.grid_[b]=[];c.numMarkers_[b]=0;c.gridWidth_[b]=Math.ceil(a/c.tileSize_);a<<=1}};MarkerManager.prototype.clearMarkers=function(){var a=this;a.processAll_(a.shownBounds_,a.removeOverlay_);a.resetManager_()};MarkerManager.prototype.getTilePoint_=function(d,b,c){var a=this.projection_.fromLatLngToPixel(d,b);return new GPoint(Math.floor((a.x+c.width)/this.tileSize_),Math.floor((a.y+c.height)/this.tileSize_))};MarkerManager.prototype.addMarkerBatch_=function(c,g,b){var f=c.getPoint();if(this.trackMarkers_){GEvent.bind(c,"changed",this,this.onMarkerMoved_)}var d=this.getTilePoint_(f,b,GSize.ZERO);for(var e=b;e>=g;e--){var a=this.getGridCellCreate_(d.x,d.y,e);a.push(c);d.x=d.x>>1;d.y=d.y>>1}};MarkerManager.prototype.isGridPointVisible_=function(b){var f=this;var d=f.shownBounds_.minY<=b.y&&b.y<=f.shownBounds_.maxY;var a=f.shownBounds_.minX;var c=a<=b.x&&b.x<=f.shownBounds_.maxX;if(!c&&a<0){var e=f.gridWidth_[f.shownBounds_.z];c=a+e<=b.x&&b.x<=e-1}return d&&c};MarkerManager.prototype.onMarkerMoved_=function(e,a,c){var g=this;var j=g.maxZoom_;var d=false;var b=g.getTilePoint_(a,j,GSize.ZERO);var f=g.getTilePoint_(c,j,GSize.ZERO);while(j>=0&&(b.x!=f.x||b.y!=f.y)){var h=g.getGridCellNoCreate_(b.x,b.y,j);if(h){if(g.removeFromArray(h,e)){g.getGridCellCreate_(f.x,f.y,j).push(e)}}if(j==g.mapZoom_){if(g.isGridPointVisible_(b)){if(!g.isGridPointVisible_(f)){g.removeOverlay_(e);d=true}}else{if(g.isGridPointVisible_(f)){g.addOverlay_(e);d=true}}}b.x=b.x>>1;b.y=b.y>>1;f.x=f.x>>1;f.y=f.y>>1;--j}if(d){g.notifyListeners_()}};MarkerManager.prototype.removeMarker=function(c){var f=this;var e=f.maxZoom_;var g=false;var b=c.getPoint();var d=f.getTilePoint_(b,e,GSize.ZERO);while(e>=0){var a=f.getGridCellNoCreate_(d.x,d.y,e);if(a){f.removeFromArray(a,c)}if(e==f.mapZoom_){if(f.isGridPointVisible_(d)){f.removeOverlay_(c);g=true}}d.x=d.x>>1;d.y=d.y>>1;--e}if(g){f.notifyListeners_()}};MarkerManager.prototype.addMarkers=function(d,e,c){var a=this.getOptMaxZoom_(c);for(var b=d.length-1;b>=0;b--){this.addMarkerBatch_(d[b],e,a)}this.numMarkers_[e]+=d.length};MarkerManager.prototype.getOptMaxZoom_=function(a){return a!=undefined?a:this.maxZoom_};MarkerManager.prototype.getMarkerCount=function(b){var a=0;for(var c=0;c<=b;c++){a+=this.numMarkers_[c]}return a};MarkerManager.prototype.addMarker=function(b,f,d){var e=this;var a=this.getOptMaxZoom_(d);e.addMarkerBatch_(b,f,a);var c=e.getTilePoint_(b.getPoint(),e.mapZoom_,GSize.ZERO);if(e.isGridPointVisible_(c)&&f<=e.shownBounds_.z&&e.shownBounds_.z<=a){e.addOverlay_(b);e.notifyListeners_()}this.numMarkers_[f]++};GBounds.prototype.containsPoint=function(a){var b=this;return(b.minX<=a.x&&b.maxX>=a.x&&b.minY<=a.y&&b.maxY>=a.y)};MarkerManager.prototype.getGridCellCreate_=function(a,f,e){var c=this.grid_[e];if(a<0){a+=this.gridWidth_[e]}var b=c[a];if(!b){b=c[a]=[];return b[f]=[]}var d=b[f];if(!d){return b[f]=[]}return d};MarkerManager.prototype.getGridCellNoCreate_=function(a,e,d){var c=this.grid_[d];if(a<0){a+=this.gridWidth_[d]}var b=c[a];return b?b[e]:undefined};MarkerManager.prototype.getGridBounds_=function(a,j,h,f){j=Math.min(j,this.maxZoom_);var b=a.getSouthWest();var e=a.getNorthEast();var g=this.getTilePoint_(b,j,h);var d=this.getTilePoint_(e,j,f);var l=this.gridWidth_[j];if(e.lng()<b.lng()||d.x<g.x){g.x-=l}if(d.x-g.x+1>=l){g.x=0;d.x=l-1}var c=new GBounds([g,d]);c.z=j;return c};MarkerManager.prototype.getMapGridBounds_=function(){var a=this;return a.getGridBounds_(a.map_.getBounds(),a.mapZoom_,a.swPadding_,a.nePadding_)};MarkerManager.prototype.onMapMoveEnd_=function(){var a=this;a.objectSetTimeout_(this,this.updateMarkers_,0)};MarkerManager.prototype.objectSetTimeout_=function(b,c,a){return window.setTimeout(function(){c.call(b)},a)};MarkerManager.prototype.refresh=function(){var a=this;if(a.shownMarkers_>0){a.processAll_(a.shownBounds_,a.removeOverlay_)}a.processAll_(a.shownBounds_,a.addOverlay_);a.notifyListeners_()};MarkerManager.prototype.updateMarkers_=function(){var a=this;a.mapZoom_=this.map_.getZoom();var b=a.getMapGridBounds_();if(b.equals(a.shownBounds_)&&b.z==a.shownBounds_.z){return}if(b.z!=a.shownBounds_.z){a.processAll_(a.shownBounds_,a.removeOverlay_);a.processAll_(b,a.addOverlay_)}else{a.rectangleDiff_(a.shownBounds_,b,a.removeCellMarkers_);a.rectangleDiff_(b,a.shownBounds_,a.addCellMarkers_)}a.shownBounds_=b;a.notifyListeners_()};MarkerManager.prototype.notifyListeners_=function(){GEvent.trigger(this,"changed",this.shownBounds_,this.shownMarkers_)};MarkerManager.prototype.processAll_=function(b,d){for(var a=b.minX;a<=b.maxX;a++){for(var c=b.minY;c<=b.maxY;c++){this.processCellMarkers_(a,c,b.z,d)}}};MarkerManager.prototype.processCellMarkers_=function(b,f,d,e){var a=this.getGridCellNoCreate_(b,f,d);if(a){for(var c=a.length-1;c>=0;c--){e(a[c])}}};MarkerManager.prototype.removeCellMarkers_=function(a,c,b){this.processCellMarkers_(a,c,b,this.removeOverlay_)};MarkerManager.prototype.addCellMarkers_=function(a,c,b){this.processCellMarkers_(a,c,b,this.addOverlay_)};MarkerManager.prototype.rectangleDiff_=function(b,a,d){var c=this;c.rectangleDiffCoords(b,a,function(e,f){d.apply(c,[e,f,b.z])})};MarkerManager.prototype.rectangleDiffCoords=function(b,a,n){var f=b.minX;var o=b.minY;var h=b.maxX;var d=b.maxY;var e=a.minX;var m=a.minY;var g=a.maxX;var c=a.maxY;for(var l=f;l<=h;l++){for(var j=o;j<=d&&j<m;j++){n(l,j)}for(var j=Math.max(c+1,o);j<=d;j++){n(l,j)}}for(var j=Math.max(o,m);j<=Math.min(d,c);j++){for(var l=Math.min(h+1,e)-1;l>=f;l--){n(l,j)}for(var l=Math.max(f,g+1);l<=h;l++){n(l,j)}}};MarkerManager.prototype.removeFromArray=function(e,c,d){var a=0;for(var b=0;b<e.length;++b){if(e[b]===c||(d&&e[b]==c)){e.splice(b--,1);a++}}return a};MarkerManager.prototype.hardRefresh=function(){var a=this;a.processAll_(a.shownBounds_,a.removeOverlay_);a.processAll_(a.shownBounds_,a.addOverlay_)};function MarkerJsonProcessor(){var a=this;a.myMarkerJson=[];a.startMarkerJson=[];a.startMarker=null;a.myMarkers=null;a.jsonToMarkers=function(b,c){if(c){var b=this.removeDuplicateMarkers(b)}return $.map(b,function(e){var d=new GMarker(new GLatLng(e.lat,e.lng),a.mergeDefaultOptions(e.value));d.value=e.value;return d})};a.mergeDefaultOptions=function(b){var c={icon:new MapIcon(b),title:b.title};if(b.icon=="star"){c.zIndexProcess=function(){return 100}}return c};a.removeDuplicateMarkers=function(b){if(!a.featuredMarkerJson().length){return b}return $.grep(b,function(c){return a.indexInFeaturedMarkerJson(c)==-1})};a.indexInFeaturedMarkerJson=function(b){return $.inArray(b.value.id,a.featuredMarkerIds())};a.featuredMarkerIds=function(){return $.map(a.featuredMarkerJson(),function(b){return b.value.id})}}MarkerJsonProcessor.prototype.getStartMarker=function(){var a=this;if(!a.startMarker){var b=a.indexInFeaturedMarkerJson(a.startMarkerJson[0]);if(b>=0){a.startMarker=a.jsonToMarkers(a.featuredMarkerJson())[b]}else{a.featuredMarkerJson(a.startMarkerJson);a.startMarker=a.jsonToMarkers(a.startMarkerJson)[0]}}return a.startMarker};MarkerJsonProcessor.prototype.featuredMarkerJson=function(a){var b=this;if(a){b.myMarkerJson=b.myMarkerJson.concat(a)}return b.myMarkerJson};MarkerJsonProcessor.prototype.getMyMarkers=function(){var a=this;if(!a.myMarkers){a.myMarkers=a.jsonToMarkers(a.myMarkerJson)}return a.myMarkers};MarkerJsonProcessor.prototype.hasMyMarkers=function(){return this.myMarkerJson.length>0};MarkerJsonProcessor.prototype.hasStartMarker=function(){return this.startMarkerJson.length>0};function MapPerspective(d,a,c){var b=this;b.lat=d;b.lng=a;b.zoom=c;b.serialize=function(){return{zoom:b.zoom,lng:b.lng,lat:b.lat}};b.center=function(){return new GLatLng(b.lat,b.lng)};b.toUrlParam=function(){return"?center="+b.lat.toString()+","+b.lng.toString()+"&zoom="+b.zoom.toString()}}MapPerspective.buildDefault=function(){var b=new GLatLng(36.209874,-98.560706);var a=4;return new MapPerspective(b.lat(),b.lng(),a)};MapPerspective.buildFromCookie=function(a){return new MapPerspective(a.lat,a.lng,a.zoom)};MapPerspective.buildFromStartMarker=function(b,a){return new MapPerspective(b[0].lat,b[0].lng,a)};MapPerspective.buildFromCustomParams=function(b,a){b=b.split(",");return new MapPerspective(parseFloat(b[0]),parseFloat(b[1]),parseInt(a,10))};MapPerspective.buildFromMap=function(b){var a=b.getCenter();return new MapPerspective(a.lat(),a.lng(),b.getZoom())};function MapTile(d,a,c){var b=this;b.lat=d;b.lng=a;b.zoom=c}MapTile.prototype.url=function(){var c=this;var d=c.lat.toString().replace(/-/,"n").replace(/\./,"_");var b=c.lng.toString().replace(/-/,"n").replace(/\./,"_");var a="/resources/tiles/"+c.zoom+"/"+d+"/"+b+".js";return a};function MapTileMatrix(b){var a=this;a.previouslyViewedTiles_={};a.refresh=function(){a.previouslyViewedTiles_={}};a.tilesFor=function(c,n){var j=[];var g=b.rangeFor(n);var f=g.tile_size;var h=a.createTileFor(c.getSouthWest(),g.min,f);var m=a.createTileFor(c.getNorthEast(),g.min,f);function l(p,r){var q=new MapTile(p,r,g.min);var o=q.url();if(a.previouslyViewedTiles_[o]==null){a.previouslyViewedTiles_[o]=q;j.push(q)}}for(var e=h.lat;e<=m.lat;e+=f){if(h.lng<=m.lng){for(var d=h.lng;d<=m.lng;d+=f){l(e,d)}}else{for(var d=-180;d<=m.lng;d+=f){l(e,d)}for(var d=h.lng;d<180;d+=f){l(e,d)}}}return j}}MapTileMatrix.prototype.createTileFor=function(d,c,a){var e=Math.floor(d.lat()/a)*a;var b=Math.floor(d.lng()/a)*a;return new MapTile(e,b,c)};function MapIcon(d){var c=this;c.prototype=new GOverlay();function b(){if(d.sport_id&&$.inArray(WE.sport.ALL_SPORTS[d.sport_id],MapIcon.SPORTS)>=0){return WE.sport.ALL_SPORTS[d.sport_id]}else{return false}}function a(){if(d.id){return d.id.replace(/_[0-9]+$/,"")}else{return false}}if(d.icon){c=MapIcon.Factory[d.icon](c)}else{if(a()=="guest_group"){c=MapIcon.Factory[a()](c)}else{if(b()){c=MapIcon.Factory.sport(c,b())}else{if(d.cluster){c=MapIcon.Factory.cluster(c)}else{c=MapIcon.Factory.group(c)}}}}c=new MapIconAnchor(c)}function MapIconAnchor(a){a.iconAnchor=new GPoint(0,a.iconSize.height);a.infoWindowAnchor=new GPoint(0-(a.iconSize.width/2),a.iconSize.height)}MapIcon.Factory={group:function(a){a.image="/images/icons/maps/individual/w_small.png";a.shadow="/images/icons/maps/shadow/w_small_shadow.png";a.iconSize=MapIcon.SIZES.icon.group;a.shadowSize=MapIcon.SIZES.shadow.group;return a},cluster:function(a){a.image="/images/icons/maps/cluster/w_plus.png";a.shadow="/images/icons/maps/shadow/w_plus_shadow.png";a.iconSize=MapIcon.SIZES.icon.cluster;a.shadowSize=MapIcon.SIZES.shadow.cluster;return a},star:function(a){a.image="/images/icons/maps/individual/star.png";a.shadow="/images/icons/maps/shadow/star_shadow.png";a.iconSize=MapIcon.SIZES.icon.star;a.shadowSize=MapIcon.SIZES.shadow.star;return a},guest_group:function(a){a.image="/images/icons/maps/individual/flag.png";a.shadow="/images/icons/maps/shadow/flag_shadow.png";a.iconSize=MapIcon.SIZES.icon.guest_group;a.shadowSize=MapIcon.SIZES.shadow.guest_group;return a},sport:function(a,b){a.image="/images/icons/maps/individual/sports/"+b+".png";a.shadow="/images/icons/maps/shadow/sport_shadow.png";a.iconSize=MapIcon.SIZES.icon.sport;a.shadowSize=MapIcon.SIZES.shadow.sport;return a}};MapIcon.SIZES={icon:{group:new GSize(22,16),cluster:new GSize(44,33),star:new GSize(30,30),guest_group:new GSize(21,21),sport:new GSize(22,22)},shadow:{group:new GSize(28,13),cluster:new GSize(46,33),star:new GSize(40,30),guest_group:new GSize(21,21),sport:new GSize(26,22)}};MapIcon.SPORTS=["baseball","basketball","bowling","cheerleading","football","gymnastics","hockey","lacrosse","soccer","swimming","softball","volleyball","wrestling"];function ZoomRangeRegistry(){var a=this;a.ranges={};a.max=19;a.local=11;a.regional=6;a.register=function(b){a.ranges[b.title]=b};a.rangeFor=function(b){for(var c in a.ranges){if(a.ranges[c].contains(b)){return a.ranges[c]}}};a.inSameRange=function(c,b){return a.rangeFor(c).contains(b)};a.zoomInFrom=function(c){var b=a.rangeFor(c);if(b&&b.max){var d=a.rangeFor(b.max+1);if(d){return d.min+1}}else{if(c<a.max){return c+1}}return c}}ZoomRangeRegistry.prototype.initialize=function(b){var a=this;for(var c in b){a.register(new ZoomRange(c,b[c]))}};function ZoomRange(d,b){var a=this;var c=$.extend({title:d},a.defaults,b);a.max=c.max;a.min=c.min;a.title=c.title;a.tile_size=c.tile_size;a.contains=function(e){if(a.max){return e>=a.min&&e<=a.max}else{return e>=a.min}}}ZoomRange.prototype.defaults={tile_size:100,min:0};function WeInfoWindow(c,b,a){this.latlng_=c;this.html_=b;this.marker_=a;this.prototype=new GOverlay();this.initialize=function(d){var e=$("<div />");e.addClass("iw").appendTo(d.getPane(G_MAP_FLOAT_PANE));this.map_=d;this.div_=e;this.update(b)};this.update=function(d){this.html_=d;this.div_.empty();$("<div />").addClass("iw_header").appendTo(this.div_);$("<div />").addClass("iw_content").html(d).appendTo(this.div_);$("<a />").addClass("close_window").click(this.closeWindow).appendTo(this.div_);$("<div />").addClass("arrow_decoration").appendTo(this.div_);this.redraw(true)};this.closeWindow=function(){a.closeWeInfoWindow();return false};this.remove=function(){this.div_.remove()};this.copy=function(){return new WeInfoWindow(this.latlng_,this.html_,this.marker_)};this.redraw=function(d){if(!d){return}var f=this.map_.fromLatLngToDivPixel(this.latlng_);var e=this.marker_.getIcon().infoWindowAnchor;this.div_.css({left:f.x-e.x-43,top:f.y-this.div_.height()-e.y})};this.panMap=function(){var e=this.map_.fromLatLngToContainerPixel(this.latlng_);var j=e.y-this.div_.height();var h=e.x+this.div_.width();var g=this.map_.getSize().width;var f=0;var d=0;if(j<0){f=j*-1+20}if(g<h){d=g-h}this.map_.panBy(new GSize(d,f))};this.setId=function(d){this.div_.attr("id",d)}}(function(c){c.fn.geocoder=function(e){var d=e;return this.each(function(){var l=c(this);var h=l.find(".submit");h.spinster();var j=l.find("input[id*=location]");var f=c("<div />").addClass("error").addClass("hidden").appendTo(l);var g=null;var m=new GClientGeocoder();l.submit(function(){var n=j.val();m.getLocations(n,function(p){h.stopSpinster();if(p.Status.code==G_GEO_SUCCESS){var o=p.Placemark[0];var r=o.AddressDetails.Accuracy;var q=new GLatLng(o.Point.coordinates[1],o.Point.coordinates[0]);WE.mapping.log("Accuracy: "+r);d.setCenter(q,b(r))}else{clearTimeout(g);f.html(a(p.Status.code));f.slideDown("fast",function(){g=setTimeout(function(){f.slideUp("fast")},3000)})}});return false})})};function b(d){switch(d){case 0:return 2;case 1:return 4;case 2:return 6;case 3:return 8;case 4:return 11;case 5:return 12;case 6:return 13;case 7:return 14;case 8:return 15;case 9:return 16;default:return 9}}function a(d){switch(d){case G_GEO_SUCCESS:return"Success!";case G_GEO_BAD_REQUEST:return"Unreadable request. Please try another location.";case G_GEO_SERVER_ERROR:return"Server error. Try again or enter another location.";case G_GEO_MISSING_QUERY:return"Please enter a location.";case G_GEO_MISSING_ADDRESS:return"Please enter a location.";case G_GEO_UNKNOWN_ADDRESS:return"Address not found. Try another location.";case G_GEO_UNAVAILABLE_ADDRESS:return"Address not available. Try another location.";case G_GEO_BAD_KEY:return"Server error. Try again or enter another location.";case G_GEO_TOO_MANY_QUERIES:return"Server busy. Please try again later.";case 9:return 16;default:return 9}}c.fn.validateGeocodingOnSubmit=function(d){return this.each(function(){var g=c(this);var e=g.find(".plastic_button");var f=g.find("input[id*=location]");g.submit(function(){var h=f.val();var j=new GClientGeocoder();e.spinster({zIndex:"100000000"});e.find("input").startSpinster();j.getLatLng(h,function(l){WE.geocoding.lastGLatLng=l;if(l){WE.console.log("Geocoding success");WE.console.log(l);c(document).bind("close.facebox",function(){e.unbindSpinster()});g.ajaxSubmit({dataType:"script",complete:function(){e.stopSpinster()}})}else{WE.console.log("Geocoding error");e.stopSpinster();var m=f.parents("tr").eq(0);if(!m.hasClass("error")){m.addClass("error").after('<tr id="sentence_for_location" class="msg error text_field"><td></td><td>This location could not be put on the map. Enter a new location that can be mapped.</td></tr>')}}});return false})})}})(jQuery);GMarker.prototype.WeInfoWindowInstance=null;GMarker.prototype.openWeInfoWindow=function(a){if(this.WeInfoWindowInstance){return}this.WeInfoWindowInstance=new WeInfoWindow(this.getLatLng(),a,this);WE.mapping.gmap.addOverlay(this.WeInfoWindowInstance);WE.mapping.gmap.selectedMarker=this};GMarker.prototype.setWeInfoWindowDomId=function(a){if(!this.WeInfoWindowInstance){return}this.WeInfoWindowInstance.setId("iw_"+a)};GMarker.prototype.closeWeInfoWindow=function(){if(!this.WeInfoWindowInstance){return}WE.mapping.gmap.removeOverlay(this.WeInfoWindowInstance);this.WeInfoWindowInstance=null;WE.mapping.gmap.selectedMarker=null};GMarker.prototype.redrawWeInfoWindow=function(){if(!this.WeInfoWindowInstance){return}this.WeInfoWindowInstance.redraw(true);this.WeInfoWindowInstance.panMap();if(this.attr("organizer")){WE.mapping.log("Organizer");$(".edit_link").show()}};GMarker.prototype.requestWeInfoWindow=function(){var b=this;var a=this.attr("id");WE.mapping.log("Requesting info for "+a);this.openWeInfoWindow('<div class="iw_loading">&nbsp;</div>');this.setWeInfoWindowDomId(a);$.ajax({type:"GET",url:WE.mapping.infoWindowUrlFor(a),dataType:"script",cache:true,complete:function(){b.redrawWeInfoWindow()}})};GMarker.prototype.isClustered=function(){if(!this.value){return false}return this.value.hasOwnProperty("cluster")};GMarker.prototype.passesFilter=function(){if(!WE.mapping.filter){return true}return WE.mapping.filter.matches(this.value)};GMarker.prototype.attr=function(a){return this.value[a]};GMarker.prototype.log=function(){WE.mapping.log("____Marker____");for(var a in this.value){WE.mapping.log(a+": "+this.value[a])}WE.mapping.log("______________")};GMarker.prototype.toUrlParam=function(){var a=/(.+)_(\d+)/.exec(this.attr("id"));return"/"+a[1]+"s/"+a[2]};GMap2.prototype.markerClickHandler=function(b,a){if(!b){return}if(WE.mapping.tilesRequested>0){return}b.log();if(this.selectedMarker){this.selectedMarker.closeWeInfoWindow()}if(b.isClustered()){this.setCenter(b.getLatLng(),WE.mapping.zoom.nextRangeIn())}else{this.singleMarkerClickHandler(b)}};GMap2.prototype.singleMarkerClickHandler=function(c,a){if(this.getZoom()<WE.mapping.zoom.local){if(c.value&&c.attr("id")){var b=GEvent.addListener(this,"moveend",function(){c.requestWeInfoWindow();GEvent.removeListener(b)})}this.setCenter(c.getLatLng(),WE.mapping.zoom.local)}else{if(c.value&&c.attr("id")){c.requestWeInfoWindow()}}};GMap2.prototype.zoomHandler=function(b,a){WE.mapping.log("Zoom: "+a);if(!WE.mapping.zoom.hasChangedCurrentRange(b,a)){return}WE.mapping.log("Entering "+WE.mapping.zoom.currentRange(a).title+" zoom level.");if(this.selectedMarker){this.selectedMarker.closeWeInfoWindow()}};GMap2.prototype.initializeControls=function(){var a=new GControlPosition(G_ANCHOR_TOP_RIGHT);this.addControl(new GLargeMapControl3D(),a);this.enableDoubleClickZoom();this.continuousZoomEnabled();this.enableScrollWheelZoom()};WE.mapping={gmap:null,mapObject:$("#weplay_gmap"),tilesRequested:0,listeners:[],startCenter:null,startZoom:null,currentView:{},processor:new MarkerJsonProcessor()};WE.geocoding={};WE.mapping.zoom={max:19,local:11,regional:6};WE.mapping.load=function(){if(!WE.mapping.perspective){WE.mapping.perspective=WE.mapping.getPerspective()}WE.mapping.initializeMap();WE.mapping.initializePanel();WE.mapping.initializeCTAs()};WE.mapping.unload=function(){$.each(WE.mapping.listeners,function(){GEvent.removeListener(this)});GUnload()};WE.mapping.initializeMap=function(){this.zoom.rangeRegistry=new ZoomRangeRegistry();this.zoom.rangeRegistry.initialize(this.sourceZoomRanges);this.matrix=new MapTileMatrix(this.zoom.rangeRegistry);this.gmap=new GMap2(this.mapObject[0]);this.listeners.push(GEvent.addListener(this.gmap,"load",WE.mapping.requestMarkersForTiles));this.gmap.setCenter(this.perspective.center(),this.perspective.zoom);this.listeners.push(GEvent.addListener(this.gmap,"zoomend",WE.mapping.gmap.zoomHandler));this.listeners.push(GEvent.addListener(this.gmap,"moveend",WE.mapping.requestMarkersForTiles));this.listeners.push(GEvent.addListener(this.gmap,"moveend",WE.mapping.currentView.capture));this.listeners.push(GEvent.addListener(this.gmap,"click",WE.mapping.gmap.markerClickHandler));this.markerManager=new MarkerManager(this.gmap);this.initializeFeaturedMarkers();this.setMapSizing();this.initializeLogging();this.gmap.initializeControls();this.loadFilter();$("#map_search form").geocoder(this.gmap)};WE.mapping.loadFilter=function(){this.filter=new MarkerFilter($("#map_filter_form form"));setTimeout(function(){WE.mapping.filter.load("/resources/mappables/all.js?"+WE.mapping.cacheBustParam)},500)};WE.mapping.addToMarkerManager=function(c,a){var b=this.processor.jsonToMarkers(c,true);this.markerManager.addMarkers(b,a.min,a.max)};WE.mapping.refreshMarkers=function(){if(!this.markerManager){return}this.log("Refreshing markers");setTimeout(function(){WE.mapping.markerManager.refresh();WE.mapping.log("Done loading");$("#map_loading").hide()},300)};WE.mapping.refreshFilteredMarkers=function(){this.log("Refreshing markers");setTimeout(function(){if(WE.mapping.gmap.selectedMarker){WE.mapping.gmap.selectedMarker.closeWeInfoWindow()}WE.mapping.markerManager.hardRefresh()},200)};WE.mapping.initializeFeaturedMarkers=function(){this.initializeMyMarkers();if(!this.displayStartMarker()){return}this.startMarker=this.processor.getStartMarker();if(this.startMarker){this.markerManager.addMarker(this.startMarker,1);setTimeout(function(){WE.mapping.startMarker.requestWeInfoWindow()},2000)}};WE.mapping.initializeMyMarkers=function(){if(!this.displayMyMarkers()){return}this.myMarkers=this.processor.getMyMarkers();this.markerManager.addMarkers(this.myMarkers,1);this.markerManager.refresh()};WE.mapping.requestMarkersForTiles=function(){var c=WE.mapping.gmap.getZoom();var b=WE.mapping.gmap.getBounds();var a=WE.mapping.matrix.tilesFor(b,c);if(a.length){WE.mapping.log("Begin loading");$("#map_loading").show();$.each(a,function(){var d=this;$.ajax({type:"GET",url:d.url()+"?"+WE.mapping.cacheBustParam,dataType:"script",cache:true,beforeSend:function(){WE.mapping.tilesRequested++;WE.mapping.log("Pending requests: "+WE.mapping.tilesRequested)},complete:function(){WE.mapping.tilesRequested--;WE.mapping.log("Success! Waiting for: "+WE.mapping.tilesRequested);if(!WE.mapping.tilesRequested){WE.mapping.refreshMarkers()}}})})}};WE.mapping.getPerspective=function(){if(this.displayStartMarker()){return MapPerspective.buildFromStartMarker(this.processor.startMarkerJson,WE.mapping.zoom.local)}else{if(WE.mapping.currentView.perspectiveExists()){var a=$.cookieJar("maps").get("perspective");return MapPerspective.buildFromCookie(a)}else{return MapPerspective.buildDefault()}}};WE.mapping.displayMyMarkers=function(){return this.processor.hasMyMarkers()};WE.mapping.displayStartMarker=function(){return this.processor.hasStartMarker()};WE.mapping.infoWindowUrlFor=function(e){var a=e.split("_");var f=a.pop();var d=a.join("_")+"s";var c=Math.floor(parseInt(f,10)/10);var b=["/resources","info_windows",d,c,f+".js"].join("/");if(this.pageCache){b+="?"+this.cacheBustParam}return b};WE.mapping.selectedIconType=function(a){return this.gmap.selectedMarker.getIcon().image.match(a)};WE.mapping.setMapHeight=function(){var a=$(window).height()-this.mapObject.offset().top;this.mapObject.height(a)};WE.mapping.setMapSizing=function(){var a=$("#map_panel").width();this.setMapHeight();$(window).resize(function b(){WE.mapping.gmap.savePosition();WE.mapping.setMapHeight();WE.mapping.gmap.checkResize();WE.mapping.gmap.returnToSavedPosition()})};WE.mapping.initializePanel=function(){var a=$("#map_panel").width();$("#map_panel .toggle").css({left:a}).click(function(){var b=$(this);if($("#map_panel").hasClass("closed")){$("#map_panel").removeClass("closed").animate({left:0},"slow","",function(){WE.mapping.gmap.checkResize();b.html("&laquo;")})}else{$("#map_panel").animate({left:-a},"slow","",function(){$("#map_panel").addClass("closed");WE.mapping.gmap.checkResize();b.html("&raquo;")})}}).show()};WE.mapping.zoom.nextRangeIn=function(){return this.rangeRegistry.zoomInFrom(WE.mapping.gmap.getZoom())};WE.mapping.zoom.hasChangedCurrentRange=function(b,a){return !this.rangeRegistry.inSameRange(b,a)};WE.mapping.zoom.currentRange=function(){return this.rangeRegistry.rangeFor(WE.mapping.gmap.getZoom())};WE.mapping.currentView.url=function(){var a=WE.mapping.baseUrl;if(WE.mapping.gmap.selectedMarker){a+=WE.mapping.gmap.selectedMarker.toUrlParam()}else{a+=MapPerspective.buildFromMap(WE.mapping.gmap).toUrlParam()}return a};WE.mapping.currentView.perspectiveExists=function(){var b=$.cookieJar("maps");var a=b.get("perspective");if(typeof a=="undefined"){return false}else{return true}};WE.mapping.currentView.capture=function(){clearTimeout(this.captureTimeout);var a=function(){var b=MapPerspective.buildFromMap(WE.mapping.gmap);$.cookieJar("maps").set("perspective",b.serialize());WE.console.log("Captured current map zoom and center in cookie");WE.console.log(b.serialize())};this.captureTimeout=setTimeout(a,2000)};WE.mapping.log=function(b){WE.console.log(b);if($("#console").length){var a=$("<p />").html(b);$("#console").append(a);$("#console").scrollTop($("#console")[0].scrollHeight)}};WE.mapping.initializeLogging=function(){if(WE.console.DEBUG){var a=$("<div />").attr("id","console").addClass("spadded").addClass("hidden");$("#main").append(a)}};WE.mapping.initializeCTAs=function(){$(".add_guest_group").openFaceboxAndLoadJavascript();setTimeout(function(){$(".share_bookmarks_button").liveSocialBookmark({services:"facebookshare, twitter, googlebookmarks, delicious, digg, stumbleupon",url:WE.mapping.currentView.url,position:"belowLeft",callback:WE.social.omnitureEventTriggerFunction("Map")})},2000)};if(typeof Wildfire=="undefined"){Wildfire=new Object();Wildfire.LinkedLoading=true;Wildfire._pixeIframeCreated=false;Wildfire._NextZIndex=1000}Wildfire.Flash={isIE:(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin:(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera:(navigator.userAgent.indexOf("Opera")!=-1)?true:false,getFlashVersion:function(){var b=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash"]){var a=navigator.plugins["Shockwave Flash"].description;if(a!=null){b=a.split(" ")[2].split(".")[0]}}}else{if(this.isIE&&this.isWin&&!this.isOpera){try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");var a=c.GetVariable("$version")}catch(d){}if(a!=null){b=a.split(" ")[1].split(",")[0]}}}return b},AC_Generateobj:function(e,d,a){var c="";if(this.isIE&&this.isWin&&!this.isOpera){c+="<object ";for(var b in e){c+=b+'="'+e[b]+'" '}c+=">";for(var b in d){c+='<param name="'+b+'" value="'+d[b]+'" /> '}c+="</object>"}else{c+="<embed ";for(var b in a){c+=b+'="'+a[b]+'" '}c+="> </embed>"}return c},AC_FL_GetContent:function(){var a=this.AC_GetArgs(arguments);return this.AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)},AC_GetArgs:function(b,d,f){var a={};a.embedAttrs={};a.params={};a.objAttrs={};for(var c=0;c<b.length;c=c+2){var e=b[c].toLowerCase();switch(e){case"movie":a.embedAttrs.src=b[c+1];a.params.movie=b[c+1];break;case"id":case"width":case"height":case"align":case"name":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";a.objAttrs.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";a.embedAttrs.type="application/x-shockwave-flash";a.embedAttrs.pluginspage="http://www.macromedia.com/go/getflashplayer";return a}};Wildfire.onClose=Wildfire.onPostProfile=Wildfire.onPostComment=Wildfire.onSend=Wildfire.onEmail=function(){};Wildfire.modules=new Object();Wildfire.modulesArray=new Array();Wildfire.initShare=function(e,c,d,a,b){return Wildfire._createJSModule("share",""+e,c,d,a,b,"cssURL,cornerRoundness,initialMessageType,domainForCallback,partner,source,partnerData,width,height,emailTabHidden,customCheckboxVisible,customCheckboxChecked,customCheckboxText,internalColor,frameColor,externalColor,tabTextColor,textColor,fontType,fontSize,headerInternalColor,headerFrameColor")};Wildfire.initPost=function(e,c,d,a,b){return Wildfire._createFlashModule("post",""+e,c,d,a,b)};Wildfire.init=Wildfire.initShare;Wildfire.applyConfig=function(a){if(isnotnull(Wildfire.share)){Wildfire.share.applyConfig(a)}};Wildfire._GetFlashModuleXMLConfig=function(a){document.getElementById(a).style.background="";var b=document.getElementById(a+"_progress");if(b!=null){b.innerHTML="&nbsp;";b.style.display="none";b.style.visibility="hidden"}xs=["config",[],["display",["width","height","showCodeBox","rememberMeVisible","emailImportProviders","networksToShow","networksToHide","bookmarksToShow","bookmarksToHide","bulletinChecked","showEmail","showPost","showBookmark","showDesktop","showCloseButton"],"body",["font=fontType","size=fontSize"],["background",["frame-color=frameColor","background-color=internalColor","corner-roundness=cornerRoundness"],"controls",[],["textboxes",[],["inputs",["color=textInputColor","background-color=textInputBackgroundColor","frame-color=textInputBorderColor"]],"snbuttons",["color=tabTextColor|snButtonsTextColor","background-color=snButtonsBackgroundColor","frame-color=snButtonsFrameColor","over-color=tabTextColor|snButtonsOverTextColor","over-background-color=snButtonsOverBackgroundColor","over-frame-color=snButtonsOverFrameColor"],"buttons",["font=fontType|buttonFontType","color=buttonTextColor"]],'texts background-color="transparent" ',["color=textColor"],["messages",["color=messageTextColor"],"links",["font=linkFontType","color=linkTextColor"],"privacy",["color=privacyTextColor"]]]]];var d=Wildfire._GetFlashModuleConfig(a);var c=Wildfire._BuildXMLConfigFromJSON(d,xs);return c};Wildfire._GetFlashModuleConfigAttribute=function(h,d,j,b){document.getElementById(h).style.background="";var g=document.getElementById(h+"_progress");if(g!=null){g.innerHTML="&nbsp;";g.style.display="none";g.style.visibility="hidden"}var a=Wildfire.modules[h];if(a!=null){var l=a.config[d];if(typeof l=="undefined"){return null}if(typeof l=="function"){return l(d,b)}if(j==true){if(isnotnull(l)){try{var c=document.getElementById(l);if(isnotnull(c)){return c.value}else{return l}}catch(f){return l}}}else{return l}}else{return{error:"Modlue not found",MID:h}}};Wildfire._GetFlashModuleConfig=function(a){if(Wildfire.modules==null){alert("Wildfire has no modules yet")}var c=Wildfire.modules[a];if(c!=null){var b=c.config;return b}else{return null}};Wildfire._BuildXMLConfigFromJSON=function(g,a){var o=new Array();try{for(var d=0;d<a.length;d+=2){o[o.length]="<"+a[d]+" ";var h=a[d+1];for(var b=0;b<h.length;b++){var l=h[b].split("=");var m=l[0];var c;if(l.length>1){c=l[1]}else{c=l[0]}var n=c.split("|");for(var f=0;f<n.length;f++){if(typeof g[n[f]]!="undefined"){o[o.length]=m+'="';o[o.length]=(""+g[n[f]]).replace("&","&amp;").replace('"',"&quot;").replace("<","&lt;").replace(">","&gt;");o[o.length]='" ';break}}}if(d+2==a.length){o[o.length]="/>"}else{if(typeof a[d+2]!="string"){o[o.length]=">";o[o.length]=Wildfire._BuildXMLConfigFromJSON(g,a[d+2]);o[o.length]="</"+a[d].split(" ")[0]+">";d++}else{o[o.length]="/>"}}}}catch(j){}return o.join("")};Wildfire._createJSModule=function(h,a,j,b,m,d,l){try{d.location=document.location.href}catch(e){}d.partner=a;d.width=b;d.height=m;if(undef(h)||undef(a)||undef(j)||undef(b)||undef(m)||undef(d)){return}var c=this[j]=this.modules[j]=this.modulesArray[this.modulesArray.length]=new Wildfire._JSModule();c.copyConfig(d);c.ready=false;c.type=h;c.id=j;c.partner=a;c.width=b;c.height=m;c.container=document.getElementById(j);c.container.style.width=b+"px";c.container.style.height=m+"px";c.qsParams=new Array();var g=l.split(",");for(var f=0;f<g.length;f++){Wildfire._addQSParam(c,g[f])}c.init(true);return c};Wildfire._origOnLoad=null;Wildfire._onLoad=function(a){Wildfire.onLoad=Wildfire._origOnLoad;if(Wildfire.LinkedLoading==false){if(Wildfire._origOnLoad!=null){Wildfire._origOnLoad(a)}return}Wildfire.LinkedLoading=false;if(Wildfire._origOnLoad!=null){Wildfire._origOnLoad(a)}if((a.ModuleID==Wildfire.modulesArray[0].id)){for(var b=1;b<Wildfire.modulesArray.length;b++){if(!Wildfire.modulesArray[b].ready){try{Wildfire.modulesArray[b].init(true)}catch(c){}}}}};Wildfire._createTextareaModule=function(f,a,d,c){var g="";var e=d.defaultContent;if(document.getElementById(e)!=null){e=document.getElementById(e).value}if(!(d.UIConfig&&(d.UIConfig.indexOf('showCodeBox="false"')!=-1||d.UIConfig.indexOf("showCodeBox='false'")!=-1))){g+='<textarea style="width: '+f+"px; height: "+a+'px">';g+=e;g+="</textarea>"}var b=document.getElementById(c);b.style.width=f+"px";b.style.height=a+"px";b.innerHTML=g};Wildfire._createFlashModule=function(j,a,l,b,n,d){try{if(typeof d.bookmarkURL=="undefined"){d.bookmarkURL=document.location.href}}catch(g){}if(Wildfire.LinkedLoading){if(typeof Wildfire.onLoad!="undefined"&&Wildfire.onLoad!=Wildfire._onLoad){Wildfire._origOnLoad=Wildfire.onLoad}Wildfire.onLoad=Wildfire._onLoad}var m=false;var h;if(this.modules[l]!=null){m=true;document.getElementById(l).innerHTML="&nbsp;";h=this.modules[l].idxInArray}else{h=this.modulesArray.length}try{d.location=document.location.href}catch(f){}d.partner=a;d.width=b;d.height=n;if(undef(j)||undef(a)||undef(l)||undef(b)||undef(n)||undef(d)){return}var c=new Wildfire._FlashModule();this.modulesArray[h]=this[l]=this.modules[l]=c;c.idxInArray=h;c.copyConfig(d);c.queued=false;c.ready=false;c.type=j;c.id=l;c.partner=a;c.width=b;c.height=n;c.container=document.getElementById(l);c.container.style.width=b+"px";c.container.style.height=n+"px";if(!Wildfire.LinkedLoading||this.modulesArray.length==1||this.modulesArray[0].ready){c.init(true)}else{c.queued=true}return c};Wildfire._raiseModulesUpdate=function(){var c="";for(var a in this.modules){c+=a+","}var b={type:"modulesUpdate",modules:c};this._raiseSysEvent(b)};Wildfire._raiseSysSignoutEvent=function(){this._raiseSysEvent({type:"signout"})};Wildfire._raiseSysEvent=function(c){if(this.modulesArray.length<=1){return}for(var b in this.modules){var a=this.modules[b].raiseSysEvent;if(a!=null){a(c)}}};Wildfire._onFrameLoaded=function(b){var c=document.getElementById(b+"_UIFrame");if(c!=null){c.style.visibility="visible"}var a=document.getElementById(b+"_progress");if(a!=null){a.style.display="none"}this.modules[b].UIFrame.style.visibility="visible";this.modules[b].applyConfig();this.modules[b].ready=true;setTimeout("Wildfire._raiseModulesUpdate()",1500)};Wildfire._addQSParam=function(b,a){if(def(typeof b.config)&&def(b.config[a])){b.qsParams[b.qsParams.length]=a+"="+Wildfire._URLEncode(b.config[a])}};Wildfire._URLEncode=function(a){if(encodeURIComponent){return encodeURIComponent(a)}else{es=escape(a);return es.replace(/\+/g,"%2b").replace(/%20/g,"+").replace(/[/]/g,"%2f").replace(/%3D/g,"%3d")}};Wildfire._onCallback=Wildfire._raiseEvent=function(c){try{switch(c.type){case"send":if(isnotnull(Wildfire.onSend)){Wildfire.onSend(c)}break;case"postComment":if(isnotnull(Wildfire.onPostComment)){Wildfire.onPostComment(c)}break;case"postProfile":if(isnotnull(Wildfire.onPostProfile)){var b=["Wildfire.onPostProfile({"]}for(var e in c){b.push(e);b.push(":'");b.push(c[e]);b.push("'");b.push(",")}b.pop();b.push("})");window.setTimeout(b.join(""),1);break;case"close":if(isnotnull(Wildfire.onClose)){Wildfire.onClose(c)}if(isnotnull(Wildfire.modules[c.ModuleID].config.onClose)){Wildfire.modules[c.ModuleID].config.onClose(c)}break;case"renderDone":if(isnotnull(Wildfire.modules[c.ModuleID].config.onRenderDone)){Wildfire.modules[c.ModuleID].config.onRenderDone(c)}break;case"networkButtonClicked":if(isnotnull(Wildfire.modules[c.ModuleID].config.onNetworkButtonClicked)){Wildfire.modules[c.ModuleID].config.onNetworkButtonClicked(c)}break;case"load":if(isnotnull(Wildfire.onLoad)){Wildfire.modules[c.ModuleID].ready=true;Wildfire.onLoad(c)}break;case"email":if(isnotnull(Wildfire.onEmail)){Wildfire.onEmail(c)}}}catch(d){}};Wildfire._Module=function(){};Wildfire._JSModule=function(){this.formsContainer=null;this.pingTimeout=null};Wildfire._JSModule.prototype=new Wildfire._Module();Wildfire._FlashModule=function(){};Wildfire._FlashModule.prototype=new Wildfire._Module();Wildfire._JSModule.prototype.pingOK=function(a){window.clearTimeout(this.pingTimeout);this.config.safeMode=!a;this.init(false)};Wildfire._FlashModule.prototype.init=function(b){var a="";if((""+this.config.isApply)!="true"&&this.config.hideProgress!=true){document.getElementById(this.id).style.background="url("+this.config.progressImageSrc+") no-repeat center center"}var c="http://cdn.gigya.com/WildFire/swf/wildfire_en.swf";if(this.config.lang!=null){c="http://cdn.gigya.com/WildFire/swf/wildfire_"+this.config.lang+".swf"}var d=(this.config.nowmode?"":"transparent");if(this.config.wmodeType){d=this.config.wmodeType}a+=Wildfire.Flash.AC_FL_GetContent("id","wfmodule_"+this.id,"name","wfmodule_"+this.id,"width",this.config.width,"height",this.config.height,"movie",c,"quality","high","align","middle","play","true","loop","true","scale","showall","wmode",d,"devicefont","false","bgcolor",((this.config.nowmode&&this.config.outsideColor)?this.config.outsideColor:"#ffffff"),"menu","true","allowFullScreen","false","allowScriptAccess","always","salign","","flashvars","ModuleID="+this.id+"&now="+(new Date()).getTime(),"swLiveConnect","true");window["wfmodule_"+this.id]=null;if(!Wildfire._pixeIframeCreated){a+="<iframe src='http://cdn.gigya.com/wildfire/do_not_delete.htm' style='width:0;height:0;visibility:hidden' />";Wildfire._pixeIframeCreated=true}this._injectWFCode(a);window["wfmodule_"+this.id]=document.getElementById("wfmodule_"+this.id)};Wildfire._IsModuleReady=function(a){return(window["wfmodule_"+a]!=null)};Wildfire._JSModule.prototype.init=function(c){var d="http://wildfire.gigya.com/wildfire";var a=this.id;var j=a+"_UIFrame";var f=this.config;if(!f.safeMode&&c&&this.pingTimeout==null){var h=document.createElement("script");h.src=d+"/jsping.ashx?mid="+a+"&rand="+Math.random()+Math.random();this.container.appendChild(h);this.pingTimeout=window.setTimeout("Wildfire.modules['"+a+"'].pingOK(false)",10000);return}var g=this.qsParams.join("&");g+=("&mid="+a);var e="";var l="";var b=d+"/"+this.type+"Main.aspx?"+g;if(f.safeMode){b=this.getSafeModeURL();if(b==null){Wildfire[a]=Wildfire.modules[a]=Wildfire.modulesArray[Wildfire.modulesArray.length]=null;return null}e+="<iframe allowtransparency='true' id="+j+" name="+j+" style='width:"+f.width+"px;height:"+f.height+"px;display:inherit;visibility:inherit' frameborder=0 scrolling=no></iframe>";l+="<form id='"+a+"_postForm' action='"+b+"' method='POST' target="+j+" style='display:none'></form>"}else{if(f.simple){if(this.type=="share"){b=d+"/shareSimple.aspx"}if(b==null){Wildfire[a]=Wildfire.modules[a]=Wildfire.modulesArray[Wildfire.modulesArray.length]=null;return null}e+="<iframe allowtransparency='true' id="+j+" name="+j+" style='width:"+f.width+"px;height:"+f.height+"px;display:inherit;visibility:inherit' frameborder=0 scrolling=no></iframe>";l+="<form id='"+a+"_postForm' action='"+b+"' method='POST' target="+j+" style='display:none'></form>"}else{e+="<div style='position:relative;top:50%;text-align:center;font-size:12px;' id='"+a+"_progress'><center><img  src='"+f.progressImageSrc+"'></center></div>";e+="<iframe allowtransparency='true' onload='Wildfire._onFrameLoaded(\""+a+"\")' id="+j+" style='visibility:hidden;width:"+f.width+"px;height:"+f.height+"px;' src='"+b+"' frameborder=0 scrolling=no></iframe>";e+='<iframe id="IFREndlessActivityBugFix" style="display:none;width:100px;height:10px"></iframe>';e+=this._createCBFrame();l+="<form id='"+a+"_postForm' action='"+d+"/WFHandler.ashx?cmd=config' method='POST' target='"+a+"_postTargetFrame' style='display:none'></form>";l+="<form id='"+a+"_sysEventForm' action='"+d+"/WFHandler.ashx?cmd=sysEvent' method='POST' target='"+a+"_sysEventFrame' style='display:none'></form>"}}this._injectWFCode(e,l);if(document.getElementById(a+"_wfCBFrame")==null){f.domainForCallback=null}this.UIFrame=document.getElementById(a+"_UIFrame");this.postForm=document.getElementById(a+"_postForm");this.sysEventForm=document.getElementById(a+"_sysEventForm");if(f.simple||f.safeMode){this.applyConfig()}};Wildfire._JSModule.prototype._createCBFrame=function(){if(def(this.config.domainForCallback)&&document.getElementById(this.id+"_wfCBDiv")==null){try{document.domain=this.config.domainForCallback;return"<iframe name='"+this.id+"_wfCBFrame' style='visibility:hidden;width:0px;height:0px;' src='http://wildfire."+this.config.domainForCallback+"/wildfire/WFHandler.ashx?domain="+escape(this.config.domainForCallback)+"'></iframe>"}catch(a){return""}}else{return""}};Wildfire._FlashModule.prototype.copyConfig=Wildfire._JSModule.prototype.copyConfig=function(a){if(a!=null){this.config={};for(var b in a){this.config[b]=a[b]}}if(undef(this.config.progressImageSrc)){this.config.progressImageSrc="http://cdn.gigya.com/WildFire/i/progress_ani.gif"}if(undef(this.config.simple)){this.config.simple=navigator.userAgent.toLowerCase().indexOf("safari")!=-1}};Wildfire._JSModule.prototype.getSafeModeURL=function(){if(this.type=="share"){return"http://backup.gigya.com/WFSimple/share.aspx"}return null};Wildfire._JSModule.prototype._injectWFCode=function(a,c){var b=this.container;for(;((b!=null)&&((""+b.tagName).toLowerCase()!="form"));b=b.parentNode){}if(b!=null){this.container.innerHTML=a;this.formsContainer=document.createElement("div");this.formsContainer.style.display="none";b.parentNode.insertBefore(this.formsContainer,b);this.formsContainer.innerHTML=c}else{this.container.innerHTML=a+c}};Wildfire._FlashModule.prototype._injectWFCode=function(a){this.container.innerHTML=a};Wildfire._JSModule.prototype.raiseSysEvent=function(d){if(this.sysEventForm==null||!this.ready){return}var c=new Array();var b=0;for(var a in d){if(typeof a!="function"&&d[a]!=null){c[b++]="<input type=hidden name='"+a+"'/>"}}this.sysEventForm.innerHTML=c.join("");for(var b=0;b<this.sysEventForm.length;b++){this.sysEventForm[b].value=d[this.sysEventForm[b].name]}this.sysEventForm.submit()};Wildfire._FlashModule.prototype.applyConfig=function(a){a.isApply="true";return Wildfire._createFlashModule(this.type,this.partner,this.id,this.width,this.height,a)};Wildfire._JSModule.prototype.applyConfig=function(b){if(b!=null){this.copyConfig(b)}var a=this.config;if(a==null){return}if(a.location==null||a.location==""){try{a.location=document.location.href}catch(f){}}a.partner=this.partner;a.width=this.width;a.height=this.height;postContent=["default","myspace","hi5","friendster","xanga","livejournal","freewebs","facebook","bebo","blogger","tagged","typepad","blackplanet"];for(var h=0;h<postContent.length;h++){this._getTemplate(postContent[h]+"Content")}shareTemplates=["default","comment","email","myspace","hi5","friendster","xanga","freewebs"];for(var g=0;g<shareTemplates.length;g++){this._getTemplate(shareTemplates[g]+"Template")}var e=new Array();var d=0;for(var c in a){if(typeof c!="function"&&a[c]!=null){e[d++]="<input type=hidden name='"+c+"'/>"}}this.postForm.innerHTML=e.join("");for(var d=0;d<this.postForm.length;d++){this.postForm[d].value=this.config[this.postForm[d].name]}this.postForm.submit();window.setTimeout("Wildfire._EndlessActivityBugFix();",1000)};Wildfire._EndlessActivityBugFix=function(){var a=document.getElementById("IFREndlessActivityBugFix");if(a!=null){a.src="http://cdn.gigya.com/wildfire/i/n.gif"}};Wildfire._JSModule.prototype._getTemplate=function(a){if(isnotnull(this.config[a])){try{if(isnotnull(document.getElementById(this.config[a]))){this.config[a]=document.getElementById(this.config[a]).value}}catch(b){}}};Wildfire._CopyAtts=function(a,b,c){for(k in c.split(",")){a[c[k]]=b[c[k]]}};Wildfire._CopyAllAtts=function(a,b){for(k in b){a[k]=b[k]}};function undef(a){return(typeof(a)=="undefined")}function def(a){return(typeof(a)!="undefined")}function isnotnull(a){return(def(a)&&(a!=null))}function WFQueue(){var a=new Array();var b=0;this.count=function(){return a.length};this.enqueue=function(c){a.push(c)};this.dequeue=function(){if(a.length){var d=a[b];if(++b*2>=a.length){for(var c=b;c<a.length;c++){a[c-b]=a[c]}a.length-=b;b=0}return d}else{return undefined}}}Wildfire._GetElementPos=function(a){var b=curtop=0;if(a.offsetParent){do{b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent)}return{left:b,top:curtop}};Wildfire._HandleEmbedAndObjectsBelow=function(n,j,t){var m=true;var a=Wildfire._GetElementPos(n);var f=a.top;var e=a.left;var v=e+j;var l=f+t;var p;if(Wildfire.Flash.isIE){p=["iframe"]}else{p=["embed","iframe"]}for(var r=0;r<p.length;r++){tagname=p[r];elements=document.getElementsByTagName(tagname);for(var s=0;s<elements.length;s++){var c=elements[s];if(c.style.visibility!="hidden"&&n.childNodes[0]!=c){var g=Wildfire._GetElementPos(c);var q=g.top;var o=g.left;var b=(document.defaultView)?document.defaultView.getComputedStyle(c,""):c.currentStyle;var d=o+parseInt(b.getPropertyValue?b.getPropertyValue("width"):b.width);var u=q+parseInt(b.getPropertyValue?b.getPropertyValue("height"):b.height);if(!((q>l)||(u<f)||(o>v)||(d<e))){var x=(tagname=="iframe")&&((c.id+"          ").substr(0,10)!="gigya_ifr_");if(((tagname=="embed")&&((c.getAttribute("wmode")==null)||(c.getAttribute("wmode")=="")||(c.getAttribute("wmode")=="window")))||x){if(m&&(n.id!="coreDiv")){c.style.visibility="hidden";if(n.elementsToShowOnClose==null){n.elementsToShowOnClose=[]}n.elementsToShowOnClose.push(c)}}}}}}};Wildfire._CreateContainer=function(e,a){var d;if(Wildfire.Flash.isIE&&Wildfire.Flash.isWin&&!a){d=document.createElement("IFRAME");d.id="gigya_ifr_"+e;d.frameBorder="0";d.style.border="0px";d.style.position="absolute";d.style.width="1px";d.style.height="1px";if(d.style.zIndex!=null){d.style.zIndex=Wildfire._NextZIndex++}}var c=document.createElement("div");c.style.position="absolute";if(c.style.zIndex!=null){c.style.zIndex=Wildfire._NextZIndex++}var b="";c.innerHTML=b;c.id=e;c.swfLoaded=false;if(document.body){if(document.body.insertBefore){if(document.body.firstChild){if(d!=null){document.body.insertBefore(d,document.body.firstChild)}document.body.insertBefore(c,document.body.firstChild)}}}return c};Wildfire._hideWildfirePopup=function(d){var b=document.getElementById(d.ModuleID);var e=document.getElementById("gigya_ifr_"+d.ModuleID);if(e!=null){e.style.visibility="hidden"}var c=b.elementsToShowOnClose;if(c!=null){for(var a=0;a<c.length;a++){c[a].style.visibility=""}}b.style.visibility="hidden"};if(typeof Wildfire._popupConfigs=="undefined"){Wildfire._popupConfigs=[]}Wildfire.drawWildfireButton=function(e){if(typeof e.w=="undefined"){e.w=400}if(typeof e.h=="undefined"){e.h=300}if(e.b==null){e.b="click"}var a="";if(typeof(e.btnurl)=="undefined"){switch(e.conf.module){case"bookmarks":e.btnurl="http://cdn.gigya.com/wildfire/i/bookmark_button.gif";break;case"post":default:e.btnurl="http://cdn.gigya.com/wildfire/i/post-to-button.gif"}}switch(e.conf.module){case"bookmarks":a="Add to bookmarks";e.conf.showBookmark="true";e.conf.showEmail="false";e.conf.showPost="false";break;case"post":e.conf.showEmail="true";e.conf.showBookmark="true";default:a="Post to my social network or blog"}switch(e.theme){case"1":e.conf.UIConfig='<config><display showEmail="true" useTransitions="true" showBookmark="true"></display><body corner-roundness="8"><background gradient-color-begin="#00006D" gradient-color-end="#28516D"></background><controls><snbuttons type="textUnder" background-color="#FFFFFF" over-background-color="#FFFFFF" color="DEE8EC" corner-roundness="0;10;0;10" size="11" bold="true" over-color="#FFFFC8"></snbuttons><textboxes><codeboxes color="#6A6A6A" frame-color="#0D1B6D" background-color="DEE8EC"></codeboxes><inputs gradient-color-begin="E9F0F3" gradient-color-end="E9F0F3"></inputs><dropdowns list-item-over-color="#1B0D6D" gradient-color-begin="E9F0F3" gradient-color-end="E9F0F3" list-item-over-gradient-color-end="#28516D"></dropdowns></textboxes><buttons gradient-color-begin="#0099FF" gradient-color-end="#223276" color="#FFFFFF" corner-roundness="0;8;0;8" font="arial" size="11" bold="true" over-gradient-color-begin="#0099FF" over-gradient-color-end="#0099FF"></buttons><servicemarker gradient-color-begin="Transparent" gradient-color-end="#0098FE"></servicemarker></controls><texts color="#FFFFFF" bold="true"><privacy color="#AAAAAA"></privacy><labels color="C1D7E5"></labels><messages color="#F4F4F4" background-color="#1B366D" bold="true"></messages><links color="E9F0F3" underline="false" over-color="#ADC8FF"></links></texts></body></config>';break;case"2":e.conf.UIConfig='<config><display showDesktop="false" showEmail="true" useTransitions="true" showBookmark="true" codeBoxHeight="auto" showCodeBox="true" showCloseButton="false" bulletinChecked="false" networksWithCodeBox=""></display><body corner-roundness="8"><background frame-color="Transparent" gradient-color-begin="#353535" gradient-color-end="#606060" corner-roundness="8;8;8;8"></background><controls size="11" bold="true"><snbuttons type="textUnder" frame-color="#6D0000" background-color="#FFFFFF" over-background-color="#FFFFFF" color="#CACACA" corner-roundness="0;8;8;8" gradient-color-begin="#8A8A8A" gradient-color-end="#000000" font="Arial" size="11" bold="false" over-gradient-color-begin="#AAAAAA" over-gradient-color-end="#000000" over-color="#F4F4F4" down-color="#000000"><more frame-color="Transparent"></more></snbuttons><textboxes frame-color="#000000" color="#AAAAAA" corner-roundness="0;0;0;0" gradient-color-begin="#202020" gradient-color-end="#0B0B0B" font="Arial" bold="false"><codeboxes color="#EAEAEA" frame-color="#8A8A8A" gradient-color-begin="#000000" font="Arial" bold="false"></codeboxes><inputs frame-color="#6D0000"></inputs><dropdowns frame-color="#6D0000" handle-gradient-color-begin="#B60000" handle-gradient-color-end="#6D0000" handle-over-gradient-color-begin="#FF0000" handle-over-gradient-color-end="#DA0000" handle-down-gradient-color-begin="#FF0000" handle-down-gradient-color-end="#6D0000" background-color="#6D0000" gradient-color-begin="#000000" font="Arial" bold="false"></dropdowns></textboxes><buttons frame-color="#FF0000" gradient-color-begin="#FF2424" gradient-color-end="#6D0000" color="#F4F4F4" corner-roundness="0;8;8;8" font="Arial" size="10" bold="false" down-frame-color="#000000" over-gradient-color-begin="#DA0000" down-gradient-color-begin="#910000" over-gradient-color-end="#DA0000" down-gradient-color-end="#FF0000" over-color="#F4F4F4"><post-buttons gradient-color-begin="#FF4949" gradient-color-end="#6D0000"></post-buttons></buttons><listboxes corner-roundness="5"></listboxes><checkboxes down-corner-roundness="0"></checkboxes><servicemarker gradient-color-begin="#DA0000" gradient-color-end="#DA0000"></servicemarker></controls><texts color="#FFFFFF" font="Arial" size="10"><privacy color="#959595" size="11"></privacy><headers size="11" bold="true"></headers><labels size="11" bold="true"></labels><messages color="#D5D5D5" frame-thickness="0" corner-roundness="0;0;0;0" gradient-color-begin="#B60000" gradient-color-end="#000000" size="11" bold="true"></messages><links color="#DFDFDF" underline="false" size="11" bold="true" over-color="#FFFFFF"></links></texts></body></config>';break;case"3":e.conf.UIConfig='<config><display showDesktop="false" showEmail="true" useTransitions="true" showBookmark="true" codeBoxHeight="auto" showCodeBox="true" showCloseButton="false" bulletinChecked="false" networksWithCodeBox=""></display><body corner-roundness="8"><background frame-color="Transparent" gradient-color-begin="#DA0000" gradient-color-end="#FFC8AD" corner-roundness="8;8;8;8"></background><controls size="11" bold="true"><snbuttons type="textUnder" frame-color="#DA0000" background-color="#FFFFFF" over-frame-color="#F4F4F4" over-background-color="#FFFFFF" color="#6D0000" corner-roundness="0;8;8;8" gradient-color-begin="#6D0000" gradient-color-end="#6D0000" font="Arial" size="11" bold="true" down-frame-color="#6D0000" over-gradient-color-begin="#FFAD9F" down-gradient-color-begin="#910000" over-gradient-color-end="#6D0D1B" down-gradient-color-end="#FFAD9F" over-color="#F4F4F4" down-color="#000000"><more frame-color="#AAAAAA" over-frame-color="#AAAAAA" gradient-color-begin="#DA0000" over-gradient-color-begin="#FF5B40"></more><previous frame-color="#AAAAAA" background-color="DBDBDB" over-frame-color="#6D0000" over-background-color="#6A6A6A" gradient-color-begin="#FF5B40" gradient-color-end="#6D0D1B" down-frame-color="6D0000" down-background-color="DBDBDB" over-gradient-color-begin="#910000" down-gradient-color-begin="FF5B40" over-gradient-color-end="#FFAD9F" down-gradient-color-end="6D0D1B"></previous></snbuttons><textboxes frame-color="#353535" color="#F4F4F4" corner-roundness="0;0;0;0" gradient-color-begin="#202020" gradient-color-end="#0B0B0B" font="Arial" bold="false"><codeboxes color="#1B366D" frame-color="#DA0000" gradient-color-begin="#EAEAEA" gradient-color-end="#F4F4F4" font="Arial" bold="false"></codeboxes><inputs frame-color="#B60000" color="#606060" gradient-color-begin="#DFDFDF" gradient-color-end="#DFDFDF"></inputs><dropdowns list-item-over-color="#FF2424" frame-color="#B60000" handle-gradient-color-begin="#AEC8F7" handle-gradient-color-end="#6D0000" handle-over-gradient-color-begin="#AEC8F7" handle-over-gradient-color-end="#AEC8F7" handle-down-gradient-color-begin="#FF0000" handle-down-gradient-color-end="#6D0000" background-color="#EAEAEA" color="#4A4A4A" gradient-color-begin="#EAEAEA" gradient-color-end="#EAEAEA" font="Arial" bold="false" list-item-over-gradient-color-end="#F4F4F4"></dropdowns></textboxes><buttons frame-color="#DA0000" gradient-color-begin="#FF0000" gradient-color-end="#910000" color="#F4F4F4" corner-roundness="0;8;8;8" font="Arial" size="10" bold="true" over-frame-color="#DA0000" down-frame-color="#F4F4F4" over-gradient-color-begin="#DA0000" down-gradient-color-begin="#910000" over-gradient-color-end="#910000" down-gradient-color-end="#0D1B6D" over-color="#F4F4F4"><post-buttons gradient-color-begin="#FF4949" gradient-color-end="#6D0000"></post-buttons></buttons><listboxes corner-roundness="5;5;5;5" bold="false"></listboxes><checkboxes down-corner-roundness="0"></checkboxes><servicemarker gradient-color-begin="#555555" gradient-color-end="#555555"></servicemarker></controls><texts color="#FFFFFF" font="Arial" size="10" bold="true"><privacy color="#910000" size="11" bold="false"></privacy><headers size="11" bold="true"></headers><labels color="#B60000" size="11" bold="true"></labels><messages color="#FFC8AD" background-color="#1B366D" frame-thickness="0" corner-roundness="3;3;3;3" gradient-color-begin="#912412" gradient-color-end="#6D1B0D" size="11" bold="true"></messages><links color="#F4F4F4" underline="false" size="11" bold="true" over-color="#FFFFFF"></links></texts></body></config>';break;case"4":e.conf.UIConfig='<config><display showDesktop="false" showEmail="true" useTransitions="true" showBookmark="true" codeBoxHeight="auto" showCodeBox="true" showCloseButton="false" bulletinChecked="false" networksWithCodeBox=""></display><body corner-roundness="8"><background frame-color="Transparent" gradient-color-begin="#A4DA52" gradient-color-end="#6D9136" corner-roundness="8"></background><controls size="11" bold="true"><snbuttons type="textUnder" frame-color="#6D9136" background-color="#FFFFFF" over-frame-color="#D5D5D5" over-background-color="#FFFFFF" color="#1B6D0D" corner-roundness="0;8;0;8" gradient-color-begin="#88B644" gradient-color-end="#000000" font="Arial" size="11" bold="true" over-gradient-color-begin="#88B644" down-gradient-color-begin="#DADA6D" over-gradient-color-end="#000000" down-gradient-color-end="#6D9136" over-color="#F4F4F4" down-color="#000000"><more frame-color="#BABABA" gradient-color-begin="#516D28" gradient-color-end="#516D28" bold="true"></more><previous frame-color="#BABABA" gradient-color-begin="#516D28" gradient-color-end="#516D28"></previous></snbuttons><textboxes frame-color="#000000" color="#AAAAAA" corner-roundness="0;8;0;8" gradient-color-begin="#6D5128" gradient-color-end="#6D5128" font="Verdana" corner-roundness-top="8" corner-roundness-bottom="8" bold="false"><codeboxes color="#EAEAEA" frame-color="6D1B0D" background-color="#B6B65B" gradient-color-begin="#919148" gradient-color-end="#919148" font="Arial" bold="false"></codeboxes><inputs frame-color="#6D1B0D" color="#FFFFC8" gradient-color-begin="#919148" gradient-color-end="#919148" font="Arial"></inputs><dropdowns list-item-over-color="6D1B0D" frame-color="#6D1B0D" handle-gradient-color-begin="#FFFFC8" handle-gradient-color-end="#DADA6D" handle-over-gradient-color-begin="#FFFFC8" handle-over-gradient-color-end="#FFFFB6" handle-down-gradient-color-begin="#DADA6D" handle-down-gradient-color-end="#DADA6D" background-color="#FFFFC8" color="#FFFFC8" gradient-color-begin="#919148" gradient-color-end="#919148" font="Arial" bold="false" list-item-over-gradient-color-end="#FFFFC8"></dropdowns></textboxes><buttons frame-color="6D1B0D" gradient-color-begin="#FFFFC8" gradient-color-end="#B6B65B" corner-roundness="0;8;8;8" font="Arial" size="11" bold="true" over-frame-color="#6D1B0D" down-frame-color="#F4F4F4" over-gradient-color-begin="#FFFFC8" down-gradient-color-begin="#F4F4F4" over-gradient-color-end="#DADA6D" down-gradient-color-end="#FFFF92" over-color="#28516D"><post-buttons frame-color="#6D1B0D" background-color="#FFFFC8" gradient-color-begin="#FFFFC8" gradient-color-end="B6B65B"></post-buttons></buttons><listboxes corner-roundness="5;5;5;5" bold="false"></listboxes><checkboxes down-corner-roundness="0"></checkboxes><servicemarker gradient-color-begin="#A4DA52" gradient-color-end="#516D28"></servicemarker></controls><texts color="#FFFFFF" font="Arial" size="11" bold="true"><privacy color="#6D361B" size="11" bold="true"></privacy><headers color="#EAEAEA" size="11" bold="true"></headers><labels color="#6D1B0D" size="11" bold="true"></labels><messages color="#6D6D36" background-color="#1B366D" frame-thickness="0" corner-roundness="0;0;0;0" gradient-color-begin="#FFFFC8" gradient-color-end="#FFFFC8" size="11" bold="true"></messages><links color="#FFFFFF" underline="false" size="11" bold="true" over-color="#6D1B0D" down-color="#366D1B"></links></texts></body></config>';break;case"5":e.conf.UIConfig='<config><display showEmail="true" useTransitions="true" showBookmark="true"></display><body corner-roundness="8"><background gradient-color-begin="#ADC8FF"></background><controls><snbuttons type="textUnder" background-color="#FFFFFF" over-background-color="#FFFFFF" color="#376DDA" corner-roundness="0;10;0;10" size="11" bold="false" over-color="#0D1B6D"></snbuttons><textboxes><codeboxes color="#6A6A6A" frame-color="#1B366D" background-color="#F4F4F4"></codeboxes></textboxes><buttons gradient-color-begin="#0099FF" gradient-color-end="#223276" color="#FFFFFF" corner-roundness="0;8;0;8" font="arial" size="11" bold="true" over-gradient-color-begin="#0099FF" over-gradient-color-end="#0099FF"></buttons><servicemarker gradient-color-begin="#F4F4F4" gradient-color-end="#F4F4F4"></servicemarker></controls><texts color="#FFFFFF" bold="true"><privacy color="#AAAAAA"></privacy><labels color="#1B366D"></labels><messages color="#F4F4F4" background-color="#1B366D" bold="true"></messages><links color="#376DDA" underline="false" over-color="#1B366D"></links></texts></body></config>';break;case"6":e.conf.UIConfig='<config><display showEmail="true" useTransitions="true" showBookmark="true" codeBoxHeight="auto" showCodeBox="true" showCloseButton="false" networksWithCodeBox=""></display><body><background frame-color="#BFBFBF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#F4F4F4" corner-roundness="4;4;4;4"></background><controls color="#202020" corner-roundness="4;4;4;4" gradient-color-begin="#EAEAEA" gradient-color-end="#F4F4F4" bold="false"><snbuttons  type="textUnder" frame-color="#D5D5D5" over-frame-color="#60BFFF" color="#808080" gradient-color-begin="#FFFFFF" gradient-color-end="d4d6d7" size="10" bold="false" down-frame-color="#60BFFF" down-gradient-color-begin="#6DDADA" over-gradient-color-end="#6DDADA" down-gradient-color-end="#F4F4F4" over-color="#52A4DA" down-color="#52A4DA" over-bold="false"><more frame-color="#A4DBFF" over-frame-color="#A4DBFF" gradient-color-begin="#F4F4F4" gradient-color-end="#BBE4FF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></more><previous frame-color="#BBE4FF" over-frame-color="#A4DBFF" gradient-color-begin="#FFFFFF" gradient-color-end="#A4DBFF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></previous></snbuttons><textboxes frame-color="#CACACA" color="#757575" gradient-color-begin="#ffffff" bold="false"><codeboxes color="#757575" frame-color="#DFDFDF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#FFFFFF" size="10"></codeboxes><inputs frame-color="#CACACA" color="#757575" gradient-color-begin="#F4F4F4" gradient-color-end="#ffffff"></inputs><dropdowns frame-color="#CACACA" list-item-over-color="#52A4DA" ></dropdowns></textboxes><buttons frame-color="#CACACA" gradient-color-begin="#F4F4F4" gradient-color-end="#CACACA" color="#000000" bold="false" over-frame-color="#60BFFF" down-frame-color="#60BFFF" over-gradient-color-begin="#A4DBFF" down-gradient-color-begin="#A4DBFF" over-gradient-color-end="#FFFFFF" down-gradient-color-end="#ffffff"><post-buttons frame-color="#CACACA" gradient-color-end="#CACACA"></post-buttons></buttons><listboxes frame-color="#CACACA" corner-roundness="4;4;4;4" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></listboxes><checkboxes checkmark-color="#00B600" frame-color="#D5D5D5" corner-roundness="3;3;3;3" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></checkboxes><servicemarker gradient-color-begin="#ffffff" gradient-color-end="#D5D5D5"></servicemarker><tooltips color="#6D5128" gradient-color-begin="#FFFFFF" gradient-color-end="#FFE4BB" size="10" frame-color="#FFDBA4"></tooltips></controls><texts color="#202020"><headers color="#202020"></headers><messages color="#202020"></messages><links color="#52A4DA" underline="false" over-color="#353535" down-color="#353535" down-bold="false"></links></texts></body></config>';break}e.conf.showCloseButton=true;e.conf.wmodeType="opaque";e.conf.cornerRoundness=0;e.conf.onClose=Wildfire._hideWildfirePopup;e.conf.onRenderDone=function(g){var f=document.getElementById(g.ModuleID);f.style.visibility="";Wildfire._GetContainer(g.ModuleID+"Progress").style.visibility="hidden";f.style.zIndex=Wildfire._NextZIndex++};Wildfire._popupConfigs.push(e.conf);var d=Wildfire._popupConfigs.length-1;var c='<img id="Wildfire_Button'+d+'" src="'+e.btnurl+'" style="cursor: pointer" border=0 alt="'+a+'" title="'+a+'" />';if(e.button_divID){document.getElementById(e.button_divID).innerHTML=c}else{document.write(c)}var b=document.getElementById("Wildfire_Button"+d);b.openWildfirePopup=function(){b.mouseIsOut=true;Wildfire._showWildfirePopup(e.partner,e.w,e.h,d)};b.onmouseout=function(){b.mouseIsOut=true};if(typeof Wildfire.buttonsData=="undefined"){Wildfire.buttonsData={}}switch(e.b.toLowerCase()){case"mouseover":b.configID=d;Wildfire.buttonsData[d]=function(){if(!b.mouseIsOut){b.openWildfirePopup()}};b.onmouseover=function(){b.mouseIsOut=false;setTimeout("Wildfire.buttonsData["+b.configID+"]()",500)};break;case"click":default:b.onclick=b.openWildfirePopup}return"wildfire_postDiv_"+d};Wildfire.disposeWildfireButton=function(f){var d=document.getElementById(f);var a=document.getElementById(f+"Progress");var c=document.getElementById("gigya_ifr_"+f);if(d){var e=d.elementsToShowOnClose;if(e!=null){for(var b=0;b<e.length;b++){e[b].style.visibility=""}}}if(d){document.body.removeChild(d)}if(a){document.body.removeChild(a)}if(c){document.body.removeChild(c)}};Wildfire.renderPostButton=function(f,e,b,c,h,d,a){var g={partner:f,w:e,h:b,conf:c,btnurl:h,b:d,divID:a};return Wildfire.drawWildfireButton(g)};Wildfire._lastID=0;Wildfire._getScrollXY=function(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}return[b,a]};Wildfire._GetContainer=function(b){if(b==""){return null}var a=document.getElementById(b);if(typeof(a)=="Array"){return a[a.length]}return a};Wildfire._preparePopup=function(q,j,b,f,r){var d=Wildfire._CreateContainer(b);var t=Wildfire._CreateContainer(b+"Progress",true);var o;o=d.style;var c;var l;var p=document.documentElement;c=p.clientHeight;l=p.clientWidth;if(typeof c=="undefined"||c==0){c=document.body.clientHeight;l=document.body.clientWidth}if(typeof c=="undefined"||c==0){c=window.innerHeight;l=window.innerWidth}scrl=Wildfire._getScrollXY();var n=scrl[1];var s=scrl[0];var g=n+Math.floor(c/2);var m=s+Math.floor(l/2);var a=Wildfire._GetElementPos(f);if(a.top>g){o.top=""+(a.top-j)+"px"}else{o.top=""+(a.top+f.height)+"px"}if(a.left>m){o.left=""+(a.left+f.width-q)+"px"}else{o.left=""+a.left+"px"}o.width=""+q+"px";o.height=""+j+"px";t.style.position="absolute";t.style.background="url("+r+") no-repeat center center";t.style.width=o.width;t.style.height=o.height;t.style.top=o.top;t.style.left=o.left;var e=document.getElementById("gigya_ifr_"+b);if(e!=null){e.style.top=o.top;e.style.left=o.left;e.style.width=o.width;e.style.height=o.height}Wildfire._HandleEmbedAndObjectsBelow(d,q,j)};Wildfire._showWildfirePopup=function(f,d,b,g){var a="wildfire_postDiv_"+g;var c=document.getElementById("Wildfire_Button"+g);var e=Wildfire._GetContainer(a);if(e==null||e.style.visibility=="hidden"){Wildfire._preparePopup(d,b,a,c,"http://cdn.gigya.com/WildFire/i/progress_ani.gif");Wildfire.initPost(f,a,d,b,Wildfire._popupConfigs[g])}};Wildfire.revealDiv=function(a,d){var e=document.getElementById(a);var c=parseInt(e.style.height.replace("px",""))+20;if(c<d){var b=document.getElementById("gigya_ifr_"+a);e.style.height=c+"px";if(b!=null){b.style.height=c+"px"}window.setTimeout('Wildfire.revealDiv("'+a+'", '+d+")",10)}else{e.style.height=d+"px"}};Wildfire._injectCIMP=function(){if(document.getElementById("wildfire_cimp")==null&&document.body!=null){var a=document.createElement("div");a.id="wildfire_cimp";a.width=1;a.height=1;a.style.display="none";a.style.visibility="hidden";a.style.position="absolute";a.innerHTML='<img src="http://cdn.gigya.com/wildfire/i/CIMP.gif?CXNID=2000002.0NXC" />';document.body.insertBefore(a,document.body.firstChild)}};if(typeof WildfireBtn!="undefined"&&typeof WildfireBtn.pendingButtons!="undefined"){for(var i=0;i<WildfireBtn.pendingButtons.length;i++){Wildfire.drawWildfireButton(WildfireBtn.pendingButtons[i])}}WE.social={};WE.social.BookMarker=function(b,e){if(typeof e=="undefined"){e={}}var h=this;var f=e.position;var a=e.services;var g=e.callback;var d=e.url;var c="wildfire_popup";h.container=null;h.button=b;h.initialize=function(){if(h.container==null){h.container=h.getContainer();h.createWildfirePopup()}};h.updateDisplay=function(){if(h.button.hasClass("active")){Wildfire.onClose()}else{Wildfire.onClose();h.button.addClass("active");h.setPosition()}};h.createWildfirePopup=function(){WE.social.createWildfirePopup(h.url(),h.button.attr("title"),h.container,a,g)};h.getContainer=function(){if($("#"+c).length<1){return $("<div />").attr("id",c).addClass("wildfire_popup").appendTo("body")}else{return $("#"+c)}};h.url=function(){switch(typeof d){case"function":return d();case"string":return d;default:return h.button.attr("href")}};h.setPosition=function(){var j=typeof f;if(j=="string"){switch(f){case"belowLeft":h.positionBelowLeft();return;case"belowRight":h.positionBelowRight();return;case"aboveLeft":h.positionAboveLeft();return;default:h.positionBelowRight();return}}else{if(j=="function"){f(h)}else{h.positionBelowRight()}}}};WE.social.BookMarker.prototype.positionBelowLeft=function(){var a=this.container;var b=this.button;a.show().css("top",b.offset().top+b.outerHeight()-1).css("left",b.offset().left+b.width()-a.width())};WE.social.BookMarker.prototype.positionAboveLeft=function(){var a=this.container;var b=this.button;a.show().css("top",b.offset().top-a.outerHeight()-1).css("left",b.offset().left+b.width()-a.width())};WE.social.BookMarker.prototype.positionBelowRight=function(){var a=this.container;var b=this.button;a.show().css("top",b.offset().top+b.outerHeight()-1).css("left",b.offset().left)};WE.social.positionMediaBookmarkContainer=function(a){if(a.button.parents("#media_footer").length>0){a.positionAboveLeft()}else{a.positionBelowLeft()}};WE.social.createWildfirePopup=function(b,f,a,d,e){var c={defaultContent:"TEXTAREA_ID",bookmarkURL:b,widgetTitle:f,UIConfig:'<config><display showDesktop="false" showPost="false" showEmail="false" useTransitions="true" showBookmark="true" bookmarksToShow="'+d+'" showCloseButton="true" codeBoxHeight="auto"></display><body><background frame-color="#BFBFBF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#F4F4F4" corner-roundness="0;0;0;0"></background><controls color="#202020" corner-roundness="4;4;4;4" gradient-color-begin="#EAEAEA" gradient-color-end="#F4F4F4" bold="false"><snbuttons type="textUnder" frame-color="#D5D5D5" over-frame-color="#60BFFF" color="#808080" gradient-color-begin="#FFFFFF" gradient-color-end="d4d6d7" size="10" bold="false" down-frame-color="#60BFFF" down-gradient-color-begin="#6DDADA" over-gradient-color-end="#6DDADA" down-gradient-color-end="#F4F4F4" over-color="#52A4DA" down-color="#52A4DA" over-bold="false"><more frame-color="#A4DBFF" over-frame-color="#A4DBFF" gradient-color-begin="#F4F4F4" gradient-color-end="#BBE4FF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></more><previous frame-color="#BBE4FF" over-frame-color="#A4DBFF" gradient-color-begin="#FFFFFF" gradient-color-end="#A4DBFF" over-gradient-color-begin="#A4DBFF" over-gradient-color-end="#F4F4F4"></previous></snbuttons><textboxes frame-color="#CACACA" color="#757575" gradient-color-begin="#ffffff" bold="false"><codeboxes color="#757575" frame-color="#DFDFDF" background-color="#FFFFFF" gradient-color-begin="#ffffff" gradient-color-end="#FFFFFF" size="10"></codeboxes><inputs frame-color="#CACACA" color="#757575" gradient-color-begin="#F4F4F4" gradient-color-end="#ffffff"></inputs><dropdowns list-item-over-color="#52A4DA" frame-color="#CACACA"></dropdowns></textboxes><buttons frame-color="#CACACA" gradient-color-begin="#F4F4F4" gradient-color-end="#CACACA" color="#000000" bold="false" over-frame-color="#60BFFF" over-gradient-color-begin="#BBE4FF" down-gradient-color-begin="#BBE4FF" over-gradient-color-end="#FFFFFF" down-gradient-color-end="#ffffff"><post-buttons frame-color="#CACACA" gradient-color-end="#CACACA"></post-buttons></buttons><listboxes frame-color="#CACACA" corner-roundness="4;4;4;4" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></listboxes><checkboxes checkmark-color="#00B600" frame-color="#D5D5D5" corner-roundness="3;3;3;3" gradient-color-begin="#F4F4F4" gradient-color-end="#FFFFFF"></checkboxes><servicemarker gradient-color-begin="#ffffff" gradient-color-end="#D5D5D5"></servicemarker><tooltips color="#6D5128" gradient-color-begin="#FFFFFF" gradient-color-end="#FFE4BB" size="10" frame-color="#FFDBA4"></tooltips></controls><texts color="#202020"><headers color="#202020"></headers><messages color="#202020"></messages><links color="#52A4DA" underline="false" over-color="#353535" down-color="#353535" down-bold="false"></links></texts></body></config>',onNetworkButtonClicked:e};Wildfire.initPost("557302",a.attr("id"),300,175,c)};Wildfire.onClose=function(){$(".wildfire_popup").hide();$(".social_bookmarks").removeClass("active")};WE.social.omnitureEventTriggerFunction=function(a,b){return function(c){WE.triggerOmnitureContentShareEvent(c.network,a,b)}};(function(a){a.fn.liveSocialBookmark=function(b){var c=a.extend({},a.fn.liveSocialBookmark.defaults,b),d=this;window.setTimeout("Wildfire._injectCIMP()",5000);a(this).live("click",function(){var e=new c.bookMarker(a(this),c);e.initialize();e.updateDisplay();return false});return this};a.fn.liveSocialBookmark.defaults={services:"twitter, googlebookmarks, delicious, digg, stumbleupon, friendfeed",position:"belowLeft",callback:WE.social.omnitureEventTriggerFunction("Unset Content"),bookMarker:WE.social.BookMarker}})(jQuery);