PageSourceSearch

https://www.spillaneplc.com/wp-content/cache/autoptimize/js/autopt…_single_e496a5393b7559cbf9e3301c83709be2.js

js spillaneplc.com collected 2026-10-04 05:20:22 UTC 127,828 bytes, 537 lines download raw bytes

1(function(root,ns,factory){"use strict";if(typeof(module)!=='undefined'&&module.exports){module.exports=factory(ns,root);}else if(typeof(define)==='function'&&define.amd){define("factory",function(){return factory(ns,root);});}else{root[ns]=factory(ns,root);}}(window,'detectZoom',function(){var devicePixelRatio=function(){return window.devicePixelRatio||1;};var fallback=function(){return{zoom:1,devicePxPerCssPx:1};};var ie8=function(){var zoom=Math.round((screen.deviceXDPI/screen.logicalXDPI)*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var ie10=function(){var zoom=Math.round((document.documentElement.offsetHeight/window.innerHeight)*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var webkitMobile=function(){var deviceWidth=(Math.abs(window.orientation)==90)?screen.height:screen.width;var zoom=deviceWidth/window.innerWidth;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var webkit=function(){var important=function(str){return str.replace(/;/g," !important;");};var div=document.createElement('div');div.innerHTML="1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0";div.setAttribute('style',important('font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;'));var container=document.createElement('div');container.setAttribute('style',important('width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;'));container.appendChild(div);document.body.appendChild(container);var zoom=1000/div.clientHeight;zoom=Math.round(zoom*100)/100;document.body.removeChild(container);return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var firefox4=function(){var zoom=mediaQueryBinarySearch('min--moz-device-pixel-ratio','',0,10,20,0.0001);zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom};};var firefox18=function(){return{zoom:firefox4().zoom,devicePxPerCssPx:devicePixelRatio()};};var opera11=function(){var zoom=window.top.outerWidth/window.top.innerWidth;zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var mediaQueryBinarySearch=function(property,unit,a,b,maxIter,epsilon){var matchMedia;var head,style,div;if(window.matchMedia){matchMedia=window.matchMedia;}else{head=document.getElementsByTagName('head')[0];style=document.createElement('style');head.appendChild(style);div=document.createElement('div');div.className='mediaQueryBinarySearch';div.style.display='none';document.body.appendChild(div);matchMedia=function(query){style.sheet.insertRule('@media '+query+'{.mediaQueryBinarySearch '+'{text-decoration: underline} }',0);var matched=getComputedStyle(div,null).textDecoration=='underline';style.sheet.deleteRule(0);return{matches:matched};};}
2var ratio=binarySearch(a,b,maxIter);if(div){head.removeChild(style);document.body.removeChild(div);}
3return ratio;function binarySearch(a,b,maxIter){var mid=(a+b)/2;if(maxIter<=0||b-a<epsilon){return mid;}
4var query="("+property+":"+mid+unit+")";if(matchMedia(query).matches){return binarySearch(mid,b,maxIter-1);}else{return binarySearch(a,mid,maxIter-1);}}};var detectFunction=(function(){var func=fallback;if(!isNaN(screen.logicalXDPI)&&!isNaN(screen.systemXDPI)){func=ie8;}
5else if(window.navigator.msMaxTouchPoints){func=ie10;}
6else if('orientation'in window&&typeof document.body.style.webkitMarquee==='string'){func=webkitMobile;}
7else if(typeof document.body.style.webkitMarquee==='string'){func=webkit;}
8else if(navigator.userAgent.indexOf('Opera')>=0){func=opera11;}
9else if(window.devicePixelRatio){func=firefox18;}
10else if(firefox4().zoom>0.001){func=firefox4;}
11return func;}());return({zoom:function(){return detectFunction().zoom;},device:function(){return detectFunction().devicePxPerCssPx;}});}));var wpcom_img_zoomer={zoomed:false,timer:null,interval:1000,imgNeedsSizeAtts:function(img){if(img.getAttribute('width')!==null||img.getAttribute('height')!==null)
12return false;if(img.width<img.naturalWidth||img.height<img.naturalHeight)
13return false;return true;},init:function(){var t=this;try{t.zoomImages();t.timer=setInterval(function(){t.zoomImages();},t.interval);}
14catch(e){}},stop:function(){if(this.timer)
15clearInterval(this.timer);},getScale:function(){var scale=detectZoom.device();if(scale<=1.0)scale=1.0;else if(scale<=1.5)scale=1.5;else if(scale<=2.0)scale=2.0;else if(scale<=3.0)scale=3.0;else if(scale<=4.0)scale=4.0;else scale=5.0;return scale;},shouldZoom:function(scale){var t=this;if("innerWidth"in window&&!window.innerWidth)
16return false;if(scale==1.0&&t.zoomed==false)
17return false;return true;},zoomImages:function(){var t=this;var scale=t.getScale();if(!t.shouldZoom(scale)){return;}
18t.zoomed=true;var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if("complete"in imgs[i]&&!imgs[i].complete)
19continue;var imgScale=imgs[i].getAttribute("scale");if(imgScale==scale||imgScale=="0")
20continue;var scaleFail=imgs[i].getAttribute("scale-fail");if(scaleFail&&scaleFail<=scale)
21continue;if(!(imgs[i].width&&imgs[i].height))
22continue;if(!imgScale&&imgs[i].getAttribute("data-lazy-src")&&(imgs[i].getAttribute("data-lazy-src")!==imgs[i].getAttribute("src")))
23continue;
23if(t.scaleImage(imgs[i],scale)){imgs[i].setAttribute("scale",scale);}
24else{imgs[i].setAttribute("scale","0");}}},scaleImage:function(img,scale){var t=this;var newSrc=img.src;if(img.parentNode.className.match(/slideshow-slide/))
25return false;if(img.src.match(/^https?:\/\/([^\/]*\.)?gravatar\.com\/.+[?&](s|size)=/)){newSrc=img.src.replace(/([?&](s|size)=)(\d+)/,function($0,$1,$2,$3){var originalAtt="originals",originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$3;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
26var size=img.clientWidth;var targetSize=Math.ceil(img.clientWidth*scale);targetSize=Math.max(targetSize,originalSize);targetSize=Math.min(targetSize,512);return $1+targetSize;});}
27else if(img.src.match(/^https?:\/\/([^\/]+)\.files\.wordpress\.com\/.+[?&][wh]=/)){if(img.src.match(/[?&]crop/))
28return false;var changedAttrs={};var matches=img.src.match(/([?&]([wh])=)(\d+)/g);for(var i=0;i<matches.length;i++){var lr=matches[i].split('=');var thisAttr=lr[0].replace(/[?&]/g,'');var thisVal=lr[1];var originalAtt='original'+thisAttr,originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=thisVal;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
29var size=thisAttr=='w'?img.clientWidth:img.clientHeight;var naturalSize=(thisAttr=='w'?img.naturalWidth:img.naturalHeight);var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=naturalSize)
30targetSize=thisVal;if(naturalSize<thisVal)
31targetSize=thisVal;if(targetSize!=thisVal)
32changedAttrs[thisAttr]=targetSize;}
33var w=changedAttrs.w||false;var h=changedAttrs.h||false;if(w){newSrc=img.src.replace(/([?&])w=\d+/g,function($0,$1){return $1+'w='+w;});}
34if(h){newSrc=newSrc.replace(/([?&])h=\d+/g,function($0,$1){return $1+'h='+h;});}}
35else if(img.src.match(/^https?:\/\/([^\/]+\.)*(wordpress|wp)\.com\/mshots\/.+[?&]w=\d+/)){newSrc=img.src.replace(/([?&]w=)(\d+)/,function($0,$1,$2){var originalAtt='originalw',originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$2;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
36var size=img.clientWidth;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=img.naturalWidth)
37targetSize=$2;if($2!=targetSize)
38return $1+targetSize;return $0;});}
39else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/imgpress\?(.+)/)){var imgpressSafeFunctions=["zoom","url","h","w","fit","filter","brightness","contrast","colorize","smooth","unsharpmask"];var qs=RegExp.$3.split('&');for(var q in qs){q=qs[q].split('=')[0];if(imgpressSafeFunctions.indexOf(q)==-1){return false;}}
40img.width=img.width;img.height=img.height;if(scale==1)
41newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?');else
42newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?zoom='+scale+'&');}
43else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/latex\.php\?(latex|zoom)=(.+)/)||img.src.match(/^https?:\/\/i[\d]{1}\.wp\.com\/(.+)/)){img.width=img.width;img.height=img.height;if(scale==1)
44newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?');else
45newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?zoom='+scale+'&');}
46else if(img.src.match(/^https?:\/\/[^\/]+\/.*[-@]([12])x\.(gif|jpeg|jpg|png)(\?|$)/)){img.width=img.width;img.height=img.height;var currentSize=RegExp.$1,newSize=currentSize;if(scale<=1)
47newSize=1;else
48newSize=2;if(currentSize!=newSize)
49newSrc=img.src.replace(/([-@])[12]x\.(gif|jpeg|jpg|png)(\?|$)/,'$1'+newSize+'x.$2$3');}
50else{return false;}
51if(newSrc!=img.src){var prevSrc,origSrc=img.getAttribute("src-orig");if(!origSrc){origSrc=img.src;img.setAttribute("src-orig",origSrc);}
52prevSrc=img.src;img.onerror=function(){img.src=prevSrc;if(img.getAttribute("scale-fail")<scale)
53img.setAttribute("scale-fail",scale);img.onerror=null;};img.src=newSrc;}
54return true;}};wpcom_img_zoomer.init();;(function($){var Scroller,ajaxurl,stats,type,text,totop,timer;
54var isIE=(-1!=navigator.userAgent.search('MSIE'));if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);var IEVersion=parseInt(IEVersion[1]);}
55Scroller=function(settings){var self=this;this.id=settings.id;this.body=$(document.body);this.window=$(window);this.element=$('#'+settings.id);this.wrapperClass=settings.wrapper_class;this.ready=true;this.disabled=false;this.page=1;this.offset=settings.offset;this.currentday=settings.currentday;this.order=settings.order;this.throttle=false;this.handle='<div id="infinite-handle"><span>'+text.replace('\\','')+'</span></div>';this.click_handle=settings.click_handle;this.google_analytics=settings.google_analytics;this.history=settings.history;this.origURL=window.location.href;this.footer=$('#infinite-footer');this.footer.wrap=settings.footer;this.wpMediaelement=null;if(type=='scroll'){this.window.bind('scroll.infinity',function(){this.throttle=true;});self.gotop();setInterval(function(){if(this.throttle){this.throttle=false;self.thefooter();self.refresh();}},300);self.ensureFilledViewport();this.body.bind('post-load',{self:self},self.checkViewportOnLoad);}else if(type=='click'){if(this.click_handle){this.element.append(this.handle);}
56this.body.delegate('#infinite-handle','click.infinity',function(){if(self.click_handle){$('#infinite-handle').remove();}
57self.refresh();});}
58this.body.bind('post-load',{self:self},self.initializeMejs);};Scroller.prototype.check=function(){var container=this.element.offset();if('object'!==typeof container){return false;}
59var bottom=this.window.scrollTop()+this.window.height(),threshold=container.top+this.element.outerHeight(false)-(this.window.height()*2);return bottom>threshold;};Scroller.prototype.render=function(response){this.body.addClass('infinity-success');this.element.append(response.html);this.body.trigger('post-load',response);this.ready=true;};Scroller.prototype.query=function(){return{page:this.page,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,last_post_date:window.infiniteScroll.settings.last_post_date,};};Scroller.prototype.gotop=function(){var blog=$('#infinity-blog-title');blog.attr('title',totop);blog.bind('click',function(e){$('html, body').animate({scrollTop:0},'fast');e.preventDefault();});};Scroller.prototype.thefooter=function(){var self=this,width;if($.type(this.footer.wrap)==="string"){width=$('body #'+this.footer.wrap).outerWidth(false);if(width>479)
60this.footer.find('.container').css('width',width);}
61if(this.window.scrollTop()>=350)
62self.footer.animate({'bottom':0},'fast');else if(this.window.scrollTop()<350)
63self.footer.animate({'bottom':'-50px'},'fast');};Scroller.prototype.refresh=function(){var	self=this,query,jqxhr,load,loader,color;if(this.disabled||!this.ready||!this.check())
64return;this.ready=false;if(this.click_handle){loader='<span class="infinite-loader"></span>';this.element.append(loader);loader=this.element.find('.infinite-loader');color=loader.css('color');try{loader.spin('medium-left',color);}catch(error){}}
65query=$.extend({action:'infinite_scroll'},this.query());jqxhr=$.post(infiniteScroll.settings.ajaxurl,query);jqxhr.fail(function(){if(self.click_handle){loader.hide();}
66self.ready=true;});jqxhr.done(function(response){if(self.click_handle){loader.hide();}
67if(!response)
68return;response=$.parseJSON(response);if(!response||!response.type)
69return;if(response.type=='empty'){self.disabled=true;self.body.addClass('infinity-end').removeClass('infinity-success');}else if(response.type=='success'){if(response.scripts){$(response.scripts).each(function(){var elementToAppendTo=this.footer?'body':'head';window.infiniteScroll.settings.scripts.push(this.handle);if(this.extra_data){var data=document.createElement('script'),dataContent=document.createTextNode("//<![CDATA[ \n"+this.extra_data+"\n//]]>");data.type='text/javascript';data.appendChild(dataContent);document.getElementsByTagName(elementToAppendTo)[0].appendChild(data);}
70var script=document.createElement('script');script.type='text/javascript';script.src=this.src;script.id=this.handle;if('wp-mediaelement'===this.handle){self.body.unbind('post-load',self.initializeMejs);}
71if('wp-mediaelement'===this.handle&&'undefined'===typeof mejs){self.wpMediaelement={};self.wpMediaelement.tag=script;self.wpMediaelement.element=elementToAppendTo;setTimeout(self.maybeLoadMejs.bind(self),250);}else{document.getElementsByTagName(elementToAppendTo)[0].appendChild(script);}});}
72if(response.styles){$(response.styles).each(function(){window.infiniteScroll.
72settings.styles.push(this.handle);var style=document.createElement('link');style.rel='stylesheet';style.href=this.src;style.id=this.handle+'-css';if(this.conditional&&(!isIE||!eval(this.conditional.replace(/%ver/g,IEVersion))))
73var style=false;if(style)
74document.getElementsByTagName('head')[0].appendChild(style);});}
75self.page++;if(stats)
76new Image().src=document.location.protocol+'//stats.wordpress.com/g.gif?'+stats+'&post=0&baba='+Math.random();if('object'==typeof response.postflair&&'object'==typeof WPCOM_sharing_counts)
77WPCOM_sharing_counts=$.extend(WPCOM_sharing_counts,response.postflair);self.render.apply(self,arguments);if(type=='click'){if(response.lastbatch){if(self.click_handle){$('#infinite-handle').remove();}else{self.body.trigger('infinite-scroll-posts-end');}}else{if(self.click_handle){self.element.append(self.handle);}else{self.body.trigger('infinite-scroll-posts-more');}}}
78if(response.currentday)
79self.currentday=response.currentday;if(self.google_analytics&&'object'==typeof _gaq)
80_gaq.push(['_trackPageview',self.history.path.replace(/%d/,self.page)]);}});return jqxhr;};Scroller.prototype.maybeLoadMejs=function(){if(null===this.wpMediaelement){return;}
81if('undefined'===typeof mejs){setTimeout(this.maybeLoadMejs,250);}else{document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag);this.wpMediaelement=null;this.body.bind('post-load',{self:this},this.initializeMejs);}}
82Scroller.prototype.initializeMejs=function(ev,response){if(('undefined'===typeof response)||('undefined'===typeof response.html)){return;}
83if(-1===response.html.indexOf('wp-audio-shortcode')&&-1===response.html.indexOf('wp-video-shortcode')){return;}
84if('undefined'===typeof mejs){return;}
85$(function(){var settings={};if(typeof _wpmejsSettings!=='undefined'){settings.pluginPath=_wpmejsSettings.pluginPath;}
86settings.success=function(mejs){var autoplay=mejs.attributes.autoplay&&'false'!==mejs.attributes.autoplay;if('flash'===mejs.pluginType&&autoplay){mejs.addEventListener('canplay',function(){mejs.play();},false);}};$('.wp-audio-shortcode, .wp-video-shortcode').not('.mejs-container').mediaelementplayer(settings);});}
87Scroller.prototype.ensureFilledViewport=function(){var	self=this,windowHeight=self.window.height(),postsHeight=self.element.height()
88aveSetHeight=0,wrapperQty=0;if(postsHeight===0){$(self.element.selector+' > li').each(function(){postsHeight+=$(this).height();});if(postsHeight===0){self.body.unbind('post-load',self.checkViewportOnLoad);return;}}
89$('.'+self.wrapperClass).each(function(){aveSetHeight+=$(this).height();wrapperQty++;});if(wrapperQty>0)
90aveSetHeight=aveSetHeight/wrapperQty;else
91aveSetHeight=0;if(postsHeight<windowHeight&&(postsHeight+aveSetHeight<windowHeight)){self.ready=true;self.refresh();}
92else{self.body.unbind('post-load',self.checkViewportOnLoad);}}
93Scroller.prototype.checkViewportOnLoad=function(ev){ev.data.self.ensureFilledViewport();}
94Scroller.prototype.determineURL=function(){var self=window.infiniteScroll.scroller,windowTop=$(window).scrollTop(),windowBottom=windowTop+$(window).height(),windowSize=windowBottom-windowTop,setsInView=[],pageNum=false;$('.'+self.wrapperClass).each(function(){var id=$(this).attr('id'),setTop=$(this).offset().top,setHeight=$(this).outerHeight(false),setBottom=0,setPageNum=$(this).data('page-num');if(0==setHeight){$('> *',this).each(function(){setHeight+=$(this).outerHeight(false);});}
95setBottom=setTop+setHeight;if(setTop<windowTop&&setBottom>windowBottom){setsInView.push({'id':id,'top':setTop,'bottom':setBottom,'pageNum':setPageNum});}
96else if(setTop>windowTop&&setTop<windowBottom){setsInView.push({'id':id,'top':setTop,'bottom':setBottom,'pageNum':setPageNum});}
97else if(setBottom>windowTop&&setBottom<windowBottom){setsInView.push({'id':id,'top':setTop,'bottom':setBottom,'pageNum':setPageNum});}});if(0==setsInView.length){pageNum=-1;}
98else if(1==setsInView.length){var setData=setsInView.pop();if(((windowBottom-setData.top)/windowSize)<0.5)
99pageNum=-1;else
100pageNum=setData.pageNum;}
101else{var majorityPercentageInView=0;$.each(setsInView,function(i,setData){var topInView=0,bottomInView=0,percentOfView=0;if(setData.top>windowTop&&setData.top<windowBottom)
102topInView=(windowBottom-setData.top)/windowSize;if(setData.bottom>windowTop&&setData.bottom<windowBottom)
103bottomInView=(setData.bottom-windowTop)/windowSize;if(topInView>=bottomInView)
104percentOfView=topInView;else if(bottomInView>=topInView)
105percentOfView=bottomInView;if(percentOfView>majorityPercentageInView){pageNum=setData.pageNum;majorityPercentageInView=percentOfView;}});}
106if('number'==typeof pageNum){if(pageNum!=-1)
107pageNum++;self.updateURL(pageNum);}}
108Scroller.prototype.updateURL=function(page){var self=this,offset=self.offset>0?self.offset-1:0,pageSlug=-1==page?self.origURL:window.location.protocol+'//'+self.history.host+self.history.path.replace(/%d/,page+offset)+self.history.parameters;if(window.location.href!=pageSlug){history.pushState(null,null,pageSlug);}}
109$(document).ready(function(){if('object'!=typeof infiniteScroll)
110return;
110ajaxurl=infiniteScroll.settings.ajaxurl;stats=infiniteScroll.settings.stats;type=infiniteScroll.settings.type;text=infiniteScroll.settings.text;totop=infiniteScroll.settings.totop;infiniteScroll.scroller=new Scroller(infiniteScroll.settings);if(!isIE||(isIE&&IEVersion>=10)){$(window).bind('scroll',function(){clearTimeout(timer);timer=setTimeout(infiniteScroll.scroller.determineURL,100);});}});})(jQuery);;
111/*!
112 * jQuery Cycle Plugin (with Transition Definitions)
113 * Examples and documentation at: http://jquery.malsup.com/cycle/
114 * Copyright (c) 2007-2010 M. Alsup
115 * Version: 2.9999.8 (26-OCT-2012)
116 * Dual licensed under the MIT and GPL licenses.
117 * http://jquery.malsup.com/license.html
118 * Requires: jQuery v1.3.2 or later
119 */
120;(function($,undefined){"use strict";var ver='2.9999.8';if($.support===undefined){$.support={opacity:!($.browser.msie)};}
121function debug(s){if($.fn.cycle.debug)
122log(s);}
123function log(){if(window.console&&console.log)
124console.log('[cycle] '+Array.prototype.join.call(arguments,' '));}
125$.expr[':'].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!='stop'){if(!$.isReady&&o.s){log('DOM not ready, queuing slideshow');$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}
126log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
127return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false)
128return;opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout)
129clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;this.cycleStop=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}
130var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false)
131return;var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10)
132startTime=10;debug('first timeout: '+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function triggerPause(cont,byHover,onPager){var opts=$(cont).data('cycle.opts');if(!opts)
133return;var paused=!!cont.cyclePause;if(paused&&opts.paused)
134opts.paused(cont,opts,byHover,onPager);else if(!paused&&opts.resumed)
135opts.resumed(cont,opts,byHover,onPager);}
136function handleArguments(cont,options,arg2){if(cont.cycleStop===undefined)
137cont.cycleStop=0;if(options===undefined||options===null)
138options={};if(options.constructor==String){switch(options){case'destroy':case'stop':var opts=$(cont).data('cycle.opts');if(!opts)
139return false;cont.cycleStop++;if(cont.cycleTimeout)
140clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;if(opts.elements)
141$(opts.elements).stop();$(cont).removeData('cycle.opts');if(options=='destroy')
142destroy(cont,opts);return false;case'toggle':cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);triggerPause(cont);return false;case'pause':cont.cyclePause=1;triggerPause(cont);return false;case'resume':cont.cyclePause=0;checkInstantResume(false,arg2,cont);triggerPause(cont);return false;case'prev':case'next':opts=$(cont).data('cycle.opts');if(!opts){log('options not found, "prev/next" ignored');return false;}
143$.fn.cycle[options](opts);return false;default:options={fx:options};}
144return options;}
145else if(options.constructor==Number){var num=options;options=$(cont).data('cycle.opts');if(!options){log('options not found, can not advance slide');return false;}
146if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return false;}
147options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
148if(typeof arg2=='string')
149options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return false;}
150return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return false;}
151if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
152go(options.elements,options,1,!options.backwards);}}}
153function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter');}
154catch(smother){}}}
155function destroy(cont,opts){if(opts.next)
156$(opts.next).unbind(opts.prevNextEvent);if(opts.prev)
157$(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder)
158$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});opts.pagerAnchors=null;$(cont).unbind('mouseenter.cycle mouseleave.cycle');if(opts.destroy)
159opts.destroy(opts);}
160function buildOptions($cont,$slides,els,options,o){var startingSlideSpecified;var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});var meta=$.isFunction($cont.data)?$cont.data(opts.metaAttr):null;if(meta)
161opts=$.extend(opts,meta);if(opts.autostop)
162opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype)
163opts.after.push(function(){removeFilter(this,opts);});if(opts.continuous)
164opts.after.push(function(){go(els,opts,0,!opts.backwards);});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
165clearTypeFix($slides);if($cont.css('position')=='static')
166$cont.css('position','relative');if(opts.width)
167$cont.width(opts.width);if(opts.height&&opts.height!='auto')
168$cont.height(opts.height);if(opts.startingSlide!==undefined){opts.startingSlide=parseInt(opts.startingSlide,10);if(opts.startingSlide>=els.length||opts.startSlide<0)
169opts.startingSlide=0;else
170startingSlideSpecified=true;}
171else if(opts.backwards)
172opts.startingSlide=els.length-1;else
173opts.startingSlide=0;if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)
174opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});if(startingSlideSpecified){for(var cnt=0;cnt<els.length;cnt++){if(opts.startingSlide==opts.randomMap[cnt]){opts.randomIndex=cnt;}}}
175else{opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}}
176else if(opts.startingSlide>=els.length)
177opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z;if(opts.backwards)
178z=first?i<=first?els.length+(i-first):first-i:els.length-i;else
179z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z);});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit){if(!opts.aspect){if(opts.width)
180$slides.width(opts.width);if(opts.height&&opts.height!='auto')
181$slides.height(opts.height);}else{$slides.each(function(){var $slide=$(this);var ratio=(opts.aspect===true)?$slide.width()/$slide.height():opts.aspect;if(opts.width&&$slide.width()!=opts.width){$slide.width(opts.width);$slide.height(opts.width/ratio);}
182if(opts.height&&$slide.height()<opts.height){$slide.height(opts.height);$slide.width(opts.height*ratio);}});}}
183if(opts.center&&((!opts.fit)||opts.aspect)){$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?((opts.width-$slide.width())/2)+"px":0,"margin-top":opts.height?((opts.height-$slide.height())/2)+"px":0});});}
184if(opts.center&&!opts.fit&&!opts.slideResize){$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?((opts.width-$slide.width())/2)+"px":0,"margin-top":opts.height?((opts.height-$slide.height())/2)+"px":0});});}
185var reshape=(opts.containerResize||opts.containerResizeHeight)&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w)w=e.offsetWidth||e.width||$e.attr('width');if(!h)h=e.offsetHeight||e.height||$e.attr('height');maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}
186if(opts.containerResize&&maxw>0&&maxh>0)
187$cont.css({width:maxw+'px',height:maxh+'px'});if(opts.containerResizeHeight&&maxh>0)
188$cont.css({height:maxh+'px'});}
189var pauseFlag=false;if(opts.pause)
190$cont.bind('mouseenter.cycle',function(){pauseFlag=true;this.cyclePause++;triggerPause(cont,true);}).bind('mouseleave.cycle',function(){if(pauseFlag)
191this.cyclePause--;triggerPause(cont,true);});if(supportMultiTransitions(opts)===false)
192return false;var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH===0&&this.cycleW===0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}
193else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH);}}}
194return true;});if(requeue)
195return false;opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout,10);if(opts.speed.constructor==String)
196opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10);if(!opts.sync)
197opts.speed=opts.speed/2;var buffer=opts.fx=='none'?0:opts.fx=='shuffle'?500:250;while((opts.timeout-opts.speed)<buffer)
198opts.timeout+=opts.speed;}
199if(opts.easing)
200opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)
201opts.speedIn=opts.speed;if(!opts.speedOut)
202opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length)
203opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
204else if(opts.backwards)
205opts.nextSlide=opts.startingSlide===0?(els.length-1):opts.startingSlide-1;else
206opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))
207init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return false;}}
208var e0=$slides[first];if(!opts.skipInitializationCallbacks){if(opts.before.length)
209opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length)
210opts.after[0].apply(e0,[e0,e0,opts,true]);}
211if(opts.next)
212$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});if(opts.prev)
213$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});if(opts.pager||opts.pagerAnchorBuilder)
214buildPager(els,opts);exposeAddSlide(opts,els);return opts;}
215function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}
216function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log('discarding unknown transition: ',fx);opts.fxs.splice(i,1);i--;}}
217if(!opts.fxs.length){log('No valid transitions named; slideshow terminating.');return false;}}
218else if(opts.fx=='all'){opts.multiFx=true;opts.fxs=[];for(var p in txs){if(txs.hasOwnProperty(p)){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx))
219opts.fxs.push(p);}}}
220if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}
221debug('randomized fx sequence: ',opts.fxs);}
222return true;}
223function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)
224opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)
225opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;if(opts.random){opts.randomMap.push(opts.slideCount-1);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});}
226$s.css('position','absolute');$s[prepend?'prependTo':'appendTo'](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}
227if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
228clearTypeFix($s);if(opts.fit&&opts.width)
229$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
230$s.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder)
231$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if($.isFunction(opts.onAddSlide))
232opts.onAddSlide($s);else
233$s.hide();};}
234$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init))
235init(opts.$cont,$(opts.elements),opts);};function go(els,opts,manual,fwd){var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(manual&&opts.busy&&opts.manualTrump){debug('manualTrump in go(), stopping active transition');$(els).stop(true,true);opts.busy=0;clearTimeout(p.cycleTimeout);}
236if(opts.busy){debug('transition active, ignoring new tx request');return;}
237if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)
238return;if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)
239opts.end(opts);return;}
240var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(fwd&&(opts.lastFx===undefined||++opts.lastFx>=opts.fxs.length))
241opts.lastFx=0;else if(!fwd&&(opts.lastFx===undefined||--opts.lastFx<0))
242opts.lastFx=opts.fxs.length-1;fx=opts.fxs[opts.lastFx];}
243if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}
244$.fn.cycle.resetState(opts,fx);if(opts.before.length)
245$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});if(!p.cycleStop){queueNext();}};debug('tx firing('+fx+'); currSlide: '+opts.currSlide+'; nextSlide: '+opts.nextSlide);opts.busy=1;if(opts.fxFn)
246opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx]))
247$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else
248$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}
249else{queueNext();}
250if(changed||opts.nextSlide==opts.currSlide){var roll;opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;opts.randomMap.sort(function(a,b){return Math.random()-0.5;});}
251opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide)
252opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}
253else if(opts.backwards){roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}
254else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}
255else{roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}
256else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}
257if(changed&&opts.pager)
258opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);function queueNext(){var ms=0,timeout=opts.timeout;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);if(opts.fx=='shuffle')
259ms-=opts.speedOut;}
260else if(opts.continuous&&p.cyclePause)
261ms=10;if(ms>0)
262p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}
263$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!='none'&&(t-opts.speed)<250)
264t+=opts.speed;debug('calculated timeout: '+t+'; speed: '+opts.speed);if(t!==false)
265return t;}
266return opts.timeout;}
267$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
268if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)
269opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)
270opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex];}
271else if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}
272else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1;}
273else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}
274var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb))
275cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,moveForward);return false;}
276function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}
277$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug('pagerAnchorBuilder('+i+', el) returned: '+a);}
278else
279a='<a href="#">'+(i+1)+'</a>';if(!a)
280return;var $a=$(a);if($a.parents('body').length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}
281else{$a.appendTo($p);}}
282opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);var pagerFn=function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
283var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb))
284cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);};if(/mouseenter|mouseover/i.test(opts.pagerEvent)){$a.hover(pagerFn,function(){});}
285else{$a.bind(opts.pagerEvent,pagerFn);}
286if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble)
287$a.bind('click.cycle',function(){return false;});var cont=opts.$cont[0];var pauseFlag=false;if(opts.pauseOnPagerHover){$a.hover(function(){pauseFlag=true;cont.cyclePause++;triggerPause(cont,true,true);},function(){if(pauseFlag)
288cont.cyclePause--;triggerPause(cont,true,true);});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd)
289hops=c>l?c-l:opts.slideCount-l;else
290hops=c<l?l-c:l+opts.slideCount-c;return hops;};function clearTypeFix($slides){debug('applying clearType background-color hack');function hex(s){s=parseInt(s,10).toString(16);return s.length<2?'0'+s:s;}
291function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v&&v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}
292if(v&&v!='transparent')
293return v;}
294return'#ffffff';}
295$slides.each(function(){$(this).css('background-color',getBg(this));});}
296$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=='undefined')
297opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(opts.slideResize&&w!==false&&next.cycleW>0)
298opts.cssBefore.width=next.cycleW;if(opts.slideResize&&h!==false&&next.cycleH>0)
299opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===true?1:0));$(next).css('zIndex',opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number')
300speedIn=speedOut=speedOverride;else
301speedIn=speedOut=1;easeIn=easeOut=null;}
302var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync)
303fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0}
303;opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:'activeSlide',after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:'fade',fxFn:null,height:'auto',manualTrump:true,metaAttr:'cycle',next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:'click.cycle',pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:'click.cycle',random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:undefined,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null};})(jQuery);
304/*!
305 * jQuery Cycle Plugin Transition Definitions
306 * This script is a plugin for the jQuery Cycle Plugin
307 * Examples and documentation at: http://malsup.com/jquery/cycle/
308 * Copyright (c) 2007-2010 M. Alsup
309 * Version:	 2.73
310 * Dual licensed under the MIT and GPL licenses:
311 * http://www.opensource.org/licenses/mit-license.php
312 * http://www.gnu.org/licenses/gpl.html
313 */
314(function($){"use strict";$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css({display:'block','opacity':1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css('zIndex',opts.slideCount+(rev!==true?1:0));$(next).css('zIndex',opts.slideCount+(rev!==true?0:1));});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display='block';opts.cssAfter.zIndex=0;};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h;};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w;};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev)
315fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0;};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){if(opts.rev)
316fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0;};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width='show';opts.animOut.width=0;};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height='show';opts.animOut.height=0;};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}
317opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++)
318opts.els.push($slides[i]);for(i=0;i<opts.currSlide;i++)
319opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev)
320fwd=!fwd;var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){if(fwd)
321opts.els.push(opts.els.shift());else
322opts.els.unshift(opts.els.pop());}
323if(fwd){for(var i=0,len=opts.els.length;i<len;i++)
324$(opts.els[i]).css('z-index',len-i+count);}
325else{var z=$(curr).css('z-index');$el.css('z-index',parseInt(z,10)+1+count);}
326$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb)cb();});});};$.extend(opts.cssBefore,{display:'block',opacity:1,top:0,left:0});};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.height=0;opts.animIn.top=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});$.extend(opts.cssBefore,{top:0,left:0,width:0});opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});$.extend(opts.animOut,{width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2});});opts.cssFirst.top=0;opts.cssFirst.left=0;opts.cssBefore.width=0;opts.cssBefore.height=0;};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});});opts.cssBefore.width=0;opts.cssBefore.height=0;opts.animOut.opacity=0;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$c
326ont.css('overflow','hidden').height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=w;opts.animIn.top=0;opts.animIn.left=0;opts.animOut.top=h;opts.animOut.left=w;};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn.top=0;opts.animIn.height=this.cycleH;opts.animOut.top=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=curr.cycleW/2;opts.animOut.width=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn.top=0;opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH/2;opts.animOut.height=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssAfter.display='';if(d=='right')
327opts.cssBefore.left=-w;else if(d=='up')
328opts.cssBefore.top=h;else if(d=='down')
329opts.cssBefore.top=-h;else
330opts.cssBefore.left=w;});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=='right')
331opts.animOut.left=w;else if(d=='up')
332opts.animOut.top=-h;else if(d=='down')
333opts.animOut.top=h;else
334opts.animOut.left=-w;});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top)
335$.extend(opts.animOut,{left:w*2,top:-h/2,opacity:0});else
336opts.animOut.opacity=0;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.animIn.left=0;};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip))
337clip='rect(0px 0px '+h+'px 0px)';else if(/r2l/.test(opts.clip))
338clip='rect(0px '+w+'px '+h+'px '+w+'px)';else if(/t2b/.test(opts.clip))
339clip='rect(0px '+w+'px 0px 0px)';else if(/b2t/.test(opts.clip))
340clip='rect('+h+'px '+w+'px '+h+'px 0px)';else if(/zoom/.test(opts.clip)){var top=parseInt(h/2,10);var left=parseInt(w/2,10);clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)';}}
341opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0],10),r=parseInt(d[1],10),b=parseInt(d[2],10),l=parseInt(d[3],10);
341opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display='block';var step=1,count=parseInt((opts.speedIn/13),10)-1;(function f(){var tt=t?t-parseInt(step*(t/count),10):0;var ll=l?l-parseInt(step*(l/count),10):0;var bb=b<h?b+parseInt(step*((h-b)/count||1),10):h;var rr=r<w?r+parseInt(step*((w-r)/count||1),10):w;$next.css({clip:'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)'});(step++<=count)?setTimeout(f,13):$curr.css('display','none');})();});$.extend(opts.cssBefore,{display:'block',opacity:1,top:0,left:0});opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;function JetpackSlideshow(element,width,height,transition){this.element=element;this.images=[];this.controls={};this.transition=transition||'fade';var currentWidth=this.element.width();if(!width||width>currentWidth)
342width=currentWidth;this.width=width;this.height=height;this.element.css({'height':this.height+'px'});}
343JetpackSlideshow.prototype.showLoadingImage=function(toggle){if(toggle){this.loadingImage_=document.createElement('div');this.loadingImage_.className='slideshow-loading';var img=document.createElement('img');img.src=jetpackSlideshowSettings.spinner;this.loadingImage_.appendChild(img);this.loadingImage_.appendChild(this.makeZeroWidthSpan());this.loadingImage_.style.lineHeight=this.height+'px';this.element.append(this.loadingImage_);}else if(this.loadingImage_){this.loadingImage_.parentNode.removeChild(this.loadingImage_);this.loadingImage_=null;}};JetpackSlideshow.prototype.init=function(){this.showLoadingImage(true);var self=this;for(var i=0;i<this.images.length;i++){var imageInfo=this.images[i];var img=document.createElement('img');img.src=imageInfo.src+'?w='+this.width;img.align='middle';var caption=document.createElement('div');caption.className='slideshow-slide-caption';caption.innerHTML=imageInfo.caption;var container=document.createElement('div');container.className='slideshow-slide';container.style.lineHeight=this.height+'px';if(i==0){if(img.complete){setTimeout(function(){self.finishInit_();},1);}else{jQuery(img).load(function(){self.finishInit_();});}}
344container.appendChild(img);img.removeAttribute('width');img.removeAttribute('height');container.appendChild(this.makeZeroWidthSpan());container.appendChild(caption);this.element.append(container);}};JetpackSlideshow.prototype.makeZeroWidthSpan=function(){var emptySpan=document.createElement('span');emptySpan.className='slideshow-line-height-hack';if(jQuery.browser.msie){emptySpan.appendChild(document.createTextNode(' '));}else{emptySpan.innerHTML='&nbsp;';}
345return emptySpan;};JetpackSlideshow.prototype.finishInit_=function(){this.showLoadingImage(false);this.renderControls_();var self=this;this.element.cycle({fx:this.transition,prev:this.controls.prev,next:this.controls.next,slideExpr:'.slideshow-slide',onPrevNextEvent:function(){return self.onCyclePrevNextClick_.apply(self,arguments);}});var slideshow=this.element;jQuery(this.controls['stop']).click(function(){var button=jQuery(this);if(!button.hasClass('paused')){slideshow.cycle('pause');button.removeClass('running');button.addClass('paused');}else{button.addClass('running');button.removeClass('paused');slideshow.cycle('resume',true);}
346return false;});var controls=jQuery(this.controlsDiv_);slideshow.mouseenter(function(){controls.fadeIn();});slideshow.mouseleave(function(){controls.fadeOut();});this.initialized_=true;};JetpackSlideshow.prototype.renderControls_=function(){if(this.controlsDiv_)
347return;var controlsDiv=document.createElement('div');controlsDiv.className='slideshow-controls';controls=['prev','stop','next'];for(var i=0;i<controls.length;i++){var controlName=controls[i];var a=document.createElement('a');a.href='#';controlsDiv.appendChild(a);this.controls[controlName]=a;}
348this.element.append(controlsDiv);this.controlsDiv_=controlsDiv;};JetpackSlideshow.prototype.onCyclePrevNextClick_=function(isNext,i,slideElement){if(!jetpackSlideshowSettings.blog_id)
349return;var postid=this.images[i].id;var stats=new Image();stats.src=document.location.protocol+'//stats.wordpress.com/g.gif?host='+
350escape(document.location.host)+'&rand='+Math.random()+'&blog='+jetpackSlideshowSettings.blog_id+'&subd='+jetpackSlideshowSettings.blog_subdomain+'&user_id='+jetpackSlideshowSettings.user_id+'&post='+postid+'&ref='+escape(document.location);};
350(function($){function jetpack_slideshow_init(){$('.jetpack-slideshow-noscript').remove();$('.jetpack-slideshow').each(function(){var container=$(this);if(container.data('processed'))
351return;var slideshow=new JetpackSlideshow(container,container.data('width'),container.data('height'),container.data('trans'));slideshow.images=container.data('gallery');slideshow.init();container.data('processed',true);});}
352$(document).ready(jetpack_slideshow_init);$('body').on('post-load',jetpack_slideshow_init);})(jQuery);;(function(){var container=document.getElementById('site-navigation'),button=container.getElementsByTagName('h1')[0],menu=container.getElementsByTagName('ul')[0];if(undefined==button||undefined==menu)
353return false;button.onclick=function(){if(-1==menu.className.indexOf('nav-menu'))
354menu.className='nav-menu';if(-1!=button.className.indexOf('toggled-on')){button.className=button.className.replace(' toggled-on','');menu.className=menu.className.replace(' toggled-on','');container.className=container.className.replace('main-small-navigation','navigation-main');}else{button.className+=' toggled-on';menu.className+=' toggled-on';container.className=container.className.replace('navigation-main','main-small-navigation');}};if(!menu.childNodes.length)
355button.style.display='none';})();;(function(){var is_webkit=navigator.userAgent.toLowerCase().indexOf('webkit')>-1,is_opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1,is_ie=navigator.userAgent.toLowerCase().indexOf('msie')>-1;if((is_webkit||is_opera||is_ie)&&'undefined'!==typeof(document.getElementById)){var eventMethod=(window.addEventListener)?'addEventListener':'attachEvent';window[eventMethod]('hashchange',function(){var element=document.getElementById(location.hash.substring(1));if(element){if(!/^(?:a|select|input|button|textarea)$/i.test(element.tagName))
356element.tabIndex=-1;element.focus();}},false);}})();;if(typeof wpcom==="undefined"){var wpcom={};}
357wpcom.carousel=(function($){var prebuilt_widths=jetpackCarouselStrings.widths;var pageviews_stats_args=jetpackCarouselStrings.stats_query_args;var findFirstLargeEnoughWidth=function(original_w,original_h,dest_w,dest_h){var inverse_ratio=original_h/original_w;for(var i=0;i<prebuilt_widths.length;++i){if(prebuilt_widths[i]>=dest_w||prebuilt_widths[i]*inverse_ratio>=dest_h)
358return prebuilt_widths[i];}
359return original_w;};var addWidthToImageURL=function(url,width){width=parseInt(width,10);if('undefined'!=typeof window.devicePixelRatio&&window.devicePixelRatio>1)
360width=Math.round(width*window.devicePixelRatio);url=addArgToURL(url,'w',width);url=addArgToURL(url,'h','');return url;};var addArgToURL=function(url,arg,value){var re=new RegExp(arg+'=[^?&]+');if(url.match(re)){return url.replace(re,arg+'='+value);}else{var divider=url.indexOf('?')!==-1?'&':'?';return url+divider+arg+'='+value;}};var stat=function(names){if(typeof names!='string')
361names=names.join(',');new Image().src=window.location.protocol+'//stats.wordpress.com/g.gif?v=wpcom-no-pv'+'&x_carousel='+names+'&baba='+Math.random();};var pageview=function(post_id){new Image().src=window.location.protocol+'//stats.wordpress.com/g.gif?host='+encodeURIComponent(window.location.host)+'&ref='+encodeURIComponent(document.referrer)+'&rand='+Math.random()+'&'+pageviews_stats_args+'&post='+encodeURIComponent(post_id);};return{findFirstLargeEnoughWidth:findFirstLargeEnoughWidth,addWidthToImageURL:addWidthToImageURL,stat:stat,pageview:pageview};})(jQuery);jQuery(document).ready(function($){var overlay,comments,gallery,container,nextButton,previousButton,info,title,transitionBegin,caption,resizeTimeout,mouseTimeout,photo_info,close_hint,commentInterval,lastSelectedSlide,screenPadding=110,originalOverflow=$('body').css('overflow'),originalHOverflow=$('html').css('overflow'),proportion=85,last_known_location_hash='';if(window.innerWidth<=760){screenPadding=Math.round((window.innerWidth/760)*110);if(screenPadding<40&&(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch))
362screenPadding=0;}
363var keyListener=function(e){switch(e.which){case 38:e.preventDefault();container.scrollTop(container.scrollTop()-100);break;case 40:e.preventDefault();container.scrollTop(container.scrollTop()+100);break;case 39:e.preventDefault();gallery.jp_carousel('clearCommentTextAreaValue');gallery.jp_carousel('next');break;case 37:case 8:e.preventDefault();gallery.jp_carousel('clearCommentTextAreaValue');gallery.jp_carousel('previous');break;case 27:e.preventDefault();gallery.jp_carousel('clearCommentTextAreaValue');container.jp_carousel('close');break;default:break;}};var resizeListener=function(e){clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function(){gallery.jp_carousel('slides').jp_carousel('fitSlide',true);gallery.jp_carousel('updateSlidePositions',true);gallery.jp_carousel('fitMeta',true);},200);};var prepareGallery=function(dataCarouselExtra){if(!overlay){overlay=$('<div></div>').addClass('jp-carousel-overlay').css({'position':'absolute','top':0,'right':0,'bottom':0,'left':0});var buttons='<a class="jp-carousel-commentlink" href="#">
363'+jetpackCarouselStrings.comment+'</a>';if(1==jetpackCarouselStrings.is_logged_in){if(1==jetpackCarouselStrings.is_public)
364buttons+='<a class="jp-carousel-reblog" href="#">'+jetpackCarouselStrings.reblog+'</a>';}
365buttons=$('<div class="jp-carousel-buttons">'+buttons+'</div>');caption=$('<h2></h2>');photo_info=$('<div class="jp-carousel-photo-info"></div>').append(caption);imageMeta=$('<div></div>').addClass('jp-carousel-image-meta').css({'float':'right','margin-top':'20px','width':'250px'});imageMeta.append(buttons).append("<ul class='jp-carousel-image-exif' style='display:none;'></ul>").append("<a class='jp-carousel-image-download' style='display:none;'></a>").append("<div class='jp-carousel-image-map' style='display:none;'></div>");titleAndDescription=$('<div></div>').addClass('jp-carousel-titleanddesc').css({'width':'100%','margin-top':imageMeta.css('margin-top')});var commentFormMarkup='<div id="jp-carousel-comment-form-container">';if(jetpackCarouselStrings.local_comments_commenting_as&&jetpackCarouselStrings.local_comments_commenting_as.length){if(1!=jetpackCarouselStrings.is_logged_in&&1==jetpackCarouselStrings.comment_registration){commentFormMarkup+='<div id="jp-carousel-comment-form-commenting-as">'+jetpackCarouselStrings.local_comments_commenting_as+'</div>';}else{commentFormMarkup+='<form id="jp-carousel-comment-form">';commentFormMarkup+='<textarea name="comment" class="jp-carousel-comment-form-field jp-carousel-comment-form-textarea" id="jp-carousel-comment-form-comment-field" placeholder="'+jetpackCarouselStrings.write_comment+'"></textarea>';commentFormMarkup+='<div id="jp-carousel-comment-form-submit-and-info-wrapper">';commentFormMarkup+='<div id="jp-carousel-comment-form-commenting-as">'+jetpackCarouselStrings.local_comments_commenting_as+'</div>';commentFormMarkup+='<input type="submit" name="submit" class="jp-carousel-comment-form-button" id="jp-carousel-comment-form-button-submit" value="'+jetpackCarouselStrings.post_comment+'" />';commentFormMarkup+='<span id="jp-carousel-comment-form-spinner">&nbsp;</span>';commentFormMarkup+='<div id="jp-carousel-comment-post-results"></div>';commentFormMarkup+='</div>';commentFormMarkup+='</form>';}}
366commentFormMarkup+='</div>';commentForm=$(commentFormMarkup).css({'width':'100%','margin-top':'20px','color':'#999'});comments=$('<div></div>').addClass('jp-carousel-comments').css({'width':'100%','bottom':'10px','margin-top':'20px'});commentsLoading=$('<div id="jp-carousel-comments-loading"><span>'+jetpackCarouselStrings.loading_comments+'</span></div>').css({'width':'100%','bottom':'10px','margin-top':'20px'});leftWidth=($(window).width()-(screenPadding*2))-(imageMeta.width()+40);leftWidth+='px';leftColWrapper=$('<div></div>').addClass('jp-carousel-left-column-wrapper').css({'width':Math.floor(leftWidth)}).append(titleAndDescription).append(commentForm).append(comments).append(commentsLoading);fadeaway=$('<div></div>').addClass('jp-carousel-fadeaway');info=$('<div></div>').addClass('jp-carousel-info').css({'top':Math.floor(($(window).height()/100)*proportion),'left':screenPadding,'right':screenPadding}).append(photo_info).append(imageMeta);if(window.innerWidth<=760){photo_info.remove().insertAfter(titleAndDescription);info.prepend(leftColWrapper);}
367else{info.append(leftColWrapper);}
368targetBottomPos=($(window).height()-parseInt(info.css('top'),10))+'px';nextButton=$("<div><span></span></div>").addClass('jp-carousel-next-button').css({'right':'15px',});previousButton=$("<div><span></span></div>").addClass('jp-carousel-previous-button').css({'left':0,});nextButton.add(previousButton).css({'position':'fixed','top':'40px','bottom':targetBottomPos,'width':screenPadding});gallery=$('<div></div>').addClass('jp-carousel').css({'position':'absolute','top':0,'bottom':targetBottomPos,'left':0,'right':0});close_hint=$('<div class="jp-carousel-close-hint"><span>&times;</span></div>').css({position:'fixed'});container=$("<div></div>").addClass('jp-carousel-wrap').addClass('jp-carousel-transitions');if('white'==jetpackCarouselStrings.background_color)
369container.addClass('jp-carousel-light');container.css({'position':'fixed','top':0,'right':0,'bottom':0,'left':0,'z-index':2147483647,'overflow-x':'hidden','overflow-y':'auto','direction':'ltr'}).hide().append(overlay).append(gallery).append(fadeaway).append(info).append(nextButton).append(previousButton).append(close_hint).appendTo($('body')).click(function(e){var target=$(e.target),wrap=target.parents('div.jp-carousel-wrap'),data=wrap.data('carousel-extra'),slide=wrap.find('div.selected'),attachment_id=slide.data('attachment-id');data=data||[];if(target.is(gallery)||target.parents().add(target).is(close_hint)){container.jp_carousel('close');}else if(target.hasClass('jp-carousel-reblog')){e.preventDefault();e.stopPropagation();if(!target.hasClass('reblogged')){target.jp_carousel('show_reblog_box');wpcom.carousel.stat('reblog_show_box');}}else if(target.parents('#carousel-reblog-box').length){if(target.is('a.cancel')){e.preventDefault();e.stopPropagation();target.jp_carousel('hide_reblog_box');wpcom.carousel.stat('reblog_cancel');}else if(target.is('input[type="submit"]')){e.preventDefault();e.stopPropagation();var note=$('#carousel-reblog-box textarea').val();if(jetpackCarouselStrings.reblog_add_thoughts==note)
370note='';$('#carousel-reblog-submit').val(jetpackCarouselStrings.reblogging);$('#carousel-reblog-submit').prop('disabled',true);$('#carousel-reblog-box div.submit span.canceltext').spin('small');$.post(jetpackCarouselStrings.ajaxurl,{'action':'post_reblog','reblog_source':'carousel','original_blog_id':$('#carousel-reblog-box input#carousel-reblog-blog-id').val(),'original_post_id':$('.jp-carousel div.selected').data('attachment-id'),'blog_id':$('#carousel-reblog-box select').val(),'blog_url':$('#carousel-reblog-box input#carousel-reblog-blog-url').val(),'blog_title':$('#carousel-reblog-box input#carousel-reblog-blog-title').val(),'post_url':$('#carousel-reblog-box input#carousel-reblog-post-url').val(),'post_title':slide.data('caption')||$('#carousel-reblog-box input#carousel-reblog-post-title').val(),'note':note,'_wpnonce':$('#carousel-reblog-box #_wpnonce').val()},function(result){$('#carousel-reblog-box').css({'height':$('#carousel-reblog-box').height()+'px'}).slideUp('fast');$('a.jp-carousel-reblog').html(jetpackCarouselStrings.reblogged).removeClass('reblog').addClass('reblogged');$('#carousel-reblog-box div.submit span.canceltext').spin(false);$('#carousel-reblog-submit').val(jetpackCarouselStrings.post_reblog);$('div.jp-carousel-info').children().not('#carousel-reblog-box').fadeIn('fast');slide.data('reblogged',1);$('div.gallery').find('img[data-attachment-id="'+slide.data('attachment-id')+'"]').data('reblogged',1);},'json');wpcom.carousel.stat('reblog_submit');}}else if(target.hasClass('jp-carousel-image-download')){wpcom.carousel.stat('download_original_click');}else if(target.hasClass('jp-carousel-commentlink')){e.preventDefault();e.stopPropagation();$(window).unbind('keydown',keyListener);container.animate({scrollTop:parseInt(info.position()['top'],10)},'fast');$('#jp-carousel-comment-form-submit-and-info-wrapper').slideDown('fast');$('#jp-carousel-comment-form-comment-field').focus();}else if(target.hasClass('jp-carousel-comment-login')){var url=jetpackCarouselStrings.login_url+'%23jp-carousel-'+attachment_id;window.location.href=url;}else if(target.parents('#jp-carousel-comment-form-container').length){var textarea=$('#jp-carousel-comment-form-comment-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var emailField=$('#jp-carousel-comment-form-email-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var authorField=$('#jp-carousel-comment-form-author-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var urlField=$('#jp-carousel-comment-form-url-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});if(textarea&&textarea.attr('id')==target.attr('id')){$(window).unbind('keydown',keyListener);$('#jp-carousel-comment-form-submit-and-info-wrapper').slideDown('fast');}else if(target.is('input[type="submit"]')){e.preventDefault();e.stopPropagation();$('#jp-carousel-comment-form-spinner').spin('small','white');var ajaxData={action:'post_attachment_comment',nonce:jetpackCarouselStrings.nonce,blog_id:data['blog_id'],id:attachment_id,comment:textarea.val()};if(!ajaxData['comment'].length){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-comment-field','error':jetpackCarouselStrings.no_comment_text});return;}
371if(1!=jetpackCarouselStrings.is_logged_in){ajaxData['email']=emailField.val();ajaxData['author']=authorField.val();ajaxData['url']=urlField.val();if(1==jetpackCarouselStrings.require_name_email){if(!ajaxData['email'].length||!ajaxData['email'].match('@')){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-email-field','error':jetpackCarouselStrings.no_comment_email});return;}else if(!ajaxData['author'].length){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-author-field','error':jetpackCarouselStrings.no_comment_author});return;}}}
372$.ajax({type:'POST',url:jetpackCarouselStrings.ajaxurl,data:ajaxData,dataType:'json',success:function(response,status,xhr){if('approved'==response.comment_status){$('#jp-carousel-comment-post-results').slide
372Up('fast').html('<span class="jp-carousel-comment-post-success">'+jetpackCarouselStrings.comment_approved+'</span>').slideDown('fast');}else if('unapproved'==response.comment_status){$('#jp-carousel-comment-post-results').slideUp('fast').html('<span class="jp-carousel-comment-post-success">'+jetpackCarouselStrings.comment_unapproved+'</span>').slideDown('fast');}else{$('#jp-carousel-comment-post-results').slideUp('fast').html('<span class="jp-carousel-comment-post-error">'+jetpackCarouselStrings.comment_post_error+'</span>').slideDown('fast');}
373gallery.jp_carousel('clearCommentTextAreaValue');gallery.jp_carousel('getComments',{attachment_id:attachment_id,offset:0,clear:true});$('#jp-carousel-comment-form-button-submit').val(jetpackCarouselStrings.post_comment);$('#jp-carousel-comment-form-spinner').spin(false);},error:function(xhr,status,error){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-comment-field','error':jetpackCarouselStrings.comment_post_error});return;}});}}else if(!target.parents('.jp-carousel-info').length){container.jp_carousel('next');}}).bind('jp_carousel.afterOpen',function(){$(window).bind('keydown',keyListener);$(window).bind('resize',resizeListener);gallery.opened=true;resizeListener();}).bind('jp_carousel.beforeClose',function(){var scroll=$(window).scrollTop();$(window).unbind('keydown',keyListener);$(window).unbind('resize',resizeListener);$(window).scrollTop(scroll);gallery.jp_carousel('hide_reblog_box');}).bind('jp_carousel.afterClose',function(){if(history.pushState){history.pushState("",document.title,window.location.pathname+window.location.search);}else{last_known_location_hash='';window.location.hash='';}
374gallery.opened=false;}).on('transitionend.jp-carousel ','.jp-carousel-slide',function(e){if('transform'==e.originalEvent.propertyName){var transitionMultiplier=((Date.now()-transitionBegin)/1000)/e.originalEvent.elapsedTime;container.off('transitionend.jp-carousel');if(transitionMultiplier>=2)
375$('.jp-carousel-transitions').removeClass('jp-carousel-transitions');}});$('.jp-carousel-wrap').touchwipe({wipeLeft:function(e){e.preventDefault();gallery.jp_carousel('next');},wipeRight:function(e){e.preventDefault();gallery.jp_carousel('previous');},preventDefaultEvents:false});$('.jetpack-likes-widget-unloaded').each(function(){jetpackLikesWidgetQueue.push(this.id);});nextButton.add(previousButton).click(function(e){e.preventDefault();e.stopPropagation();if(nextButton.is(this)){gallery.jp_carousel('next');}else{gallery.jp_carousel('previous');}});}};var methods={testForData:function(gallery){gallery=$(gallery);if(!gallery.length||undefined==gallery.data('carousel-extra')){return false;}
376return true;},testIfOpened:function(){if('undefined'!=typeof(gallery)&&'undefined'!=typeof(gallery.opened)&&true==gallery.opened)
377return true;return false;},openOrSelectSlide:function(index){if(!$(this).jp_carousel('testIfOpened')){$(this).jp_carousel('open',{start_index:index});}else{gallery.jp_carousel('selectSlideAtIndex',index);}},open:function(options){var settings={'items_selector':".gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id]",'start_index':0},data=$(this).data('carousel-extra');if(!data)
378return;prepareGallery(data);if(gallery.jp_carousel('testIfOpened'))
379return;originalOverflow=$('body').css('overflow');$('body').css('overflow','hidden');originalHOverflow=$('html').css('overflow');$('html').css('overflow','hidden');jQuery('.slim-likes-widget').find('iframe').css('display','inline-block').css('width','60px');container.data('carousel-extra',data);wpcom.carousel.stat(['open','view_image']);return this.each(function(){var $this=$(this);if(options)
380$.extend(settings,options);if(-1==settings.start_index)
381settings.start_index=0;container.trigger('jp_carousel.beforeOpen').fadeIn('fast',function(){container.trigger('jp_carousel.afterOpen');gallery.jp_carousel('initSlides',$this.find(settings.items_selector),settings.start_index).jp_carousel('selectSlideAtIndex',settings.start_index);});gallery.html('');});},selectSlideAtIndex:function(index){var slides=this.jp_carousel('slides'),selected=slides.eq(index);if(0===selected.length)
382selected=slides.eq(0);gallery.jp_carousel('selectSlide',selected,false);return this;},close:function(){$('body').css('overflow',originalOverflow);$('html').css('overflow',originalHOverflow);return container.trigger('jp_carousel.beforeClose').fadeOut('fast',function(){container.trigger('jp_carousel.afterClose');});},next:function(){var slide=gallery.jp_carousel('nextSlide');container.animate({scrollTop:0},'fast');gallery.jp_carousel('hide_reblog_box');if(slide){this.jp_carousel('selectSlide',slide);wpcom.carousel.stat(['next','view_image']);}},previous:function(){var slide=gallery.jp_carousel('prevSlide');container.animate({scrollTop:0},'fast');gallery.jp_carousel('hide_reblog_box');if(slide){this.jp_carousel('selectSlide',slide);wpcom.carousel.stat(['previous','view_image']);}},resetButtons:function(current){if(current.data('liked'))
383$('.jp-carousel-buttons a.jp-carousel-like').addClass('liked').text(jetpackCarouselStrings.unlike);else
384$('.jp-carousel-buttons a.jp-carousel-like').removeClass('liked').text(jetpackCarouselStrings.like);if(current.data('reblogged'))
385$('.jp-carousel-buttons a.jp-carousel-reblog').addClass('reblogged').text(jetpackCarouselStrings.reblogged);else
386$('.jp-carousel-buttons a.jp-carousel-reblog').removeClass('reblogged').text(jetpackCarouselStrings.reblog);},selectedSlide:function(){return this.find('.selected');},setSlidePosition:function(x){transitionBegin=Date.now();return this.css({'-webkit-transform':'translate3d('+x+'px,0,0)','-moz-transform':'translate3d('+x+'px,0,0)','-ms-transform':'translate('+x+'px,0)','-o-transform':'translate('+x+'px,0)','transform':'translate3d('+x+'px,0,0)'});},updateSlidePositions:function(animate){var current=this.jp_carousel('selectedSlide'),galleryWidth=gallery.width(),currentWidth=current.width(),previous=gallery.jp_carousel('prevSlide'),next=gallery.jp_carousel('nextSlide'),previousPrevious=previous.prev(),nextNext=next.next(),left=Math.floor((galleryWidth-currentWidth)*0.5);current.jp_carousel('setSlidePosition',left).show();gallery.jp_carousel('fitInfo',animate);var direction=lastSelectedSlide.is(current.prevAll())?1:-1;if(1==direction){if(!nextNext.is(previous)){nextNext.jp_carousel('setSlidePosition',galleryWidth+next.width()).show();}
387if(!previousPrevious.is(next)){previousPrevious.jp_carousel('setSlidePosition',-previousPrevious.width()-currentWidth).show();}}else{if(!nextNext.is(previous)){nextNext.jp_carousel('setSlidePosition',galleryWidth+currentWidth).show();}}
388previous.jp_carousel('setSlidePosition',Math.floor(-previous.width()+(screenPadding*0.75))).show();next.jp_carousel('setSlidePosition',Math.ceil(galleryWidth-(screenPadding*0.75))).show();},selectSlide:function(slide,animate){lastSelectedSlide=this.find('.selected').removeClass('selected');var slides=gallery.jp_carousel('slides').css({'position':'fixed'}),current=$(slide).addClass('selected').css({'position':'relative'}),attachmentId=current.data('attachment-id'),previous=gallery.jp_carousel('prevSlide'),next=gallery.jp_carousel('nextSlide'),previousPrevious=previous.prev(),nextNext=next.next(),animated,captionHtml;gallery.jp_carousel('loadFullImage',current);caption.hide();if(next.length==0&&slides.length<=2){$('.jp-carousel-next-button').hide();}
388else{$('.jp-carousel-next-button').show();}
389if(previous.length==0&&slides.length<=2){$('.jp-carousel-previous-button').hide();}else{$('.jp-carousel-previous-button').show();}
390animated=current.add(previous).add(previousPrevious).add(next).add(nextNext).jp_carousel('loadSlide');slides.not(animated).hide();gallery.jp_carousel('updateSlidePositions',animate);gallery.jp_carousel('resetButtons',current);container.trigger('jp_carousel.selectSlide',[current]);gallery.jp_carousel('getTitleDesc',{title:current.data('title'),desc:current.data('desc')});gallery.jp_carousel('loadLikes',attachmentId);gallery.jp_carousel('updateLikesWidgetVisibility',attachmentId);if(next.length>0){gallery.jp_carousel('loadLikes',next.data('attachment-id'));}
391if(previous.length>0){gallery.jp_carousel('loadLikes',previous.data('attachment-id'));}
392var imageMeta=current.data('image-meta');gallery.jp_carousel('updateExif',imageMeta);gallery.jp_carousel('updateFullSizeLink',current);gallery.jp_carousel('updateMap',imageMeta);gallery.jp_carousel('testCommentsOpened',current.data('comments-opened'));gallery.jp_carousel('getComments',{'attachment_id':attachmentId,'offset':0,'clear':true});$('#jp-carousel-comment-post-results').slideUp();if(current.data('caption')){captionHtml=$('<div />').text(current.data('caption')).html();if(captionHtml==$('<div />').text(current.data('title')).html()){$('.jp-carousel-titleanddesc-title').fadeOut('fast').empty();}
393if(captionHtml==$('<div />').text(current.data('desc')).html()){$('.jp-carousel-titleanddesc-desc').fadeOut('fast').empty();}
394caption.html(current.data('caption')).fadeIn('slow');}else{caption.fadeOut('fast').empty();}
395wpcom.carousel.pageview(attachmentId);$(next).add(previous).each(function(){gallery.jp_carousel('loadFullImage',$(this));});window.location.hash=last_known_location_hash='#jp-carousel-'+attachmentId;},slides:function(){return this.find('.jp-carousel-slide');},slideDimensions:function(){return{width:$(window).width()-(screenPadding*2),height:Math.floor($(window).height()/100*proportion-60)};},loadSlide:function(){return this.each(function(){var slide=$(this);slide.find('img').one('load',function(){slide.jp_carousel('fitSlide',false);});});},bestFit:function(){var max=gallery.jp_carousel('slideDimensions'),orig=this.jp_carousel('originalDimensions'),orig_ratio=orig.width/orig.height,w_ratio=1,h_ratio=1;if(orig.width>max.width)
396w_ratio=max.width/orig.width;if(orig.height>max.height)
397h_ratio=max.height/orig.height;if(w_ratio<h_ratio){width=max.width;height=Math.floor(width/orig_ratio);}else if(h_ratio<w_ratio){height=max.height;width=Math.floor(height*orig_ratio);}else{width=orig.width;height=orig.height;}
398return{width:width,height:height};},fitInfo:function(animated){var current=this.jp_carousel('selectedSlide'),size=current.jp_carousel('bestFit');photo_info.css({'left':Math.floor((info.width()-size.width)*0.5),'width':Math.floor(size.width)});return this;},fitMeta:function(animated){var newInfoTop={top:Math.floor($(window).height()/100*proportion+5)+'px'};var newLeftWidth={width:(info.width()-(imageMeta.width()+80))+'px'};if(animated){info.animate(newInfoTop);leftColWrapper.animate(newLeftWidth);}else{info.animate(newInfoTop);leftColWrapper.css(newLeftWidth);}},fitSlide:function(animated){return this.each(function(){var selected=gallery.jp_carousel('selectedSlide'),$this=$(this),dimensions=$this.jp_carousel('bestFit'),method='css',max=gallery.jp_carousel('slideDimensions');dimensions.left=0;dimensions.top=Math.floor((max.height-dimensions.height)*0.5)+40;$this[method](dimensions);});},texturize:function(text){text=new String(text);text=text.replace(/'/g,'&#8217;').replace(/&#039;/g,'&#8217;').replace(/[\u2019]/g,'&#8217;');text=text.replace(/"/g,'&#8221;').replace(/&#034;/g,'&#8221;').replace(/&quot;/g,'&#8221;').replace(/[\u201D]/g,'&#8221;');text=text.replace(/([\w]+)=&#[\d]+;(.+?)&#[\d]+;/g,'$1="$2"');return $.trim(text);},initSlides:function(items,start_index){var width=this.jp_carousel('slideDimensions').width,x=0;if(items.length<2){$('.jp-carousel-next-button, .jp-carousel-previous-button').hide();}
399else{$('.jp-carousel-next-button, .jp-carousel-previous-button').show();}
400items.each(function(i){var src_item=$(this),orig_size=src_item.data('orig-size')||'',max=gallery.jp_carousel('slideDimensions'),parts=orig_size.split(',');orig_size={width:parseInt(parts[0],10),height:parseInt(parts[1],10)},medium_file=src_item.data('medium-file')||'',large_file=src_item.data('large-file')||'';if('undefined'!=typeof wpcom){src=src_item.attr('src')||src_item.attr('original')||src_item.data('original')||src_item.data('lazy-src');if(src.indexOf("imgpress")!=-1)
401src=src_item.data('orig-file');src=wpcom.carousel.addWidthToImageURL(src,wpcom.carousel.findFirstLargeEnoughWidth(orig_size.width,orig_size.height,max.width,max.height));}else{src=src_item.data('orig-file');src=gallery.jp_carousel('selectBestImageSize',{orig_file:src,orig_width:orig_size.width,orig_height:orig_size.height,max_width:max.width,max_height:max.height,medium_file:medium_file,large_file:large_file});}
402$(this).data('gallery-src',src);});if(0!==start_index)
403$('<img/>')[0].src=$(items[start_index]).data('gallery-src');var useInPageThumbnails=items.first().closest('.tiled-gallery.type-rectangular').length>0;items.each(function(i){var src_item=$(this),liked=src_item.data('liked')||0,reblogged=src_item.data('reblogged')||0,attachment_id=src_item.data('attachment-id')||0,comments_opened=src_item.data('comments-opened')||0,image_meta=src_item.data('image-meta')||{},orig_size=src_item.data('orig-size')||'',thumb_size={width:src_item[0].naturalWidth,height:src_item[0].naturalHeight},title=src_item.data('image-title')||'',description=src_item.data('image-description')||'',caption=src_item.parents('dl').find('dd.gallery-caption').html()||'',src=src_item.data('gallery-src')||'',medium_file=src_item.data('medium-file')||'',large_file=src_item.data('large-file')||'',orig_file=src_item.data('orig-file')||'';var tiledCaption=src_item.parents('div.tiled-gallery-item').find('div.tiled-gallery-caption').html();if(tiledCaption)
404caption=tiledCaption;if(attachment_id&&orig_size.length){title=gallery.jp_carousel('texturize',title);description=gallery.jp_carousel('texturize',description);caption=gallery.jp_carousel('texturize',caption);var image=$('<img/>').attr('src','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7').css('width','100%').css('height','100%');var slide=$('<div class="jp-carousel-slide"></div>').hide().css({'left':i<start_index?-1000:gallery.width()}).append(image).appendTo(gallery).data('src',src).data('title',title).data('desc',description).data('caption',caption).data('attachment-id',attachment_id).data('permalink',src_item.parents('a').attr('href')).data('orig-size',orig_size).data('comments-opened',comments_opened).data('image-meta',image_meta).data('medium-file',medium_file).data('large-file',large_file).data('orig-file',orig_file).data('thumb-size',thumb_size).data('liked',liked).data('reblogged',reblogged);if(useInPageThumbnails){slide.data('preview-image',src_item.attr('src')).css({'background-image':'url("'+src_item.attr('src')+'")','background-size':'100% 100%','background-position':'center center'});}
405slide.jp_carousel('fitSlide',false);}});return this;},selectBestImageSize:function(args){if('object'!=typeof args)
406args={};if('undefined'==typeof args.orig_file)
407return'';if('undefined'==typeof args.orig_width||'undefined'==typeof args.max_width)
408return args.orig_file;if('undefined'==typeof args.medium_file||'undefined'==typeof args.large_file)
409return args.orig_file;var medium_size=args.medium_file.replace(/-([\d]+x[\d]+)\..+$/,'$1'),medium_size_parts=(medium_size!=args.medium_file)?medium_size.split('x'):[args.orig_width,0],medium_width=parseInt(medium_size_parts[0],10),medium_height=parseInt(medium_size_parts[1],10),large_size=args.large_file.replace(/-([\d]+x[\d]+)\..+$/,'$1'),large_size_parts=(large_size!=args.large_file)?large_size.split('x'):[args.orig_width,0],large_width=parseInt(large_size_parts[0],10),large_height=parseInt(large_size_parts[1],10);if('undefined'!=typeof window.devicePixelRatio&&window.devicePixelRatio>1){args.max_width=args.max_width*window.devicePixelRatio;args.max_height=args.max_height*window.devicePixelRatio;}
410if(large_width>=args.max_width||large_height>=args.max_height)
411return args.large_file;if(medium_width>=args.max_width||medium_height>=args.max_height)
412return args.medium_file;return args.orig_file;},show_reblog_box:function(){$('#carousel-reblog-box textarea').val(jetpackCarouselStrings.reblog_add_thoughts);$('#carousel-reblog-box p.response').remove();$('#carousel-reblog-box div.submit, #carousel-reblog-box div.submit span.canceltext').show();$('#carousel-reblog-box div.submit input[type=submit]').prop('disabled',false);var current=$('.jp-carousel div.selected');$('#carousel-reblog-box input#carousel-reblog-post-url').val(current.data('permalink'));$('#carousel-reblog-box input#carousel-reblog-post-title').val($('div.jp-carousel-info').children('h2').text());$('div.jp-carousel-info').append($('#carousel-reblog-box')).children().fadeOut('fast');$('#carousel-reblog-box').fadeIn('fast');},hide_reblog_box:function(){$('div.jp-carousel-info').children().not('#carousel-reblog-box').fadeIn('fast');$('#carousel-reblog-box').fadeOut('fast');},originalDimensions:function(){var splitted=$(this).data('orig-size').split(',');return{width:parseInt(splitted[0],10),height:parseInt(splitted[1],10)};},format:function(args){if('object'!=typeof args)
413args={};if(!args.text||'undefined'==typeof args.text)
414return;if(!args.replacements||'undefined'==typeof args.replacements)
415return args.text;return args.text.replace(/{(\d+)}/g,function(match,number){return typeof args.replacements[number]!='undefined'?args.replacements[number]:match;});},shutterSpeed:function(d){if(d>=1)
416return Math.round(d)+'s';var df=1,top=1,bot=1;var limit=1e3;while(df!=d&&limit-->0){if(df<d){top+=1;}
417else{bot+=1;top=parseInt(d*bot,10);}
418df=top/bot;}
419if(top>1){bot=Math.round(bot/top);top=1;}
420if(bot<=1)
421return'1s';return top+'/'+bot+'s';},parseTitleDesc:function(value){if(!value.match(' ')&&value.match('_'))
422return'';var prefixes=$(['CIMG','DSC_','DSCF','DSCN','DUW','GEDC','IMG','JD','MGP','PICT','Imagen','Foto','DSC','Scan','SANY','SAM','Screen Shot [0-9]+']).each(function(key,val){regex=new RegExp('^'+val);if(regex.test(value)){value='';return;}});return value;},getTitleDesc:function(data){var title='',desc='',markup='',target,commentWrappere;target=$('div.jp-carousel-titleanddesc','div.jp-carousel-wrap');target.hide();title=gallery.jp_carousel('parseTitleDesc',data.title)||'';desc=gallery.jp_carousel('parseTitleDesc',data.desc)||'';if(title.length||desc.length){if($('<div />').text(title).html()==$('<div />').text(desc).html())
423title='';markup=(title.length)?'<div class="jp-carousel-titleanddesc-title">'+title+'</div>':'';markup+=(desc.length)?'<div class="jp-carousel-titleanddesc-desc">'+desc+'</div>':'';target.html(markup).fadeIn('slow');}
424$('div#jp-carousel-comment-form-container').css('margin-top','20px');$('div#jp-carousel-comments-loading').css('margin-top','20px');}
424,updateLikesWidgetVisibility:function(attachmentId){if("undefined"===typeof jetpackLikesWidgetQueue)
425return;$('.jp-carousel-buttons .jetpack-likes-widget-wrapper').css('display','none').each(function(){var widgetWrapper=$(this);if(widgetWrapper.attr('data-attachment-id')==attachmentId){widgetWrapper.css('display','inline-block');return false;}});},loadLikes:function(attachmentId){var dataCarouselExtra=$('.jp-carousel-wrap').data('carousel-extra');var blogId=dataCarouselExtra.likes_blog_id;if($("#like-post-wrapper-"+blogId+"-"+attachmentId).length==0){var protocol='http';var originDomain='http://wordpress.com';if(dataCarouselExtra.permalink.length){var protocol=dataCarouselExtra.permalink.split(':')[0];if((protocol!='http')&&(protocol!='https'))
426protocol='http';var parts=dataCarouselExtra.permalink.split('/');if(parts.length>=2)
427originDomain=protocol+"://"+parts[2];}
428var dataSource=protocol+"://widgets.wp.com/likes/#blog_id="+encodeURIComponent(blogId)
429+"&post_id="+encodeURIComponent(attachmentId)
430+"&slim=1&origin="+encodeURIComponent(originDomain);if('en'!==jetpackCarouselStrings.lang)
431dataSource+="&lang="+encodeURIComponent(jetpackCarouselStrings.lang);var likesWidget=$("<iframe class='post-likes-widget jetpack-likes-widget jetpack-resizeable'></iframe>").attr("name","like-post-frame-"+blogId+"-"+attachmentId).attr('src',dataSource).css("display","inline-block");var likesWidgetWrapper=$("<div/>").addClass("jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded slim-likes-widget").attr("id","like-post-wrapper-"+blogId+"-"+attachmentId).attr("data-src",dataSource).attr("data-name","like-post-frame-"+blogId+"-"+attachmentId).attr("data-attachment-id",attachmentId).css("display","none").css("vertical-align","middle").append(likesWidget).append("<div class='post-likes-widget-placeholder'></div>");$('.jp-carousel-buttons').append(likesWidgetWrapper);}},updateExif:function(meta){if(!meta||1!=jetpackCarouselStrings.display_exif)
432return false;var $ul=$("<ul class='jp-carousel-image-exif'></ul>");$.each(meta,function(key,val){if(0===parseFloat(val)||!val.length||-1===$.inArray(key,['camera','aperture','shutter_speed','focal_length']))
433return;switch(key){case'focal_length':val=val+'mm';break;case'shutter_speed':val=gallery.jp_carousel('shutterSpeed',val);break;case'aperture':val='f/'+val;break;}
434$ul.append('<li><h5>'+jetpackCarouselStrings[key]+'</h5>'+val+'</li>');});$('div.jp-carousel-image-meta ul.jp-carousel-image-exif').replaceWith($ul);},updateFullSizeLink:function(current){if(!current||!current.data)
435return false;var original=current.data('orig-file').replace(/\?.+$/,''),origSize=current.data('orig-size').split(','),permalink=$('<a>'+gallery.jp_carousel('format',{'text':jetpackCarouselStrings.download_original,'replacements':origSize})+'</a>').addClass('jp-carousel-image-download').attr('href',original).attr('target','_blank');$('div.jp-carousel-image-meta a.jp-carousel-image-download').replaceWith(permalink);},updateMap:function(meta){if(!meta.latitude||!meta.longitude||1!=jetpackCarouselStrings.display_geo)
436return;var latitude=meta.latitude,longitude=meta.longitude,$metabox=$('div.jp-carousel-image-meta','div.jp-carousel-wrap'),$mapbox=$('<div></div>'),style='&scale=2&style=feature:all|element:all|invert_lightness:true|hue:0x0077FF|saturation:-50|lightness:-5|gamma:0.91';$mapbox.addClass('jp-carousel-image-map').html('<img width="154" height="154" src="https://maps.googleapis.com/maps/api/staticmap?\
437							center='+latitude+','+longitude+'&\
438							zoom=8&\
439							size=154x154&\
440							sensor=false&\
441							markers=size:medium%7Ccolor:blue%7C'+latitude+','+longitude+style+'" class="gmap-main" />\
442							\
443						<div class="gmap-topright"><div class="imgclip"><img width="175" height="154" src="https://maps.googleapis.com/maps/api/staticmap?\
444							center='+latitude+','+longitude+'&\
445							zoom=3&\
446							size=175x154&\
447							sensor=false&\
448							markers=size:small%7Ccolor:blue%7C'+latitude+','+longitude+style+'"c /></div></div>\
449							\
450						').prependTo($metabox);},testCommentsOpened:function(opened){if(1==parseInt(opened,10)){if(1==jetpackCarouselStrings.is_logged_in)
451$('.jp-carousel-commentlink').fadeIn('fast');else
452$('.jp-carousel-buttons').fadeIn('fast');commentForm.fadeIn('fast');}else{if(1==jetpackCarouselStrings.is_logged_in)
453$('.jp-carousel-commentlink').fadeOut('fast');else
454$('.jp-carousel-buttons').fadeOut('fast');commentForm.fadeOut('fast');}},getComments:function(args){clearInterval(commentInterval);if('object'!=typeof args)
455return;if('undefined'==typeof args.attachment_id||!args.attachment_id)
456return;if(!args.offset||'undefined'==typeof args.offset||args.offset<1)
457args.offset=0;var comments=$('.jp-carousel-comments'),commentsLoading=$('#jp-carousel-comments-loading').show();if(args.clear)
458comments.hide().empty();$.ajax({type:'GET',url:jetpackCarouselStrings.ajaxurl,dataType:'json',data:{action:'get_attachment_comments',nonce:jetpackCarouselStrings.nonce,id:args.attachment_id,offset:args.offset},success:function(data,status,xhr){if(args.clear)
459comments.fadeOut('fast').empty();$(data).each(function(){var comment=$('<div></div>').addClass('jp-carousel-comment').attr('id','jp-carousel-comment-'+this['id']).html('<div class="comment-gravatar">'
460+this['gravatar_markup']
461+'</div>'
462+'<div class="comment-author">'
463+this['author_markup']
464+'</div>'
465+'<div class="comment-date">'
466+this['date_gmt']
467+'</div>'
468+'<div class="comment-content">'
469+this['content']
470+'</div>');comments.append(comment);clearInterval(commentInterval);commentInterval=setInterval(function(){if(($('.jp-carousel-overlay').height()-150)<$('.jp-carousel-wrap').scrollTop()+$(window).height()){gallery.jp_carousel('getComments',{attachment_id:args.attachment_id,offset:args.offset+10,clear:false});clearInterval(commentInterval);}},300);});var current=$('.jp-carousel div.selected');if(current&&current.data&&current.data('attachment-id')!=args.attachment_id){comments.fadeOut('fast');comments.empty();return;}
471$('.jp-carousel-overlay').height($(window).height()+titleAndDescription.height()+commentForm.height()+((comments.height()>0)?comments.height():imageMeta.height())+200);comments.show();commentsLoading.hide();},error:function(xhr,status,error){console.log('Comment get fail...',xhr,status,error);comments.fadeIn('fast');commentsLoading.fadeOut('fast');}});},postCommentError:function(args){if('object'!=typeof args)
472args={};if(!args.field||'undefined'==typeof args.field||!args.error||'undefined'==typeof args.error)
473return;
473$('#jp-carousel-comment-post-results').slideUp('fast').html('<span class="jp-carousel-comment-post-error">'+args.error+'</span>').slideDown('fast');$('#jp-carousel-comment-form-spinner').spin(false);},setCommentIframeSrc:function(attachment_id){var iframe=$('#jp-carousel-comment-iframe');if(iframe&&iframe.length){iframe.attr('src',iframe.attr('src').replace(/(postid=)\d+/,'$1'+attachment_id));iframe.attr('src',iframe.attr('src').replace(/(%23.+)?$/,'%23jp-carousel-'+attachment_id));}},clearCommentTextAreaValue:function(){var commentTextArea=$('#jp-carousel-comment-form-comment-field');if(commentTextArea)
474commentTextArea.val('');},nextSlide:function(){var slides=this.jp_carousel('slides');var selected=this.jp_carousel('selectedSlide');if(selected.length==0||(slides.length>2&&selected.is(slides.last())))
475return slides.first();return selected.next();},prevSlide:function(){var slides=this.jp_carousel('slides');var selected=this.jp_carousel('selectedSlide');if(selected.length==0||(slides.length>2&&selected.is(slides.first())))
476return slides.last();return selected.prev();},loadFullImage:function(slide){var image=slide.find('img:first');if(!image.data('loaded')){image.on('load.jetpack',function(){image.off('load.jetpack');$(this).closest('.jp-carousel-slide').css('background-image','');});if(!slide.data('preview-image')||(slide.data('thumb-size')&&slide.width()>slide.data('thumb-size').width))
477image.attr('src',image.closest('.jp-carousel-slide').data('src'));else
478image.attr('src',slide.data('preview-image'));image.data('loaded',1);}}};$.fn.jp_carousel=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.open.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.jp_carousel');}};$(document.body).on('click','div.gallery,div.tiled-gallery',function(e){if(!$(this).jp_carousel('testForData',e.currentTarget))
479return;if($(e.target).parent().hasClass('gallery-caption'))
480return;e.preventDefault();$(this).jp_carousel('open',{start_index:$(this).find('.gallery-item, .tiled-gallery-item').index($(e.target).parents('.gallery-item, .tiled-gallery-item'))});});$(window).on('hashchange',function(){if(!window.location.hash||!window.location.hash.match(/jp-carousel-(\d+)/))
481return;if(window.location.hash==last_known_location_hash)
482return;last_known_location_hash=window.location.hash;var gallery=$('div.gallery, div.tiled-gallery'),index=-1,n=window.location.hash.match(/jp-carousel-(\d+)/);if(!$(this).jp_carousel('testForData',gallery))
483return;n=parseInt(n[1],10);gallery.find('img').each(function(num,el){if(n&&$(el).data('attachment-id')==n){index=num;return false;}});if(index!=-1)
484gallery.jp_carousel('openOrSelectSlide',index);});if(window.location.hash)
485$(window).trigger('hashchange');});(function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(e){},wipeRight:function(e){},wipeUp:function(e){},wipeDown:function(e){},preventDefaultEvents:true};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false;}
486function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault();}
487if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft(e);}
488else{config.wipeRight(e);}}
489else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown(e);}
490else{config.wipeUp(e);}}}}
491function onTouchStart(e)
492{if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false);}}
493if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false);}});return this;};})(jQuery);;(function($){var TiledGallery=function(){this.resizeTimeout=null;this.populate();var self=this;$(window).on('resize',function(){clearTimeout(self.resizeTimeout);self.resizeTimeout=setTimeout(function(){self.resize();},150);});$('body').on('post-load',$.proxy(self.initialize,self));$(document).on('page-rendered.wpcom-newdash',$.proxy(self.populate,self));this.resize();};TiledGallery.prototype.populate=function(){this.gallery=$('.tiled-gallery');this.item=this.gallery.find('.tiled-gallery-item');this.caption=this.gallery.find('.tiled-gallery-caption');this.Captions();};TiledGallery.prototype.initialize=function(){var self=this;self.populate();self.gallery.find('img').off('load.tiled-gallery').on('load.tiled-gallery',function(){self.resize();});self.resize();};TiledGallery.prototype.Captions=function(){this.caption.hide();this.item.hover(function(){$(this).find('.tiled-gallery-caption').slideDown('fast');}
493,function(){$(this).find('.tiled-gallery-caption').slideUp('fast');});};TiledGallery.prototype.resize=function(){var resizeableElements='.gallery-row, .gallery-group, .tiled-gallery-item img';this.gallery.each(function(galleryIndex,galleryElement){var thisGallery=$(galleryElement);var imagesLoaded=true;thisGallery.find('img').each(function(){if(!this.complete){imagesLoaded=false;return false;}});if(!imagesLoaded){var loadCallback=arguments.callee;$(window).load(function(){loadCallback(null,thisGallery);});return;}
494if(!thisGallery.data('sizes-set')){thisGallery.data('sizes-set',true);thisGallery.find(resizeableElements).each(function(){var thisGalleryElement=$(this);var extraWidth=(parseInt(thisGalleryElement.css('marginLeft'),10)||0)+(parseInt(thisGalleryElement.css('marginRight'),10)||0);var extraHeight=(parseInt(thisGalleryElement.css('marginTop'),10)||0)+(parseInt(thisGalleryElement.css('marginBottom'),10)||0)
495var parentElement=$(thisGalleryElement.parents(resizeableElements).get(0));if(parentElement&&parentElement.data('original-width')){thisGalleryElement.data('original-width',Math.min(parentElement.data('original-width'),thisGalleryElement.outerWidth(true))).data('original-height',Math.min(parentElement.data('original-height'),thisGalleryElement.outerHeight(true)));}
496else{thisGalleryElement.data('original-width',thisGalleryElement.outerWidth(true)).data('original-height',thisGalleryElement.outerHeight(true));}
497thisGalleryElement.data('extra-width',extraWidth).data('extra-height',extraHeight);});}
498var originalWidth=thisGallery.data('original-width');var currentWidth=thisGallery.parent().width();var resizeRatio=Math.min(1,currentWidth/originalWidth);thisGallery.find(resizeableElements).each(function(){var thisGalleryElement=$(this);thisGalleryElement.width(Math.floor(resizeRatio*thisGalleryElement.data('original-width'))-thisGalleryElement.data('extra-width')).height(Math.floor(resizeRatio*thisGalleryElement.data('original-height'))-thisGalleryElement.data('extra-height'));});thisGallery.removeClass('tiled-gallery-unresized');});};$(document).ready(function(){var TiledGalleryInstance=new TiledGallery;});})(jQuery);;var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}
498else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+encodeURI(O.location).toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();;
499/*!
500 * VideoPress JavaScript Loader 1.09
501 *
502 * Copyright 2011 Automattic Inc.
503 * Licensed under GNU General Public License (GPL) Version 2 or later
504 * http://www.gnu.org/licenses/gpl-2.0.html
505 */
506if(typeof jQuery.type!='function'){jQuery.extend({class2type:{},type:function(obj){return obj==null?String(obj):jQuery.class2type[toString.call(obj)]||"object";}});jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){jQuery.class2type["[object "+name+"]"]=name.toLowerCase();});}
507jQuery.extend({VideoPress:{error:{messages:{age:"You are of insufficient age to view this video.",error:"Unable to download and play video",flash:"Error loading Flash on your system",freedom:'You do not have sufficient <a href="http://www.gnu.org/philosophy/free-sw.html">Freedom levels</a> to view this video.',incompatible:'VideoPress requires either HTML5 video or <a href="http://www.adobe.com/go/getflashplayer">
507Adobe Flash Player 10</a> or above for playback.',incapable:"Your device is incapable of playing the requested video.",network:"A network error prevented video download and playback"}},support:{flash:function(){if(typeof swfobject!=="undefined"&&swfobject.hasFlashPlayerVersion(jQuery.VideoPress.video.flash.min_version)){return true;}else{return false;}},html5Video:function(sourcetype){var v=document.createElement("video");if(!!v.canPlayType){if(jQuery.type(sourcetype)==="string"){return!!v.canPlayType(sourcetype).replace(/no/,"");}
508return true;}else{return false;}}},data:[],analytics:{wpcom:{base_uri:"//stats.wordpress.com/v.gif?",params:function(guid,filetype){var data=jQuery.VideoPress.data[guid];if(!jQuery.isPlainObject(data)){return;}
509var params={blog:data.blog,post:data.post,page_url:top.document.URL};if(filetype==="mp4"&&data.mp4&&data.mp4.size){params.video_fmt="fmt_"+data.mp4.size;}else{params.video_fmt="fmt_std";}
510return params;},send:function(params){var beacon=new Image();beacon.src=jQuery.VideoPress.analytics.wpcom.base_uri+jQuery.param(params);beacon=null;}},ga:{is_active:function(){if((typeof _gaq!=="undefined")&&jQuery.type(_gaq)==="array"){return true;}else{return false;}}},impression:function(guid){var params=jQuery.VideoPress.analytics.wpcom.params(guid,"mp4");if(!jQuery.isPlainObject(params)){return;}
511params.video_impression=1;jQuery.VideoPress.analytics.wpcom.send(params);},played:function(guid,filetype){var params=jQuery.VideoPress.analytics.wpcom.params(guid,filetype);if(!jQuery.isPlainObject(params)){return;}
512params.video_play=1;jQuery.VideoPress.analytics.wpcom.send(params);if(jQuery.VideoPress.analytics.ga.is_active()){_gaq.push(["_trackEvent","Videos","Play"]);}},watched:function(guid,filetype,current_time,initial_time){if(jQuery.VideoPress.data[guid].playback===undefined){var start=0;if(initial_time!==undefined&&jQuery.type(initial_time)==="number"&&initial_time>0){if(current_time>initial_time){start=current_time-initial_time;}}
513jQuery.VideoPress.data[guid].playback={last_observed:current_time,time_elapsed:start};}
514var time_watched=current_time-jQuery.VideoPress.data[guid].playback.last_observed;if(time_watched>0){jQuery.VideoPress.data[guid].playback.time_elapsed+=time_watched;jQuery.VideoPress.data[guid].playback.last_observed=current_time;if(jQuery.VideoPress.data[guid].playback.time_elapsed>15){var params=jQuery.VideoPress.analytics.wpcom.params(guid,filetype);if(!jQuery.isPlainObject(params)){return;}
515params.t=15;jQuery.VideoPress.analytics.wpcom.send(params);jQuery.VideoPress.data[guid].playback.time_elapsed-=15;}else if(current_time===jQuery.VideoPress.data[guid].duration){jQuery.VideoPress.analytics.wpcom.send(params);jQuery.VideoPress.data[guid].playback.time_elapsed=0;delete jQuery.VideoPress.data[guid].playback;}}}},requirements:{isSufficientAge:function(container_el,min_age){var birthday=new Date(parseInt(jQuery("select[name=year]",container_el).val()),parseInt(j
515Query("select[name=month]",container_el).val()),parseInt(jQuery("select[name=day]",container_el).val()));var allowed_age=new Date(Date.now()-(1000*60*60*24*365*min_age));if(birthday>allowed_age){container_el.html('<p class="error" style="color:#fff;font-weight:bold">'+jQuery.VideoPress.error.messages.age+"</p>");}else{jQuery.VideoPress.video.play(container_el);}},allowedDomain:function(allowed_domains){if(jQuery.type(allowed_domains)==="array"){if(jQuery.inArray(top.document.location.hostname,allowed_domains)===-1){return false;}}
516return true;}},video:{flash:{player_uri:('https:'==location.protocol?'https://v0.wordpress.com':'http://s0.videopress.com')+"/player.swf?v=1.03",min_version:"10.0.0",params:{wmode:"direct",quality:"autohigh",seamlesstabbing:"true",allowfullscreen:"true",allowscriptaccess:"always",overstretch:"true"},expressinstall:('https:'==location.protocol?'https://v0.wordpress.com':'http://s0.videopress.com')+"/playerProductInstall.swf",embedCallback:function(event){if(event.success===false){jQuery("#"+event.id).html("<p>"+jQuery.VideoPress.error.messages.flash+"</p>");}}},types:{mp4:'video/mp4; codecs="avc1.64001E, mp4a.40.2"',ogv:'video/ogg; codecs="theora, vorbis"'},canPlay:function(){if(jQuery.VideoPress.support.flash()){jQuery.VideoPress.video.playerSupport="flash";}else if(jQuery.VideoPress.support.html5Video()){if(jQuery.VideoPress.support.html5Video(jQuery.VideoPress.video.types.mp4)){jQuery.VideoPress.video.playerSupport="mp4";}else if(jQuery.VideoPress.support.html5Video(jQuery.VideoPress.video.types.ogv)){jQuery.VideoPress.video.playerSupport="ogv";}else{jQuery.VideoPress.video.playerSupport="html5";}}else{jQuery.VideoPress.video.playerSupport="";}},prepare:function(guid,config,count){var video=jQuery.VideoPress.data[guid][count];if(config.container===undefined||jQuery.type(video)!=="object"){return;}
517var width=0;if(config.width!==undefined){width=config.width;}else{config.container.width();}
518var height=0;if(config.height!==undefined){height=config.height;}else{config.container.height();}
519var div_id="#v-"+guid+'-'+count;var parent_width=jQuery(div_id).parent().width();var diffw=0;var diffh=0;var ratio=0;if(width>parent_width){diffw=width-parent_width+11;ratio=(width*1.0)/(height*1.0);diffh=diffw/ratio;width-=diffw;height-=Math.round(diffh);}
520if(width<60||height<60){width=400;height=300;}
521jQuery.VideoPress.data[guid][count].dimensions={};if(0==ratio){jQuery.VideoPress.data[guid][count].dimensions.width=width;jQuery.VideoPress.data[guid][count].dimensions.height=height;}
522else{jQuery.VideoPress.data[guid][count].dimensions.width=width-7;jQuery.VideoPress.data[guid][count].dimensions.height=height-Math.round(7/ratio);jQuery(div_id).width(width);jQuery(div_id).height(height+50);jQuery(div_id+"-placeholder").width(jQuery.VideoPress.data[guid][count].dimensions.width);jQuery(div_id+"-placeholder").height(jQuery.VideoPress.data[guid][count].dimensions.height);jQuery(div_id+"-placeholder img.videopress-poster").width(jQuery.VideoPress.data[guid][count].dimensions.width);jQuery(div_id+"-placeholder img.videopress-poster").height(jQuery.VideoPress.data[guid][count].dimensions.height);}
523config.container.data("guid",guid);config.container.data("count",count);if(jQuery.VideoPress.video.playerSupport===undefined){jQuery.VideoPress.video.canPlay();}
524if(config.freedom===true&&jQuery.type(video.ogv)==="string"){jQuery.VideoPress.video.insert(config.container,guid,count,video,"ogv",jQuery.VideoPress.data[guid][count].dimensions.width,jQuery.VideoPress.data[guid].dimensions.height);config.container.data("player","ogv");}else if(jQuery.VideoPress.video.playerSupport==="flash"){config.container.data("player","flash");config.container.append('<div id="v-'+guid+"-"+count+'-video">');}else if(jQuery.inArray(jQuery.VideoPress.video.playerSupport,["html5","mp4","ogv"])&&(jQuery.type(video.mp4.uri)==="string"||jQuery.type(video.ogv.uri)==="string")){var load_type="html5";if(jQuery.VideoPress.video.playerSupport==="mp4"&&video.mp4!==undefined&&jQuery.type(video.mp4.uri)==="string"){load_type="mp4";}else if(jQuery.VideoPress.video.playerSupport==="ogv"&&video.ogv!==undefined&&jQuery.type(video.ogv.uri)==="str
524ing"){load_type="ogv";}
525jQuery.VideoPress.video.insert(config.container,guid,count,video,load_type,jQuery.VideoPress.data[guid][count].dimensions.width,jQuery.VideoPress.data[guid][count].dimensions.height);config.container.data("player",load_type);load_type=null;}else{config.container.html('<p class="videopress-error">'+jQuery.VideoPress.error.messages.incompatible+'</p>');return false;}
526return true;},insert:function(container_el,guid,count,video_data,video_type,width,height){var video_id="v-"+guid+"-"+count+"-video";var video_el=jQuery("<video />");video_el.attr("id",video_id);video_el.attr("width",width);video_el.attr("height",height);video_el.attr("poster",video_data.poster);if(video_type==="ogv"){video_el.attr("preload","metadata");}else{video_el.attr("preload","none");}
527video_el.attr("controls","true");video_el.attr("x-webkit-airplay","allow");if(video_type==="mp4"&&video_data.mp4!==undefined&&jQuery.type(video_data.mp4.uri)==="string"){video_el.attr("src",video_data.mp4.uri);}else if(video_type==="ogv"&&video_data.ogv!==undefined&&jQuery.type(video_data.ogv.uri)==="string"){video_el.attr("src",video_data.ogv.uri);}else{if(video_data.mp4!==undefined&&jQuery.type(video_data.mp4.uri)==="string"){video_el.append('<source src="'+video_data.mp4.uri+'" />');}
528if(video_data.ogv!==undefined&&jQuery.type(video_data.ogv.uri)==="string"){video_el.append('<source src="'+video_data.ogv.uri+'" />');}}
529if(video_data.tracks!==undefined){video_el.append(video_data.tracks);}
530video_el.append('<p class="videopress-error">'+jQuery.VideoPress.error.messages.incompatible+"</p>");video_el.hide();container_el.append(video_el);video_el=null;video_id=null;},play:function(container_el){var player=container_el.data("player");if(player===undefined){player="flash";}
531var guid=container_el.data("guid");var count=container_el.data("count");if(player==="flash"){jQuery("#"+container_el.attr("id")+"-placeholder",container_el).remove();var player_uri=jQuery.VideoPress.video.flash.player_uri;var expressinstall=jQuery.VideoPress.video.flash.expressinstall;swfobject.embedSWF(player_uri,"v-"+guid+"-"+count+"-video",jQuery.VideoPress.data[guid][count].dimensions.width,jQuery.VideoPress.data[guid][count].dimensions.height,jQuery.VideoPress.video.flash.min_version,expressinstall,{guid:guid,autoPlay:"true",isDynamicSeeking:"true",hd:jQuery.VideoPress.data[guid][count].hd},jQuery.VideoPress.video.flash.params,null,jQuery.VideoPress.video.flash.embedCallback);}else if(jQuery.inArray(player,["html5","mp4","ogv"])){var video_el=jQuery("video",container_el);if(video_el){jQuery("#"+container_el.attr("id")+"-placeholder",container_el).remove();if(player==="html5"){player="mp4";}
532jQuery.VideoPress.video.playHTML5(video_el,guid,player);}}else{jQuery("#"+container_el.attr("id")+"-placeholder",container_el).remove();container_el.append('<p class="videopress-error">Unable to play video. No suitable player.</p>');}},playHTML5:function(video_el,guid,filetype){video_el.show();video_el[0].load();video_el[0].play();jQuery.VideoPress.analytics.played(guid,filetype);video_el.bind("error stalled",function(e){var message=jQuery.VideoPress.error.messages.error;try{switch(e.target.error.code){case e.target.error.MEDIA_ERR_NETWORK:message=jQuery.VideoPress.error.messages.network;break;case e.target.error.MEDIA_ERR_DECODE:case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:message=jQuery.VideoPress.error.messages.incapable+" "+filetype.toUpperCase()+".";break;default:break;}}catch(err){}
533if(message.length>0){video_el.html('<p class="videopress-error">'+message+"</p>");}
534message=null;});video_el.bind("durationchange",{guid:guid},function(event){var duration=jQuery(event.target).attr("duration");if(jQuery.type(duration)==="number"){jQuery.VideoPress.data[event.data.guid].duration=duration;}
535duration=null;});video_el.one("loadeddata",{guid:guid,filetype:filetype},function(event){var filetype=event.data.filetype;var loaded_file=jQuery(event.target).attr("currentSrc");if(jQuery.type(loaded_file)==="string"&&loaded_file.length>3){var ext=loaded_file.substr(loaded_file.lastIndexOf(".")+1).toLowerCase();if(jQuery.inArray(ext,["mp4","ogv"])){filetype=ext;}
536ext=null;}
537video_el.bind("play",{guid:event.data.guid,filetype:filetype},function(event){jQuery.VideoPress.analytics.played(event.data.guid,event.data.filetype);});video_el.bind("timeupdate",{guid:event.data.guid,filetype:filetype},function(event){var target=jQuery(event.target);jQuery.VideoPress.analytics.watched(event.data.guid,event.data.filetype,target.attr("currentTime"),target.attr("initialTime"));target=null;});video_el.bind("ended",{guid:event.data.guid,filetype:filetype},function(event){jQuery.VideoPress.analytics.watched(event.data.guid,event.data.filetype,jQuery.VideoPress.data[guid].duration,jQuery(event.target).attr("initialTime"));});});}}}});;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.