tonz003

JS 1.9.4 Part2

Jun 23rd, 2016
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 413.31 KB | None | 0 0
  1. </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" onload="setTimeout(resizeIframe);" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:'',social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal)
  2. $.prettyPhoto.close();e.preventDefault();break;};};};});};$.prettyPhoto.initialize=function(){settings=pp_settings;if(settings.theme=='pp_default')settings.horizontal_padding=16;theRel=$(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray($(this).attr('href'),pp_images);rel_index=(isSet)?set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this));_build_overlay(this);if(settings.allow_resize)
  3. $.prettyPhoto.open();return false;}
  4. $.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=(arguments[3])?arguments[3]:0;_build_overlay(event.target);}
  5. if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').fadeIn(600);if(settings.deeplinking)
  6. setHashtag();if(settings.social_tools){facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));$pp_pic_holder.find('.pp_social').html(facebook_like_link);}
  7. if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));}else{$pp_pic_holder.find('.pp_description').hide();}
  8. movie_width=(parseFloat(getParam('width',pp_images[set_position])))?getParam('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(getParam('height',pp_images[set_position])))?getParam('height',pp_images[set_position]):settings.default_height.toString();percentBased=false;if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;}
  9. if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}
  10. $pp_pic_holder.fadeIn(function(){(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');imgPreloader="";skipInjection=false;switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=getParam('v',pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split('youtu.be/');movie_id=movie_id[1];if(movie_id.indexOf('?')>0)
  11. movie_id=movie_id.substr(0,movie_id.indexOf('?'));if(movie_id.indexOf('&')>0)
  12. movie_id=movie_id.substr(0,movie_id.indexOf('&'));}
  13. movie='http://www.youtube.com/embed/'+movie_id;(getParam('rel',pp_images[set_position]))?movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[3]+'?title=0&amp;byline=0&amp;portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'ajax':doresize=false;pp_dimensions=_fitToViewport(movie_width,movie_height);doresize=true;skipInjection=true;$.get(pp_images[set_position],function(responseHTML){toInject=settings.inline_markup.replace(/{content}/g,responseHTML);$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();});break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader&&!skipInjection){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0)set_position=$(pp_images).size()-1;}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1)set_position=0;}else{set_position=direction;};rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');}
  14. _hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0;}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage;}else{currentGalleryPage=direction;};slide_speed=(direction=='next'||direction=='previous')?settings.animation_speed:0;slide_to=currentGalleryPage*(itemsPerPage*itemWidth);$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};}
  15. $.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;}
  16. $.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade, div.pp_details, .pp_loaderIcon').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');$(this).remove();$(window).unbind('scroll.prettyphoto');clearHashtag();settings.callback();doresize=true;pp_open=false;delete settings;});};function _showContent(){projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find('.pp_content').css({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']});$pp_pic_holder.css({'top':projectedTop,'left':((windowWidth/2)-(pp_dimensions['containerWidth']/2)<0)?0:(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']});$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);if($pp_pic_holder.find('#pp_full_res > iframe').length==0){$('.pp_loaderIcon').hide();$pp_pic_holder.find('.pp_fade, div.pp_details').fadeIn(settings.animation_speed);}
  17. else{$pp_pic_holder.find('iframe').load(function(){$pp_pic_holder.css({'top':projectedTop-50,});$('.pp_loaderIcon').hide();$pp_pic_holder.find('.pp_fade, div.pp_details').fadeIn(settings.animation_speed);});}
  18. if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}
  19. if(settings.allow_expand){if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand').hide();}}
  20. if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;_insert_gallery();pp_settings.ajaxcallback();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').fadeIn(600);callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};if((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight)){_fitToViewport(pp_containerWidth,pp_containerHeight)};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+(settings.horizontal_padding*2),contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;}
  21. function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bajax=true\b/i)){return'ajax';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;if(contentHeight>windowHeight)
  22. return;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook"||settings.theme=="pp_default")?50:30;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();}else{$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css('margin-left',-((galleryWidth/2)+(navWidth/2))).find('div:first').width(galleryWidth+5).find('ul').width(fullGalleryWidth).find('li.selected').removeClass('selected');goToPage=(Math.floor(set_position/itemsPerPage)<totalPage)?Math.floor(set_position/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');}}
  23. function _build_overlay(caller){if(settings.social_tools)
  24. facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));settings.markup=settings.markup.replace('{pp_social}','');$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';img_src='';}else{classname='';img_src=pp_images[i];}
  25. toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_gallery=$('.pp_pic_holder .pp_gallery'),$pp_gallery_li=$pp_gallery.find('li');$pp_gallery.find('.pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_gallery.find('.pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_gallery_li.each(function(i){$(this).find('a').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
  26. $pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
  27. $pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});if(settings.allow_expand){$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});}
  28. $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};if(!pp_alreadyInitialized&&getHashtag()){pp_alreadyInitialized=true;hashIndex=getHashtag();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf('/'));setTimeout(function(){$("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click');},50);}
  29. return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function getHashtag(){var url=location.href;hashtag=(url.indexOf('#prettyPhoto')!==-1)?decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;return hashtag;};function setHashtag(){if(typeof theRel=='undefined')return;location.hash=theRel+'/'+rel_index+'/';};function clearHashtag(){if(location.href.indexOf('#prettyPhoto')!==-1)location.hash="prettyPhoto";}
  30. function getParam(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);var pp_alreadyInitialized=false;(function(d){d.flexslider=function(j,l){var a=d(j),c=d.extend({},d.flexslider.defaults,l),e=c.namespace,q="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,u=q?"touchend":"click",m="vertical"===c.direction,n=c.reverse,h=0<c.itemWidth,s="fade"===c.animation,t=""!==c.asNavFor,f={};d.data(j,"flexslider",a);f={init:function(){a.animating=!1;a.currentSlide=c.startAt;a.animatingTo=a.currentSlide;a.atEnd=0===a.currentSlide||a.currentSlide===a.last;a.containerSelector=c.selector.substr(0,c.selector.search(" "));a.slides=d(c.selector,a);a.container=d(a.containerSelector,a);a.count=a.slides.length;a.syncExists=0<d(c.sync).length;"slide"===c.animation&&(c.animation="swing");a.prop=m?"top":"marginLeft";a.args={};a.manualPause=!1;var b=a,g;if(g=!c.video)if(g=!s)if(g=c.useCSS)a:{g=document.createElement("div");var p=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],e;for(e in p)if(void 0!==g.style[p[e]]){a.pfx=p[e].replace("Perspective","").toLowerCase();a.prop="-"+a.pfx+"-transform";g=!0;break a}g=!1}b.transitions=g;""!==c.controlsContainer&&(a.controlsContainer=0<d(c.controlsContainer).length&&d(c.controlsContainer));""!==c.manualControls&&(a.manualControls=0<d(c.manualControls).length&&d(c.manualControls));c.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-0.5}),a.container.empty().append(a.slides));a.doMath();t&&f.asNav.setup();a.setup("init");c.controlNav&&f.controlNav.setup();c.directionNav&&f.directionNav.setup();c.keyboard&&(1===d(a.containerSelector).length||c.multipleKeyboard)&&d(document).bind("keyup",function(b){b=b.keyCode;if(!a.animating&&(39===b||37===b))b=39===b?a.getTarget("next"):37===b?a.getTarget("prev"):!1,a.flexAnimate(b,c.pauseOnAction)});c.mousewheel&&a.bind("mousewheel",function(b,g){b.preventDefault();var d=0>g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()},function(){!a.manualPause&&!a.manualPlay&&a.play()}),0<c.initDelay?setTimeout(a.play,c.initDelay):a.play());q&&c.touch&&f.touch();(!s||s&&c.smoothHeight)&&d(window).bind("resize focus",f.resize);setTimeout(function(){c.start(a)},200)},asNav:{setup:function(){a.asNav=!0;a.animatingTo=Math.floor(a.currentSlide/a.move);a.currentItem=a.currentSlide;a.slides.removeClass(e+"active-slide").eq(a.currentItem).addClass(e+"active-slide");a.slides.click(function(b){b.preventDefault();b=d(this);var g=b.index();!d(c.asNavFor).data("flexslider").animating&&!b.hasClass("active")&&(a.direction=a.currentItem<g?"next":"prev",a.flexAnimate(g,c.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){a.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var b=1,g;a.controlNavScaffold=d('<ol class="'+e+"control-nav "+e+("thumbnails"===c.controlNav?"control-thumbs":"control-paging")+'"></ol>');if(1<a.pagingCount)for(var p=0;p<a.pagingCount;p++)g="thumbnails"===c.controlNav?'<img src="'+a.slides.eq(p).attr("data-thumb")+'"/>':"<a>"+b+"</a>",a.controlNavScaffold.append("<li>"+g+"</li>"),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNavScaffold.delegate("a","click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"),a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1<a.pagingCount&&"add"===b?a.controlNavScaffold.append(d("<li><a>"+a.count+"</a></li>")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1<a.pagingCount&&a.pagingCount!==a.controlNav.length?a.update(c,b):f.controlNav.active()}},directionNav:{setup:function(){var b=d('<ul class="'+
  31. e+'direction-nav"><li><a class="'+e+'prev" href="#">'+c.prevText+'</a></li><li><a class="'+e+'next" href="#">'+c.nextText+"</a></li></ul>");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(u,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)});q&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('<div class="'+e+'pauseplay"><a></a></div>');a.controlsContainer?(a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(u,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});q&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){k=m?d-b.touches[0].pageY:d-b.touches[0].pageX;q=m?Math.abs(k)<Math.abs(b.touches[0].pageX-e):Math.abs(k)<Math.abs(b.touches[0].pageY-e);if(!q||500<Number(new Date)-l)b.preventDefault(),!s&&a.transitions&&(c.animationLoop||(k/=0===a.currentSlide&&0>k||a.currentSlide===a.last&&0<k?Math.abs(k)/r+2:1),a.setProps(f+k,"setTouch"))}function g(){j.removeEventListener("touchmove",b,!1);if(a.animatingTo===a.currentSlide&&!q&&null!==k){var h=n?-k:k,m=0<h?a.getTarget("next"):a.getTarget("prev");a.canAdvance(m)&&(550>Number(new Date)-l&&50<Math.abs(h)||Math.abs(h)>r/2)?a.flexAnimate(m,c.pauseOnAction):s||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}j.removeEventListener("touchend",g,!1);f=k=e=d=null}var d,e,f,r,k,l,q=!1;j.addEventListener("touchstart",function(k){a.animating?k.preventDefault():1===k.touches.length&&(a.pause(),r=m?a.h:a.w,l=Number(new Date),f=h&&n&&a.animatingTo===a.last?0:h&&n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)*r:(a.currentSlide+a.cloneOffset)*r,d=m?k.touches[0].pageY:k.touches[0].pageX,e=m?k.touches[0].pageX:k.touches[0].pageY,j.addEventListener("touchmove",b,!1),j.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),s?f.smoothHeight():h?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):m?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!m||s){var c=s?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case"animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case"play":!g.playing&&!g.asNav&&g.play();break;case"pause":g.pause()}}};a.flexAnimate=function(b,g,p,j,l){t&&1===a.pagingCount&&(a.direction=a.currentItem<b?"next":"prev");if(!a.animating&&(a.canAdvance(b,l)||p)&&a.is(":visible")){if(t&&j)if(p=d(c.asNavFor).data("flexslider"),a.atEnd=0===b||b===a.count-1,p.flexAnimate(b,!0,!1,!0,l),a.direction=a.currentItem<b?"next":"prev",p.direction=a.direction,Math.ceil((b+1)/a.visible)-1!==a.currentSlide&&0!==b)a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),b=Math.floor(b/a.visible);else return a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),!1;a.animating=!0;a.animatingTo=b;c.before(a);g&&a.pause();a.syncExists&&!l&&f.sync("animate");c.controlNav&&f.controlNav.active();h||a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide");a.atEnd=0===b||b===a.last;c.directionNav&&f.directionNav.update();b===a.last&&(c.end(a),c.animationLoop||a.pause());if(s)q?(a.slides.eq(a.currentSlide).css({opacity:0,zIndex:1}),a.slides.eq(b).css({opacity:1,zIndex:2}),a.slides.unbind("webkitTransitionEnd transitionend"),a.slides.eq(a.currentSlide).bind("webkitTransitionEnd transitionend",function(){c.after(a)}),a.animating=!1,a.currentSlide=a.animatingTo):(a.slides.eq(a.currentSlide).fadeOut(c.animationSpeed,c.easing),a.slides.eq(b).fadeIn(c.animationSpeed,c.easing,a.wrapup));else{var r=m?a.slides.filter(":first").height():a.computedW;h?(b=c.itemWidth>a.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?n?(a.count+a.cloneOffset)*r:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?n?0:(a.count+1)*r:n?(a.count-1-b+a.cloneOffset)*r:(b+a.cloneOffset)*r;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",function(){a.wrapup(r)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(r)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!s&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=t?a.pagingCount-1:a.last;return g?!0:t&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:t&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&!t?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:n&&a.animatingTo===a.last?0:n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:f;switch(g){case"setTotal":return n?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case"setTouch":return b;case"jumpEnd":return n?b:a.count*b;case"jumpStart":return n?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=m?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(s)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(q?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,p;"init"===b&&(a.viewport=d('<div class="'+e+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,n&&(p=d.makeArray(a.slides).reverse(),a.slides=d(p),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=n?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;m&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxW<a.w?(a.w-d*f)/f:c.itemWidth>a.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0<c.move&&c.move<a.visible?c.move:a.visible,a.pagingCount=Math.ceil((a.count-a.visible)/a.move+1),a.last=a.pagingCount-1,a.limit=1===a.pagingCount?0:c.itemWidth>a.w?(a.itemW+2*d)*a.count-a.w-
  32. d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(b<a.currentSlide?a.currentSlide+=1:b<=a.currentSlide&&0!==b&&(a.currentSlide-=1),a.animatingTo=a.currentSlide);if(c.controlNav&&!a.manualControls)if("add"===d&&!h||a.pagingCount>a.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCount<a.controlNav.length)h&&a.currentSlide>a.last&&(a.currentSlide-=1,a.animatingTo-=1),f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;m&&n?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():m&&n?a.slides.eq(a.last).remove():a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(j){void 0===j&&(j={});if("object"===typeof j)return this.each(function(){var a=d(this),c=a.find(j.selector?j.selector:".slides > li");1===c.length?(c.fadeIn(400),j.start&&j.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,j)});var l=d(this).data("flexslider");switch(j){case"play":l.play();break;case"pause":l.pause();break;case"next":l.flexAnimate(l.getTarget("next"),!0);break;case"prev":case"previous":l.flexAnimate(l.getTarget("prev"),!0);break;default:"number"===typeof j&&l.flexAnimate(j,!0)}}})(jQuery);(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);(function($){if($.fn.carouFredSel)
  33. {return;}
  34. $.fn.caroufredsel=$.fn.carouFredSel=function(options,configs)
  35. {if(this.length==0)
  36. {debug(true,'No element found for "'+this.selector+'".');return this;}
  37. if(this.length>1)
  38. {return this.each(function(){$(this).carouFredSel(options,configs);});}
  39. var $cfs=this,$tt0=this[0],starting_position=false;if($cfs.data('_cfs_isCarousel'))
  40. {starting_position=$cfs.triggerHandler('_cfs_triggerEvent','currentPosition');$cfs.trigger('_cfs_triggerEvent',['destroy',true]);}
  41. var FN={};FN._init=function(o,setOrig,start)
  42. {o=go_getObject($tt0,o);o.items=go_getItemsObject($tt0,o.items);o.scroll=go_getScrollObject($tt0,o.scroll);o.auto=go_getAutoObject($tt0,o.auto);o.prev=go_getPrevNextObject($tt0,o.prev);o.next=go_getPrevNextObject($tt0,o.next);o.pagination=go_getPaginationObject($tt0,o.pagination);o.swipe=go_getSwipeObject($tt0,o.swipe);o.mousewheel=go_getMousewheelObject($tt0,o.mousewheel);if(setOrig)
  43. {opts_orig=$.extend(true,{},$.fn.carouFredSel.defaults,o);}
  44. opts=$.extend(true,{},$.fn.carouFredSel.defaults,o);opts.d=cf_getDimensions(opts);crsl.direction=(opts.direction=='up'||opts.direction=='left')?'next':'prev';var a_itm=$cfs.children(),avail_primary=ms_getParentSize($wrp,opts,'width');if(is_true(opts.cookie))
  45. {opts.cookie='caroufredsel_cookie_'+conf.serialNumber;}
  46. opts.maxDimension=ms_getMaxDimension(opts,avail_primary);opts.items=in_complementItems(opts.items,opts,a_itm,start);opts[opts.d['width']]=in_complementPrimarySize(opts[opts.d['width']],opts,a_itm);opts[opts.d['height']]=in_complementSecondarySize(opts[opts.d['height']],opts,a_itm);if(opts.responsive)
  47. {if(!is_percentage(opts[opts.d['width']]))
  48. {opts[opts.d['width']]='100%';}}
  49. if(is_percentage(opts[opts.d['width']]))
  50. {crsl.upDateOnWindowResize=true;crsl.primarySizePercentage=opts[opts.d['width']];opts[opts.d['width']]=ms_getPercentage(avail_primary,crsl.primarySizePercentage);if(!opts.items.visible)
  51. {opts.items.visibleConf.variable=true;}}
  52. if(opts.responsive)
  53. {opts.usePadding=false;opts.padding=[0,0,0,0];opts.align=false;opts.items.visibleConf.variable=false;}
  54. else
  55. {if(!opts.items.visible)
  56. {opts=in_complementVisibleItems(opts,avail_primary);}
  57. if(!opts[opts.d['width']])
  58. {if(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d['width']])&&opts.items.filter=='*')
  59. {opts[opts.d['width']]=opts.items.visible*opts.items[opts.d['width']];opts.align=false;}
  60. else
  61. {opts[opts.d['width']]='variable';}}
  62. if(is_undefined(opts.align))
  63. {opts.align=(is_number(opts[opts.d['width']]))?'center':false;}
  64. if(opts.items.visibleConf.variable)
  65. {opts.items.visible=gn_getVisibleItemsNext(a_itm,opts,0);}}
  66. if(opts.items.filter!='*'&&!opts.items.visibleConf.variable)
  67. {opts.items.visibleConf.org=opts.items.visible;opts.items.visible=gn_getVisibleItemsNextFilter(a_itm,opts,0);}
  68. opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0);opts.items.visibleConf.old=opts.items.visible;if(opts.responsive)
  69. {if(!opts.items.visibleConf.min)
  70. {opts.items.visibleConf.min=opts.items.visible;}
  71. if(!opts.items.visibleConf.max)
  72. {opts.items.visibleConf.max=opts.items.visible;}
  73. opts=in_getResponsiveValues(opts,a_itm,avail_primary);}
  74. else
  75. {opts.padding=cf_getPadding(opts.padding);if(opts.align=='top')
  76. {opts.align='left';}
  77. else if(opts.align=='bottom')
  78. {opts.align='right';}
  79. switch(opts.align)
  80. {case'center':case'left':case'right':if(opts[opts.d['width']]!='variable')
  81. {opts=in_getAlignPadding(opts,a_itm);opts.usePadding=true;}
  82. break;default:opts.align=false;opts.usePadding=(opts.padding[0]==0&&opts.padding[1]==0&&opts.padding[2]==0&&opts.padding[3]==0)?false:true;break;}}
  83. if(!is_number(opts.scroll.duration))
  84. {opts.scroll.duration=500;}
  85. if(is_undefined(opts.scroll.items))
  86. {opts.scroll.items=(opts.responsive||opts.items.visibleConf.variable||opts.items.filter!='*')?'visible':opts.items.visible;}
  87. opts.auto=$.extend(true,{},opts.scroll,opts.auto);opts.prev=$.extend(true,{},opts.scroll,opts.prev);opts.next=$.extend(true,{},opts.scroll,opts.next);opts.pagination=$.extend(true,{},opts.scroll,opts.pagination);opts.auto=go_complementAutoObject($tt0,opts.auto);opts.prev=go_complementPrevNextObject($tt0,opts.prev);opts.next=go_complementPrevNextObject($tt0,opts.next);opts.pagination=go_complementPaginationObject($tt0,opts.pagination);opts.swipe=go_complementSwipeObject($tt0,opts.swipe);opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel);if(opts.synchronise)
  88. {opts.synchronise=cf_getSynchArr(opts.synchronise);}
  89. if(opts.auto.onPauseStart)
  90. {opts.auto.onTimeoutStart=opts.auto.onPauseStart;deprecated('auto.onPauseStart','auto.onTimeoutStart');}
  91. if(opts.auto.onPausePause)
  92. {opts.auto.onTimeoutPause=opts.auto.onPausePause;deprecated('auto.onPausePause','auto.onTimeoutPause');}
  93. if(opts.auto.onPauseEnd)
  94. {opts.auto.onTimeoutEnd=opts.auto.onPauseEnd;deprecated('auto.onPauseEnd','auto.onTimeoutEnd');}
  95. if(opts.auto.pauseDuration)
  96. {opts.auto.timeoutDuration=opts.auto.pauseDuration;deprecated('auto.pauseDuration','auto.timeoutDuration');}};FN._build=function(){$cfs.data('_cfs_isCarousel',true);var a_itm=$cfs.children(),orgCSS=in_mapCss($cfs,['textAlign','float','position','top','right','bottom','left','zIndex','width','marginTop','marginRight','marginBottom','marginLeft']),newPosition='relative';switch(orgCSS.position)
  97. {case'absolute':case'fixed':newPosition=orgCSS.position;break;}
  98. if(conf.wrapper=='parent')
  99. {sz_storeOrigCss($wrp);}
  100. else
  101. {$wrp.css(orgCSS);}
  102. $wrp.css({'overflow':'hidden','position':newPosition});sz_storeOrigCss($cfs);$cfs.data('_cfs_origCssZindex',orgCSS.zIndex);$cfs.css({'textAlign':'left','float':'none','position':'absolute','top':0,'right':'auto','bottom':'auto','left':0,'marginTop':0,'marginRight':0,'marginBottom':0,'marginLeft':0});sz_storeMargin(a_itm,opts);sz_storeOrigCss(a_itm);if(opts.responsive)
  103. {sz_setResponsiveSizes(opts,a_itm);}};FN._bind_events=function(){FN._unbind_events();$cfs.bind(cf_e('stop',conf),function(e,imm){e.stopPropagation();if(!crsl.isStopped)
  104. {if(opts.auto.button)
  105. {opts.auto.button.addClass(cf_c('stopped',conf));}}
  106. crsl.isStopped=true;if(opts.auto.play)
  107. {opts.auto.play=false;$cfs.trigger(cf_e('pause',conf),imm);}
  108. return true;});$cfs.bind(cf_e('finish',conf),function(e){e.stopPropagation();if(crsl.isScrolling)
  109. {sc_stopScroll(scrl);}
  110. return true;});$cfs.bind(cf_e('pause',conf),function(e,imm,res){e.stopPropagation();tmrs=sc_clearTimers(tmrs);if(imm&&crsl.isScrolling)
  111. {scrl.isStopped=true;var nst=getTime()-scrl.startTime;scrl.duration-=nst;if(scrl.pre)
  112. {scrl.pre.duration-=nst;}
  113. if(scrl.post)
  114. {scrl.post.duration-=nst;}
  115. sc_stopScroll(scrl,false);}
  116. if(!crsl.isPaused&&!crsl.isScrolling)
  117. {if(res)
  118. {tmrs.timePassed+=getTime()-tmrs.startTime;}}
  119. if(!crsl.isPaused)
  120. {if(opts.auto.button)
  121. {opts.auto.button.addClass(cf_c('paused',conf));}}
  122. crsl.isPaused=true;if(opts.auto.onTimeoutPause)
  123. {var dur1=opts.auto.timeoutDuration-tmrs.timePassed,perc=100-Math.ceil(dur1*100/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,perc,dur1);}
  124. return true;});$cfs.bind(cf_e('play',conf),function(e,dir,del,res){e.stopPropagation();tmrs=sc_clearTimers(tmrs);var v=[dir,del,res],t=['string','number','boolean'],a=cf_sortParams(v,t);dir=a[0];del=a[1];res=a[2];if(dir!='prev'&&dir!='next')
  125. {dir=crsl.direction;}
  126. if(!is_number(del))
  127. {del=0;}
  128. if(!is_boolean(res))
  129. {res=false;}
  130. if(res)
  131. {crsl.isStopped=false;opts.auto.play=true;}
  132. if(!opts.auto.play)
  133. {e.stopImmediatePropagation();return debug(conf,'Carousel stopped: Not scrolling.');}
  134. if(crsl.isPaused)
  135. {if(opts.auto.button)
  136. {opts.auto.button.removeClass(cf_c('stopped',conf));opts.auto.button.removeClass(cf_c('paused',conf));}}
  137. crsl.isPaused=false;tmrs.startTime=getTime();var dur1=opts.auto.timeoutDuration+del;dur2=dur1-tmrs.timePassed;perc=100-Math.ceil(dur2*100/dur1);if(opts.auto.progress)
  138. {tmrs.progress=setInterval(function(){var pasd=getTime()-tmrs.startTime+tmrs.timePassed,perc=Math.ceil(pasd*100/dur1);opts.auto.progress.updater.call(opts.auto.progress.bar[0],perc);},opts.auto.progress.interval);}
  139. tmrs.auto=setTimeout(function(){if(opts.auto.progress)
  140. {opts.auto.progress.updater.call(opts.auto.progress.bar[0],100);}
  141. if(opts.auto.onTimeoutEnd)
  142. {opts.auto.onTimeoutEnd.call($tt0,perc,dur2);}
  143. if(crsl.isScrolling)
  144. {$cfs.trigger(cf_e('play',conf),dir);}
  145. else
  146. {$cfs.trigger(cf_e(dir,conf),opts.auto);}},dur2);if(opts.auto.onTimeoutStart)
  147. {opts.auto.onTimeoutStart.call($tt0,perc,dur2);}
  148. return true;});$cfs.bind(cf_e('resume',conf),function(e){e.stopPropagation();if(scrl.isStopped)
  149. {scrl.isStopped=false;crsl.isPaused=false;crsl.isScrolling=true;scrl.startTime=getTime();sc_startScroll(scrl,conf);}
  150. else
  151. {$cfs.trigger(cf_e('play',conf));}
  152. return true;});$cfs.bind(cf_e('prev',conf)+' '+cf_e('next',conf),function(e,obj,num,clb,que){e.stopPropagation();if(crsl.isStopped||$cfs.is(':hidden'))
  153. {e.stopImmediatePropagation();return debug(conf,'Carousel stopped or hidden: Not scrolling.');}
  154. var minimum=(is_number(opts.items.minimum))?opts.items.minimum:opts.items.visible+1;if(minimum>itms.total)
  155. {e.stopImmediatePropagation();return debug(conf,'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');}
  156. var v=[obj,num,clb,que],t=['object','number/string','function','boolean'],a=cf_sortParams(v,t);obj=a[0];num=a[1];clb=a[2];que=a[3];var eType=e.type.slice(conf.events.prefix.length);if(!is_object(obj))
  157. {obj={};}
  158. if(is_function(clb))
  159. {obj.onAfter=clb;}
  160. if(is_boolean(que))
  161. {obj.queue=que;}
  162. obj=$.extend(true,{},opts[eType],obj);if(obj.conditions&&!obj.conditions.call($tt0,eType))
  163. {e.stopImmediatePropagation();return debug(conf,'Callback "conditions" returned false.');}
  164. if(!is_number(num))
  165. {if(opts.items.filter!='*')
  166. {num='visible';}
  167. else
  168. {var arr=[num,obj.items,opts[eType].items];for(var a=0,l=arr.length;a<l;a++)
  169. {if(is_number(arr[a])||arr[a]=='page'||arr[a]=='visible'){num=arr[a];break;}}}
  170. switch(num){case'page':e.stopImmediatePropagation();return $cfs.triggerHandler(cf_e(eType+'Page',conf),[obj,clb]);break;case'visible':if(!opts.items.visibleConf.variable&&opts.items.filter=='*')
  171. {num=opts.items.visible;}
  172. break;}}
  173. if(scrl.isStopped)
  174. {$cfs.trigger(cf_e('resume',conf));$cfs.trigger(cf_e('queue',conf),[eType,[obj,num,clb]]);e.stopImmediatePropagation();return debug(conf,'Carousel resumed scrolling.');}
  175. if(obj.duration>0)
  176. {if(crsl.isScrolling)
  177. {if(obj.queue)
  178. {if(obj.queue=='last')
  179. {queu=[];}
  180. if(obj.queue!='first'||queu.length==0)
  181. {$cfs.trigger(cf_e('queue',conf),[eType,[obj,num,clb]]);}}
  182. e.stopImmediatePropagation();return debug(conf,'Carousel currently scrolling.');}}
  183. tmrs.timePassed=0;$cfs.trigger(cf_e('slide_'+eType,conf),[obj,num]);if(opts.synchronise)
  184. {var s=opts.synchronise,c=[obj,num];for(var j=0,l=s.length;j<l;j++){var d=eType;if(!s[j][2])
  185. {d=(d=='prev')?'next':'prev';}
  186. if(!s[j][1])
  187. {c[0]=s[j][0].triggerHandler('_cfs_triggerEvent',['configuration',d]);}
  188. c[1]=num+s[j][3];s[j][0].trigger('_cfs_triggerEvent',['slide_'+d,c]);}}
  189. return true;});$cfs.bind(cf_e('slide_prev',conf),function(e,sO,nI){e.stopPropagation();var a_itm=$cfs.children();if(!opts.circular)
  190. {if(itms.first==0)
  191. {if(opts.infinite)
  192. {$cfs.trigger(cf_e('next',conf),itms.total-1);}
  193. return e.stopImmediatePropagation();}}
  194. sz_resetMargin(a_itm,opts);if(!is_number(nI))
  195. {if(opts.items.visibleConf.variable)
  196. {nI=gn_getVisibleItemsPrev(a_itm,opts,itms.total-1);}
  197. else if(opts.items.filter!='*')
  198. {var xI=(is_number(sO.items))?sO.items:gn_getVisibleOrg($cfs,opts);nI=gn_getScrollItemsPrevFilter(a_itm,opts,itms.total-1,xI);}
  199. else
  200. {nI=opts.items.visible;}
  201. nI=cf_getAdjust(nI,opts,sO.items,$tt0);}
  202. if(!opts.circular)
  203. {if(itms.total-nI<itms.first)
  204. {nI=itms.total-itms.first;}}
  205. opts.items.visibleConf.old=opts.items.visible;if(opts.items.visibleConf.variable)
  206. {var vI=cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm,opts,itms.total-nI),opts,opts.items.visibleConf.adjust,$tt0);if(opts.items.visible+nI<=vI&&nI<itms.total)
  207. {nI++;vI=cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm,opts,itms.total-nI),opts,opts.items.visibleConf.adjust,$tt0);}
  208. opts.items.visible=vI;}
  209. else if(opts.items.filter!='*')
  210. {var vI=gn_getVisibleItemsNextFilter(a_itm,opts,itms.total-nI);opts.items.visible=cf_getItemsAdjust(vI,opts,opts.items.visibleConf.adjust,$tt0);}
  211. sz_resetMargin(a_itm,opts,true);if(nI==0)
  212. {e.stopImmediatePropagation();return debug(conf,'0 items to scroll: Not scrolling.');}
  213. debug(conf,'Scrolling '+nI+' items backward.');itms.first+=nI;while(itms.first>=itms.total)
  214. {itms.first-=itms.total;}
  215. if(!opts.circular)
  216. {if(itms.first==0&&sO.onEnd)
  217. {sO.onEnd.call($tt0,'prev');}
  218. if(!opts.infinite)
  219. {nv_enableNavi(opts,itms.first,conf);}}
  220. $cfs.children().slice(itms.total-nI,itms.total).prependTo($cfs);if(itms.total<opts.items.visible+nI)
  221. {$cfs.children().slice(0,(opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);}
  222. var a_itm=$cfs.children(),i_old=gi_getOldItemsPrev(a_itm,opts,nI),i_new=gi_getNewItemsPrev(a_itm,opts),i_cur_l=a_itm.eq(nI-1),i_old_l=i_old.last(),i_new_l=i_new.last();sz_resetMargin(a_itm,opts);var pL=0,pR=0;if(opts.align)
  223. {var p=cf_getAlignPadding(i_new,opts);pL=p[0];pR=p[1];}
  224. var oL=(pL<0)?opts.padding[opts.d[3]]:0;var hiddenitems=false,i_skp=$();if(opts.items.visible<nI)
  225. {i_skp=a_itm.slice(opts.items.visibleConf.old,nI);if(sO.fx=='directscroll')
  226. {var orgW=opts.items[opts.d['width']];hiddenitems=i_skp;i_cur_l=i_new_l;sc_hideHiddenItems(hiddenitems);opts.items[opts.d['width']]='variable';}}
  227. var $cf2=false,i_siz=ms_getTotalSize(a_itm.slice(0,nI),opts,'width'),w_siz=cf_mapWrapperSizes(ms_getSizes(i_new,opts,true),opts,!opts.usePadding),i_siz_vis=0,a_cfs={},a_wsz={},a_cur={},a_old={},a_new={},a_lef={},a_lef_vis={},a_dur=sc_getDuration(sO,opts,nI,i_siz);switch(sO.fx)
  228. {case'cover':case'cover-fade':i_siz_vis=ms_getTotalSize(a_itm.slice(0,opts.items.visible),opts,'width');break;}
  229. if(hiddenitems)
  230. {opts.items[opts.d['width']]=orgW;}
  231. sz_resetMargin(a_itm,opts,true);if(pR>=0)
  232. {sz_resetMargin(i_old_l,opts,opts.padding[opts.d[1]]);}
  233. if(pL>=0)
  234. {sz_resetMargin(i_cur_l,opts,opts.padding[opts.d[3]]);}
  235. if(opts.align)
  236. {opts.padding[opts.d[1]]=pR;opts.padding[opts.d[3]]=pL;}
  237. a_lef[opts.d['left']]=-(i_siz-oL);a_lef_vis[opts.d['left']]=-(i_siz_vis-oL);a_wsz[opts.d['left']]=w_siz[opts.d['width']];var _s_wrapper=function(){},_a_wrapper=function(){},_s_paddingold=function(){},_a_paddingold=function(){},_s_paddingnew=function(){},_a_paddingnew=function(){},_s_paddingcur=function(){},_a_paddingcur=function(){},_onafter=function(){},_moveitems=function(){},_position=function(){};switch(sO.fx)
  238. {case'crossfade':case'cover':case'cover-fade':case'uncover':case'uncover-fade':$cf2=$cfs.clone(true).appendTo($wrp);break;}
  239. switch(sO.fx)
  240. {case'crossfade':case'uncover':case'uncover-fade':$cf2.children().slice(0,nI).remove();$cf2.children().slice(opts.items.visibleConf.old).remove();break;case'cover':case'cover-fade':$cf2.children().slice(opts.items.visible).remove();$cf2.css(a_lef_vis);break;}
  241. $cfs.css(a_lef);scrl=sc_setScroll(a_dur,sO.easing,conf);a_cfs[opts.d['left']]=(opts.usePadding)?opts.padding[opts.d[3]]:0;if(opts[opts.d['width']]=='variable'||opts[opts.d['height']]=='variable')
  242. {_s_wrapper=function(){$wrp.css(w_siz);};_a_wrapper=function(){scrl.anims.push([$wrp,w_siz]);};}
  243. if(opts.usePadding)
  244. {if(i_new_l.not(i_cur_l).length)
  245. {a_cur[opts.d['marginRight']]=i_cur_l.data('_cfs_origCssMargin');if(pL<0)
  246. {i_cur_l.css(a_cur);}
  247. else
  248. {_s_paddingcur=function(){i_cur_l.css(a_cur);};_a_paddingcur=function(){scrl.anims.push([i_cur_l,a_cur]);};}}
  249. switch(sO.fx)
  250. {case'cover':case'cover-fade':$cf2.children().eq(nI-1).css(a_cur);break;}
  251. if(i_new_l.not(i_old_l).length)
  252. {a_old[opts.d['marginRight']]=i_old_l.data('_cfs_origCssMargin');_s_paddingold=function(){i_old_l.css(a_old);};_a_paddingold=function(){scrl.anims.push([i_old_l,a_old]);};}
  253. if(pR>=0)
  254. {a_new[opts.d['marginRight']]=i_new_l.data('_cfs_origCssMargin')+opts.padding[opts.d[1]];_s_paddingnew=function(){i_new_l.css(a_new);};_a_paddingnew=function(){scrl.anims.push([i_new_l,a_new]);};}}
  255. _position=function(){$cfs.css(a_cfs);};var overFill=opts.items.visible+nI-itms.total;_moveitems=function(){if(overFill>0)
  256. {$cfs.children().slice(itms.total).remove();i_old=$($cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat($cfs.children().slice(0,overFill).get()));}
  257. sc_showHiddenItems(hiddenitems);if(opts.usePadding)
  258. {var l_itm=$cfs.children().eq(opts.items.visible+nI-1);l_itm.css(opts.d['marginRight'],l_itm.data('_cfs_origCssMargin'));}};var cb_arguments=sc_mapCallbackArguments(i_old,i_skp,i_new,nI,'prev',a_dur,w_siz);_onafter=function(){sc_afterScroll($cfs,$cf2,sO);crsl.isScrolling=false;clbk.onAfter=sc_fireCallbacks($tt0,sO,'onAfter',cb_arguments,clbk);queu=sc_fireQueue($cfs,queu,conf);if(!crsl.isPaused)
  259. {$cfs.trigger(cf_e('play',conf));}};crsl.isScrolling=true;tmrs=sc_clearTimers(tmrs);clbk.onBefore=sc_fireCallbacks($tt0,sO,'onBefore',cb_arguments,clbk);switch(sO.fx)
  260. {case'none':$cfs.css(a_cfs);_s_wrapper();_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();_onafter();break;case'fade':scrl.anims.push([$cfs,{'opacity':0},function(){_s_wrapper();_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();scrl=sc_setScroll(a_dur,sO.easing,conf);scrl.anims.push([$cfs,{'opacity':1},_onafter]);sc_startScroll(scrl,conf);}]);break;case'crossfade':$cfs.css({'opacity':0});scrl.anims.push([$cf2,{'opacity':0}]);scrl.anims.push([$cfs,{'opacity':1},_onafter]);_a_wrapper();_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();break;case'cover':scrl.anims.push([$cf2,a_cfs,function(){_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();_onafter();}]);_a_wrapper();break;case'cover-fade':scrl.anims.push([$cfs,{'opacity':0}]);scrl.anims.push([$cf2,a_cfs,function(){_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();_onafter();}]);_a_wrapper();break;case'uncover':scrl.anims.push([$cf2,a_wsz,_onafter]);_a_wrapper();_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();break;case'uncover-fade':$cfs.css({'opacity':0});scrl.anims.push([$cfs,{'opacity':1}]);scrl.anims.push([$cf2,a_wsz,_onafter]);_a_wrapper();_s_paddingold();_s_paddingnew();_s_paddingcur();_position();_moveitems();break;default:scrl.anims.push([$cfs,a_cfs,function(){_moveitems();_onafter();}]);_a_wrapper();_a_paddingold();_a_paddingnew();_a_paddingcur();break;}
  261. sc_startScroll(scrl,conf);cf_setCookie(opts.cookie,$cfs,conf);$cfs.trigger(cf_e('updatePageStatus',conf),[false,w_siz]);return true;});$cfs.bind(cf_e('slide_next',conf),function(e,sO,nI){e.stopPropagation();var a_itm=$cfs.children();if(!opts.circular)
  262. {if(itms.first==opts.items.visible)
  263. {if(opts.infinite)
  264. {$cfs.trigger(cf_e('prev',conf),itms.total-1);}
  265. return e.stopImmediatePropagation();}}
  266. sz_resetMargin(a_itm,opts);if(!is_number(nI))
  267. {if(opts.items.filter!='*')
  268. {var xI=(is_number(sO.items))?sO.items:gn_getVisibleOrg($cfs,opts);nI=gn_getScrollItemsNextFilter(a_itm,opts,0,xI);}
  269. else
  270. {nI=opts.items.visible;}
  271. nI=cf_getAdjust(nI,opts,sO.items,$tt0);}
  272. var lastItemNr=(itms.first==0)?itms.total:itms.first;if(!opts.circular)
  273. {if(opts.items.visibleConf.variable)
  274. {var vI=gn_getVisibleItemsNext(a_itm,opts,nI),xI=gn_getVisibleItemsPrev(a_itm,opts,lastItemNr-1);}
  275. else
  276. {var vI=opts.items.visible,xI=opts.items.visible;}
  277. if(nI+vI>lastItemNr)
  278. {nI=lastItemNr-xI;}}
  279. opts.items.visibleConf.old=opts.items.visible;if(opts.items.visibleConf.variable)
  280. {var vI=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm,opts,nI,lastItemNr),opts,opts.items.visibleConf.adjust,$tt0);while(opts.items.visible-nI>=vI&&nI<itms.total)
  281. {nI++;vI=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm,opts,nI,lastItemNr),opts,opts.items.visibleConf.adjust,$tt0);}
  282. opts.items.visible=vI;}
  283. else if(opts.items.filter!='*')
  284. {var vI=gn_getVisibleItemsNextFilter(a_itm,opts,nI);opts.items.visible=cf_getItemsAdjust(vI,opts,opts.items.visibleConf.adjust,$tt0);}
  285. sz_resetMargin(a_itm,opts,true);if(nI==0)
  286. {e.stopImmediatePropagation();return debug(conf,'0 items to scroll: Not scrolling.');}
  287. debug(conf,'Scrolling '+nI+' items forward.');itms.first-=nI;while(itms.first<0)
  288. {itms.first+=itms.total;}
  289. if(!opts.circular)
  290. {if(itms.first==opts.items.visible&&sO.onEnd)
  291. {sO.onEnd.call($tt0,'next');}
  292. if(!opts.infinite)
  293. {nv_enableNavi(opts,itms.first,conf);}}
  294. if(itms.total<opts.items.visible+nI)
  295. {$cfs.children().slice(0,(opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);}
  296. var a_itm=$cfs.children(),i_old=gi_getOldItemsNext(a_itm,opts),i_new=gi_getNewItemsNext(a_itm,opts,nI),i_cur_l=a_itm.eq(nI-1),i_old_l=i_old.last(),i_new_l=i_new.last();sz_resetMargin(a_itm,opts);var pL=0,pR=0;if(opts.align)
  297. {var p=cf_getAlignPadding(i_new,opts);pL=p[0];pR=p[1];}
  298. var hiddenitems=false,i_skp=$();if(opts.items.visibleConf.old<nI)
  299. {i_skp=a_itm.slice(opts.items.visibleConf.old,nI);if(sO.fx=='directscroll')
  300. {var orgW=opts.items[opts.d['width']];hiddenitems=i_skp;i_cur_l=i_old_l;sc_hideHiddenItems(hiddenitems);opts.items[opts.d['width']]='variable';}}
  301. var $cf2=false,i_siz=ms_getTotalSize(a_itm.slice(0,nI),opts,'width'),w_siz=cf_mapWrapperSizes(ms_getSizes(i_new,opts,true),opts,!opts.usePadding),i_siz_vis=0,a_cfs={},a_cfs_vis={},a_cur={},a_old={},a_lef={},a_dur=sc_getDuration(sO,opts,nI,i_siz);switch(sO.fx)
  302. {case'uncover':case'uncover-fade':i_siz_vis=ms_getTotalSize(a_itm.slice(0,opts.items.visibleConf.old),opts,'width');break;}
  303. if(hiddenitems)
  304. {opts.items[opts.d['width']]=orgW;}
  305. if(opts.align)
  306. {if(opts.padding[opts.d[1]]<0)
  307. {opts.padding[opts.d[1]]=0;}}
  308. sz_resetMargin(a_itm,opts,true);sz_resetMargin(i_old_l,opts,opts.padding[opts.d[1]]);if(opts.align)
  309. {opts.padding[opts.d[1]]=pR;opts.padding[opts.d[3]]=pL;}
  310. a_lef[opts.d['left']]=(opts.usePadding)?opts.padding[opts.d[3]]:0;var _s_wrapper=function(){},_a_wrapper=function(){},_s_paddingold=function(){},_a_paddingold=function(){},_s_paddingcur=function(){},_a_paddingcur=function(){},_onafter=function(){},_moveitems=function(){},_position=function(){};switch(sO.fx)
  311. {case'crossfade':case'cover':case'cover-fade':case'uncover':case'uncover-fade':$cf2=$cfs.clone(true).appendTo($wrp);$cf2.children().slice(opts.items.visibleConf.old).remove();break;}
  312. switch(sO.fx)
  313. {case'crossfade':case'cover':case'cover-fade':$cfs.css('zIndex',1);$cf2.css('zIndex',0);break;}
  314. scrl=sc_setScroll(a_dur,sO.easing,conf);a_cfs[opts.d['left']]=-i_siz;a_cfs_vis[opts.d['left']]=-i_siz_vis;if(pL<0)
  315. {a_cfs[opts.d['left']]+=pL;}
  316. if(opts[opts.d['width']]=='variable'||opts[opts.d['height']]=='variable')
  317. {_s_wrapper=function(){$wrp.css(w_siz);};_a_wrapper=function(){scrl.anims.push([$wrp,w_siz]);};}
  318. if(opts.usePadding)
  319. {var i_new_l_m=i_new_l.data('_cfs_origCssMargin');if(pR>=0)
  320. {i_new_l_m+=opts.padding[opts.d[1]];}
  321. i_new_l.css(opts.d['marginRight'],i_new_l_m);if(i_cur_l.not(i_old_l).length)
  322. {a_old[opts.d['marginRight']]=i_old_l.data('_cfs_origCssMargin');}
  323. _s_paddingold=function(){i_old_l.css(a_old);};_a_paddingold=function(){scrl.anims.push([i_old_l,a_old]);};var i_cur_l_m=i_cur_l.data('_cfs_origCssMargin');if(pL>0)
  324. {i_cur_l_m+=opts.padding[opts.d[3]];}
  325. a_cur[opts.d['marginRight']]=i_cur_l_m;_s_paddingcur=function(){i_cur_l.css(a_cur);};_a_paddingcur=function(){scrl.anims.push([i_cur_l,a_cur]);};}
  326. _position=function(){$cfs.css(a_lef);};var overFill=opts.items.visible+nI-itms.total;_moveitems=function(){if(overFill>0)
  327. {$cfs.children().slice(itms.total).remove();}
  328. var l_itm=$cfs.children().slice(0,nI).appendTo($cfs).last();if(overFill>0)
  329. {i_new=gi_getCurrentItems(a_itm,opts);}
  330. sc_showHiddenItems(hiddenitems);if(opts.usePadding)
  331. {if(itms.total<opts.items.visible+nI){var i_cur_l=$cfs.children().eq(opts.items.visible-1);i_cur_l.css(opts.d['marginRight'],i_cur_l.data('_cfs_origCssMargin')+opts.padding[opts.d[1]]);}
  332. l_itm.css(opts.d['marginRight'],l_itm.data('_cfs_origCssMargin'));}};var cb_arguments=sc_mapCallbackArguments(i_old,i_skp,i_new,nI,'next',a_dur,w_siz);_onafter=function(){$cfs.css('zIndex',$cfs.data('_cfs_origCssZindex'));sc_afterScroll($cfs,$cf2,sO);crsl.isScrolling=false;clbk.onAfter=sc_fireCallbacks($tt0,sO,'onAfter',cb_arguments,clbk);queu=sc_fireQueue($cfs,queu,conf);if(!crsl.isPaused)
  333. {$cfs.trigger(cf_e('play',conf));}};crsl.isScrolling=true;tmrs=sc_clearTimers(tmrs);clbk.onBefore=sc_fireCallbacks($tt0,sO,'onBefore',cb_arguments,clbk);switch(sO.fx)
  334. {case'none':$cfs.css(a_cfs);_s_wrapper();_s_paddingold();_s_paddingcur();_position();_moveitems();_onafter();break;case'fade':scrl.anims.push([$cfs,{'opacity':0},function(){_s_wrapper();_s_paddingold();_s_paddingcur();_position();_moveitems();scrl=sc_setScroll(a_dur,sO.easing,conf);scrl.anims.push([$cfs,{'opacity':1},_onafter]);sc_startScroll(scrl,conf);}]);break;case'crossfade':$cfs.css({'opacity':0});scrl.anims.push([$cf2,{'opacity':0}]);scrl.anims.push([$cfs,{'opacity':1},_onafter]);_a_wrapper();_s_paddingold();_s_paddingcur();_position();_moveitems();break;case'cover':$cfs.css(opts.d['left'],$wrp[opts.d['width']]());scrl.anims.push([$cfs,a_lef,_onafter]);_a_wrapper();_s_paddingold();_s_paddingcur();_moveitems();break;case'cover-fade':$cfs.css(opts.d['left'],$wrp[opts.d['width']]());scrl.anims.push([$cf2,{'opacity':0}]);scrl.anims.push([$cfs,a_lef,_onafter]);_a_wrapper();_s_paddingold();_s_paddingcur();_moveitems();break;case'uncover':scrl.anims.push([$cf2,a_cfs_vis,_onafter]);_a_wrapper();_s_paddingold();_s_paddingcur();_position();_moveitems();break;case'uncover-fade':$cfs.css({'opacity':0});scrl.anims.push([$cfs,{'opacity':1}]);scrl.anims.push([$cf2,a_cfs_vis,_onafter]);_a_wrapper();_s_paddingold();_s_paddingcur();_position();_moveitems();break;default:scrl.anims.push([$cfs,a_cfs,function(){_position();_moveitems();_onafter();}]);_a_wrapper();_a_paddingold();_a_paddingcur();break;}
  335. sc_startScroll(scrl,conf);cf_setCookie(opts.cookie,$cfs,conf);$cfs.trigger(cf_e('updatePageStatus',conf),[false,w_siz]);return true;});$cfs.bind(cf_e('slideTo',conf),function(e,num,dev,org,obj,dir,clb){e.stopPropagation();var v=[num,dev,org,obj,dir,clb],t=['string/number/object','number','boolean','object','string','function'],a=cf_sortParams(v,t);obj=a[3];dir=a[4];clb=a[5];num=gn_getItemIndex(a[0],a[1],a[2],itms,$cfs);if(num==0)
  336. {return false;}
  337. if(!is_object(obj))
  338. {obj=false;}
  339. if(dir!='prev'&&dir!='next')
  340. {if(opts.circular)
  341. {dir=(num<=itms.total/2)?'next':'prev';}
  342. else
  343. {dir=(itms.first==0||itms.first>num)?'next':'prev';}}
  344. if(dir=='prev')
  345. {num=itms.total-num;}
  346. $cfs.trigger(cf_e(dir,conf),[obj,num,clb]);return true;});$cfs.bind(cf_e('prevPage',conf),function(e,obj,clb){e.stopPropagation();var cur=$cfs.triggerHandler(cf_e('currentPage',conf));return $cfs.triggerHandler(cf_e('slideToPage',conf),[cur-1,obj,'prev',clb]);});$cfs.bind(cf_e('nextPage',conf),function(e,obj,clb){e.stopPropagation();var cur=$cfs.triggerHandler(cf_e('currentPage',conf));return $cfs.triggerHandler(cf_e('slideToPage',conf),[cur+1,obj,'next',clb]);});$cfs.bind(cf_e('slideToPage',conf),function(e,pag,obj,dir,clb){e.stopPropagation();if(!is_number(pag))
  347. {pag=$cfs.triggerHandler(cf_e('currentPage',conf));}
  348. var ipp=opts.pagination.items||opts.items.visible,max=Math.ceil(itms.total/ipp)-1;if(pag<0)
  349. {pag=max;}
  350. if(pag>max)
  351. {pag=0;}
  352. return $cfs.triggerHandler(cf_e('slideTo',conf),[pag*ipp,0,true,obj,dir,clb]);});$cfs.bind(cf_e('jumpToStart',conf),function(e,s){e.stopPropagation();if(s)
  353. {s=gn_getItemIndex(s,0,true,itms,$cfs);}
  354. else
  355. {s=0;}
  356. s+=itms.first;if(s!=0)
  357. {if(itms.total>0)
  358. {while(s>itms.total)
  359. {s-=itms.total;}}
  360. $cfs.prepend($cfs.children().slice(s,itms.total));}
  361. return true;});$cfs.bind(cf_e('synchronise',conf),function(e,s){e.stopPropagation();if(s)
  362. {s=cf_getSynchArr(s);}
  363. else if(opts.synchronise)
  364. {s=opts.synchronise;}
  365. else
  366. {return debug(conf,'No carousel to synchronise.');}
  367. var n=$cfs.triggerHandler(cf_e('currentPosition',conf)),x=true;for(var j=0,l=s.length;j<l;j++)
  368. {if(!s[j][0].triggerHandler(cf_e('slideTo',conf),[n,s[j][3],true]))
  369. {x=false;}}
  370. return x;});$cfs.bind(cf_e('queue',conf),function(e,dir,opt){e.stopPropagation();if(is_function(dir))
  371. {dir.call($tt0,queu);}
  372. else if(is_array(dir))
  373. {queu=dir;}
  374. else if(!is_undefined(dir))
  375. {queu.push([dir,opt]);}
  376. return queu;});$cfs.bind(cf_e('insertItem',conf),function(e,itm,num,org,dev){e.stopPropagation();var v=[itm,num,org,dev],t=['string/object','string/number/object','boolean','number'],a=cf_sortParams(v,t);itm=a[0];num=a[1];org=a[2];dev=a[3];if(is_object(itm)&&!is_jquery(itm))
  377. {itm=$(itm);}
  378. else if(is_string(itm))
  379. {itm=$(itm);}
  380. if(!is_jquery(itm)||itm.length==0)
  381. {return debug(conf,'Not a valid object.');}
  382. if(is_undefined(num))
  383. {num='end';}
  384. sz_storeMargin(itm,opts);sz_storeOrigCss(itm);var orgNum=num,before='before';if(num=='end')
  385. {if(org)
  386. {if(itms.first==0)
  387. {num=itms.total-1;before='after';}
  388. else
  389. {num=itms.first;itms.first+=itm.length;}
  390. if(num<0)
  391. {num=0;}}
  392. else
  393. {num=itms.total-1;before='after';}}
  394. else
  395. {num=gn_getItemIndex(num,dev,org,itms,$cfs);}
  396. var $cit=$cfs.children().eq(num);if($cit.length)
  397. {$cit[before](itm);}
  398. else
  399. {debug(conf,'Correct insert-position not found! Appending item to the end.');$cfs.append(itm);}
  400. if(orgNum!='end'&&!org)
  401. {if(num<itms.first)
  402. {itms.first+=itm.length;}}
  403. itms.total=$cfs.children().length;if(itms.first>=itms.total)
  404. {itms.first-=itms.total;}
  405. $cfs.trigger(cf_e('updateSizes',conf));$cfs.trigger(cf_e('linkAnchors',conf));return true;});$cfs.bind(cf_e('removeItem',conf),function(e,num,org,dev){e.stopPropagation();var v=[num,org,dev],t=['string/number/object','boolean','number'],a=cf_sortParams(v,t);num=a[0];org=a[1];dev=a[2];var removed=false;if(num instanceof $&&num.length>1)
  406. {$removed=$();num.each(function(i,el){var $rem=$cfs.trigger(cf_e('removeItem',conf),[$(this),org,dev]);if($rem)
  407. {$removed=$removed.add($rem);}});return $removed;}
  408. if(is_undefined(num)||num=='end')
  409. {$removed=$cfs.children().last();}
  410. else
  411. {num=gn_getItemIndex(num,dev,org,itms,$cfs);var $removed=$cfs.children().eq(num);if($removed.length)
  412. {if(num<itms.first)
  413. {itms.first-=$removed.length;}}}
  414. if($removed&&$removed.length)
  415. {$removed.detach();itms.total=$cfs.children().length;$cfs.trigger(cf_e('updateSizes',conf));}
  416. return $removed;});$cfs.bind(cf_e('onBefore',conf)+' '+cf_e('onAfter',conf),function(e,fn){e.stopPropagation();var eType=e.type.slice(conf.events.prefix.length);if(is_array(fn))
  417. {clbk[eType]=fn;}
  418. if(is_function(fn))
  419. {clbk[eType].push(fn);}
  420. return clbk[eType];});$cfs.bind(cf_e('currentPosition',conf),function(e,fn){e.stopPropagation();if(itms.first==0)
  421. {var val=0;}
  422. else
  423. {var val=itms.total-itms.first;}
  424. if(is_function(fn))
  425. {fn.call($tt0,val);}
  426. return val;});$cfs.bind(cf_e('currentPage',conf),function(e,fn){e.stopPropagation();var ipp=opts.pagination.items||opts.items.visible,max=Math.ceil(itms.total/ipp-1),nr;if(itms.first==0)
  427. {nr=0;}
  428. else if(itms.first<itms.total%ipp)
  429. {nr=0;}
  430. else if(itms.first==ipp&&!opts.circular)
  431. {nr=max;}
  432. else
  433. {nr=Math.round((itms.total-itms.first)/ipp);}
  434. if(nr<0)
  435. {nr=0;}
  436. if(nr>max)
  437. {nr=max;}
  438. if(is_function(fn))
  439. {fn.call($tt0,nr);}
  440. return nr;});$cfs.bind(cf_e('currentVisible',conf),function(e,fn){e.stopPropagation();var $i=gi_getCurrentItems($cfs.children(),opts);if(is_function(fn))
  441. {fn.call($tt0,$i);}
  442. return $i;});$cfs.bind(cf_e('slice',conf),function(e,f,l,fn){e.stopPropagation();if(itms.total==0)
  443. {return false;}
  444. var v=[f,l,fn],t=['number','number','function'],a=cf_sortParams(v,t);f=(is_number(a[0]))?a[0]:0;l=(is_number(a[1]))?a[1]:itms.total;fn=a[2];f+=itms.first;l+=itms.first;if(items.total>0)
  445. {while(f>itms.total)
  446. {f-=itms.total;}
  447. while(l>itms.total)
  448. {l-=itms.total;}
  449. while(f<0)
  450. {f+=itms.total;}
  451. while(l<0)
  452. {l+=itms.total;}}
  453. var $iA=$cfs.children(),$i;if(l>f)
  454. {$i=$iA.slice(f,l);}
  455. else
  456. {$i=$($iA.slice(f,itms.total).get().concat($iA.slice(0,l).get()));}
  457. if(is_function(fn))
  458. {fn.call($tt0,$i);}
  459. return $i;});$cfs.bind(cf_e('isPaused',conf)+' '+cf_e('isStopped',conf)+' '+cf_e('isScrolling',conf),function(e,fn){e.stopPropagation();var eType=e.type.slice(conf.events.prefix.length),value=crsl[eType];if(is_function(fn))
  460. {fn.call($tt0,value);}
  461. return value;});$cfs.bind(cf_e('configuration',conf),function(e,a,b,c){e.stopPropagation();var reInit=false;if(is_function(a))
  462. {a.call($tt0,opts);}
  463. else if(is_object(a))
  464. {opts_orig=$.extend(true,{},opts_orig,a);if(b!==false)reInit=true;else opts=$.extend(true,{},opts,a);}
  465. else if(!is_undefined(a))
  466. {if(is_function(b))
  467. {var val=eval('opts.'+a);if(is_undefined(val))
  468. {val='';}
  469. b.call($tt0,val);}
  470. else if(!is_undefined(b))
  471. {if(typeof c!=='boolean')c=true;eval('opts_orig.'+a+' = b');if(c!==false)reInit=true;else eval('opts.'+a+' = b');}
  472. else
  473. {return eval('opts.'+a);}}
  474. if(reInit)
  475. {sz_resetMargin($cfs.children(),opts);FN._init(opts_orig);FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e('updatePageStatus',conf),[true,sz]);}
  476. return opts;});$cfs.bind(cf_e('linkAnchors',conf),function(e,$con,sel){e.stopPropagation();if(is_undefined($con))
  477. {$con=$('body');}
  478. else if(is_string($con))
  479. {$con=$($con);}
  480. if(!is_jquery($con)||$con.length==0)
  481. {return debug(conf,'Not a valid object.');}
  482. if(!is_string(sel))
  483. {sel='a.caroufredsel';}
  484. $con.find(sel).each(function(){var h=this.hash||'';if(h.length>0&&$cfs.children().index($(h))!=-1)
  485. {$(this).unbind('click').click(function(e){e.preventDefault();$cfs.trigger(cf_e('slideTo',conf),h);});}});return true;});$cfs.bind(cf_e('updatePageStatus',conf),function(e,build,sizes){e.stopPropagation();if(!opts.pagination.container)
  486. {return;}
  487. var ipp=opts.pagination.items||opts.items.visible,pgs=Math.ceil(itms.total/ipp);if(build)
  488. {if(opts.pagination.anchorBuilder)
  489. {opts.pagination.container.children().remove();opts.pagination.container.each(function(){for(var a=0;a<pgs;a++)
  490. {var i=$cfs.children().eq(gn_getItemIndex(a*ipp,0,true,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(i[0],a+1));}});}
  491. opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(a){$(this).bind(opts.pagination.event,function(e){e.preventDefault();$cfs.trigger(cf_e('slideTo',conf),[a*ipp,-opts.pagination.deviation,true,opts.pagination]);});});});}
  492. var selected=$cfs.triggerHandler(cf_e('currentPage',conf))+opts.pagination.deviation;if(selected>=pgs)
  493. {selected=0;}
  494. if(selected<0)
  495. {selected=pgs-1;}
  496. opts.pagination.container.each(function(){$(this).children().removeClass(cf_c('selected',conf)).eq(selected).addClass(cf_c('selected',conf));});return true;});$cfs.bind(cf_e('updateSizes',conf),function(e){var vI=opts.items.visible,a_itm=$cfs.children(),avail_primary=ms_getParentSize($wrp,opts,'width');itms.total=a_itm.length;if(crsl.primarySizePercentage)
  497. {opts.maxDimension=avail_primary;opts[opts.d['width']]=ms_getPercentage(avail_primary,crsl.primarySizePercentage);}
  498. else
  499. {opts.maxDimension=ms_getMaxDimension(opts,avail_primary);}
  500. if(opts.responsive)
  501. {opts.items.width=opts.items.sizesConf.width;opts.items.height=opts.items.sizesConf.height;opts=in_getResponsiveValues(opts,a_itm,avail_primary);vI=opts.items.visible;sz_setResponsiveSizes(opts,a_itm);}
  502. else if(opts.items.visibleConf.variable)
  503. {vI=gn_getVisibleItemsNext(a_itm,opts,0);}
  504. else if(opts.items.filter!='*')
  505. {vI=gn_getVisibleItemsNextFilter(a_itm,opts,0);}
  506. if(!opts.circular&&itms.first!=0&&vI>itms.first){if(opts.items.visibleConf.variable)
  507. {var nI=gn_getVisibleItemsPrev(a_itm,opts,itms.first)-itms.first;}
  508. else if(opts.items.filter!='*')
  509. {var nI=gn_getVisibleItemsPrevFilter(a_itm,opts,itms.first)-itms.first;}
  510. else
  511. {var nI=opts.items.visible-itms.first;}
  512. debug(conf,'Preventing non-circular: sliding '+nI+' items backward.');$cfs.trigger(cf_e('prev',conf),nI);}
  513. opts.items.visible=cf_getItemsAdjust(vI,opts,opts.items.visibleConf.adjust,$tt0);opts.items.visibleConf.old=opts.items.visible;opts=in_getAlignPadding(opts,a_itm);var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e('updatePageStatus',conf),[true,sz]);nv_showNavi(opts,itms.total,conf);nv_enableNavi(opts,itms.first,conf);return sz;});$cfs.bind(cf_e('destroy',conf),function(e,orgOrder){e.stopPropagation();tmrs=sc_clearTimers(tmrs);$cfs.data('_cfs_isCarousel',false);$cfs.trigger(cf_e('finish',conf));if(orgOrder)
  514. {$cfs.trigger(cf_e('jumpToStart',conf));}
  515. sz_restoreOrigCss($cfs.children());sz_restoreOrigCss($cfs);FN._unbind_events();FN._unbind_buttons();if(conf.wrapper=='parent')
  516. {sz_restoreOrigCss($wrp);}
  517. else
  518. {$wrp.replaceWith($cfs);}
  519. return true;});$cfs.bind(cf_e('debug',conf),function(e){debug(conf,'Carousel width: '+opts.width);debug(conf,'Carousel height: '+opts.height);debug(conf,'Item widths: '+opts.items.width);debug(conf,'Item heights: '+opts.items.height);debug(conf,'Number of items visible: '+opts.items.visible);if(opts.auto.play)
  520. {debug(conf,'Number of items scrolled automatically: '+opts.auto.items);}
  521. if(opts.prev.button)
  522. {debug(conf,'Number of items scrolled backward: '+opts.prev.items);}
  523. if(opts.next.button)
  524. {debug(conf,'Number of items scrolled forward: '+opts.next.items);}
  525. return conf.debug;});$cfs.bind('_cfs_triggerEvent',function(e,n,o){e.stopPropagation();return $cfs.triggerHandler(cf_e(n,conf),o);});};FN._unbind_events=function(){$cfs.unbind(cf_e('',conf));$cfs.unbind(cf_e('',conf,false));$cfs.unbind('_cfs_triggerEvent');};FN._bind_buttons=function(){FN._unbind_buttons();nv_showNavi(opts,itms.total,conf);nv_enableNavi(opts,itms.first,conf);if(opts.auto.pauseOnHover)
  526. {var pC=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e('mouseenter',conf,false),function(){$cfs.trigger(cf_e('pause',conf),pC);}).bind(cf_e('mouseleave',conf,false),function(){$cfs.trigger(cf_e('resume',conf));});}
  527. if(opts.auto.button)
  528. {opts.auto.button.bind(cf_e(opts.auto.event,conf,false),function(e){e.preventDefault();var ev=false,pC=null;if(crsl.isPaused)
  529. {ev='play';}
  530. else if(opts.auto.pauseOnEvent)
  531. {ev='pause';pC=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);}
  532. if(ev)
  533. {$cfs.trigger(cf_e(ev,conf),pC);}});}
  534. if(opts.prev.button)
  535. {opts.prev.button.bind(cf_e(opts.prev.event,conf,false),function(e){e.preventDefault();$cfs.trigger(cf_e('prev',conf));});if(opts.prev.pauseOnHover)
  536. {var pC=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e('mouseenter',conf,false),function(){$cfs.trigger(cf_e('pause',conf),pC);}).bind(cf_e('mouseleave',conf,false),function(){$cfs.trigger(cf_e('resume',conf));});}}
  537. if(opts.next.button)
  538. {opts.next.button.bind(cf_e(opts.next.event,conf,false),function(e){e.preventDefault();$cfs.trigger(cf_e('next',conf));});if(opts.next.pauseOnHover)
  539. {var pC=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e('mouseenter',conf,false),function(){$cfs.trigger(cf_e('pause',conf),pC);}).bind(cf_e('mouseleave',conf,false),function(){$cfs.trigger(cf_e('resume',conf));});}}
  540. if(opts.pagination.container)
  541. {if(opts.pagination.pauseOnHover)
  542. {var pC=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e('mouseenter',conf,false),function(){$cfs.trigger(cf_e('pause',conf),pC);}).bind(cf_e('mouseleave',conf,false),function(){$cfs.trigger(cf_e('resume',conf));});}}
  543. if(opts.prev.key||opts.next.key)
  544. {$(document).bind(cf_e('keyup',conf,false,true,true),function(e){var k=e.keyCode;if(k==opts.next.key)
  545. {e.preventDefault();$cfs.trigger(cf_e('next',conf));}
  546. if(k==opts.prev.key)
  547. {e.preventDefault();$cfs.trigger(cf_e('prev',conf));}});}
  548. if(opts.pagination.keys)
  549. {$(document).bind(cf_e('keyup',conf,false,true,true),function(e){var k=e.keyCode;if(k>=49&&k<58)
  550. {k=(k-49)*opts.items.visible;if(k<=itms.total)
  551. {e.preventDefault();$cfs.trigger(cf_e('slideTo',conf),[k,0,true,opts.pagination]);}}});}
  552. if($.fn.swipe)
  553. {var isTouch='ontouchstart'in window;if((isTouch&&opts.swipe.onTouch)||(!isTouch&&opts.swipe.onMouse))
  554. {var scP=$.extend(true,{},opts.prev,opts.swipe),scN=$.extend(true,{},opts.next,opts.swipe),swP=function(){$cfs.trigger(cf_e('prev',conf),[scP])},swN=function(){$cfs.trigger(cf_e('next',conf),[scN])};switch(opts.direction)
  555. {case'up':case'down':opts.swipe.options.swipeUp=swN;opts.swipe.options.swipeDown=swP;break;default:opts.swipe.options.swipeLeft=swN;opts.swipe.options.swipeRight=swP;}
  556. if(crsl.swipe)
  557. {$cfs.swipe('destroy');}
  558. $wrp.swipe(opts.swipe.options);$wrp.css('cursor','move');crsl.swipe=true;}}
  559. if($.fn.mousewheel)
  560. {if(opts.mousewheel)
  561. {var mcP=$.extend(true,{},opts.prev,opts.mousewheel),mcN=$.extend(true,{},opts.next,opts.mousewheel);if(crsl.mousewheel)
  562. {$wrp.unbind(cf_e('mousewheel',conf,false));}
  563. $wrp.bind(cf_e('mousewheel',conf,false),function(e,delta){e.preventDefault();if(delta>0)
  564. {$cfs.trigger(cf_e('prev',conf),[mcP]);}
  565. else
  566. {$cfs.trigger(cf_e('next',conf),[mcN]);}});crsl.mousewheel=true;}}
  567. if(opts.auto.play)
  568. {$cfs.trigger(cf_e('play',conf),opts.auto.delay);}
  569. if(crsl.upDateOnWindowResize)
  570. {var resizeFn=function(e){$cfs.trigger(cf_e('finish',conf));if(opts.auto.pauseOnResize&&!crsl.isPaused)
  571. {$cfs.trigger(cf_e('play',conf));}
  572. sz_resetMargin($cfs.children(),opts);$cfs.trigger(cf_e('updateSizes',conf));};var $w=$(window),onResize=null;if($.debounce&&conf.onWindowResize=='debounce')
  573. {onResize=$.debounce(200,resizeFn);}
  574. else if($.throttle&&conf.onWindowResize=='throttle')
  575. {onResize=$.throttle(300,resizeFn);}
  576. else
  577. {var _windowWidth=0,_windowHeight=0;onResize=function(){var nw=$w.width(),nh=$w.height();if(nw!=_windowWidth||nh!=_windowHeight)
  578. {resizeFn();_windowWidth=nw;_windowHeight=nh;}};}
  579. $w.bind(cf_e('resize',conf,false,true,true),onResize);}};FN._unbind_buttons=function(){var ns1=cf_e('',conf),ns2=cf_e('',conf,false);ns3=cf_e('',conf,false,true,true);$(document).unbind(ns3);$(window).unbind(ns3);$wrp.unbind(ns2);if(opts.auto.button)
  580. {opts.auto.button.unbind(ns2);}
  581. if(opts.prev.button)
  582. {opts.prev.button.unbind(ns2);}
  583. if(opts.next.button)
  584. {opts.next.button.unbind(ns2);}
  585. if(opts.pagination.container)
  586. {opts.pagination.container.unbind(ns2);if(opts.pagination.anchorBuilder)
  587. {opts.pagination.container.children().remove();}}
  588. if(crsl.swipe)
  589. {$cfs.swipe('destroy');$wrp.css('cursor','default');crsl.swipe=false;}
  590. if(crsl.mousewheel)
  591. {crsl.mousewheel=false;}
  592. nv_showNavi(opts,'hide',conf);nv_enableNavi(opts,'removeClass',conf);};if(is_boolean(configs))
  593. {configs={'debug':configs};}
  594. var crsl={'direction':'next','isPaused':true,'isScrolling':false,'isStopped':false,'mousewheel':false,'swipe':false},itms={'total':$cfs.children().length,'first':0},tmrs={'auto':null,'progress':null,'startTime':getTime(),'timePassed':0},scrl={'isStopped':false,'duration':0,'startTime':0,'easing':'','anims':[]},clbk={'onBefore':[],'onAfter':[]},queu=[],conf=$.extend(true,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(true,{},options),$wrp=(conf.wrapper=='parent')?$cfs.parent():$cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();conf.selector=$cfs.selector;conf.serialNumber=$.fn.carouFredSel.serialNumber++;conf.transition=(conf.transition&&$.fn.transition)?'transition':'animate';FN._init(opts_orig,true,starting_position);FN._build();FN._bind_events();FN._bind_buttons();if(is_array(opts.items.start))
  595. {var start_arr=opts.items.start;}
  596. else
  597. {var start_arr=[];if(opts.items.start!=0)
  598. {start_arr.push(opts.items.start);}}
  599. if(opts.cookie)
  600. {start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10));}
  601. if(start_arr.length>0)
  602. {for(var a=0,l=start_arr.length;a<l;a++)
  603. {var s=start_arr[a];if(s==0)
  604. {continue;}
  605. if(s===true)
  606. {s=window.location.hash;if(s.length<1)
  607. {continue;}}
  608. else if(s==='random')
  609. {s=Math.floor(Math.random()*itms.total);}
  610. if($cfs.triggerHandler(cf_e('slideTo',conf),[s,0,true,{fx:'none'}]))
  611. {break;}}}
  612. var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);if(opts.onCreate)
  613. {opts.onCreate.call($tt0,{'width':siz.width,'height':siz.height,'items':itm});}
  614. $cfs.trigger(cf_e('updatePageStatus',conf),[true,siz]);$cfs.trigger(cf_e('linkAnchors',conf));if(conf.debug)
  615. {$cfs.trigger(cf_e('debug',conf));}
  616. return $cfs;};$.fn.carouFredSel.serialNumber=1;$.fn.carouFredSel.defaults={'synchronise':false,'infinite':true,'circular':true,'responsive':false,'direction':'left','items':{'start':0},'scroll':{'easing':'swing','duration':500,'pauseOnHover':false,'event':'click','queue':false}};$.fn.carouFredSel.configs={'debug':false,'transition':false,'onWindowResize':'throttle','events':{'prefix':'','namespace':'cfs'},'wrapper':{'element':'div','classname':'caroufredsel_wrapper'},'classnames':{}};$.fn.carouFredSel.pageAnchorBuilder=function(nr){return'<a href="#"><span>'+nr+'</span></a>';};$.fn.carouFredSel.progressbarUpdater=function(perc){$(this).css('width',perc+'%');};$.fn.carouFredSel.cookie={get:function(n){n+='=';var ca=document.cookie.split(';');for(var a=0,l=ca.length;a<l;a++)
  617. {var c=ca[a];while(c.charAt(0)==' ')
  618. {c=c.slice(1);}
  619. if(c.indexOf(n)==0)
  620. {return c.slice(n.length);}}
  621. return 0;},set:function(n,v,d){var e="";if(d)
  622. {var date=new Date();date.setTime(date.getTime()+(d*24*60*60*1000));e="; expires="+date.toGMTString();}
  623. document.cookie=n+'='+v+e+'; path=/';},remove:function(n){$.fn.carouFredSel.cookie.set(n,"",-1);}};function sc_setScroll(d,e,c){if(c.transition=='transition')
  624. {if(e=='swing')
  625. {e='ease';}}
  626. return{anims:[],duration:d,orgDuration:d,easing:e,startTime:getTime()};}
  627. function sc_startScroll(s,c){for(var a=0,l=s.anims.length;a<l;a++)
  628. {var b=s.anims[a];if(!b)
  629. {continue;}
  630. b[0][c.transition](b[1],s.duration,s.easing,b[2]);}}
  631. function sc_stopScroll(s,finish){if(!is_boolean(finish))
  632. {finish=true;}
  633. if(is_object(s.pre))
  634. {sc_stopScroll(s.pre,finish);}
  635. for(var a=0,l=s.anims.length;a<l;a++)
  636. {var b=s.anims[a];b[0].stop(true);if(finish)
  637. {b[0].css(b[1]);if(is_function(b[2]))
  638. {b[2]();}}}
  639. if(is_object(s.post))
  640. {sc_stopScroll(s.post,finish);}}
  641. function sc_afterScroll($c,$c2,o){if($c2)
  642. {$c2.remove();}
  643. switch(o.fx){case'fade':case'crossfade':case'cover-fade':case'uncover-fade':$c.css('opacity',1);$c.css('filter','');break;}}
  644. function sc_fireCallbacks($t,o,b,a,c){if(o[b])
  645. {o[b].call($t,a);}
  646. if(c[b].length)
  647. {for(var i=0,l=c[b].length;i<l;i++)
  648. {c[b][i].call($t,a);}}
  649. return[];}
  650. function sc_fireQueue($c,q,c){if(q.length)
  651. {$c.trigger(cf_e(q[0][0],c),q[0][1]);q.shift();}
  652. return q;}
  653. function sc_hideHiddenItems(hiddenitems){hiddenitems.each(function(){var hi=$(this);hi.data('_cfs_isHidden',hi.is(':hidden')).hide();});}
  654. function sc_showHiddenItems(hiddenitems){if(hiddenitems)
  655. {hiddenitems.each(function(){var hi=$(this);if(!hi.data('_cfs_isHidden'))
  656. {hi.show();}});}}
  657. function sc_clearTimers(t){if(t.auto)
  658. {clearTimeout(t.auto);}
  659. if(t.progress)
  660. {clearInterval(t.progress);}
  661. return t;}
  662. function sc_mapCallbackArguments(i_old,i_skp,i_new,s_itm,s_dir,s_dur,w_siz){return{'width':w_siz.width,'height':w_siz.height,'items':{'old':i_old,'skipped':i_skp,'visible':i_new},'scroll':{'items':s_itm,'direction':s_dir,'duration':s_dur}};}
  663. function sc_getDuration(sO,o,nI,siz){var dur=sO.duration;if(sO.fx=='none')
  664. {return 0;}
  665. if(dur=='auto')
  666. {dur=o.scroll.duration/o.scroll.items*nI;}
  667. else if(dur<10)
  668. {dur=siz/dur;}
  669. if(dur<1)
  670. {return 0;}
  671. if(sO.fx=='fade')
  672. {dur=dur/2;}
  673. return Math.round(dur);}
  674. function nv_showNavi(o,t,c){var minimum=(is_number(o.items.minimum))?o.items.minimum:o.items.visible+1;if(t=='show'||t=='hide')
  675. {var f=t;}
  676. else if(minimum>t)
  677. {debug(c,'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.');var f='hide';}
  678. else
  679. {var f='show';}
  680. var s=(f=='show')?'removeClass':'addClass',h=cf_c('hidden',c);if(o.auto.button)
  681. {o.auto.button[f]()[s](h);}
  682. if(o.prev.button)
  683. {o.prev.button[f]()[s](h);}
  684. if(o.next.button)
  685. {o.next.button[f]()[s](h);}
  686. if(o.pagination.container)
  687. {o.pagination.container[f]()[s](h);}}
  688. function nv_enableNavi(o,f,c){if(o.circular||o.infinite)return;var fx=(f=='removeClass'||f=='addClass')?f:false,di=cf_c('disabled',c);if(o.auto.button&&fx)
  689. {o.auto.button[fx](di);}
  690. if(o.prev.button)
  691. {var fn=fx||(f==0)?'addClass':'removeClass';o.prev.button[fn](di);}
  692. if(o.next.button)
  693. {var fn=fx||(f==o.items.visible)?'addClass':'removeClass';o.next.button[fn](di);}}
  694. function go_getObject($tt,obj){if(is_function(obj))
  695. {obj=obj.call($tt);}
  696. else if(is_undefined(obj))
  697. {obj={};}
  698. return obj;}
  699. function go_getItemsObject($tt,obj){obj=go_getObject($tt,obj);if(is_number(obj))
  700. {obj={'visible':obj};}
  701. else if(obj=='variable')
  702. {obj={'visible':obj,'width':obj,'height':obj};}
  703. else if(!is_object(obj))
  704. {obj={};}
  705. return obj;}
  706. function go_getScrollObject($tt,obj){obj=go_getObject($tt,obj);if(is_number(obj))
  707. {if(obj<=50)
  708. {obj={'items':obj};}
  709. else
  710. {obj={'duration':obj};}}
  711. else if(is_string(obj))
  712. {obj={'easing':obj};}
  713. else if(!is_object(obj))
  714. {obj={};}
  715. return obj;}
  716. function go_getNaviObject($tt,obj){obj=go_getObject($tt,obj);if(is_string(obj))
  717. {var temp=cf_getKeyCode(obj);if(temp==-1)
  718. {obj=$(obj);}
  719. else
  720. {obj=temp;}}
  721. return obj;}
  722. function go_getAutoObject($tt,obj){obj=go_getNaviObject($tt,obj);if(is_jquery(obj))
  723. {obj={'button':obj};}
  724. else if(is_boolean(obj))
  725. {obj={'play':obj};}
  726. else if(is_number(obj))
  727. {obj={'timeoutDuration':obj};}
  728. if(obj.progress)
  729. {if(is_string(obj.progress)||is_jquery(obj.progress))
  730. {obj.progress={'bar':obj.progress};}}
  731. return obj;}
  732. function go_complementAutoObject($tt,obj){if(is_function(obj.button))
  733. {obj.button=obj.button.call($tt);}
  734. if(is_string(obj.button))
  735. {obj.button=$(obj.button);}
  736. if(!is_boolean(obj.play))
  737. {obj.play=true;}
  738. if(!is_number(obj.delay))
  739. {obj.delay=0;}
  740. if(is_undefined(obj.pauseOnEvent))
  741. {obj.pauseOnEvent=true;}
  742. if(!is_boolean(obj.pauseOnResize))
  743. {obj.pauseOnResize=true;}
  744. if(!is_number(obj.timeoutDuration))
  745. {obj.timeoutDuration=(obj.duration<10)?2500:obj.duration*5;}
  746. if(obj.progress)
  747. {if(is_function(obj.progress.bar))
  748. {obj.progress.bar=obj.progress.bar.call($tt);}
  749. if(is_string(obj.progress.bar))
  750. {obj.progress.bar=$(obj.progress.bar);}
  751. if(obj.progress.bar)
  752. {if(!is_function(obj.progress.updater))
  753. {obj.progress.updater=$.fn.carouFredSel.progressbarUpdater;}
  754. if(!is_number(obj.progress.interval))
  755. {obj.progress.interval=50;}}
  756. else
  757. {obj.progress=false;}}
  758. return obj;}
  759. function go_getPrevNextObject($tt,obj){obj=go_getNaviObject($tt,obj);if(is_jquery(obj))
  760. {obj={'button':obj};}
  761. else if(is_number(obj))
  762. {obj={'key':obj};}
  763. return obj;}
  764. function go_complementPrevNextObject($tt,obj){if(is_function(obj.button))
  765. {obj.button=obj.button.call($tt);}
  766. if(is_string(obj.button))
  767. {obj.button=$(obj.button);}
  768. if(is_string(obj.key))
  769. {obj.key=cf_getKeyCode(obj.key);}
  770. return obj;}
  771. function go_getPaginationObject($tt,obj){obj=go_getNaviObject($tt,obj);if(is_jquery(obj))
  772. {obj={'container':obj};}
  773. else if(is_boolean(obj))
  774. {obj={'keys':obj};}
  775. return obj;}
  776. function go_complementPaginationObject($tt,obj){if(is_function(obj.container))
  777. {obj.container=obj.container.call($tt);}
  778. if(is_string(obj.container))
  779. {obj.container=$(obj.container);}
  780. if(!is_number(obj.items))
  781. {obj.items=false;}
  782. if(!is_boolean(obj.keys))
  783. {obj.keys=false;}
  784. if(!is_function(obj.anchorBuilder)&&!is_false(obj.anchorBuilder))
  785. {obj.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder;}
  786. if(!is_number(obj.deviation))
  787. {obj.deviation=0;}
  788. return obj;}
  789. function go_getSwipeObject($tt,obj){if(is_function(obj))
  790. {obj=obj.call($tt);}
  791. if(is_undefined(obj))
  792. {obj={'onTouch':false};}
  793. if(is_true(obj))
  794. {obj={'onTouch':obj};}
  795. else if(is_number(obj))
  796. {obj={'items':obj};}
  797. return obj;}
  798. function go_complementSwipeObject($tt,obj){if(!is_boolean(obj.onTouch))
  799. {obj.onTouch=true;}
  800. if(!is_boolean(obj.onMouse))
  801. {obj.onMouse=false;}
  802. if(!is_object(obj.options))
  803. {obj.options={};}
  804. if(!is_boolean(obj.options.triggerOnTouchEnd))
  805. {obj.options.triggerOnTouchEnd=false;}
  806. return obj;}
  807. function go_getMousewheelObject($tt,obj){if(is_function(obj))
  808. {obj=obj.call($tt);}
  809. if(is_true(obj))
  810. {obj={};}
  811. else if(is_number(obj))
  812. {obj={'items':obj};}
  813. else if(is_undefined(obj))
  814. {obj=false;}
  815. return obj;}
  816. function go_complementMousewheelObject($tt,obj){return obj;}
  817. function gn_getItemIndex(num,dev,org,items,$cfs){if(is_string(num))
  818. {num=$(num,$cfs);}
  819. if(is_object(num))
  820. {num=$(num,$cfs);}
  821. if(is_jquery(num))
  822. {num=$cfs.children().index(num);if(!is_boolean(org))
  823. {org=false;}}
  824. else
  825. {if(!is_boolean(org))
  826. {org=true;}}
  827. if(!is_number(num))
  828. {num=0;}
  829. if(!is_number(dev))
  830. {dev=0;}
  831. if(org)
  832. {num+=items.first;}
  833. num+=dev;if(items.total>0)
  834. {while(num>=items.total)
  835. {num-=items.total;}
  836. while(num<0)
  837. {num+=items.total;}}
  838. return num;}
  839. function gn_getVisibleItemsPrev(i,o,s){var t=0,x=0;for(var a=s;a>=0;a--)
  840. {var j=i.eq(a);t+=(j.is(':visible'))?j[o.d['outerWidth']](true):0;if(t>o.maxDimension)
  841. {return x;}
  842. if(a==0)
  843. {a=i.length;}
  844. x++;}}
  845. function gn_getVisibleItemsPrevFilter(i,o,s){return gn_getItemsPrevFilter(i,o.items.filter,o.items.visibleConf.org,s);}
  846. function gn_getScrollItemsPrevFilter(i,o,s,m){return gn_getItemsPrevFilter(i,o.items.filter,m,s);}
  847. function gn_getItemsPrevFilter(i,f,m,s){var t=0,x=0;for(var a=s,l=i.length;a>=0;a--)
  848. {x++;if(x==l)
  849. {return x;}
  850. var j=i.eq(a);if(j.is(f))
  851. {t++;if(t==m)
  852. {return x;}}
  853. if(a==0)
  854. {a=l;}}}
  855. function gn_getVisibleOrg($c,o){return o.items.visibleConf.org||$c.children().slice(0,o.items.visible).filter(o.items.filter).length;}
  856. function gn_getVisibleItemsNext(i,o,s){var t=0,x=0;for(var a=s,l=i.length-1;a<=l;a++)
  857. {var j=i.eq(a);t+=(j.is(':visible'))?j[o.d['outerWidth']](true):0;if(t>o.maxDimension)
  858. {return x;}
  859. x++;if(x==l+1)
  860. {return x;}
  861. if(a==l)
  862. {a=-1;}}}
  863. function gn_getVisibleItemsNextTestCircular(i,o,s,l){var v=gn_getVisibleItemsNext(i,o,s);if(!o.circular)
  864. {if(s+v>l)
  865. {v=l-s;}}
  866. return v;}
  867. function gn_getVisibleItemsNextFilter(i,o,s){return gn_getItemsNextFilter(i,o.items.filter,o.items.visibleConf.org,s,o.circular);}
  868. function gn_getScrollItemsNextFilter(i,o,s,m){return gn_getItemsNextFilter(i,o.items.filter,m+1,s,o.circular)-1;}
  869. function gn_getItemsNextFilter(i,f,m,s,c){var t=0,x=0;for(var a=s,l=i.length-1;a<=l;a++)
  870. {x++;if(x>=l)
  871. {return x;}
  872. var j=i.eq(a);if(j.is(f))
  873. {t++;if(t==m)
  874. {return x;}}
  875. if(a==l)
  876. {a=-1;}}}
  877. function gi_getCurrentItems(i,o){return i.slice(0,o.items.visible);}
  878. function gi_getOldItemsPrev(i,o,n){return i.slice(n,o.items.visibleConf.old+n);}
  879. function gi_getNewItemsPrev(i,o){return i.slice(0,o.items.visible);}
  880. function gi_getOldItemsNext(i,o){return i.slice(0,o.items.visibleConf.old);}
  881. function gi_getNewItemsNext(i,o,n){return i.slice(n,o.items.visible+n);}
  882. function sz_storeMargin(i,o,d){if(o.usePadding)
  883. {if(!is_string(d))
  884. {d='_cfs_origCssMargin';}
  885. i.each(function(){var j=$(this),m=parseInt(j.css(o.d['marginRight']),10);if(!is_number(m))
  886. {m=0;}
  887. j.data(d,m);});}}
  888. function sz_resetMargin(i,o,m){if(o.usePadding)
  889. {var x=(is_boolean(m))?m:false;if(!is_number(m))
  890. {m=0;}
  891. sz_storeMargin(i,o,'_cfs_tempCssMargin');i.each(function(){var j=$(this);j.css(o.d['marginRight'],((x)?j.data('_cfs_tempCssMargin'):m+j.data('_cfs_origCssMargin')));});}}
  892. function sz_storeOrigCss(i){i.each(function(){var j=$(this);j.data('_cfs_origCss',j.attr('style')||'');});}
  893. function sz_restoreOrigCss(i){i.each(function(){var j=$(this);j.attr('style',j.data('_cfs_origCss')||'');});}
  894. function sz_setResponsiveSizes(o,all){var visb=o.items.visible,newS=o.items[o.d['width']],seco=o[o.d['height']],secp=is_percentage(seco);all.each(function(){var $t=$(this),nw=newS-ms_getPaddingBorderMargin($t,o,'Width');$t[o.d['width']](nw);if(secp)
  895. {$t[o.d['height']](ms_getPercentage(nw,seco));}});}
  896. function sz_setSizes($c,o){var $w=$c.parent(),$i=$c.children(),$v=gi_getCurrentItems($i,o),sz=cf_mapWrapperSizes(ms_getSizes($v,o,true),o,false);$w.css(sz);if(o.usePadding)
  897. {var p=o.padding,r=p[o.d[1]];if(o.align&&r<0)
  898. {r=0;}
  899. var $l=$v.last();$l.css(o.d['marginRight'],$l.data('_cfs_origCssMargin')+r);$c.css(o.d['top'],p[o.d[0]]);$c.css(o.d['left'],p[o.d[3]]);}
  900. $c.css(o.d['width'],sz[o.d['width']]+(ms_getTotalSize($i,o,'width')*2));return sz;}
  901. function ms_getSizes(i,o,wrapper){return[ms_getTotalSize(i,o,'width',wrapper),ms_getLargestSize(i,o,'height',wrapper)];}
  902. function ms_getLargestSize(i,o,dim,wrapper){if(!is_boolean(wrapper))
  903. {wrapper=false;}
  904. if(is_number(o[o.d[dim]])&&wrapper)
  905. {return o[o.d[dim]];}
  906. if(is_number(o.items[o.d[dim]]))
  907. {return o.items[o.d[dim]];}
  908. dim=(dim.toLowerCase().indexOf('width')>-1)?'outerWidth':'outerHeight';return ms_getTrueLargestSize(i,o,dim);}
  909. function ms_getTrueLargestSize(i,o,dim){var s=0;for(var a=0,l=i.length;a<l;a++)
  910. {var j=i.eq(a);var m=(j.is(':visible'))?j[o.d[dim]](true):0;if(s<m)
  911. {s=m;}}
  912. return s;}
  913. function ms_getTotalSize(i,o,dim,wrapper){if(!is_boolean(wrapper))
  914. {wrapper=false;}
  915. if(is_number(o[o.d[dim]])&&wrapper)
  916. {return o[o.d[dim]];}
  917. if(is_number(o.items[o.d[dim]]))
  918. {return o.items[o.d[dim]]*i.length;}
  919. var d=(dim.toLowerCase().indexOf('width')>-1)?'outerWidth':'outerHeight',s=0;for(var a=0,l=i.length;a<l;a++)
  920. {var j=i.eq(a);s+=(j.is(':visible'))?j[o.d[d]](true):0;}
  921. return s;}
  922. function ms_getParentSize($w,o,d){var isVisible=$w.is(':visible');if(isVisible)
  923. {$w.hide();}
  924. var s=$w.parent()[o.d[d]]();if(isVisible)
  925. {$w.show();}
  926. return s;}
  927. function ms_getMaxDimension(o,a){return(is_number(o[o.d['width']]))?o[o.d['width']]:a;}
  928. function ms_hasVariableSizes(i,o,dim){var s=false,v=false;for(var a=0,l=i.length;a<l;a++)
  929. {var j=i.eq(a);var c=(j.is(':visible'))?j[o.d[dim]](true):0;if(s===false)
  930. {s=c;}
  931. else if(s!=c)
  932. {v=true;}
  933. if(s==0)
  934. {v=true;}}
  935. return v;}
  936. function ms_getPaddingBorderMargin(i,o,d){return i[o.d['outer'+d]](true)-i[o.d[d.toLowerCase()]]();}
  937. function ms_getPercentage(s,o){if(is_percentage(o))
  938. {o=parseInt(o.slice(0,-1),10);if(!is_number(o))
  939. {return s;}
  940. s*=o/100;}
  941. return s;}
  942. function cf_e(n,c,pf,ns,rd){if(!is_boolean(pf))
  943. {pf=true;}
  944. if(!is_boolean(ns))
  945. {ns=true;}
  946. if(!is_boolean(rd))
  947. {rd=false;}
  948. if(pf)
  949. {n=c.events.prefix+n;}
  950. if(ns)
  951. {n=n+'.'+c.events.namespace;}
  952. if(ns&&rd)
  953. {n+=c.serialNumber;}
  954. return n;}
  955. function cf_c(n,c){return(is_string(c.classnames[n]))?c.classnames[n]:n;}
  956. function cf_mapWrapperSizes(ws,o,p){if(!is_boolean(p))
  957. {p=true;}
  958. var pad=(o.usePadding&&p)?o.padding:[0,0,0,0];var wra={};wra[o.d['width']]=ws[0]+pad[1]+pad[3];return wra;}
  959. function cf_sortParams(vals,typs){var arr=[];for(var a=0,l1=vals.length;a<l1;a++)
  960. {for(var b=0,l2=typs.length;b<l2;b++)
  961. {if(typs[b].indexOf(typeof vals[a])>-1&&is_undefined(arr[b]))
  962. {arr[b]=vals[a];break;}}}
  963. return arr;}
  964. function cf_getPadding(p){if(is_undefined(p))
  965. {return[0,0,0,0];}
  966. if(is_number(p))
  967. {return[p,p,p,p];}
  968. if(is_string(p))
  969. {p=p.split('px').join('').split('em').join('').split(' ');}
  970. if(!is_array(p))
  971. {return[0,0,0,0];}
  972. for(var i=0;i<4;i++)
  973. {p[i]=parseInt(p[i],10);}
  974. switch(p.length)
  975. {case 0:return[0,0,0,0];case 1:return[p[0],p[0],p[0],p[0]];case 2:return[p[0],p[1],p[0],p[1]];case 3:return[p[0],p[1],p[2],p[1]];default:return[p[0],p[1],p[2],p[3]];}}
  976. function cf_getAlignPadding(itm,o){var x=(is_number(o[o.d['width']]))?Math.ceil(o[o.d['width']]-ms_getTotalSize(itm,o,'width')):0;switch(o.align)
  977. {case'left':return[0,x];case'right':return[x,0];case'center':default:return[Math.ceil(x/2),Math.floor(x/2)];}}
  978. function cf_getDimensions(o){var dm=[['width','innerWidth','outerWidth','height','innerHeight','outerHeight','left','top','marginRight',0,1,2,3],['height','innerHeight','outerHeight','width','innerWidth','outerWidth','top','left','marginBottom',3,2,1,0]];var dl=dm[0].length,dx=(o.direction=='right'||o.direction=='left')?0:1;var dimensions={};for(var d=0;d<dl;d++)
  979. {dimensions[dm[0][d]]=dm[dx][d];}
  980. return dimensions;}
  981. function cf_getAdjust(x,o,a,$t){var v=x;if(is_function(a))
  982. {v=a.call($t,v);}
  983. else if(is_string(a))
  984. {var p=a.split('+'),m=a.split('-');if(m.length>p.length)
  985. {var neg=true,sta=m[0],adj=m[1];}
  986. else
  987. {var neg=false,sta=p[0],adj=p[1];}
  988. switch(sta)
  989. {case'even':v=(x%2==1)?x-1:x;break;case'odd':v=(x%2==0)?x-1:x;break;default:v=x;break;}
  990. adj=parseInt(adj,10);if(is_number(adj))
  991. {if(neg)
  992. {adj=-adj;}
  993. v+=adj;}}
  994. if(!is_number(v)||v<1)
  995. {v=1;}
  996. return v;}
  997. function cf_getItemsAdjust(x,o,a,$t){return cf_getItemAdjustMinMax(cf_getAdjust(x,o,a,$t),o.items.visibleConf);}
  998. function cf_getItemAdjustMinMax(v,i){if(is_number(i.min)&&v<i.min)
  999. {v=i.min;}
  1000. if(is_number(i.max)&&v>i.max)
  1001. {v=i.max;}
  1002. if(v<1)
  1003. {v=1;}
  1004. return v;}
  1005. function cf_getSynchArr(s){if(!is_array(s))
  1006. {s=[[s]];}
  1007. if(!is_array(s[0]))
  1008. {s=[s];}
  1009. for(var j=0,l=s.length;j<l;j++)
  1010. {if(is_string(s[j][0]))
  1011. {s[j][0]=$(s[j][0]);}
  1012. if(!is_boolean(s[j][1]))
  1013. {s[j][1]=true;}
  1014. if(!is_boolean(s[j][2]))
  1015. {s[j][2]=true;}
  1016. if(!is_number(s[j][3]))
  1017. {s[j][3]=0;}}
  1018. return s;}
  1019. function cf_getKeyCode(k){if(k=='right')
  1020. {return 39;}
  1021. if(k=='left')
  1022. {return 37;}
  1023. if(k=='up')
  1024. {return 38;}
  1025. if(k=='down')
  1026. {return 40;}
  1027. return-1;}
  1028. function cf_setCookie(n,$c,c){if(n)
  1029. {var v=$c.triggerHandler(cf_e('currentPosition',c));$.fn.carouFredSel.cookie.set(n,v);}}
  1030. function cf_getCookie(n){var c=$.fn.carouFredSel.cookie.get(n);return(c=='')?0:c;}
  1031. function in_mapCss($elem,props){var css={};for(var p=0,l=props.length;p<l;p++)
  1032. {css[props[p]]=$elem.css(props[p]);}
  1033. return css;}
  1034. function in_complementItems(obj,opt,itm,sta){if(!is_object(obj.visibleConf))
  1035. {obj.visibleConf={};}
  1036. if(!is_object(obj.sizesConf))
  1037. {obj.sizesConf={};}
  1038. if(obj.start==0&&is_number(sta))
  1039. {obj.start=sta;}
  1040. if(is_object(obj.visible))
  1041. {obj.visibleConf.min=obj.visible.min;obj.visibleConf.max=obj.visible.max;obj.visible=false;}
  1042. else if(is_string(obj.visible))
  1043. {if(obj.visible=='variable')
  1044. {obj.visibleConf.variable=true;}
  1045. else
  1046. {obj.visibleConf.adjust=obj.visible;}
  1047. obj.visible=false;}
  1048. else if(is_function(obj.visible))
  1049. {obj.visibleConf.adjust=obj.visible;obj.visible=false;}
  1050. if(!is_string(obj.filter))
  1051. {obj.filter=(itm.filter(':hidden').length>0)?':visible':'*';}
  1052. if(!obj[opt.d['width']])
  1053. {if(opt.responsive)
  1054. {debug(true,'Set a '+opt.d['width']+' for the items!');obj[opt.d['width']]=ms_getTrueLargestSize(itm,opt,'outerWidth');}
  1055. else
  1056. {obj[opt.d['width']]=(ms_hasVariableSizes(itm,opt,'outerWidth'))?'variable':itm[opt.d['outerWidth']](true);}}
  1057. if(!obj[opt.d['height']])
  1058. {obj[opt.d['height']]=(ms_hasVariableSizes(itm,opt,'outerHeight'))?'variable':itm[opt.d['outerHeight']](true);}
  1059. obj.sizesConf.width=obj.width;obj.sizesConf.height=obj.height;return obj;}
  1060. function in_complementVisibleItems(opt,avl){if(opt.items[opt.d['width']]=='variable')
  1061. {opt.items.visibleConf.variable=true;}
  1062. if(!opt.items.visibleConf.variable){if(is_number(opt[opt.d['width']]))
  1063. {opt.items.visible=Math.floor(opt[opt.d['width']]/opt.items[opt.d['width']]);}
  1064. else
  1065. {opt.items.visible=Math.floor(avl/opt.items[opt.d['width']]);opt[opt.d['width']]=opt.items.visible*opt.items[opt.d['width']];if(!opt.items.visibleConf.adjust)
  1066. {opt.align=false;}}
  1067. if(opt.items.visible=='Infinity'||opt.items.visible<1)
  1068. {debug(true,'Not a valid number of visible items: Set to "variable".');opt.items.visibleConf.variable=true;}}
  1069. return opt;}
  1070. function in_complementPrimarySize(obj,opt,all){if(obj=='auto')
  1071. {obj=ms_getTrueLargestSize(all,opt,'outerWidth');}
  1072. return obj;}
  1073. function in_complementSecondarySize(obj,opt,all){if(obj=='auto')
  1074. {obj=ms_getTrueLargestSize(all,opt,'outerHeight');}
  1075. if(!obj)
  1076. {obj=opt.items[opt.d['height']];}
  1077. return obj;}
  1078. function in_getAlignPadding(o,all){var p=cf_getAlignPadding(gi_getCurrentItems(all,o),o);o.padding[o.d[1]]=p[1];o.padding[o.d[3]]=p[0];return o;}
  1079. function in_getResponsiveValues(o,all,avl){var visb=cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']]/o.items[o.d['width']]),o.items.visibleConf);if(visb>all.length)
  1080. {visb=all.length;}
  1081. var newS=Math.floor(o[o.d['width']]/visb);o.items.visible=visb;o.items[o.d['width']]=newS;o[o.d['width']]=visb*newS;return o;}
  1082. function bt_pauseOnHoverConfig(p){if(is_string(p))
  1083. {var i=(p.indexOf('immediate')>-1)?true:false,r=(p.indexOf('resume')>-1)?true:false;}
  1084. else
  1085. {var i=r=false;}
  1086. return[i,r];}
  1087. function bt_mousesheelNumber(mw){return(is_number(mw))?mw:null}
  1088. function is_null(a){return(a===null);}
  1089. function is_undefined(a){return(is_null(a)||typeof a=='undefined'||a===''||a==='undefined');}
  1090. function is_array(a){return(a instanceof Array);}
  1091. function is_jquery(a){return(a instanceof jQuery);}
  1092. function is_object(a){return((a instanceof Object||typeof a=='object')&&!is_null(a)&&!is_jquery(a)&&!is_array(a)&&!is_function(a));}
  1093. function is_number(a){return((a instanceof Number||typeof a=='number')&&!isNaN(a));}
  1094. function is_string(a){return((a instanceof String||typeof a=='string')&&!is_undefined(a)&&!is_true(a)&&!is_false(a));}
  1095. function is_function(a){return(a instanceof Function||typeof a=='function');}
  1096. function is_boolean(a){return(a instanceof Boolean||typeof a=='boolean'||is_true(a)||is_false(a));}
  1097. function is_true(a){return(a===true||a==='true');}
  1098. function is_false(a){return(a===false||a==='false');}
  1099. function is_percentage(x){return(is_string(x)&&x.slice(-1)=='%');}
  1100. function getTime(){return new Date().getTime();}
  1101. function deprecated(o,n){debug(true,o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.');}
  1102. function debug(d,m){if(!is_undefined(window.console)&&!is_undefined(window.console.log))
  1103. {if(is_object(d))
  1104. {var s=' ('+d.selector+')';d=d.debug;}
  1105. else
  1106. {var s='';}
  1107. if(!d)
  1108. {return false;}
  1109. if(is_string(m))
  1110. {m='carouFredSel'+s+': '+m;}
  1111. else
  1112. {m=['carouFredSel'+s+':',m];}
  1113. window.console.log(m);}
  1114. return false;}
  1115. $.extend($.easing,{'quadratic':function(t){var t2=t*t;return t*(-t2*t+4*t2-6*t+4);},'cubic':function(t){return t*(4*t*t-9*t+6);},'elastic':function(t){var t2=t*t;return t*(33*t2*t2-106*t2*t+126*t2-67*t+15);}});})(jQuery);(function($){$.fn.appear=function(fn,options){var settings=$.extend({data:undefined,one:true,accX:0,accY:0},options);return this.each(function(){var t=$(this);t.appeared=false;if(!fn){t.trigger('appear',settings.data);return;}
  1116. var w=$(window);var check=function(){if(!t.is(':visible')){t.appeared=false;return;}
  1117. var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;var ax=settings.accX;var ay=settings.accY;var th=t.height();var wh=w.height();var tw=t.width();var ww=w.width();if(y+th+ay>=b&&y<=b+wh+ay&&x+tw+ax>=a&&x<=a+ww+ax){if(!t.appeared)t.trigger('appear',settings.data);}else{t.appeared=false;}};var modifiedFn=function(){t.appeared=true;if(settings.one){w.unbind('scroll',check);var i=$.inArray(check,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);}
  1118. fn.apply(this,arguments);};if(settings.one)t.one('appear',settings.data,modifiedFn);else t.bind('appear',settings.data,modifiedFn);w.scroll(check);$.fn.appear.checks.push(check);(check)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var length=$.fn.appear.checks.length;if(length>0)while(length--)($.fn.appear.checks[length])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var old=$.fn[n];if(old){$.fn[n]=function(){var r=old.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery);(function($){'use strict';$.fn.findFirstImage=function(){return this.first().find('img').andSelf().filter('img').first();};var ORBIT={defaults:{animation:'horizontal-push',animationSpeed:450,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:'Right',directionalNavLeftText:'Left',captions:true,captionAnimation:'fade',captionAnimationSpeed:600,resetTimerOnClick:false,bullets:false,bulletThumbs:false,bulletThumbLocation:'',afterSlideChange:$.noop,afterLoadComplete:$.noop,fluid:true,centerBullets:true},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'<div class="orbit-wrapper" />',timerHTML:'<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',captionHTML:'<div class="orbit-caption"></div>',directionalNavHTML:'<div class="slider-nav"><span class="right"></span><span class="left"></span></div>',bulletHTML:'<ul class="orbit-bullets"></ul>',init:function(element,options){var $imageSlides,imagesLoadedCount=0,self=this;this.clickTimer=$.proxy(this.clickTimer,this);this.addBullet=$.proxy(this.addBullet,this);this.resetAndUnlock=$.proxy(this.resetAndUnlock,this);this.stopClock=$.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=$.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=$.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=$.proxy(this.rotateTimer,this);this.options=$.extend({},this.defaults,options);if(this.options.timer==='false')this.options.timer=false;if(this.options.captions==='false')this.options.captions=false;if(this.options.directionalNav==='false')this.options.directionalNav=false;this.$element=$(element);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children('img, a, div');this.$element.bind('orbit.next',function(){self.shift('next');});this.$element.bind('orbit.prev',function(){self.shift('prev');});this.$element.bind('orbit.goto',function(event,index){self.shift(index);});this.$element.bind('orbit.start',function(event,index){self.startClock();});this.$element.bind('orbit.stop',function(event,index){self.stopClock();});$imageSlides=this.$slides.filter('img');if($imageSlides.length===0){this.loaded();}else{$imageSlides.bind('imageready',function(){imagesLoadedCount+=1;if(imagesLoadedCount===$imageSlides.length){self.loaded();}});}},loaded:function(){this.$element.addClass('orbit').css({width:'1px',height:'1px'});this.$slides.addClass('orbit-slide');this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();if(this.options.timer){this.setupTimer();this.startClock();}
  1119. if(this.options.captions){this.setupCaptions();}
  1120. if(this.options.directionalNav){this.setupDirectionalNav();}
  1121. if(this.options.bullets){this.setupBulletNav();this.setActiveBullet();}
  1122. this.options.afterLoadComplete.call(this);},currentSlide:function(){return this.$slides.eq(this.activeSlide);},setDimentionsFromLargestSlide:function(){var self=this,$fluidPlaceholder;self.$element.add(self.$wrapper).width(this.$slides.first().width());self.$element.add(self.$wrapper).height(this.$slides.first().height());self.orbitWidth=this.$slides.first().width();self.orbitHeight=this.$slides.first().height();$fluidPlaceholder=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var slide=$(this),slideWidth=slide.width(),slideHeight=slide.height();if(slideWidth>self.$element.width()){self.$element.add(self.$wrapper).width(slideWidth);self.orbitWidth=self.$element.width();}
  1123. if(slideHeight>self.$element.height()){self.$element.add(self.$wrapper).height(slideHeight);self.orbitHeight=self.$element.height();$fluidPlaceholder=$(this).findFirstImage().clone();}
  1124. self.numberSlides+=1;});if(this.options.fluid){if(typeof this.options.fluid==="string"){$fluidPlaceholder=$('<img src="http://placehold.it/'+this.options.fluid+'" />')}
  1125. self.$element.prepend($fluidPlaceholder);$fluidPlaceholder.addClass('fluid-placeholder');self.$element.add(self.$wrapper).css({width:'inherit'});self.$element.add(self.$wrapper).css({height:'inherit'});$(window).bind('resize',function(){self.orbitWidth=self.$element.width();self.orbitHeight=self.$element.height();});}},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false;}},setupFirstSlide:function(){var self=this;this.$slides.find('.video').hide();if(this.$slides.first().find('.video').length>0){this.$slides.first().find('.video').show();this.$slides.first().find('.mejs-mediaelement').css('visibility','hidden');};if($('#featured').attr('data-caption-animation')=='0'){$('#featured').find('.post-title').children().css({'opacity':1,'margin-top':0});}
  1126. this.$slides.css({"opacity":0});this.$slides.first().css({"opacity":1});this.$slides.first().css({"z-index":3}).fadeIn(function(){if($('#featured').attr('data-caption-animation')=='1'){$('#featured').find('.post-title').children().css({'opacity':0,'margin-top':20});self.$slides.first().find('.post-title').children().each(function(i){$(this).stop().delay(i*320).animate({'opacity':1,'margin-top':0},600,'easeOutSine');});}
  1127. self.$slides.css({"display":"block"})});},startClock:function(){var self=this;if(!this.options.timer){return false;}
  1128. if(this.$timer.is(':hidden')){this.clock=setInterval(function(){self.$element.trigger('orbit.next');},this.options.advanceSpeed);}else{this.timerRunning=true;this.$pause.removeClass('active')
  1129. this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180);}},rotateTimer:function(reset){var degreeCSS="rotate("+this.degrees+"deg)"
  1130. this.degrees+=2;this.$rotator.css({"-webkit-transform":degreeCSS,"-moz-transform":degreeCSS,"-o-transform":degreeCSS});if(this.degrees>180){this.$rotator.addClass('move');this.$mask.addClass('move');}
  1131. if(this.degrees>360||reset){this.$rotator.removeClass('move');this.$mask.removeClass('move');this.degrees=0;this.$element.trigger('orbit.next');}},stopClock:function(){if(!this.options.timer){return false;}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass('active');}},setupTimer:function(){this.$timer=$(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find('.rotator');this.$mask=this.$timer.find('.mask');this.$pause=this.$timer.find('.pause');this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);}
  1132. if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock);}},startTimerAfterMouseLeave:function(){var self=this;this.outTimer=setTimeout(function(){if(!self.timerRunning){self.startClock();}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer);},clickTimer:function(){if(!this.timerRunning){this.startClock();}else{this.stopClock();}},setupCaptions:function(){this.$caption=$(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption();},setCaption:function(){var captionLocation=this.currentSlide().attr('data-caption'),captionHTML;if(!this.options.captions){return false;}
  1133. if(captionLocation){captionHTML=$(captionLocation).html();this.$caption.attr('id',captionLocation).html(captionHTML);switch(this.options.captionAnimation){case'none':this.$caption.show();break;case'fade':this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case'slideOpen':this.$caption.slideDown(this.options.captionAnimationSpeed);break;}}else{switch(this.options.captionAnimation){case'none':this.$caption.hide();break;case'fade':this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case'slideOpen':this.$caption.slideUp(this.options.captionAnimationSpeed);break;}}},setupDirectionalNav:function(){var self=this,$directionalNav=$(this.directionalNavHTML);$directionalNav.find('.right').html(this.options.directionalNavRightText);$directionalNav.find('.left').html(this.options.directionalNavLeftText);this.$wrapper.append($directionalNav);this.$wrapper.find('.slider-nav > span.left').click(function(){self.stopClock();if(self.options.resetTimerOnClick){self.rotateTimer(true);self.startClock();}
  1134. $(".mejs-pause").trigger('click');self.$element.trigger('orbit.prev');});this.$wrapper.find('.slider-nav > span.right').click(function(){self.stopClock();if(self.options.resetTimerOnClick){self.rotateTimer(true);self.startClock();}
  1135. $(".mejs-pause").trigger('click');self.$element.trigger('orbit.next');});this.$wrapper.find('.jp-play, .more-info a, #featured article .post-title > a, .video, .mejs-button, button, .mejs-controls, .mejs-playpause-button').on('click',function(){self.stopClock();});this.$wrapper.find('button, .mejs-controls, .mejs-playpause-button').mousedown(function(){self.stopClock();$(this).parents('.video').find('.mejs-mediaelement').css('visibility','visible');});},setupBulletNav:function(){this.$bullets=$(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass('with-bullets');if(this.options.centerBullets)this.$bullets.css('margin-left',-this.$bullets.width()/2);},addBullet:function(index,slide){var position=index+1,$li=$('<li>'+(position)+'</li>'),thumbName,self=this;if(this.options.bulletThumbs){thumbName=$(slide).attr('data-thumb');if(thumbName){$li.addClass('has-thumb').css({background:"url("+this.options.bulletThumbLocation+thumbName+") no-repeat"});;}}
  1136. this.$bullets.append($li);$li.data('index',index);$li.click(function(){self.stopClock();if(self.options.resetTimerOnClick){self.rotateTimer(true);self.startClock();}
  1137. self.$element.trigger('orbit.goto',[$li.data('index')])});},setActiveBullet:function(){if(!this.options.bullets){return false;}else{this.$bullets.find('li').removeClass('active').eq(this.activeSlide).addClass('active');}},resetAndUnlock:function(){if($('#featured').attr('data-caption-animation')=='1'){this.$slides.find('.post-title').children().stop(true,true).css({'opacity':0,'margin-top':20});}
  1138. this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide));this.unlock();},shift:function(direction){if($(this.$slides).filter(':animated').length==0&&$(this.$slides).find('h2').filter(':animated').length==0&&$(this.$slides).find('a').filter(':animated').length==0&&$(this.$slides).find('div').filter(':animated').length==0&&$(this.$slides).find('span').filter(':animated').length==0){var slideDirection=direction;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==slideDirection){return false;}
  1139. if(this.$slides.length=="1"){return false;}
  1140. if(!this.locked){this.lock();if(direction=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0;}}else if(direction=="prev"){this.activeSlide--
  1141. if(this.activeSlide<0){this.activeSlide=this.numberSlides-1;}}else{this.activeSlide=direction;if(this.prevActiveSlide<this.activeSlide){slideDirection="next";}else if(this.prevActiveSlide>this.activeSlide){slideDirection="prev"}}
  1142. this.setActiveBullet();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){var $that=this;var $currentSlide=this.$slides.eq(this.activeSlide);var timeout=0;var count=0;var infoLength=this.$slides.eq(this.prevActiveSlide).find('.post-title').children().length;var currentPos=this.$slides.eq(this.prevActiveSlide).find('article').css('top');this.$slides.eq(this.prevActiveSlide).find('.post-title').children().each(function(i){count++;infoLength--;if($('#featured').attr('data-caption-animation')=='1'){$(this).stop().delay(infoLength*150).animate({'opacity':0},300,'easeOutSine');timeout=count*300-count*150;}});var currentTimeout=setTimeout(function(){if($('#featured').attr('data-caption-animation')=='1'&&$(window).width()>1000){$that.$slides.find('.mejs-mediaelement').css('visibility','hidden');$that.$slides.find('.video').hide();$that.$slides.find('.mejs-mediaelement').parents('.video').show();}
  1143. if($('#featured').attr('data-caption-animation')=='1'){$that.$slides.find('.video .jp-jplayer > img').show();}
  1144. if($currentSlide.find('.video').length>0){$currentSlide.find('.video').show();$currentSlide.find('.mejs-poster').show();};$that.$slides.eq($that.activeSlide).find('article').css({"top":currentPos});$that.$slides.eq($that.activeSlide).css({"opacity":0,"z-index":3}).animate({"opacity":1},$that.options.animationSpeed,function(){$that.$slides.css({"opacity":0});$that.$slides.eq($that.activeSlide).css({"opacity":1});if($that.$slides.eq($that.prevActiveSlide).find('.jp-jplayer-video').length>0){$that.$slides.find('video').hide();$that.$slides.eq($that.prevActiveSlide).find('.jp-jplayer-video').jPlayer("stop");}
  1145. if($('#featured').attr('data-caption-animation')=='1'){$that.$slides.find('.post-title').children().css({'opacity':0,'margin-top':20});}
  1146. if($('#featured').attr('data-caption-animation')=='0'){$that.$slides.find('video').hide();$that.$slides.find('.video').hide();$that.$slides.find('.video .jp-jplayer > img').show();if($currentSlide.find('.video').length>0){$currentSlide.find('.video').show();$currentSlide.find('.mejs-poster').show();$currentSlide.find('.mejs-mediaelement').css('visibility','hidden');};}
  1147. $that.resetAndUnlock();$(window).trigger('resize');if($('#featured').attr('data-caption-animation')=='1'){$currentSlide.find('.post-title').children().each(function(i){$(this).stop().delay(i*270).animate({'opacity':1,'margin-top':0},500,'easeOutSine');});}});},timeout)}
  1148. if(this.options.animation=="horizontal-slide"){if(slideDirection=="next"){this.$slides.eq(this.activeSlide).css({"left":this.orbitWidth,"z-index":3}).animate({"left":0},this.options.animationSpeed,this.resetAndUnlock);}
  1149. if(slideDirection=="prev"){this.$slides.eq(this.activeSlide).css({"left":-this.orbitWidth,"z-index":3}).animate({"left":0},this.options.animationSpeed,this.resetAndUnlock);}}
  1150. if(this.options.animation=="vertical-slide"){if(slideDirection=="prev"){this.$slides.eq(this.activeSlide).css({"top":this.orbitHeight,"z-index":3}).animate({"top":0},this.options.animationSpeed,this.resetAndUnlock);}
  1151. if(slideDirection=="next"){this.$slides.eq(this.activeSlide).css({"top":-this.orbitHeight,"z-index":3}).animate({"top":0},this.options.animationSpeed,this.resetAndUnlock);}}
  1152. if(this.options.animation=="horizontal-push"){if(slideDirection=="next"){this.$slides.eq(this.activeSlide).css({"left":this.orbitWidth,"z-index":3}).animate({"left":0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({"left":-this.orbitWidth},this.options.animationSpeed);}
  1153. if(slideDirection=="prev"){this.$slides.eq(this.activeSlide).css({"left":-this.orbitWidth,"z-index":3}).animate({"left":0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({"left":this.orbitWidth},this.options.animationSpeed);}}
  1154. if(this.options.animation=="vertical-push"){if(slideDirection=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:this.orbitHeight},this.options.animationSpeed);}
  1155. if(slideDirection=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:-this.orbitHeight},this.options.animationSpeed);}}
  1156. this.setCaption();}}}};$.fn.orbit=function(options){return this.each(function(){var orbit=$.extend({},ORBIT);orbit.init(this,options);});};})(jQuery);
  1157. /*!
  1158. * jQuery imageready Plugin
  1159. * http://www.zurb.com/playground/
  1160. *
  1161. * Copyright 2011, ZURB
  1162. * Released under the MIT License
  1163. */
  1164. (function($){var options={};$.event.special.imageready={setup:function(data,namespaces,eventHandle){options=data||options;},add:function(handleObj){var $this=$(this),src;if(this.nodeType===1&&this.tagName.toLowerCase()==='img'&&this.src!==''){if(options.forceLoad){src=$this.attr('src');$this.attr('src','');bindToLoad(this,handleObj.handler);$this.attr('src',src);}else if(this.complete||this.readyState===4){handleObj.handler.apply(this,arguments);}else{bindToLoad(this,handleObj.handler);}}},teardown:function(namespaces){$(this).unbind('.imageready');}};function bindToLoad(element,callback){var $this=$(element);$this.bind('load.imageready',function(){callback.apply(element,arguments);$this.unbind('load.imageready');});}}(jQuery));jQuery(document).ready(function($){function prettyPhotoInit(){$("a.pp").prettyPhoto({theme:'dark_rounded',allow_resize:true,default_width:690,opacity:0.85,animation_speed:'normal',default_height:388,social_tools:'',markup:'<div class="pp_pic_holder"> \
  1165. <div class="ppt">&nbsp;</div> \
  1166. <div class="pp_details"> \
  1167. <div class="pp_nav"> \
  1168. <a href="#" class="pp_arrow_previous">Previous</a> \
  1169. <p class="currentTextHolder">0/0</p> \
  1170. <a href="#" class="pp_arrow_next">Next</a> \
  1171. </div> \
  1172. <a class="pp_close" href="#">Close</a> \
  1173. </div> \
  1174. <div class="pp_content_container"> \
  1175. <div class="pp_left"> \
  1176. <div class="pp_right"> \
  1177. <div class="pp_content"> \
  1178. <div class="pp_fade"> \
  1179. <div class="pp_hoverContainer"> \
  1180. <a class="pp_next" href="#">next</a> \
  1181. <a class="pp_previous" href="#">previous</a> \
  1182. </div> \
  1183. <div id="pp_full_res"></div> \
  1184. </div> \
  1185. </div> \
  1186. </div> \
  1187. </div> \
  1188. </div> \
  1189. </div> \
  1190. <div class="pp_loaderIcon"></div> \
  1191. <div class="pp_overlay"></div>'});}
  1192. prettyPhotoInit();
  1193. /*!
  1194. * jQuery Transit - CSS3 transitions and transformations
  1195. * (c) 2011-2012 Rico Sta. Cruz <rico@ricostacruz.com>
  1196. * MIT Licensed.
  1197. *
  1198. * http://ricostacruz.com/jquery.transit
  1199. * http://github.com/rstacruz/jquery.transit
  1200. */
  1201. (function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t<u.length;++t){var s=u[t]+r;if(s in d.style){return s}}}function e(){d.style[q.transform]="";d.style[q.transform]="rotateY(90deg)";return d.style[q.transform]!==""}var a=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery);function niceScrollInit(){$("html").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:15,cursorborder:0,cursorcolor:'#2D3032',cursorborderradius:6,autohidemode:false,horizrailenabled:false});if($('#boxed').length==0){$('body, body #header-outer, body #header-secondary-outer, body #search-outer').css('padding-right','16px');}
  1202. $('html').addClass('no-overflow-y');}
  1203. var $smoothActive=$('body').attr('data-smooth-scrolling');var $smoothCache=($smoothActive==1)?true:false;if($smoothActive==1&&$(window).width()>690&&$('body').outerHeight(true)>$(window).height()){niceScrollInit();}else{$('body').attr('data-smooth-scrolling','0');}
  1204. var sliderAdvanceSpeed=parseInt($('#featured').attr('data-advance-speed'));var sliderAnimationSpeed=parseInt($('#featured').attr('data-animation-speed'));var sliderAutoplay=parseInt($('#featured').attr('data-autoplay'));if(isNaN(sliderAdvanceSpeed)){sliderAdvanceSpeed=5500;}
  1205. if(isNaN(sliderAnimationSpeed)){sliderAnimationSpeed=800;}
  1206. var $yPos;var img_urls=[];$('[style*="background"]').each(function(){var style=$(this).attr('style');var pattern=/background.*?url\('(.*?)'\)/g
  1207. var match=pattern.exec(style);if(match){img_urls.push(match[1]);}});var imgArray=[];for(i=0;i<img_urls.length;i++){imgArray[i]=new Image();imgArray[i].src=img_urls[i];}
  1208. $(window).load(function(){$('#featured').orbit({animation:'fade',advanceSpeed:sliderAdvanceSpeed,animationSpeed:sliderAnimationSpeed,timer:sliderAutoplay});$('#featured article .post-title h2 span').show();$('.slider-nav > span').append('<span class="white"></span><span class="shadow"></span>');if($('body').hasClass('mobile')){$('#featured h2, #featured .video').swipe({swipeRight:function(e){$('.slider-nav .left').trigger('click');e.stopImmediatePropagation();return false;},swipeLeft:function(e){$('.slider-nav .right').trigger('click');e.stopImmediatePropagation();return false;}})}
  1209. customSliderHeight();sliderAfterSetup();});$('.flex-gallery').each(function(){var $that=$(this);imagesLoaded($(this),function(instance){$that.flexslider({animation:'fade',controlsContainer:'.flexslider',smoothHeight:false,animationSpeed:500,useCSS:false,touch:true});$('.flex-gallery .flex-direction-nav li a.flex-next').html('<i class="icon-angle-right"></i>');$('.flex-gallery .flex-direction-nav li a.flex-prev').html('<i class="icon-angle-left"></i>');});});var sliderHeight=parseInt($('#featured').attr('data-slider-height'));if(isNaN(sliderHeight)){sliderHeight=650}else{sliderHeight=sliderHeight-12};if($('#featured .video').length>0&&sliderHeight<500)sliderHeight=500;function customSliderHeight(){if(!$('body').hasClass('mobile')){$('#featured').attr('style','height: '+sliderHeight+'px !important');$('#featured article').css('height',sliderHeight+headerPadding2-23+'px')}
  1210. else{$('#featured').attr('style','height: '+sliderHeight+'px');}}
  1211. customSliderHeight();if($('#featured').length>0){var sliderBackgroundColor=$('#featured').attr('data-bg-color');if(sliderBackgroundColor.length==0)sliderBackgroundColor='#000000';$('#featured article').css('background-color',sliderBackgroundColor);}
  1212. var logoHeight=parseInt($('#header-outer').attr('data-logo-height'));var headerPadding=parseInt($('#header-outer').attr('data-padding'));var headerPadding2=parseInt($('#header-outer').attr('data-padding'));var extraDef=10;var headerResize=($('body').hasClass('pp-video-function'))?'1':$('#header-outer').attr('data-header-resize');var headerResizeOffExtra=0;var extraHeight=($('#wpadminbar').length>0)?28:0;var usingLogoImage=true;var mediaElement=($('.wp-video-shortcode').length>0)?36:0;var secondaryHeader=($('#header-outer').attr('data-using-secondary')=='1')?32:0;if(isNaN(logoHeight)){usingLogoImage=false;logoHeight=30;}
  1213. if(isNaN(headerPadding)){headerPadding=28;headerPadding2=28;}
  1214. if($('header#top #logo img').length==0){logoHeight=30;}
  1215. var $captionPos=(((sliderHeight-70)/2-$('div.slider-nav span.left span.white').height()/2)+headerPadding2-headerResizeOffExtra)-75;var $controlsPos=(((sliderHeight-70)/2-$('div.slider-nav span.left span.white').height()/2)+logoHeight+headerPadding*2+extraHeight+secondaryHeader)-10;var $scrollTop;var $videoHeight;function sliderAfterSetup(){$('#featured .mejs-container').css('width',$('#featured .video').width());$('#featured .mejs-container').css('height',$('#featured .video').width()/1.7777);$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide:not(".has-video") article .container').css('top',$captionPos+"px");$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide.has-video article .container').css('top',$videoHeight+"px");$('body:not(.mobile) .orbit-wrapper .slider-nav > span').css('top',$controlsPos+"px");$('body:not(.mobile) .orbit-wrapper #featured .slide article').css({'top':((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px'});}
  1216. function videoSlidePos(){$('#featured > div').has('.video').each(function(){if($(window).width()>1300){$('#featured .orbit-slide.has-video .video, #featured .orbit-slide.has-video h2').css('top','0');$('#featured .orbit-slide.has-video .post-title > a').css('top','10px');$videoHeight=((sliderHeight-28)/2)-((410-mediaElement)/2)+headerPadding2-headerResizeOffExtra;}
  1217. else if($(window).width()>1000&&$(window).width()<1081){$('#featured .orbit-slide.has-video .video, #featured .orbit-slide.has-video h2').css('top','0');$('#featured .orbit-slide.has-video .post-title > a').css('top','10px');$videoHeight=((sliderHeight-28)/2)-((290-mediaElement)/2)+headerPadding2-headerResizeOffExtra;}
  1218. else{$videoHeight=((sliderHeight-28)/2)-((336-mediaElement)/2)+headerPadding2-headerResizeOffExtra;}});}
  1219. videoSlidePos();function controlsAndInfoPos(){$scrollTop=$(window).scrollTop();$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide:not(".has-video") article .container').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.2)+$captionPos+"px"});$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide.has-video article .container').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.2)+$videoHeight+"px"});if($('#boxed').length==0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.4)+$controlsPos+"px"});}}
  1220. controlsInit();function controlsInit(){if($('#boxed').length>0){if(1-$scrollTop/(sliderHeight-$controlsPos-20)>=0){$(window).unbind('scroll',hideControls);$(window).bind('scroll',showControls);}else{$(window).unbind('scroll',showControls);$(window).bind('scroll',hideControls);}}else{$(window).unbind('scroll',showControls);$(window).unbind('scroll',hideControls);}}
  1221. function showControls(){if(1-$scrollTop/(sliderHeight-$controlsPos-20)>=0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.left').stop(true,true).animate({'left':'0px'},450,'easeOutCubic');if($('body').attr('data-smooth-scrolling')=='1'){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'15px'},450,'easeOutCubic');}else{$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'0px'},450,'easeOutCubic');}
  1222. $(window).unbind('scroll',showControls);$(window).bind('scroll',hideControls);}}
  1223. function hideControls(){if(1-$scrollTop/(sliderHeight-$controlsPos-20)<0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.left').stop(true,true).animate({'left':'-80px'},450,'easeOutCubic');$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'-80px'},450,'easeOutCubic');$(window).unbind('scroll',hideControls);$(window).bind('scroll',showControls);}}
  1224. if($('#featured').length>0){$(window).scroll(function(){$('#featured .mejs-mediaelement, #featured .iframe-embed').each(function(){if($(this).parents('.container').css('opacity')<=0){$(this).css('visibility','hidden').hide();}else{$(this).css('visibility','visible').show();}});if(!$('body').hasClass('mobile')){controlsAndInfoPos();$('body:not(.mobile) .orbit-wrapper #featured .slide:not(:transparent) article').css({'top':((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px'});}});$(window).resize(function(){if(!$('body').hasClass('mobile')){$('.orbit-wrapper #featured article').css('top',((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px');$('.orbit-wrapper div.slider-nav span.right, .orbit-wrapper div.slider-nav span.left').html('<span class="white"></span><span class="shadow"></span>');}else{$('.orbit-wrapper div.slider-nav span.right').html('<i class="icon-angle-right"></i>');$('.orbit-wrapper div.slider-nav span.left').html('<i class="icon-angle-left"></i>');}
  1225. videoSlidePos();controlsAndInfoPos();customSliderHeight();if(!$('body').hasClass('mobile')&&headerResize.length==0){$('#featured article').css('height',sliderHeight-32+'px')}});}
  1226. $('.jp-video-container .jp-play, jp-video-container .jp-seek-bar').click(function(){$(this).parents('.jp-video-container').prev('.jp-jplayer').find('video').show().css('display','block');$(this).parents('.jp-video-container').prev('.jp-jplayer').find('.jp-jplayer > img').hide();});$('#featured .span_12 a.more-info').click(function(){if(!$(this).find('.btv').is(":visible")){$(this).parent().parent().find('h2, > a').css('opacity',1);$(this).parent().parent().find('.video').stop().animate({'top':'-400px'},800,'easeOutCubic');$(this).parent().parent().find('h2').stop().animate({'top':'-400px'},800,'easeOutCubic');$(this).parent().parent().find('> a').stop().animate({'top':'-380px'},800,'easeOutCubic');$(this).find('.btv').show();$(this).find('.mi').hide();}
  1227. else{$(this).parent().parent().find('.video').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).parent().parent().find('h2').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).parent().parent().find('> a').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).find('.mi').show();$(this).find('.btv').hide();}
  1228. return false;});function initSF(){$(".sf-menu").superfish({delay:900,speed:'fast',speedOut:'fast',animation:{opacity:'show'}});}
  1229. $('header#top nav > ul > li').mouseleave(function(){if(!$(this).hasClass('megamenu')){$(this).find('> ul').stop(true,true).fadeOut();}});function addOrRemoveSF(){if(window.innerWidth<1000&&$('body').attr('data-responsive')=='1'){$('body').addClass('mobile');$('header#top nav').hide();}
  1230. else{$('body').removeClass('mobile');$('header#top nav').show();$('#mobile-menu').hide();$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());}}
  1231. addOrRemoveSF();initSF();$(window).resize(addOrRemoveSF);function SFArrows(){$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());}
  1232. SFArrows();$('.carousel:not(".clients")').each(function(){var $that=$(this);var maxCols=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?'auto':1;var scrollNum=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?'auto':'';var colWidth=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?500:353;var scrollSpeed,easing;(parseInt($(this).attr('data-scroll-speed')))?scrollSpeed=parseInt($(this).attr('data-scroll-speed')):scrollSpeed=1500;($(this).attr('data-easing').length>0)?easing=$(this).attr('data-easing'):easing='easeInOutCubic';easing='easeInOutCubic';scrollSpeed=1500;var $element=$that;if($that.find('img').length==0)$element=$('body');imagesLoaded($element,function(instance){$that.carouFredSel({circular:true,responsive:true,items:{width:colWidth,visible:{min:1,max:maxCols}},swipe:{onTouch:true,onMouse:true,options:{excludedElements:"button, input, select, textarea, .noSwipe"},onBefore:function(){$that.find('.work-item').trigger('mouseleave');$that.find('.work-item .work-info a').trigger('mouseup');}},scroll:{items:scrollNum,easing:easing,duration:scrollSpeed},prev:{button:function(){return $that.parents('.carousel-wrap').find('.carousel-prev');}},next:{button:function(){return $that.parents('.carousel-wrap').find('.carousel-next');}},auto:{play:true,timeoutDuration:5000},pagination:$that.parents('.carousel-wrap').find('.carousel-pagination')}).animate({'opacity':1},1500);$that.parents('.carousel-wrap').wrap('<div class="carousel-outer">');carouselHeightCalcs();});});var $mousePosStart=0;var $mousePosEnd=0;$('.carousel-wrap[data-full-width="true"] .portfolio-items .col .work-item .work-info a').mousedown(function(e){$mousePosStart=e.clientX;});$('.carousel-wrap[data-full-width="true"] .portfolio-items .col .work-item .work-info a').mouseup(function(e){$mousePosEnd=e.clientX;});$('.carousel-wrap[data-full-width="true"] .portfolio-items .col .work-item .work-info a').click(function(e){if(Math.abs($mousePosStart-$mousePosEnd)>10)return false;});function carouselHeightCalcs(){$('.carousel.portfolio-items').each(function(){var bottomSpace=($(this).parents('.carousel-wrap').attr('data-full-width')=='true'&&$(this).find('.style-2').length>0)?0:28;$(this).parents('.caroufredsel_wrapper').css({'height':($(this).find('.work-item').outerHeight()+$(this).find('.work-meta').outerHeight()+bottomSpace-2)+'px'});});$('.carousel:not(".portfolio-items, .clients")').each(function(){var tallestColumn=0;$(this).find('> li').each(function(){($(this).height()>tallestColumn)?tallestColumn=$(this).height():tallestColumn=tallestColumn;});$(this).css('height',tallestColumn+5);$(this).parents('.caroufredsel_wrapper').css('height',tallestColumn+5);});}
  1233. $(window).load(piVertCenter);$('.carousel.clients').each(function(){var $that=$(this);var columns;(parseInt($(this).attr('data-max')))?columns=parseInt($(this).attr('data-max')):columns=5;if($(window).width()<690&&$('body').attr('data-responsive')=='1'){columns=2;$(this).addClass('phone')}
  1234. var $element=$that;if($that.find('img').length==0)$element=$('body');imagesLoaded($element,function(instance){$that.carouFredSel({circular:true,responsive:true,items:{height:$that.find('> div:first').height(),width:$that.find('> div:first').width(),visible:{min:1,max:columns}},swipe:{onTouch:true,onMouse:true},scroll:{items:1,easing:'easeInOutCubic',duration:'800',pauseOnHover:true},auto:{play:true,timeoutDuration:2700}}).animate({'opacity':1},1300);$that.parents('.carousel-wrap').wrap('<div class="carousel-outer">');$(window).resize(function(){var tallestImage=0;$('.carousel.clients').each(function(){$(this).find('> div').each(function(){($(this).height()>tallestImage)?tallestImage=$(this).height():tallestImage=tallestImage;});$(this).css('height',tallestImage);$(this).parent().css('height',tallestImage);});});$(window).trigger('resize');});});$('body').on('mousedown','.caroufredsel_wrapper, .carousel-wrap[data-full-width="true"] .portfolio-items .col .work-item .work-info a',function(){$(this).addClass('active');});$('body').on('mouseup','.caroufredsel_wrapper, .carousel-wrap[data-full-width="true"] .portfolio-items .col .work-item .work-info a',function(){$(this).removeClass('active');});$('.clients.fade-in-animation').each(function(){$(this).appear(function(){$(this).find('> div').each(function(i){$(this).delay(i*100).animate({'opacity':"1"},450);});var $that=$(this);setTimeout(function(){$that.addClass('completed');},($(this).find('> div').length*100)+450);},{accX:0,accY:-155},'easeInCubic');});jQuery.fn.setCursorPosition=function(position){if(this.lengh==0)return this;return $(this).setSelection(position,position);}
  1235. jQuery.fn.setSelection=function(selectionStart,selectionEnd){if(this.lengh==0)return this;input=this[0];if(input.createTextRange){var range=input.createTextRange();range.collapse(true);range.moveEnd('character',selectionEnd);range.moveStart('character',selectionStart);range.select();}else if(input.setSelectionRange){input.focus();input.setSelectionRange(selectionStart,selectionEnd);}
  1236. return this;}
  1237. $.extend($.expr[':'],{transparent:function(elem,i,attr){return($(elem).css("opacity")==="0");}});$.fn.countTo=function(options){options=options||{};return $(this).each(function(){var settings=$.extend({},$.fn.countTo.defaults,{from:$(this).data('from'),to:$(this).data('to'),speed:$(this).data('speed'),refreshInterval:$(this).data('refresh-interval'),decimals:$(this).data('decimals')},options);var loops=Math.ceil(settings.speed/settings.refreshInterval),increment=(settings.to-settings.from)/loops;var self=this,$self=$(this),loopCount=0,value=settings.from,data=$self.data('countTo')||{};$self.data('countTo',data);if(data.interval){clearInterval(data.interval);}
  1238. data.interval=setInterval(updateTimer,settings.refreshInterval);render(value);function updateTimer(){value+=increment;loopCount++;render(value);if(typeof(settings.onUpdate)=='function'){settings.onUpdate.call(self,value);}
  1239. if(loopCount>=loops){$self.removeData('countTo');clearInterval(data.interval);value=settings.to;if(typeof(settings.onComplete)=='function'){settings.onComplete.call(self,value);}}}
  1240. function render(value){var formattedValue=settings.formatter.call(self,value,settings);$self.html(formattedValue);}});};$.fn.countTo.defaults={from:0,to:0,speed:1000,refreshInterval:100,decimals:0,formatter:formatter,onUpdate:null,onComplete:null};function formatter(value,settings){return value.toFixed(settings.decimals);}
  1241. if(!$('body').hasClass('mobile')){$('.nectar-milestone').each(function(){$(this).appear(function(){var $endNum=parseInt($(this).find('.number').text());$(this).find('.number').countTo({from:0,to:$endNum,speed:1500,refreshInterval:30});},{accX:0,accY:0});});}
  1242. $('.tabbed > ul li a').click(function(){var $id=$(this).attr('href');if(!$(this).hasClass('active-tab')){$('.tabbed > ul li a').removeClass('active-tab');$(this).addClass('active-tab');$('.tabbed > div:not(.clear)').css({'visibility':'hidden','position':'absolute','opacity':'0','left':'-9999px','display':'none'});$('.tabbed > div'+$id).css({'visibility':'visible','position':'relative','left':'0','display':'block'}).stop().animate({'opacity':1});}
  1243. return false;});$('.tabbed').each(function(){if($(this).find('.swiper-container').length==0){$(this).find('> ul li:first-child a').click();}});$('.toggle h3 a').click(function(){if(!$(this).parents('.toggles').hasClass('accordion')){$(this).parents('.toggle').find('> div').slideToggle(300);$(this).parents('.toggle').toggleClass('open');if($(this).parents('.toggle').hasClass('open')){$(this).find('i').attr('class','icon-minus-sign');}else{$(this).find('i').attr('class','icon-plus-sign');}
  1244. return false;}});$('.accordion .toggle h3 a').click(function(){if($(this).parents('.toggle').hasClass('open'))return false;$(this).parents('.toggles').find('.toggle > div').slideUp(300);$(this).parents('.toggles').find('.toggle h3 a i').attr('class','icon-plus-sign');$(this).parents('.toggles').find('.toggle').removeClass('open');$(this).parents('.toggle').find('> div').slideDown(300);$(this).parents('.toggle').addClass('open');if($(this).parents('.toggle').hasClass('open')){$(this).find('i').attr('class','icon-minus-sign');}else{$(this).find('i').attr('class','icon-plus-sign');}
  1245. return false;});$('.accordion > .toggle').first().addClass('open').find('> div').show();$('.accordion > .toggle').first().find('i').attr('class','icon-minus-sign');var $window=$(window);var windowHeight=$window.height();$window.resize(function(){windowHeight=$window.height();});$.fn.parallax=function(xpos,speedFactor,outerHeight){var $this=$(this);var getHeight;var firstTop;var paddingTop=0;$this.each(function(){firstTop=$this.offset().top;});$window.resize(function(){$this.each(function(){firstTop=$this.offset().top;});});$window.load(function(){$this.each(function(){firstTop=$this.offset().top;});});getHeight=function(jqo){return jqo.outerHeight(true);};if(arguments.length<1||xpos===null)xpos="50%";if(arguments.length<2||speedFactor===null)speedFactor=0.1;if(arguments.length<3||outerHeight===null)outerHeight=true;function update(){var pos=$window.scrollTop();$this.each(function(){var $element=$(this);var top=$element.offset().top;var height=getHeight($element);if(top+height<pos||top>pos+windowHeight){return;}
  1246. $this.css('backgroundPosition',xpos+" "+Math.round((firstTop-pos)*speedFactor)+"px");});}
  1247. $window.bind('scroll',update).resize(update);update();};function fullWidthSections(){var $scrollBar=($('#ascrail2000').length>0&&window.innerWidth>1000)?-13:0;if($('#boxed').length==1){$justOutOfSight=((parseInt($('.container-wrap').width())-parseInt($('.main-content').css('max-width')))/2)+4;}else{$justOutOfSight=Math.ceil((($(window).width()+$scrollBar-parseInt($('.container').css('max-width')))/2))}
  1248. $('.full-width-section').each(function(){if(!$(this).parent().hasClass('span_9')&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'&&$(this).parent().attr('id')!='portfolio-extra'){$(this).css({'margin-left':-$justOutOfSight,'padding-left':$justOutOfSight,'padding-right':$justOutOfSight,'visibility':'visible'});}else if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){$(this).css({'margin-left':-$justOutOfSight,'padding-left':$justOutOfSight,'padding-right':$justOutOfSight,'visibility':'visible'});}
  1249. else{$(this).css({'margin-left':0,'padding-left':0,'padding-right':0,'visibility':'visible'});}});$('.carousel-outer').has('.carousel-wrap[data-full-width="true"]').css('overflow','visible');$('.carousel-wrap[data-full-width="true"], .portfolio-items[data-col-num="elastic"]').each(function(){$extraSpace=($(this).hasClass('carousel-wrap'))?1:4;$carouselWidth=($('#boxed').length==1)?parseInt($('.container').css('max-width'))+parseInt($justOutOfSight*2):$(window).width()+$extraSpace+$scrollBar;if(!$(this).parent().hasClass('span_9')&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'&&$(this).parent().attr('id')!='portfolio-extra'){$(this).css({'margin-left':-$justOutOfSight,'width':$carouselWidth,'visibility':'visible'});}else if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){$(this).css({'margin-left':-$justOutOfSight,'width':$carouselWidth,'visibility':'visible'});}
  1250. else{$(this).css({'margin-left':0,'visibility':'visible'});}});}
  1251. var $contentElementsNum=($('#portfolio-extra').length==0)?$('.main-content > .row > *').length:$('.main-content > .row #portfolio-extra > *').length;$('.full-width-section.parallax_section').each(function(){var $id=$(this).attr('id');$('#'+$id+".parallax_section").parallax("50%",0.2);});$('.full-width-section, .row > .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer, .portfolio-items[data-col-num="elastic"]').each(function(){if(!$(this).parent().hasClass('span_9')&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'){if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length==0)return false;if($(this).index()=='0'&&$('#page-header-bg').length!=0||$(this).index()=='0'&&$('.parallax_slider_outer').length!=0){$(this).css('margin-top','-2.1em').addClass('first-section nder-page-header');}
  1252. else if($(this).index()=='0'&&$('#page-header-bg').length==0||$(this).index()=='0'&&$('.parallax_slider_outer').length==0){$(this).css('margin-top','-70px').addClass('first-section');}
  1253. if($(this).index()==$contentElementsNum-1&&$('#respond').length==0){$(this).css('margin-bottom','-40px');$('#call-to-action .triangle').remove();}}});$('#portfolio-extra > .nectar-slider-wrap[data-full-width="true"], .portfolio-wrap').each(function(){if($(this).index()==$contentElementsNum-1&&$('#commentform').length==0){$(this).css('margin-bottom','-40px');$('#call-to-action .triangle').remove();}});$('#portfolio-filters').each(function(){if($(this).index()=='0'&&$('#page-header-bg').length!=0||$(this).index()=='0'&&$('.parallax_slider_outer').length!=0){$(this).css({'margin-top':'-2.1em'}).addClass('first-section nder-page-header');}else if($(this).index()=='0'&&$('#page-header-bg').length==0||$(this).index()=='0'&&$('.parallax_slider_outer').length==0){$(this).css({'margin-top':'0px'}).addClass('first-section');}});$('#portfolio-filters-inline').each(function(){if($(this).index()=='0'&&$('#page-header-bg').length!=0||$(this).index()=='0'&&$('.parallax_slider_outer').length!=0){$(this).css({'margin-top':'-2.1em','padding-top':'19px'}).addClass('first-section nder-page-header');}else if($(this).index()=='0'&&$('#page-header-bg').length==0||$(this).index()=='0'&&$('.parallax_slider_outer').length==0){$(this).css({'margin-top':'-70px','padding-top':'50px'}).addClass('first-section');}});$('.parallax_slider_outer').each(function(){if(!$(this).parent().hasClass('span_9')&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'){if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length==0)return false;if($(this).parent().index()=='0'&&$('#page-header-bg').length!=0){$(this).addClass('first-section nder-page-header');}
  1254. else if($(this).parent().index()=='0'&&$('#page-header-bg').length==0){$(this).css('margin-top','-40px').addClass('first-section');if(!$('body').hasClass('single-post'))$('.container-wrap').css('padding-top','0px');}
  1255. if($(this).parent().index()==$contentElementsNum-1&&$('#post-area').length==0){$('#call-to-action .triangle').remove();$('.container-wrap').hide();}}});if($('.nectar-slider-wrap.first-section').length>0&&$('.nectar-slider-wrap.first-section').attr('data-full-width')!='true'||$('.nectar-slider-wrap.first-section').length>0&&$('.nectar-slider-wrap.first-section').attr('data-full-width')!='boxed-full-width')$('body').attr('data-bg-header','false');fullWidthSections();$('.full-width-section').each(function(){var $fwsHeight=$(this).outerHeight(true);if($(this).find('.span_12 *').length==0&&$.trim($(this).find('.span_12').text()).length==0&&$fwsHeight>40){$(this).addClass('bg-only');$(this).css({'height':$fwsHeight,'padding-top':'0px','padding-bottom':'0px'});$(this).attr('data-image-height',$fwsHeight);}});function fullwidthImgOnlySizing(){$('.full-width-section.bg-only').each(function(){var $initialHeight=$(this).attr('data-image-height');if(window.innerWidth<1000&&window.innerWidth>690){$(this).css('height',$initialHeight-$initialHeight*.60);}
  1256. else if(window.innerWidth<=690){$(this).css('height',$initialHeight-$initialHeight*.78);}
  1257. else if(window.innerWidth<1300&&window.innerWidth>=1000){$(this).css('height',$initialHeight-$initialHeight*.33);}
  1258. else{$(this).css('height',$initialHeight);}});}
  1259. fullwidthImgOnlySizing();$('ul.checks li').prepend('<i class="icon-ok-sign"></i>');$('img.img-with-animation').each(function(){$(this).appear(function(){if($(this).attr('data-animation')=='fade-in-from-left'){$(this).delay($(this).attr('data-delay')).animate({'opacity':1,'left':'0px'},800,'easeOutSine');}else if($(this).attr('data-animation')=='fade-in-from-right'){$(this).delay($(this).attr('data-delay')).animate({'opacity':1,'right':'0px'},800,'easeOutSine');}else if($(this).attr('data-animation')=='fade-in-from-bottom'){$(this).delay($(this).attr('data-delay')).animate({'opacity':1,'bottom':'0px'},800,'easeOutSine');}else if($(this).attr('data-animation')=='fade-in'){$(this).delay($(this).attr('data-delay')).animate({'opacity':1},800,'easeOutSine');}else if($(this).attr('data-animation')=='grow-in'){var $that=$(this);setTimeout(function(){$that.transition({scale:1,'opacity':1},900,'cubic-bezier(0.15, 0.84, 0.35, 1.25)');},$that.attr('data-delay'));}},{accX:0,accY:-105},'easeInCubic');});$('.col.span_3').each(function(){var $currentDiv=$(this);var $nextDiv=$(this).next('div');if($nextDiv.hasClass('span_3')&&!$currentDiv.hasClass('one-fourths')){$currentDiv.addClass('one-fourths clear-both');$nextDiv.addClass('one-fourths right-edge');}});$('.span_12 .col.span_6').each(function(){if($(this).next('div').hasClass('span_6')&&$.trim($(this).next('div').html()).length==0){$(this).addClass('empty-second')}});$('.bar_graph li').each(function(i){$(this).appear(function(){var percent=$(this).find('span').attr('data-width');var $endNum=parseInt($(this).find('span strong i').text());var $that=$(this);$(this).find('span').animate({'width':percent+'%'},1600,'easeOutCirc',function(){});$(this).find('span strong').animate({'opacity':1},1350);$(this).find('span strong i').countTo({from:0,to:$endNum,speed:1100,refreshInterval:30,onComplete:function(){}});if(percent=='100'){$that.find('span strong').addClass('full');}});});var $tallestCol;function pricingTableHeight(){$('.pricing-table').each(function(){$tallestCol=0;$(this).find('> div .features').each(function(){($(this).height()>$tallestCol)?$tallestCol=$(this).height():$tallestCol=$tallestCol;});if($tallestCol==0)$tallestCol='auto';$(this).find('> div .features').css('height',$tallestCol);});}
  1260. pricingTableHeight();$('.testimonial_slider').animate({'opacity':'1'},800);$('body').on('click','.testimonial_slider .controls li',function(){if($(this).find('span').hasClass('active'))return false;var $index=$(this).index();var currentHeight=$(this).parents('.testimonial_slider').find('.slides blockquote').eq($index).height();$(this).parents('.testimonial_slider').find('li').html('<span class="pagination-switch"></span>');$(this).html('<span class="pagination-switch active"></span>');$(this).parents('.testimonial_slider').find('.slides blockquote').stop().css({'opacity':'0','left':'-25px','z-index':'1'});$(this).parents('.testimonial_slider').find('.slides blockquote').eq($index).stop(true,true).animate({'opacity':'1','left':'0'},550,'easeOutCubic').css('z-index','20');$(this).parents('.testimonial_slider').find('.slides').stop(true,true).animate({'height':currentHeight+20+'px'},450,'easeOutCubic');});var $tallestQuote;$('.testimonial_slider').each(function(){$(this).append('<div class="controls"><ul></ul></div>');var slideNum=$(this).find('blockquote').length;var $that=$(this);for(var i=0;i<slideNum;i++){$that.find('.controls ul').append('<li><span class="pagination-switch"></span></li>')}
  1261. $(this).find('.controls ul li').first().click();if($(this).attr('data-autorotate').length>0){slide_interval=(parseInt($(this).attr('data-autorotate'))<100)?4000:parseInt($(this).attr('data-autorotate'));var $that=$(this);var $rotate=setInterval(function(){testimonialRotate($that)},slide_interval);}
  1262. $(this).find('.controls li').click(function(e){if(typeof e.clientX!='undefined')clearInterval($rotate);});$(this).swipe({swipeLeft:function(e){$(this).find('.controls ul li span.active').parent().next('li').find('span').trigger('click');e.stopImmediatePropagation();clearInterval($rotate);return false;},swipeRight:function(e){$(this).find('.controls ul li span.active').parent().prev('li').find('span').trigger('click');e.stopImmediatePropagation();clearInterval($rotate);return false;}});});function testimonialRotate(slider){var $testimonialLength=slider.find('li').length;var $currentTestimonial=slider.find('.pagination-switch.active').parent().index();if($currentTestimonial+1==$testimonialLength){slider.find('ul li:first-child').click();}else{slider.find('.pagination-switch.active').parent().next('li').click();}}
  1263. function testimonialHeightResize(){$('.testimonial_slider').each(function(){var $index=$(this).find('.controls ul li span.active').parent().index();var currentHeight=$(this).find('.slides blockquote').eq($index).height();$(this).find('.slides').stop(true,true).animate({'height':currentHeight+20+'px'},450,'easeOutCubic');});}
  1264. $('iframe').each(function(){if(typeof $(this).attr('src')!='undefined'){if($(this).attr('src').toLowerCase().indexOf("youtube")>=0||$(this).attr('src').toLowerCase().indexOf("vimeo")>=0||$(this).attr('src').toLowerCase().indexOf("twitch.tv")>=0||$(this).attr('src').toLowerCase().indexOf("kickstarter")>=0){$(this).wrap('<div class="iframe-embed"/>');if($(this).attr('src').indexOf('wmode=transparent')==-1){if($(this).attr('src').indexOf('?')==-1){$(this).attr('src',$(this).attr('src')+'?wmode=transparent');}else{$(this).attr('src',$(this).attr('src')+'&wmode=transparent');}}}}else{if($(this).parents('ins').length==0){$(this).wrap('<div class="iframe-embed-standard"/>');}}})
  1265. $('.video-wrap iframe').unwrap();$('#sidebar iframe[src]').unwrap();$('video').attr('width','100%');$('video').attr('height','100%');$('audio').attr('width','100%');$('audio').attr('height','100%');$('audio').css('visibility','visible');if($('body').hasClass('mobile')){$('video').css('visibility','hidden');}else{$('video').css('visibility','visible');}
  1266. $(window).load(function(){$('video').css('visibility','visible');});$(window).trigger('resize');$('iframe[src]').each(function(){$(this).attr('src',$(this).attr('src'));$(this).css({'opacity':'1','visibility':'visible'});});var pageHeaderHeight=parseInt($('#page-header-bg').attr('data-height'));var pageHeadingHeight;$('#page-header-bg').css('height',pageHeaderHeight+'px');setTimeout(function(){$('#page-header-bg').css('overflow','visible')},800);function pageHeader(){if(!$('body').hasClass('mobile')){pageHeaderHeight=parseInt($('#page-header-bg').attr('data-height'));$('#page-header-bg .container > .row').css('top',0);pageHeadingHeight=$('#page-header-bg .col.span_6').height();$('#page-header-bg:not("[data-parallax=1]") .col.span_6').css('top',(pageHeaderHeight/2)-(pageHeadingHeight/2)+22);$('#page-header-bg:not("[data-parallax=1]") #portfolio-filters').css('top',(pageHeaderHeight/2)+2);}
  1267. else{pageHeaderHeight=parseInt($('#page-header-bg').attr('data-height'));var pageHeadingHeight=$('#page-header-bg .container > .row').height();$('#page-header-bg .container > .row').css('top',(pageHeaderHeight/2)-(pageHeadingHeight/2)+12);}
  1268. $('#page-header-bg .container > .row').css('visibility','visible');}
  1269. pageHeader();$(window).resize(pageHeader);if($('#header-outer').attr('data-header-resize')==''||$('#header-outer').attr('data-header-resize')=='0'){$('#page-header-wrap').css('margin-top','0');}
  1270. if($('#page-header-bg[data-parallax="1"]').length>0){function extractUrl(input){return input.replace(/"/g,"").replace(/url\(|\)$/ig,"");}
  1271. var img=new Image();var imgX,imgY,aspectRatio;var diffX,diffY;var pageHeadingHeight=$('#page-header-bg .col.span_6').height();var pageHeaderHeight=parseInt($('#page-header-bg').attr('data-height'));var headerPadding2=parseInt($('#header-outer').attr('data-padding'))*2;var wooCommerceHeader=($('.demo_store').length>0)?32:0;img.onload=function(){$('#page-header-bg[data-parallax="1"]').css({'top':(logoHeight+headerPadding+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader+wooCommerceHeader)+'px'});$('#page-header-bg[data-parallax="1"]').animate({'opacity':1},650,'easeInCubic');$('#page-header-wrap').css({'height':pageHeaderHeight});$('#page-header-bg[data-parallax="1"] .span_6').css({'opacity':1-($scrollTop/(pageHeaderHeight-($('#page-header-bg .col.span_6').height()*2)+60)),'top':((pageHeaderHeight/2)-(pageHeadingHeight/2))+10+"px"});$('#page-header-bg[data-parallax="1"] #portfolio-filters').css({'opacity':1-($scrollTop/(pageHeaderHeight-($('#page-header-bg .col.span_6').height()*2)+75)),'top':($scrollTop*-0.10)+((pageHeaderHeight/2))-7+"px"});}
  1272. img.src=extractUrl($('#page-header-bg[data-parallax="1"]').css('background-image'));$(window).scroll(function(){var $scrollTop=$(window).scrollTop();var pageHeadingHeight=$('#page-header-bg .col.span_6').height();var extraHeight=($('#wpadminbar').length>0)?28:0;if(!$('body').hasClass('mobile')&&navigator.userAgent.match(/iPad/i)==null){$('#page-header-bg[data-parallax="1"]').transition({y:$(window).scrollTop()*-.2},0);$('#page-header-bg[data-parallax="1"] .span_6').css({'opacity':1-($scrollTop/(pageHeaderHeight-($('#page-header-bg .col.span_6').height()*2)+60))});$('#page-header-bg[data-parallax="1"] .span_6').stop(true,true).transition({y:$(window).scrollTop()*-.14},0);if($('#page-header-bg[data-parallax="1"] .span_6').css('opacity')==0){$('#page-header-bg[data-parallax="1"] .span_6, #page-header-bg[data-parallax="1"] #portfolio-filters').hide();}else{$('#page-header-bg[data-parallax="1"] .span_6, #page-header-bg[data-parallax="1"] #portfolio-filters').show();}
  1273. if(($scrollTop/(pageHeaderHeight+$('#header-space').height()+extraHeight))>1){$('#page-header-bg').css('visibility','hidden').hide();}
  1274. else{$('#page-header-bg').css('visibility','visible').show();}}});}
  1275. var timeout;var productToAdd;$('.woocommerce .product-wrap .add_to_cart_button').click(function(){productToAdd=$(this).parents('li').find('h3').text();$('#header-outer .cart-notification span.item-name').html(productToAdd);});$('#header-outer .cart-notification').hover(function(){$(this).fadeOut(400);$('#header-outer .widget_shopping_cart').stop(true,true).fadeIn(400);$('#header-outer .cart_list').stop(true,true).fadeIn(400);clearTimeout(timeout);});$('#header-outer div.cart-outer').hover(function(){$('#header-outer .widget_shopping_cart').stop(true,true).fadeIn(400);$('#header-outer .cart_list').stop(true,true).fadeIn(400);clearTimeout(timeout);$('#header-outer .cart-notification').fadeOut(300);},function(e){$('#header-outer .widget_shopping_cart').stop(true,true).fadeOut(300);$('#header-outer .cart_list').stop(true,true).fadeOut(300);});$('body').bind('added_to_cart',shopping_cart_dropdown_show);$('body').bind('added_to_cart',shopping_cart_dropdown);function shopping_cart_dropdown(){if(!$('.widget_shopping_cart .widget_shopping_cart_content .cart_list .empty').length&&$('.widget_shopping_cart .widget_shopping_cart_content .cart_list').length>0){$('.cart-menu-wrap').addClass('has_products');}}
  1276. function shopping_cart_dropdown_show(e){clearTimeout(timeout);if(!$('.widget_shopping_cart .widget_shopping_cart_content .cart_list .empty').length&&$('.widget_shopping_cart .widget_shopping_cart_content .cart_list').length>0&&typeof e.type!='undefined'){if(!$('#header-outer .cart-menu-wrap').hasClass('has_products')){setTimeout(function(){$('#header-outer .cart-notification').fadeIn(400);},400);}
  1277. else if(!$('#header-outer .cart-notification').is(':visible')){$('#header-outer .cart-notification').fadeIn(400);}else{$('#header-outer .cart-notification').show();}
  1278. timeout=setTimeout(hideCart,2700);}}
  1279. function hideCart(){$('#header-outer .cart-notification').stop(true,true).fadeOut();}
  1280. setTimeout(shopping_cart_dropdown,550);setTimeout(shopping_cart_dropdown,650);setTimeout(shopping_cart_dropdown,950);var $placeholder=$('#search input[type=text]').attr('data-placeholder');var logoHeight=parseInt($('#header-outer').attr('data-logo-height'));$('#search-btn').mousedown(function(){$(this).removeClass();$('#header-outer #search-outer').stop(true).fadeIn(600,'easeOutExpo');$('#search-outer > #search input[type="text"]').css({'top':$('#search-outer').height()/2-$('#search-outer > #search input[type="text"]').height()/2});$('#search input[type=text]').focus();if($('#search input[type=text]').attr('value')==$placeholder){$('#search input[type=text]').setCursorPosition(0);}
  1281. return false;});$('#search input[type=text]').keydown(function(){if($(this).attr('value')==$placeholder){$(this).attr('value','');}});$('#search input[type=text]').keyup(function(){if($(this).attr('value')==''){$(this).attr('value',$placeholder);$(this).setCursorPosition(0);}});$('#close').click(function(){closeSearch();return false;});$('#search-box input[type=text]').blur(function(e){closeSearch();});function closeSearch(){$('#header-outer #search-outer').stop(true).fadeOut(450,'easeOutExpo');}
  1282. $('#mobile-menu #mobile-search .container a#show-search').click(function(){$('#mobile-menu .container > ul').slideUp(500);return false;});var logoHeight=parseInt($('#header-outer').attr('data-logo-height'));var headerPadding=parseInt($('#header-outer').attr('data-padding'));var usingLogoImage=$('#header-outer').attr('data-using-logo');if(isNaN(headerPadding)||headerPadding.length==0){headerPadding=28;}
  1283. if(isNaN(logoHeight)||usingLogoImage.length==0){usingLogoImage=false;logoHeight=30;}
  1284. function headerInit(){$('#header-outer #logo img').css({'height':logoHeight,});$('#header-outer').css({'padding-top':headerPadding});$('header#top nav > ul > li > a').css({'padding-bottom':((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding,'padding-top':(logoHeight/2)-($('header#top nav > ul > li > a').height()/2)});$('#header-outer .cart-menu').css({'padding-bottom':Math.ceil(((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding),'padding-top':Math.ceil(((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding)});$('header#top nav > ul li#search-btn').css({'padding-bottom':(logoHeight/2)-($('header#top nav > ul li#search-btn a').height()/2),'padding-top':(logoHeight/2)-($('header#top nav > ul li#search-btn a').height()/2)});$('header#top .sf-menu > li > ul, header#top .sf-menu > li.sfHover > ul').css({'top':$('header#top nav > ul > li > a').outerHeight()});setTimeout(function(){$('#search-outer #search-box .ui-autocomplete').css({'top':parseInt($('#header-outer').outerHeight())+'px'});},1000);$('#search-outer #search-box .ui-autocomplete').css({'top':parseInt($('#header-outer').outerHeight())+'px'});if($('#header-outer').attr('data-using-secondary')=='1'){$('#header-space').css('height',parseInt($('#header-outer').outerHeight())+34);}else{$('#header-space').css('height',$('#header-outer').outerHeight());}
  1285. $('#header-outer .container, #header-outer .cart-menu').css('visibility','visible');$('#search-outer, #search .container').css({'height':logoHeight+headerPadding*2});$('#search-outer > #search input[type="text"]').css({'font-size':43,'top':((logoHeight+headerPadding*2)/2)-$('#search-outer > #search input[type="text"]').height()/2});$('#search-outer > #search #close a').css({'top':((logoHeight+headerPadding*2)/2)-8});if(usingLogoImage==false)$('header#top #logo').css('margin-top','4px');}
  1286. $(window).load(function(){if($(window).scrollTop()==0){if($('#header-outer').attr('data-using-secondary')=='1'){$('#header-space').css('height',parseInt($('#header-outer').outerHeight())+34);}else{$('#header-space').css('height',$('#header-outer').outerHeight());}}});var headerResize=$('#header-outer').attr('data-header-resize');if(headerResize==1){headerInit();$(window).bind('scroll',smallNav);if($('body').hasClass('mobile')){$(window).resize(headerInit);}}
  1287. else{headerInit();}
  1288. function smallNav(){var $offset=$(window).scrollTop();var $windowWidth=$(window).width();var shrinkNum=6;if(logoHeight>=40&&logoHeight<60)shrinkNum=8;else if(logoHeight>=60&&logoHeight<80)shrinkNum=10;else if(logoHeight>=80)shrinkNum=14;if($offset>0&&$windowWidth>1000){$('#header-outer #logo img').stop(true,true).animate({'height':logoHeight-shrinkNum},{queue:false,duration:250,easing:'easeOutCubic'});$('#header-outer').stop(true,true).animate({'padding-top':headerPadding/1.8},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top nav > ul > li > a').stop(true,true).animate({'padding-bottom':(((logoHeight-shrinkNum)/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding/1.8,'padding-top':((logoHeight-shrinkNum)/2)-($('header#top nav > ul > li > a').height()/2)},{queue:false,duration:250,easing:'easeOutCubic'});$('#header-outer .cart-menu').stop(true,true).animate({'padding-bottom':Math.floor((((logoHeight-shrinkNum)/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding/1.7),'padding-top':Math.floor((((logoHeight-shrinkNum)/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding/1.7)},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top nav > ul li#search-btn').stop(true,true).animate({'padding-bottom':Math.floor(((logoHeight-shrinkNum)/2)-($('header#top nav > ul li#search-btn a').height()/2)),'padding-top':Math.floor(((logoHeight-shrinkNum)/2)-($('header#top nav > ul li#search-btn a').height()/2))},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top .sf-menu > li > ul, header#top .sf-menu > li.sfHover > ul').stop(true,true).animate({'top':Math.floor($('header#top nav > ul > li > a').height()+(((logoHeight-shrinkNum)/2)-($('header#top nav > ul > li > a').height()/2))*2+headerPadding/1.8),},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer #search-box .ui-autocomplete').stop(true,true).animate({'top':Math.floor((logoHeight-shrinkNum)+(headerPadding*2)/1.8)+'px'},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer, #search .container').stop(true,true).animate({'height':Math.floor((logoHeight-shrinkNum)+(headerPadding*2)/1.8)},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer > #search input[type="text"]').stop(true,true).animate({'font-size':30,'line-height':'30px','top':((logoHeight-shrinkNum+headerPadding+5)/2)-($('#search-outer > #search input[type="text"]').height()-15)/2},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer > #search #close a').stop(true,true).animate({'top':((logoHeight-shrinkNum+headerPadding+5)/2)-10},{queue:false,duration:250,easing:'easeOutCubic'});if(usingLogoImage==false)$('header#top #logo').stop(true,true).animate({'margin-top':0},{queue:false,duration:450,easing:'easeOutExpo'});$(window).unbind('scroll',smallNav);$(window).bind('scroll',bigNav);}}
  1289. function bigNav(){var $offset=$(window).scrollTop();var $windowWidth=$(window).width();if($offset==0&&$windowWidth>1000){$('#header-outer #logo img').stop(true,true).animate({'height':logoHeight,},{queue:false,duration:250,easing:'easeOutCubic'});$('#header-outer').stop(true,true).animate({'padding-top':headerPadding},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top nav > ul > li > a').stop(true,true).animate({'padding-bottom':((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding,'padding-top':(logoHeight/2)-($('header#top nav > ul > li > a').height()/2)},{queue:false,duration:250,easing:'easeOutCubic'});$('#header-outer .cart-menu').stop(true,true).animate({'padding-bottom':Math.ceil(((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding),'padding-top':Math.ceil(((logoHeight/2)-($('header#top nav > ul > li > a').height()/2))+headerPadding)},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top nav > ul li#search-btn').stop(true,true).animate({'padding-bottom':Math.floor((logoHeight/2)-($('header#top nav > ul li#search-btn a').height()/2)),'padding-top':Math.ceil((logoHeight/2)-($('header#top nav > ul li#search-btn a').height()/2))},{queue:false,duration:250,easing:'easeOutCubic'});$('header#top .sf-menu > li > ul, header#top .sf-menu > li.sfHover > ul').stop(true,true).animate({'top':$('header#top nav > ul > li > a').height()+(((logoHeight)/2)-($('header#top nav > ul > li > a').height()/2))*2+headerPadding,},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer #search-box .ui-autocomplete').stop(true,true).animate({'top':Math.ceil(logoHeight+headerPadding*2)+'px'},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer, #search .container').stop(true,true).animate({'height':Math.ceil(logoHeight+headerPadding*2)},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer > #search input[type="text"]').stop(true,true).animate({'font-size':43,'line-height':'43px','top':((logoHeight+headerPadding*2)/2)-30},{queue:false,duration:250,easing:'easeOutCubic'});$('#search-outer > #search #close a').stop(true,true).animate({'top':((logoHeight+headerPadding*2)/2)-8},{queue:false,duration:250,easing:'easeOutCubic'});if(usingLogoImage==false)$('header#top #logo').stop(true,true).animate({'margin-top':4},{queue:false,duration:450,easing:'easeOutExpo'});$(window).unbind('scroll',bigNav);$(window).bind('scroll',smallNav);}}
  1290. $('#toggle-nav').click(function(){$('#mobile-menu').stop(true,true).slideToggle(500);return false;});$('#mobile-menu .container ul li').each(function(){if($(this).find('> ul').length>0){$(this).addClass('has-ul');$(this).find('> a').append('<span class="sf-sub-indicator"><i class="icon-angle-down"></i></span>');}});$('#mobile-menu .container ul li:has(">ul") > a .sf-sub-indicator').click(function(){$(this).parent().parent().toggleClass('open');$(this).parent().parent().find('> ul').stop(true,true).slideToggle();return false;});function piVertCenter(){$('.portfolio-items > .col').each(function(){var $colHeight=$(this).find('.work-item').height();var $infoHeight=$(this).find('.vert-center').height();-$(this).find('.work-info .vert-center').css('margin-top',(($colHeight/2)-($infoHeight/2))-15);});}
  1291. $(window).load(function(){piVertCenter();});function ie8Width(){if($(window).width()>=1300){$('.container').css('max-width','1100px');}else{$('.container').css('max-width','880px');}}
  1292. if($(window).width()>=1300&&$('html').hasClass('no-video')){$('.container').css('max-width','1100px');$(window).resize(ie8Width);};$(window).smartresize(function(){carouselHeightCalcs();piVertCenter();portfolioCommentOrder();testimonialHeightResize();});$(window).resize(function(){portfolioDeviceCheck();fullWidthSections();fullwidthImgOnlySizing();});if(!$('body').hasClass('mobile')&&!navigator.userAgent.match(/(iPad|IEMobile)/)){$('.portfolio-items .col .work-item').hover(function(){$(this).find('.work-info .vert-center').stop().animate({'padding-top':15},400,'easeOutCubic');$(this).find('.work-info, .work-info .vert-center *, .work-info > i').stop().animate({'opacity':1},250,'easeOutCubic');$(this).find('.work-info-bg').stop().animate({'opacity':0.88},250,'easeOutCubic');},function(){$(this).find('.work-info .vert-center').stop().animate({'padding-top':0},400,'easeOutCubic');$(this).find('.work-info, .work-info .vert-center *, .work-info > i').stop().animate({'opacity':0},250,'easeOutCubic');$(this).find('.work-info-bg').stop().animate({'opacity':0},250,'easeOutCubic');});}
  1293. else{portfolioDeviceCheck();}
  1294. function portfolioDeviceCheck(){if($('body').hasClass('mobile')||navigator.userAgent.match(/(iPad|IEMobile)/)){if($('.portfolio-items .col .work-item').find('a:not(".pp")').length>0){$('.portfolio-items .col .work-item').find('a.pp').css('display','none');}
  1295. else{$('.portfolio-items .col .work-item').find('a:not(".pp")').css('display','none');}}else{$('.portfolio-items .col .work-item').find('a').css('display','inline');}}
  1296. $('#portfolio-filters').hover(function(){$(this).find('> ul').stop(true,true).slideDown(500,'easeOutExpo');$(this).find('a#sort-portfolio span').html($(this).find('a#sort-portfolio').attr('data-sortable-label'));},function(){var $activeCat=$(this).find('a.active').html();if(typeof $activeCat=='undefined'||$activeCat.length==0)$activeCat=$(this).attr('data-sortable-label');$(this).find('a#sort-portfolio span').html($activeCat);$(this).find('> ul').stop(true,true).slideUp(500,'easeOutExpo');});if($('body').hasClass('mobile')||navigator.userAgent.match(/(iPad|IEMobile)/)){$('#portfolio-filters').unbind('mouseenter mouseleave');$('#portfolio-filters > a, #portfolio-filters ul li a').click(function(){$(this).parents('#portfolio-filters').find('> ul').stop(true,true).slideToggle(600,'easeOutCubic');});}
  1297. $('#portfolio-filters ul li a').click(function(){$(this).parents('#portfolio-filters').find('#sort-portfolio span').html($(this).html());});$('#portfolio-filters-inline ul li a').click(function(){$(this).parents('ul').find('li a').removeClass('active');$(this).addClass('active');$(this).parents('#portfolio-filters-inline').find('#current-category').html($(this).html());});$('#portfolio-filters-inline .container > ul > li:nth-child(2) a').click();$('body.single-portfolio #header-outer nav > ul > li > a:contains("Portfolio")').parents('li').addClass('current-menu-item');$('body.single-post #header-outer nav > ul > li > a:contains("Blog")').parents('li').addClass('current-menu-item');function centerLove(){$('.post').each(function(){var $loveWidth=$(this).find('.post-meta .nectar-love').outerWidth();var $loveWrapWidth=$(this).find('.post-meta .nectar-love-wrap').width();$(this).find('.post-meta .nectar-love').css('margin-left',$loveWrapWidth/2-$loveWidth/2+'px');$(this).find('.nectar-love-wrap').css('visibility','visible');});}
  1298. $('.nectar-love').on('click',function(){centerLove();});centerLove();function portfolioCommentOrder(){if($('body').hasClass('mobile')&&$('body').hasClass('single-portfolio')&&$('#respond').length>0){$('#sidebar').insertBefore('.comments-section');}
  1299. else if($('body').hasClass('single-portfolio')&&$('#respond').length>0){$('#sidebar').insertAfter('#post-area');}}
  1300. portfolioCommentOrder();var sidebarFollow=$('.single-portfolio #sidebar').attr('data-follow-on-scroll');function portfolioSidebarFollow(){if($('body.single-portfolio').length>0&&sidebarFollow==1&&!$('body').hasClass('mobile')&&parseInt($('#sidebar').height())+50<=parseInt($('#post-area').height())){$('#sidebar').addClass('fixed-sidebar');var $footer='#footer-outer';if($('#call-to-action').length>0)$footer='#call-to-action';$('#sidebar').stickyMojo({footerID:$footer,contentID:'#post-area'});}}
  1301. $(window).load(portfolioSidebarFollow);var isotopeCatArr=[];var $portfolioCatCount=0;$('#portfolio-filters ul li, #portfolio-filters-inline ul li').each(function(i){if($(this).find('a').length>0){isotopeCatArr[$portfolioCatCount]=$(this).find('a').attr('data-filter').substring(1);$portfolioCatCount++;}});isotopeCatArr.shift();var itemCats='';$('#portfolio > div').each(function(i){itemCats+=$(this).attr('data-project-cat');});itemCats=itemCats.split(' ');itemCats.pop();itemCats=$.unique(itemCats);var notFoundCats=[];$.grep(isotopeCatArr,function(el){if($.inArray(el,itemCats)==-1)notFoundCats.push(el);});if(notFoundCats.length!=0){$('#portfolio-filters ul li, #portfolio-filters-inline ul li').each(function(){if($(this).find('a').length>0){if($.inArray($(this).find('a').attr('data-filter').substring(1),notFoundCats)!=-1){$(this).hide();}}})}
  1302. var completed=0;if($('a.facebook-share').length>0||$('a.twitter-share').length>0||$('a.pinterest-share').length>0){$.getJSON("https://graph.facebook.com/?id="+window.location+'&callback=?',function(data){if((data.shares!=0)&&(data.shares!=undefined)&&(data.shares!=null)){$('.facebook-share a span.count, a.facebook-share span.count').html(data.shares);}
  1303. else{$('.facebook-share a span.count, a.facebook-share span.count').html(0);}
  1304. completed++;socialFade();});function facebookShare(){window.open('https://www.facebook.com/sharer/sharer.php?u='+window.location,"facebookWindow","height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1305. return false;}
  1306. $('.facebook-share').click(facebookShare);function twitterShare(){window.open('https://twitter.com/intent/tweet?text='+$(".section-title h1").text()+' '+window.location,"twitterWindow","height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1307. return false;}
  1308. function wooTwitterShare(){window.open('https://twitter.com/intent/tweet?text='+$("h1.product_title").text()+' '+window.location,"twitterWindow","height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1309. return false;}
  1310. $('.nectar-social:not(".woo") .twitter-share').click(twitterShare);$('.nectar-social.woo .twitter-share').click(wooTwitterShare);$.getJSON('https://api.pinterest.com/v1/urls/count.json?url='+window.location+'&callback=?',function(data){if((data.count!=0)&&(data.count!=undefined)&&(data.count!=null)){$('.pinterest-share a span.count, a.pinterest-share span.count').html(data.count);}
  1311. else{$('.pinterest-share a span.count, a.pinterest-share span.count').html(0);}
  1312. completed++;socialFade();});function pinterestShare(){var $sharingImg=($('#full_width_portfolio').length>0&&$('#full_width_portfolio').attr('data-featured-img')!='empty')?$('#full_width_portfolio').attr('data-featured-img'):$('#post-area img').first().attr('src');window.open('https://pinterest.com/pin/create/button/?url='+window.location+'&media='+$sharingImg+'&description='+$('.section-title h1').text(),"pinterestWindow","height=640,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1313. return false;}
  1314. function wooPinterestShare(){window.open('https://pinterest.com/pin/create/button/?url='+window.location+'&media='+$('img.attachment-shop_single').first().attr('src')+'&description='+$('h1.product_title').text(),"pinterestWindow","height=640,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1315. return false;}
  1316. $('.nectar-social:not(".woo") .pinterest-share').click(pinterestShare);$('.nectar-social.woo .pinterest-share').click(wooPinterestShare);function googlePlusShare(){window.open('https://plus.google.com/share?url='+window.location,"googlePlusWindow","height=600,width=500,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0")
  1317. return false;}
  1318. $('.google-plus-share').click(googlePlusShare);$('a.nectar-sharing > span.count').hide().css('width','auto');function socialFade(){if(completed==$('a.nectar-sharing').length&&$('a.nectar-sharing').parent().hasClass('in-sight')){$('.nectar-social > .nectar-sharing').animate({'padding-right':'15px'},350,'easeOutSine');$('.nectar-social .nectar-love span').show(350,'easeOutSine',function(){$(this).animate({'opacity':1},800);});$('.nectar-social a.nectar-sharing').each(function(i){var $that=$(this);$(this).find('> span').show(350,'easeOutSine',function(){$that.find('> span').animate({'opacity':1},800);});});}}
  1319. $('.nectar-social').each(function(){$(this).appear(function(){$(this).addClass('in-sight');socialFade();$(this).find('> *').each(function(i){var $that=$(this);setTimeout(function(){$that.delay(i*100).queue(function(){var $that=$(this);$(this).addClass('hovered');setTimeout(function(){$that.removeClass('hovered');},300);});},450);});},{accX:0,accY:-115});});}
  1320. var $scrollTop=$(window).scrollTop();if($('#to-top').length>0&&$(window).width()>1020){if($scrollTop>350){$(window).bind('scroll',hideToTop);}
  1321. else{$(window).bind('scroll',showToTop);}}
  1322. function showToTop(){if($scrollTop>350){$('#to-top').stop(true,true).animate({'bottom':'17px'},350,'easeInOutCubic');$(window).unbind('scroll',showToTop);$(window).bind('scroll',hideToTop);}}
  1323. function hideToTop(){if($scrollTop<350){$('#to-top').stop(true,true).animate({'bottom':'-30px'},350,'easeInOutCubic');$(window).unbind('scroll',hideToTop);$(window).bind('scroll',showToTop);}}
  1324. if($('#to-top').length>0){var $windowHeight,$pageHeight,$footerHeight,$ctaHeight;function calcToTopColor(){$scrollTop=$(window).scrollTop();$windowHeight=$(window).height();$pageHeight=$('body').height();$footerHeight=$('#footer-outer').height();$ctaHeight=($('#call-to-action').length>0)?$('#call-to-action').height():0;if(($scrollTop-35+$windowHeight)>=($pageHeight-$footerHeight)&&$('#boxed').length==0){$('#to-top').addClass('dark');}
  1325. else{$('#to-top').removeClass('dark');}}
  1326. $(window).scroll(calcToTopColor);$(window).resize(calcToTopColor);}
  1327. $('#to-top').click(function(){$('body,html').stop().animate({scrollTop:0},800,'easeOutCubic')
  1328. return false;});var $portfolio_container=$('.portfolio-items:not(.carousel)');var clearIsoAnimation=null;var $window=jQuery(window);if($portfolio_container.length>0){$('#portfolio-filters ul li a, #portfolio-filters-inline ul li a').click(function(){clearTimeout(clearIsoAnimation);$('.isotope, .isotope .isotope-item').css('transition-duration','0.7s');clearIsoAnimation=setTimeout(function(){$('.isotope, .isotope .isotope-item').css('transition-duration','0s');},700);var selector=$(this).attr('data-filter');$portfolio_container.isotope({filter:selector});$('#portfolio-filters ul li a').removeClass('active');$(this).addClass('active');setTimeout(masonryZindex,700);return false;});$portfolio_container.imagesLoaded(function(){if($smoothCache==true&&$(window).width()>690&&$('body').outerHeight(true)>$(window).height()){niceScrollInit();$(window).trigger('resize')}
  1329. reLayout();masonryZindex();$window.resize(reLayout);$window.smartresize(masonryZindex);$('#portfolio-loading').stop(true,true).fadeOut(200);$('.portfolio-items .col').each(function(i){$(this).find('img, .work-meta, .nectar-love-wrap').delay(i*90).animate({'opacity':1},450);});});}
  1330. function reLayout(){var mediaQuerySize=getComputedStyle(document.body,':after').getPropertyValue('content');var windowSize=$window.width();var masonryObj;if(navigator.userAgent.match('MSIE 8')==null){mediaQuerySize=mediaQuerySize.replace(/"/g,'');}
  1331. var userDefinedColWidth;if($('.nectar-portfolio').attr('data-user-defined-cols')=='span4'){userDefinedColWidth=3}
  1332. else if($('.nectar-portfolio').attr('data-user-defined-cols')=='span3'){userDefinedColWidth=4}
  1333. var isFullWidth=$('.portfolio-items').attr('data-col-num')=='elastic';if($('#boxed').length>0){if(window.innerWidth>1300){mediaQuerySize='four';}else if(window.innerWidth<1300&&window.innerWidth>990){mediaQuerySize='three';}else if(window.innerWidth<990){mediaQuerySize='one';}}
  1334. switch(mediaQuerySize){case'five':(isFullWidth)?colWidth=5:colWidth=userDefinedColWidth;masonryObj={columnWidth:$portfolio_container.width()/parseInt(colWidth)};break;case'four':(isFullWidth)?colWidth=4:colWidth=userDefinedColWidth;masonryObj={columnWidth:$portfolio_container.width()/parseInt(colWidth)};break;case'three':(isFullWidth)?colWidth=3:colWidth=userDefinedColWidth;masonryObj={columnWidth:$portfolio_container.width()/parseInt(colWidth)};break;case'two':masonryObj={columnWidth:$portfolio_container.width()/2};break;case'one':masonryObj={columnWidth:$portfolio_container.width()/1};break;}
  1335. var tallColHeight=$('.portfolio-items .col.elastic-portfolio-item[class*="regular"]:first img').height();var multipler=(window.innerWidth>470)?2:1;$('.portfolio-items .col.elastic-portfolio-item[class*="tall"] img').css('height',(tallColHeight*multipler));var $layoutMode=($('.portfolio-items.masonry-items').length>0)?'masonry':'fitRows';$portfolio_container.isotope({resizable:false,itemSelector:'.element',layoutMode:$layoutMode,masonry:masonryObj}).isotope('reLayout');}
  1336. function masonryZindex(){var $coords={};var $zindexRelation={};$('body .portfolio-items .elastic-portfolio-item').each(function(){$matrix=matrixToArray($(this).css('transform'));$coords[$(this).index()]=$matrix[4];});var $corrdsArr=$.map($coords,function(value){return value;});$corrdsArr=removeDuplicates($corrdsArr);$corrdsArr.sort(function(a,b){return a-b});for(var i=0;i<$corrdsArr.length;i++){$zindexRelation[$corrdsArr[i]]=i*10;}
  1337. $.each($coords,function(k,v){var $zindex;var $coordCache=v;$.each($zindexRelation,function(k,v){if($coordCache==k){$zindex=v;}});$('body .portfolio-items .elastic-portfolio-item:eq('+k+')').css('z-index',$zindex);});}
  1338. function matrixToArray(matrix){return matrix.substr(7,matrix.length-8).split(', ');}
  1339. function removeDuplicates(inputArray){var i;var len=inputArray.length;var outputArray=[];var temp={};for(i=0;i<len;i++){temp[inputArray[i]]=0;}
  1340. for(i in temp){outputArray.push(i);}
  1341. return outputArray;}
  1342. if($("body").hasClass("single-portfolio")||$('body').hasClass("error404")||$('body').hasClass("search-results")){$("li").removeClass("current_page_parent").removeClass("current-menu-ancestor").removeClass('current_page_ancestor');}
  1343. $('.recent_projects_widget div a:nth-child(3n+3), #sidebar #flickr div:nth-child(3n+3) a, #footer-outer #flickr div:nth-child(3n+3) a').css('margin-right','0px');$('code').find('br').remove();if($('.container.main-content > .row > div:last-child').hasClass('clear')){$('.container.main-content > .row > div:last-child').css('padding-bottom','0');}
  1344. $('.home-wrap .blog-recent > div:last-child').addClass('col_last');$('.wpcf7-form p:has(input[type=submit])').css('padding-bottom','0px');$('#featured article').each(function(){if($(this).find('h2').attr('data-has-caption')=='0'){$(this).parents('.slide').addClass('no-caption');}});$('article.post.format-chat .content-inner dt:odd').css('color','#333');$('.full-width-section').each(function(){$(this).find('> .span_12 > div.col_last').last().css('margin-bottom','0');});$('#portfolio-extra p').each(function(){if($(this).find('*').length==1&&$(this).find('img').length==1){$(this).find('img').unwrap();}});$('.carousel-heading').each(function(){if($(this).find('h2').length>0)$(this).find('.carousel-prev, .carousel-next').css('top','7px');});$('.carousel-wrap').each(function(){if($(this).find('.carousel-heading .container:empty').length>0)$(this).find('.carousel-heading').remove();});$('.woocommerce div.product div.images div.thumbnails a:nth-child(4n+4)').css('margin-right','0px');$('article.post .gallery-slider .gallery, article.post .gallery-slider .jetpack-slideshow, .single-portfolio .gallery-slider .gallery, .single-portfolio .gallery-slider .jetpack-slideshow').remove();$('.woocommerce .span_9 .products.related .products li:nth-child(4), .woocommerce .span_9 .products.upsells .products li:nth-child(4)').remove();$('.woocommerce .span_9 .products.related .products li:nth-child(3), .woocommerce .span_9 .products.upsells .products li:nth-child(3)').css('margin-right','0');$('div.clients').each(function(){$(this).find('> div').each(function(){if($(this).find('a').length==0){$(this).addClass('no-link');}});});if($('body.woocommerce').find('#page-header-bg').length>0){$('.container-wrap').css({'margin-top':'0px','padding-top':'30px'});}
  1345. $('header#top nav .megamenu .sub-menu a.sf-with-ul .sf-sub-indicator').remove();if($('.demo_store').length>0)$('#header-outer, #header-space').css('margin-top','32px');$('#footer-widgets .container .row > div:last-child').addClass('col_last');$('.swiper-slide.external-button-1 .buttons > div:nth-child(1) a').attr('target','_blank');$('.swiper-slide.external-button-2 .buttons > div:nth-child(2) a').attr('target','_blank');$(".portfolio-items a[href*='http://']:not([href*='"+window.location.hostname+"'])").attr("target","_blank");});function resizeIframe(){var element=document.getElementById("pp_full_res").getElementsByTagName("iframe");var height=element[0].contentWindow.document.body.scrollHeight;element[0].style.height=height+'px';document.getElementsByClassName("pp_content_container")[0].style.height=height+40+'px';document.getElementsByClassName("pp_content")[0].style.height=height+40+'px';}
  1346. /*!
  1347. * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
  1348. * http://cherne.net/brian/resources/jquery.hoverIntent.html
  1349. */
  1350. (function(e){e.fn.hoverIntent=function(t,n,r){var i={interval:100,sensitivity:7,timeout:0};if(typeof t==="object"){i=e.extend(i,t)}else if(e.isFunction(n)){i=e.extend(i,{over:t,out:n,selector:r})}else{i=e.extend(i,{over:t,out:t,selector:n})}var s,o,u,a;var f=function(e){s=e.pageX;o=e.pageY};var l=function(t,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if(Math.abs(u-s)+Math.abs(a-o)<i.sensitivity){e(n).off("mousemove.hoverIntent",f);n.hoverIntent_s=1;return i.over.apply(n,[t])}else{u=s;a=o;n.hoverIntent_t=setTimeout(function(){l(t,n)},i.interval)}};var c=function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t);t.hoverIntent_s=0;return i.out.apply(t,[e])};var h=function(t){var n=jQuery.extend({},t);var r=this;if(r.hoverIntent_t){r.hoverIntent_t=clearTimeout(r.hoverIntent_t)}if(t.type=="mouseenter"){u=n.pageX;a=n.pageY;e(r).on("mousemove.hoverIntent",f);if(r.hoverIntent_s!=1){r.hoverIntent_t=setTimeout(function(){l(n,r)},i.interval)}}else{e(r).off("mousemove.hoverIntent",f);if(r.hoverIntent_s==1){r.hoverIntent_t=setTimeout(function(){c(n,r)},i.timeout)}}};return this.on({"mouseenter.hoverIntent":h,"mouseleave.hoverIntent":h},i.selector)}})(jQuery);var map;jQuery(document).ready(function(){jQuery('.contact_form').css({'display':'none'});jQuery('a.contact').click(function(){var f=jQuery(this).parents('div:first').find('.contact_form');if(f.css('display')=='none'){f.slideDown(400);jQuery('document,html,body').animate({'scrollTop':f.offset().top-200},400);}else{f.slideUp(400);jQuery('document,html,body').animate({'scrollTop':f.parents('.full-width-section:first').offset().top-50},400);}
  1351. return false;});jQuery('a').click(function(){return checkMenu(jQuery(this).attr('href'));});});function checkMenu(link){if(link!=undefined&&link.indexOf('#')!=-1){var a=link.substr(link.indexOf('#')+1);if(jQuery('#'+a).length){var top=-1;top=jQuery('#'+a).offset().top;if(top>-1){jQuery('document,html,body').animate({'scrollTop':(top-50)},1200,'easeInOutCubic');return false;}else return true;}else return true;}else return true;};var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-19788094-33']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';ga.setAttribute('async','true');document.documentElement.firstChild.appendChild(ga);})();var mejsL10n={"language":"hu-HU","strings":{"Close":"Bez\u00e1r\u00e1s","Fullscreen":"Teljes k\u00e9perny\u0151","Download File":"F\u00e1jl let\u00f6lt\u00e9se","Download Video":"Vide\u00f3 let\u00f6lt\u00e9se","Play\/Pause":"Lej\u00e1tsz\u00e1s\/Sz\u00fcnet","Mute Toggle":"N\u00e9m\u00edt\u00e1s","None":"Egyik sem","Turn off Fullscreen":"Teljes k\u00e9perny\u0151 kikapcsol\u00e1sa","Go Fullscreen":"Teljes k\u00e9perny\u0151 bekapcsol\u00e1sa","Unmute":"N\u00e9m\u00edt\u00e1s felold\u00e1sa","Mute":"N\u00e9m\u00edt\u00e1s","Captions\/Subtitles":"K\u00e9pal\u00e1\u00edr\u00e1s\/Felirat"}};var _wpmejsSettings={"pluginPath":"\/wp-includes\/js\/mediaelement\/"};
  1352. /*!
  1353. *
  1354. * MediaElement.js
  1355. * HTML5 <video> and <audio> shim and player
  1356. * http://mediaelementjs.com/
  1357. *
  1358. * Creates a JavaScript object that mimics HTML5 MediaElement API
  1359. * for browsers that don't understand HTML5 or can't play the provided codec
  1360. * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
  1361. *
  1362. * Copyright 2010-2014, John Dyer (http://j.hn)
  1363. * License: MIT
  1364. *
  1365. */
  1366. var mejs=mejs||{};mejs.version="2.18.1",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;len>i;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.hasSemiNativeFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasSemiNativeFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasSemiNativeFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasSemiNativeFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&(this.pluginApi.setVolume("youtube"==this.pluginType?100*a:a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id),mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}},mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b,this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a],delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case"flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case"silverlight":b.pluginElement=document.getElementById(b.id),b.pluginApi=b.pluginElement.Content.MediaElementJS}null!=b.pluginApi&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e,f,g=this.pluginMediaElements[a];if(g){d={type:b,target:g};for(e in c)g[e]=c[e],d[e]=c[e];f=c.bufferedTime||0,d.target.buffered=d.buffered={start:function(){return 0},end:function(){return f},length:1},g.dispatchEvent(d)}}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=f.getAttribute(h?"src":"href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"","native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase()};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),!(!c||"auto"!==b.mode&&"auto_plugin"!==b.mode&&"native"!==b.mode||mejs.MediaFeatures.isBustedNativeHTTPS&&b.httpsBasicAuthSite===!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,mejs.MediaPluginBridge.registerPluginElement(m,n,j),o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),i=["id="+m,"jsinitfunction=mejs.MediaPluginBridge.initPlugin","jscallbackfunction=mejs.MediaPluginBridge.fireEvent","isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&i.push("flash"==a.method?"file="+mejs.Utility.encodeUrl(a.url):"file="+a.url),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings,b):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="//player.vimeo.com/video/'+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+s+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+s+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var t=$f(o.childNodes[0]);t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}t.playVideo=function(){t.api("play")},t.stopVideo=function(){t.api("unload")},t.pauseVideo=function(){t.api("pause")},t.seekTo=function(a){t.api("seekTo",a)},t.setVolume=function(a){t.api("setVolume",a)},t.setMuted=function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)},t.addEvent("play",function(){a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){a(t,n,"pause")}),t.addEvent("finish",function(){a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),n.pluginElement=o,n.pluginApi=t,mejs.MediaPluginBridge.initPlugin(m)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b){var c,d=a.htmlMediaElement;for(c in mejs.HtmlMediaElement)d[c]=mejs.HtmlMediaElement[c];return b.success(d,d),d}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c,mejs.MediaPluginBridge.initPlugin(a.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(){return 0},end:function(){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,mejs.MediaPluginBridge.initPlugin(a),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b){"use strict";var c={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};c.getLanguage=function(){var a=c.locale.language||window.navigator.userLanguage||window.navigator.language;return c.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(c.locale.language=mejsL10n.language),c.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},c.methods.t=function(a,b){return c.locale.strings&&c.locale.strings[b.context]&&c.locale.strings[b.context][a]&&(a=c.locale.strings[b.context][a]),c.methods.checkPlain(a)},c.t=function(a,b){if("string"==typeof a&&a.length>0){var d=c.getLanguage();return b=b||{context:d},c.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=c}(document,mejs),function(a){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),
  1367. /*!
  1368. *
  1369. * MediaElementPlayer
  1370. * http://mediaelementjs.com/
  1371. *
  1372. * Creates a controller bar for HTML5 <video> add <audio> tags
  1373. * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
  1374. *
  1375. * Copyright 2010-2013, John Dyer (http://j.hn/)
  1376. * License: MIT
  1377. *
  1378. */
  1379. "undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.volume+.1,1);b.setVolume(c)}},{keys:[40],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.volume-.1,0);b.setVolume(c)}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.setMuted(a.media.muted?!1:!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isVideo=b.isDynamic?b.options.isVideo:"audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else{b.$media.removeAttr("controls");var f=mejs.i18n.t(b.isVideo?"Video Player":"Audio Player");if(a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(){if(!b.controlsAreVisible){b.showControls(!0);var a=b.container.find(".mejs-playpause-button > button");a.focus()}}),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),c.isiOS){var g=b.$media.clone();b.container.find(".mejs-mediaelement").append(g),b.$media.remove(),b.$node=b.$media=g,b.node=b.media=g[0]}else b.container.find(".mejs-mediaelement").append(b.$media);b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var h=b.isVideo?"video":"audio",i=h.substring(0,1).toUpperCase()+h.substring(1);b.width=b.options[h+"Width"]>0||b.options[h+"Width"].toString().indexOf("%")>-1?b.options[h+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.media.style.width:null!==b.media.getAttribute("width")?b.$media.attr("width"):b.options["default"+i+"Width"],b.height=b.options[h+"Height"]>0||b.options[h+"Height"].toString().indexOf("%")>-1?b.options[h+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.media.style.height:null!==b.$media[0].getAttribute("height")?b.$media.attr("height"):b.options["default"+i+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.css("visibility","visible").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").css("visibility","visible").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.css("visibility","visible").css("display","block"),b.container.find(".mejs-control").css("visibility","visible").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block")})):(c.controls.css("visibility","hidden").css("display","block"),c.container.find(".mejs-control").css("visibility","hidden").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:1500,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(){var a=this;null!==a.controlsTimer&&(clearTimeout(a.controlsTimer),delete a.controlsTimer,a.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){f.options.clickToPlayPause&&(f.media.paused?f.play():f.pause())},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(2500)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(2500))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(1e3))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),b.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(b){}f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(){f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25))},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&f.container.find(".mejs-overlay-play").hide()}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(b,c){var d=this;if(!d.options.setDimensions)return!1;if("undefined"!=typeof b&&(d.width=b),"undefined"!=typeof c&&(d.height=c),d.height.toString().indexOf("%")>0||"none"!==d.$node.css("max-width")&&"t.width"!==d.$node.css("max-width")||d.$node[0].currentStyle&&"100%"===d.$node[0].currentStyle.maxWidth){var e=function(){return d.isVideo?d.media.videoWidth&&d.media.videoWidth>0?d.media.videoWidth:null!==d.media.getAttribute("width")?d.media.getAttribute("width"):d.options.defaultVideoWidth:d.options.defaultAudioWidth}(),f=function(){return d.isVideo?d.media.videoHeight&&d.media.videoHeight>0?d.media.videoHeight:null!==d.media.getAttribute("height")?d.media.getAttribute("height"):d.options.defaultVideoHeight:d.options.defaultAudioHeight}(),g=d.container.parent().closest(":visible").width(),h=d.container.parent().closest(":visible").height(),i=d.isVideo||!d.options.autosizeProgress?parseInt(g*f/e,10):f;isNaN(i)&&(i=h),d.container.parent().length>0&&"body"===d.container.parent()[0].tagName.toLowerCase()&&(g=a(window).width(),i=a(window).height()),i&&g&&(d.container.width(g).height(i),d.$media.add(d.container.find(".mejs-shim")).width("100%").height("100%"),d.isVideo&&d.media.setVideoSize&&d.media.setVideoSize(g,i),d.layers.children(".mejs-layer").width("100%").height("100%"))}else d.container.width(d.width).height(d.height),d.layers.children(".mejs-layer").width(d.width).height(d.height)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null;if(b.container.is(":visible")&&e.length&&e.is(":visible")){b.options&&!b.options.autosizeProgress&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).bind("click",function(){f.options.clickToPlayPause&&e.paused&&e.play()});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length,f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this;c=b(c,f.id),c.d&&a(document).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this;c=b(c,e.id),c.d&&a(document).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return this.each(b===!1?function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}:function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:mejs.i18n.t("Play"),pauseText:mejs.i18n.t("Pause")}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(i.removeClass("mejs-play").addClass("mejs-pause"),j.attr({title:h.pauseText,"aria-label":h.pauseText})):(i.removeClass("mejs-pause").addClass("mejs-play"),j.attr({title:h.playText,"aria-label":h.playText}))}var g=this,h=g.options,i=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+h.playText+'" aria-label="'+h.playText+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),j=i.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t("Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.")}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){a('<div class="mejs-time-rail"><span class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c),c.find(".mejs-time-buffering").hide();var f=this,g=c.find(".mejs-time-total"),h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"),j=c.find(".mejs-time-handle"),k=c.find(".mejs-time-float"),l=c.find(".mejs-time-float-current"),m=c.find(".mejs-time-slider"),n=function(a){var c,d=g.offset(),f=g.width(),h=0,i=0,j=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>f+d.left&&(c=f+d.left),j=c-d.left,h=j/f,i=.02>=h?0:h*e.duration,o&&i!==e.currentTime&&e.setCurrentTime(i),mejs.MediaFeatures.hasTouch||(k.css("left",j),l.html(mejs.Utility.secondsToTimeCode(i,b.options)),k.show()))},o=!1,p=!1,q=0,r=!1,s=b.options.autoRewind,t=function(){var a=e.currentTime,c=mejs.i18n.t("Time Slider"),d=mejs.Utility.secondsToTimeCode(a,b.options),f=e.duration;m.attr({"aria-label":c,"aria-valuemin":0,"aria-valuemax":f,"aria-valuenow":a,"aria-valuetext":d,role:"slider",tabindex:0})},u=function(){var a=new Date;a-q>=1e3&&e.play()};m.bind("focus",function(){b.options.autoRewind=!1}),m.bind("blur",function(){b.options.autoRewind=s}),m.bind("keydown",function(a){new Date-q>=1e3&&(r=e.paused);var b=a.keyCode,c=e.duration,d=e.currentTime;switch(b){case 37:d-=1;break;case 39:d+=1;break;case 38:d+=Math.floor(.1*c);break;case 40:d-=Math.floor(.1*c);break;case 36:d=0;break;case 35:d=c;break;case 10:return void(e.paused?e.play():e.pause());case 13:return void(e.paused?e.play():e.pause());default:return}return d=0>d?0:d>=c?c:Math.floor(d),q=new Date,r||e.pause(),d<e.duration&&!r&&setTimeout(u,1100),e.setCurrentTime(d),a.preventDefault(),a.stopPropagation(),!1}),g.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(o=!0,n(a),f.globalBind("mousemove.dur touchmove.dur",function(a){n(a)}),f.globalBind("mouseup.dur touchend.dur",function(){o=!1,k.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(){p=!0,f.globalBind("mousemove.dur",function(a){n(a)}),mejs.MediaFeatures.hasTouch||k.show()}).bind("mouseleave",function(){p=!1,o||(f.globalUnbind(".dur"),k.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),t(a)},!1),f.container.on("controlsresize",function(){b.setProgressRail(),b.setCurrentRail()}),f.loaded=h,f.total=g,f.current=i,f.handle=j},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){b.updateDuration()},!1)},updateCurrent:function(){var a=this;a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(a.media.currentTime,a.options))},updateDuration:function(){var a=this;a.container.toggleClass("mejs-long-video",a.media.duration>3600),a.durationD&&(a.options.duration>0||a.media.duration)&&a.durationD.html(mejs.Utility.secondsToTimeCode(a.options.duration>0?a.options.duration:a.media.duration,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),allyVolumeControlText:mejs.i18n.t("Use Up/Down Arrow keys to increase or decrease volume."),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("Unmute")).attr("aria-label",mejs.i18n.t("Unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("Mute")).attr("aria-label",mejs.i18n.t("Mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h}b=Math.max(0,b),b=Math.min(b,1),m(b),e.setMuted(0===b?!0:!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(){var a=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("volumeSlider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-valuetext":a+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c+=.1;break;case 40:c-=.1;break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){m(e.volume)})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,buildfullscreen:function(b,c,d,e){if(b.isVideo){if(b.isInIframe=window.location!=window.parent.location,mejs.MediaFeatures.hasTrueNativeFullScreen){var f=function(){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,f)}var g=this,h=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.fullscreenText+'" aria-label="'+g.options.fullscreenText+'"></button></div>').appendTo(c);if("native"===g.media.pluginType||!g.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)h.click(function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()});else{var i=null,j=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}();if(j&&!mejs.MediaFeatures.isOpera){var k,l,m=!1,n=function(){if(m){for(var a in o)o[a].hide();h.css("pointer-events",""),g.controls.css("pointer-events",""),g.media.removeEventListener("click",g.clickToPlayPauseCallback),m=!1}},o={},p=["top","left","right","bottom"],q=function(){var a=h.offset().left-g.container.offset().left,b=h.offset().top-g.container.offset().top,c=h.outerWidth(!0),d=h.outerHeight(!0),e=g.container.width(),f=g.container.height();for(k in o)o[k].css({position:"absolute",top:0,left:0});o.top.width(e).height(b),o.left.width(a).height(d).css({top:b}),o.right.width(e-a-c).height(d).css({top:b,left:a+c}),o.bottom.width(e).height(f-d-b).css({top:b+d})};for(g.globalBind("resize",function(){q()}),k=0,l=p.length;l>k;k++)o[p[k]]=a('<div class="mejs-fullscreen-hover" />').appendTo(g.container).mouseover(n).hide();h.on("mouseover",function(){if(!g.isFullScreen){var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!1),h.css("pointer-events","none"),g.controls.css("pointer-events","none"),g.media.addEventListener("click",g.clickToPlayPauseCallback);for(k in o)o[k].show();q(),m=!0}}),e.addEventListener("fullscreenchange",function(){g.isFullScreen=!g.isFullScreen,g.isFullScreen?g.media.removeEventListener("click",g.clickToPlayPauseCallback):g.media.addEventListener("click",g.clickToPlayPauseCallback),n()}),g.globalBind("mousemove",function(a){if(m){var b=h.offset();(a.pageY<b.top||a.pageY>b.top+h.outerHeight(!0)||a.pageX<b.left||a.pageX>b.left+h.outerWidth(!0))&&(h.css("pointer-events",""),g.controls.css("pointer-events",""),m=!1)}})}else h.on("mouseover",function(){null!==i&&(clearTimeout(i),delete i);var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0)}).on("mouseout",function(){null!==i&&(clearTimeout(i),delete i),i=setTimeout(function(){e.hideFullscreenButton()},1500)})}b.fullscreenBtn=h,g.globalBind("keydown",function(a){(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||g.isFullScreen)&&27==a.keyCode&&b.exitFullScreen()}),g.normalHeight=0,g.normalWidth=0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;if("native"===b.media.pluginType||!mejs.MediaFeatures.isFirefox&&!b.options.usePluginFullScreen){if(a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native"===b.media.pluginType)if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function d(){if(b.isNativeFullScreen){var c=window.devicePixelRatio||1,e=.002,f=c*a(window).width(),g=screen.width,h=c*f;Math.abs(g-f)>Math.abs(g-h)&&(f=h);var i=Math.abs(g-f),j=g*e;i>j?b.exitFullScreen():setTimeout(d,500)}},1e3);else if(mejs.MediaFeatures.hasSemiNativeFullScreen)return void b.media.webkitEnterFullscreen();if(b.isInIframe){var c=b.options.newWindowCallback(this);if(""!==c){if(!mejs.MediaFeatures.hasTrueNativeFullScreen)return b.pause(),void window.open(c,b.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");setTimeout(function(){b.isNativeFullScreen||(b.pause(),window.open(c,b.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no"))},250)}}b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),b.media.setVideoSize(a(window).width(),a(window).height())),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0,b.container.find(".mejs-captions-text").css("font-size",screen.width/b.width*1*100+"%"),b.container.find(".mejs-captions-position").css("bottom","45px"),b.container.trigger("enteredfullscreen")}},exitFullScreen:function(){var b=this;return clearTimeout(b.containerSizeTimeout),"native"!==b.media.pluginType&&mejs.MediaFeatures.isFirefox?void b.media.setFullscreen(!1):(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-position").css("bottom",""),void b.container.trigger("exitedfullscreen"))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;il>m;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g=this,h=g.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"";if(g.domNode.textTracks)for(f=g.domNode.textTracks.length-1;f>=0;f--)g.domNode.textTracks[f].mode="hidden";g.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+h+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.tracksText+'" aria-label="'+g.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(c);var i=0;for(f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&i++;for(g.options.toggleCaptionsButtonWhenOnlyOne&&1==i?b.captionsButton.on("click",function(){lang=null===b.selectedTrack?b.tracks[0].srclang:"none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").css("visibility","visible")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").css("visibility","hidden")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.css("visibility","visible"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).css("visibility","hidden"),a(this).css("display","block")})}),g.container.on("controlsresize",function(){g.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.css("visibility","hidden")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};a.ajax({url:d.src,dataType:"text",success:function(a){d.entries="string"==typeof a&&/<tt\s+xml/gi.exec(a)?mejs.TrackFormatParser.dfxp.parse(a):mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(i=0;i<a.tracks.length;i++)if("subtitles"==a.tracks[i].kind&&a.tracks[i].isLoaded){b=!0;break}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d),0===i.times.start&&(i.times.start=2)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:mejs.i18n.t(a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return mejs.i18n.t(a.media.muted?"Unmute":"Mute")},click:function(a){a.setMuted(a.media.muted?!1:!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("Download Video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t("Skip back %1 seconds")}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){{var f=this,g=f.options.skipBackText.replace("%1",f.options.skipBackInterval);a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+g+'" aria-label="'+g+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d){var e=this,f=e.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof f&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+e.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),e.media.addEventListener("ended",function(){a.ajax({dataType:"html",url:f,success:function(a){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$);!function(a,b){function c(){function a(){"undefined"!=typeof _wpmejsSettings&&(c=b.extend(!0,{},_wpmejsSettings)),c.success=c.success||function(a){var b,c;"flash"===a.pluginType&&(b=a.attributes.autoplay&&"false"!==a.attributes.autoplay,c=a.attributes.loop&&"false"!==a.attributes.loop,b&&a.addEventListener("canplay",function(){a.play()},!1),c&&a.addEventListener("ended",function(){a.play()},!1))},b(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!b(this).parent().hasClass(".mejs-mediaelement")}).mediaelementplayer(c)}var c={};return{initialize:a}}a.wp=a.wp||{},mejs.plugins.silverlight[0].types.push("video/x-ms-wmv"),mejs.plugins.silverlight[0].types.push("audio/x-ms-wma"),a.wp.mediaelement=new c,b(a.wp.mediaelement.initialize)}(window,jQuery);var Swiper=function(selector,params){if(document.body.__defineGetter__){if(HTMLElement){var element=HTMLElement.prototype;if(element.__defineGetter__){element.__defineGetter__("outerHTML",function(){return new XMLSerializer().serializeToString(this);});}}}
  1380. if(!window.getComputedStyle){window.getComputedStyle=function(el,pseudo){this.el=el;this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;if(prop==='float')prop='styleFloat';if(re.test(prop)){prop=prop.replace(re,function(){return arguments[2].toUpperCase();});}
  1381. return el.currentStyle[prop]?el.currentStyle[prop]:null;}
  1382. return this;}}
  1383. if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,start){for(var i=(start||0),j=this.length;i<j;i++){if(this[i]===obj){return i;}}
  1384. return-1;}}
  1385. if(!document.querySelectorAll){if(!window.jQuery)return;}
  1386. function $$(selector,context){if(document.querySelectorAll)
  1387. return(context||document).querySelectorAll(selector);else
  1388. return jQuery(selector,context);}
  1389. if(typeof selector==='undefined')return;if(!(selector.nodeType)){if($$(selector).length===0)return;}
  1390. var _this=this;_this.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0};_this.positions={start:0,abs:0,diff:0,current:0};_this.times={start:0,end:0};_this.id=(new Date()).getTime();_this.container=(selector.nodeType)?selector:$$(selector)[0];_this.isTouched=false;_this.isMoved=false;_this.activeIndex=0;_this.activeLoaderIndex=0;_this.activeLoopIndex=0;_this.previousIndex=null;_this.velocity=0;_this.snapGrid=[];_this.slidesGrid=[];_this.imagesToLoad=[];_this.imagesLoaded=0;_this.wrapperLeft=0;_this.wrapperRight=0;_this.wrapperTop=0;_this.wrapperBottom=0;var wrapper,slideSize,wrapperSize,direction,isScrolling,containerSize;var defaults={mode:'horizontal',touchRatio:1,speed:300,freeMode:false,freeModeFluid:false,momentumRatio:1,momentumBounce:true,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,simulateTouch:true,followFinger:true,shortSwipes:true,moveStartThreshold:false,autoplay:false,onlyExternal:false,createPagination:true,pagination:false,paginationElement:'span',paginationClickable:false,paginationAsRange:true,resistance:true,scrollContainer:false,preventLinks:true,noSwiping:false,noSwipingClass:'swiper-no-swiping',initialSlide:0,keyboardControl:false,mousewheelControl:false,mousewheelDebounce:600,useCSS3Transforms:true,loop:false,loopAdditionalSlides:0,calculateHeight:false,updateOnImagesReady:true,releaseFormElements:true,watchActiveIndex:false,visibilityFullFit:false,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:false,queueStartCallbacks:false,queueEndCallbacks:false,autoResize:true,resizeReInit:false,DOMAnimation:true,loader:{slides:[],slidesHTMLType:'inner',surroundGroups:1,logic:'reload',loadAllSlides:false},slideElement:'div',slideClass:'swiper-slide',slideActiveClass:'swiper-slide-active',slideVisibleClass:'swiper-slide-visible',wrapperClass:'swiper-wrapper',paginationElementClass:'swiper-pagination-switch',paginationActiveClass:'swiper-active-switch',paginationVisibleClass:'swiper-visible-switch'}
  1391. params=params||{};for(var prop in defaults){if(prop in params&&typeof params[prop]==='object'){for(var subProp in defaults[prop]){if(!(subProp in params[prop])){params[prop][subProp]=defaults[prop][subProp];}}}
  1392. else if(!(prop in params)){params[prop]=defaults[prop]}}
  1393. _this.params=params;if(params.scrollContainer){params.freeMode=true;params.freeModeFluid=true;}
  1394. if(params.loop){params.resistance='100%';}
  1395. var isH=params.mode==='horizontal';_this.touchEvents={touchStart:_this.support.touch||!params.simulateTouch?'touchstart':(_this.browser.ie10?'MSPointerDown':'mousedown'),touchMove:_this.support.touch||!params.simulateTouch?'touchmove':(_this.browser.ie10?'MSPointerMove':'mousemove'),touchEnd:_this.support.touch||!params.simulateTouch?'touchend':(_this.browser.ie10?'MSPointerUp':'mouseup')};for(var i=_this.container.childNodes.length-1;i>=0;i--){if(_this.container.childNodes[i].className){var _wrapperClasses=_this.container.childNodes[i].className.split(' ')
  1396. for(var j=0;j<_wrapperClasses.length;j++){if(_wrapperClasses[j]===params.wrapperClass){wrapper=_this.container.childNodes[i];}};}};_this.wrapper=wrapper;_this._extendSwiperSlide=function(el){el.append=function(){if(params.loop){el.insertAfter(_this.slides.length-_this.loopedSlides);_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}
  1397. else{_this.wrapper.appendChild(el);}
  1398. _this.reInit();return el;}
  1399. el.prepend=function(){if(params.loop){_this.wrapper.insertBefore(el,_this.slides[_this.loopedSlides]);_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}
  1400. else{_this.wrapper.insertBefore(el,_this.wrapper.firstChild);}
  1401. _this.reInit();return el;}
  1402. el.insertAfter=function(index){if(typeof index==='undefined')return false;var beforeSlide;if(params.loop){beforeSlide=_this.slides[index+1+_this.loopedSlides];_this.wrapper.insertBefore(el,beforeSlide);_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}
  1403. else{beforeSlide=_this.slides[index+1];_this.wrapper.insertBefore(el,beforeSlide)}
  1404. _this.reInit();return el;}
  1405. el.clone=function(){return _this._extendSwiperSlide(el.cloneNode(true))}
  1406. el.remove=function(){_this.wrapper.removeChild(el);_this.reInit();}
  1407. el.html=function(html){if(typeof html==='undefined'){return el.innerHTML;}
  1408. else{el.innerHTML=html;return el;}}
  1409. el.index=function(){var index;for(var i=_this.slides.length-1;i>=0;i--){if(el===_this.slides[i])index=i;}
  1410. return index;}
  1411. el.isActive=function(){if(el.index()===_this.activeIndex)return true;else return false;}
  1412. if(!el.swiperSlideDataStorage)el.swiperSlideDataStorage={};el.getData=function(name){return el.swiperSlideDataStorage[name];}
  1413. el.setData=function(name,value){el.swiperSlideDataStorage[name]=value;return el;}
  1414. el.data=function(name,value){if(!value){return el.getAttribute('data-'+name);}
  1415. else{el.setAttribute('data-'+name,value);return el;}}
  1416. el.getWidth=function(outer){return _this.h.getWidth(el,outer);}
  1417. el.getHeight=function(outer){return _this.h.getHeight(el,outer);}
  1418. el.getOffset=function(){return _this.h.getOffset(el);}
  1419. return el;}
  1420. _this.calcSlides=function(forceCalcSlides){var oldNumber=_this.slides?_this.slides.length:false;_this.slides=[];_this.displaySlides=[];for(var i=0;i<_this.wrapper.childNodes.length;i++){if(_this.wrapper.childNodes[i].className){var _className=_this.wrapper.childNodes[i].className;var _slideClasses=_className.split(' ');for(var j=0;j<_slideClasses.length;j++){if(_slideClasses[j]===params.slideClass){_this.slides.push(_this.wrapper.childNodes[i]);}}}}
  1421. for(i=_this.slides.length-1;i>=0;i--){_this._extendSwiperSlide(_this.slides[i]);}
  1422. if(!oldNumber)return;if(oldNumber!==_this.slides.length||forceCalcSlides){removeSlideEvents();addSlideEvents();_this.updateActiveSlide();if(params.createPagination&&_this.params.pagination)_this.createPagination();_this.callPlugins('numberOfSlidesChanged');}}
  1423. _this.createSlide=function(html,slideClassList,el){var slideClassList=slideClassList||_this.params.slideClass;var el=el||params.slideElement;var newSlide=document.createElement(el);newSlide.innerHTML=html||'';newSlide.className=slideClassList;return _this._extendSwiperSlide(newSlide);}
  1424. _this.appendSlide=function(html,slideClassList,el){if(!html)return;if(html.nodeType){return _this._extendSwiperSlide(html).append()}
  1425. else{return _this.createSlide(html,slideClassList,el).append()}}
  1426. _this.prependSlide=function(html,slideClassList,el){if(!html)return;if(html.nodeType){return _this._extendSwiperSlide(html).prepend()}
  1427. else{return _this.createSlide(html,slideClassList,el).prepend()}}
  1428. _this.insertSlideAfter=function(index,html,slideClassList,el){if(typeof index==='undefined')return false;if(html.nodeType){return _this._extendSwiperSlide(html).insertAfter(index);}
  1429. else{return _this.createSlide(html,slideClassList,el).insertAfter(index);}}
  1430. _this.removeSlide=function(index){if(_this.slides[index]){if(params.loop){if(!_this.slides[index+_this.loopedSlides])return false;_this.slides[index+_this.loopedSlides].remove();_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}
  1431. else _this.slides[index].remove();return true;}
  1432. else return false;}
  1433. _this.removeLastSlide=function(){if(_this.slides.length>0){if(params.loop){_this.slides[_this.slides.length-1-_this.loopedSlides].remove();_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}
  1434. else _this.slides[(_this.slides.length-1)].remove();return true;}
  1435. else{return false;}}
  1436. _this.removeAllSlides=function(){for(var i=_this.slides.length-1;i>=0;i--){_this.slides[i].remove()}}
  1437. _this.getSlide=function(index){return _this.slides[index]}
  1438. _this.getLastSlide=function(){return _this.slides[_this.slides.length-1]}
  1439. _this.getFirstSlide=function(){return _this.slides[0]}
  1440. _this.activeSlide=function(){return _this.slides[_this.activeIndex]}
  1441. var _plugins=[];for(var plugin in _this.plugins){if(params[plugin]){var p=_this.plugins[plugin](_this,params[plugin]);if(p)_plugins.push(p);}}
  1442. _this.callPlugins=function(method,args){if(!args)args={}
  1443. for(var i=0;i<_plugins.length;i++){if(method in _plugins[i]){_plugins[i][method](args);}}}
  1444. if(_this.browser.ie10&&!params.onlyExternal){_this.wrapper.classList.add('swiper-wp8-'+(isH?'horizontal':'vertical'));}
  1445. if(params.freeMode){_this.container.className+=' swiper-free-mode';}
  1446. _this.initialized=false;_this.init=function(force,forceCalcSlides){var _width=_this.h.getWidth(_this.container);var _height=_this.h.getHeight(_this.container);if(_width===_this.width&&_height===_this.height&&!force)return;_this.width=_width;_this.height=_height;containerSize=isH?_width:_height;var wrapper=_this.wrapper;if(force){_this.calcSlides(forceCalcSlides);}
  1447. if(params.slidesPerView==='auto'){var slidesWidth=0;var slidesHeight=0;if(params.slidesOffset>0){wrapper.style.paddingLeft='';wrapper.style.paddingRight='';wrapper.style.paddingTop='';wrapper.style.paddingBottom='';}
  1448. wrapper.style.width='';wrapper.style.height='';if(params.offsetPxBefore>0){if(isH)_this.wrapperLeft=params.offsetPxBefore;else _this.wrapperTop=params.offsetPxBefore;}
  1449. if(params.offsetPxAfter>0){if(isH)_this.wrapperRight=params.offsetPxAfter;else _this.wrapperBottom=params.offsetPxAfter;}
  1450. if(params.centeredSlides){if(isH){_this.wrapperLeft=(containerSize-this.slides[0].getWidth(true))/2;_this.wrapperRight=(containerSize-_this.slides[_this.slides.length-1].getWidth(true))/2;}
  1451. else{_this.wrapperTop=(containerSize-_this.slides[0].getHeight(true))/2;_this.wrapperBottom=(containerSize-_this.slides[_this.slides.length-1].getHeight(true))/2;}}
  1452. if(isH){if(_this.wrapperLeft>=0)wrapper.style.paddingLeft=_this.wrapperLeft+'px';if(_this.wrapperRight>=0)wrapper.style.paddingRight=_this.wrapperRight+'px';}
  1453. else{if(_this.wrapperTop>=0)wrapper.style.paddingTop=_this.wrapperTop+'px';if(_this.wrapperBottom>=0)wrapper.style.paddingBottom=_this.wrapperBottom+'px';}
  1454. var slideLeft=0;var centeredSlideLeft=0;_this.snapGrid=[];_this.slidesGrid=[];var slideMaxHeight=0;for(var i=0;i<_this.slides.length;i++){var slideWidth=_this.slides[i].getWidth(true);var slideHeight=_this.slides[i].getHeight(true);if(params.calculateHeight){slideMaxHeight=Math.max(slideMaxHeight,slideHeight)}
  1455. var _slideSize=isH?slideWidth:slideHeight;if(params.centeredSlides){var nextSlideWidth=i===_this.slides.length-1?0:_this.slides[i+1].getWidth(true);var nextSlideHeight=i===_this.slides.length-1?0:_this.slides[i+1].getHeight(true);var nextSlideSize=isH?nextSlideWidth:nextSlideHeight;if(_slideSize>containerSize){for(var j=0;j<=Math.floor(_slideSize/(containerSize+_this.wrapperLeft));j++){if(j===0)_this.snapGrid.push(slideLeft+_this.wrapperLeft);else _this.snapGrid.push(slideLeft+_this.wrapperLeft+containerSize*j);}
  1456. _this.slidesGrid.push(slideLeft+_this.wrapperLeft);}
  1457. else{_this.snapGrid.push(centeredSlideLeft);_this.slidesGrid.push(centeredSlideLeft);}
  1458. centeredSlideLeft+=_slideSize/2+nextSlideSize/2;}
  1459. else{if(_slideSize>containerSize){for(var j=0;j<=Math.floor(_slideSize/containerSize);j++){_this.snapGrid.push(slideLeft+containerSize*j);}}
  1460. else{_this.snapGrid.push(slideLeft);}
  1461. _this.slidesGrid.push(slideLeft);}
  1462. slideLeft+=_slideSize;slidesWidth+=slideWidth;slidesHeight+=slideHeight;}
  1463. if(params.calculateHeight)_this.height=slideMaxHeight;if(isH){wrapperSize=slidesWidth+_this.wrapperRight+_this.wrapperLeft;wrapper.style.width=(slidesWidth)+'px';wrapper.style.height=(_this.height)+'px';}
  1464. else{wrapperSize=slidesHeight+_this.wrapperTop+_this.wrapperBottom;wrapper.style.width=(_this.width)+'px';wrapper.style.height=(slidesHeight)+'px';}}
  1465. else if(params.scrollContainer){wrapper.style.width='';wrapper.style.height='';var wrapperWidth=_this.slides[0].getWidth(true);var wrapperHeight=_this.slides[0].getHeight(true);wrapperSize=isH?wrapperWidth:wrapperHeight;wrapper.style.width=wrapperWidth+'px';wrapper.style.height=wrapperHeight+'px';slideSize=isH?wrapperWidth:wrapperHeight;}
  1466. else{if(params.calculateHeight){var slideMaxHeight=0;var wrapperHeight=0;if(!isH)_this.container.style.height='';wrapper.style.height='';for(var i=0;i<_this.slides.length;i++){_this.slides[i].style.height='';slideMaxHeight=Math.max(_this.slides[i].getHeight(true),slideMaxHeight);if(!isH)wrapperHeight+=_this.slides[i].getHeight(true);}
  1467. var slideHeight=slideMaxHeight;_this.height=slideHeight;if(isH)wrapperHeight=slideHeight;else containerSize=slideHeight,_this.container.style.height=containerSize+'px';}
  1468. else{var slideHeight=isH?_this.height:_this.height/params.slidesPerView;var wrapperHeight=isH?_this.height:_this.slides.length*slideHeight;}
  1469. var slideWidth=isH?_this.width/params.slidesPerView:_this.width;var wrapperWidth=isH?_this.slides.length*slideWidth:_this.width;slideSize=isH?slideWidth:slideHeight;if(params.offsetSlidesBefore>0){if(isH)_this.wrapperLeft=slideSize*params.offsetSlidesBefore;else _this.wrapperTop=slideSize*params.offsetSlidesBefore;}
  1470. if(params.offsetSlidesAfter>0){if(isH)_this.wrapperRight=slideSize*params.offsetSlidesAfter;else _this.wrapperBottom=slideSize*params.offsetSlidesAfter;}
  1471. if(params.offsetPxBefore>0){if(isH)_this.wrapperLeft=params.offsetPxBefore;else _this.wrapperTop=params.offsetPxBefore;}
  1472. if(params.offsetPxAfter>0){if(isH)_this.wrapperRight=params.offsetPxAfter;else _this.wrapperBottom=params.offsetPxAfter;}
  1473. if(params.centeredSlides){if(isH){_this.wrapperLeft=(containerSize-slideSize)/2;_this.wrapperRight=(containerSize-slideSize)/2;}
  1474. else{_this.wrapperTop=(containerSize-slideSize)/2;_this.wrapperBottom=(containerSize-slideSize)/2;}}
  1475. if(isH){if(_this.wrapperLeft>0)wrapper.style.paddingLeft=_this.wrapperLeft+'px';if(_this.wrapperRight>0)wrapper.style.paddingRight=_this.wrapperRight+'px';}
  1476. else{if(_this.wrapperTop>0)wrapper.style.paddingTop=_this.wrapperTop+'px';if(_this.wrapperBottom>0)wrapper.style.paddingBottom=_this.wrapperBottom+'px';}
  1477. wrapperSize=isH?wrapperWidth+_this.wrapperRight+_this.wrapperLeft:wrapperHeight+_this.wrapperTop+_this.wrapperBottom;wrapper.style.width=wrapperWidth+'px';wrapper.style.height=wrapperHeight+'px';var slideLeft=0;_this.snapGrid=[];_this.slidesGrid=[];for(var i=0;i<_this.slides.length;i++){_this.snapGrid.push(slideLeft);_this.slidesGrid.push(slideLeft);slideLeft+=slideSize;_this.slides[i].style.width=slideWidth+'px';_this.slides[i].style.height=slideHeight+'px';}}
  1478. if(!_this.initialized){_this.callPlugins('onFirstInit');if(params.onFirstInit)params.onFirstInit(_this);}
  1479. else{_this.callPlugins('onInit');if(params.onInit)params.onInit(_this);}
  1480. _this.initialized=true;}
  1481. _this.reInit=function(forceCalcSlides){_this.init(true,forceCalcSlides);}
  1482. _this.resizeFix=function(reInit){_this.callPlugins('beforeResizeFix');_this.init(params.resizeReInit||reInit);if(!params.freeMode){_this.swipeTo((params.loop?_this.activeLoopIndex:_this.activeIndex),0,false);}
  1483. else if(_this.getWrapperTranslate()<-maxWrapperPosition()){_this.setWrapperTransition(0);_this.setWrapperTranslate(-maxWrapperPosition());}
  1484. _this.callPlugins('afterResizeFix');}
  1485. function maxWrapperPosition(){var a=(wrapperSize-containerSize);if(params.freeMode){a=wrapperSize-containerSize;}
  1486. if(params.slidesPerView>_this.slides.length)a=0;if(a<0)a=0;return a;}
  1487. function minWrapperPosition(){var a=0;return a;}
  1488. function initEvents(){var bind=_this.h.addEventListener;if(!_this.browser.ie10){if(_this.support.touch){bind(_this.wrapper,'touchstart',onTouchStart);bind(_this.wrapper,'touchmove',onTouchMove);bind(_this.wrapper,'touchend',onTouchEnd);}
  1489. if(params.simulateTouch){bind(_this.wrapper,'mousedown',onTouchStart);bind(document,'mousemove',onTouchMove);bind(document,'mouseup',onTouchEnd);}}
  1490. else{bind(_this.wrapper,_this.touchEvents.touchStart,onTouchStart);bind(document,_this.touchEvents.touchMove,onTouchMove);bind(document,_this.touchEvents.touchEnd,onTouchEnd);}
  1491. if(params.autoResize){bind(window,'resize',_this.resizeFix);}
  1492. addSlideEvents();_this._wheelEvent=false;if(params.mousewheelControl){if(document.onmousewheel!==undefined){_this._wheelEvent="mousewheel";}
  1493. try{WheelEvent("wheel");_this._wheelEvent="wheel";}catch(e){}
  1494. if(!_this._wheelEvent){_this._wheelEvent="DOMMouseScroll";}
  1495. if(_this._wheelEvent){bind(_this.container,_this._wheelEvent,handleMousewheel);}}
  1496. if(params.keyboardControl){bind(document,'keydown',handleKeyboardKeys);}
  1497. if(params.updateOnImagesReady){_this.imagesToLoad=$$('img',_this.container);for(var i=0;i<_this.imagesToLoad.length;i++){_loadImage(_this.imagesToLoad[i].getAttribute('src'))}}
  1498. function _loadImage(src){var image=new Image();image.onload=function(){_this.imagesLoaded++;if(_this.imagesLoaded==_this.imagesToLoad.length){_this.reInit();if(params.onImagesReady)params.onImagesReady(_this);}}
  1499. image.src=src;}}
  1500. _this.destroy=function(removeResizeFix){var unbind=_this.h.removeEventListener;if(!_this.browser.ie10){if(_this.support.touch){unbind(_this.wrapper,'touchstart',onTouchStart);unbind(_this.wrapper,'touchmove',onTouchMove);unbind(_this.wrapper,'touchend',onTouchEnd);}
  1501. if(params.simulateTouch){unbind(_this.wrapper,'mousedown',onTouchStart);unbind(document,'mousemove',onTouchMove);unbind(document,'mouseup',onTouchEnd);}}
  1502. else{unbind(_this.wrapper,_this.touchEvents.touchStart,onTouchStart);unbind(document,_this.touchEvents.touchMove,onTouchMove);unbind(document,_this.touchEvents.touchEnd,onTouchEnd);}
  1503. if(params.autoResize){unbind(window,'resize',_this.resizeFix);}
  1504. removeSlideEvents();if(params.paginationClickable){removePaginationEvents();}
  1505. if(params.mousewheelControl&&_this._wheelEvent){unbind(_this.container,_this._wheelEvent,handleMousewheel);}
  1506. if(params.keyboardControl){unbind(document,'keydown',handleKeyboardKeys);}
  1507. if(params.autoplay){_this.stopAutoplay();}
  1508. _this.callPlugins('onDestroy');_this=null;}
  1509. function addSlideEvents(){var bind=_this.h.addEventListener,i;if(params.preventLinks){var links=$$('a',_this.container);for(i=0;i<links.length;i++){bind(links[i],'click',preventClick);}}
  1510. if(params.releaseFormElements){var formElements=$$('input, textarea, select',_this.container);for(i=0;i<formElements.length;i++){bind(formElements[i],_this.touchEvents.touchStart,releaseForms,true);}}
  1511. if(params.onSlideClick){for(i=0;i<_this.slides.length;i++){bind(_this.slides[i],'click',slideClick);}}
  1512. if(params.onSlideTouch){for(i=0;i<_this.slides.length;i++){bind(_this.slides[i],_this.touchEvents.touchStart,slideTouch);}}}
  1513. function removeSlideEvents(){var unbind=_this.h.removeEventListener,i;if(params.onSlideClick){for(i=0;i<_this.slides.length;i++){unbind(_this.slides[i],'click',slideClick);}}
  1514. if(params.onSlideTouch){for(i=0;i<_this.slides.length;i++){unbind(_this.slides[i],_this.touchEvents.touchStart,slideTouch);}}
  1515. if(params.releaseFormElements){var formElements=$$('input, textarea, select',_this.container);for(i=0;i<formElements.length;i++){unbind(formElements[i],_this.touchEvents.touchStart,releaseForms,true);}}
  1516. if(params.preventLinks){var links=$$('a',_this.container);for(i=0;i<links.length;i++){unbind(links[i],'click',preventClick);}}}
  1517. function handleKeyboardKeys(e){var kc=e.keyCode||e.charCode;if(kc==37||kc==39||kc==38||kc==40){var inView=false;var swiperOffset=_this.h.getOffset(_this.container);var scrollLeft=_this.h.windowScroll().left;var scrollTop=_this.h.windowScroll().top;var windowWidth=_this.h.windowWidth();var windowHeight=_this.h.windowHeight();var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+_this.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+_this.height],[swiperOffset.left+_this.width,swiperOffset.top+_this.height]]
  1518. for(var i=0;i<swiperCoord.length;i++){var point=swiperCoord[i];if(point[0]>=scrollLeft&&point[0]<=scrollLeft+windowWidth&&point[1]>=scrollTop&&point[1]<=scrollTop+windowHeight){inView=true;}}
  1519. if(!inView)return;}
  1520. if(isH){if(kc==37||kc==39){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
  1521. if(kc==39)_this.swipeNext();if(kc==37)_this.swipePrev();}
  1522. else{if(kc==38||kc==40){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
  1523. if(kc==40)_this.swipeNext();if(kc==38)_this.swipePrev();}}
  1524. var allowScrollChange=true;function handleMousewheel(e){var we=_this._wheelEvent;var delta;if(e.detail)delta=-e.detail;else if(we=='mousewheel')delta=e.wheelDelta;else if(we=='DOMMouseScroll')delta=-e.detail;else if(we=='wheel'){delta=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;}
  1525. if(!params.freeMode){if(delta<0)_this.swipeNext();else _this.swipePrev();}
  1526. else{var position=_this.getWrapperTranslate()+delta;if(position>0)position=0;if(position<-maxWrapperPosition())position=-maxWrapperPosition();_this.setWrapperTransition(0);_this.setWrapperTranslate(position);_this.updateActiveSlide(position);}
  1527. if(params.autoplay)_this.stopAutoplay();if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;}
  1528. if(params.grabCursor){var containerStyle=_this.container.style;containerStyle.cursor='move';containerStyle.cursor='grab';containerStyle.cursor='-moz-grab';containerStyle.cursor='-webkit-grab';}
  1529. _this.allowSlideClick=true;function slideClick(event){if(_this.allowSlideClick){setClickedSlide(event);params.onSlideClick(_this);}}
  1530. function slideTouch(event){setClickedSlide(event);params.onSlideTouch(_this);}
  1531. function setClickedSlide(event){if(!event.currentTarget){var element=event.srcElement;do{if(element.className.indexOf(params.slideClass)>-1){break;}}
  1532. while(element=element.parentNode);_this.clickedSlide=element;}
  1533. else{_this.clickedSlide=event.currentTarget;}
  1534. _this.clickedSlideIndex=_this.slides.indexOf(_this.clickedSlide);_this.clickedSlideLoopIndex=_this.clickedSlideIndex-(_this.loopedSlides||0);}
  1535. _this.allowLinks=true;function preventClick(e){if(!_this.allowLinks){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;}}
  1536. function releaseForms(e){if(e.stopPropagation)e.stopPropagation();else e.returnValue=false;return false;}
  1537. var isTouchEvent=false;var allowThresholdMove;var allowMomentumBounce=true;function onTouchStart(event){if(jQuery(event.target).parents('.swiper-container').find('.swiper-slide').length==1)return false;if(jQuery(event.target).parents('.swiper-container').find('.swiper-slide.duplicate-transition').length>0)return false;if(params.preventLinks)_this.allowLinks=true;if(_this.isTouched||params.onlyExternal){return false;}
  1538. if(params.noSwiping&&(event.target||event.srcElement)&&noSwipingSlide(event.target||event.srcElement))return false;allowMomentumBounce=false;_this.isTouched=true;isTouchEvent=event.type=='touchstart';if(!isTouchEvent||event.targetTouches.length==1){_this.callPlugins('onTouchStartBegin');if(!isTouchEvent){if(event.preventDefault)event.preventDefault();else event.returnValue=false;}
  1539. var pageX=isTouchEvent?event.targetTouches[0].pageX:(event.pageX||event.clientX);var pageY=isTouchEvent?event.targetTouches[0].pageY:(event.pageY||event.clientY);_this.touches.startX=_this.touches.currentX=pageX;_this.touches.startY=_this.touches.currentY=pageY;_this.touches.start=_this.touches.current=isH?pageX:pageY;_this.setWrapperTransition(0);_this.positions.start=_this.positions.current=_this.getWrapperTranslate();_this.setWrapperTranslate(_this.positions.start);_this.times.start=(new Date()).getTime();isScrolling=undefined;if(params.moveStartThreshold>0)allowThresholdMove=false;if(params.onTouchStart)params.onTouchStart(_this);_this.callPlugins('onTouchStartEnd');}}
  1540. var velocityPrevPosition,velocityPrevTime;function onTouchMove(event){if(!_this.isTouched||params.onlyExternal)return;if(isTouchEvent&&event.type=='mousemove')return;var pageX=isTouchEvent?event.targetTouches[0].pageX:(event.pageX||event.clientX);var pageY=isTouchEvent?event.targetTouches[0].pageY:(event.pageY||event.clientY);if(typeof isScrolling==='undefined'&&isH){isScrolling=!!(isScrolling||Math.abs(pageY-_this.touches.startY)>Math.abs(pageX-_this.touches.startX));}
  1541. if(typeof isScrolling==='undefined'&&!isH){isScrolling=!!(isScrolling||Math.abs(pageY-_this.touches.startY)<Math.abs(pageX-_this.touches.startX));}
  1542. if(isScrolling){_this.isTouched=false;return;}
  1543. if(event.assignedToSwiper){_this.isTouched=false;return;}
  1544. event.assignedToSwiper=true;if(params.preventLinks){_this.allowLinks=false;}
  1545. if(params.onSlideClick){_this.allowSlideClick=false;}
  1546. if(params.autoplay){_this.stopAutoplay();}
  1547. if(!isTouchEvent||event.touches.length==1){if(!_this.isMoved){_this.callPlugins('onTouchMoveStart');if(params.loop){_this.fixLoop();_this.positions.start=_this.getWrapperTranslate();}
  1548. if(params.onTouchMoveStart)params.onTouchMoveStart(_this);}
  1549. _this.isMoved=true;if(event.preventDefault)event.preventDefault();else event.returnValue=false;_this.touches.current=isH?pageX:pageY;_this.positions.current=(_this.touches.current-_this.touches.start)*params.touchRatio+_this.positions.start;if(_this.positions.current>0&&params.onResistanceBefore){params.onResistanceBefore(_this,_this.positions.current);}
  1550. if(_this.positions.current<-maxWrapperPosition()&&params.onResistanceAfter){params.onResistanceAfter(_this,Math.abs(_this.positions.current+maxWrapperPosition()));}
  1551. if(params.resistance&&params.resistance!='100%'){if(_this.positions.current>0){var resistance=1-_this.positions.current/containerSize/2;if(resistance<0.5)
  1552. _this.positions.current=(containerSize/2);else
  1553. _this.positions.current=_this.positions.current*resistance;}
  1554. if(_this.positions.current<-maxWrapperPosition()){var diff=(_this.touches.current-_this.touches.start)*params.touchRatio+(maxWrapperPosition()+_this.positions.start);var resistance=(containerSize+diff)/(containerSize);var newPos=_this.positions.current-diff*(1-resistance)/2;var stopPos=-maxWrapperPosition()-containerSize/2;if(newPos<stopPos||resistance<=0)
  1555. _this.positions.current=stopPos;else
  1556. _this.positions.current=newPos;}}
  1557. if(params.resistance&&params.resistance=='100%'){if(_this.positions.current>0&&!(params.freeMode&&!params.freeModeFluid)){_this.positions.current=0;}
  1558. if((_this.positions.current)<-maxWrapperPosition()&&!(params.freeMode&&!params.freeModeFluid)){_this.positions.current=-maxWrapperPosition();}}
  1559. if(!params.followFinger)return;if(!params.moveStartThreshold){_this.setWrapperTranslate(_this.positions.current);}
  1560. else{if(Math.abs(_this.touches.current-_this.touches.start)>params.moveStartThreshold||allowThresholdMove){allowThresholdMove=true;_this.setWrapperTranslate(_this.positions.current);}
  1561. else{_this.positions.current=_this.positions.start;}}
  1562. if(params.freeMode||params.watchActiveIndex){_this.updateActiveSlide(_this.positions.current);}
  1563. if(params.grabCursor){_this.container.style.cursor='move';_this.container.style.cursor='grabbing';_this.container.style.cursor='-moz-grabbing';_this.container.style.cursor='-webkit-grabbing';}
  1564. if(!velocityPrevPosition)velocityPrevPosition=_this.touches.current;if(!velocityPrevTime)velocityPrevTime=(new Date).getTime();_this.velocity=(_this.touches.current-velocityPrevPosition)/((new Date).getTime()-velocityPrevTime)/2;if(Math.abs(_this.touches.current-velocityPrevPosition)<2)_this.velocity=0;velocityPrevPosition=_this.touches.current;velocityPrevTime=(new Date).getTime();_this.callPlugins('onTouchMoveEnd');if(params.onTouchMove)params.onTouchMove(_this);return false;}}
  1565. function onTouchEnd(event){if(isScrolling){_this.swipeReset();}
  1566. if(params.onlyExternal||!_this.isTouched)return;_this.isTouched=false
  1567. if(params.grabCursor){_this.container.style.cursor='move';_this.container.style.cursor='grab';_this.container.style.cursor='-moz-grab';_this.container.style.cursor='-webkit-grab';}
  1568. if(!_this.positions.current&&_this.positions.current!==0){_this.positions.current=_this.positions.start}
  1569. if(params.followFinger){_this.setWrapperTranslate(_this.positions.current);}
  1570. _this.times.end=(new Date()).getTime();_this.touches.diff=_this.touches.current-_this.touches.start
  1571. _this.touches.abs=Math.abs(_this.touches.diff)
  1572. _this.positions.diff=_this.positions.current-_this.positions.start
  1573. _this.positions.abs=Math.abs(_this.positions.diff)
  1574. var diff=_this.positions.diff;var diffAbs=_this.positions.abs;var timeDiff=_this.times.end-_this.times.start
  1575. if(diffAbs<5&&(timeDiff)<300&&_this.allowLinks==false){if(!params.freeMode&&diffAbs!=0)_this.swipeReset()
  1576. if(params.preventLinks){_this.allowLinks=true;}
  1577. if(params.onSlideClick){_this.allowSlideClick=true;}}
  1578. setTimeout(function(){if(params.preventLinks){_this.allowLinks=true;}
  1579. if(params.onSlideClick){_this.allowSlideClick=true;}},100);var maxPosition=maxWrapperPosition();if(!_this.isMoved&&params.freeMode){_this.isMoved=false;if(params.onTouchEnd)params.onTouchEnd(_this);_this.callPlugins('onTouchEnd');return;}
  1580. if(!_this.isMoved||_this.positions.current>0||_this.positions.current<-maxPosition){_this.swipeReset();if(params.onTouchEnd)params.onTouchEnd(_this);_this.callPlugins('onTouchEnd');return;}
  1581. _this.isMoved=false;if(params.freeMode){if(params.freeModeFluid){var momentumDuration=1000*params.momentumRatio;var momentumDistance=_this.velocity*momentumDuration;var newPosition=_this.positions.current+momentumDistance
  1582. var doBounce=false;var afterBouncePosition;var bounceAmount=Math.abs(_this.velocity)*20*params.momentumBounceRatio;if(newPosition<-maxPosition){if(params.momentumBounce&&_this.support.transitions){if(newPosition+maxPosition<-bounceAmount)newPosition=-maxPosition-bounceAmount;afterBouncePosition=-maxPosition;doBounce=true;allowMomentumBounce=true;}
  1583. else newPosition=-maxPosition;}
  1584. if(newPosition>0){if(params.momentumBounce&&_this.support.transitions){if(newPosition>bounceAmount)newPosition=bounceAmount;afterBouncePosition=0
  1585. doBounce=true;allowMomentumBounce=true;}
  1586. else newPosition=0;}
  1587. if(_this.velocity!=0)momentumDuration=Math.abs((newPosition-_this.positions.current)/_this.velocity)
  1588. _this.setWrapperTranslate(newPosition);_this.setWrapperTransition(momentumDuration);if(params.momentumBounce&&doBounce){_this.wrapperTransitionEnd(function(){if(!allowMomentumBounce)return;if(params.onMomentumBounce)params.onMomentumBounce(_this);_this.setWrapperTranslate(afterBouncePosition);_this.setWrapperTransition(300);})}
  1589. _this.updateActiveSlide(newPosition)}
  1590. if(!params.freeModeFluid||timeDiff>=300)_this.updateActiveSlide(_this.positions.current)
  1591. if(params.onTouchEnd)params.onTouchEnd(_this)
  1592. _this.callPlugins('onTouchEnd');return;}
  1593. direction=diff<0?"toNext":"toPrev"
  1594. if(direction=="toNext"&&(timeDiff<=300)){if(diffAbs<30||!params.shortSwipes)_this.swipeReset()
  1595. else _this.swipeNext(true);}
  1596. if(direction=="toPrev"&&(timeDiff<=300)){if(diffAbs<30||!params.shortSwipes)_this.swipeReset()
  1597. else _this.swipePrev(true);}
  1598. var targetSlideSize=0;if(params.slidesPerView=='auto'){var currentPosition=Math.abs(_this.getWrapperTranslate());var slidesOffset=0;var _slideSize;for(var i=0;i<_this.slides.length;i++){_slideSize=isH?_this.slides[i].getWidth(true):_this.slides[i].getHeight(true);slidesOffset+=_slideSize;if(slidesOffset>currentPosition){targetSlideSize=_slideSize;break;}}
  1599. if(targetSlideSize>containerSize)targetSlideSize=containerSize;}
  1600. else{targetSlideSize=slideSize*params.slidesPerView;}
  1601. if(direction=="toNext"&&(timeDiff>300)){if(diffAbs>=targetSlideSize*0.5){_this.swipeNext(true)}
  1602. else{_this.swipeReset()}}
  1603. if(direction=="toPrev"&&(timeDiff>300)){if(diffAbs>=targetSlideSize*0.5){_this.swipePrev(true);}
  1604. else{_this.swipeReset()}}
  1605. if(params.onTouchEnd)params.onTouchEnd(_this)
  1606. _this.callPlugins('onTouchEnd');}
  1607. function noSwipingSlide(el){var noSwiping=false;do{if(el.className.indexOf(params.noSwipingClass)>-1)
  1608. {noSwiping=true;}
  1609. el=el.parentElement;}while(!noSwiping&&el.parentElement&&el.className.indexOf(params.wrapperClass)==-1);if(!noSwiping&&el.className.indexOf(params.wrapperClass)>-1&&el.className.indexOf(params.noSwipingClass)>-1)
  1610. noSwiping=true;return noSwiping;}
  1611. _this.swipeNext=function(internal){if(!internal&&params.loop)_this.fixLoop();_this.callPlugins('onSwipeNext');var currentPosition=_this.getWrapperTranslate();var newPosition=currentPosition;if(params.slidesPerView=='auto'){for(var i=0;i<_this.snapGrid.length;i++){if(-currentPosition>=_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){newPosition=-_this.snapGrid[i+1]
  1612. break;}}}
  1613. else{var groupSize=slideSize*params.slidesPerGroup;newPosition=-(Math.floor(Math.abs(currentPosition)/Math.floor(groupSize))*groupSize+groupSize);}
  1614. if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition()};if(newPosition==currentPosition)return false;swipeToPosition(newPosition,'next');return true}
  1615. _this.swipePrev=function(internal){if(!internal&&params.loop)_this.fixLoop();if(!internal&&params.autoplay)_this.stopAutoplay();_this.callPlugins('onSwipePrev');var currentPosition=Math.ceil(_this.getWrapperTranslate());var newPosition;if(params.slidesPerView=='auto'){newPosition=0;for(var i=1;i<_this.snapGrid.length;i++){if(-currentPosition==_this.snapGrid[i]){newPosition=-_this.snapGrid[i-1]
  1616. break;}
  1617. if(-currentPosition>_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){newPosition=-_this.snapGrid[i]
  1618. break;}}}
  1619. else{var groupSize=slideSize*params.slidesPerGroup;newPosition=-(Math.ceil(-currentPosition/groupSize)-1)*groupSize;}
  1620. if(newPosition>0)newPosition=0;if(newPosition==currentPosition)return false;swipeToPosition(newPosition,'prev');return true;}
  1621. _this.swipeReset=function(){_this.callPlugins('onSwipeReset');var currentPosition=_this.getWrapperTranslate();var groupSize=slideSize*params.slidesPerGroup;var newPosition;var maxPosition=-maxWrapperPosition();if(params.slidesPerView=='auto'){newPosition=0;for(var i=0;i<_this.snapGrid.length;i++){if(-currentPosition===_this.snapGrid[i])return;if(-currentPosition>=_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){if(_this.positions.diff>0)newPosition=-_this.snapGrid[i+1]
  1622. else newPosition=-_this.snapGrid[i]
  1623. break;}}
  1624. if(-currentPosition>=_this.snapGrid[_this.snapGrid.length-1])newPosition=-_this.snapGrid[_this.snapGrid.length-1];if(currentPosition<=-maxWrapperPosition())newPosition=-maxWrapperPosition()}
  1625. else{newPosition=currentPosition<0?Math.round(currentPosition/groupSize)*groupSize:0}
  1626. if(params.scrollContainer){newPosition=currentPosition<0?currentPosition:0;}
  1627. if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition()}
  1628. if(params.scrollContainer&&(containerSize>slideSize)){newPosition=0;}
  1629. if(newPosition==currentPosition)return false;swipeToPosition(newPosition,'reset');return true;}
  1630. _this.swipeTo=function(index,speed,runCallbacks){index=parseInt(index,10);_this.callPlugins('onSwipeTo',{index:index,speed:speed});if(params.loop)index=index+_this.loopedSlides;var currentPosition=_this.getWrapperTranslate();if(index>(_this.slides.length-1)||index<0)return;var newPosition
  1631. if(params.slidesPerView=='auto'){newPosition=-_this.slidesGrid[index];}
  1632. else{newPosition=-index*slideSize;}
  1633. if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition();};if(newPosition==currentPosition)return false;runCallbacks=runCallbacks===false?false:true;swipeToPosition(newPosition,'to',{index:index,speed:speed,runCallbacks:runCallbacks});return true;}
  1634. function swipeToPosition(newPosition,action,toOptions){var speed=(action=='to'&&toOptions.speed>=0)?toOptions.speed:params.speed;if(_this.support.transitions||!params.DOMAnimation){_this.setWrapperTranslate(newPosition);_this.setWrapperTransition(speed);}
  1635. else{var currentPosition=_this.getWrapperTranslate();var animationStep=Math.ceil((newPosition-currentPosition)/speed*(1000/60));var direction=currentPosition>newPosition?'toNext':'toPrev';var condition=direction=='toNext'?currentPosition>newPosition:currentPosition<newPosition;if(_this._DOMAnimating)return;anim();}
  1636. function anim(){currentPosition+=animationStep;condition=direction=='toNext'?currentPosition>newPosition:currentPosition<newPosition;if(condition){_this.setWrapperTranslate(Math.round(currentPosition));_this._DOMAnimating=true
  1637. window.setTimeout(function(){anim()},1000/60)}
  1638. else{if(params.onSlideChangeEnd)params.onSlideChangeEnd(_this);_this.setWrapperTranslate(newPosition);_this._DOMAnimating=false;}}
  1639. _this.updateActiveSlide(newPosition);if(params.onSlideNext&&action=='next'){params.onSlideNext(_this,newPosition);}
  1640. if(params.onSlidePrev&&action=='prev'){params.onSlidePrev(_this,newPosition);}
  1641. if(params.onSlideReset&&action=='reset'){params.onSlideReset(_this,newPosition);}
  1642. if(action=='next'||action=='prev'||(action=='to'&&toOptions.runCallbacks==true))
  1643. slideChangeCallbacks();}
  1644. _this._queueStartCallbacks=false;_this._queueEndCallbacks=false;function slideChangeCallbacks(){_this.callPlugins('onSlideChangeStart');if(params.onSlideChangeStart){if(params.queueStartCallbacks&&_this.support.transitions){if(_this._queueStartCallbacks)return;_this._queueStartCallbacks=true;params.onSlideChangeStart(_this)
  1645. _this.wrapperTransitionEnd(function(){_this._queueStartCallbacks=false;})}
  1646. else params.onSlideChangeStart(_this)}
  1647. if(params.onSlideChangeEnd){if(_this.support.transitions){if(params.queueEndCallbacks){if(_this._queueEndCallbacks)return;_this._queueEndCallbacks=true;_this.wrapperTransitionEnd(params.onSlideChangeEnd)}
  1648. else{_this.wrapperTransitionEnd(function(){_this.fixLoop();params.onSlideChangeEnd(_this);});}}
  1649. else{if(!params.DOMAnimation){setTimeout(function(){params.onSlideChangeEnd(_this)},10)}}}}
  1650. _this.updateActiveSlide=function(position){if(!_this.initialized)return;if(_this.slides.length==0)return;_this.previousIndex=_this.activeIndex;if(typeof position=='undefined')position=_this.getWrapperTranslate();if(position>0)position=0;if(params.slidesPerView=='auto'){var slidesOffset=0;_this.activeIndex=_this.slidesGrid.indexOf(-position);if(_this.activeIndex<0){for(var i=0;i<_this.slidesGrid.length-1;i++){if(-position>_this.slidesGrid[i]&&-position<_this.slidesGrid[i+1]){break;}}
  1651. var leftDistance=Math.abs(_this.slidesGrid[i]+position)
  1652. var rightDistance=Math.abs(_this.slidesGrid[i+1]+position)
  1653. if(leftDistance<=rightDistance)_this.activeIndex=i;else _this.activeIndex=i+1;}}
  1654. else{_this.activeIndex=Math[params.visibilityFullFit?'ceil':'round'](-position/slideSize);}
  1655. if(_this.activeIndex==_this.slides.length)_this.activeIndex=_this.slides.length-1;if(_this.activeIndex<0)_this.activeIndex=0;if(!_this.slides[_this.activeIndex])return;_this.calcVisibleSlides(position);var activeClassRegexp=new RegExp("\\s*"+params.slideActiveClass);var inViewClassRegexp=new RegExp("\\s*"+params.slideVisibleClass);for(var i=0;i<_this.slides.length;i++){_this.slides[i].className=_this.slides[i].className.replace(activeClassRegexp,'').replace(inViewClassRegexp,'');if(_this.visibleSlides.indexOf(_this.slides[i])>=0){_this.slides[i].className+=' '+params.slideVisibleClass;}}
  1656. _this.slides[_this.activeIndex].className+=' '+params.slideActiveClass;if(params.loop){var ls=_this.loopedSlides;_this.activeLoopIndex=_this.activeIndex-ls;if(_this.activeLoopIndex>=_this.slides.length-ls*2){_this.activeLoopIndex=_this.slides.length-ls*2-_this.activeLoopIndex;}
  1657. if(_this.activeLoopIndex<0){_this.activeLoopIndex=_this.slides.length-ls*2+_this.activeLoopIndex;}}
  1658. else{_this.activeLoopIndex=_this.activeIndex;}
  1659. if(params.pagination){_this.updatePagination(position);}}
  1660. _this.createPagination=function(firstInit){if(params.paginationClickable&&_this.paginationButtons){removePaginationEvents();}
  1661. var paginationHTML="";var numOfSlides=_this.slides.length;var numOfButtons=numOfSlides;if(params.loop)numOfButtons-=_this.loopedSlides*2
  1662. for(var i=0;i<numOfButtons;i++){paginationHTML+='<'+params.paginationElement+' class="'+params.paginationElementClass+'"></'+params.paginationElement+'>'}
  1663. _this.paginationContainer=params.pagination.nodeType?params.pagination:$$(params.pagination)[0];_this.paginationContainer.innerHTML=paginationHTML;_this.paginationButtons=$$('.'+params.paginationElementClass,_this.paginationContainer);if(!firstInit)_this.updatePagination()
  1664. _this.callPlugins('onCreatePagination');if(params.paginationClickable){addPaginationEvents();}}
  1665. function removePaginationEvents(){var pagers=_this.paginationButtons;for(var i=0;i<pagers.length;i++){_this.h.removeEventListener(pagers[i],'click',paginationClick);}}
  1666. function addPaginationEvents(){var pagers=_this.paginationButtons;for(var i=0;i<pagers.length;i++){_this.h.addEventListener(pagers[i],'click',paginationClick);}}
  1667. function paginationClick(e){var index;var target=e.target||e.srcElement;var pagers=_this.paginationButtons;for(var i=0;i<pagers.length;i++){if(target===pagers[i])index=i;}
  1668. _this.swipeTo(index)}
  1669. _this.updatePagination=function(position){if(!params.pagination)return;if(_this.slides.length<1)return;var activePagers=$$('.'+params.paginationActiveClass,_this.paginationContainer);if(!activePagers)return;var pagers=_this.paginationButtons;if(pagers.length==0)return;for(var i=0;i<pagers.length;i++){pagers[i].className=params.paginationElementClass}
  1670. var indexOffset=params.loop?_this.loopedSlides:0;if(params.paginationAsRange){if(!_this.visibleSlides)_this.calcVisibleSlides(position)
  1671. var visibleIndexes=[];for(var i=0;i<_this.visibleSlides.length;i++){var visIndex=_this.slides.indexOf(_this.visibleSlides[i])-indexOffset
  1672. if(params.loop&&visIndex<0){visIndex=_this.slides.length-_this.loopedSlides*2+visIndex;}
  1673. if(params.loop&&visIndex>=_this.slides.length-_this.loopedSlides*2){visIndex=_this.slides.length-_this.loopedSlides*2-visIndex;visIndex=Math.abs(visIndex)}
  1674. visibleIndexes.push(visIndex)}
  1675. for(i=0;i<visibleIndexes.length;i++){if(pagers[visibleIndexes[i]])pagers[visibleIndexes[i]].className+=' '+params.paginationVisibleClass;}
  1676. if(params.loop){pagers[_this.activeLoopIndex].className+=' '+params.paginationActiveClass;}
  1677. else{pagers[_this.activeIndex].className+=' '+params.paginationActiveClass;}}
  1678. else{if(params.loop){pagers[_this.activeLoopIndex].className+=' '+params.paginationActiveClass+' '+params.paginationVisibleClass;}
  1679. else{pagers[_this.activeIndex].className+=' '+params.paginationActiveClass+' '+params.paginationVisibleClass;}}}
  1680. _this.calcVisibleSlides=function(position){var visibleSlides=[];var _slideLeft=0,_slideSize=0,_slideRight=0;if(isH&&_this.wrapperLeft>0)position=position+_this.wrapperLeft;if(!isH&&_this.wrapperTop>0)position=position+_this.wrapperTop;for(var i=0;i<_this.slides.length;i++){_slideLeft+=_slideSize;if(params.slidesPerView=='auto')
  1681. _slideSize=isH?_this.h.getWidth(_this.slides[i],true):_this.h.getHeight(_this.slides[i],true);else _slideSize=slideSize;_slideRight=_slideLeft+_slideSize;var isVisibile=false;if(params.visibilityFullFit){if(_slideLeft>=-position&&_slideRight<=-position+containerSize)isVisibile=true;if(_slideLeft<=-position&&_slideRight>=-position+containerSize)isVisibile=true;}
  1682. else{if(_slideRight>-position&&_slideRight<=((-position+containerSize)))isVisibile=true;if(_slideLeft>=-position&&_slideLeft<((-position+containerSize)))isVisibile=true;if(_slideLeft<-position&&_slideRight>((-position+containerSize)))isVisibile=true;}
  1683. if(isVisibile)visibleSlides.push(_this.slides[i])}
  1684. if(visibleSlides.length==0)visibleSlides=[_this.slides[_this.activeIndex]]
  1685. _this.visibleSlides=visibleSlides;}
  1686. _this.autoPlayIntervalId=undefined;_this.startAutoplay=function(){if(typeof _this.autoPlayIntervalId!=='undefined')return false;if(params.autoplay&&!params.loop){_this.autoPlayIntervalId=setInterval(function(){if(!_this.swipeNext(true))_this.swipeTo(0);},params.autoplay)}
  1687. if(params.autoplay&&params.loop){_this.autoPlayIntervalId=setInterval(function(){_this.swipeNext();},params.autoplay)}
  1688. _this.callPlugins('onAutoplayStart');}
  1689. _this.stopAutoplay=function(){if(_this.autoPlayIntervalId)clearInterval(_this.autoPlayIntervalId);_this.autoPlayIntervalId=undefined;_this.callPlugins('onAutoplayStop');}
  1690. _this.loopCreated=false;_this.removeLoopedSlides=function(){if(_this.loopCreated){for(var i=0;i<_this.slides.length;i++){if(_this.slides[i].getData('looped')===true)_this.wrapper.removeChild(_this.slides[i]);}}}
  1691. _this.createLoop=function(){if(_this.slides.length==0)return;_this.loopedSlides=params.slidesPerView+params.loopAdditionalSlides;if(_this.loopedSlides>_this.slides.length){_this.loopedSlides=_this.slides.length;}
  1692. var slideFirstHTML='',slideLastHTML='',i;for(i=0;i<_this.loopedSlides;i++){slideFirstHTML+=_this.slides[i].outerHTML;}
  1693. for(i=_this.slides.length-_this.loopedSlides;i<_this.slides.length;i++){slideLastHTML+=_this.slides[i].outerHTML;}
  1694. wrapper.innerHTML=slideLastHTML+wrapper.innerHTML+slideFirstHTML;_this.loopCreated=true;_this.calcSlides();for(i=0;i<_this.slides.length;i++){if(i<_this.loopedSlides||i>=_this.slides.length-_this.loopedSlides)_this.slides[i].setData('looped',true);}
  1695. _this.callPlugins('onCreateLoop');}
  1696. _this.fixLoop=function(){var newIndex;if(_this.activeIndex<_this.loopedSlides){newIndex=_this.slides.length-_this.loopedSlides*3+_this.activeIndex;_this.swipeTo(newIndex,0,false);}
  1697. else if(_this.activeIndex>_this.slides.length-params.slidesPerView*2){newIndex=-_this.slides.length+_this.activeIndex+_this.loopedSlides
  1698. _this.swipeTo(newIndex,0,false);}}
  1699. _this.loadSlides=function(){var slidesHTML='';_this.activeLoaderIndex=0;var slides=params.loader.slides;var slidesToLoad=params.loader.loadAllSlides?slides.length:params.slidesPerView*(1+params.loader.surroundGroups);for(var i=0;i<slidesToLoad;i++){if(params.loader.slidesHTMLType=='outer')slidesHTML+=slides[i];else{slidesHTML+='<'+params.slideElement+' class="'+params.slideClass+'" data-swiperindex="'+i+'">'+slides[i]+'</'+params.slideElement+'>';}}
  1700. _this.wrapper.innerHTML=slidesHTML;_this.calcSlides(true);if(!params.loader.loadAllSlides){_this.wrapperTransitionEnd(_this.reloadSlides,true);}}
  1701. _this.reloadSlides=function(){var slides=params.loader.slides;var newActiveIndex=parseInt(_this.activeSlide().data('swiperindex'),10)
  1702. if(newActiveIndex<0||newActiveIndex>slides.length-1)return
  1703. _this.activeLoaderIndex=newActiveIndex;var firstIndex=Math.max(0,newActiveIndex-params.slidesPerView*params.loader.surroundGroups)
  1704. var lastIndex=Math.min(newActiveIndex+params.slidesPerView*(1+params.loader.surroundGroups)-1,slides.length-1)
  1705. if(newActiveIndex>0){var newTransform=-slideSize*(newActiveIndex-firstIndex)
  1706. _this.setWrapperTranslate(newTransform);_this.setWrapperTransition(0);}
  1707. if(params.loader.logic==='reload'){_this.wrapper.innerHTML='';var slidesHTML='';for(var i=firstIndex;i<=lastIndex;i++){slidesHTML+=params.loader.slidesHTMLType=='outer'?slides[i]:'<'+params.slideElement+' class="'+params.slideClass+'" data-swiperindex="'+i+'">'+slides[i]+'</'+params.slideElement+'>';}
  1708. _this.wrapper.innerHTML=slidesHTML;}
  1709. else{var minExistIndex=1000;var maxExistIndex=0;for(var i=0;i<_this.slides.length;i++){var index=_this.slides[i].data('swiperindex');if(index<firstIndex||index>lastIndex){_this.wrapper.removeChild(_this.slides[i]);}
  1710. else{minExistIndex=Math.min(index,minExistIndex)
  1711. maxExistIndex=Math.max(index,maxExistIndex)}}
  1712. for(var i=firstIndex;i<=lastIndex;i++){if(i<minExistIndex){var newSlide=document.createElement(params.slideElement);newSlide.className=params.slideClass;newSlide.setAttribute('data-swiperindex',i);newSlide.innerHTML=slides[i];_this.wrapper.insertBefore(newSlide,_this.wrapper.firstChild);}
  1713. if(i>maxExistIndex){var newSlide=document.createElement(params.slideElement);newSlide.className=params.slideClass;newSlide.setAttribute('data-swiperindex',i);newSlide.innerHTML=slides[i];_this.wrapper.appendChild(newSlide);}}}
  1714. _this.reInit(true);}
  1715. function makeSwiper(){_this.calcSlides();if(params.loader.slides.length>0&&_this.slides.length==0){_this.loadSlides();}
  1716. if(params.loop){_this.createLoop();}
  1717. _this.init();initEvents();if(params.pagination&&params.createPagination){_this.createPagination(true);}
  1718. if(params.loop||params.initialSlide>0){_this.swipeTo(params.initialSlide,0,false);}
  1719. else{_this.updateActiveSlide(0);}
  1720. if(params.autoplay){_this.startAutoplay();}}
  1721. makeSwiper();}
  1722. Swiper.prototype={plugins:{},wrapperTransitionEnd:function(callback,permanent){var a=this,el=a.wrapper,events=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'],i;function fireCallBack(){callback(a);if(a.params.queueEndCallbacks)a._queueEndCallbacks=false;if(!permanent){for(i=0;i<events.length;i++){a.h.removeEventListener(el,events[i],fireCallBack);}}}
  1723. if(callback){for(i=0;i<events.length;i++){a.h.addEventListener(el,events[i],fireCallBack);}}},getWrapperTranslate:function(axis){var el=this.wrapper,matrix,curTransform,curStyle,transformMatrix;if(typeof axis=='undefined'){axis=this.params.mode=='horizontal'?'x':'y';}
  1724. curStyle=window.getComputedStyle(el,null);if(window.WebKitCSSMatrix){transformMatrix=new WebKitCSSMatrix(curStyle.webkitTransform);}
  1725. else{transformMatrix=curStyle.MozTransform||curStyle.OTransform||curStyle.MsTransform||curStyle.msTransform||curStyle.transform||curStyle.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,");matrix=transformMatrix.toString().split(',');}
  1726. if(this.support.transforms&&this.params.useCSS3Transforms){if(axis=='x'){if(window.WebKitCSSMatrix)
  1727. curTransform=transformMatrix.m41;else if(matrix.length==16)
  1728. curTransform=parseFloat(matrix[12]);else
  1729. curTransform=parseFloat(matrix[4]);}
  1730. if(axis=='y'){if(window.WebKitCSSMatrix)
  1731. curTransform=transformMatrix.m42;else if(matrix.length==16)
  1732. curTransform=parseFloat(matrix[13]);else
  1733. curTransform=parseFloat(matrix[5]);}}
  1734. else{if(axis=='x')curTransform=parseFloat(el.style.left,10)||0;if(axis=='y')curTransform=parseFloat(el.style.top,10)||0;}
  1735. return curTransform||0;},setWrapperTranslate:function(x,y,z){var es=this.wrapper.style,coords={x:0,y:0,z:0},translate;if(arguments.length==3){coords.x=x;coords.y=y;coords.z=z;}
  1736. else{if(typeof y=='undefined'){y=this.params.mode=='horizontal'?'x':'y';}
  1737. coords[y]=x;}
  1738. if(this.support.transforms&&this.params.useCSS3Transforms){translate=this.support.transforms3d?'translate3d('+coords.x+'px, '+coords.y+'px, '+coords.z+'px)':'translate('+coords.x+'px, '+coords.y+'px)';es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=translate;}
  1739. else{es.left=coords.x+'px';es.top=coords.y+'px';}
  1740. this.callPlugins('onSetWrapperTransform',coords);},setWrapperTransition:function(duration){var es=this.wrapper.style;es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=(duration/1000)+'s';this.callPlugins('onSetWrapperTransition',{duration:duration});},h:{getWidth:function(el,outer){var width=window.getComputedStyle(el,null).getPropertyValue('width')
  1741. var returnWidth=parseFloat(width);if(isNaN(returnWidth)||width.indexOf('%')>0){returnWidth=el.offsetWidth-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-left'))-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-right'));}
  1742. if(outer)returnWidth+=parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-left'))+parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-right'))
  1743. return returnWidth;},getHeight:function(el,outer){if(outer)return el.offsetHeight;var height=window.getComputedStyle(el,null).getPropertyValue('height')
  1744. var returnHeight=parseFloat(height);if(isNaN(returnHeight)||height.indexOf('%')>0){returnHeight=el.offsetHeight-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-top'))-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-bottom'));}
  1745. if(outer)returnHeight+=parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-top'))+parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-bottom'))
  1746. return returnHeight;},getOffset:function(el){var box=el.getBoundingClientRect();var body=document.body;var clientTop=el.clientTop||body.clientTop||0;var clientLeft=el.clientLeft||body.clientLeft||0;var scrollTop=window.pageYOffset||el.scrollTop;var scrollLeft=window.pageXOffset||el.scrollLeft;if(document.documentElement&&!window.pageYOffset){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}
  1747. return{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft};},windowWidth:function(){if(window.innerWidth)return window.innerWidth
  1748. else if(document.documentElement&&document.documentElement.clientWidth)return document.documentElement.clientWidth;},windowHeight:function(){if(window.innerHeight)return window.innerHeight
  1749. else if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;},windowScroll:function(){var left=0,top=0;if(typeof pageYOffset!='undefined'){return{left:window.pageXOffset,top:window.pageYOffset}}
  1750. else if(document.documentElement){return{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}},addEventListener:function(el,event,listener,useCapture){if(typeof useCapture=='undefined'){useCapture=false;}
  1751. if(el.addEventListener){el.addEventListener(event,listener,useCapture);}
  1752. else if(el.attachEvent){el.attachEvent('on'+event,listener);}},removeEventListener:function(el,event,listener,useCapture){if(typeof useCapture=='undefined'){useCapture=false;}
  1753. if(el.removeEventListener){el.removeEventListener(event,listener,useCapture);}
  1754. else if(el.detachEvent){el.detachEvent('on'+event,listener);}}},setTransform:function(el,transform){var es=el.style
  1755. es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transform},setTranslate:function(el,translate){var es=el.style
  1756. var pos={x:translate.x||0,y:translate.y||0,z:translate.z||0};var transformString=this.support.transforms3d?'translate3d('+(pos.x)+'px,'+(pos.y)+'px,'+(pos.z)+'px)':'translate('+(pos.x)+'px,'+(pos.y)+'px)';es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transformString;if(!this.support.transforms){es.left=pos.x+'px'
  1757. es.top=pos.y+'px'}},setTransition:function(el,duration){var es=el.style
  1758. es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=duration+'ms';},support:{touch:(window.Modernizr&&Modernizr.touch===true)||(function(){return!!(("ontouchstart"in window)||window.DocumentTouch&&document instanceof DocumentTouch);})(),transforms3d:(window.Modernizr&&Modernizr.csstransforms3d===true)||(function(){var div=document.createElement('div').style;return("webkitPerspective"in div||"MozPerspective"in div||"OPerspective"in div||"MsPerspective"in div||"perspective"in div);})(),transforms:(window.Modernizr&&Modernizr.csstransforms===true)||(function(){var div=document.createElement('div').style;return('transform'in div||'WebkitTransform'in div||'MozTransform'in div||'msTransform'in div||'MsTransform'in div||'OTransform'in div);})(),transitions:(window.Modernizr&&Modernizr.csstransitions===true)||(function(){var div=document.createElement('div').style;return('transition'in div||'WebkitTransition'in div||'MozTransition'in div||'msTransition'in div||'MsTransition'in div||'OTransition'in div);})()},browser:{ie8:(function(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
  1759. rv=parseFloat(RegExp.$1);}
  1760. return rv!=-1&&rv<9;})(),ie10:window.navigator.msPointerEnabled}}
  1761. if(window.jQuery||window.Zepto){(function($){$.fn.swiper=function(params){var s=new Swiper($(this)[0],params)
  1762. $(this).data('swiper',s);return s;}})(window.jQuery||window.Zepto)}
  1763. if(typeof(module)!=='undefined')
  1764. {module.exports=Swiper;}
  1765. jQuery(document).ready(function($){var doneVideoInit=false;var $captionTrans=0;var parallaxSlider=$('.parallax_slider_outer.first-section');function parallaxSliderPos(){parallaxSlider.insertBefore('.container-wrap');}
  1766. parallaxSliderPos();var $smoothSrollWidth=($('body').attr('data-smooth-scrolling')=='1')?0:0;if($('body > #boxed').length==0&&$('.nectar-slider-wrap[data-full-width="true"]').parent().attr('id')!='portfolio-extra'&&$('.nectar-slider-wrap[data-full-width="true"]').parents('#post-area:not(".span_12")').length==0){$('.nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .nectar-slider-wrap').css('left',-(($(window).width()-$smoothSrollWidth)/2-$('.main-content').width()/2))+'px';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$(window).width());}
  1767. else if($('.nectar-slider-wrap[data-full-width="true"]').parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){$('.nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .nectar-slider-wrap').css('left',-(($(window).width()-$smoothSrollWidth)/2-$('.main-content').width()/2))+'px';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$(window).width());}
  1768. else{var $container=($('body > #boxed').length==0)?'#post-area':'.container-wrap';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$($container).width());}
  1769. $('.nectar-slider-wrap').show();$('.swiper-container, .swiper-slide').css('background-color','#000');$('.video-texture').css('opacity','1');var $nectarSliders=[];$('.nectar-slider-wrap').each(function(i){var $arrows=$(this).find('.swiper-container').attr('data-arrows');var $bullets=$(this).find('.swiper-container').attr('data-bullets');var $swipe=$(this).find('.swiper-container').attr('data-desktop-swipe');var $loop=$(this).find('.swiper-container').attr('data-loop');if($swipe=='true'&&$('#'+$(this).attr('id')+' .swiper-wrapper > div').length>1){var $grab=1;var $desktopSwipe=1;}else{var $grab=0;var $desktopSwipe=0;}
  1770. if($bullets=='true'&&$(this).find('.swiper-wrapper > div').length>1){$bullets='#'+$(this).attr('id')+' .slider-pagination';}else{$bullets=null;}
  1771. $useLoop=($loop=='true'&&$(this).find('.swiper-wrapper > div').length>1&&!$('html').hasClass('no-video'))?true:false;if($useLoop==false)$(this).find('.swiper-container').attr('data-loop','false');$nectarSliders[i]=new Swiper('#'+$(this).attr('id')+' .swiper-container',{loop:$useLoop,grabCursor:$grab,touchRatio:0.6,speed:525,useCSS3Transforms:false,pagination:$bullets,simulateTouch:$desktopSwipe,onSlideChangeEnd:captionTransition,onSlideChangeStart:sliderArrowCount,onTouchMove:clearAutoplay,onFirstInit:nectarInit});$nectarSliders[i].swipeReset();function nectarInit(){if(doneVideoInit==true)return;$('.swiper-slide .slider-video').mediaelementplayer({enableKeyboard:false,iPadUseNativeControls:false,pauseOtherPlayers:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false});doneVideoInit=true;}
  1772. if($arrows=='true'&&$('#'+$(this).attr('id')+' .swiper-wrapper > div').length>1){$('.slide-count i').transition({scale:0.5,opacity:0});$('.swiper-container .slider-prev, .swiper-container .slider-next').hover(function(){$(this).find('.slide-count i').clearQueue().stop(true,true).delay(100).transition({scale:1,opacity:1},200);$(this).stop(true,true).animate({'width':'120px'},300,'easeOutCubic');$(this).find('.slide-count span').clearQueue().stop().delay(100).animate({'opacity':'1'},225,'easeOutCubic');},function(){$('.slide-count i').stop(true,true).transition({scale:0,opacity:0},200);$(this).stop().delay(150).animate({'width':'64px'},300,'easeOutCubic');$(this).find('.slide-count span').stop(true,true).animate({'opacity':'0'},200,'easeOutCubic');});var $slideCount=($(this).find('.swiper-container').attr('data-loop')!='true')?$('#'+$(this).attr('id')+' .swiper-wrapper > div').length:$('#'+$(this).attr('id')+' .swiper-wrapper > div').length-2;if($('html').hasClass('no-video'))$slideCount=$('#'+$(this).attr('id')+' .swiper-wrapper > div').length;$('#'+$(this).attr('id')+' .slider-prev .slide-count .slide-total').html($slideCount);$('#'+$(this).attr('id')+' .slider-next .slide-count .slide-total').html($slideCount);$('#'+$(this).attr('id')+' .slider-prev').click(function(e){if($(this).hasClass('inactive'))return false;var $that=$(this);if($(this).parents('.swiper-container').attr('data-loop')!='true'){if($(this).parents('.swiper-container').find('.swiper-slide-active').index()+1==1&&!$('html').hasClass('no-video')){var $timeout;clearTimeout($timeout);$timeout=setTimeout(function(){$that.removeClass('inactive');},700);$(this).parents('.swiper-container').find('.swiper-wrapper').stop(true,false).css('transition','none').animate({'left':parseInt($(this).parents('.swiper-container').find('.swiper-wrapper').css('left'))+20},200,function(){$(this).parents('.swiper-container').find('.swiper-wrapper').stop(true,false).css('transition','left,top');$nectarSliders[i].swipeReset();});$(this).addClass('inactive');}}
  1773. e.preventDefault();$nectarSliders[i].swipePrev();});$('#'+$(this).attr('id')+' .slider-next').click(function(e){if($(this).hasClass('inactive'))return false;var $that=$(this);var $slideNum=$(this).parents('.swiper-container').find('.swiper-wrapper > div').length;if($(this).parents('.swiper-container').attr('data-loop')!='true'){if($(this).parents('.swiper-container').find('.swiper-slide-active').index()+1==$slideNum&&!$('html').hasClass('no-video')){var $timeout;clearTimeout($timeout);$timeout=setTimeout(function(){$that.removeClass('inactive');},700);$(this).parents('.swiper-container').find('.swiper-wrapper').stop(true,false).css('transition','none').animate({'left':parseInt($(this).parents('.swiper-container').find('.swiper-wrapper').css('left'))-20},200,function(){$(this).parents('.swiper-container').find('.swiper-wrapper').stop(true,false).css('transition','left,top');$nectarSliders[i].swipeReset();});$(this).addClass('inactive');}}
  1774. e.preventDefault();$nectarSliders[i].swipeNext();});}
  1775. if($bullets!=null&&$('#'+$(this).attr('id')+' .swiper-wrapper > div').length>1){$('#'+$(this).attr('id')+' .slider-pagination .swiper-pagination-switch').click(function(){$nectarSliders[i].swipeTo($(this).index());});}});$('.swiper-wrapper').each(function(){if($(this).find('.swiper-slide:nth-child(2) video').length>0)$(this).find('.swiper-slide:nth-child(2)').addClass('first_video_slide');});$('.nectar-slider-wrap').each(function(i){var $sliderWrapCount=$('.nectar-slider-wrap').length;var $that=$(this);if($(this).find('.swiper-slide-active video').length>0){if(!$('html').hasClass('no-video')){$(this).find('.swiper-slide-active:first video').get(0).addEventListener('canplay',function(){showSliderControls();resizeToCover();sliderLoadIn($that);captionTransition($nectarSliders[i]);});}
  1776. else{showSliderControls();resizeToCover();sliderLoadIn($that);captionTransition($nectarSliders[i]);}}
  1777. else{var $firstBg=$(this).find('.swiper-slide-active').attr('style');var pattern=/url\(["']?([^'")]+)['"]?\)/;var match=pattern.exec($firstBg);if(match){var slideImg=new Image();slideImg.src=match[1];$(slideImg).load(function(){showSliderControls();sliderLoadIn($that);captionTransition($nectarSliders[i]);});}}
  1778. if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){captionTransition($nectarSliders[i]);showSliderControls();resizeToCover();$('.nectar-slider-wrap').find('.nectar-slider-loading').fadeOut(800,'easeInOutExpo');$('.nectar-slider-wrap .mobile-video-image').show();$('.nectar-slider-wrap .video-wrap').remove();}});var $animating=false;fullscreenSlider();function fullscreenSlider(){var $adminBarHeight=($('#wpadminbar').length>0)?28:0;$('.nectar-slider-wrap').each(function(){if($(this).attr('data-fullscreen')=='true'&&$(this).attr('data-full-width')=='true'){if($(this).hasClass('first-section')&&$(this).index()==0){$(this).find('.swiper-container').attr('data-height',$(window).height()-$(this).offset().top+2);}
  1779. else if($(this).parents('.parallax_slider_outer').length>0&&$(this).parents('#full_width_portfolio').length==0){$(this).find('.swiper-container').attr('data-height',$(window).height()-$(this).parent().offset().top+2);}
  1780. else if($(this).parents('#full_width_portfolio').length>0&&$(this).attr('data-parallax')!='true'&&$(this).index()==0){$(this).find('.swiper-container').attr('data-height',$(window).height()-$(this).offset().top+2);}
  1781. else if($(this).parents('#full_width_portfolio').length>0&&$(this).attr('data-parallax')=='true'){$(this).find('.swiper-container').attr('data-height',$(window).height()-$(this).offset().top+2);}
  1782. else{$(this).find('.swiper-container').attr('data-height',$(window).height());}}});}
  1783. $(window).resize(fullscreenSlider);var $sliderHeights=[];$('.swiper-container').each(function(i){$sliderHeights[i]=parseInt($(this).attr('data-height'));});sliderSize();$(window).resize(sliderSize);function sliderSize(){if(window.innerWidth<1000&&window.innerWidth>690){$('.nectar-slider-wrap[data-full-width="true"]:not([data-fullscreen="true"]) .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/1.4)});$('.nectar-slider-wrap[data-full-width="false"] .swiper-container, .nectar-slider-wrap[data-full-width="boxed-full-width"] .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/1.9)});}
  1784. else if(window.innerWidth<=690){$('.nectar-slider-wrap[data-full-width="true"]:not([data-fullscreen="true"]) .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/2.7)});$('.nectar-slider-wrap[data-full-width="false"] .swiper-container, .nectar-slider-wrap[data-full-width="boxed-full-width"] .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/2.9)});}
  1785. else if(window.innerWidth<1300&&window.innerWidth>=1000){$('.nectar-slider-wrap[data-full-width="true"]:not([data-fullscreen="true"]) .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/1.2)});$('.nectar-slider-wrap[data-full-width="false"] .swiper-container, .nectar-slider-wrap[data-full-width="boxed-full-width"] .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i]/1.2)});}
  1786. else{$('.nectar-slider-wrap[data-full-width="true"]:not([data-fullscreen="true"]) .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i])});$('.nectar-slider-wrap[data-full-width="false"] .swiper-container, .nectar-slider-wrap[data-full-width="boxed-full-width"] .swiper-container').each(function(i){$(this).attr('data-height',$sliderHeights[i])});}}
  1787. var min_w=1500;var vid_w_orig;var vid_h_orig;vid_w_orig=1280;vid_h_orig=720;var $headerHeight=$('header').height()-1;$(window).resize(function(){resizeToCover();slideContentPos();});$(window).trigger('resize');function resizeToCover(){$('.nectar-slider-wrap').each(function(i){if($('body > #boxed').length==0&&$('.nectar-slider-wrap[data-full-width="true"]').parent().attr('id')!='portfolio-extra'&&$(this).parents('#post-area:not(".span_12")').length==0){$('.nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .nectar-slider-wrap').css('left',-(($(window).width()-$smoothSrollWidth)/2-$('.main-content').width()/2))+'px';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$(window).width());}
  1788. else if($('.nectar-slider-wrap[data-full-width="true"]').parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){$('.nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .nectar-slider-wrap').css('left',-(($(window).width()-$smoothSrollWidth)/2-$('.main-content').width()/2))+'px';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$(window).width());}
  1789. else{var $container=($('body > #boxed').length==0)?'#post-area':'.container-wrap';$('.nectar-slider-wrap[data-full-width="true"] .swiper-container, .nectar-slider-wrap[data-full-width="true"], .parallax_slider_outer.first-section .swiper-container, .parallax_slider_outer.first-section .nectar-slider-wrap').css('width',$($container).width());}
  1790. var $sliderHeight=parseInt($(this).find('.swiper-container').attr('data-height'));var isFullWidthCompatible=($(this).attr('data-full-width')=='true')?'true':'false';if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length==0||$(this).parents('#post-area').length>0){isFullWidthCompatible='false';};var $sliderWidth=(isFullWidthCompatible=='true')?$(window).width()-$smoothSrollWidth:$(this).width();$(this).parents('.parallax_slider_outer').css('height',$sliderHeight);$(this).css('height',$sliderHeight);$(this).find('.swiper-container, .swiper-slide').css({'height':$sliderHeight+2,'top':'-1px'});$(this).find('.swiper-container').css('width',$sliderWidth);$(this).find('.video-wrap').width($sliderWidth+2);$(this).find('.video-wrap').height($sliderHeight+2);var scale_h=$sliderWidth/vid_w_orig;var scale_v=($sliderHeight-$headerHeight)/vid_h_orig;var scale=scale_h>scale_v?scale_h:scale_v;min_w=1280/720*($sliderHeight+20);if(scale*vid_w_orig<min_w){scale=min_w/vid_w_orig;}
  1791. $(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale*vid_w_orig+2));$(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale*vid_h_orig+2));$(this).find('.video-wrap').scrollLeft(($(this).find('video').width()-$sliderWidth)/2);$(this).find('.swiper-slide').each(function(){if($(this).find('.video-wrap').length>0){if($(this).attr('data-bg-alignment')=='center'){$(this).find('.video-wrap, .mejs-overlay, .mejs-poster').scrollTop(($(this).find('video').height()-($sliderHeight))/2);}
  1792. else if($(this).attr('data-bg-alignment')=='bottom'){$(this).find('.video-wrap').scrollTop(($(this).find('video').height()-($sliderHeight+2)));}
  1793. else{$(this).find('.video-wrap').scrollTop(0);}}});});};function captionTransition(obj){resizeToCover();var $containerClass;(typeof obj=='undefined')?$containerClass='div[id^=ns-id-]':$containerClass='#'+$(obj.container).parents('.nectar-slider-wrap').attr('id');;var fromLeft=Math.abs(parseInt($($containerClass+' .swiper-wrapper').css('left')));var currentSlide=Math.round(fromLeft/$($containerClass+' .swiper-slide').width());var $slideNum=$($containerClass+':first .swiper-wrapper > div').length;if(isNaN(currentSlide))currentSlide=0;if($($containerClass+' .swiper-slide:nth-child('+(currentSlide+1)+')').find('.content *').length>0){if($($containerClass+' .swiper-slide:nth-child('+(currentSlide+1)+')').find('.content *').css('opacity')!='0'&&!$('html').hasClass('no-video')){playVideoBG(currentSlide+1,$containerClass);return false;}}
  1794. if(!$('html').hasClass('no-video')){$($containerClass+' .swiper-slide .content p, '+$containerClass+' .swiper-slide .content h2, '+$containerClass+' .swiper-slide .content .buttons').stop(true,true).animate({'opacity':0,'padding-top':25},1);}
  1795. $($containerClass+' .swiper-slide').each(function(){if($(this).find('.video-wrap video').length>0&&!$('html').hasClass('no-video')){$(this).find('.video-wrap video').get(0).pause();}});$($containerClass+' .swiper-slide:not(".swiper-slide-active")').each(function(){if($(this).find('.video-wrap video').length>0){if($(this).find('.video-wrap video').get(0).currentTime!=0)$(this).find('.video-wrap video').get(0).currentTime=0;}});if($($containerClass+' .swiper-container').attr('data-loop')=='true'){if($($containerClass+' .swiper-slide-active').index()+1==2&&$($containerClass+' .swiper-slide-active video').length>0&&!$('html').hasClass('no-video')){$($containerClass+' .swiper-slide:last-child').find('.video-wrap video').get(0).play();$($containerClass+' .swiper-slide:last-child').find('.video-wrap video').get(0).pause();}
  1796. if($($containerClass+' .swiper-slide-active').index()+1==$slideNum-1&&$($containerClass+' .swiper-slide-active video').length>0&&!$('html').hasClass('no-video')){$($containerClass+' .swiper-slide:first-child').find('.video-wrap video').get(0).play();$($containerClass+' .swiper-slide:first-child').find('.video-wrap video').get(0).pause();}
  1797. if($($containerClass+' .swiper-slide-active').index()+1!=2&&$($containerClass+' .swiper-slide:nth-child(2) video').length>0&&!$('html').hasClass('no-video')){$($containerClass+' .swiper-slide:last-child').find('.video-wrap video').get(0).play();$($containerClass+' .swiper-slide:last-child').find('.video-wrap video').get(0).pause();$($containerClass+' .swiper-slide:nth-child(2) video').get(0).pause();if($($containerClass+' .swiper-slide:nth-child(2) video').get(0).currentTime!=0)$($containerClass+' .swiper-slide:nth-child(2) video').get(0).currentTime=0;}
  1798. if($($containerClass+' .swiper-slide-active').index()+1==$slideNum-1){$($containerClass+' .swiper-slide:nth-child(1)').find('.content').children().each(function(i){$(this).stop().delay(i*90).animate({'opacity':1,'padding-top':0},{duration:400,easing:'easeOutQuad'});});}
  1799. if($($containerClass+' .swiper-slide-active').index()+1==2){$($containerClass+' .swiper-slide:nth-child('+($slideNum)+')').find('.content').children().each(function(i){$(this).stop().delay(i*90).animate({'opacity':1,'padding-top':0},{duration:400,easing:'easeOutQuad'});});}}
  1800. playVideoBG(currentSlide+1,$containerClass);$($containerClass+' .swiper-slide:nth-child('+(currentSlide+1)+')').find('.content').children().each(function(i){$(this).stop().delay(i*90).animate({'opacity':1,'padding-top':0},{duration:400,easing:'easeOutQuad'});});if($($containerClass+' .swiper-slide:nth-child('+(currentSlide+1)+')').attr('data-color-scheme')=='dark'){$($containerClass).find('.slider-pagination').addClass('dark-cs');$($containerClass).find('.slider-prev, .slider-next').addClass('dark-cs');}else{$($containerClass).find('.slider-pagination').removeClass('dark-cs');$($containerClass).find('.slider-prev, .slider-next').removeClass('dark-cs');}
  1801. $captionTrans++;if($captionTrans==$('.swiper-wrapper').length){$('div.first_video_slide').addClass('nulled')}}
  1802. function playVideoBG(nthChild,containerClass){if($(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.video-wrap video').length>0){if(!$('html').hasClass('no-video'))$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.video-wrap video').get(0).play();if(!$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-overlay.mejs-overlay-play').hasClass('playing')&&$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-overlay.mejs-overlay-play').hasClass('mobile-played')){$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-overlay.mejs-overlay-play').addClass('playing');}
  1803. if(!$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-poster').hasClass('playing')&&$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-poster').hasClass('mobile-played'))$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-poster').addClass('playing');var $that=$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-overlay.mejs-overlay-play');var $that2=$(containerClass+' .swiper-slide:nth-child('+(nthChild)+')').find('.mejs-poster');if($that.hasClass('playing')&&$that.hasClass('mobile-played')){setTimeout(function(){$that.addClass('behind-buttons');$that2.addClass('behind-buttons');},200);}else{$that.removeClass('behind-buttons');$that2.removeClass('behind-buttons');}}}
  1804. var $startingSlide=null;function slideContentPos(){$('.swiper-wrapper').each(function(){var $extraHeight=($(this).parents('.nectar-slider-wrap').hasClass('first-section')||$(this).parents('.parallax_slider_outer').hasClass('first-section'))?30:0;var $sliderHeight=parseInt($(this).parents('.swiper-container').attr('data-height'));$(this).find('.swiper-slide').each(function(){var $contentHeight=$(this).find('.content').height();var $contentItems=$(this).find('.content > *').length;if($(this).find('.content > *').css('padding-top')=='25px')$contentHeight=$contentHeight-25*$contentItems;if($(this).attr('data-y-pos')=='top'){var $topHeight=($contentHeight/2)<(($sliderHeight/4)-30)?(($sliderHeight/4)-($contentHeight/2))+20:$sliderHeight/8;$(this).find('.content').css('top',$topHeight+'px');}
  1805. else if($(this).attr('data-y-pos')=='middle'){$(this).find('.content').css('top',($sliderHeight/2)-($contentHeight/2)+'px');}
  1806. else{if($contentHeight>180){$(this).find('.content').css('top',($sliderHeight/2)-($contentHeight/10)+'px');}else{$(this).find('.content').css('top',($sliderHeight/2)+($contentHeight/9)+'px');}}});});}
  1807. function showSliderControls(){$('.swiper-container .slider-prev, .swiper-container .slider-next, .slider-pagination').animate({'opacity':1},550,'easeOutSine');}
  1808. var sliderLength=$('.swiper-container').length;var sliderLoadedLength=0;function sliderLoadIn(slider){slider.find('.nectar-slider-loading').fadeOut(800,'easeInOutExpo');var $smoothActive=$('body').attr('data-smooth-scrolling');if($smoothActive==1&&$(window).width()>690&&$('body').outerHeight(true)>$(window).height()&&$('#ascrail2000').length==0){niceScrollInit();resizeToCover();}
  1809. sliderLoadedLength++;if($('.tabbed').find('.swiper-container').length>0&&sliderLoadedLength==sliderLength){$('.tabbed > ul li:first-child a').click();}}
  1810. $('.swiper-slide').mouseover(function(){if($(this).find('video').length>0&&$(this).find('video').get(0).paused==true&&$animating==false){$(this).find('video').get(0).play();}});$('body').on('click','.mejs-overlay.mejs-overlay-play',function(){$(this).toggleClass('playing');$(this).addClass('mobile-played');$(this).parent().find('.mejs-poster').toggleClass('playing');$(this).parent().find('.mejs-poster').addClass('mobile-played');var $that=$(this);var $that2=$(this).parent().find('.mejs-poster');if($(this).hasClass('playing')&&$(this).hasClass('mobile-played')){setTimeout(function(){$that.addClass('behind-buttons');$that2.addClass('behind-buttons');},200);}else{setTimeout(function(){$that.removeClass('behind-buttons');$that2.removeClass('behind-buttons');},1);}});var autoplay=[];var sliderAutoplayCount=-1;var $sliderHeight=parseInt($(this).find('.swiper-container').attr('data-height'));var portfolioHeaderHeight=($('.project-title.parallax-effect').length>0)?100:0;$('.nectar-slider-wrap').each(function(i){var $autoplayVal=$(this).attr('data-autorotate');var $that=$(this);var $sliderNum=i;if(typeof $autoplayVal!='undefined'&&$autoplayVal.length!='0'&&parseInt($autoplayVal)){nectarSlideRotateInit($that,$autoplayVal,$sliderNum);}});function nectarSlideRotateInit(slider,interval,sliderNum){autoplay[sliderAutoplayCount]=setInterval(function(){nectarSlideRotate(slider,sliderNum);},interval);$('#'+slider.attr('id')).attr('autoplay-id',sliderAutoplayCount);$('#'+slider.attr('id')+' a.slider-prev, #'+slider.attr('id')+' a.slider-next, #'+slider.attr('id')+' .slider-pagination span').click(function(e){if(typeof e.clientY!='undefined'){clearInterval(autoplay[$('#'+slider.attr('id')).attr('autoplay-id')]);}});sliderAutoplayCount++;}
  1811. function nectarSlideRotate(slider,sliderNum){if($nectarSliders[sliderNum].activeIndex+1<$(slider).find('.swiper-wrapper > div.swiper-slide').length){$nectarSliders[sliderNum].swipeNext();}else{$nectarSliders[sliderNum].swipeTo(0,800);}}
  1812. function clearAutoplay(e){var $autoplayVal=$('#'+$(e.container).parent().attr('id')).attr('data-autorotate');if(typeof $autoplayVal!='undefined'&&$autoplayVal.length!='0'&&parseInt($autoplayVal)){clearInterval(autoplay[$('#'+$(e.container).parent().attr('id')).attr('autoplay-id')]);}}
  1813. var animationQueue=null;function sliderArrowCount(e){var $obj=e;$animating=true;var $slideNum=$($obj.container).find('.swiper-wrapper > div').length;$activeIndex=($($obj.container).attr('data-loop')=='true')?$obj.activeIndex:$obj.activeIndex+1;$($obj.container).find('.slider-prev .slide-count .slide-current').html($activeIndex);$($obj.container).find('.slider-next .slide-count .slide-current').html($activeIndex);if($($obj.container).attr('data-loop')=='true'){if($($obj.container).find('.swiper-slide-active').index()+1==1){$($obj.container).find('.slider-next .slide-count .slide-current, .slider-prev .slide-count .slide-current').html($slideNum-2);}
  1814. else if($($obj.container).find('.swiper-slide-active').index()+1==$slideNum){$($obj.container).find('.slider-next .slide-count .slide-current, .slider-prev .slide-count .slide-current').html(1);}}
  1815. if($obj.activeIndex>=10){$($obj.container).find('.slider-next .slide-count .slide-current').addClass('double-digits');}else{$($obj.container).find('.slider-next .slide-count .slide-current').removeClass('double-digits');}
  1816. $($obj.container).find('.swiper-slide:not(".swiper-slide-active")').each(function(){if($(this).find('.video-wrap video').length>0){if($(this).find('.video-wrap video').get(0).currentTime!=0)$(this).find('.video-wrap video').get(0).currentTime=0;}});if($($obj.container).attr('data-loop')=='true'){if($obj.previousIndex==1&&$obj.activeIndex==0||$obj.previousIndex==$slideNum-2&&$obj.activeIndex==$slideNum-1){$('.swiper-slide').addClass('duplicate-transition');}}
  1817. clearTimeout(animationQueue);animationQueue=setTimeout(function(){$animating=false;$('.swiper-slide').removeClass('duplicate-transition');},800)}
  1818. function hideSlider(){if($(window).scrollTop()/($sliderHeight+portfolioHeaderHeight+125)>=1){$('.parallax_slider_outer .nectar-slider-wrap, .project-title.parallax-effect').css('visibility','hidden').hide();$(window).bind('scroll',showSlider);$(window).unbind('scroll',hideSlider);}}
  1819. function showSlider(){if($(window).scrollTop()/($sliderHeight+portfolioHeaderHeight+125)<=1){$('.parallax_slider_outer .nectar-slider-wrap, .project-title.parallax-effect').css('visibility','visible').show();slideContentPos();resizeToCover();$(window).bind('scroll',hideSlider);$(window).unbind('scroll',showSlider);}}
  1820. var $sliderHeight=parseInt($('.parallax_slider_outer.first-section .swiper-container').attr('data-height'));function sliderParallaxInit(){if($('#portfolio-extra').length>0&&$('#full_width_portfolio').length==0){return false;}
  1821. $(window).scroll(function(){if($('#boxed').length==0){if(navigator.userAgent.indexOf('Safari')!=-1&&navigator.userAgent.indexOf('Chrome')==-1){return false;}
  1822. $('.parallax_slider_outer.first-section .nectar-slider-wrap[data-parallax="true"]').stop(true,true).transition({y:$(window).scrollTop()*-.2},0);$('.parallax_slider_outer.first-section .swiper-slide:not(".static") .content, .parallax_slider_outer.first-section .nectar-slider-wrap[data-parallax="true"] .swiper-container .slider-next, .parallax_slider_outer.first-section .nectar-slider-wrap[data-parallax="true"] .swiper-container .slider-prev').stop(true,true).transition({y:$(window).scrollTop()*-.14},0);$('#full_width_portfolio .project-title.parallax-effect').transition({y:$(window).scrollTop()*-.2},0);$('.parallax_slider_outer.first-section .swiper-slide .content, .parallax_slider_outer.first-section .nectar-slider-wrap[data-parallax="true"] .swiper-container .slider-next, .parallax_slider_outer.first-section .nectar-slider-wrap[data-parallax="true"] .swiper-container .slider-prev').css('opacity',1-($(window).scrollTop()/($sliderHeight-120)));}});var portfolioHeaderHeight=($('.project-title.parallax-effect').length>0)?100:0;if($(window).scrollTop()/($sliderHeight+portfolioHeaderHeight+90)>=1){$(window).bind('scroll',hideSlider);}else{$(window).bind('scroll',showSlider);}
  1823. $('.page-header-no-bg, #page-header-wrap, #page-header-bg').remove();var $adminBarHeight=($('#wpadminbar').length>0)?28:0;$('.project-title').addClass('parallax-effect').css({'top':$('#header-space').outerHeight()+$adminBarHeight+'px'});if($('.project-title.parallax-effect').length>0){$('.parallax_slider_outer.first-section .swiper-slide .content, .nectar-slider-wrap.first-section .swiper-slide .content').css('margin-top','0px');$('.swiper-container .slider-prev, .swiper-container .slider-next').css('margin-top','-28px');}
  1824. if($('.demo_store').length>0)$('.project-title.parallax-effect').css('margin-top','-25px');if($('#full_width_portfolio').length>0){$('.parallax_slider_outer.first-section').css('margin-top','93px');}
  1825. $(window).resize(function(){$sliderHeight=parseInt($('.parallax_slider_outer.first-section .swiper-container').attr('data-height'));$('.project-title').css({'top':$('#header-space').outerHeight()+$adminBarHeight+'px'});});}
  1826. if($('.parallax_slider_outer').length>0&&!navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){sliderParallaxInit();}else if($('.parallax_slider_outer').length>0&&navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){$('.project-title').addClass('parallax-effect').css({'top':$('#header-space').outerHeight()+$adminBarHeight+'px'});}
  1827. function niceScrollInit(){$("html").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:15,cursorborder:0,cursorcolor:'#2D3032',cursorborderradius:6,autohidemode:false,horizrailenabled:false});if($('#boxed').length==0){$('body, body #header-outer, body #header-secondary-outer, body #search-outer').css('padding-right','16px');}
  1828. $('html').addClass('no-overflow-y');}
  1829. $('.portfolio-items a.pp:contains(Video), .swiper-container .buttons a.pp').click(function(){$('.swiper-slide').each(function(){if($(this).find('.video-wrap video').length>0){$(this).find('.video-wrap video').get(0).pause();}});});});var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p<o.elements.length;p++)if(f=o.elements[p],h=!1,"getComputedStyle"in window?g=window.getComputedStyle(f):document.documentElement.currentStyle&&(g=f.currentStyle),(f.offsetWidth<=0&&f.offsetHeight<=0||"hidden"===g.visibility)&&(h=!0),"hidden"!==f.type&&!f.disabled&&!h){f.focus();break}}catch(q){}return!1}},I:function(a){return document.getElementById(a)}};var nectarLove={"ajaxurl":"https:\/\/www.napelemek-napkollektorok.hu\/wp-admin\/admin-ajax.php"};jQuery(document).ready(function($){$('body').on('click','.nectar-love',function(){var $loveLink=$(this);var $id=$(this).attr('id');var $that=$(this);if($loveLink.hasClass('loved'))return false;if($(this).hasClass('inactive'))return false;var $dataToPass={action:'nectar-love',loves_id:$id}
  1830. $.post(nectarLove.ajaxurl,$dataToPass,function(data){$loveLink.find('span').html(data);$loveLink.addClass('loved').attr('title','You already love this!');$loveLink.find('span').css({'opacity':1,'width':'auto'});});$(this).addClass('inactive');return false;});});!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);var mappl10n={"bicycling":"Ker\u00e9kp\u00e1rral","bike":"Ker\u00e9kp\u00e1r","dir_not_found":"A kiindul\u00e1si- vagy c\u00e9lc\u00edm nem tal\u00e1lhat\u00f3.","dir_zero_results":"A Google nem tal\u00e1lt \u00fatvonalat a k\u00e9t c\u00edm k\u00f6z\u00f6tt. Vagy nincs ilyen \u00fatvonal, vagy az inform\u00e1ci\u00f3 nem \u00e9rhet\u0151 el.","dir_default":"Ismeretlen hiba, nem jelen\u00edthet\u0151 meg az \u00fatvonal. \u00c1llapot k\u00f3d: ","directions":"\u00datvonaltervez\u00e9s","kml_error":"Nem olvashat\u00f3 be a KML f\u00e1jl","loading":"T\u00f6lt\u00e9s...","no_address":"Nincs egyez\u0151 c\u00edm","no_geolocate":"Nem siker\u00fclt meghat\u00e1rozni a jelenlegi poz\u00edci\u00f3t","traffic":"Forgalom","transit":"Tranzit","zoom":"Nagy\u00edt\u00e1s","options":{"ajaxurl":"https:\/\/www.napelemek-napkollektorok.hu\/wp-admin\/admin-ajax.php","admin":false,"debug":false,"iconsUrl":null,"postid":1264,"siteUrl":"https:\/\/www.napelemek-napkollektorok.hu","standardIconsUrl":null,"country":null,"defaultIcon":null,"directionsServer":"https:\/\/maps.google.com","directionsUnits":"","iconScale":null,"language":null,"poiZoom":15,"styles":[],"tooltips":true}};var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function yt(){var e,h,n;if(!l&&(l=["roadmap","satellite","terrain","hybrid"],mappl10n.styles))for(e in mappl10n.styles)l.push(e);for(o=o?new google.maps.LatLng(t.center.lat,t.center.lng):new google.maps.LatLng(0,0),h={backgroundColor:"transparent",center:o,draggable:ui,keyboardShortcuts:ct,mapTypeControl:li,mapTypeControlOptions:{style:ai,mapTypeIds:l},maxZoom:yi,minZoom:pi,overviewMapControl:wi,overviewMapControlOptions:{opened:bi},panControl:ki,rotateControl:gi,scaleControl:nr,scrollwheel:tr,streetViewControl:ur,tilt:er,zoom:a?a:0,zoomControl:cr,zoomControlOptions:{style:lr}},r=new google.maps.Map(v,h),n=0;n<i.length;n++)i[n].setMap(u);ar();u.setMapTypeId(wt);vr();c=="ib"?(mapp.InfoBox.prototype=new google.maps.OverlayView,f=new mapp.InfoBox):f=new google.maps.InfoWindow;c=="ib"&&(ct=!1);et=new mapp.Geocoder(u,ci,ti);st!="none"&&(s=new mapp.Directions(u,st,et,ii,ri));u.initCenter()}function ar(){var n,t,i;for(n in mappl10n.styles)t=mappl10n.styles[n],i=new google.maps.StyledMapType(t,{name:n}),r.mapTypes.set(n,i),fr==n&&r.setOptions({styles:t})}function vr(){sr&&ot("traffic",mappl10n.traffic,si);dt&&ot("bicycling",mappl10n.bike,ei);hr&&ot("transit",mappl10n.transit,hi)}function ot(n,t,i){var f=e+"_"+n,o=i?"checked='checked'":"",s="<div class='gmnoprint mapp-control'><input type='checkbox' id='"+f+"' "+o+" /> "+t+"<\/div>",u=jQuery(s).get(0);r.controls[google.maps.ControlPosition.TOP_RIGHT].push(u);i&&pt(n);google.maps.event.clearListeners(u,"click");google.maps.event.addDomListener(u,"click",function(){pt(n)})}function pt(n){var i=e+"_"+n,t;switch(n){case"transit":g=g?g:new google.maps.TransitLayer;t=g;break;case"traffic":d=d?d:new google.maps.TrafficLayer;t=d;break;case"bicycling":k=k?k:new google.maps.BicyclingLayer;t=k}t.getMap()?(jQuery("#"+i).prop("checked",!1),t.setMap(null)):(jQuery("#"+i).prop("checked",!0),t.setMap(r))}var o=t.center,w=t.height,h=t.mapid,wt=t.mapTypeId?t.mapTypeId:"roadmap",bt=t.metaKey,e=t.name,kt=t.options,it=t.query,rt=t.title,b=t.width,a=parseInt(t.zoom,10),yr=t.options.adaptive,dt=t.options.bicycling,gt=t.options.bigHeight,ni=t.options.bigWidth,ti=t.options.country,ut=t.options.dataTables,st=t.options.directions,ii=t.options.directionsServer,ri=t.options.directionsUnits,ui=t.options.draggable,fi=t.options.editable,ht=t.options.from,ei=t.options.initialBicycling,oi=t.options.initialOpenDirections,ft=t.options.initialOpenInfo,si=t.options.initialTraffic,hi=t.options.initialTransit,c=t.options.iwType,ct=t.options.keyboardShortcuts,ci=t.options.language,li=t.options.mapTypeControl,ai=parseInt(t.options.mapTypeControlStyle,10),l=t.options.mapTypeIds,vi=t.options.mashupClick,yi=parseInt(t.options.maxZoom),pi=parseInt(t.options.minZoom),wi=t.options.overviewMapControl,bi=t.options.overviewMapControlOpened,ki=t.options.panControl,di=t.options.poiZoom,gi=t.options.rotateControl,nr=t.options.scaleControl,tr=t.options.scrollwheel,ir=t.height,rr=t.width,ur=t.options.streetViewControl,fr=t.options.style,er=parseInt(t.options.tilt),lt=t.options.to,or=t.options.tooltips,sr=t.options.traffic,hr=t.options.transit,cr=t.options.zoomControl,lr=parseInt(t.options.zoomControlStyle,10),u=this,k,d,g,s=null,nt,at,tt,v,y,et=null,r=null,f=null,i=[],vt=!1,p;this.display=function(){if(nt=jQuery("#"+e+"_dialog"),at=jQuery("#"+e+"_directions"),tt=jQuery("#"+e+"_layout"),v=document.getElementById(e),y=jQuery("#"+e+"_poi_list"),!v)return mapp.lib.log("MapPress: Missing map name or container for map: "+e);if(typeof google=="undefined")return mapp.lib.log("MapPress: Google API not loaded");if(mapp.lib.jqVersionCheck("1.7")||mapp.lib.log("jQuery version is too old: "+n.fn.jquery),p=google.maps.Marker.MAX_ZINDEX,at.append(jQuery("#"+e+"_directions_").contents()),y.append(jQuery("#"+e+"_poi_list_").contents()),this.setDataTables(),it){this.ajaxQuery(function(){yt()});return}u.setPois(t.pois,!1);yt()};this.getQuery=function(){return it};this.setQuery=function(n){it=n};this.setDialog=function(n){n=n?n:'<span class="mapp-spinner"><\/span>'+mappl10n.loading;n='<div class="mapp-dialog-inner">'+n+"<\/div>";jQuery(nt).html(n);jQuery(nt).show()};this.hideDialog=function(){jQuery(nt).hide()};this.setPoiList=function(n){typeof n=="string"?y.html(n):y.append(n);this.setDataTables()};this.setDataTables=function(){if(ut&&typeof jQuery.fn.dataTable!="undefined"){var n=ut==!0?{bFilter:!1,bPaginate:!1}:ut;jQuery("table",y).dataTable(n)}};this.getOptions=function(){return kt};this.getResized=function(){return vt};this.show=function(){tt.show();this.display()};this.closeInfoWindow=function(){f.close()};this.openDirections=function(n,t,i){var r,u;typeof n=="object"?(r=n.address?n.address:n.getPosition().toUrlValue(),n.open()):r=n;typeof t=="object"?(u=t.address?t.address:t.getPosition().toUrlValue(),t.open()):u=t;s.open(r,u,i)};this.setMapTypeId=function(n){n=n&&jQuery.inArray(n,l)!=-1?n:l[0];r.setMapTypeId(n)};this.setCenter=function(n,t){r.setCenter(new google.maps.LatLng(n,t))};this.setZoom=function(n){r.setZoom(n)};this.getPoiZoom=function(){return parseInt(di)};this.poiToFront=function(n){p++;n.setZIndex(p)};this.getMap=function(){return r};this.getGeocoder=function(){return et};this.getName=function(){return e};this.setName=function(n){e=n};this.getMapid=function(){return h};this.setMapid=function(n){h=n};this.getTitle=function(){return rt};this.setTitle=function(n){rt=n};this.getWidth=function(){return b};this.setWidth=function(n){b=n};this.getHeight=function(){return w};this.setHeight=function(n){w=n};this.getInfoWindow=function(){return f};this.getEditable=function(){return fi};this.getTooltips=function(){return or};this.getPoi=function(n){return typeof n=="string"&&(n=parseInt(n,10)),i[n]};this.getPoiById=function(n){for(var t=0;t<i.length;t++)if(i[t].postid==n)return i[t];return null};this.getPois=function(){return i};this.insertPoi=function(n){i.unshift(n);n.setMap(this)};this.addPoi=function(n){i.push(n);n.setMap(this)};this.removePoi=function(n){var t=jQuery.inArray(n,i);t!=-1&&(i[t].setMap(null),i.splice(t,1))};this.setPois=function(n,t){for(var u,r=0;r<i.length;r++)i[r].setMap(null);for(i=[],r=0;r<n.length;r++)u=new mapp.Poi,u.fromJSON(n[r]),i.push(u),t&&u.setMap(this),u.setZIndex(p+n.length-1-r);p+=n.length-1};this.showPois=function(){for(var n=0;n<i.length;n++)i[n].setVisible(!0)};this.hidePois=function(){for(var n=0;n<i.length;n++)i[n].setVisible(!1)};this.sortPois=function(n){for(var u,t=Array(),r=0;r<n.length;r++){if(u=parseInt(n[r]),isNaN(u))return!1;t.push(i[u])}return t.length!=i.length?!1:(i=t,!0)};this.openPoi=function(n,t){var r,i;if(c&&c!="none"){if(vi=="post"&&n.postid){window.location.assign(n.url);return}i={html:null};google.maps.event.trigger(u,"poicontent",n,i);r=i.content?i.content:t&&typeof t.featureData!="undefined"?t.featureData.infoWindowHtml:n.html;this.openInfoWindow(n,r,t)}};this.openInfoWindow=function(n,t,i){(s&&s.close(),c&&c!="none")&&(this.poiToFront(n),f.close(),f.setContent(t),google.maps.event.addListenerOnce(f,"domready",function(){google.maps.event.trigger(u,"poidomready",n)}),n.type=="kml"&&i?(f.setOptions({pixelOffset:i.pixelOffset,position:i.latLng}),f.open(r)):n.type?(f.setOptions({position:n.getPosition()}),f.open(r)):f.open(r,n.overlay))};this.closeInfoWindow=function(){f.close()};this.resize=function(n,t){var i=r.getCenter();n&&t&&(jQuery(v).width(n),jQuery(v).height(t),b=n,w=t);google.maps.event.trigger(r,"resize");r.setCenter(i);vt=!0;return};this.initCenter=function(){if(this.closeInfoWindow(),google.maps.event.addListenerOnce(r,"idle",function(){u.initWindows()}),o&&o.lat()&&o.lng())r.setCenter(o),r.setZoom(a);else{var n=a?a:!0;u.autoCenter(n)}};this.initWindows=function(){var i,n,t;s&&oi?(n=jQuery.trim(ht),t=ht==null&&lt==null?"0":jQuery.trim(lt),n=jQuery.isNumeric(n)?this.getPoi(n):n,t=jQuery.isNumeric(t)?this.getPoi(t):t,typeof n=="object"?n.center(!1):typeof t=="object"&&t.center(!1),u.openDirections(n,t,!1)):ft&&(i=jQuery.isNumeric(ft)?u.getPoi(ft):u.getPoi(0),i&&i.open())};this.autoCenter=function(n){var t,u,f;if(i.length==0){this.setCenter(0,0);typeof n=="number"?r.setZoom(n):r.setZoom(1);return}if(i.length==1){i[0].center(n);return}for(t=new google.maps.LatLngBounds,u=0;u<i.length;u++)f=i[u].getBounds(),t=f?t.union(f):t.extend(i[u].getPosition());if(n===!1){r.setCenter(t.getCenter());return}if(typeof n=="number"){r.setCenter(t.getCenter());r.setZoom(n);return}r.fitBounds(t)};this.reset=function(){this.initCenter()};this.bigger=function(n,t,i){s&&s.close();this.closeInfoWindow();jQuery(n).text()==t?(jQuery(n).text(i),jQuery(tt).width(ni),this.resize("100%",gt)):(jQuery(n).text(t),jQuery(tt).width(rr),this.resize("100%",ir))};this.toJSON=function(){return{center:{lat:r.getCenter().lat(),lng:r.getCenter().lng()},height:w,mapid:h,mapTypeId:r.getMapTypeId(),metaKey:bt,pois:i,title:rt,width:b,zoom:r.getZoom()}};this.ajaxSave=function(n){var t,i;t=typeof Prototype!="undefined"&&typeof Object.toJSON!="undefined"?Object.toJSON(u):t=JSON.stringify(u);i={action:"mapp_save",map:t,postid:mappl10n.options.postid};mapp.Ajax("POST",i,function(t){t.status=="OK"&&(h=t.data.mapid,n(t.data))})};this.ajaxDelete=function(n){h||n();var t={action:"mapp_delete",mapid:h};mapp.Ajax("POST",t,function(t){t.status=="OK"&&n()})}};mapp.Map.ajaxCreate=function(n,t,i){mapp.Ajax("GET",{action:"mapp_create"},function(r){if(r.status=="OK"){jQuery.extend(r.data.map.options,t);r.data.map.name=n;var u=new mapp.Map(r.data.map);i(u)}})};mapp.Map.ajaxGet=function(n,t,i,r){var u={action:"mapp_get",mapid:n};mapp.Ajax("GET",u,function(n){if(n.status=="OK"){jQuery.extend(n.data.map.options,i);n.data.map.name=t;var u=new mapp.Map(n.data.map);r(u)}})};mapp.Map.ajaxDelete=function(n,t){var i={action:"mapp_delete",mapid:n};mapp.Ajax("POST",i,function(n){n.status=="OK"&&t&&t()})};mapp.Ajax=function(n,t,i){jQuery.ajax({type:n,cache:!1,url:mappl10n.options.ajaxurl,data:t,success:function(n){if(n.output&&(mappl10n.options.admin||mappl10n.options.debug)&&alert("AJAX Error\r\n"+n.output),n.status=="OK"){i(n);return}(mappl10n.options.admin||mappl10n.options.debug)&&(typeof n=="object"?alert("AJAX Error\r\n"+n.status):alert("AJAX Error\r\n"+n))},error:function(n,t,i){typeof i!="undefined"&&i!=""&&mappl10n.ajaxErrors&&alert("AJAX ERROR\r\nStatus="+t+"\r\nError="+i+"\r\nResponseText="+n.responseText)}})}}(jQuery);mapp=window.mapp||{};mapp.Directions=function(n,t,i,r,u){function p(){jQuery(".mapp-dir-swap",f).click(function(){var n=jQuery(".mapp-dir-daddr",f).val(),t=jQuery(".mapp-dir-saddr",f).val();return jQuery(".mapp-dir-saddr",f).val(n),jQuery(".mapp-dir-daddr",f).val(t),jQuery(".mapp-dir-get",f).click(),!1});jQuery(".mapp-dir-get",f).click(function(){return s.getDirections(),!1});jQuery(".mapp-dir-print",f).click(function(){s.printDirections()});jQuery(".mapp-dir-close",f).click(function(){return s.close(),!1});jQuery(".mapp-travelmode",f).click(function(){return jQuery(".mapp-travelmode",f).removeClass("mapp-travelmode-on"),jQuery(this).addClass("mapp-travelmode-on"),s.getDirections(),!1});jQuery(".mapp-myloc",f).click(function(){return c.geolocate(function(n){n?(jQuery(".mapp-dir-saddr",f).val("("+n.coords.latitude+", "+n.coords.longitude+")"),jQuery(".mapp-dir-get",f).click()):alert(mappl10n.no_geolocate)}),!1})}function w(n,t,i){var u=jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var o={travelMode:u,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:n,destination:t,unitSystem:y},r=jQuery(".mapp-dir-renderer",f).get(0);jQuery(".mapp-dir-renderer",f).empty();l||(l=new google.maps.DirectionsService);l.route(o,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:h.hidePois();e?(e.setDirections(n),e.setMap(a),e.setPanel(r)):e=new google.maps.DirectionsRenderer({map:a,panel:r,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_not_found);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_zero_results);break;default:alert(mappl10n.dir_default+t)}i()})}var h=n,v=t,c=i,o=r,y=u,f=jQuery("#"+n.getName()+"_directions"),e,l,a=n.getMap(),s=this;o.toLowerCase().indexOf("http")==-1&&(o="https://"+o);p();this.open=function(n,t,i){if(v=="google"){this.openGoogle(n,t);return}jQuery(f).show();jQuery(".mapp-dir-saddr",f).val(n);jQuery(".mapp-dir-daddr",f).val(t);(i||typeof i=="undefined")&&(jQuery(".mapp-dir-get",f).focus(),jQuery(".mapp-dir-saddr",f).focus())};this.close=function(){jQuery(f).hide();e&&(e.setPanel(null),e.getMap()&&(e.setMap(null),h.showPois()))};this.getDirections=function(){h.closeInfoWindow();jQuery(".mapp-spinner",f).show();var n=jQuery(".mapp-dir-saddr",f),t=jQuery(".mapp-dir-daddr",f),i=jQuery(".mapp-dir-saddr-err",f),r=jQuery(".mapp-dir-daddr-err",f);c.geocodeField(n,i,function(n){c.geocodeField(t,r,function(t){n&&t?w(n,t,function(){jQuery(".mapp-spinner",f).hide();return}):jQuery(".mapp-spinner",f).hide()})})};this.printDirections=function(){var t,n=jQuery(".mapp-travelmode-on > span",f);t=n.hasClass("mapp-dir-walk")?"w":n.hasClass("mapp-dir-bike")?"b":n.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(jQuery(".mapp-dir-saddr",f).val(),jQuery(".mapp-dir-daddr",f).val(),t)};this.openGoogle=function(n,t,i){var r=o;r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}};mapp=window.mapp||{};mapp.Geocoder=function(n,t,i){function f(n,t){jQuery(n).removeClass("mapp-error");jQuery(t).hide()}function e(n,t,i){jQuery(n).addClass("mapp-error");jQuery(t).html(i);jQuery(t).show()}var o,u,s,h,c,r;o=i;h=t;c=n;s=c.getMap();r=this;this.geocode=function(n,t){var i=n instanceof google.maps.LatLng?{latLng:n}:{address:n,region:o,language:h};i.bounds=s.getBounds();u||(u=new google.maps.Geocoder);u.geocode(i,function(n,i){if(n){for(var r=0;r<n.length;r++)n[r].formatted_address==""&&n.splice(r,1);t(n[0],i)}else t(null,i)})};this.geolocate=function(n){if(!navigator||!navigator.geolocation)return null;navigator.geolocation.getCurrentPosition(function(t){n(t)},function(){n(null)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};this.stringToLatLng=function(n){var t=n.split(",",2),i=Number(t[0]),r=Number(t[1]);return isNaN(i)||isNaN(r)?!1:new google.maps.LatLng(i,r)};this.geocodeField=function(n,t,i){f(n,t);checkAddress(n,t,jQuery(n).val(),function(r){if(!r){e(n,t,mappl10n.no_address);i(null);return}if(r&&r.formatted_address){jQuery(n).val(r.formatted_address);i(r.formatted_address);return}i(r);return})};this.autocompleteField=function(n,t,i,u,o){jQuery(n).keypress(function(i){i.which==13&&(checkAddress(n,t,jQuery(n).val(),o),i.preventDefault())});jQuery(i).click(function(){return checkAddress(n,t,jQuery(n).val(),o),!1});jQuery(u).click(function(){return f(n,t),r.geolocate(function(i){if(i){var r="("+i.coords.latitude+", "+i.coords.longitude+")";jQuery(n).val("");checkAddress(n,t,r,o)}else e(n,t,mappl10n.no_geolocate);return}),!1})};checkAddress=function(n,t,i,u){if(f(n,t),i=jQuery.trim(i),i==""){u(null);return}var o=r.stringToLatLng(i);if(o){u(o);return}if(i.substring(0,4)=="http"){u(i);return}r.geocode(i,function(i,r){if(!i||r!=google.maps.GeocoderStatus.OK){e(n,t,mappl10n.no_address);u(null);return}u(i);return})}};mapp.Geocoder.parseAddress=function(n){return!n||n==""?{firstLine:"",secondLine:""}:(n.lastIndexOf(", USA")>0||n.lastIndexOf(", United States")>0)&&(n.lastIndexOf(", USA")>0&&(n=n.slice(0,n.lastIndexOf(", USA"))),n.lastIndexOf(", United States")>0&&(n=n.slice(0,n.lastIndexOf(", United States"))),n.indexOf(",")==n.lastIndexOf(","))?{firstLine:n,secondLine:""}:n.indexOf(",")==-1?{firstLine:n,secondLine:""}:{firstLine:n.slice(0,n.indexOf(",")),secondLine:n.slice(n.indexOf(", ")+2)}};mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};mapp.InfoBox=function(){var u,f,n,i,t,r=this;this.setContent=function(n){u=n};this.onAdd=function(){n=jQuery("<div class='mapp-ib'><div class='mapp-ib-close'>X<\/div><\/div>");t=jQuery("<div class='mapp-ib-tip'><\/div>");typeof u=="string"?jQuery(n).append(u):jQuery(n).append(jQuery(u));jQuery("body").append(n);jQuery("body").append(t);jQuery(".mapp-ib-close",n).click(function(){r.close()});jQuery(window).resize(function(){r.close()})};this.draw=function(){var c=jQuery(n).is(":visible"),u=r.getProjection().fromLatLngToContainerPixel(i),f,o,s;if(u.x=parseInt(u.x),u.y=parseInt(u.y),f=jQuery(this.getMap().getDiv()),u.x>f.width()||u.x<0||u.y>f.height()||u.y<0){jQuery(n).hide();jQuery(t).hide();return}jQuery(n).show();jQuery(t).show();o=f.offset().left+u.x;s=f.offset().top+u.y-32;jQuery(t).offset({top:s-t.outerHeight()-2,left:o-parseInt(t.outerWidth()/2)});var e=o-parseInt(n.outerWidth()/2),l=s-n.outerHeight()-t.outerHeight(),h=jQuery(document).width();e+n.outerWidth()>h&&(e=Math.max(h-n.outerWidth(),o-n.outerWidth()+parseInt(t.outerWidth()/2)));e<0&&(e=0);jQuery(n).offset({top:l,left:e});c||google.maps.event.trigger(this,"domready")};this.onRemove=function(){jQuery(n).remove();jQuery(t).remove()};this.setPosition=function(n){i=n};this.open=function(n,t){f=n;t&&(i=typeof t.getPosition=="function"?t.getPosition():t.getBounds().getCenter());this.setMap(f);this.disableAutoPan&&n.getBounds().contains(i)||f.panTo(i);google.maps.event.addListenerOnce(n,"drag",function(){r.close()});google.maps.event.addListenerOnce(n,"click",function(){r.close()})};this.close=function(){google.maps.event.trigger(this,"closeclick");this.setMap(null)}};mapp=window.mapp||{};this.JSON||(this.JSON={}),function(){function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var h,c,l,a,v=n,s,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,s=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,h=0;h<a;h+=1)s[h]=r(h,o)||"null";return l=s.length===0?"[]":n?"[\n"+n+s.join(",\n"+n)+"\n"+v+"]":"["+s.join(",")+"]",n=v,l}if(t&&typeof t=="object")for(a=t.length,h=0;h<a;h+=1)c=t[h],typeof c=="string"&&(l=r(c,o))&&s.push(f(c)+(n?": ":":")+l);else for(c in o)Object.hasOwnProperty.call(o,c)&&(l=r(c,o))&&s.push(f(c)+(n?": ":":")+l);return l=s.length===0?"{}":n?"{\n"+n+s.join(",\n"+n)+"\n"+v+"}":"{"+s.join(",")+"}",n=v,l}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(u=n="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if((t=f)&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw Error("JSON.stringify");return r("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;if(n=String(n),e.lastIndex=0,e.test(n)&&(n=n.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}();mapp.lib={ajax:function(n){var i,t;if(jQuery.extend({type:"GET",cache:!1,data:null,spinner:null,callback:jQuery.noop},n),n.cache)for(typeof mapp.lib.ajax.cache=="undefined"&&(mapp.lib.ajax.cache=[]),i=JSON.stringify(n.data),t=0;t<mapp.lib.ajax.cache.length;t++)if(mapp.lib.ajax.cache[t].data==i){n.callback(mapp.lib.ajax.cache[t].response);return}n.spinner&&mapp.lib.spinner(n.spinner,!0);jQuery.ajax({type:n.type,cache:!1,url:mappl10n.options.ajaxurl,data:n.data,success:function(t,i,r){if(mapp.lib.spinner(n.spinner,!1),t.output&&(mappl10n.options.admin||mappl10n.options.debug)){alert("AJAX Error\r\n"+t.output);return}if(t.status=="OK"){n.cache&&mapp.lib.ajax.cache.push({data:JSON.stringify(n.data),response:t});n.callback&&n.callback(t,i,r);return}if(mappl10n.options.admin||mappl10n.options.debug){var u=typeof t=="object"?t.status:t;alert("AJAX ERROR\r\nResponse="+u+" TextStatus="+i+"\r\nResponseText="+r.responseText);return}},error:function(t,i,r){if((n.spinner&&mapp.lib.spinner(n.spinner,!1),typeof r!="undefined"&&r!="")&&(mappl10n.options.admin||mappl10n.options.debug)){alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+r+"\r\nResponseText="+t.responseText);return}}})},jqVersionCheck:function(n){if(typeof jQuery=="undefined"||typeof n=="undefined")return!1;for(n=n.split("."),v=jQuery.fn.jquery.split("."),i=0;i<n.length;i++){var t=parseInt(n[i]),r=typeof v[i]!="undefined"?parseInt(v[i]):0;if(r!=t)return r>t}return!0},log:function(n,t){mappl10n.options.debug&&window.console&&console.log(n+" : "+t)},spinner:function(n,t){return t?(jQuery(n).addClass("mapp-spinner"),jQuery(n).prepend('<div class="mapp-spinner-overlay"><\/div><div class="mapp-spinner-icon"><\/div>')):(jQuery(n).removeClass("mapp-spinner"),jQuery(".mapp-spinner-overlay, .mapp-spinner-icon",n).remove()),n},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var r=jQuery(n).scrollTop(),u=jQuery(n).height(),i=jQuery(t).position().top,f=i+jQuery(t).height();(i<0||f>u)&&jQuery(n).scrollTop(r+i)}},stringToInt:function(n){for(arg in n){var t=n[arg];typeof t=="object"?mapp.lib.stringToInt(t):n[arg]=jQuery.isNumeric(t)?parseInt(t):t}return n}};jQuery("body").on("tabsactivate tabsshow",function(n,t){var i=t.newPanel?t.newPanel:t.panel;i&&jQuery(".mapp-canvas",i).each(function(){var t=jQuery(this).attr("id"),n=window[t];n.getResized()||(n.resize(),n.initCenter())})});mapp=window.mapp||{};+function(n){mapp.Places=function(t,i){function l(){i=n.extend({callback:n.noop,gmap:null,kml:!1,parse:!0,types:["geocode"]},i);h=n(t);o=i.gmap;r=n("input",t);f=new google.maps.places.Autocomplete(r.get(0),{types:i.types});f.bindTo("bounds",o);s=new google.maps.places.AutocompleteService;_placesService=new google.maps.places.PlacesService(o);google.maps.event.addListener(f,"place_changed",function(){var n=f.getPlace();i.parse?n&&n.geometry&&n.geometry.viewport?(e.set(c(n.formatted_address,"text")),i.callback(n)):e.parse(i.callback):i.callback});n("[data-mapp-geolocate]",h).click(function(){return e.geolocate(),!1})}function c(n,t){var i;return(n=jQuery.trim(n),n=n.replace(", United States of America","").replace(", USA","").replace(", United States",""),t=="text")?n:(i=n.indexOf(","),i==-1?[n]:[n.substring(0,i),jQuery.trim(n.substring(i+1))])}function u(n){r.toggleClass("mapp-error",!!n)}var f,s,o,r,h,e=this;this.set=function(n){r.blur();r.val(n)};this.get=function(){return n.trim(r.val())};this.focus=function(){r.focus()};this.parse=function(n){if(u(!1),value=this.get(),!value)return this.focus(),u(!0);if(i.kml){if(input=="kml")return n("http://kml-samples.googlecode.com/svn/trunk/kml/Placemark/placemark.kml");if(input.substring(0,4)=="http")return n(input)}var t=value.split(",");if(t.length==2&&!isNaN(t[0])&&!isNaN(t[1]))return n({geometry:{location:new google.maps.LatLng(t[0],t[1])}});s.getPlacePredictions({input:value,types:i.types},function(t,i){if(i!="OK"||t==null||t.length==0)return u(!0);_placesService.getDetails({placeId:t[0].place_id},function(t,i){return i!="OK"||!t||!t.geometry?u(!0):(e.set(c(t.formatted_address,"text")),n(t))})})};this.geolocate=function(){if(u(!1),!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(n){i.callback(new google.maps.LatLng(n.coords.latitude,n.coords.longitude))},function(){return u(!0)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};l.apply(this)}}(jQuery);mapp=window.mapp||{};mapp.Poi=function(){this.address=null;this.body=null;this.html=null;this.iconid=null;this.map=null;this.overlay=null;this.postid=null;this.title="";this.url=null;this.type=null;this.viewport=null;for(var n in arguments[0])typeof arguments[0][n]!="undefined"&&(this[n]=arguments[0][n])};mapp.Poi.prototype={fromJSON:function(n){var u,f,i,o,t,r,s,e;this.address=n.correctedAddress;this.body=n.body;this.correctedAddress=n.correctedAddress;this.html=n.html;this.iconid=n.iconid;this.postid=n.postid;this.title=n.title;this.type=n.type;this.url=n.url;n.viewport&&n.viewport.sw&&n.viewport.ne&&(u=new google.maps.LatLng(n.viewport.sw.lat,n.viewport.sw.lng),f=new google.maps.LatLng(n.viewport.ne.lat,n.viewport.ne.lng),this.viewport=u.lat()==0&&u.lng()==0&&f.lat()==0&&f.lng()==0?null:new google.maps.LatLngBounds(u,f));i=[];o=[];switch(this.type){case"polygon":if(n.poly&&n.poly.paths)for(t=0;t<n.poly.paths.length;t++){for(i=[],r=0;r<n.poly.paths[t].length;r++)i.push(new google.maps.LatLng(n.poly.paths[t][r].lat,n.poly.paths[t][r].lng));o.push(new google.maps.MVCArray(i))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(n.poly);break;case"polyline":if(n.poly&&n.poly.path)for(t=0;t<n.poly.path.length;t++)i.push(new google.maps.LatLng(n.poly.path[t].lat,n.poly.path[t].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(i)});this.setColors(n.poly);break;case"circle":e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Circle({center:e,radius:parseFloat(n.poly.radius)});this.setColors(n.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(n.poly);break;case"kml":s=n.kml&&n.kml.url?n.kml.url:"";this.overlay=new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Marker({position:e})}},toJSON:function(){var n={address:this.address,body:this.body,correctedAddress:this.address,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},r=this.getPosition(),i,t;if(n.point={lat:r.lat(),lng:r.lng()},i=this.viewport?this.viewport:this.getBounds(),i&&(n.viewport={sw:{lat:i.getSouthWest().lat(),lng:i.getSouthWest().lng()},ne:{lat:i.getNorthEast().lat(),lng:i.getNorthEast().lng()}}),this.type=="kml"&&(n.kml={url:this.overlay.getUrl()},t=this.overlay.getDefaultViewport(),n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push({lat:t.lat(),lng:t.lng()})});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push({lat:n.lat(),lng:n.lng()})});n.poly.paths.push(i)});break;case"rectangle":t=this.overlay.getBounds();n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}}}return n},setTooltip:function(n){this.map.getTooltips()&&(this.type||(n?this.overlay.setTitle(n):this.overlay.setTitle(jQuery("<div>").html(this.title).text())))},setMap:function(n){var t=this;if(google.maps.event.clearInstanceListeners(this.overlay),n==null){this.overlay.setMap(null);return}this.type=="kml"&&(google.maps.event.addListener(this.overlay,"defaultviewport_changed",function(){t.viewport=t.overlay.getDefaultViewport()}),google.maps.event.addListener(this.overlay,"status_changed",function(){var n=t.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)}));this.map=n;this.overlay.setMap(n.getMap());this.setEditable(this.map.getEditable());this.setIcon(this.iconid);this.setTooltip();google.maps.event.addListener(this.overlay,"click",function(n){t.open(n)})},setEditable:function(n){var t=this;this.type!="kml"&&(this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),google.maps.event.clearListeners(this.overlay,"rightclick"),google.maps.event.clearListeners(this.overlay,"dragstart"),n&&(google.maps.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.closeInfoWindow()}),(this.type=="polygon"||this.type=="polyline")&&google.maps.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},getZIndex:function(){return this.type?this.overlay.zIndex:this.overlay.getZIndex()},setZIndex:function(n){this.type?this.overlay.zIndex=n:this.overlay.setZIndex(n)},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n)),this.iconid=n)},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},center:function(n){var t=this.map.getMap(),i;if(!n){t.setCenter(this.getPosition());return}if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i=this.getBounds();i?(t.fitBounds(i),t.setCenter(this.getPosition())):(t.setCenter(this.getPosition()),t.setZoom(this.map.getPoiZoom()))},open:function(n){this.map.openPoi(this,n)},zoomIn:function(){var n=this.map.getMap(),r=n.getZoom(),t=this.getBounds(),i=Math.min(r+2,21);t&&n.fitBounds(t);i>n.getZoom()&&n.setZoom(i);n.setCenter(this.getPosition())},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;if(!this.map.getEditable()&&this.viewport)return this.viewport;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=this.overlay.getDefaultViewport();break;default:return this.viewport?this.viewport:null}return n},getPosition:function(){if(this.type){var n=this.getBounds();return n?n.getCenter():new google.maps.LatLng(0,0)}return this.overlay.getPosition()},click:function(){google.maps.event.trigger(this.overlay,"click")}};jQuery(document).ready(function(){var mapdata={"mapid":"1","width":"100%","height":"385px","zoom":15,"center":{"lat":47.4843777,"lng":19.0482624},"mapTypeId":"roadmap","title":"Napelem-napkollektor-iroda","metaKey":null,"query":null,"queryResult":null,"pois":[{"address":"Budapest, Minerva u. 3, 1118 Magyarorsz\u00e1g","body":"Minerva u. 3, 1118 Magyarorsz\u00e1g","correctedAddress":"Budapest, Minerva u. 3, 1118 Magyarorsz\u00e1g","iconid":null,"point":{"lat":47.4843777,"lng":19.0482624},"poly":null,"kml":null,"title":"Budapest","type":null,"viewport":{"sw":{"lat":47.4830289197,"lng":19.0469228197},"ne":{"lat":47.4857268803,"lng":19.0496207803}},"postid":null,"url":null,"html":"<div class='mapp-iw'><div class='mapp-title'>Budapest<\/div><div class='mapp-body'>Minerva u. 3, 1118 Magyarorsz\u00e1g<\/div><div class='mapp-links'><a href='#' onclick = 'mapp0.openDirections(\"\", mapp0.getPoi(0), 1); return false;'>\u00datvonaltervez\u00e9s<\/a>&nbsp;&nbsp;<a href='#' onclick='mapp0.getPoi(0).zoomIn(); return false;'>Nagy\u00edt\u00e1s<\/a><\/div><\/div>"}],"options":{"adaptive":null,"alignment":null,"autoicons":null,"apiKey":null,"autodisplay":"top","bicycling":false,"bigWidth":"100%","bigHeight":"400px","connect":null,"country":null,"css":true,"dataTables":false,"defaultIcon":null,"directions":"google","directionsServer":"https:\/\/maps.google.com","directionsUnits":"","draggable":true,"editable":false,"footer":true,"from":null,"geocoders":["google"],"hidden":false,"hideEmpty":false,"iconScale":null,"initialBicycling":false,"initialOpenDirections":false,"initialOpenInfo":false,"initialTraffic":false,"initialTransit":false,"iwType":"iw","keyboardShortcuts":true,"language":null,"mapLinks":[],"mapTypeControl":true,"mapTypeControlStyle":0,"mapTypeId":"roadmap","mapTypeIds":["roadmap","satellite","terrain","hybrid"],"mashupTitle":false,"mashupBody":"poi","mashupClick":"poi","mashupLink":true,"maxZoom":null,"minZoom":null,"metaKey":null,"metaKeyAddress":[],"metaKeyLat":null,"metaKeyLng":null,"metaKeyIconid":null,"metaKeyTitle":null,"metaKeyBody":null,"metaKeyZoom":null,"metaErrors":true,"metaSyncSave":true,"metaSyncUpdate":false,"name":null,"overviewMapControl":true,"overviewMapControlOpened":false,"panControl":false,"poiLinks":["directions_to","zoom"],"poiList":false,"poiZoom":15,"postTypes":["post","page"],"rotateControl":true,"scaleControl":false,"scrollwheel":false,"size":1,"sizes":[{"width":300,"height":300},{"width":425,"height":350},{"width":640,"height":480}],"sort":true,"streetViewControl":true,"style":null,"styles":[],"template":"map_layout","templateDirections":"map_directions","templatePoi":"map_poi","templatePoiList":"map_poi_list","thumbs":true,"thumbSize":null,"thumbWidth":64,"thumbHeight":64,"tilt":0,"to":null,"tooltips":true,"transit":false,"traffic":false,"zoomControl":true,"zoomControlStyle":0},"name":"mapp0"};window.mapp0=new mapp.Map(mapdata);mapp0.display();});
Add Comment
Please, Sign In to add comment