// Generated by CoffeeScript 1.3.3 (function(){(function(e){var t,n;return(t=window.debug)==null&&(t={log:function(){}}),n={init:function(t){var r;return r=e.extend({selector:".content",tolerance:0},t),this.each(function(){var t;return t=e(this),t.data(r),e(window).on("scroll",null,t,n.handleScroll)})},align:function(e){},handleScroll:function(e){var t;return t=e.data,n.findActiveElement(e)},findActiveElement:function(t){var n,r,i,s;return r=t.data,s=r.data(),n=r.find(s.selector).filter(":visible"),i=null,n.each(function(t,n){var r;r=e(n).viewportOffset().top;if(r>-s.tolerance)return i=n,!1}),i!==s.activeElement&&r.trigger("activify.newActiveElement",[i]),s.activeElement=i,clearTimeout(s.scrollTimeout),s.scrollTimeout=setTimeout(function(){return e("html, body").animate({scrollTop:e(i).offset().top},"slow")},1e3),r.data(s)}},e.fn.viewportOffset=function(){var t,n,r;return n=this.offset(),r=n.top-e(window).scrollTop(),t=n.left-e(window).scrollLeft(),{top:r,left:t}},e.fn.visibleKarma=function(){var t,n,r,i,s,o;return t={document:{viewport:{top:null,left:null},element:{top:null,left:null}},viewport:{width:null,height:null,area:null,element:{top:null,left:null},visible:{top:null,right:null,bottom:null,left:null,area:null,ratio:null}},element:{width:null,height:null}},n=e(window).height()*e(window).width(),t.document.viewport.top=e(window).scrollTop(),t.document.viewport.left=e(window).scrollLeft(),t.viewport.width=e(window).width(),t.viewport.height=e(window).height(),t.viewport.area=t.viewport.width*t.viewport.height,t.document.element=this.offset(),t.viewport.element.top=t.document.element.top-t.document.viewport.top,t.viewport.element.left=t.document.element.left-t.document.viewport.left,t.element.width=this.width(),t.element.height=this.height(),r=t.viewport.element.left>0?t.viewport.element.left:0,s=t.viewport.element.top>0?t.viewport.element.top:0,i=t.document.element.left+t.element.width-Math.abs(t.viewport.element.top),0>i&&(i=0),t.viewport.widtho&&(o=0),t.viewport.heighto.get(0).scrollWidth)return;return o.animate({scrollLeft:t})},s=function(){var e,t;return e=o.scrollLeft()/o.width(),t=o.width()*--e,0>t&&(t=0),o.animate({scrollLeft:t})},o.css("overflow","hidden"),u=o.height(),f=o.width(),a=r.arrow.width/2,t=e('
').css("width",r.arrow.width).css("height",u).css("cursor","pointer").css("margin-left",-a).click(s),n=e('
').css("width",r.arrow.width).css("height",u).css("margin-left",f+a).css("margin-top",-u).css("cursor","pointer").click(i),o.css("margin-left",a).css("margin-top",-u).before(t).after(n)})}}(jQuery),function(e){var t,n;return 0==((t=window.debug)!=null)&&(t={log:function(){}}),n={init:function(t){var n,r=this;return n=e.extend({selectors:{background:".background",container:".container",content:".content",header:".header"}},t),e(window).on("resize scroll",function(){return clearTimeout(r.data("resizeTimeout")),r.data({resizeTimeout:setTimeout(function(){return r.fillify("resize",n)},200)})}),this.fillify("resize",n)},resize:function(t){return this.each(function(r,i){var s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E;return d=e(i),w=n.getWindowHeight(),E=n.getWindowWidth(),g=d.data("windowWidth"),m=d.data("windowHeight"),w===m&&E===g?!0:(d.data({windowWidth:E,windowHeight:w}),s=d.find(""+t.selectors.background+" img"),0s.width()&&s.width(b).height(b/o)),d.trigger("fillify.fillify"))})},getWindowHeight:function(){return window.innerHeight?window.innerHeight:e(window).height()},getWindowWidth:function(){return e(window).width()},getContainerWidth:function(e,t){return e.find(""+t.selectors.container).width()},getContentElement:function(e,t){return e.find(""+t.selectors.container+" "+t.selectors.content)},getContentHeight:function(e,t){var r,i,s,o;return r=e.find(""+t.selectors.container).height(),o=e.find(""+t.selectors.container+" "+t.selectors.header).height(),i=n.getContentElement(e,t),s=i.outerHeight()-i.height(),r-o-s}},e.fn.fillify=function(t){return n[t]?n[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"==typeof t||t==null?n.init.apply(this,arguments):e.error("Method "+t+" does not exist.")}}(jQuery),function(e){var t,n;return(t=window.debug)==null&&(t={log:function(){}}),n={init:function(t){var r;return r=e.extend({openLayersURL:"http://openlayers.org/api/OpenLayers.js",projection:"EPSG:4326",container:this,elementId:"map",location:null,zoom:0,namespace:"mapify",layerSwitcher:!0,cache:!0,title:"Map"},t),e.ajax(r.openLayersURL,{cache:r.cache,context:this,dataType:"script",complete:function(e,t){},error:function(e,t,n){},success:function(e,t,i){return n.create.apply(this,[r])}}),this},create:function(t){return this.each(function(n,r){var i,s,o,u,a,f,l,c;return i=e(r),s=t.elementId,o=t.location,c=t.zoom,f=t.projection,l=t.title,e('
').appendTo(i),u=new OpenLayers.Map(s,{maxResolution:"auto"}),a=new OpenLayers.Layer.OSM(l),u.addLayer(a),o!=null&&o.latitude!=null&&o.longitude!=null&&u.setCenter((new OpenLayers.LonLat(o.longitude,o.latitude)).transform(new OpenLayers.Projection(f),u.getProjectionObject())),0===c?u.zoomToMaxExtent():u.zoomTo(c),!0===t.layerSwitcher&&u.addControl(new OpenLayers.Control.LayerSwitcher),i.data({map:u,options:t}),e(r).trigger(""+t.namespace+".create")})},geoRSS:function(t){var n,r,i,s,o,u;return r=e.extend({thumbnail:{tag:"thumbnail",attribute:"url"},className:null,radius:{"default":15,select:25},url:null,title:"GeoRSS",id:"id",externalGraphic:{url:null,width:null,height:null,select:{width:null,height:null}}},t),r.url==null&&e.error("url has not been set."),((i=r.thumbnail)!=null?i.tag:void 0)==null&&e.error("thumbnail tag has not been set."),((s=r.thumbnail)!=null?s.attribute:void 0)==null&&e.error("thumbnail attribute has not been set."),r.id==null&&e.error("id attribute has not been set."),r.title==null&&e.error("title has not been set."),((o=r.radius)!=null?o["default"]:void 0)==null&&e.error("radius default has not been set."),((u=r.radius)!=null?u.select:void 0)==null&&e.error("radius select has not been set."),n=[],this.each(function(n,i){var s,o,u,a;return o=e(i).data("map"),o==null&&e.error("this element is not mapified."),a=new OpenLayers.Style({externalGraphic:r.externalGraphic.url,graphicWidth:r.externalGraphic.width,graphicHeight:r.externalGraphic.height,graphicXOffset:-r.externalGraphic.width/2,graphicYOffset:-r.externalGraphic.height/2}),u=new OpenLayers.Style({graphicWidth:r.externalGraphic.select.width,graphicHeight:r.externalGraphic.select.height,graphicXOffset:-r.externalGraphic.select.width/2,graphicYOffset:-r.externalGraphic.select.height/2}),s=new OpenLayers.Layer.GML(r.title,r.url,{format:OpenLayers.Format.GeoRSS,formatOptions:{createFeatureFromItem:function(e){var t,n,i;return t=OpenLayers.Format.GeoRSS.prototype.createFeatureFromItem.apply(this,arguments),t.attributes.link=escape(this.getElementsByTagNameNS(e,"*","link")[0].getAttribute("href")),t.attributes.id=this.getElementsByTagNameNS(e,"*",r.id)[0].textContent,t.attributes.thumbnail=this.getElementsByTagNameNS(e,"*",r.thumbnail.tag)[0].getAttribute(r.thumbnail.attribute),((n=r.className)!=null?n.tag:void 0)!=null&&((i=r.className)!=null?i.attribute:void 0)!=null&&(t.attributes.className=this.getElementsByTagNameNS(e,"*",r.className.tag)[0].getAttribute(r.className.attribute)),t}},styleMap:new OpenLayers.StyleMap({"default":a,select:u})}),t=e(i).data("options"),s.events.on({loadstart:function(n){return e(i).trigger(""+t.namespace+".loadStart")},loadend:function(n){return e(i).trigger(""+t.namespace+".loadEnd")},scope:this}),o.addLayer(s),e(i).trigger(""+t.namespace+".georss",[s])})},popupControl:function(t){var r;return r=e.extend({layer:null,size:{width:230,height:250},content:null},t),r.layer==null&&e.error("need to specify a layer."),this.each(function(i,s){var o,u,a=this;return o=e(s).data("map"),o==null&&e.error("this element is not mapified."),u=new OpenLayers.Control.SelectFeature(r.layer,{onSelect:function(e){var t,i;return i=e.geometry,t=new OpenLayers.Popup("popup",new OpenLayers.LonLat(i.x,i.y),new OpenLayers.Size(r.size.width,r.size.height),n.interpolate(r.content,e.attributes),!0),t.closeDiv.className=e.attributes.className,o.addPopup(t,!0)}}),o.addControl(u),u.activate(),t=e(s).data("options"),e(s).trigger(""+t.namespace+".popupControl")})},interpolate:function(e,t){return e.replace(/{([^{}]*)}/g,function(e,n){var r;return r=t[n],"string"==typeof r||"number"==typeof r?r:e})}},e.fn.mapify=function(t){return n[t]!=null?n[t].apply(this,Array.prototype.slice.call(arguments,1)):typeof t=="object"||t==null?n.init.apply(this,arguments):e.error("Method "+t+" does not exist on jQuery.mapify")}}(jQuery),function(e){var t,n;return(t=window.debug)==null&&(t={log:function(){}}),n={init:function(t){var r;return r=e.extend({selectors:{item:".item"}},t),this.each(function(t,i){var s,o;return s=e(i),s.data({settings:r}),s.find(".hideable:first").show(),s.click(function(e){return n.openClose(s)}),o=s.find(r.selectors.item),o.each(function(t,n){var r,i,s;r=e(n),r.data({"menu-index":t}),s=r.data("section-selector"),i=r.data("menu-selector");if(i!=null)return e(s).data({"menu-selector":i})}),o.css("cursor","pointer").click(function(t){var r,i,s;return i=e(t.target),n.openClose(i),r=i.data("section-selector"),r==null?!0:(s=e(r).offset().top,e("html, body").animate({scrollTop:s},"slow"))})})},select:function(t){var n,r,i;i=t.parent();if(t.get(0)===i.children().first().get(0))return;return r=i.children().first(),n=r.data("menu-index"),i.prepend(t.detach()),i.children().each(function(t,i){if(n-1===e(i).data("menu-index"))return r.detach().insertAfter(i)}),r.hide(),t.show()},openClose:function(e){var t,n;return n=e,"open"===n.data("state")?(n.find(".hideable").css("display","none"),t=n.find(".hideable:first"),t!=null&&n.find(".hideable:first").css("display","block"),n.data({state:"close"})):(n.find(".hideable").css("display","block"),n.data({state:"open"}))}},e.fn.menufy=function(t){return n[t]?n[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"==typeof t||t==null?n.init.apply(this,arguments):e.error("Method "+t+" does not exist.")}}(jQuery),function(e){return e.fn.playertools=function(t,n){var r,i,s;return 0==((r=window.debug)!=null)&&(r={log:function(){}}),s=e.extend({screens:{normal:{width:640,height:480},larger:{width:960,height:720}},urls:null},n),i={isFlash:function(e){return"OBJECT"===e.get(0).tagName},playPause:function(e){return"BUFFERING"===e.getState()||"PLAYING"===e.getState()?e.pause(!0):e.play(!0)},share:function(){}},this.each(function(){var n,r,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E=this;return n=e(this),m=e('
').width(t.getWidth()),a=e('
').appendTo(m).click(function(){return i.playPause(t)}),v=e('
').appendTo(m),f=e('
').appendTo(v).click(function(e){var n,r,i,s;return r=f.width(),s=e.pageX-f.offset().left,n=t.getDuration(),i=s*(n/r),t.seek(i)}),e('
').appendTo(m),b=e('
').appendTo(m).click(function(){return t.setMute()}),!0===t.getMute()&&b.addClass("mute"),w=e('
').appendTo(m),w.find("#volume-slider").slider({min:0,max:100,range:"min",value:t.getVolume(),slide:function(e,n){return t.setVolume(n.value)}}),e('
').appendTo(m),u=e('
').appendTo(m).click(function(){return n.trigger("playertools.willresize","normal"),t.resize(s.screens.normal.width,s.screens.normal.height),u.addClass("selected"),o.removeClass("selected"),r.removeClass("selected"),n.trigger("playertools.resize","normal")}),e(document.documentElement).keyup(function(e){if(27===e.keyCode)return u.trigger("click")}),o=e('
').appendTo(m).click(function(){return n.trigger("playertools.willresize","large"),t.resize(s.screens.larger.width,s.screens.larger.height),o.addClass("selected"),u.removeClass("selected"),r.removeClass("selected"),n.trigger("playertools.resize","large")}),r=e('
').appendTo(m).click(function(){var i,s;return n.trigger("playertools.willresize","full"),s=e(window).width(),i=e(window).height()-m.height()-n.position().top,t.resize(s,i),r.addClass("selected"),o.removeClass("selected"),u.removeClass("selected"),n.trigger("playertools.resize","full")}),l=e('
').appendTo(m),l.mouseenter(function(e){var t,n;return n=l.width(),l.find("li").show(),t=l.width()-n,l.css("margin-left",-t)}).mouseleave(function(e){return l.find("li").not(".selected").hide(),l.css("margin-left",0)}).find(".item").click(function(n){var r,i,o,u,a;return o=e(n.target),o.addClass("selected").siblings().removeClass("selected"),l.trigger("mouseleave"),a=s.urls,i=o.data("quality"),u=a[i],r=t.getPosition(),t.load({file:u,start:r})}).not(".selected").hide(),e('
').appendTo(m),c=e('').appendTo(m).click(function(){return i.share()}),p=function(){return a.removeClass("play").addClass("pause")},d=function(){return a.removeClass("pause").addClass("play")},y=function(e){if(E.updateProgressTimeout!=null)return;return E.updateProgressTimeout=setTimeout(function(){var t;return t=v.children(".progress-container").width(),v.find(".progress").width(e.position*(t/e.duration)),E.updateProgressTimeout=null},500)},g=function(e){return!0===e.mute?b.addClass("mute"):b.removeClass("mute")},h=function(){var n,r,i;return r=t.getWidth(),m.width(r),i=r,m.children().not(".slider.time").each(function(t,n){return i-=e(n).outerWidth(!0)}),v.width(i),n=parseInt(f.css("margin-left"),10)+parseInt(f.css("margin-right")),f.width(v.width()-n),y({position:t.getPosition(),duration:t.getDuration()})},n.after(m),h(),t.onPlay(function(){return p()}).onPause(function(){return d()}).onBuffer(function(){return p()}).onIdle(function(){return d()}).onResize(function(){return h()}).onTime(function(){return y.apply(null,arguments)}).onMute(function(){return g.apply(null,arguments)})})}}(jQuery),function(e){return window.slidingMenu=function(t,n,r){var i,s;return r==null&&(r=null),(i=window.debug)==null&&(i={log:function(){}}),s={containerSelector:t,menuSelector:n,center:function(){var t,n=this;return t=this.getWidth(),e(this.menuSelector).each(function(n,r){var i,s,o;return i=e(r).width(),o=Math.floor((t-i)/2),s=t%2,e(r).animate({"margin-left":o+s,"margin-right":o})}),this.slideTo()},slideTo:function(t){t==null&&(t=this.currentIndex);if(0>t&&t>this.menuCount()-1)return;return e(this.containerSelector).css("margin-left",-this.getWidth()*t),this.currentIndex=t},slideNext:function(){if(this.menuCount()-1<=this.currentIndex)return;return this.slideTo(++this.currentIndex)},slidePrevious:function(){if(0>=this.currentIndex)return;return this.slideTo(--this.currentIndex)},currentIndex:0,menuCount:function(){return e(this.menuSelector).length},getWidth:function(){var t;return t=e(window).width(),null!==r&&t