/*! * Public SlideDeck JavaScript * * All public JavaScript necessary for globally applicable SlideDeck features * * @package SlideDeck * * @author dtelepathy * @package SlideDeck * @since 2.0.0 */ /*! Copyright 2012 digital-telepathy (email : support@digital-telepathy.com) This file is part of SlideDeck. SlideDeck is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SlideDeck is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SlideDeck. If not, see . */ var ie=(function(){var undef,v=3,div=document.createElement('div'),all=div.getElementsByTagName('i');while(div.innerHTML='',all[0]);return v>4?v:undef}());var SlideDeckFadingNav=function(elem){this.elems={};this.initialize(elem)};var SlideDeckPrefix="sd2-";var SlideDeckVideoAPIs;var __slideDeckVideos={};var __slideDeckVideosYTAPIReady=false;var __slideDeckVideosDMAPIReady=false;var SlideDeckLazyLoad=function(elem){this.elems={};this.initialize(elem)};function __isVerticalDeck(slidedeck){if(typeof(slidedeck.deck==='undefined')){if(jQuery(slidedeck).find('.slidesVertical').length>0){return true}return false}else{if(slidedeck.verticalSlides){if(slidedeck.verticalSlides[slidedeck.current-1]){if(slidedeck.verticalSlides[slidedeck.current-1].navChildren){return true}else{return false}}}}return false}function __slidedeck2_isiOS(){var iOS=false;if(navigator.userAgent.match(/like Mac OS X/i)||navigator.userAgent.match(/iPad/i))iOS=true;return iOS}function __slidedeck2_isMobile(){var mobile=false;if(navigator.userAgent.match(/like Mac OS X/i)||(navigator.userAgent.match(/android/i)||navigator.userAgent.match(/like Mac OS X/i))||navigator.userAgent.match(/iPad/i))mobile=true;return mobile}function onYouTubePlayerAPIReady(){__slideDeckVideosYTAPIReady=true}window.dmAsyncInit=function(){__slideDeckVideosDMAPIReady=true};var SlideDeckOverlay=function(elem){this.classes={container:'slidedeck-overlays',frame:'slidedeck-frame',toggle:'slidedeck-overlays-showhide',wrapper:'slidedeck-overlays-wrapper',overlay:'slidedeck-overlay',flipper:'slidedeck-overlay-flipper'};this.elems={};this.speed=200;this.easing="ease-in-out";this.initialize(elem)};var SlideDeckOverlays={actions:{},inits:{}};function briBriFlex(elem,max){var $elem=jQuery(elem);$elem.append('M');var testChar=$elem.find('.test-character');var tHeight=$elem.outerHeight();var mHeight=testChar.outerHeight();var loopCount=0;var fontSize=parseInt($elem.css('font-size'),10);var lineHeight=parseInt($elem.css('line-height'),10);if(tHeight>mHeight*max){$elem.css('line-height','auto')}while(tHeight>mHeight*max){fontSize--;lineHeight--;$elem.css('font-size',fontSize+'px');loopCount++;mHeight=testChar.outerHeight();tHeight=$elem.outerHeight()}if(loopCount){$elem.css('line-height',lineHeight+'px')}testChar.remove()}(function($){$.extend($.fn,{isMobile:function(){return false}});window.SlideDeckVideoAPIs=function(slidedeck){var self=this;var autoStartNextVideo=true;var autoResumePlayback=true;var advanceAtVideoEnd=true;if(navigator.userAgent.match(/like Mac OS X/i)){autoStartNextVideo=false}if(navigator.userAgent.match(/android/i)||navigator.userAgent.match(/like Mac OS X/i)){autoResumePlayback=false}if(navigator.userAgent.match(/iPad/i)){autoResumePlayback=true}var youTubeAPIRetryCounter=0;var DailyMotionAPIRetryCounter=0;var slidedeck=$(slidedeck);var slidedeckFrame=slidedeck.closest('.slidedeck-frame');var deck=slidedeck.slidedeck();var verticalDeck;var deckElement=slidedeck;var playButtons=deckElement.find('.cover .play');for(var i=0;i');var ieCover=cover.find('.ie-background-image');ieCover[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgurl+"', sizingMethod='scale')"}}}deckElement.find('.cover .play').click(function(event){event.preventDefault();var cover=$(this).parent();var deckId=deckElement[0].id;var videoContainerID='';if(cover.prev('.video-container').data('video-id')){videoContainerID=cover.prev('.video-container').data('video-id')}else{videoContainerID=cover.prev('.video-container').attr('id').split('__')[1]}var slidedeck=deckElement.slidedeck();var slides=slidedeck.slides;if(__isVerticalDeck(deckElement)){slides=slidedeck.vertical().slides}var videoIndex=slides.index(jQuery('[id*="video__'+videoContainerID+'"]').closest('dd'));var playerType=slides.eq(videoIndex).find('.video-container')[0].className.split(' ')[0];cover.fadeOut();deck.pauseAutoPlay=true;playVideo((videoIndex+1),playerType,deckId)});deckElement.find('.cover .play-video-alternative').click(function(event){event.preventDefault();$(this).closest('.cover').find('.play').trigger('click')});var deckOptions=deck.options;var oldBefore=deck.options.before;var oldComplete=deck.options.complete;var deckContext=deck;var isVertical=false;if(__isVerticalDeck(deck.deck)){isVertical=true;deckContext=deck.vertical();deckOptions=deck.vertical().options;oldBefore=deckOptions.before;oldComplete=deckOptions.complete}deckOptions.before=function(deck){if(typeof(oldBefore)=='function')oldBefore(deck);if(typeof(deck.deck)!='undefined'){var slidedeckElem=deck.deck[0]}else{var slidedeckElem=deck.slides.closest('.slidedeck')[0]}jQuery.data(slidedeckElem,'video-slidedeck').slideDeckPauseAllVideos(deck)};deckOptions.complete=function(deck){if(typeof(oldComplete)=='function')oldComplete(deck);var current=deckContext.current;if(isVertical)current+=1;var $videoContainer=deckContext.slides.eq(current-1).find('.video-container');if($videoContainer.length){var playerType=$videoContainer[0].className.split(' ')[0];if(autoResumePlayback){playVideoIfPaused((current-1),playerType)}}};function playVideoIfPaused(index,playerType){var videoPlayingClass='sd2-video-playing';var videosDeckElement=__slideDeckVideos[deckElement[0].id];if(typeof(videosDeckElement)==='undefined'){return false}var player=videosDeckElement["v"+index];switch(playerType){case'youtube':if(typeof(player)!='undefined'){if(typeof(player.getDuration)=='function'){var totalTime=player.getDuration();var currentTime=player.getCurrentTime();if((player.getCurrentTime()>0)&&(totalTime!=currentTime)){player.playVideo();slidedeckFrame.addClass(videoPlayingClass)}}}break;case'vimeo':if(typeof(player)!='undefined'){if(typeof(player.api)=='function'){player.api('getCurrentTime',function(value,player_id){var currentTime=value;if(currentTime>0){player.api('play');slidedeckFrame.addClass(videoPlayingClass)}})}}break;case'dailymotion':if(typeof(player)!='undefined'){if((player.currentTime>0)&&(player.currentTime<(player.duration-1))){player.play();slidedeckFrame.addClass(videoPlayingClass)}}break}}function playVideo(index,playerType,deckId){var deckElement=$('#'+deckId);var videosDeckElement=__slideDeckVideos[deckElement[0].id];if(typeof(videosDeckElement)==='undefined'){return false}var player=videosDeckElement["v"+(index-1)];if(typeof(player)!='undefined'){switch(playerType){case'youtube':if(typeof(player.playVideo)=='function'){player.playVideo()}break;case'vimeo':if(typeof(player.api)=='function'){player.api('play')}break;case'dailymotion':if(typeof(player.play)=='function'){player.play()}break}slidedeckFrame.addClass('sd2-video-playing')}}function videoSeekTo(index,playerType,seconds){var player=__slideDeckVideos[deckElement[0].id]["v"+index];switch(playerType){case'youtube':if(typeof(player)!='undefined'){player.seekTo(seconds)}break;case'vimeo':if(typeof(player)!='undefined'){player.api('seekTo',seconds)}break;case'dailymotion':if(typeof(player)!='undefined'){player.seek(seconds)}break}}this.videoEnded=function(index,playerType,deckId){var deckElement=$('#'+deckId);var player=__slideDeckVideos[deckId]["v"+index];switch(playerType){case'youtube':break;case'vimeo':if(typeof(player!='undefined')){player.api('unload')}break;case'dailymotion':if(typeof(player!='undefined')){}break}if(advanceAtVideoEnd){var deckContext=deckElement.slidedeck();if(__isVerticalDeck(deckElement))deckContext=deckContext.vertical();deckContext.next(function(){var current=deckContext.current;var currentSlide=$('#'+deckId).find('dd:eq('+(current-1)+')');if(__isVerticalDeck(deckElement)){current+=1;currentSlide=$('#'+deckId).find('.slidesVertical dd:eq('+(current-1)+')')}var playerType=deckElement.find('dd .video-container:eq('+(current-1)+')')[0].className.split(' ')[0];if(autoStartNextVideo){currentSlide.find('a.play-video-button').parents('dd').addClass('sd2-hide-slide-content');currentSlide.find('a.play-video-button').click()}})}};this.slideDeckPauseAllVideos=function(thedeck){if(thedeck.deck){var deckId=thedeck.deck.attr('id')}else{var deckId=thedeck.slides.closest('.slidedeck').attr('id')}var players=__slideDeckVideos[deckId];for(var k in players){var player=players[k];slidedeckFrame.removeClass('sd2-video-playing');switch(player.playerType){case'youtube':if(typeof(player.getPlayerState)=='function'){if(player.getPlayerState()==1){player.pauseVideo()}}break;case'vimeo':player.api('pause');break;case'dailymotion':if(!player.paused){player.pause()}break}}};this.loadYouTubeVideo=function(deckElement,slideIndex){var self=this;deckElement=jQuery(deckElement);var deckId=deckElement.attr('id');var videoContainer=deckElement.find('dd.slide:eq('+(slideIndex)+') .video-container.youtube');if(__isVerticalDeck(deckElement)){videoContainer=deckElement.find('dl.slidesVertical dd:eq('+(slideIndex)+') .video-container.youtube')}var videoContainerID=jQuery(videoContainer).attr('id');var videoID='';if(typeof(videoContainerID)==='undefined'){return false}if(jQuery(videoContainer).data('video-id')){videoID=jQuery(videoContainer).data('video-id')}else{videoID=videoContainerID.split('__')[1]}if(__slideDeckVideosYTAPIReady===false){if(youTubeAPIRetryCounter<30){setTimeout(function(){self.loadYouTubeVideo(deckElement,slideIndex)},750);youTubeAPIRetryCounter++}return false}var iFrameYouTubePlayer=new YT.Player(videoContainerID,{height:'100%',width:'100%',videoId:videoID,playerVars:{'wmode':'opaque','showinfo':0,'autohide':1,'rel':0,'disablekb':1,'cc_load_policy':0,'iv_load_policy':3,'modestbranding':1,'fs':1}});jQuery('#'+videoContainerID).attr('webkitallowfullscreen',true);jQuery('#'+videoContainerID).attr('mozallowfullscreen',true);var videoIndex=deckElement.find('dd').index(jQuery('#'+videoContainerID).parents('dd'))-(__isVerticalDeck(deckElement)?1:0);iFrameYouTubePlayer.playerType='youtube';iFrameYouTubePlayer.addEventListener("onStateChange",function(video){switch(video.data){case 0:jQuery.data(deckElement[0],'video-slidedeck').videoEnded(videoIndex,'youtube',deckId);break;case 1:jQuery(deckElement[0]).parents('.slidedeck-frame').addClass("sd2-video-playing");jQuery(deckElement[0]).slidedeck().pauseAutoPlay=true;break}iFrameYouTubePlayer.youTubePlayerState=video.data});if(typeof(__slideDeckVideos[deckElement.attr('id')])!='object'){__slideDeckVideos[deckElement.attr('id')]={}}__slideDeckVideos[deckElement.attr('id')]["v"+videoIndex]=iFrameYouTubePlayer};this.loadVimeoVideo=function(deckElement,slideIndex){var self=this;deckElement=jQuery(deckElement);var deckId=deckElement.attr('id');var videoContainer=deckElement.find('dd.slide:eq('+(slideIndex)+') .video-container.vimeo');var slides=deckElement.slidedeck().slides;if(__isVerticalDeck(deckElement)){videoContainer=deckElement.find('dl.slidesVertical dd:eq('+(slideIndex)+') .video-container.vimeo');slides=deckElement.slidedeck().vertical().slides}var videoContainerID=jQuery(videoContainer).attr('id');var videoID='';if(typeof(videoContainerID)==='undefined'){return false}if(jQuery(videoContainer).data('video-id')){videoID=jQuery(videoContainer).data('video-id')}else{videoID=videoContainerID.split('__')[1]}jQuery(videoContainer).append('');var videoIndex=slides.index(jQuery('#'+videoContainerID).closest('dd'));var iFrame=document.getElementById('vimeoiFrame-'+videoContainerID);var vimeoPlayer=$f(iFrame).addEvent('ready',function(player_id){var froogaloop=$f(player_id);froogaloop.addEvent('finish',function(data){jQuery.data(deckElement[0],'video-slidedeck').videoEnded(videoIndex,'vimeo',deckElement.attr('id'))});froogaloop.addEvent('play',function(data){jQuery(deckElement[0]).parents('.slidedeck-frame').addClass("sd2-video-playing");jQuery(deckElement[0]).slidedeck().pauseAutoPlay=true})});vimeoPlayer.playerType='vimeo';if(typeof(__slideDeckVideos[deckElement.attr('id')])!='object'){__slideDeckVideos[deckElement.attr('id')]={}}__slideDeckVideos[deckElement.attr('id')]["v"+videoIndex]=vimeoPlayer};this.loadDailyMotionVideo=function(deckElement,slideIndex){var self=this;deckElement=jQuery(deckElement);var deckId=deckElement.attr('id');var videoContainer=deckElement.find('dd.slide:eq('+(slideIndex)+') .video-container.dailymotion');var slides=deckElement.slidedeck().slides;if(__isVerticalDeck(deckElement)){videoContainer=deckElement.find('dl.slidesVertical dd:eq('+(slideIndex)+') .video-container.dailymotion');slides=deckElement.slidedeck().vertical().slides}videoContainer.append('
');var videoContainerID=videoContainer.attr('id');var videoID='';if(typeof(videoContainerID)==='undefined'){return false}if(jQuery(videoContainer).data('video-id')){videoID=jQuery(videoContainer).data('video-id')}else{videoID=videoContainerID.split('__')[1]}if(__slideDeckVideosDMAPIReady===false){if(DailyMotionAPIRetryCounter<30){setTimeout(function(){self.loadDailyMotionVideo(deckElement,slideIndex)},750);DailyMotionAPIRetryCounter++}return false}var videoIndex=deckElement.find('dd').index(jQuery('#'+videoContainerID).parents('dd'))-(__isVerticalDeck(deckElement)?1:0);var dailymotionPlayer=DM.player(videoContainer[0],{video:videoID,width:'100%',height:'100%',params:{}});dailymotionPlayer.playerType='dailymotion';dailymotionPlayer.addEventListener("ended",function(e){jQuery.data(deckElement[0],'video-slidedeck').videoEnded(videoIndex,dailymotionPlayer.playerType,deckId)});dailymotionPlayer.addEventListener("playing",function(e){jQuery(deckElement[0]).parents('.slidedeck-frame').addClass("sd2-video-playing");jQuery(deckElement[0]).slidedeck().pauseAutoPlay=true});if(typeof(__slideDeckVideos[deckElement.attr('id')])!='object'){__slideDeckVideos[deckElement.attr('id')]={}}__slideDeckVideos[deckElement.attr('id')]["v"+videoIndex]=dailymotionPlayer};return true};SlideDeckFadingNav.prototype.nav=function(direction){this.slidedeck.pauseAutoPlay=true;switch(direction){case"next-horizontal":this.slidedeck.next();break;case"prev-horizontal":this.slidedeck.prev();break;case"next-vertical":if(this.slidedeck.options.cycle&&this.slidedeck.vertical().current==this.slidedeck.vertical().slides.length-1){this.slidedeck.vertical().goTo(0)}else{this.slidedeck.vertical().next()}break;case"prev-vertical":if(this.slidedeck.options.cycle&&this.slidedeck.vertical().current==0){this.slidedeck.vertical().goTo(this.slidedeck.vertical().slides.length)}else{this.slidedeck.vertical().prev()}break}};SlideDeckFadingNav.prototype.checkVertical=function(slidedeck){if(typeof(slidedeck)=='undefined'){var slidedeck=this.slidedeck,frame=this.elems.frame,prevButton=this.elems.previousVertical,nextButton=this.elems.nextVertical}else{var frame=slidedeck.deck.closest('.slidedeck-frame');var prevButton=frame.find('.deck-navigation.vertical.prev');var nextButton=frame.find('.deck-navigation.vertical.next')}frame.addClass('no-vertical-slide');if(slidedeck.verticalSlides){if(slidedeck.verticalSlides[slidedeck.current-1]){if(slidedeck.verticalSlides[slidedeck.current-1].navChildren){frame.removeClass('no-vertical-slide')}}}if(frame.hasClass('no-vertical-slide')){return false}prevButton.show();nextButton.show();if(slidedeck.options.cycle){return false}if(typeof(slidedeck.vertical())!='undefined'){if(slidedeck.vertical().current==slidedeck.vertical().slides.length-1&&!frame.hasClass(SlideDeckPrefix+'show-back-cover')){nextButton.hide()}else if(slidedeck.vertical().current==0){prevButton.hide()}}};SlideDeckFadingNav.prototype.checkHorizontal=function(slidedeck){if(typeof(slidedeck)=='undefined'){var slidedeck=this.slidedeck,frame=this.elems.frame,prevButton=this.elems.previousHorizontal,nextButton=this.elems.nextHorizontal}else{var frame=slidedeck.deck.closest('.slidedeck-frame');var prevButton=frame.find('.deck-navigation.horizontal.prev');var nextButton=frame.find('.deck-navigation.horizontal.next')}if(!frame.hasClass('no-vertical-slide')){return false}prevButton.show();nextButton.show();if(slidedeck.options.cycle){return false}if(slidedeck.current==slidedeck.slides.length&&!frame.hasClass(SlideDeckPrefix+'show-back-cover')){nextButton.hide()}else if(slidedeck.current==1){prevButton.hide()}};SlideDeckFadingNav.prototype.initialize=function(elem){var self=this;this.elems.slidedeck=$(elem);this.elems.frame=this.elems.slidedeck.closest('.slidedeck-frame');this.elems.navs=this.elems.frame.find('.deck-navigation');if(this.elems.navs.length<1){return false}this.elems.previousHorizontal=this.elems.navs.filter('.horizontal.prev');this.elems.nextHorizontal=this.elems.navs.filter('.horizontal.next');this.elems.previousVertical=this.elems.navs.filter('.vertical.prev');this.elems.nextVertical=this.elems.navs.filter('.vertical.next');this.slidedeck=this.elems.slidedeck.slidedeck();this.elems.frame.delegate('.deck-navigation','click',function(event){event.preventDefault();self.nav(this.href.split('#')[1])});var oldBefore=this.slidedeck.options.before;this.slidedeck.setOption('before',function(deck){if(typeof(oldBefore)=='function')oldBefore(deck);self.checkHorizontal();self.checkVertical()});if(this.slidedeck.verticalSlides){this.slidedeck.slides.each(function(ind){if(self.slidedeck.verticalSlides[ind]){if(typeof(self.slidedeck.verticalSlides[ind].slides)!='undefined'){var oldVerticalComplete=self.slidedeck.vertical().options.complete;self.slidedeck.vertical().options.complete=function(vDeck){if(typeof(oldVerticalComplete)=='function')oldVerticalComplete(vDeck);self.checkVertical()}}}})}if(this.elems.frame.hasClass('display-nav-hover')){this.elems.frame.mouseenter(function(event){self.elems.frame.addClass('hover')}).mouseleave(function(event){self.elems.frame.removeClass('hover')})}if(this.slidedeck.slides.length==1){this.elems.frame.find('.deck-navigation.horizontal').hide()}this.checkVertical();this.checkHorizontal()};SlideDeckOverlay.prototype.close=function(){var self=this;this.elems.container.removeClass('open');this.elems.container.width(0)};SlideDeckOverlay.prototype.initialize=function(elem){var self=this;this.elems.slidedeck=$(elem);this.elems.frame=this.elems.slidedeck.closest('.slidedeck-frame');if(this.elems.frame.length<1){return false}if(this.elems.frame.find('.'+this.classes.container).length<1){return false}if(__slidedeck2_isMobile()&&this.elems.frame.hasClass('show-overlay-hover')){this.elems.frame.removeClass('show-overlay-hover');this.elems.frame.addClass('show-overlay-always')}if(__slidedeck2_isiOS()){this.elems.frame.addClass('sd2-is-ios')}this.elems.container=this.elems.frame.find('.'+this.classes.container);this.elems.toggle=this.elems.container.find('.'+this.classes.toggle);this.elems.wrapper=this.elems.container.find('.'+this.classes.wrapper);this.elems.overlays=this.elems.wrapper.find('.'+this.classes.overlay);if(this.elems.container.offset().left=slidesLength){next=i+1}self.lazyLoadImages(next)}for(var i=0;i=slidesLength){next=i+1}self.lazyLoadVideos(next)}clearTimeout(self.lazyLoadPrevTimer);self.lazyLoadPrevTimer=setTimeout(function(){self.lazyLoadPrev(currentIndex,lazyLoadPadding)},Math.round(self.deckAnimationSpeed/2))};SlideDeckLazyLoad.prototype.lazyLoadPrev=function(currentIndex,lazyLoadPadding){var self=this;var slidesLength=self.slidedeck.slides.length;if(__isVerticalDeck(self.slidedeck.deck)){slidesLength=self.slidedeck.vertical().slides.length}for(var i=0;i1){easing=matches[1]}return easing};SlideDeckCover.prototype.open=function(){var self=this;this.slidedeck.pauseAutoPlay=false;this.slidedeck.options.keys=this.slidedeckOptions.keys;this.slidedeck.options.scroll=this.slidedeckOptions.scroll;this.elems.frame.removeClass('force-nav-hidden');if(!this.elems.frame.hasClass('show-overlay-never')){if(this.elems.frame.hasClass('show-overlay-hover')){this.elems.overlay.removeAttr('style')}else{this.elems.overlay.animate({opacity:1},this.speed)}}var outerWidth=this.elems.frontWrapper.outerWidth();this.elems.frontWrapper.animate({left:0-outerWidth},this.speed,this.easing[this.easingStyle()].front);this.elems.frontMask.fadeOut(this.speed,function(){self.elems.frontCover.hide()})};SlideDeckCover.prototype.revert=function(){var self=this;this.backCoverVisible=true;if(__isVerticalDeck(this.slidedeck)){this.slidedeck.goToVertical(1)}else{this.slidedeck.goTo(1)}this.slidedeck.setOption('keys',this.slidedeckOptions.keys);this.slidedeck.setOption('scroll',this.slidedeckOptions.scroll);this.slidedeck.pauseAutoPlay=false;this.elems.frame.removeClass('force-nav-hidden');this.elems.overlay.fadeIn(this.speed);var outerWidth=this.elems.backWrapper.outerWidth();this.elems.backWrapper.animate({right:0-outerWidth},this.speed,this.easing[this.easingStyle()].back);this.elems.backMask.animate({opacity:0},this.speed,function(){self.elems.backCover.css('z-index',1);self.backCoverVisible=false})};SlideDeckCover.prototype.initialize=function(elem){var self=this;if(self.elems.frame){if(self.elems.frame.hasClass('sd2-small'))return false}this.elems.slidedeck=$(elem);this.elems.frame=this.elems.slidedeck.closest('.'+this.classes.frame);if(this.elems.frame.length<1){return false}this.elems.frontCover=this.elems.frame.find('.'+this.classes.frontCover);this.elems.backCover=this.elems.frame.find('.'+this.classes.backCover);this.elems.nav=this.elems.frame.find('.'+this.classes.nav);this.elems.overlay=this.elems.frame.find('.'+this.classes.overlay);this.slidedeck=this.elems.slidedeck.slidedeck();this.slidedeckOptions=$.extend(this.slidedeckOptions,this.slidedeck.options);var coverMatches=this.elems.frame[0].className.match(/slidedeck-cover-style-([a-z0-9A-Z\-]+)/);if(coverMatches){if(coverMatches.length>1){this.coverStyle=coverMatches[1]}var easingMatches=this.elems.frame[0].className.match(/slidedeck-cover-easing-([a-z0-9A-Z\-]+)/);if(!easingMatches){this.elems.frame.addClass('slidedeck-cover-easing-back')}if(this.elems.frontCover.length){this.hasFront=true;this.initializeFront()}if(this.elems.backCover.length){this.hasBack=true;this.initializeBack()}}};SlideDeckCover.prototype.initializeBack=function(){var self=this;if(self.elems.frame){if(self.elems.frame.hasClass('sd2-small'))return false}this.elems.backWrapper=this.elems.backCover.find('.'+this.classes.wrapper);this.elems.backMask=this.elems.backCover.find('.'+this.classes.mask);this.elems.restart=this.elems.backCover.find('.'+this.classes.restart);var oldBefore=this.slidedeck.options.before;this.slidedeck.setOption('before',function(slidedeck){if(typeof(oldBefore)=='function')oldBefore(slidedeck);if(((slidedeck.current==1&&slidedeck.former==slidedeck.slides.length)||(slidedeck.current==slidedeck.former&&slidedeck.current==slidedeck.slides.length&&slidedeck.options.cycle==false))&&slidedeck.slides.length>1){if(self.backCoverVisible==false){slidedeck.current=slidedeck.slides.length;self.close()}}});this.elems.restart.bind('click',function(event){event.preventDefault();self.revert()});if(typeof(SlideDeckCoverPostProcessCTA)=='function'){SlideDeckCoverPostProcessCTA(this.elems.restart)}if(SlideDeckCoverPostProcessBack[this.coverStyle])SlideDeckCoverPostProcessBack[this.coverStyle](this.elems.restart,this.elems.frame.hasClass('slidedeck-cover-peek'));self.elems.backCover.hide()};SlideDeckCover.prototype.initializeFront=function(){var self=this;if(self.elems.frame){if(self.elems.frame.hasClass('sd2-small'))return false}this.elems.frontWrapper=this.elems.frontCover.find('.'+this.classes.wrapper);this.elems.frontMask=this.elems.frontCover.find('.'+this.classes.mask);this.elems.open=this.elems.frontCover.find('.'+this.classes.open);this.elems.frame.addClass('force-nav-hidden');this.elems.overlay.css('opacity',0);this.slidedeck.pauseAutoPlay=true;this.slidedeck.setOption('keys',false);this.slidedeck.setOption('scroll',false);this.elems.open.bind('click',function(event){event.preventDefault();self.open()});if(this.slidedeck.options.autoPlay==true){setTimeout(function(){self.open()},this.slidedeck.options.autoPlayInterval)}if(typeof(SlideDeckCoverPostProcessCTA)=='function'){SlideDeckCoverPostProcessCTA(this.elems.open)}if(SlideDeckCoverPostProcessFront[this.coverStyle])SlideDeckCoverPostProcessFront[this.coverStyle](this.elems.open,this.elems.frame.hasClass('slidedeck-cover-peek'));$(window).load(function(){self.elems.frontMask.animate({opacity:0.35},1000)})};SlideDeckCoverPostProcessFront['leather']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var r=Raphael($color[0],42,84);var offset=peek?0:42;var shape=r.ellipse(offset,42,41,42);shape.attr({'stroke':'none','fill':accentColor});$color.css('background-color',"").data('slidedeck-cover-shape',shape);$button.bind('mouseenter',function(event){shape.attr('fill',hoverColor)}).bind('mouseleave',function(event){shape.attr('fill',accentColor)});$button.closest('.slidedeck-frame')[0].className=$button.closest('.slidedeck-frame')[0].className.replace(/slidedeck-cover-easing-([a-z0-9A-Z\-]+)/,"slidedeck-cover-easing-back")};SlideDeckCoverPostProcessBack['leather']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var r=Raphael($color[0],42,84);var offset=peek?42:0;var shape=r.ellipse(offset,42,41,42);shape.attr({'stroke':'none','fill':accentColor});$button.bind('mouseenter',function(event){shape.attr('fill',hoverColor)}).bind('mouseleave',function(event){shape.attr('fill',accentColor)});var ctaButton=$button.parents('.slidedeck-cover-wrapper').find('.slidedeck-cover-cta');var ctaButtonColor=ctaButton.find('.slidedeck-cover-color');ctaButtonColor.find('.cap2').remove();ctaButtonColor.find('.cap2-image').remove();ctaButton.find('.cap1').remove();ctaButton.find('.cap1-image').remove();ctaButtonColor.append('
');ctaButtonColor.append('
');ctaButton.append('
');ctaButton.append('
');var r1=Raphael(ctaButton.find('.cap1')[0],32,57);var r2=Raphael(ctaButtonColor.find('.cap2')[0],32,57);var cap1=r1.ellipse(31,29,26,26);cap1.attr({fill:accentColor});var cap2=r2.ellipse(0,29,26,26);cap2.attr({fill:accentColor});$color.css('background-color',"").data('slidedeck-cover-shape',[shape,cap1,cap2]);ctaButton.bind('mouseenter',function(event){cap1.attr('fill',hoverColor);cap2.attr('fill',hoverColor)}).bind('mouseleave',function(event){cap1.attr('fill',accentColor);cap2.attr('fill',accentColor)});$button.closest('.slidedeck-frame')[0].className=$button.closest('.slidedeck-frame')[0].className.replace(/slidedeck-cover-easing-([a-z0-9A-Z\-]+)/,"slidedeck-cover-easing-back")};SlideDeckCoverPostProcessFront['book']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var r=Raphael($color[0],90,72);if(peek){var shape=r.path("M84.246,0.901c-4.648-0.482-11.957-0.625-22.065-0.822L60.646,0.05 C58.979,0.017,57.227,0,55.445,0C33.884,0,5.432,2.263,0,2.712c0,0.037,0,0.111,0,0.201v67.831c0,0,29.504-2.716,49-2 c23.397,0.86,40.878,4.236,40.878-1.404c0-0.154,0-0.354,0-0.596c0.099,0.03,0.205,0.057,0.297,0.09c0-4.062,0-64.046,0-64.046 C90.176,2.31,89.408,1.434,84.246,0.901z")}else{var shape=r.path("M92.65,2.782c0,0-37.278-3.218-61.673-2.739 C9.446,0.466,0.471,0.56,0.471,3.781c0,3.626,0,59.199,0,66.549c-0.053-0.429,0.106-0.775,0.436-1.061 c1.439,4.389,14.292,1.716,35.801,1.333c18.233-0.327,55.941,1.146,55.941,1.146v-0.941h0.001V2.782z")}shape.attr({'stroke':'none','fill':accentColor});$color.css('background-color',"").data('slidedeck-cover-shape',shape);$button.bind('mouseenter',function(event){shape.attr('fill',hoverColor)}).bind('mouseleave',function(event){shape.attr('fill',accentColor)});$button.closest('.slidedeck-frame')[0].className=$button.closest('.slidedeck-frame')[0].className.replace(/slidedeck-cover-easing-([a-z0-9A-Z\-]+)/,"slidedeck-cover-easing-smooth")};SlideDeckCoverPostProcessBack['book']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var r=Raphael($color[0],90,72);var shape=r.path("M92.65,2.782c0,0-37.278-3.218-61.673-2.739 C9.446,0.466,0.471,0.56,0.471,3.781c0,3.626,0,59.199,0,66.549c-0.053-0.429,0.106-0.775,0.436-1.061 c1.439,4.389,14.292,1.716,35.801,1.333c18.233-0.327,55.941,1.146,55.941,1.146v-0.941h0.001V2.782z");shape.attr({'stroke':'none','fill':accentColor});$color.css('background-color',"").data('slidedeck-cover-shape',shape);$button.bind('mouseenter',function(event){shape.attr('fill',hoverColor)}).bind('mouseleave',function(event){shape.attr('fill',accentColor)});$button.closest('.slidedeck-frame')[0].className=$button.closest('.slidedeck-frame')[0].className.replace(/slidedeck-cover-easing-([a-z0-9A-Z\-]+)/,"slidedeck-cover-easing-smooth")};SlideDeckCoverPostProcessFront['glass']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var frostedColor1=Raphael.rgb2hsb(rgb.r,rgb.g,rgb.b);frostedColor1.s=frostedColor1.s*0.2;frostedColor1.b=1;var frostedColor2=Raphael.rgb2hsb(rgb.r,rgb.g,rgb.b);frostedColor2.s=frostedColor2.s*0.05;frostedColor2.b=1;var glassGradient='90-hsb('+frostedColor1.h+','+frostedColor1.s+','+frostedColor1.b+')-hsb('+frostedColor2.h+','+frostedColor2.s+','+frostedColor2.b+')';$button.parents('.slidedeck-cover-front').find('.frosted-glass').remove();$button.parents('.slidedeck-cover-front').find('.slidedeck-cover-copy').append('
');var frosted=$button.parents('.slidedeck-cover-wrapper').find('.frosted-glass');var frostedWidth=frosted.width();var frostedHeight=frosted.height();var r=Raphael(frosted[0],frostedWidth,frostedHeight);var radius=25;var offset=10;var path="M0,0";path+="H"+frostedWidth;path+="V"+frostedHeight;path+="H0";path+="z";path+="M "+parseInt(frostedWidth-(radius*2)-offset,10)+" "+parseInt(frostedHeight/2,10)+" a "+radius+" "+radius+" 0 1 0 0 "+ -0.0001;path+="m14,-6h13v-4l12,11,l-12,11,v-4h-13";var frostedPathBackground=r.path(path);frostedPathBackground.attr({stroke:"none",fill:'url('+slideDeck2URLPath+'/images/frosted-glass-noise.png)',opacity:1});var frostedPath=r.path(path);frostedPath.attr({stroke:"none",fill:glassGradient,opacity:0.6});frosted.data('slidedeck-frosted-cover-background',frostedPath);var path="M0,0";path+="H"+frostedWidth;path+="V"+frostedHeight*0.1;path+="Q"+frostedWidth*0.3+","+frostedHeight*0.3+", 0 "+frostedHeight*0.85;path+="z";var shinePath=r.path(path);shinePath.attr({stroke:"none",fill:glassGradient,opacity:0.2});frosted.data('slidedeck-frosted-cover-shine',shinePath)};SlideDeckCoverPostProcessBack['glass']=function($button,peek){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);var frostedColor1=Raphael.rgb2hsb(rgb.r,rgb.g,rgb.b);frostedColor1.s=frostedColor1.s*0.2;frostedColor1.b=1;var frostedColor2=Raphael.rgb2hsb(rgb.r,rgb.g,rgb.b);frostedColor2.s=frostedColor2.s*0.05;frostedColor2.b=1;var glassGradient='90-hsb('+frostedColor1.h+','+frostedColor1.s+','+frostedColor1.b+')-hsb('+frostedColor2.h+','+frostedColor2.s+','+frostedColor2.b+')';$button.parents('.slidedeck-cover-back').find('.frosted-glass-back').remove();$button.parents('.slidedeck-cover-back').find('.slidedeck-cover-copy').append('
');var frosted=$button.parents('.slidedeck-cover-back').find('.frosted-glass-back');var frostedWidth=frosted.width();var frostedHeight=frosted.height();var r=Raphael(frosted[0],frostedWidth,frostedHeight);var radius=25;var offset=10;var path="M0,0";path+="H"+frostedWidth;path+="V"+frostedHeight;path+="H0";path+="z";path+="M "+parseInt(radius-offset,10)+" "+parseInt(frostedHeight/2,10)+" a "+radius+" "+radius+" 0 1 0 0 "+ -0.0001;var frostedPathBackground=r.path(path);frostedPathBackground.attr({stroke:"none",fill:'url('+slideDeck2URLPath+'/images/frosted-glass-noise.png)',opacity:1});var frostedPath=r.path(path);frostedPath.attr({stroke:"none",fill:glassGradient,opacity:0.6});frosted.data('slidedeck-frosted-cover-back-background',frostedPath);var path="M0,0";path+="H"+frostedWidth;path+="V"+frostedHeight*0.1;path+="Q"+frostedWidth*0.3+","+frostedHeight*0.3+", 0 "+frostedHeight*0.85;path+="z";path+="M "+parseInt((radius)-offset,10)+" "+parseInt(frostedHeight/2,10)+" a "+radius+" "+radius+" 0 1 0 0 "+ -0.0001;var shinePath=r.path(path);shinePath.attr({stroke:"none",fill:glassGradient,opacity:0.2});frosted.data('slidedeck-frosted-cover-back-shine',shinePath)};var SlideDeckCoverPostProcessCTA=function($button){var $color=$button.find('.slidedeck-cover-color');var accentColor=$color.css('background-color');var rgb=Raphael.getRGB(accentColor);var hsl=Raphael.rgb2hsl(rgb.r,rgb.g,rgb.b);hsl.l=Math.min(100,(110*hsl.l))/100;var hoverColor=Raphael.hsl(hsl.h,hsl.s,hsl.l);$button.parent().delegate('.slidedeck-cover-cta','mouseenter mouseleave',function(event){if(event.type=='mouseenter'){$(this).find('.slidedeck-cover-color').css({backgroundColor:hoverColor})}else{$(this).find('.slidedeck-cover-color').css({backgroundColor:accentColor})}})};$(document).ready(function(){$('.slidedeck').each(function(){if(!$.data(this,'SlideDeckCover'))$.data(this,'SlideDeckCover',new SlideDeckCover(this))})})})(jQuery);(function($){var slideDeckBugExternalToggle={linkTargets:function(c){var timer=new Array();var links=this.setContext(c).context.find('.slidedeck-frame a.slidedeck-2-bug[rel*="external"]');links.attr('target','_blank');links.each(function(ind){var $bug=$(this);$bug.addClass('open');timer[ind]=window.setTimeout(function(){$bug.removeClass('open')},3000);$bug.on('mouseenter',function(event){window.clearTimeout(timer[ind]);$bug.addClass('open')}).on('mouseleave',function(event){$bug.removeClass('open')})});return this},setContext:function(c){if(typeof(c)!="undefined"){this.context=$(c)}return this},initialize:function(c){if(typeof(c)=="undefined"){c=$(document.body)}this.setContext(c).linkTargets()}};$(document).ready(function(){slideDeckBugExternalToggle.initialize()})})(jQuery); /*! // ┌────────────────────────────────────────────────────────────────────┐ \\ // │ Raphaël 2.1.0 - JavaScript Vector Library │ \\ // ├────────────────────────────────────────────────────────────────────┤ \\ // │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ // │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ // ├────────────────────────────────────────────────────────────────────┤ \\ // │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ // └────────────────────────────────────────────────────────────────────┘ \\ */ (function(v){var u="0.3.4",t="hasOwnProperty",s=/[\.\/]/,r="*",q=function(){},p=function(d,c){return d-c},o,n,m={n:{}},l=function(D,C){var B=m,A=n,z=Array.prototype.slice.call(arguments,2),y=l.listeners(D),x=0,w=!1,k,j=[],i={},h=[],g=o,G=[];o=D,n=0;for(var F=0,E=y.length;Fbo*br.top){bp=br.percents[Q],bg=br.percents[Q-1]||0,bb=bb/br.top*(bp-bg),bh=br.percents[Q+1],bl=br.anim[bp];break}bo&&bq.attr(br.anim[br.percents[Q]])}if(!!bl){if(!bk){for(var bf in bl){if(bl[aV](bf)){if(cS[aV](bf)||bq.paper.customAttributes[aV](bf)){Z[bf]=bq.attr(bf),Z[bf]==null&&(Z[bf]=cV[bf]),X[bf]=bl[bf];switch(cS[bf]){case dv:V[bf]=(X[bf]-Z[bf])/bb;break;case"colour":Z[bf]=a8.getRGB(Z[bf]);var bd=a8.getRGB(X[bf]);V[bf]={r:(bd.r-Z[bf].r)/bb,g:(bd.g-Z[bf].g)/bb,b:(bd.b-Z[bf].b)/bb};break;case"path":var bc=dA(Z[bf],X[bf]),ba=bc[1];Z[bf]=bc[0],V[bf]=[];for(Q=0,C=Z[bf].length;Qo){return o}while(Em?E=n:o=n,n=(o-E)/2+E}return n}function q(e,d){var f=p(e,d);return((s*f+t)*f+u)*f}function r(b){return((v*b+w)*b+x)*b}var x=3*C,w=3*(A-C)-x,v=1-x-w,u=3*B,t=3*(z-B)-u,s=1-u-t;return q(D,1/(200*y))}function aj(){return this.x+aH+this.y+aH+this.width+" × "+this.height}function ak(){return this.x+aH+this.y}function aL(h,g,l,k,j,i){h!=null?(this.a=+h,this.b=+g,this.c=+l,this.d=+k,this.e=+j,this.f=+i):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function dK(T,S,R){T=a8._path2curve(T),S=a8._path2curve(S);var Q,P,O,N,M,L,K,J,I,H,G=R?0:[];for(var F=0,E=T.length;F=0&&a<=1&&I>=0&&I<=1&&(V?L++:L.push({x:z.x,y:z.y,t1:a,t2:I}))}}}return L}function dM(d,c){return dL(d,c,1)}function dN(d,c){return dL(d,c)}function dO(D,C,B,A,z,y,x,w){if(!(at(D,B)at(z,x)||at(C,A)at(y,w))){var v=(D*A-C*B)*(z-x)-(D-B)*(z*w-y*x),u=(D*A-C*B)*(y-w)-(C-A)*(z*w-y*x),t=(D-B)*(y-w)-(C-A)*(z-x);if(!t){return}var s=v/t,r=u/t,q=+s.toFixed(2),p=+r.toFixed(2);if(q<+aq(D,B).toFixed(2)||q>+at(D,B).toFixed(2)||q<+aq(z,x).toFixed(2)||q>+at(z,x).toFixed(2)||p<+aq(C,A).toFixed(2)||p>+at(C,A).toFixed(2)||p<+aq(y,w).toFixed(2)||p>+at(y,w).toFixed(2)){return}return{x:s,y:r}}}function dP(B,A,z,y,x,w,v,u,t){if(!(t<0||dQ(B,A,z,y,x,w,v,u)o){r/=2,q+=(p1?1:D<0?0:D;var C=D/2,B=12,A=[-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],z=[0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],y=0;for(var x=0;xk;k+=2){var i=[{x:+h[k-2],y:+h[k-1]},{x:+h[k],y:+h[k+1]},{x:+h[k+2],y:+h[k+3]},{x:+h[k+4],y:+h[k+5]}];g?k?j-4==k?i[3]={x:+h[0],y:+h[1]}:j-2==k&&(i[2]={x:+h[0],y:+h[1]},i[3]={x:+h[2],y:+h[3]}):i[0]={x:+h[j-2],y:+h[j-1]}:j-4==k?i[3]=i[2]:k||(i[0]={x:+h[k],y:+h[k+1]}),l.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return l}function aY(){return this.hex}function a2(f,e,h){function g(){var d=Array.prototype.slice.call(arguments,0),c=d.join("␀"),b=g.cache=g.cache||{},a=g.count=g.count||[];if(b[aV](c)){a4(a,c);return h?h(b[c]):b[c]}a.length>=1000&&delete b[a.shift()],a.push(c),b[c]=f[aO](e,d);return h?h(b[c]):b[c]}return g}function a4(f,e){for(var h=0,g=f.length;h',b6=b8.firstChild,b6.style.behavior="url(#default#VML)";if(!b6||typeof b6.adj!="object"){return a8.type=aJ}b8=null}a8.svg=!(a8.vml=a8.type=="VML"),a8._Paper=aR,a8.fn=aQ=aR.prototype=a8.prototype,a8._id=0,a8._oid=0,a8.is=function(d,c){c=ax.call(c);if(c=="finite"){return !de[aV](+d)}if(c=="array"){return d instanceof Array}return c=="null"&&d===null||c==typeof d&&d!==null||c=="object"&&d===Object(d)||c=="array"&&Array.isArray&&Array.isArray(d)||dk.call(d).slice(8,-1).toLowerCase()==c},a8.angle=function(a,p,o,n,m,l){if(m==null){var k=a-o,j=p-n;if(!k&&!j){return 0}return(180+av.atan2(-j,-k)*180/dx+360)%360}return a8.angle(a,p,m,l)-a8.angle(o,n,m,l)},a8.rad=function(b){return b%360*dx/180},a8.deg=function(b){return b*180/dx%360},a8.snapTo=function(a,j,i){i=a8.is(i,"finite")?i:10;if(a8.is(a,dr)){var h=a.length;while(h--){if(ao(a[h]-j)<=i){return a[h]}}}else{a=+a;var g=j%a;if(ga-i){return j-g+a}}return j};var b4=a8.createUUID=function(d,c){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(d,c).toUpperCase()}}(/[xy]/g,function(e){var d=av.random()*16|0,f=e=="x"?d:d&3|8;return f.toString(16)});a8.setWindow=function(a){eve("raphael.setWindow",a8,aU.win,a),aU.win=a,aU.doc=aU.win.document,a8._engine.initWin&&a8._engine.initWin(aU.win)};var b3=function(a){if(a8.vml){var n=/^\s+|\s+$/g,m;try{var l=new ActiveXObject("htmlfile");l.write(""),l.close(),m=l.body}catch(k){m=createPopup().document.body}var j=m.createTextRange();b3=a2(function(d){try{m.style.color=aF(d).replace(n,aJ);var c=j.queryCommandValue("ForeColor");c=(c&255)<<16|c&65280|(c&16711680)>>>16;return"#"+("000000"+c.toString(16)).slice(-6)}catch(f){return"none"}})}else{var h=aU.doc.createElement("i");h.title="Raphaël Colour Picker",h.style.display="none",aU.doc.body.appendChild(h),b3=a2(function(b){h.style.color=b;return aU.doc.defaultView.getComputedStyle(h,aJ).getPropertyValue("color")})}return b3(a)},b2=function(){return"hsb("+[this.h,this.s,this.b]+")"},b0=function(){return"hsl("+[this.h,this.s,this.l]+")"},a9=function(){return this.hex},a7=function(a,h,g){h==null&&a8.is(a,"object")&&"r" in a&&"g" in a&&"b" in a&&(g=a.b,h=a.g,a=a.r);if(h==null&&a8.is(a,dt)){var f=a8.getRGB(a);a=f.r,h=f.g,g=f.b}if(a>1||h>1||g>1){a/=255,h/=255,g/=255}return[a,h,g]},a5=function(a,j,i,h){a*=255,j*=255,i*=255;var g={r:a,g:j,b:i,hex:a8.rgb(a,j,i),toString:a9};a8.is(h,"finite")&&(g.opacity=h);return g};a8.color=function(a){var d;a8.is(a,"object")&&"h" in a&&"s" in a&&"b" in a?(d=a8.hsb2rgb(a),a.r=d.r,a.g=d.g,a.b=d.b,a.hex=d.hex):a8.is(a,"object")&&"h" in a&&"s" in a&&"l" in a?(d=a8.hsl2rgb(a),a.r=d.r,a.g=d.g,a.b=d.b,a.hex=d.hex):(a8.is(a,"string")&&(a=a8.getRGB(a)),a8.is(a,"object")&&"r" in a&&"g" in a&&"b" in a?(d=a8.rgb2hsl(a),a.h=d.h,a.s=d.s,a.l=d.l,d=a8.rgb2hsb(a),a.v=d.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=a9;return a},a8.hsb2rgb=function(r,q,p,o){this.is(r,"object")&&"h" in r&&"s" in r&&"b" in r&&(p=r.b,q=r.s,r=r.h,o=r.o),r*=360;var n,m,l,k,j;r=r%360/60,j=p*q,k=j*(1-ao(r%2-1)),n=m=l=p-j,r=~~r,n+=[j,k,0,0,k,j][r],m+=[k,j,j,k,0,0][r],l+=[0,0,k,j,j,k][r];return a5(n,m,l,o)},a8.hsl2rgb=function(r,q,p,o){this.is(r,"object")&&"h" in r&&"s" in r&&"l" in r&&(p=r.l,q=r.s,r=r.h);if(r>1||q>1||p>1){r/=360,q/=100,p/=100}r*=360;var n,m,l,k,j;r=r%360/60,j=2*q*(p<0.5?p:1-p),k=j*(1-ao(r%2-1)),n=m=l=p-j/2,r=~~r,n+=[j,k,0,0,k,j][r],m+=[k,j,j,k,0,0][r],l+=[0,0,k,j,j,k][r];return a5(n,m,l,o)},a8.rgb2hsb=function(i,h,n){n=a7(i,h,n),i=n[0],h=n[1],n=n[2];var m,l,k,j;k=at(i,h,n),j=k-aq(i,h,n),m=j==0?null:k==i?(h-n)/j:k==h?(n-i)/j+2:(i-h)/j+4,m=(m+360)%6*60/360,l=j==0?0:j/k;return{h:m,s:l,b:k,toString:b2}},a8.rgb2hsl=function(r,q,p){p=a7(r,q,p),r=p[0],q=p[1],p=p[2];var o,n,m,l,k,j;l=at(r,q,p),k=aq(r,q,p),j=l-k,o=j==0?null:l==r?(q-p)/j:l==q?(p-r)/j+2:(r-q)/j+4,o=(o+360)%6*60/360,m=(l+k)/2,n=j==0?0:m<0.5?j/(2*m):j/(2-2*m);return{h:o,s:n,l:m,toString:b0}},a8._path2string=function(){return this.join(",").replace(b9,"$1")};var aZ=a8._preload=function(e,d){var f=aU.doc.createElement("img");f.style.cssText="position:absolute;left:-9999em;top:-9999em",f.onload=function(){d.call(this),this.onload=null,aU.doc.body.removeChild(this)},f.onerror=function(){aU.doc.body.removeChild(this)},aU.doc.body.appendChild(f),f.src=e};a8.getRGB=a2(function(r){if(!r||!!((r=aF(r)).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:aY}}if(r=="none"){return{r:-1,g:-1,b:-1,hex:"none",toString:aY}}!cK[aV](r.toLowerCase().substring(0,2))&&r.charAt()!="#"&&(r=b3(r));var q,p,o,n,m,l,g,a=r.match(df);if(a){a[2]&&(n=c1(a[2].substring(5),16),o=c1(a[2].substring(3,5),16),p=c1(a[2].substring(1,3),16)),a[3]&&(n=c1((l=a[3].charAt(3))+l,16),o=c1((l=a[3].charAt(2))+l,16),p=c1((l=a[3].charAt(1))+l,16)),a[4]&&(g=a[4][aD](cM),p=c4(g[0]),g[0].slice(-1)=="%"&&(p*=2.55),o=c4(g[1]),g[1].slice(-1)=="%"&&(o*=2.55),n=c4(g[2]),g[2].slice(-1)=="%"&&(n*=2.55),a[1].toLowerCase().slice(0,4)=="rgba"&&(m=c4(g[3])),g[3]&&g[3].slice(-1)=="%"&&(m/=100));if(a[5]){g=a[5][aD](cM),p=c4(g[0]),g[0].slice(-1)=="%"&&(p*=2.55),o=c4(g[1]),g[1].slice(-1)=="%"&&(o*=2.55),n=c4(g[2]),g[2].slice(-1)=="%"&&(n*=2.55),(g[0].slice(-3)=="deg"||g[0].slice(-1)=="°")&&(p/=360),a[1].toLowerCase().slice(0,4)=="hsba"&&(m=c4(g[3])),g[3]&&g[3].slice(-1)=="%"&&(m/=100);return a8.hsb2rgb(p,o,n,m)}if(a[6]){g=a[6][aD](cM),p=c4(g[0]),g[0].slice(-1)=="%"&&(p*=2.55),o=c4(g[1]),g[1].slice(-1)=="%"&&(o*=2.55),n=c4(g[2]),g[2].slice(-1)=="%"&&(n*=2.55),(g[0].slice(-3)=="deg"||g[0].slice(-1)=="°")&&(p/=360),a[1].toLowerCase().slice(0,4)=="hsla"&&(m=c4(g[3])),g[3]&&g[3].slice(-1)=="%"&&(m/=100);return a8.hsl2rgb(p,o,n,m)}a={r:p,g:o,b:n,toString:aY},a.hex="#"+(16777216|n|o<<8|p<<16).toString(16).slice(1),a8.is(m,"finite")&&(a.opacity=m);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:aY}},a8),a8.hsb=a2(function(a,f,e){return a8.hsb2rgb(a,f,e).hex}),a8.hsl=a2(function(a,f,e){return a8.hsl2rgb(a,f,e).hex}),a8.rgb=a2(function(e,d,f){return"#"+(16777216|f|d<<8|e<<16).toString(16).slice(1)}),a8.getColor=function(e){var d=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75},f=this.hsb2rgb(d.h,d.s,d.b);d.h+=0.075,d.h>1&&(d.h=0,d.s-=0.2,d.s<=0&&(this.getColor.start={h:0,s:1,b:d.b}));return f.hex},a8.getColor.reset=function(){delete this.start},a8.parsePathString=function(a){if(!a){return null}var h=aT(a);if(h.arr){return dI(h.arr)}var g={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},f=[];a8.is(a,dr)&&a8.is(a[0],dr)&&(f=dI(a)),f.length||aF(a).replace(b7,function(e,d,k){var j=[],i=d.toLowerCase();k.replace(b1,function(l,c){c&&j.push(+c)}),i=="m"&&j.length>2&&(f.push([d][aN](j.splice(0,2))),i="l",d=d=="m"?"l":"L");if(i=="r"){f.push([d][aN](j))}else{while(j.length>=g[i]){f.push([d][aN](j.splice(0,g[i])));if(!g[i]){break}}}}),f.toString=a8._path2string,h.arr=dI(f);return f},a8.parseTransformString=a2(function(a){if(!a){return null}var f={r:3,s:4,t:2,m:6},e=[];a8.is(a,dr)&&a8.is(a[0],dr)&&(e=dI(a)),e.length||aF(a).replace(dS,function(g,d,j){var i=[],h=ax.call(d);j.replace(b1,function(k,c){c&&i.push(+c)}),e.push([d][aN](i))}),e.toString=a8._path2string;return e});var aT=function(d){var c=aT.ps=aT.ps||{};c[d]?c[d].sleep=100:c[d]={sleep:100},setTimeout(function(){for(var a in c){c[aV](a)&&a!=d&&(c[a].sleep--,!c[a].sleep&&delete c[a])}});return c[d]};a8.findDotsAtSegment=function(X,W,V,U,T,S,R,Q,P){var O=1-P,N=dz(O,3),M=dz(O,2),L=P*P,K=L*P,J=N*X+M*3*P*V+O*3*P*P*T+K*R,I=N*W+M*3*P*U+O*3*P*P*S+K*Q,H=X+2*P*(V-X)+L*(T-2*V+X),G=W+2*P*(U-W)+L*(S-2*U+W),F=V+2*P*(T-V)+L*(R-2*T+V),E=U+2*P*(S-U)+L*(Q-2*S+U),D=O*X+P*V,C=O*W+P*U,B=O*T+P*R,A=O*S+P*Q,w=90-av.atan2(H-F,G-E)*180/dx;(H>F||G=e.x&&d<=e.x2&&f>=e.y&&f<=e.y2},a8.isBBoxIntersect=function(a,f){var e=a8.isPointInsideBBox;return e(f,a.x,a.y)||e(f,a.x2,a.y)||e(f,a.x,a.y2)||e(f,a.x2,a.y2)||e(a,f.x,f.y)||e(a,f.x2,f.y)||e(a,f.x,f.y2)||e(a,f.x2,f.y2)||(a.xf.x||f.xa.x)&&(a.yf.y||f.ya.y)},a8.pathIntersection=function(d,c){return dK(d,c)},a8.pathIntersectionNumber=function(d,c){return dK(d,c,1)},a8.isPointInsidePath=function(a,h,g){var f=a8.pathBBox(a);return a8.isPointInsideBBox(f,h,g)&&dK(a,[["M",h,g],["H",f.x2+10]],1)%2==1},a8._removedFactory=function(b){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var dJ=a8.pathBBox=function(D){var C=aT(D);if(C.bbox){return C.bbox}if(!D){return{x:0,y:0,width:0,height:0,x2:0,y2:0}}D=dA(D);var B=0,A=0,z=[],y=[],x;for(var w=0,v=D.length;w1&&(bs=av.sqrt(bs),bJ=bs*bJ,bI=bs*bI);var br=bJ*bJ,bq=bI*bI,bp=(bG==bF?-1:1)*av.sqrt(ao((br*bq-br*bt*bt-bq*bu*bu)/(br*bt*bt+bq*bu*bu))),bo=bp*bJ*bt/bI+(bL+bE)/2,bn=bp*-bI*bu/bJ+(bK+bD)/2,bm=av.asin(((bK-bn)/bI).toFixed(9)),bl=av.asin(((bD-bn)/bI).toFixed(9));bm=bLbl&&(bm=bm-dx*2),!bF&&bl>bm&&(bl=bl-dx*2)}else{bm=bC[0],bl=bC[1],bo=bC[2],bn=bC[3]}var bk=bl-bm;if(ao(bk)>bB){var bj=bl,bi=bE,bh=bD;bl=bm+bB*(bF&&bl>bm?1:-1),bE=bo+bJ*av.cos(bl),bD=bn+bI*av.sin(bl),bz=dD(bE,bD,bJ,bI,bH,0,bF,bi,bh,[bl,bj,bo,bn])}bk=bl-bm;var bg=av.cos(bm),bf=av.sin(bm),be=av.cos(bl),bd=av.sin(bl),bc=av.tan(bk/4),bb=4/3*bJ*bc,ba=4/3*bI*bc,Z=[bL,bK],Y=[bL+bb*bf,bK-ba*bg],B=[bE+bb*bd,bD-ba*be],z=[bE,bD];Y[0]=2*Z[0]-Y[0],Y[1]=2*Z[1]-Y[1];if(bC){return[Y,B,z][aN](bz)}bz=[Y,B,z][aN](bz).join()[aD](",");var w=[];for(var s=0,n=bz.length;s"1e12"&&(u=0.5),ao(t)>"1e12"&&(t=0.5),u>0&&u<1&&(m=dC(F,E,D,C,B,A,z,y,u),r.push(m.x),s.push(m.y)),t>0&&t<1&&(m=dC(F,E,D,C,B,A,z,y,t),r.push(m.x),s.push(m.y)),x=A-2*C+E-(y-2*A+C),w=2*(C-E)-2*(A-C),v=E-C,u=(-w+av.sqrt(w*w-4*x*v))/2/x,t=(-w-av.sqrt(w*w-4*x*v))/2/x,ao(u)>"1e12"&&(u=0.5),ao(t)>"1e12"&&(t=0.5),u>0&&u<1&&(m=dC(F,E,D,C,B,A,z,y,u),r.push(m.x),s.push(m.y)),t>0&&t<1&&(m=dC(F,E,D,C,B,A,z,y,t),r.push(m.x),s.push(m.y));return{min:{x:aq[aO](0,r),y:aq[aO](0,s)},max:{x:at[aO](0,r),y:at[aO](0,s)}}}),dA=a8._path2curve=a2(function(F,E){var D=!E&&aT(F);if(!E&&D.curve){return dI(D.curve)}var C=dG(F),B=E&&dG(E),A={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},z={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},y=function(f,e){var h,g;if(!f){return["C",e.x,e.y,e.x,e.y,e.x,e.y]}!(f[0] in {T:1,Q:1})&&(e.qx=e.qy=null);switch(f[0]){case"M":e.X=f[1],e.Y=f[2];break;case"A":f=["C"][aN](dD[aO](0,[e.x,e.y][aN](f.slice(1))));break;case"S":h=e.x+(e.x-(e.bx||e.x)),g=e.y+(e.y-(e.by||e.y)),f=["C",h,g][aN](f.slice(1));break;case"T":e.qx=e.x+(e.x-(e.qx||e.x)),e.qy=e.y+(e.y-(e.qy||e.y)),f=["C"][aN](dE(e.x,e.y,e.qx,e.qy,f[1],f[2]));break;case"Q":e.qx=f[1],e.qy=f[2],f=["C"][aN](dE(e.x,e.y,f[1],f[2],f[3],f[4]));break;case"L":f=["C"][aN](dF(e.x,e.y,f[1],f[2]));break;case"H":f=["C"][aN](dF(e.x,e.y,f[1],e.y));break;case"V":f=["C"][aN](dF(e.x,e.y,e.x,f[1]));break;case"Z":f=["C"][aN](dF(e.x,e.y,e.X,e.Y))}return f},x=function(e,d){if(e[d].length>7){e[d].shift();var f=e[d];while(f.length){e.splice(d++,0,["C"][aN](f.splice(0,6)))}e.splice(d,1),u=at(C.length,B&&B.length||0)}},w=function(e,d,j,i,h){e&&d&&e[h][0]=="M"&&d[h][0]!="M"&&(d.splice(h,0,["M",i.x,i.y]),j.bx=0,j.by=0,j.x=e[h][1],j.y=e[h][2],u=at(C.length,B&&B.length||0))};for(var v=0,u=at(C.length,B&&B.length||0);vz){if(d&&!s.start){r=ah(x,w,v[1],v[2],v[3],v[4],v[5],v[6],z-q),t+=["C"+r.start.x,r.start.y,r.m.x,r.m.y,r.x,r.y];if(y){return t}s.start=t,t=["M"+r.x,r.y+"C"+r.n.x,r.n.y,r.end.x,r.end.y,v[5],v[6]].join(),q+=u,x=+v[5],w=+v[6];continue}if(!a&&!d){r=ah(x,w,v[1],v[2],v[3],v[4],v[5],v[6],z-q);return{x:r.x,y:r.y,alpha:r.alpha}}}q+=u,x=+v[5],w=+v[6]}t+=v.shift()+v}s.end=t,r=a?q:d?s:a8.findDotsAtSegment(x,w,v[0],v[1],v[2],v[3],v[4],v[5],1),r.alpha&&(r={x:r.x,y:r.y,alpha:r.alpha});return r}},af=ag(1),ae=ag(),ad=ag(0,1);a8.getTotalLength=af,a8.getPointAtLength=ae,a8.getSubpath=function(f,e,h){if(this.getTotalLength(f)-h<0.000001){return ad(f,e).end}var g=ad(f,h,1);return e?ad(g,e).end:g},ap.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength){return this.node.getTotalLength()}return af(this.attrs.path)}},ap.getPointAtLength=function(b){if(this.type=="path"){return ae(this.attrs.path,b)}},ap.getSubpath=function(a,d){if(this.type=="path"){return a8.getSubpath(this.attrs.path,a,d)}};var ac=a8.easing_formulas={linear:function(b){return b},"<":function(b){return dz(b,1.7)},">":function(b){return dz(b,0.48)},"<>":function(j){var i=0.48-j/1.04,p=av.sqrt(0.1734+i*i),o=p-i,n=dz(ao(o),1/3)*(o<0?-1:1),m=-p-i,l=dz(ao(m),1/3)*(m<0?-1:1),k=n+l+0.5;return(1-k)*3*k*k+k*k*k},backIn:function(d){var c=1.70158;return d*d*((c+1)*d-c)},backOut:function(d){d=d-1;var c=1.70158;return d*d*((c+1)*d+c)+1},elastic:function(b){if(b==!!b){return b}return dz(2,-10*b)*av.sin((b-0.075)*2*dx/0.3)+1},bounce:function(f){var e=7.5625,h=2.75,g;f<1/h?g=e*f*f:f<2/h?(f-=1.5/h,g=e*f*f+0.75):f<2.5/h?(f-=2.25/h,g=e*f*f+0.9375):(f-=2.625/h,g=e*f*f+0.984375);return g}};ac.easeIn=ac["ease-in"]=ac["<"],ac.easeOut=ac["ease-out"]=ac[">"],ac.easeInOut=ac["ease-in-out"]=ac["<>"],ac["back-in"]=ac.backIn,ac["back-out"]=ac.backOut;var ab=[],aa=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(b){setTimeout(b,16)},db=function(){var T=+(new Date),S=0;for(;S1&&!R.next){for(E in L){L[aV](E)&&(F[E]=R.totalOrigin[E])}R.el.attr(F),c0(R.anim,R.el,R.anim.percents[0],null,R.totalOrigin,R.repeat-1)}R.next&&!R.stop&&c0(R.anim,R.el,R.next,null,R.totalOrigin,R.repeat)}}a8.svg&&J&&J.paper&&J.paper.safari(),ab.length&&aa(db)},c8=function(b){return b>255?255:b<0?0:b};ap.animateWith=function(x,w,v,u,t,s){var r=this;if(r.removed){s&&s.call(r);return r}var q=v instanceof c3?v:a8.animation(v,u,t,s),p,o;c0(q,r,q.percents[0],null,r.attr());for(var n=0,a=ab.length;n0.5)*2-1;X(g-0.5,2)+X(f-0.5,2)>0.25&&(f=aa.sqrt(0.25-X(g-0.5,2))*m+0.5)&&f!=0.5&&(f=f.toFixed(5)-0.00001*m)}return U}),l=l.split(/\s*\-\s*/);if(i=="linear"){var ah=l.shift();ah=-ac(ah);if(isNaN(ah)){return null}var ag=[0,0,aa.cos(af.rad(ah)),aa.sin(af.rad(ah))],C=1/(Z(Y(ag[2]),Y(ag[3]))||1);ag[2]*=C,ag[3]*=C,ag[2]<0&&(ag[0]=-ag[2],ag[2]=0),ag[3]<0&&(ag[1]=-ag[3],ag[3]=0)}var B=af._parseDots(l);if(!B){return null}h=h.replace(/[\(\)\s,\xb0#]/g,"_"),z.gradient&&h!=z.gradient.id&&(c.defs.removeChild(z.gradient),delete z.gradient);if(!z.gradient){ai=O(i+"Gradient",{id:h}),z.gradient=ai,O(ai,i=="radial"?{fx:g,fy:f}:{x1:ag[0],y1:ag[1],x2:ag[2],y2:ag[3],gradientTransform:z.matrix.invert()}),c.defs.appendChild(ai);for(var A=0,q=B.length;A1?j.opacity/100:j.opacity});case"stroke":j=af.getRGB(v),ai.setAttribute(y,j.hex),y=="stroke"&&j[ae]("opacity")&&O(ai,{"stroke-opacity":j.opacity>1?j.opacity/100:j.opacity}),y=="stroke"&&ak._.arrows&&("startString" in ak._.arrows&&J(ak,ak._.arrows.startString),"endString" in ak._.arrows&&J(ak,ak._.arrows.endString,1));break;case"gradient":(ak.type=="circle"||ak.type=="ellipse"||ad(v).charAt()!="r")&&M(ak,v);break;case"opacity":ah.gradient&&!ah[ae]("stroke-opacity")&&O(ai,{"stroke-opacity":v>1?v/100:v});case"fill-opacity":if(ah.gradient){g=af._g.doc.getElementById(ai.getAttribute("fill").replace(/^url\(#|\)$/g,U)),g&&(c=g.getElementsByTagName("stop"),O(c[c.length-1],{"stop-opacity":v}));break}default:y=="font-size"&&(v=ab(v,10)+"px");var b=y.replace(/(\-.)/g,function(d){return d.substring(1).toUpperCase()});ai.style[b]=v,ak._.dirty=1,ai.setAttribute(y,v)}}}E(ak,aj),ai.style.visibility=ag},F=1.2,E=function(x,w){if(x.type=="text"&&!!(w[ae]("text")||w[ae]("font")||w[ae]("font-size")||w[ae]("x")||w[ae]("y"))){var v=x.attrs,u=x.node,t=u.firstChild?ab(af._g.doc.defaultView.getComputedStyle(u.firstChild,U).getPropertyValue("font-size"),10):10;if(w[ae]("text")){v.text=w.text;while(u.firstChild){u.removeChild(u.firstChild)}var s=ad(w.text).split("\n"),q=[],l;for(var e=0,c=s.length;e"));var j=c.getBoundingClientRect();av.W=aC.w=(j.right-j.left)/b,av.H=aC.h=(j.bottom-j.top)/b,av.X=aC.x,av.Y=aC.y+av.H/2,("x" in aE||"y" in aE)&&(av.path.v=ap.format("m{0},{1}l{2},{1}",ak(aC.x*Q),ak(aC.y*Q),ak(aC.x*Q)+1));var aG=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var o=0,k=aG.length;o0.25&&(h=al.sqrt(0.25-v(f-0.5,2))*((h>0.5)*2-1)+0.5),e=f+ac+h);return ab}),y=y.split(/\s*\-\s*/);if(n=="linear"){var d=y.shift();d=-am(d);if(isNaN(d)){return null}}var c=ap._parseDots(y);if(!c){return null}z=z.shape||z.node;if(c.length){z.removeChild(x),x.on=!0,x.method="none",x.color=c[0].color,x.color2=c[c.length-1].color;var a=[];for(var B=0,A=c.length;B')}}catch(f){P=function(b){return d.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},ap._engine.initWin(ap._g.win),ap._engine.create=function(){var t=ap._getContainer.apply(0,arguments),s=t.container,r=t.height,q,p=t.width,o=t.x,n=t.y;if(!s){throw new Error("VML container not found.")}var m=new ap._Paper,l=m.canvas=ap._g.doc.createElement("div"),a=l.style;o=o||0,n=n||0,p=p||512,r=r||342,m.width=p,m.height=r,p==+p&&(p+="px"),r==+r&&(r+="px"),m.coordsize=Q*1000+ac+Q*1000,m.coordorigin="0 0",m.span=ap._g.doc.createElement("span"),m.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(m.span),a.cssText=ap.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",p,r),s==1?(ap._g.doc.body.appendChild(l),a.left=o+"px",a.top=n+"px",a.position="absolute"):s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),m.renderfix=function(){};return m},ap.prototype.clear=function(){ap.eve("raphael.clear",this),this.canvas.innerHTML=ab,this.span=ap._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},ap.prototype.remove=function(){ap.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this){this[a]=typeof this[a]=="function"?ap._removedFactory(a):null}return !0};var N=ap.st;for(var L in R){R[ao](L)&&!N[ao](L)&&(N[L]=function(b){return function(){var a=arguments;return this.forEach(function(d){d[b].apply(d,a)})}}(L))}}(window.Raphael);