text: /* PrettyPhoto */  
  /* ------------------------------------------------------------------------
  	Class: prettyPhoto
  	Use: Lightbox clone for jQuery
  	Version: 3.1.5
  ------------------------------------------------------------------------- */
  (function(e){function t(){var e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return hashtag}function n(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)";var r=new RegExp(n);var i=r.exec(t);return i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function y(t){$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(){e(".pp_loaderIcon").show();t()})}function b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function E(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else if(e.match(/vimeo\.com/i)){return"vimeo"}else if(e.match(/\b.mov\b/i)){return"quicktime"}else if(e.match(/\b.swf\b/i)){return"flash"}else if(e.match(/\biframe=true\b/i)){return"iframe"}else if(e.match(/\bajax=true\b/i)){return"ajax"}else if(e.match(/\bcustom=true\b/i)){return"custom"}else if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function x(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function T(){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 N(){d=e(window).height(),v=e(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["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;e.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}}function k(t){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var n=0;n<pp_images.length;n++){if(!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[n]}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=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.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(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return false})}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:false,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> 						<div class="ppt"> </div> 						<div class="pp_top"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 						<div class="pp_content_container"> 							<div class="pp_left"> 							<div class="pp_right"> 								<div class="pp_content"> 									<div class="pp_loaderIcon"></div> 									<div class="pp_fade"> 										<a href="#" class="pp_expand" title="Expand the image">Expand</a> 										<div class="pp_hoverContainer"> 											<a class="pp_next" href="#">next</a> 											<a class="pp_previous" href="#">previous</a> 										</div> 										<div id="pp_full_res"></div> 										<div class="pp_details"> 											<div class="pp_nav"> 												<a href="#" class="pp_arrow_previous">Previous</a> 												<p class="currentTextHolder">0/0</p> 												<a href="#" class="pp_arrow_next">Next</a> 											</div> 											<p class="pp_description"></p> 											<div class="pp_social">{pp_social}</div> 											<a class="pp_close" href="#">Close</a> 										</div> 									</div> 								</div> 							</div> 							</div> 						</div> 						<div class="pp_bottom"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 					</div> 					<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> 								<a href="#" class="pp_arrow_previous">Previous</a> 								<div> 									<ul> 										{gallery} 									</ul> 								</div> 								<a href="#" class="pp_arrow_next">Next</a> 							</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}" 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}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},s);var o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:e.prettyPhoto.changePage("next");t.preventDefault();break;case 27:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return false};e.prettyPhoto.open=function(t){if(typeof settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).size());e(".pp_loaderIcon").show();if(settings.deeplinking)n();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)}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+e(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()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$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(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<e(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(){a=w(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");e.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":a=w(movie_width,movie_height);movie_id=i("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)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="http://www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var n=movie_id.match(t);movie="http://player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(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,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(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,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()});break;case"custom":a=w(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=e(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(e("body")).show();doresize=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).size()-1}else if(t=="next"){set_position++;if(set_position>e(pp_images).size()-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;e.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var pp_alreadyInitialized=false; 
  
   
   
  /*
   * jQuery FlexSlider v2.1
   * http://www.woothemes.com/flexslider/
   *
   * Copyright 2012 WooThemes
   * Free to use under the GPLv2 license.
   * http://www.gnu.org/licenses/gpl-2.0.html
   *
   * Contributing author: Tyler Smith (@mbmufffin)
   */
  
  ;(function ($) {
  
    //FlexSlider: Object Instance
    $.flexslider = function(el, options) {
      var slider = $(el),
          vars = $.extend({}, $.flexslider.defaults, options),
          namespace = vars.namespace,
          touch = ("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch,
          eventType = (touch) ? "touchend" : "click",
          vertical = vars.direction === "vertical",
          reverse = vars.reverse,
          carousel = (vars.itemWidth > 0),
          fade = vars.animation === "fade",
          asNav = vars.asNavFor !== "",
          methods = {};
  
      // Store a reference to the slider object
      $.data(el, "flexslider", slider);
  
      // Privat slider methods
      methods = {
        init: function() {
          slider.animating = false;
          slider.currentSlide = vars.startAt;
          slider.animatingTo = slider.currentSlide;
          slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
          slider.containerSelector = vars.selector.substr(0,vars.selector.search(' '));
          slider.slides = $(vars.selector, slider);
          slider.container = $(slider.containerSelector, slider);
          slider.count = slider.slides.length;
          // SYNC:
          slider.syncExists = $(vars.sync).length > 0;
          // SLIDE:
          if (vars.animation === "slide") vars.animation = "swing";
          slider.prop = (vertical) ? "top" : "marginLeft";
          slider.args = {};
          // SLIDESHOW:
          slider.manualPause = false;
          // TOUCH/USECSS:
          slider.transitions = !vars.video && !fade && vars.useCSS && (function() {
            var obj = document.createElement('div'),
                props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
            for (var i in props) {
              if ( obj.style[ props[i] ] !== undefined ) {
                slider.pfx = props[i].replace('Perspective','').toLowerCase();
                slider.prop = "-" + slider.pfx + "-transform";
                return true;
              }
            }
            return false;
          }());
          // CONTROLSCONTAINER:
          if (vars.controlsContainer !== "") slider.controlsContainer = $(vars.controlsContainer).length > 0 && $(vars.controlsContainer);
          // MANUAL:
          if (vars.manualControls !== "") slider.manualControls = $(vars.manualControls).length > 0 && $(vars.manualControls);
  
          // RANDOMIZE:
          if (vars.randomize) {
            slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
            slider.container.empty().append(slider.slides);
          }
  
          slider.doMath();
  
          // ASNAV:
          if (asNav) methods.asNav.setup();
  
          // INIT
          slider.setup("init");
  
          // CONTROLNAV:
          if (vars.controlNav) methods.controlNav.setup();
  
          // DIRECTIONNAV:
          if (vars.directionNav) methods.directionNav.setup();
  
          // KEYBOARD:
          if (vars.keyboard && ($(slider.containerSelector).length === 1 || vars.multipleKeyboard)) {
            $(document).bind('keyup', function(event) {
              var keycode = event.keyCode;
              if (!slider.animating && (keycode === 39 || keycode === 37)) {
                var target = (keycode === 39) ? slider.getTarget('next') :
                             (keycode === 37) ? slider.getTarget('prev') : false;
                slider.flexAnimate(target, vars.pauseOnAction);
              }
            });
          }
          // MOUSEWHEEL:
          if (vars.mousewheel) {
            slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
              event.preventDefault();
              var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
              slider.flexAnimate(target, vars.pauseOnAction);
            });
          }
  
          // PAUSEPLAY
          if (vars.pausePlay) methods.pausePlay.setup();
  
          // SLIDSESHOW
          if (vars.slideshow) {
            if (vars.pauseOnHover) {
              slider.hover(function() {
                if (!slider.manualPlay && !slider.manualPause) slider.pause();
              }, function() {
                if (!slider.manualPause && !slider.manualPlay) slider.play();
              });
            }
            // initialize animation
            (vars.initDelay > 0) ? setTimeout(slider.play, vars.initDelay) : slider.play();
          }
  
          // TOUCH
          if (touch && vars.touch) methods.touch();
  
          // FADE&&SMOOTHHEIGHT || SLIDE:
          if (!fade || (fade && vars.smoothHeight)) $(window).bind("resize focus", methods.resize);
  
  
          // API: start() Callback
          setTimeout(function(){
            vars.start(slider);
          }, 200);
        },
        asNav: {
          setup: function() {
            slider.asNav = true;
            slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
            slider.currentItem = slider.currentSlide;
            slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
            slider.slides.click(function(e){
              e.preventDefault();
              var $slide = $(this),
                  target = $slide.index();
              if (!$(vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
                slider.direction = (slider.currentItem < target) ? "next" : "prev";
                slider.flexAnimate(target, vars.pauseOnAction, false, true, true);
              }
            });
          }
        },
        controlNav: {
          setup: function() {
            if (!slider.manualControls) {
              methods.controlNav.setupPaging();
            } else { // MANUALCONTROLS:
              methods.controlNav.setupManual();
            }
          },
          setupPaging: function() {
            var type = (vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
                j = 1,
                item;
  
            slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
  
            if (slider.pagingCount > 1) {
              for (var i = 0; i < slider.pagingCount; i++) {
                item = (vars.controlNav === "thumbnails") ? '<img src="' + slider.slides.eq(i).attr("data-thumb") + '"/>' : '<a>' + j + '</a>';
                slider.controlNavScaffold.append('<li>' + item + '</li>');
                j++;
              }
            }
  
            // CONTROLSCONTAINER:
            (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
            methods.controlNav.set();
  
            methods.controlNav.active();
  
            slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
              event.preventDefault();
              var $this = $(this),
                  target = slider.controlNav.index($this);
  
              if (!$this.hasClass(namespace + 'active')) {
                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
                slider.flexAnimate(target, vars.pauseOnAction);
              }
            });
            // Prevent iOS click event bug
            if (touch) {
              slider.controlNavScaffold.delegate('a', "click touchstart", function(event) {
                event.preventDefault();
              });
            }
          },
          setupManual: function() {
            slider.controlNav = slider.manualControls;
            methods.controlNav.active();
  
            slider.controlNav.live(eventType, function(event) {
              event.preventDefault();
              var $this = $(this),
                  target = slider.controlNav.index($this);
  
              if (!$this.hasClass(namespace + 'active')) {
                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
                slider.flexAnimate(target, vars.pauseOnAction);
              }
            });
            // Prevent iOS click event bug
            if (touch) {
              slider.controlNav.live("click touchstart", function(event) {
                event.preventDefault();
              });
            }
          },
          set: function() {
            var selector = (vars.controlNav === "thumbnails") ? 'img' : 'a';
            slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
          },
          active: function() {
            slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
          },
          update: function(action, pos) {
            if (slider.pagingCount > 1 && action === "add") {
              slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
            } else if (slider.pagingCount === 1) {
              slider.controlNavScaffold.find('li').remove();
            } else {
              slider.controlNav.eq(pos).closest('li').remove();
            }
            methods.controlNav.set();
            (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
          }
        },
        directionNav: {
          setup: function() {
            var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + vars.nextText + '</a></li></ul>');
  
            // CONTROLSCONTAINER:
            if (slider.controlsContainer) {
              $(slider.controlsContainer).append(directionNavScaffold);
              slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
            } else {
              slider.append(directionNavScaffold);
              slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
            }
  
            methods.directionNav.update();
  
            slider.directionNav.bind(eventType, function(event) {
              event.preventDefault();
              var target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
              slider.flexAnimate(target, vars.pauseOnAction);
            });
            // Prevent iOS click event bug
            if (touch) {
              slider.directionNav.bind("click touchstart", function(event) {
                event.preventDefault();
              });
            }
          },
          update: function() {
            var disabledClass = namespace + 'disabled';
            if (slider.pagingCount === 1) {
              slider.directionNav.addClass(disabledClass);
            } else if (!vars.animationLoop) {
              if (slider.animatingTo === 0) {
                slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass);
              } else if (slider.animatingTo === slider.last) {
                slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass);
              } else {
                slider.directionNav.removeClass(disabledClass);
              }
            } else {
              slider.directionNav.removeClass(disabledClass);
            }
          }
        },
        pausePlay: {
          setup: function() {
            var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
  
            // CONTROLSCONTAINER:
            if (slider.controlsContainer) {
              slider.controlsContainer.append(pausePlayScaffold);
              slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
            } else {
              slider.append(pausePlayScaffold);
              slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
            }
  
            methods.pausePlay.update((vars.slideshow) ? namespace + 'pause' : namespace + 'play');
  
            slider.pausePlay.bind(eventType, function(event) {
              event.preventDefault();
              if ($(this).hasClass(namespace + 'pause')) {
                slider.manualPause = true;
                slider.manualPlay = false;
                slider.pause();
              } else {
                slider.manualPause = false;
                slider.manualPlay = true;
                slider.play();
              }
            });
            // Prevent iOS click event bug
            if (touch) {
              slider.pausePlay.bind("click touchstart", function(event) {
                event.preventDefault();
              });
            }
          },
          update: function(state) {
            (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').text(vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').text(vars.pauseText);
          }
        },
        touch: function() {
          var startX,
            startY,
            offset,
            cwidth,
            dx,
            startT,
            scrolling = false;
  
          el.addEventListener('touchstart', onTouchStart, false);
          function onTouchStart(e) {
            if (slider.animating) {
              e.preventDefault();
            } else if (e.touches.length === 1) {
              slider.pause();
              // CAROUSEL:
              cwidth = (vertical) ? slider.h : slider. w;
              startT = Number(new Date());
              // CAROUSEL:
              offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                       (carousel && reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
                       (carousel && slider.currentSlide === slider.last) ? slider.limit :
                       (carousel) ? ((slider.itemW + vars.itemMargin) * slider.move) * slider.currentSlide :
                       (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
              startX = (vertical) ? e.touches[0].pageY : e.touches[0].pageX;
              startY = (vertical) ? e.touches[0].pageX : e.touches[0].pageY;
  
              el.addEventListener('touchmove', onTouchMove, false);
              el.addEventListener('touchend', onTouchEnd, false);
            }
          }
  
          function onTouchMove(e) {
            dx = (vertical) ? startX - e.touches[0].pageY : startX - e.touches[0].pageX;
            scrolling = (vertical) ? (Math.abs(dx) < Math.abs(e.touches[0].pageX - startY)) : (Math.abs(dx) < Math.abs(e.touches[0].pageY - startY));
  
            if (!scrolling || Number(new Date()) - startT > 500) {
              e.preventDefault();
              if (!fade && slider.transitions) {
                if (!vars.animationLoop) {
                  dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
                }
                slider.setProps(offset + dx, "setTouch");
              }
            }
          }
  
          function onTouchEnd(e) {
            // finish the touch by undoing the touch session
            el.removeEventListener('touchmove', onTouchMove, false);
  
            if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
              var updateDx = (reverse) ? -dx : dx,
                  target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
  
              if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
                slider.flexAnimate(target, vars.pauseOnAction);
              } else {
                if (!fade) slider.flexAnimate(slider.currentSlide, vars.pauseOnAction, true);
              }
            }
            el.removeEventListener('touchend', onTouchEnd, false);
            startX = null;
            startY = null;
            dx = null;
            offset = null;
          }
        },
        resize: function() {
          if (!slider.animating && slider.is(':visible')) {
            if (!carousel) slider.doMath();
  
            if (fade) {
              // SMOOTH HEIGHT:
              methods.smoothHeight();
            } else if (carousel) { //CAROUSEL:
              slider.slides.width(slider.computedW);
              slider.update(slider.pagingCount);
              slider.setProps();
            }
            else if (vertical) { //VERTICAL:
              slider.viewport.height(slider.h);
              slider.setProps(slider.h, "setTotal");
            } else {
              // SMOOTH HEIGHT:
              if (vars.smoothHeight) methods.smoothHeight();
              slider.newSlides.width(slider.computedW);
              slider.setProps(slider.computedW, "setTotal");
            }
          }
        },
        smoothHeight: function(dur) {
          if (!vertical || fade) {
            var $obj = (fade) ? slider : slider.viewport;
            (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
          }
        },
        sync: function(action) {
          var $obj = $(vars.sync).data("flexslider"),
              target = slider.animatingTo;
  
          switch (action) {
            case "animate": $obj.flexAnimate(target, vars.pauseOnAction, false, true); break;
            case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
            case "pause": $obj.pause(); break;
          }
        }
      }
  
      // public methods
      slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
  
        if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
  
        if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
          if (asNav && withSync) {
            var master = $(vars.asNavFor).data('flexslider');
            slider.atEnd = target === 0 || target === slider.count - 1;
            master.flexAnimate(target, true, false, true, fromNav);
            slider.direction = (slider.currentItem < target) ? "next" : "prev";
            master.direction = slider.direction;
  
            if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
              slider.currentItem = target;
              slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
              target = Math.floor(target/slider.visible);
            } else {
              slider.currentItem = target;
              slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
              return false;
            }
          }
  
          slider.animating = true;
          slider.animatingTo = target;
          // API: before() animation Callback
          vars.before(slider);
  
          // SLIDESHOW:
          if (pause) slider.pause();
  
          // SYNC:
          if (slider.syncExists && !fromNav) methods.sync("animate");
  
          // CONTROLNAV
          if (vars.controlNav) methods.controlNav.active();
  
          // !CAROUSEL:
          // CANDIDATE: slide active class (for add/remove slide)
          if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
  
          // INFINITE LOOP:
          // CANDIDATE: atEnd
          slider.atEnd = target === 0 || target === slider.last;
  
          // DIRECTIONNAV:
          if (vars.directionNav) methods.directionNav.update();
  
          if (target === slider.last) {
            // API: end() of cycle Callback
            vars.end(slider);
            // SLIDESHOW && !INFINITE LOOP:
            if (!vars.animationLoop) slider.pause();
          }
  
          // SLIDE:
          if (!fade) {
            var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
                margin, slideString, calcNext;
  
            // INFINITE LOOP / REVERSE:
            if (carousel) {
              margin = (vars.itemWidth > slider.w) ? vars.itemMargin * 2 : vars.itemMargin;
              calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
              slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
            } else if (slider.currentSlide === 0 && target === slider.count - 1 && vars.animationLoop && slider.direction !== "next") {
              slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
            } else if (slider.currentSlide === slider.last && target === 0 && vars.animationLoop && slider.direction !== "prev") {
              slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
            } else {
              slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
            }
            slider.setProps(slideString, "", vars.animationSpeed);
            if (slider.transitions) {
              if (!vars.animationLoop || !slider.atEnd) {
                slider.animating = false;
                slider.currentSlide = slider.animatingTo;
              }
              slider.container.unbind("webkitTransitionEnd transitionend");
              slider.container.bind("webkitTransitionEnd transitionend", function() {
                slider.wrapup(dimension);
              });
            } else {
              slider.container.animate(slider.args, vars.animationSpeed, vars.easing, function(){
                slider.wrapup(dimension);
              });
            }
          } else { // FADE:
            if (!touch) {
              slider.slides.eq(slider.currentSlide).fadeOut(vars.animationSpeed, vars.easing);
              slider.slides.eq(target).fadeIn(vars.animationSpeed, vars.easing, slider.wrapup);
            } else {
              slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
              slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
  
              slider.slides.unbind("webkitTransitionEnd transitionend");
              slider.slides.eq(slider.currentSlide).bind("webkitTransitionEnd transitionend", function() {
                // API: after() animation Callback
                vars.after(slider);
              });
  
              slider.animating = false;
              slider.currentSlide = slider.animatingTo;
            }
          }
          // SMOOTH HEIGHT:
          if (vars.smoothHeight) methods.smoothHeight(vars.animationSpeed);
        }
      }
      slider.wrapup = function(dimension) {
        // SLIDE:
        if (!fade && !carousel) {
          if (slider.currentSlide === 0 && slider.animatingTo === slider.last && vars.animationLoop) {
            slider.setProps(dimension, "jumpEnd");
          } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && vars.animationLoop) {
            slider.setProps(dimension, "jumpStart");
          }
        }
        slider.animating = false;
        slider.currentSlide = slider.animatingTo;
        // API: after() animation Callback
        vars.after(slider);
      }
  
      // SLIDESHOW:
      slider.animateSlides = function() {
        if (!slider.animating) slider.flexAnimate(slider.getTarget("next"));
      }
      // SLIDESHOW:
      slider.pause = function() {
        clearInterval(slider.animatedSlides);
        slider.playing = false;
        // PAUSEPLAY:
        if (vars.pausePlay) methods.pausePlay.update("play");
        // SYNC:
        if (slider.syncExists) methods.sync("pause");
      }
      // SLIDESHOW:
      slider.play = function() {
        slider.animatedSlides = setInterval(slider.animateSlides, vars.slideshowSpeed);
        slider.playing = true;
        // PAUSEPLAY:
        if (vars.pausePlay) methods.pausePlay.update("pause");
        // SYNC:
        if (slider.syncExists) methods.sync("play");
      }
      slider.canAdvance = function(target, fromNav) {
        // ASNAV:
        var last = (asNav) ? slider.pagingCount - 1 : slider.last;
        return (fromNav) ? true :
               (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
               (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
               (target === slider.currentSlide && !asNav) ? false :
               (vars.animationLoop) ? true :
               (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
               (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
               true;
      }
      slider.getTarget = function(dir) {
        slider.direction = dir;
        if (dir === "next") {
          return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
        } else {
          return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
        }
      }
  
      // SLIDE:
      slider.setProps = function(pos, special, dur) {
        var target = (function() {
          var posCheck = (pos) ? pos : ((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo,
              posCalc = (function() {
                if (carousel) {
                  return (special === "setTouch") ? pos :
                         (reverse && slider.animatingTo === slider.last) ? 0 :
                         (reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
                         (slider.animatingTo === slider.last) ? slider.limit : posCheck;
                } else {
                  switch (special) {
                    case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
                    case "setTouch": return (reverse) ? pos : pos;
                    case "jumpEnd": return (reverse) ? pos : slider.count * pos;
                    case "jumpStart": return (reverse) ? slider.count * pos : pos;
                    default: return pos;
                  }
                }
              }());
              return (posCalc * -1) + "px";
            }());
  
        if (slider.transitions) {
          target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
          dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
          slider.container.css("-" + slider.pfx + "-transition-duration", dur);
        }
  
        slider.args[slider.prop] = target;
        if (slider.transitions || dur === undefined) slider.container.css(slider.args);
      }
  
      slider.setup = function(type) {
        // SLIDE:
        if (!fade) {
          var sliderOffset, arr;
  
          if (type === "init") {
            slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
            // INFINITE LOOP:
            slider.cloneCount = 0;
            slider.cloneOffset = 0;
            // REVERSE:
            if (reverse) {
              arr = $.makeArray(slider.slides).reverse();
              slider.slides = $(arr);
              slider.container.empty().append(slider.slides);
            }
          }
          // INFINITE LOOP && !CAROUSEL:
          if (vars.animationLoop && !carousel) {
            slider.cloneCount = 2;
            slider.cloneOffset = 1;
            // clear out old clones
            if (type !== "init") slider.container.find('.clone').remove();
            slider.container.append(slider.slides.first().clone().addClass('clone')).prepend(slider.slides.last().clone().addClass('clone'));
          }
          slider.newSlides = $(vars.selector, slider);
  
          sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
          // VERTICAL:
          if (vertical && !carousel) {
            slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
            setTimeout(function(){
              slider.newSlides.css({"display": "block"});
              slider.doMath();
              slider.viewport.height(slider.h);
              slider.setProps(sliderOffset * slider.h, "init");
            }, (type === "init") ? 100 : 0);
          } else {
            slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
            slider.setProps(sliderOffset * slider.computedW, "init");
            setTimeout(function(){
              slider.doMath();
              slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
              // SMOOTH HEIGHT:
              if (vars.smoothHeight) methods.smoothHeight();
            }, (type === "init") ? 100 : 0);
          }
        } else { // FADE:
          slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
          if (type === "init") {
            if (!touch) {
              slider.slides.eq(slider.currentSlide).fadeIn(vars.animationSpeed, vars.easing);
            } else {
              slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
            }
          }
          // SMOOTH HEIGHT:
          if (vars.smoothHeight) methods.smoothHeight();
        }
        // !CAROUSEL:
        // CANDIDATE: active slide
        if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
      }
  
      slider.doMath = function() {
        var slide = slider.slides.first(),
            slideMargin = vars.itemMargin,
            minItems = vars.minItems,
            maxItems = vars.maxItems;
  
        slider.w = slider.width();
        slider.h = slide.height();
        slider.boxPadding = slide.outerWidth() - slide.width();
  
        // CAROUSEL:
        if (carousel) {
          slider.itemT = vars.itemWidth + slideMargin;
          slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
          slider.maxW = (maxItems) ? maxItems * slider.itemT : slider.w;
          slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * minItems))/minItems :
                         (slider.maxW < slider.w) ? (slider.w - (slideMargin * maxItems))/maxItems :
                         (vars.itemWidth > slider.w) ? slider.w : vars.itemWidth;
          slider.visible = Math.floor(slider.w/(slider.itemW + slideMargin));
          slider.move = (vars.move > 0 && vars.move < slider.visible ) ? vars.move : slider.visible;
          slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
          slider.last =  slider.pagingCount - 1;
          slider.limit = (slider.pagingCount === 1) ? 0 :
                         (vars.itemWidth > slider.w) ? ((slider.itemW + (slideMargin * 2)) * slider.count) - slider.w - slideMargin : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
        } else {
          slider.itemW = slider.w;
          slider.pagingCount = slider.count;
          slider.last = slider.count - 1;
        }
        slider.computedW = slider.itemW - slider.boxPadding;
      }
  
      slider.update = function(pos, action) {
        slider.doMath();
  
  
        // update currentSlide and slider.animatingTo if necessary
        if (!carousel) {
          if (pos < slider.currentSlide) {
            slider.currentSlide += 1;
          } else if (pos <= slider.currentSlide && pos !== 0) {
            slider.currentSlide -= 1;
          }
          slider.animatingTo = slider.currentSlide;
        }
  
        // update controlNav
        if (vars.controlNav && !slider.manualControls) {
          if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
            methods.controlNav.update("add");
          } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
            if (carousel && slider.currentSlide > slider.last) {
              slider.currentSlide -= 1;
              slider.animatingTo -= 1;
            }
            methods.controlNav.update("remove", slider.last);
          }
        }
        // update directionNav
        if (vars.directionNav) methods.directionNav.update();
  
      }
  
      slider.addSlide = function(obj, pos) {
        var $obj = $(obj);
  
        slider.count += 1;
        slider.last = slider.count - 1;
  
        // append new slide
        if (vertical && reverse) {
          (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
        } else {
          (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
        }
  
        // update currentSlide, animatingTo, controlNav, and directionNav
        slider.update(pos, "add");
  
        // update slider.slides
        slider.slides = $(vars.selector + ':not(.clone)', slider);
        // re-setup the slider to accomdate new slide
        slider.setup();
  
        //FlexSlider: added() Callback
        vars.added(slider);
      }
      slider.removeSlide = function(obj) {
        var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
  
        // update count
        slider.count -= 1;
        slider.last = slider.count - 1;
  
        // remove slide
        if (isNaN(obj)) {
          $(obj, slider.slides).remove();
        } else {
          (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
        }
  
        // update currentSlide, animatingTo, controlNav, and directionNav
        slider.doMath();
        slider.update(pos, "remove");
  
        // update slider.slides
        slider.slides = $(vars.selector + ':not(.clone)', slider);
        // re-setup the slider to accomdate new slide
        slider.setup();
  
        // FlexSlider: removed() Callback
        vars.removed(slider);
      }
  
      //FlexSlider: Initialize
      methods.init();
    }
  
    //FlexSlider: Default Settings
    $.flexslider.defaults = {
      namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
      selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
      animation: "fade",              //String: Select your animation type, "fade" or "slide"
      easing: "swing",               //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
      direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
      reverse: false,                 //{NEW} Boolean: Reverse the animation direction
      animationLoop: true,             //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
      smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
      startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
      slideshow: true,                //Boolean: Animate slider automatically
      slideshowSpeed: 5000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
      animationSpeed: 1200,            //Integer: Set the speed of animations, in milliseconds
      initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
      randomize: false,               //Boolean: Randomize slide order
  
      // Usability features
      pauseOnAction: false,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
      pauseOnHover: true,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
      useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
      touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
      video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
  
      // Primary Controls
      controlNav: false,               //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
      directionNav: false,             //Boolean: Create navigation for previous/next navigation? (true/false)
      prevText: "<i class='fa fa-angle-left'></i>",           //String: Set the text for the "previous" directionNav item
      nextText: "<i class='fa fa-angle-right'></i>",               //String: Set the text for the "next" directionNav item
  
      // Secondary Navigation
      keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
      multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
      mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
      pausePlay: false,               //Boolean: Create pause/play dynamic element
      pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
      playText: "Play",               //String: Set the text for the "play" pausePlay item
  
      // Special properties
      controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
      manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
      sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
      asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
  
      // Carousel Options
      itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
      itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
      minItems: 0,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
      maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
      move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
  
      // Callback API
      start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
      before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
      after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
      end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
      added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
      removed: function(){}           //{NEW} Callback: function(slider) - Fires after a slide is removed
    }
  
  
    //FlexSlider: Plugin Function
    $.fn.flexslider = function(options) {
      if (options === undefined) options = {};
  
      if (typeof options === "object") {
        return this.each(function() {
          var $this = $(this),
              selector = (options.selector) ? options.selector : ".slides > li",
              $slides = $this.find(selector);
  
          if ($slides.length === 1) {
            $slides.fadeIn(400);
            if (options.start) options.start($this);
          } else if ($this.data('flexslider') == undefined) {
            new $.flexslider(this, options);
          }
        });
      } else {
        // Helper strings to quickly perform functions on the slider
        var $slider = $(this).data('flexslider');
        switch (options) {
          case "play": $slider.play(); break;
          case "pause": $slider.pause(); break;
          case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
          case "prev":
          case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
          default: if (typeof options === "number") $slider.flexAnimate(options, true);
        }
      }
    }
  
  })(jQuery);
  
  
  /**
   * Owl carousel
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   * @todo Lazy Load Icon
   * @todo prevent animationend bubling
   * @todo itemsScaleUp
   * @todo Test Zepto
   * @todo stagePadding calculate wrong active classes
   */
  ;(function($, window, document, undefined) {
  
  	var drag, state, e;
  
  	/**
  	 * Template for status information about drag and touch events.
  	 * @private
  	 */
  	drag = {
  		start: 0,
  		startX: 0,
  		startY: 0,
  		current: 0,
  		currentX: 0,
  		currentY: 0,
  		offsetX: 0,
  		offsetY: 0,
  		distance: null,
  		startTime: 0,
  		endTime: 0,
  		updatedX: 0,
  		targetEl: null
  	};
  
  	/**
  	 * Template for some status informations.
  	 * @private
  	 */
  	state = {
  		isTouch: false,
  		isScrolling: false,
  		isSwiping: false,
  		direction: false,
  		inMotion: false
  	};
  
  	/**
  	 * Event functions references.
  	 * @private
  	 */
  	e = {
  		_onDragStart: null,
  		_onDragMove: null,
  		_onDragEnd: null,
  		_transitionEnd: null,
  		_resizer: null,
  		_responsiveCall: null,
  		_goToLoop: null,
  		_checkVisibile: null
  	};
  
  	/**
  	 * Creates a carousel.
  	 * @class The Owl Carousel.
  	 * @public
  	 * @param {HTMLElement|jQuery} element - The element to create the carousel for.
  	 * @param {Object} [options] - The options
  	 */
  	function Owl(element, options) {
  
  		/**
  		 * Current settings for the carousel.
  		 * @public
  		 */
  		this.settings = null;
  
  		/**
  		 * Current options set by the caller including defaults.
  		 * @public
  		 */
  		this.options = $.extend({}, Owl.Defaults, options);
  
  		/**
  		 * Plugin element.
  		 * @public
  		 */
  		this.$element = $(element);
  
  		/**
  		 * Caches informations about drag and touch events.
  		 */
  		this.drag = $.extend({}, drag);
  
  		/**
  		 * Caches some status informations.
  		 * @protected
  		 */
  		this.state = $.extend({}, state);
  
  		/**
  		 * @protected
  		 * @todo Must be documented
  		 */
  		this.e = $.extend({}, e);
  
  		/**
  		 * References to the running plugins of this carousel.
  		 * @protected
  		 */
  		this._plugins = {};
  
  		/**
  		 * Currently suppressed events to prevent them from beeing retriggered.
  		 * @protected
  		 */
  		this._supress = {};
  
  		/**
  		 * Absolute current position.
  		 * @protected
  		 */
  		this._current = null;
  
  		/**
  		 * Animation speed in milliseconds.
  		 * @protected
  		 */
  		this._speed = null;
  
  		/**
  		 * Coordinates of all items in pixel.
  		 * @todo The name of this member is missleading.
  		 * @protected
  		 */
  		this._coordinates = [];
  
  		/**
  		 * Current breakpoint.
  		 * @todo Real media queries would be nice.
  		 * @protected
  		 */
  		this._breakpoint = null;
  
  		/**
  		 * Current width of the plugin element.
  		 */
  		this._width = null;
  
  		/**
  		 * All real items.
  		 * @protected
  		 */
  		this._items = [];
  
  		/**
  		 * All cloned items.
  		 * @protected
  		 */
  		this._clones = [];
  
  		/**
  		 * Merge values of all items.
  		 * @todo Maybe this could be part of a plugin.
  		 * @protected
  		 */
  		this._mergers = [];
  
  		/**
  		 * Invalidated parts within the update process.
  		 * @protected
  		 */
  		this._invalidated = {};
  
  		/**
  		 * Ordered list of workers for the update process.
  		 * @protected
  		 */
  		this._pipe = [];
  
  		$.each(Owl.Plugins, $.proxy(function(key, plugin) {
  			this._plugins[key[0].toLowerCase() + key.slice(1)]
  				= new plugin(this);
  		}, this));
  
  		$.each(Owl.Pipe, $.proxy(function(priority, worker) {
  			this._pipe.push({
  				'filter': worker.filter,
  				'run': $.proxy(worker.run, this)
  			});
  		}, this));
  
  		this.setup();
  		this.initialize();
  	}
  
  	/**
  	 * Default options for the carousel.
  	 * @public
  	 */
  	Owl.Defaults = {
  		items: 3,
  		loop: false,
  		center: false,
  
  		mouseDrag: true,
  		touchDrag: true,
  		pullDrag: true,
  		freeDrag: false,
  
  		margin: 0,
  		stagePadding: 0,
  
  		merge: false,
  		mergeFit: true,
  		autoWidth: false,
  
  		startPosition: 0,
  		rtl: false,
  
  		smartSpeed: 250,
  		fluidSpeed: false,
  		dragEndSpeed: false,
  
  		responsive: {},
  		responsiveRefreshRate: 200,
  		responsiveBaseElement: window,
  		responsiveClass: false,
  
  		fallbackEasing: 'swing',
  
  		info: false,
  
  		nestedItemSelector: false,
  		itemElement: 'div',
  		stageElement: 'div',
  
  		// Classes and Names
  		themeClass: 'owl-theme',
  		baseClass: 'owl-carousel',
  		itemClass: 'owl-item',
  		centerClass: 'center',
  		activeClass: 'active'
  	};
  
  	/**
  	 * Enumeration for width.
  	 * @public
  	 * @readonly
  	 * @enum {String}
  	 */
  	Owl.Width = {
  		Default: 'default',
  		Inner: 'inner',
  		Outer: 'outer'
  	};
  
  	/**
  	 * Contains all registered plugins.
  	 * @public
  	 */
  	Owl.Plugins = {};
  
  	/**
  	 * Update pipe.
  	 */
  	Owl.Pipe = [ {
  		filter: [ 'width', 'items', 'settings' ],
  		run: function(cache) {
  			cache.current = this._items && this._items[this.relative(this._current)];
  		}
  	}, {
  		filter: [ 'items', 'settings' ],
  		run: function() {
  			var cached = this._clones,
  				clones = this.$stage.children('.cloned');
  
  			if (clones.length !== cached.length || (!this.settings.loop && cached.length > 0)) {
  				this.$stage.children('.cloned').remove();
  				this._clones = [];
  			}
  		}
  	}, {
  		filter: [ 'items', 'settings' ],
  		run: function() {
  			var i, n,
  				clones = this._clones,
  				items = this._items,
  				delta = this.settings.loop ? clones.length - Math.max(this.settings.items * 2, 4) : 0;
  
  			for (i = 0, n = Math.abs(delta / 2); i < n; i++) {
  				if (delta > 0) {
  					this.$stage.children().eq(items.length + clones.length - 1).remove();
  					clones.pop();
  					this.$stage.children().eq(0).remove();
  					clones.pop();
  				} else {
  					clones.push(clones.length / 2);
  					this.$stage.append(items[clones[clones.length - 1]].clone().addClass('cloned'));
  					clones.push(items.length - 1 - (clones.length - 1) / 2);
  					this.$stage.prepend(items[clones[clones.length - 1]].clone().addClass('cloned'));
  				}
  			}
  		}
  	}, {
  		filter: [ 'width', 'items', 'settings' ],
  		run: function() {
  			var rtl = (this.settings.rtl ? 1 : -1),
  				width = (this.width() / this.settings.items).toFixed(3),
  				coordinate = 0, merge, i, n;
  
  			this._coordinates = [];
  			for (i = 0, n = this._clones.length + this._items.length; i < n; i++) {
  				merge = this._mergers[this.relative(i)];
  				merge = (this.settings.mergeFit && Math.min(merge, this.settings.items)) || merge;
  				coordinate += (this.settings.autoWidth ? this._items[this.relative(i)].width() + this.settings.margin : width * merge) * rtl;
  
  				this._coordinates.push(coordinate);
  			}
  		}
  	}, {
  		filter: [ 'width', 'items', 'settings' ],
  		run: function() {
  			var i, n, width = (this.width() / this.settings.items).toFixed(3), css = {
  				'width': Math.abs(this._coordinates[this._coordinates.length - 1]) + this.settings.stagePadding * 2,
  				'padding-left': this.settings.stagePadding || '',
  				'padding-right': this.settings.stagePadding || ''
  			};
  
  			this.$stage.css(css);
  
  			css = { 'width': this.settings.autoWidth ? 'auto' : width - this.settings.margin };
  			css[this.settings.rtl ? 'margin-left' : 'margin-right'] = this.settings.margin;
  
  			if (!this.settings.autoWidth && $.grep(this._mergers, function(v) { return v > 1 }).length > 0) {
  				for (i = 0, n = this._coordinates.length; i < n; i++) {
  					css.width = Math.abs(this._coordinates[i]) - Math.abs(this._coordinates[i - 1] || 0) - this.settings.margin;
  					this.$stage.children().eq(i).css(css);
  				}
  			} else {
  				this.$stage.children().css(css);
  			}
  		}
  	}, {
  		filter: [ 'width', 'items', 'settings' ],
  		run: function(cache) {
  			cache.current && this.reset(this.$stage.children().index(cache.current));
  		}
  	}, {
  		filter: [ 'position' ],
  		run: function() {
  			this.animate(this.coordinates(this._current));
  		}
  	}, {
  		filter: [ 'width', 'position', 'items', 'settings' ],
  		run: function() {
  			var rtl = this.settings.rtl ? 1 : -1,
  				padding = this.settings.stagePadding * 2,
  				begin = this.coordinates(this.current()) + padding,
  				end = begin + this.width() * rtl,
  				inner, outer, matches = [], i, n;
  
  			for (i = 0, n = this._coordinates.length; i < n; i++) {
  				inner = this._coordinates[i - 1] || 0;
  				outer = Math.abs(this._coordinates[i]) + padding * rtl;
  
  				if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
  					|| (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
  					matches.push(i);
  				}
  			}
  
  			this.$stage.children('.' + this.settings.activeClass).removeClass(this.settings.activeClass);
  			this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass(this.settings.activeClass);
  
  			if (this.settings.center) {
  				this.$stage.children('.' + this.settings.centerClass).removeClass(this.settings.centerClass);
  				this.$stage.children().eq(this.current()).addClass(this.settings.centerClass);
  			}
  		}
  	} ];
  
  	/**
  	 * Initializes the carousel.
  	 * @protected
  	 */
  	Owl.prototype.initialize = function() {
  		this.trigger('initialize');
  
  		this.$element
  			.addClass(this.settings.baseClass)
  			.addClass(this.settings.themeClass)
  			.toggleClass('owl-rtl', this.settings.rtl);
  
  		// check support
  		this.browserSupport();
  
  		if (this.settings.autoWidth && this.state.imagesLoaded !== true) {
  			var imgs, nestedSelector, width;
  			imgs = this.$element.find('img');
  			nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
  			width = this.$element.children(nestedSelector).width();
  
  			if (imgs.length && width <= 0) {
  				this.preloadAutoWidthImages(imgs);
  				return false;
  			}
  		}
  
  		this.$element.addClass('owl-loading');
  
  		// create stage
  		this.$stage = $('<' + this.settings.stageElement + ' class="owl-stage"/>')
  			.wrap('<div class="owl-stage-outer">');
  
  		// append stage
  		this.$element.append(this.$stage.parent());
  
  		// append content
  		this.replace(this.$element.children().not(this.$stage.parent()));
  
  		// set view width
  		this._width = this.$element.width();
  
  		// update view
  		this.refresh();
  
  		this.$element.removeClass('owl-loading').addClass('owl-loaded');
  
  		// attach generic events
  		this.eventsCall();
  
  		// attach generic events
  		this.internalEvents();
  
  		// attach custom control events
  		this.addTriggerableEvents();
  
  		this.trigger('initialized');
  	};
  
  	/**
  	 * Setups the current settings.
  	 * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
  	 * @todo Support for media queries by using `matchMedia` would be nice.
  	 * @public
  	 */
  	Owl.prototype.setup = function() {
  		var viewport = this.viewport(),
  			overwrites = this.options.responsive,
  			match = -1,
  			settings = null;
  
  		if (!overwrites) {
  			settings = $.extend({}, this.options);
  		} else {
  			$.each(overwrites, function(breakpoint) {
  				if (breakpoint <= viewport && breakpoint > match) {
  					match = Number(breakpoint);
  				}
  			});
  
  			settings = $.extend({}, this.options, overwrites[match]);
  			delete settings.responsive;
  
  			// responsive class
  			if (settings.responsiveClass) {
  				this.$element.attr('class', function(i, c) {
  					return c.replace(/\b owl-responsive-\S+/g, '');
  				}).addClass('owl-responsive-' + match);
  			}
  		}
  
  		if (this.settings === null || this._breakpoint !== match) {
  			this.trigger('change', { property: { name: 'settings', value: settings } });
  			this._breakpoint = match;
  			this.settings = settings;
  			this.invalidate('settings');
  			this.trigger('changed', { property: { name: 'settings', value: this.settings } });
  		}
  	};
  
  	/**
  	 * Updates option logic if necessery.
  	 * @protected
  	 */
  	Owl.prototype.optionsLogic = function() {
  		// Toggle Center class
  		this.$element.toggleClass('owl-center', this.settings.center);
  
  		// if items number is less than in body
  		if (this.settings.loop && this._items.length < this.settings.items) {
  			this.settings.loop = false;
  		}
  
  		if (this.settings.autoWidth) {
  			this.settings.stagePadding = false;
  			this.settings.merge = false;
  		}
  	};
  
  	/**
  	 * Prepares an item before add.
  	 * @todo Rename event parameter `content` to `item`.
  	 * @protected
  	 * @returns {jQuery|HTMLElement} - The item container.
  	 */
  	Owl.prototype.prepare = function(item) {
  		var event = this.trigger('prepare', { content: item });
  
  		if (!event.data) {
  			event.data = $('<' + this.settings.itemElement + '/>')
  				.addClass(this.settings.itemClass).append(item)
  		}
  
  		this.trigger('prepared', { content: event.data });
  
  		return event.data;
  	};
  
  	/**
  	 * Updates the view.
  	 * @public
  	 */
  	Owl.prototype.update = function() {
  		var i = 0,
  			n = this._pipe.length,
  			filter = $.proxy(function(p) { return this[p] }, this._invalidated),
  			cache = {};
  
  		while (i < n) {
  			if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
  				this._pipe[i].run(cache);
  			}
  			i++;
  		}
  
  		this._invalidated = {};
  	};
  
  	/**
  	 * Gets the width of the view.
  	 * @public
  	 * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.
  	 * @returns {Number} - The width of the view in pixel.
  	 */
  	Owl.prototype.width = function(dimension) {
  		dimension = dimension || Owl.Width.Default;
  		switch (dimension) {
  			case Owl.Width.Inner:
  			case Owl.Width.Outer:
  				return this._width;
  			default:
  				return this._width - this.settings.stagePadding * 2 + this.settings.margin;
  		}
  	};
  
  	/**
  	 * Refreshes the carousel primarily for adaptive purposes.
  	 * @public
  	 */
  	Owl.prototype.refresh = function() {
  		if (this._items.length === 0) {
  			return false;
  		}
  
  		var start = new Date().getTime();
  
  		this.trigger('refresh');
  
  		this.setup();
  
  		this.optionsLogic();
  
  		// hide and show methods helps here to set a proper widths,
  		// this prevents scrollbar to be calculated in stage width
  		this.$stage.addClass('owl-refresh');
  
  		this.update();
  
  		this.$stage.removeClass('owl-refresh');
  
  		this.state.orientation = window.orientation;
  
  		this.watchVisibility();
  
  		this.trigger('refreshed');
  	};
  
  	/**
  	 * Save internal event references and add event based functions.
  	 * @protected
  	 */
  	Owl.prototype.eventsCall = function() {
  		// Save events references
  		this.e._onDragStart = $.proxy(function(e) {
  			this.onDragStart(e);
  		}, this);
  		this.e._onDragMove = $.proxy(function(e) {
  			this.onDragMove(e);
  		}, this);
  		this.e._onDragEnd = $.proxy(function(e) {
  			this.onDragEnd(e);
  		}, this);
  		this.e._onResize = $.proxy(function(e) {
  			this.onResize(e);
  		}, this);
  		this.e._transitionEnd = $.proxy(function(e) {
  			this.transitionEnd(e);
  		}, this);
  		this.e._preventClick = $.proxy(function(e) {
  			this.preventClick(e);
  		}, this);
  	};
  
  	/**
  	 * Checks window `resize` event.
  	 * @protected
  	 */
  	Owl.prototype.onThrottledResize = function() {
  		window.clearTimeout(this.resizeTimer);
  		this.resizeTimer = window.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate);
  	};
  
  	/**
  	 * Checks window `resize` event.
  	 * @protected
  	 */
  	Owl.prototype.onResize = function() {
  		if (!this._items.length) {
  			return false;
  		}
  
  		if (this._width === this.$element.width()) {
  			return false;
  		}
  
  		if (this.trigger('resize').isDefaultPrevented()) {
  			return false;
  		}
  
  		this._width = this.$element.width();
  
  		this.invalidate('width');
  
  		this.refresh();
  
  		this.trigger('resized');
  	};
  
  	/**
  	 * Checks for touch/mouse drag event type and add run event handlers.
  	 * @protected
  	 */
  	Owl.prototype.eventsRouter = function(event) {
  		var type = event.type;
  
  		if (type === "mousedown" || type === "touchstart") {
  			this.onDragStart(event);
  		} else if (type === "mousemove" || type === "touchmove") {
  			this.onDragMove(event);
  		} else if (type === "mouseup" || type === "touchend") {
  			this.onDragEnd(event);
  		} else if (type === "touchcancel") {
  			this.onDragEnd(event);
  		}
  	};
  
  	/**
  	 * Checks for touch/mouse drag options and add necessery event handlers.
  	 * @protected
  	 */
  	Owl.prototype.internalEvents = function() {
  		var isTouch = isTouchSupport(),
  			isTouchIE = isTouchSupportIE();
  
  		if (this.settings.mouseDrag){
  			this.$stage.on('mousedown', $.proxy(function(event) { this.eventsRouter(event) }, this));
  			this.$stage.on('dragstart', function() { return false });
  			this.$stage.get(0).onselectstart = function() { return false };
  		} else {
  			this.$element.addClass('owl-text-select-on');
  		}
  
  		if (this.settings.touchDrag && !isTouchIE){
  			this.$stage.on('touchstart touchcancel', $.proxy(function(event) { this.eventsRouter(event) }, this));
  		}
  
  		// catch transitionEnd event
  		if (this.transitionEndVendor) {
  			this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, false);
  		}
  
  		// responsive
  		if (this.settings.responsive !== false) {
  			this.on(window, 'resize', $.proxy(this.onThrottledResize, this));
  		}
  	};
  
  	/**
  	 * Handles touchstart/mousedown event.
  	 * @protected
  	 * @param {Event} event - The event arguments.
  	 */
  	Owl.prototype.onDragStart = function(event) {
  		var ev, isTouchEvent, pageX, pageY, animatedPos;
  
  		ev = event.originalEvent || event || window.event;
  
  		// prevent right click
  		if (ev.which === 3 || this.state.isTouch) {
  			return false;
  		}
  
  		if (ev.type === 'mousedown') {
  			this.$stage.addClass('owl-grab');
  		}
  
  		this.trigger('drag');
  		this.drag.startTime = new Date().getTime();
  		this.speed(0);
  		this.state.isTouch = true;
  		this.state.isScrolling = false;
  		this.state.isSwiping = false;
  		this.drag.distance = 0;
  
  		pageX = getTouches(ev).x;
  		pageY = getTouches(ev).y;
  
  		// get stage position left
  		this.drag.offsetX = this.$stage.position().left;
  		this.drag.offsetY = this.$stage.position().top;
  
  		if (this.settings.rtl) {
  			this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width()
  				+ this.settings.margin;
  		}
  
  		// catch position // ie to fix
  		if (this.state.inMotion && this.support3d) {
  			animatedPos = this.getTransformProperty();
  			this.drag.offsetX = animatedPos;
  			this.animate(animatedPos);
  			this.state.inMotion = true;
  		} else if (this.state.inMotion && !this.support3d) {
  			this.state.inMotion = false;
  			return false;
  		}
  
  		this.drag.startX = pageX - this.drag.offsetX;
  		this.drag.startY = pageY - this.drag.offsetY;
  
  		this.drag.start = pageX - this.drag.startX;
  		this.drag.targetEl = ev.target || ev.srcElement;
  		this.drag.updatedX = this.drag.start;
  
  		// to do/check
  		// prevent links and images dragging;
  		if (this.drag.targetEl.tagName === "IMG" || this.drag.targetEl.tagName === "A") {
  			this.drag.targetEl.draggable = false;
  		}
  
  		$(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents', $.proxy(function(event) {this.eventsRouter(event)},this));
  	};
  
  	/**
  	 * Handles the touchmove/mousemove events.
  	 * @todo Simplify
  	 * @protected
  	 * @param {Event} event - The event arguments.
  	 */
  	Owl.prototype.onDragMove = function(event) {
  		var ev, isTouchEvent, pageX, pageY, minValue, maxValue, pull;
  
  		if (!this.state.isTouch) {
  			return;
  		}
  
  		if (this.state.isScrolling) {
  			return;
  		}
  
  		ev = event.originalEvent || event || window.event;
  
  		pageX = getTouches(ev).x;
  		pageY = getTouches(ev).y;
  
  		// Drag Direction
  		this.drag.currentX = pageX - this.drag.startX;
  		this.drag.currentY = pageY - this.drag.startY;
  		this.drag.distance = this.drag.currentX - this.drag.offsetX;
  
  		// Check move direction
  		if (this.drag.distance < 0) {
  			this.state.direction = this.settings.rtl ? 'right' : 'left';
  		} else if (this.drag.distance > 0) {
  			this.state.direction = this.settings.rtl ? 'left' : 'right';
  		}
  		// Loop
  		if (this.settings.loop) {
  			if (this.op(this.drag.currentX, '>', this.coordinates(this.minimum())) && this.state.direction === 'right') {
  				this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
  			} else if (this.op(this.drag.currentX, '<', this.coordinates(this.maximum())) && this.state.direction === 'left') {
  				this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
  			}
  		} else {
  			// pull
  			minValue = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
  			maxValue = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
  			pull = this.settings.pullDrag ? this.drag.distance / 5 : 0;
  			this.drag.currentX = Math.max(Math.min(this.drag.currentX, minValue + pull), maxValue + pull);
  		}
  
  		// Lock browser if swiping horizontal
  
  		if ((this.drag.distance > 8 || this.drag.distance < -8)) {
  			if (ev.preventDefault !== undefined) {
  				ev.preventDefault();
  			} else {
  				ev.returnValue = false;
  			}
  			this.state.isSwiping = true;
  		}
  
  		this.drag.updatedX = this.drag.currentX;
  
  		// Lock Owl if scrolling
  		if ((this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === false) {
  			this.state.isScrolling = true;
  			this.drag.updatedX = this.drag.start;
  		}
  
  		this.animate(this.drag.updatedX);
  	};
  
  	/**
  	 * Handles the touchend/mouseup events.
  	 * @protected
  	 */
  	Owl.prototype.onDragEnd = function(event) {
  		var compareTimes, distanceAbs, closest;
  
  		if (!this.state.isTouch) {
  			return;
  		}
  
  		if (event.type === 'mouseup') {
  			this.$stage.removeClass('owl-grab');
  		}
  
  		this.trigger('dragged');
  
  		// prevent links and images dragging;
  		this.drag.targetEl.removeAttribute("draggable");
  
  		// remove drag event listeners
  
  		this.state.isTouch = false;
  		this.state.isScrolling = false;
  		this.state.isSwiping = false;
  
  		// to check
  		if (this.drag.distance === 0 && this.state.inMotion !== true) {
  			this.state.inMotion = false;
  			return false;
  		}
  
  		// prevent clicks while scrolling
  
  		this.drag.endTime = new Date().getTime();
  		compareTimes = this.drag.endTime - this.drag.startTime;
  		distanceAbs = Math.abs(this.drag.distance);
  
  		// to test
  		if (distanceAbs > 3 || compareTimes > 300) {
  			this.removeClick(this.drag.targetEl);
  		}
  
  		closest = this.closest(this.drag.updatedX);
  
  		this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
  		this.current(closest);
  		this.invalidate('position');
  		this.update();
  
  		// if pullDrag is off then fire transitionEnd event manually when stick
  		// to border
  		if (!this.settings.pullDrag && this.drag.updatedX === this.coordinates(closest)) {
  			this.transitionEnd();
  		}
  
  		this.drag.distance = 0;
  
  		$(document).off('.owl.dragEvents');
  	};
  
  	/**
  	 * Attaches `preventClick` to disable link while swipping.
  	 * @protected
  	 * @param {HTMLElement} [target] - The target of the `click` event.
  	 */
  	Owl.prototype.removeClick = function(target) {
  		this.drag.targetEl = target;
  		$(target).on('click.preventClick', this.e._preventClick);
  		// to make sure click is removed:
  		window.setTimeout(function() {
  			$(target).off('click.preventClick');
  		}, 300);
  	};
  
  	/**
  	 * Suppresses click event.
  	 * @protected
  	 * @param {Event} ev - The event arguments.
  	 */
  	Owl.prototype.preventClick = function(ev) {
  		if (ev.preventDefault) {
  			ev.preventDefault();
  		} else {
  			ev.returnValue = false;
  		}
  		if (ev.stopPropagation) {
  			ev.stopPropagation();
  		}
  		$(ev.target).off('click.preventClick');
  	};
  
  	/**
  	 * Catches stage position while animate (only CSS3).
  	 * @protected
  	 * @returns
  	 */
  	Owl.prototype.getTransformProperty = function() {
  		var transform, matrix3d;
  
  		transform = window.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + 'transform');
  		// var transform = this.$stage.css(this.vendorName + 'transform')
  		transform = transform.replace(/matrix(3d)?\(|\)/g, '').split(',');
  		matrix3d = transform.length === 16;
  
  		return matrix3d !== true ? transform[4] : transform[12];
  	};
  
  	/**
  	 * Gets absolute position of the closest item for a coordinate.
  	 * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
  	 * @protected
  	 * @param {Number} coordinate - The coordinate in pixel.
  	 * @return {Number} - The absolute position of the closest item.
  	 */
  	Owl.prototype.closest = function(coordinate) {
  		var position = -1, pull = 30, width = this.width(), coordinates = this.coordinates();
  
  		if (!this.settings.freeDrag) {
  			// check closest item
  			$.each(coordinates, $.proxy(function(index, value) {
  				if (coordinate > value - pull && coordinate < value + pull) {
  					position = index;
  				} else if (this.op(coordinate, '<', value)
  					&& this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
  					position = this.state.direction === 'left' ? index + 1 : index;
  				}
  				return position === -1;
  			}, this));
  		}
  
  		if (!this.settings.loop) {
  			// non loop boundries
  			if (this.op(coordinate, '>', coordinates[this.minimum()])) {
  				position = coordinate = this.minimum();
  			} else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
  				position = coordinate = this.maximum();
  			}
  		}
  
  		return position;
  	};
  
  	/**
  	 * Animates the stage.
  	 * @public
  	 * @param {Number} coordinate - The coordinate in pixels.
  	 */
  	Owl.prototype.animate = function(coordinate) {
  		this.trigger('translate');
  		this.state.inMotion = this.speed() > 0;
  
  		if (this.support3d) {
  			this.$stage.css({
  				transform: 'translate3d(' + coordinate + 'px' + ',0px, 0px)',
  				transition: (this.speed() / 1000) + 's'
  			});
  		} else if (this.state.isTouch) {
  			this.$stage.css({
  				left: coordinate + 'px'
  			});
  		} else {
  			this.$stage.animate({
  				left: coordinate
  			}, this.speed() / 1000, this.settings.fallbackEasing, $.proxy(function() {
  				if (this.state.inMotion) {
  					this.transitionEnd();
  				}
  			}, this));
  		}
  	};
  
  	/**
  	 * Sets the absolute position of the current item.
  	 * @public
  	 * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.
  	 * @returns {Number} - The absolute position of the current item.
  	 */
  	Owl.prototype.current = function(position) {
  		if (position === undefined) {
  			return this._current;
  		}
  
  		if (this._items.length === 0) {
  			return undefined;
  		}
  
  		position = this.normalize(position);
  
  		if (this._current !== position) {
  			var event = this.trigger('change', { property: { name: 'position', value: position } });
  
  			if (event.data !== undefined) {
  				position = this.normalize(event.data);
  			}
  
  			this._current = position;
  
  			this.invalidate('position');
  
  			this.trigger('changed', { property: { name: 'position', value: this._current } });
  		}
  
  		return this._current;
  	};
  
  	/**
  	 * Invalidates the given part of the update routine.
  	 * @param {String} part - The part to invalidate.
  	 */
  	Owl.prototype.invalidate = function(part) {
  		this._invalidated[part] = true;
  	}
  
  	/**
  	 * Resets the absolute position of the current item.
  	 * @public
  	 * @param {Number} position - The absolute position of the new item.
  	 */
  	Owl.prototype.reset = function(position) {
  		position = this.normalize(position);
  
  		if (position === undefined) {
  			return;
  		}
  
  		this._speed = 0;
  		this._current = position;
  
  		this.suppress([ 'translate', 'translated' ]);
  
  		this.animate(this.coordinates(position));
  
  		this.release([ 'translate', 'translated' ]);
  	};
  
  	/**
  	 * Normalizes an absolute or a relative position for an item.
  	 * @public
  	 * @param {Number} position - The absolute or relative position to normalize.
  	 * @param {Boolean} [relative=false] - Whether the given position is relative or not.
  	 * @returns {Number} - The normalized position.
  	 */
  	Owl.prototype.normalize = function(position, relative) {
  		var n = (relative ? this._items.length : this._items.length + this._clones.length);
  
  		if (!$.isNumeric(position) || n < 1) {
  			return undefined;
  		}
  
  		if (this._clones.length) {
  			position = ((position % n) + n) % n;
  		} else {
  			position = Math.max(this.minimum(relative), Math.min(this.maximum(relative), position));
  		}
  
  		return position;
  	};
  
  	/**
  	 * Converts an absolute position for an item into a relative position.
  	 * @public
  	 * @param {Number} position - The absolute position to convert.
  	 * @returns {Number} - The converted position.
  	 */
  	Owl.prototype.relative = function(position) {
  		position = this.normalize(position);
  		position = position - this._clones.length / 2;
  		return this.normalize(position, true);
  	};
  
  	/**
  	 * Gets the maximum position for an item.
  	 * @public
  	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
  	 * @returns {Number}
  	 */
  	Owl.prototype.maximum = function(relative) {
  		var maximum, width, i = 0, coordinate,
  			settings = this.settings;
  
  		if (relative) {
  			return this._items.length - 1;
  		}
  
  		if (!settings.loop && settings.center) {
  			maximum = this._items.length - 1;
  		} else if (!settings.loop && !settings.center) {
  			maximum = this._items.length - settings.items;
  		} else if (settings.loop || settings.center) {
  			maximum = this._items.length + settings.items;
  		} else if (settings.autoWidth || settings.merge) {
  			revert = settings.rtl ? 1 : -1;
  			width = this.$stage.width() - this.$element.width();
  			while (coordinate = this.coordinates(i)) {
  				if (coordinate * revert >= width) {
  					break;
  				}
  				maximum = ++i;
  			}
  		} else {
  			throw 'Can not detect maximum absolute position.'
  		}
  
  		return maximum;
  	};
  
  	/**
  	 * Gets the minimum position for an item.
  	 * @public
  	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
  	 * @returns {Number}
  	 */
  	Owl.prototype.minimum = function(relative) {
  		if (relative) {
  			return 0;
  		}
  
  		return this._clones.length / 2;
  	};
  
  	/**
  	 * Gets an item at the specified relative position.
  	 * @public
  	 * @param {Number} [position] - The relative position of the item.
  	 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
  	 */
  	Owl.prototype.items = function(position) {
  		if (position === undefined) {
  			return this._items.slice();
  		}
  
  		position = this.normalize(position, true);
  		return this._items[position];
  	};
  
  	/**
  	 * Gets an item at the specified relative position.
  	 * @public
  	 * @param {Number} [position] - The relative position of the item.
  	 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
  	 */
  	Owl.prototype.mergers = function(position) {
  		if (position === undefined) {
  			return this._mergers.slice();
  		}
  
  		position = this.normalize(position, true);
  		return this._mergers[position];
  	};
  
  	/**
  	 * Gets the absolute positions of clones for an item.
  	 * @public
  	 * @param {Number} [position] - The relative position of the item.
  	 * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given.
  	 */
  	Owl.prototype.clones = function(position) {
  		var odd = this._clones.length / 2,
  			even = odd + this._items.length,
  			map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };
  
  		if (position === undefined) {
  			return $.map(this._clones, function(v, i) { return map(i) });
  		}
  
  		return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
  	};
  
  	/**
  	 * Sets the current animation speed.
  	 * @public
  	 * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
  	 * @returns {Number} - The current animation speed in milliseconds.
  	 */
  	Owl.prototype.speed = function(speed) {
  		if (speed !== undefined) {
  			this._speed = speed;
  		}
  
  		return this._speed;
  	};
  
  	/**
  	 * Gets the coordinate of an item.
  	 * @todo The name of this method is missleanding.
  	 * @public
  	 * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
  	 * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
  	 */
  	Owl.prototype.coordinates = function(position) {
  		var coordinate = null;
  
  		if (position === undefined) {
  			return $.map(this._coordinates, $.proxy(function(coordinate, index) {
  				return this.coordinates(index);
  			}, this));
  		}
  
  		if (this.settings.center) {
  			coordinate = this._coordinates[position];
  			coordinate += (this.width() - coordinate + (this._coordinates[position - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1);
  		} else {
  			coordinate = this._coordinates[position - 1] || 0;
  		}
  
  		return coordinate;
  	};
  
  	/**
  	 * Calculates the speed for a translation.
  	 * @protected
  	 * @param {Number} from - The absolute position of the start item.
  	 * @param {Number} to - The absolute position of the target item.
  	 * @param {Number} [factor=undefined] - The time factor in milliseconds.
  	 * @returns {Number} - The time in milliseconds for the translation.
  	 */
  	Owl.prototype.duration = function(from, to, factor) {
  		return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
  	};
  
  	/**
  	 * Slides to the specified item.
  	 * @public
  	 * @param {Number} position - The position of the item.
  	 * @param {Number} [speed] - The time in milliseconds for the transition.
  	 */
  	Owl.prototype.to = function(position, speed) {
  		if (this.settings.loop) {
  			var distance = position - this.relative(this.current()),
  				revert = this.current(),
  				before = this.current(),
  				after = this.current() + distance,
  				direction = before - after < 0 ? true : false,
  				items = this._clones.length + this._items.length;
  
  			if (after < this.settings.items && direction === false) {
  				revert = before + this._items.length;
  				this.reset(revert);
  			} else if (after >= items - this.settings.items && direction === true) {
  				revert = before - this._items.length;
  				this.reset(revert);
  			}
  			window.clearTimeout(this.e._goToLoop);
  			this.e._goToLoop = window.setTimeout($.proxy(function() {
  				this.speed(this.duration(this.current(), revert + distance, speed));
  				this.current(revert + distance);
  				this.update();
  			}, this), 30);
  		} else {
  			this.speed(this.duration(this.current(), position, speed));
  			this.current(position);
  			this.update();
  		}
  	};
  
  	/**
  	 * Slides to the next item.
  	 * @public
  	 * @param {Number} [speed] - The time in milliseconds for the transition.
  	 */
  	Owl.prototype.next = function(speed) {
  		speed = speed || false;
  		this.to(this.relative(this.current()) + 1, speed);
  	};
  
  	/**
  	 * Slides to the previous item.
  	 * @public
  	 * @param {Number} [speed] - The time in milliseconds for the transition.
  	 */
  	Owl.prototype.prev = function(speed) {
  		speed = speed || false;
  		this.to(this.relative(this.current()) - 1, speed);
  	};
  
  	/**
  	 * Handles the end of an animation.
  	 * @protected
  	 * @param {Event} event - The event arguments.
  	 */
  	Owl.prototype.transitionEnd = function(event) {
  
  		// if css2 animation then event object is undefined
  		if (event !== undefined) {
  			event.stopPropagation();
  
  			// Catch only owl-stage transitionEnd event
  			if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
  				return false;
  			}
  		}
  
  		this.state.inMotion = false;
  		this.trigger('translated');
  	};
  
  	/**
  	 * Gets viewport width.
  	 * @protected
  	 * @return {Number} - The width in pixel.
  	 */
  	Owl.prototype.viewport = function() {
  		var width;
  		if (this.options.responsiveBaseElement !== window) {
  			width = $(this.options.responsiveBaseElement).width();
  		} else if (window.innerWidth) {
  			width = window.innerWidth;
  		} else if (document.documentElement && document.documentElement.clientWidth) {
  			width = document.documentElement.clientWidth;
  		} else {
  			throw 'Can not detect viewport width.';
  		}
  		return width;
  	};
  
  	/**
  	 * Replaces the current content.
  	 * @public
  	 * @param {HTMLElement|jQuery|String} content - The new content.
  	 */
  	Owl.prototype.replace = function(content) {
  		this.$stage.empty();
  		this._items = [];
  
  		if (content) {
  			content = (content instanceof jQuery) ? content : $(content);
  		}
  
  		if (this.settings.nestedItemSelector) {
  			content = content.find('.' + this.settings.nestedItemSelector);
  		}
  
  		content.filter(function() {
  			return this.nodeType === 1;
  		}).each($.proxy(function(index, item) {
  			item = this.prepare(item);
  			this.$stage.append(item);
  			this._items.push(item);
  			this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
  		}, this));
  
  		this.reset($.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
  
  		this.invalidate('items');
  	};
  
  	/**
  	 * Adds an item.
  	 * @todo Use `item` instead of `content` for the event arguments.
  	 * @public
  	 * @param {HTMLElement|jQuery|String} content - The item content to add.
  	 * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
  	 */
  	Owl.prototype.add = function(content, position) {
  		position = position === undefined ? this._items.length : this.normalize(position, true);
  
  		this.trigger('add', { content: content, position: position });
  
  		if (this._items.length === 0 || position === this._items.length) {
  			this.$stage.append(content);
  			this._items.push(content);
  			this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
  		} else {
  			this._items[position].before(content);
  			this._items.splice(position, 0, content);
  			this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
  		}
  
  		this.invalidate('items');
  
  		this.trigger('added', { content: content, position: position });
  	};
  
  	/**
  	 * Removes an item by its position.
  	 * @todo Use `item` instead of `content` for the event arguments.
  	 * @public
  	 * @param {Number} position - The relative position of the item to remove.
  	 */
  	Owl.prototype.remove = function(position) {
  		position = this.normalize(position, true);
  
  		if (position === undefined) {
  			return;
  		}
  
  		this.trigger('remove', { content: this._items[position], position: position });
  
  		this._items[position].remove();
  		this._items.splice(position, 1);
  		this._mergers.splice(position, 1);
  
  		this.invalidate('items');
  
  		this.trigger('removed', { content: null, position: position });
  	};
  
  	/**
  	 * Adds triggerable events.
  	 * @protected
  	 */
  	Owl.prototype.addTriggerableEvents = function() {
  		var handler = $.proxy(function(callback, event) {
  			return $.proxy(function(e) {
  				if (e.relatedTarget !== this) {
  					this.suppress([ event ]);
  					callback.apply(this, [].slice.call(arguments, 1));
  					this.release([ event ]);
  				}
  			}, this);
  		}, this);
  
  		$.each({
  			'next': this.next,
  			'prev': this.prev,
  			'to': this.to,
  			'destroy': this.destroy,
  			'refresh': this.refresh,
  			'replace': this.replace,
  			'add': this.add,
  			'remove': this.remove
  		}, $.proxy(function(event, callback) {
  			this.$element.on(event + '.owl.carousel', handler(callback, event + '.owl.carousel'));
  		}, this));
  
  	};
  
  	/**
  	 * Watches the visibility of the carousel element.
  	 * @protected
  	 */
  	Owl.prototype.watchVisibility = function() {
  
  		// test on zepto
  		if (!isElVisible(this.$element.get(0))) {
  			this.$element.addClass('owl-hidden');
  			window.clearInterval(this.e._checkVisibile);
  			this.e._checkVisibile = window.setInterval($.proxy(checkVisible, this), 500);
  		}
  
  		function isElVisible(el) {
  			return el.offsetWidth > 0 && el.offsetHeight > 0;
  		}
  
  		function checkVisible() {
  			if (isElVisible(this.$element.get(0))) {
  				this.$element.removeClass('owl-hidden');
  				this.refresh();
  				window.clearInterval(this.e._checkVisibile);
  			}
  		}
  	};
  
  	/**
  	 * Preloads images with auto width.
  	 * @protected
  	 * @todo Still to test
  	 */
  	Owl.prototype.preloadAutoWidthImages = function(imgs) {
  		var loaded, that, $el, img;
  
  		loaded = 0;
  		that = this;
  		imgs.each(function(i, el) {
  			$el = $(el);
  			img = new Image();
  
  			img.onload = function() {
  				loaded++;
  				$el.attr('src', img.src);
  				$el.css('opacity', 1);
  				if (loaded >= imgs.length) {
  					that.state.imagesLoaded = true;
  					that.initialize();
  				}
  			};
  
  			img.src = $el.attr('src') || $el.attr('data-src') || $el.attr('data-src-retina');
  		});
  	};
  
  	/**
  	 * Destroys the carousel.
  	 * @public
  	 */
  	Owl.prototype.destroy = function() {
  
  		if (this.$element.hasClass(this.settings.themeClass)) {
  			this.$element.removeClass(this.settings.themeClass);
  		}
  
  		if (this.settings.responsive !== false) {
  			$(window).off('resize.owl.carousel');
  		}
  
  		if (this.transitionEndVendor) {
  			this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd);
  		}
  
  		for ( var i in this._plugins) {
  			this._plugins[i].destroy();
  		}
  
  		if (this.settings.mouseDrag || this.settings.touchDrag) {
  			this.$stage.off('mousedown touchstart touchcancel');
  			$(document).off('.owl.dragEvents');
  			this.$stage.get(0).onselectstart = function() {};
  			this.$stage.off('dragstart', function() { return false });
  		}
  
  		// remove event handlers in the ".owl.carousel" namespace
  		this.$element.off('.owl');
  
  		this.$stage.children('.cloned').remove();
  		this.e = null;
  		this.$element.removeData('owlCarousel');
  
  		this.$stage.children().contents().unwrap();
  		this.$stage.children().unwrap();
  		this.$stage.unwrap();
  	};
  
  	/**
  	 * Operators to calculate right-to-left and left-to-right.
  	 * @protected
  	 * @param {Number} [a] - The left side operand.
  	 * @param {String} [o] - The operator.
  	 * @param {Number} [b] - The right side operand.
  	 */
  	Owl.prototype.op = function(a, o, b) {
  		var rtl = this.settings.rtl;
  		switch (o) {
  			case '<':
  				return rtl ? a > b : a < b;
  			case '>':
  				return rtl ? a < b : a > b;
  			case '>=':
  				return rtl ? a <= b : a >= b;
  			case '<=':
  				return rtl ? a >= b : a <= b;
  			default:
  				break;
  		}
  	};
  
  	/**
  	 * Attaches to an internal event.
  	 * @protected
  	 * @param {HTMLElement} element - The event source.
  	 * @param {String} event - The event name.
  	 * @param {Function} listener - The event handler to attach.
  	 * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.
  	 */
  	Owl.prototype.on = function(element, event, listener, capture) {
  		if (element.addEventListener) {
  			element.addEventListener(event, listener, capture);
  		} else if (element.attachEvent) {
  			element.attachEvent('on' + event, listener);
  		}
  	};
  
  	/**
  	 * Detaches from an internal event.
  	 * @protected
  	 * @param {HTMLElement} element - The event source.
  	 * @param {String} event - The event name.
  	 * @param {Function} listener - The attached event handler to detach.
  	 * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.
  	 */
  	Owl.prototype.off = function(element, event, listener, capture) {
  		if (element.removeEventListener) {
  			element.removeEventListener(event, listener, capture);
  		} else if (element.detachEvent) {
  			element.detachEvent('on' + event, listener);
  		}
  	};
  
  	/**
  	 * Triggers an public event.
  	 * @protected
  	 * @param {String} name - The event name.
  	 * @param {*} [data=null] - The event data.
  	 * @param {String} [namespace=.owl.carousel] - The event namespace.
  	 * @returns {Event} - The event arguments.
  	 */
  	Owl.prototype.trigger = function(name, data, namespace) {
  		var status = {
  			item: { count: this._items.length, index: this.current() }
  		}, handler = $.camelCase(
  			$.grep([ 'on', name, namespace ], function(v) { return v })
  				.join('-').toLowerCase()
  		), event = $.Event(
  			[ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),
  			$.extend({ relatedTarget: this }, status, data)
  		);
  
  		if (!this._supress[name]) {
  			$.each(this._plugins, function(name, plugin) {
  				if (plugin.onTrigger) {
  					plugin.onTrigger(event);
  				}
  			});
  
  			this.$element.trigger(event);
  
  			if (this.settings && typeof this.settings[handler] === 'function') {
  				this.settings[handler].apply(this, event);
  			}
  		}
  
  		return event;
  	};
  
  	/**
  	 * Suppresses events.
  	 * @protected
  	 * @param {Array.<String>} events - The events to suppress.
  	 */
  	Owl.prototype.suppress = function(events) {
  		$.each(events, $.proxy(function(index, event) {
  			this._supress[event] = true;
  		}, this));
  	}
  
  	/**
  	 * Releases suppressed events.
  	 * @protected
  	 * @param {Array.<String>} events - The events to release.
  	 */
  	Owl.prototype.release = function(events) {
  		$.each(events, $.proxy(function(index, event) {
  			delete this._supress[event];
  		}, this));
  	}
  
  	/**
  	 * Checks the availability of some browser features.
  	 * @protected
  	 */
  	Owl.prototype.browserSupport = function() {
  		this.support3d = isPerspective();
  
  		if (this.support3d) {
  			this.transformVendor = isTransform();
  
  			// take transitionend event name by detecting transition
  			var endVendors = [ 'transitionend', 'webkitTransitionEnd', 'transitionend', 'oTransitionEnd' ];
  			this.transitionEndVendor = endVendors[isTransition()];
  
  			// take vendor name from transform name
  			this.vendorName = this.transformVendor.replace(/Transform/i, '');
  			this.vendorName = this.vendorName !== '' ? '-' + this.vendorName.toLowerCase() + '-' : '';
  		}
  
  		this.state.orientation = window.orientation;
  	};
  
  	/**
  	 * Get touch/drag coordinats.
  	 * @private
  	 * @param {event} - mousedown/touchstart event
  	 * @returns {object} - Contains X and Y of current mouse/touch position
  	 */
  
  	function getTouches(event) {
  		if (event.touches !== undefined) {
  			return {
  				x: event.touches[0].pageX,
  				y: event.touches[0].pageY
  			};
  		}
  
  		if (event.touches === undefined) {
  			if (event.pageX !== undefined) {
  				return {
  					x: event.pageX,
  					y: event.pageY
  				};
  			}
  
  		if (event.pageX === undefined) {
  			return {
  					x: event.clientX,
  					y: event.clientY
  				};
  			}
  		}
  	}
  
  	/**
  	 * Checks for CSS support.
  	 * @private
  	 * @param {Array} array - The CSS properties to check for.
  	 * @returns {Array} - Contains the supported CSS property name and its index or `false`.
  	 */
  	function isStyleSupported(array) {
  		var p, s, fake = document.createElement('div'), list = array;
  		for (p in list) {
  			s = list[p];
  			if (typeof fake.style[s] !== 'undefined') {
  				fake = null;
  				return [ s, p ];
  			}
  		}
  		return [ false ];
  	}
  
  	/**
  	 * Checks for CSS transition support.
  	 * @private
  	 * @todo Realy bad design
  	 * @returns {Number}
  	 */
  	function isTransition() {
  		return isStyleSupported([ 'transition', 'WebkitTransition', 'MozTransition', 'OTransition' ])[1];
  	}
  
  	/**
  	 * Checks for CSS transform support.
  	 * @private
  	 * @returns {String} The supported property name or false.
  	 */
  	function isTransform() {
  		return isStyleSupported([ 'transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ])[0];
  	}
  
  	/**
  	 * Checks for CSS perspective support.
  	 * @private
  	 * @returns {String} The supported property name or false.
  	 */
  	function isPerspective() {
  		return isStyleSupported([ 'perspective', 'webkitPerspective', 'MozPerspective', 'OPerspective', 'MsPerspective' ])[0];
  	}
  
  	/**
  	 * Checks wether touch is supported or not.
  	 * @private
  	 * @returns {Boolean}
  	 */
  	function isTouchSupport() {
  		return 'ontouchstart' in window || !!(navigator.msMaxTouchPoints);
  	}
  
  	/**
  	 * Checks wether touch is supported or not for IE.
  	 * @private
  	 * @returns {Boolean}
  	 */
  	function isTouchSupportIE() {
  		return window.navigator.msPointerEnabled;
  	}
  
  	/**
  	 * The jQuery Plugin for the Owl Carousel
  	 * @public
  	 */
  	$.fn.owlCarousel = function(options) {
  		return this.each(function() {
  			if (!$(this).data('owlCarousel')) {
  				$(this).data('owlCarousel', new Owl(this, options));
  			}
  		});
  	};
  
  	/**
  	 * The constructor for the jQuery Plugin
  	 * @public
  	 */
  	$.fn.owlCarousel.Constructor = Owl;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Lazy Plugin
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  
  	/**
  	 * Creates the lazy plugin.
  	 * @class The Lazy Plugin
  	 * @param {Owl} carousel - The Owl Carousel
  	 */
  	var Lazy = function(carousel) {
  
  		/**
  		 * Reference to the core.
  		 * @protected
  		 * @type {Owl}
  		 */
  		this._core = carousel;
  
  		/**
  		 * Already loaded items.
  		 * @protected
  		 * @type {Array.<jQuery>}
  		 */
  		this._loaded = [];
  
  		/**
  		 * Event handlers.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._handlers = {
  			'initialized.owl.carousel change.owl.carousel': $.proxy(function(e) {
  				if (!e.namespace) {
  					return;
  				}
  
  				if (!this._core.settings || !this._core.settings.lazyLoad) {
  					return;
  				}
  
  				if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
  					var settings = this._core.settings,
  						n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
  						i = ((settings.center && n * -1) || 0),
  						position = ((e.property && e.property.value) || this._core.current()) + i,
  						clones = this._core.clones().length,
  						load = $.proxy(function(i, v) { this.load(v) }, this);
  
  					while (i++ < n) {
  						this.load(clones / 2 + this._core.relative(position));
  						clones && $.each(this._core.clones(this._core.relative(position++)), load);
  					}
  				}
  			}, this)
  		};
  
  		// set the default options
  		this._core.options = $.extend({}, Lazy.Defaults, this._core.options);
  
  		// register event handler
  		this._core.$element.on(this._handlers);
  	}
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	Lazy.Defaults = {
  		lazyLoad: false
  	}
  
  	/**
  	 * Loads all resources of an item at the specified position.
  	 * @param {Number} position - The absolute position of the item.
  	 * @protected
  	 */
  	Lazy.prototype.load = function(position) {
  		var $item = this._core.$stage.children().eq(position),
  			$elements = $item && $item.find('.owl-lazy');
  
  		if (!$elements || $.inArray($item.get(0), this._loaded) > -1) {
  			return;
  		}
  
  		$elements.each($.proxy(function(index, element) {
  			var $element = $(element), image,
  				url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src');
  
  			this._core.trigger('load', { element: $element, url: url }, 'lazy');
  
  			if ($element.is('img')) {
  				$element.one('load.owl.lazy', $.proxy(function() {
  					$element.css('opacity', 1);
  					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
  				}, this)).attr('src', url);
  			} else {
  				image = new Image();
  				image.onload = $.proxy(function() {
  					$element.css({
  						'background-image': 'url(' + url + ')',
  						'opacity': '1'
  					});
  					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
  				}, this);
  				image.src = url;
  			}
  		}, this));
  
  		this._loaded.push($item.get(0));
  	}
  
  	/**
  	 * Destroys the plugin.
  	 * @public
  	 */
  	Lazy.prototype.destroy = function() {
  		var handler, property;
  
  		for (handler in this.handlers) {
  			this._core.$element.off(handler, this.handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	}
  
  	$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * AutoHeight Plugin
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  
  	/**
  	 * Creates the auto height plugin.
  	 * @class The Auto Height Plugin
  	 * @param {Owl} carousel - The Owl Carousel
  	 */
  	var AutoHeight = function(carousel) {
  		/**
  		 * Reference to the core.
  		 * @protected
  		 * @type {Owl}
  		 */
  		this._core = carousel;
  
  		/**
  		 * All event handlers.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._handlers = {
  			'initialized.owl.carousel': $.proxy(function() {
  				if (this._core.settings.autoHeight) {
  					this.update();
  				}
  			}, this),
  			'changed.owl.carousel': $.proxy(function(e) {
  				if (this._core.settings.autoHeight && e.property.name == 'position'){
  					this.update();
  				}
  			}, this),
  			'loaded.owl.lazy': $.proxy(function(e) {
  				if (this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass)
  					=== this._core.$stage.children().eq(this._core.current())) {
  					this.update();
  				}
  			}, this)
  		};
  
  		// set default options
  		this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
  
  		// register event handlers
  		this._core.$element.on(this._handlers);
  	};
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	AutoHeight.Defaults = {
  		autoHeight: false,
  		autoHeightClass: 'owl-height'
  	};
  
  	/**
  	 * Updates the view.
  	 */
  	AutoHeight.prototype.update = function() {
  		this._core.$stage.parent()
  			.height(this._core.$stage.children().eq(this._core.current()).height())
  			.addClass(this._core.settings.autoHeightClass);
  	};
  
  	AutoHeight.prototype.destroy = function() {
  		var handler, property;
  
  		for (handler in this._handlers) {
  			this._core.$element.off(handler, this._handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	};
  
  	$.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Video Plugin
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  
  	/**
  	 * Creates the video plugin.
  	 * @class The Video Plugin
  	 * @param {Owl} carousel - The Owl Carousel
  	 */
  	var Video = function(carousel) {
  		/**
  		 * Reference to the core.
  		 * @protected
  		 * @type {Owl}
  		 */
  		this._core = carousel;
  
  		/**
  		 * Cache all video URLs.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._videos = {};
  
  		/**
  		 * Current playing item.
  		 * @protected
  		 * @type {jQuery}
  		 */
  		this._playing = null;
  
  		/**
  		 * Whether this is in fullscreen or not.
  		 * @protected
  		 * @type {Boolean}
  		 */
  		this._fullscreen = false;
  
  		/**
  		 * All event handlers.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._handlers = {
  			'resize.owl.carousel': $.proxy(function(e) {
  				if (this._core.settings.video && !this.isInFullScreen()) {
  					e.preventDefault();
  				}
  			}, this),
  			'refresh.owl.carousel changed.owl.carousel': $.proxy(function(e) {
  				if (this._playing) {
  					this.stop();
  				}
  			}, this),
  			'prepared.owl.carousel': $.proxy(function(e) {
  				var $element = $(e.content).find('.owl-video');
  				if ($element.length) {
  					$element.css('display', 'none');
  					this.fetch($element, $(e.content));
  				}
  			}, this)
  		};
  
  		// set default options
  		this._core.options = $.extend({}, Video.Defaults, this._core.options);
  
  		// register event handlers
  		this._core.$element.on(this._handlers);
  
  		this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
  			this.play(e);
  		}, this));
  	};
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	Video.Defaults = {
  		video: false,
  		videoHeight: false,
  		videoWidth: false
  	};
  
  	/**
  	 * Gets the video ID and the type (YouTube/Vimeo only).
  	 * @protected
  	 * @param {jQuery} target - The target containing the video data.
  	 * @param {jQuery} item - The item containing the video.
  	 */
  	Video.prototype.fetch = function(target, item) {
  
  		var type = target.attr('data-vimeo-id') ? 'vimeo' : 'youtube',
  			id = target.attr('data-vimeo-id') || target.attr('data-youtube-id'),
  			width = target.attr('data-width') || this._core.settings.videoWidth,
  			height = target.attr('data-height') || this._core.settings.videoHeight,
  			url = target.attr('href');
  
  		if (url) {
  			id = url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
  
  			if (id[3].indexOf('youtu') > -1) {
  				type = 'youtube';
  			} else if (id[3].indexOf('vimeo') > -1) {
  				type = 'vimeo';
  			} else {
  				throw new Error('Video URL not supported.');
  			}
  			id = id[6];
  		} else {
  			throw new Error('Missing video URL.');
  		}
  
  		this._videos[url] = {
  			type: type,
  			id: id,
  			width: width,
  			height: height
  		};
  
  		item.attr('data-video', url);
  
  		this.thumbnail(target, this._videos[url]);
  	};
  
  	/**
  	 * Creates video thumbnail.
  	 * @protected
  	 * @param {jQuery} target - The target containing the video data.
  	 * @param {Object} info - The video info object.
  	 * @see `fetch`
  	 */
  	Video.prototype.thumbnail = function(target, video) {
  
  		var tnLink,
  			icon,
  			path,
  			dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '',
  			customTn = target.find('img'),
  			srcType = 'src',
  			lazyClass = '',
  			settings = this._core.settings,
  			create = function(path) {
  				icon = '<div class="owl-video-play-icon"></div>';
  
  				if (settings.lazyLoad) {
  					tnLink = '<div class="owl-video-tn ' + lazyClass + '" ' + srcType + '="' + path + '"></div>';
  				} else {
  					tnLink = '<div class="owl-video-tn" style="opacity:1;background-image:url(' + path + ')"></div>';
  				}
  				target.after(tnLink);
  				target.after(icon);
  			};
  
  		// wrap video content into owl-video-wrapper div
  		target.wrap('<div class="owl-video-wrapper"' + dimensions + '></div>');
  
  		if (this._core.settings.lazyLoad) {
  			srcType = 'data-src';
  			lazyClass = 'owl-lazy';
  		}
  
  		// custom thumbnail
  		if (customTn.length) {
  			create(customTn.attr(srcType));
  			customTn.remove();
  			return false;
  		}
  
  		if (video.type === 'youtube') {
  			path = "http://img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
  			create(path);
  		} else if (video.type === 'vimeo') {
  			$.ajax({
  				type: 'GET',
  				url: 'http://vimeo.com/api/v2/video/' + video.id + '.json',
  				jsonp: 'callback',
  				dataType: 'jsonp',
  				success: function(data) {
  					path = data[0].thumbnail_large;
  					create(path);
  				}
  			});
  		}
  	};
  
  	/**
  	 * Stops the current video.
  	 * @public
  	 */
  	Video.prototype.stop = function() {
  		this._core.trigger('stop', null, 'video');
  		this._playing.find('.owl-video-frame').remove();
  		this._playing.removeClass('owl-video-playing');
  		this._playing = null;
  	};
  
  	/**
  	 * Starts the current video.
  	 * @public
  	 * @param {Event} ev - The event arguments.
  	 */
  	Video.prototype.play = function(ev) {
  		this._core.trigger('play', null, 'video');
  
  		if (this._playing) {
  			this.stop();
  		}
  
  		var target = $(ev.target || ev.srcElement),
  			item = target.closest('.' + this._core.settings.itemClass),
  			video = this._videos[item.attr('data-video')],
  			width = video.width || '100%',
  			height = video.height || this._core.$stage.height(),
  			html, wrap;
  
  		if (video.type === 'youtube') {
  			html = '<iframe width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/'
  				+ video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
  		} else if (video.type === 'vimeo') {
  			html = '<iframe src="http://player.vimeo.com/video/' + video.id + '?autoplay=1" width="' + width
  				+ '" height="' + height
  				+ '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  		}
  
  		item.addClass('owl-video-playing');
  		this._playing = item;
  
  		wrap = $('<div style="height:' + height + 'px; width:' + width + 'px" class="owl-video-frame">'
  			+ html + '</div>');
  		target.after(wrap);
  	};
  
  	/**
  	 * Checks whether an video is currently in full screen mode or not.
  	 * @todo Bad style because looks like a readonly method but changes members.
  	 * @protected
  	 * @returns {Boolean}
  	 */
  	Video.prototype.isInFullScreen = function() {
  
  		// if Vimeo Fullscreen mode
  		var element = document.fullscreenElement || document.mozFullScreenElement
  			|| document.webkitFullscreenElement;
  
  		if (element && $(element).parent().hasClass('owl-video-frame')) {
  			this._core.speed(0);
  			this._fullscreen = true;
  		}
  
  		if (element && this._fullscreen && this._playing) {
  			return false;
  		}
  
  		// comming back from fullscreen
  		if (this._fullscreen) {
  			this._fullscreen = false;
  			return false;
  		}
  
  		// check full screen mode and window orientation
  		if (this._playing) {
  			if (this._core.state.orientation !== window.orientation) {
  				this._core.state.orientation = window.orientation;
  				return false;
  			}
  		}
  
  		return true;
  	};
  
  	/**
  	 * Destroys the plugin.
  	 */
  	Video.prototype.destroy = function() {
  		var handler, property;
  
  		this._core.$element.off('click.owl.video');
  
  		for (handler in this._handlers) {
  			this._core.$element.off(handler, this._handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	};
  
  	$.fn.owlCarousel.Constructor.Plugins.Video = Video;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Animate Plugin
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  
  	/**
  	 * Creates the animate plugin.
  	 * @class The Navigation Plugin
  	 * @param {Owl} scope - The Owl Carousel
  	 */
  	var Animate = function(scope) {
  		this.core = scope;
  		this.core.options = $.extend({}, Animate.Defaults, this.core.options);
  		this.swapping = true;
  		this.previous = undefined;
  		this.next = undefined;
  
  		this.handlers = {
  			'change.owl.carousel': $.proxy(function(e) {
  				if (e.property.name == 'position') {
  					this.previous = this.core.current();
  					this.next = e.property.value;
  				}
  			}, this),
  			'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
  				this.swapping = e.type == 'translated';
  			}, this),
  			'translate.owl.carousel': $.proxy(function(e) {
  				if (this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
  					this.swap();
  				}
  			}, this)
  		};
  
  		this.core.$element.on(this.handlers);
  	};
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	Animate.Defaults = {
  		animateOut: false,
  		animateIn: false
  	};
  
  	/**
  	 * Toggles the animation classes whenever an translations starts.
  	 * @protected
  	 * @returns {Boolean|undefined}
  	 */
  	Animate.prototype.swap = function() {
  
  		if (this.core.settings.items !== 1 || !this.core.support3d) {
  			return;
  		}
  
  		this.core.speed(0);
  
  		var left,
  			clear = $.proxy(this.clear, this),
  			previous = this.core.$stage.children().eq(this.previous),
  			next = this.core.$stage.children().eq(this.next),
  			incoming = this.core.settings.animateIn,
  			outgoing = this.core.settings.animateOut;
  
  		if (this.core.current() === this.previous) {
  			return;
  		}
  
  		if (outgoing) {
  			left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
  			previous.css( { 'left': left + 'px' } )
  				.addClass('animated owl-animated-out')
  				.addClass(outgoing)
  				.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
  		}
  
  		if (incoming) {
  			next.addClass('animated owl-animated-in')
  				.addClass(incoming)
  				.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
  		}
  	};
  
  	Animate.prototype.clear = function(e) {
  		$(e.target).css( { 'left': '' } )
  			.removeClass('animated owl-animated-out owl-animated-in')
  			.removeClass(this.core.settings.animateIn)
  			.removeClass(this.core.settings.animateOut);
  		this.core.transitionEnd();
  	}
  
  	/**
  	 * Destroys the plugin.
  	 * @public
  	 */
  	Animate.prototype.destroy = function() {
  		var handler, property;
  
  		for (handler in this.handlers) {
  			this.core.$element.off(handler, this.handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	};
  
  	$.fn.owlCarousel.Constructor.Plugins.Animate = Animate;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Autoplay Plugin
   * @version 2.0.0
   * @author Bartosz Wojciechowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  
  	/**
  	 * Creates the autoplay plugin.
  	 * @class The Autoplay Plugin
  	 * @param {Owl} scope - The Owl Carousel
  	 */
  	var Autoplay = function(scope) {
  		this.core = scope;
  		this.core.options = $.extend({}, Autoplay.Defaults, this.core.options);
  
  		this.handlers = {
  			'translated.owl.carousel refreshed.owl.carousel': $.proxy(function() {
  				this.autoplay();
  			}, this),
  			'play.owl.autoplay': $.proxy(function(e, t, s) {
  				this.play(t, s);
  			}, this),
  			'stop.owl.autoplay': $.proxy(function() {
  				this.stop();
  			}, this),
  			'mouseover.owl.autoplay': $.proxy(function() {
  				if (this.core.settings.autoplayHoverPause) {
  					this.pause();
  				}
  			}, this),
  			'mouseleave.owl.autoplay': $.proxy(function() {
  				if (this.core.settings.autoplayHoverPause) {
  					this.autoplay();
  				}
  			}, this)
  		};
  
  		this.core.$element.on(this.handlers);
  	};
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	Autoplay.Defaults = {
  		autoplay: false,
  		autoplayTimeout: 5000,
  		autoplayHoverPause: false,
  		autoplaySpeed: false
  	};
  
  	/**
  	 * @protected
  	 * @todo Must be documented.
  	 */
  	Autoplay.prototype.autoplay = function() {
  		if (this.core.settings.autoplay && !this.core.state.videoPlay) {
  			window.clearInterval(this.interval);
  
  			this.interval = window.setInterval($.proxy(function() {
  				this.play();
  			}, this), this.core.settings.autoplayTimeout);
  		} else {
  			window.clearInterval(this.interval);
  		}
  	};
  
  	/**
  	 * Starts the autoplay.
  	 * @public
  	 * @param {Number} [timeout] - ...
  	 * @param {Number} [speed] - ...
  	 * @returns {Boolean|undefined} - ...
  	 * @todo Must be documented.
  	 */
  	Autoplay.prototype.play = function(timeout, speed) {
  		// if tab is inactive - doesnt work in <IE10
  		if (document.hidden === true) {
  			return;
  		}
  
  		if (this.core.state.isTouch || this.core.state.isScrolling
  			|| this.core.state.isSwiping || this.core.state.inMotion) {
  			return;
  		}
  
  		if (this.core.settings.autoplay === false) {
  			window.clearInterval(this.interval);
  			return;
  		}
  
  		this.core.next(this.core.settings.autoplaySpeed);
  	};
  
  	/**
  	 * Stops the autoplay.
  	 * @public
  	 */
  	Autoplay.prototype.stop = function() {
  		window.clearInterval(this.interval);
  	};
  
  	/**
  	 * Pauses the autoplay.
  	 * @public
  	 */
  	Autoplay.prototype.pause = function() {
  		window.clearInterval(this.interval);
  	};
  
  	/**
  	 * Destroys the plugin.
  	 */
  	Autoplay.prototype.destroy = function() {
  		var handler, property;
  
  		window.clearInterval(this.interval);
  
  		for (handler in this.handlers) {
  			this.core.$element.off(handler, this.handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	};
  
  	$.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Navigation Plugin
   * @version 2.0.0
   * @author Artus Kolanowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  	'use strict';
  
  	/**
  	 * Creates the navigation plugin.
  	 * @class The Navigation Plugin
  	 * @param {Owl} carousel - The Owl Carousel.
  	 */
  	var Navigation = function(carousel) {
  		/**
  		 * Reference to the core.
  		 * @protected
  		 * @type {Owl}
  		 */
  		this._core = carousel;
  
  		/**
  		 * Indicates whether the plugin is initialized or not.
  		 * @protected
  		 * @type {Boolean}
  		 */
  		this._initialized = false;
  
  		/**
  		 * The current paging indexes.
  		 * @protected
  		 * @type {Array}
  		 */
  		this._pages = [];
  
  		/**
  		 * All DOM elements of the user interface.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._controls = {};
  
  		/**
  		 * Markup for an indicator.
  		 * @protected
  		 * @type {Array.<String>}
  		 */
  		this._templates = [];
  
  		/**
  		 * The carousel element.
  		 * @type {jQuery}
  		 */
  		this.$element = this._core.$element;
  
  		/**
  		 * Overridden methods of the carousel.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._overrides = {
  			next: this._core.next,
  			prev: this._core.prev,
  			to: this._core.to
  		};
  
  		/**
  		 * All event handlers.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._handlers = {
  			'prepared.owl.carousel': $.proxy(function(e) {
  				if (this._core.settings.dotsData) {
  					this._templates.push($(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
  				}
  			}, this),
  			'add.owl.carousel': $.proxy(function(e) {
  				if (this._core.settings.dotsData) {
  					this._templates.splice(e.position, 0, $(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
  				}
  			}, this),
  			'remove.owl.carousel prepared.owl.carousel': $.proxy(function(e) {
  				if (this._core.settings.dotsData) {
  					this._templates.splice(e.position, 1);
  				}
  			}, this),
  			'change.owl.carousel': $.proxy(function(e) {
  				if (e.property.name == 'position') {
  					if (!this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) {
  						var current = this._core.current(),
  							maximum = this._core.maximum(),
  							minimum = this._core.minimum();
  						e.data = e.property.value > maximum
  							? current >= maximum ? minimum : maximum
  							: e.property.value < minimum ? maximum : e.property.value;
  					}
  				}
  			}, this),
  			'changed.owl.carousel': $.proxy(function(e) {
  				if (e.property.name == 'position') {
  					this.draw();
  				}
  			}, this),
  			'refreshed.owl.carousel': $.proxy(function() {
  				if (!this._initialized) {
  					this.initialize();
  					this._initialized = true;
  				}
  				this._core.trigger('refresh', null, 'navigation');
  				this.update();
  				this.draw();
  				this._core.trigger('refreshed', null, 'navigation');
  			}, this)
  		};
  
  		// set default options
  		this._core.options = $.extend({}, Navigation.Defaults, this._core.options);
  
  		// register event handlers
  		this.$element.on(this._handlers);
  	}
  
  	/**
  	 * Default options.
  	 * @public
  	 * @todo Rename `slideBy` to `navBy`
  	 */
  	Navigation.Defaults = {
  		nav: false,
  		navRewind: true,
  		navText: [ 'prev', 'next' ],
  		navSpeed: false,
  		navElement: 'div',
  		navContainer: false,
  		navContainerClass: 'owl-nav',
  		navClass: [ 'owl-prev', 'owl-next' ],
  		slideBy: 1,
  		dotClass: 'owl-dot',
  		dotsClass: 'owl-dots',
  		dots: true,
  		dotsEach: false,
  		dotData: false,
  		dotsSpeed: false,
  		dotsContainer: false,
  		controlsClass: 'owl-controls'
  	}
  
  	/**
  	 * Initializes the layout of the plugin and extends the carousel.
  	 * @protected
  	 */
  	Navigation.prototype.initialize = function() {
  		var $container, override,
  			options = this._core.settings;
  
  		// create the indicator template
  		if (!options.dotsData) {
  			this._templates = [ $('<div>')
  				.addClass(options.dotClass)
  				.append($('<span>'))
  				.prop('outerHTML') ];
  		}
  
  		// create controls container if needed
  		if (!options.navContainer || !options.dotsContainer) {
  			this._controls.$container = $('<div>')
  				.addClass(options.controlsClass)
  				.appendTo(this.$element);
  		}
  
  		// create DOM structure for absolute navigation
  		this._controls.$indicators = options.dotsContainer ? $(options.dotsContainer)
  			: $('<div>').hide().addClass(options.dotsClass).appendTo(this._controls.$container);
  
  		this._controls.$indicators.on('click', 'div', $.proxy(function(e) {
  			var index = $(e.target).parent().is(this._controls.$indicators)
  				? $(e.target).index() : $(e.target).parent().index();
  
  			e.preventDefault();
  
  			this.to(index, options.dotsSpeed);
  		}, this));
  
  		// create DOM structure for relative navigation
  		$container = options.navContainer ? $(options.navContainer)
  			: $('<div>').addClass(options.navContainerClass).prependTo(this._controls.$container);
  
  		this._controls.$next = $('<' + options.navElement + '>');
  		this._controls.$previous = this._controls.$next.clone();
  
  		this._controls.$previous
  			.addClass(options.navClass[0])
  			.html(options.navText[0])
  			.hide()
  			.prependTo($container)
  			.on('click', $.proxy(function(e) {
  				this.prev(options.navSpeed);
  			}, this));
  		this._controls.$next
  			.addClass(options.navClass[1])
  			.html(options.navText[1])
  			.hide()
  			.appendTo($container)
  			.on('click', $.proxy(function(e) {
  				this.next(options.navSpeed);
  			}, this));
  
  		// override public methods of the carousel
  		for (override in this._overrides) {
  			this._core[override] = $.proxy(this[override], this);
  		}
  	}
  
  	/**
  	 * Destroys the plugin.
  	 * @protected
  	 */
  	Navigation.prototype.destroy = function() {
  		var handler, control, property, override;
  
  		for (handler in this._handlers) {
  			this.$element.off(handler, this._handlers[handler]);
  		}
  		for (control in this._controls) {
  			this._controls[control].remove();
  		}
  		for (override in this.overides) {
  			this._core[override] = this._overrides[override];
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	}
  
  	/**
  	 * Updates the internal state.
  	 * @protected
  	 */
  	Navigation.prototype.update = function() {
  		var i, j, k,
  			options = this._core.settings,
  			lower = this._core.clones().length / 2,
  			upper = lower + this._core.items().length,
  			size = options.center || options.autoWidth || options.dotData
  				? 1 : options.dotsEach || options.items;
  
  		if (options.slideBy !== 'page') {
  			options.slideBy = Math.min(options.slideBy, options.items);
  		}
  
  		if (options.dots || options.slideBy == 'page') {
  			this._pages = [];
  
  			for (i = lower, j = 0, k = 0; i < upper; i++) {
  				if (j >= size || j === 0) {
  					this._pages.push({
  						start: i - lower,
  						end: i - lower + size - 1
  					});
  					j = 0, ++k;
  				}
  				j += this._core.mergers(this._core.relative(i));
  			}
  		}
  	}
  
  	/**
  	 * Draws the user interface.
  	 * @todo The option `dotData` wont work.
  	 * @protected
  	 */
  	Navigation.prototype.draw = function() {
  		var difference, i, html = '',
  			options = this._core.settings,
  			$items = this._core.$stage.children(),
  			index = this._core.relative(this._core.current());
  
  		if (options.nav && !options.loop && !options.navRewind) {
  			this._controls.$previous.toggleClass('disabled', index <= 0);
  			this._controls.$next.toggleClass('disabled', index >= this._core.maximum());
  		}
  
  		this._controls.$previous.toggle(options.nav);
  		this._controls.$next.toggle(options.nav);
  
  		if (options.dots) {
  			difference = this._pages.length - this._controls.$indicators.children().length;
  
  			if (options.dotData && difference !== 0) {
  				for (i = 0; i < this._controls.$indicators.children().length; i++) {
  					html += this._templates[this._core.relative(i)];
  				}
  				this._controls.$indicators.html(html);
  			} else if (difference > 0) {
  				html = new Array(difference + 1).join(this._templates[0]);
  				this._controls.$indicators.append(html);
  			} else if (difference < 0) {
  				this._controls.$indicators.children().slice(difference).remove();
  			}
  
  			this._controls.$indicators.find('.active').removeClass('active');
  			this._controls.$indicators.children().eq($.inArray(this.current(), this._pages)).addClass('active');
  		}
  
  		this._controls.$indicators.toggle(options.dots);
  	}
  
  	/**
  	 * Extends event data.
  	 * @protected
  	 * @param {Event} event - The event object which gets thrown.
  	 */
  	Navigation.prototype.onTrigger = function(event) {
  		var settings = this._core.settings;
  
  		event.page = {
  			index: $.inArray(this.current(), this._pages),
  			count: this._pages.length,
  			size: settings && (settings.center || settings.autoWidth || settings.dotData
  				? 1 : settings.dotsEach || settings.items)
  		};
  	}
  
  	/**
  	 * Gets the current page position of the carousel.
  	 * @protected
  	 * @returns {Number}
  	 */
  	Navigation.prototype.current = function() {
  		var index = this._core.relative(this._core.current());
  		return $.grep(this._pages, function(o) {
  			return o.start <= index && o.end >= index;
  		}).pop();
  	}
  
  	/**
  	 * Gets the current succesor/predecessor position.
  	 * @protected
  	 * @returns {Number}
  	 */
  	Navigation.prototype.getPosition = function(successor) {
  		var position, length,
  			options = this._core.settings;
  
  		if (options.slideBy == 'page') {
  			position = $.inArray(this.current(), this._pages);
  			length = this._pages.length;
  			successor ? ++position : --position;
  			position = this._pages[((position % length) + length) % length].start;
  		} else {
  			position = this._core.relative(this._core.current());
  			length = this._core.items().length;
  			successor ? position += options.slideBy : position -= options.slideBy;
  		}
  		return position;
  	}
  
  	/**
  	 * Slides to the next item or page.
  	 * @public
  	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
  	 */
  	Navigation.prototype.next = function(speed) {
  		$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
  	}
  
  	/**
  	 * Slides to the previous item or page.
  	 * @public
  	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
  	 */
  	Navigation.prototype.prev = function(speed) {
  		$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
  	}
  
  	/**
  	 * Slides to the specified item or page.
  	 * @public
  	 * @param {Number} position - The position of the item or page.
  	 * @param {Number} [speed] - The time in milliseconds for the transition.
  	 * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not.
  	 */
  	Navigation.prototype.to = function(position, speed, standard) {
  		var length;
  
  		if (!standard) {
  			length = this._pages.length;
  			$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
  		} else {
  			$.proxy(this._overrides.to, this._core)(position, speed);
  		}
  	}
  
  	$.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
  
  })(window.Zepto || window.jQuery, window, document);
  
  /**
   * Hash Plugin
   * @version 2.0.0
   * @author Artus Kolanowski
   * @license The MIT License (MIT)
   */
  ;(function($, window, document, undefined) {
  	'use strict';
  
  	/**
  	 * Creates the hash plugin.
  	 * @class The Hash Plugin
  	 * @param {Owl} carousel - The Owl Carousel
  	 */
  	var Hash = function(carousel) {
  		/**
  		 * Reference to the core.
  		 * @protected
  		 * @type {Owl}
  		 */
  		this._core = carousel;
  
  		/**
  		 * Hash table for the hashes.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._hashes = {};
  
  		/**
  		 * The carousel element.
  		 * @type {jQuery}
  		 */
  		this.$element = this._core.$element;
  
  		/**
  		 * All event handlers.
  		 * @protected
  		 * @type {Object}
  		 */
  		this._handlers = {
  			'initialized.owl.carousel': $.proxy(function() {
  				if (this._core.settings.startPosition == 'URLHash') {
  					$(window).trigger('hashchange.owl.navigation');
  				}
  			}, this),
  			'prepared.owl.carousel': $.proxy(function(e) {
  				var hash = $(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');
  				this._hashes[hash] = e.content;
  			}, this)
  		};
  
  		// set default options
  		this._core.options = $.extend({}, Hash.Defaults, this._core.options);
  
  		// register the event handlers
  		this.$element.on(this._handlers);
  
  		// register event listener for hash navigation
  		$(window).on('hashchange.owl.navigation', $.proxy(function() {
  			var hash = window.location.hash.substring(1),
  				items = this._core.$stage.children(),
  				position = this._hashes[hash] && items.index(this._hashes[hash]) || 0;
  
  			if (!hash) {
  				return false;
  			}
  
  			this._core.to(position, false, true);
  		}, this));
  	}
  
  	/**
  	 * Default options.
  	 * @public
  	 */
  	Hash.Defaults = {
  		URLhashListener: false
  	}
  
  	/**
  	 * Destroys the plugin.
  	 * @public
  	 */
  	Hash.prototype.destroy = function() {
  		var handler, property;
  
  		$(window).off('hashchange.owl.navigation');
  
  		for (handler in this._handlers) {
  			this._core.$element.off(handler, this._handlers[handler]);
  		}
  		for (property in Object.getOwnPropertyNames(this)) {
  			typeof this[property] != 'function' && (this[property] = null);
  		}
  	}
  
  	$.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
  
  })(window.Zepto || window.jQuery, window, document);
  
  
  
  
  /*
   * jQuery appear plugin
   *
   * Copyright (c) 2012 Andrey Sidorov
   * licensed under MIT license.
   *
   * https://github.com/morr/jquery.appear/
   *
   * Version: 0.3.3
   */
  (function($) {
    var selectors = [];
  
    var check_binded = false;
    var check_lock = false;
    var defaults = {
      interval: 250,
      force_process: false
    }
    var $window = $(window);
  
    var $prior_appeared;
  
    function process() {
      check_lock = false;
      for (var index = 0; index < selectors.length; index++) {
        var $appeared = $(selectors[index]).filter(function() {
          return $(this).is(':appeared');
        });
  
        $appeared.trigger('appear', [$appeared]);
  
        if ($prior_appeared) {
          var $disappeared = $prior_appeared.not($appeared);
          $disappeared.trigger('disappear', [$disappeared]);
        }
        $prior_appeared = $appeared;
      }
    }
  
    // "appeared" custom filter
    $.expr[':']['appeared'] = function(element) {
      var $element = $(element);
      if (!$element.is(':visible')) {
        return false;
      }
  
      var window_left = $window.scrollLeft();
      var window_top = $window.scrollTop();
      var offset = $element.offset();
      var left = offset.left;
      var top = offset.top;
  
      if (top + $element.height() >= window_top &&
          top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() &&
          left + $element.width() >= window_left &&
          left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) {
        return true;
      } else {
        return false;
      }
    }
  
    $.fn.extend({
      // watching for element's appearance in browser viewport
      appear: function(options) {
        var opts = $.extend({}, defaults, options || {});
        var selector = this.selector || this;
        if (!check_binded) {
          var on_check = function() {
            if (check_lock) {
              return;
            }
            check_lock = true;
  
            setTimeout(process, opts.interval);
          };
  
          $(window).scroll(on_check).resize(on_check);
          check_binded = true;
        }
  
        if (opts.force_process) {
          setTimeout(process, opts.interval);
        }
        selectors.push(selector);
        return $(selector);
      }
    });
  
    $.extend({
      // force elements's appearance check
      force_appear: function() {
        if (check_binded) {
          process();
          return true;
        };
        return false;
      }
    });
  })(jQuery);
  
  var isMobile = false;
  
  (function( $ ) {
      "use strict";
       
      $(function() {
  
          /* --- MOBILE DETECT --- */
  		if (navigator.userAgent.match(/Android/i) || 
  			navigator.userAgent.match(/webOS/i) ||
  			navigator.userAgent.match(/iPhone/i) || 
  			navigator.userAgent.match(/iPad/i)|| 
  			navigator.userAgent.match(/iPod/i) || 
  			navigator.userAgent.match(/BlackBerry/i)) {                 
  			isMobile = true;            
  		}
  
  
          /* --- ADD NECESSARY CLASS --- */
  		if (isMobile == true) {
  			$('.animated').removeClass('animated');
  			
  			
  		}       
  
          /* --- ANIMATE CONTENT --- */
  		if (isMobile == false) {
  			$('*[data-animated]').addClass('animated');
  		}
  		
  
  		function animated_contents() {
  			$(".animated:appeared").each(function (i) {
  				var $this    = $(this),
  					animated = $(this).data('animated');
  
  				setTimeout(function () {
  					$this.addClass(animated);
  				}, 100 * i);
  			
  			});
  		}
  		
  		animated_contents();
  		
  		$(window).scroll(function () {
  			animated_contents();
  		}); 
  			            
      });
   
  }(jQuery));
  
  
  /*jQuery Waypoints - v2.0.2
  Copyright (c) 2011-2013 Caleb Troughton
  Dual licensed under the MIT license and GPL license.
  https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
  */
  (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
  
  
  /* =============== SmoothScroll =============== */
  // SmoothScroll v0.9.9
  // Licensed under the terms of the MIT license.
  
  // People involved
  // - Balazs Galambosi: maintainer (CHANGELOG.txt)
  // - Patrick Brunner (patrickb1991@gmail.com)
  // - Michael Herf: ssc_pulse Algorithm
  
  function ssc_init() {
  
  	'use strict';
  
      if (!document.body) return;
      var e = document.body;
      var t = document.documentElement;
      var n = window.innerHeight;
      var r = e.scrollHeight;
      ssc_root = document.compatMode.indexOf("CSS") >= 0 ? t : e;
      ssc_activeElement = e;
      ssc_initdone = true;
      if (top != self) {
          ssc_frame = true
      } else if (r > n && (e.offsetHeight <= n || t.offsetHeight <= n)) {
          ssc_root.style.height = "auto";
          if (ssc_root.offsetHeight <= n) {
              var i = document.createElement("div");
              i.style.clear = "both";
              e.appendChild(i)
          }
      }
      if (!ssc_fixedback) {
          e.style.backgroundAttachment = "scroll";
          t.style.backgroundAttachment = "scroll"
      }
      if (ssc_keyboardsupport) {
          ssc_addEvent("keydown", ssc_keydown)
      }
  }
  
  function ssc_scrollArray(e, t, n, r) {
      r || (r = 1e3);
      ssc_directionCheck(t, n);
      ssc_que.push({
          x: t,
          y: n,
          lastX: t < 0 ? .99 : -.99,
          lastY: n < 0 ? .99 : -.99,
          start: +(new Date)
      });
      if (ssc_pending) {
          return
      }
      var i = function () {
          var s = +(new Date);
          var o = 0;
          var u = 0;
          for (var a = 0; a < ssc_que.length; a++) {
              var f = ssc_que[a];
              var l = s - f.start;
              var c = l >= ssc_animtime;
              var h = c ? 1 : l / ssc_animtime;
              if (ssc_pulseAlgorithm) {
                  h = ssc_pulse(h)
              }
              var p = f.x * h - f.lastX >> 0;
              var d = f.y * h - f.lastY >> 0;
              o += p;
              u += d;
              f.lastX += p;
              f.lastY += d;
              if (c) {
                  ssc_que.splice(a, 1);
                  a--
              }
          }
          if (t) {
              var v = e.scrollLeft;
              e.scrollLeft += o;
              if (o && e.scrollLeft === v) {
                  t = 0
              }
          }
          if (n) {
              var m = e.scrollTop;
              e.scrollTop += u;
              if (u && e.scrollTop === m) {
                  n = 0
              }
          }
          if (!t && !n) {
              ssc_que = []
          }
          if (ssc_que.length) {
              setTimeout(i, r / ssc_framerate + 1)
          } else {
              ssc_pending = false
          }
      };
      setTimeout(i, 0);
      ssc_pending = true
  }
  
  function ssc_wheel(e) {
      if (!ssc_initdone) {
          ssc_init()
      }
      var t = e.target;
      var n = ssc_overflowingAncestor(t);
      if (!n || e.defaultPrevented || ssc_isNodeName(ssc_activeElement, "embed") || ssc_isNodeName(t, "embed") && /\.pdf/i.test(t.src)) {
          return true
      }
      var r = e.wheelDeltaX || 0;
      var i = e.wheelDeltaY || 0;
      if (!r && !i) {
          i = e.wheelDelta || 0
      }
      if (Math.abs(r) > 1.2) {
          r *= ssc_stepsize / 120
      }
      if (Math.abs(i) > 1.2) {
          i *= ssc_stepsize / 120
      }
      ssc_scrollArray(n, -r, -i);
      e.preventDefault()
  }
  
  function ssc_keydown(e) {
      var t = e.target;
      var n = e.ctrlKey || e.altKey || e.metaKey;
      if (/input|textarea|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) {
          return true
      }
      if (ssc_isNodeName(t, "button") && e.keyCode === ssc_key.spacebar) {
          return true
      }
      var r, i = 0,
          s = 0;
      var o = ssc_overflowingAncestor(ssc_activeElement);
      var u = o.clientHeight;
      if (o == document.body) {
          u = window.innerHeight
      }
      switch (e.keyCode) {
      case ssc_key.up:
          s = -ssc_arrowscroll;
          break;
      case ssc_key.down:
          s = ssc_arrowscroll;
          break;
      case ssc_key.spacebar:
          r = e.shiftKey ? 1 : -1;
          s = -r * u * .9;
          break;
      case ssc_key.pageup:
          s = -u * .9;
          break;
      case ssc_key.pagedown:
          s = u * .9;
          break;
      case ssc_key.home:
          s = -o.scrollTop;
          break;
      case ssc_key.end:
          var a = o.scrollHeight - o.scrollTop - u;
          s = a > 0 ? a + 10 : 0;
          break;
      case ssc_key.left:
          i = -ssc_arrowscroll;
          break;
      case ssc_key.right:
          i = ssc_arrowscroll;
          break;
      default:
          return true
      }
      ssc_scrollArray(o, i, s);
      e.preventDefault()
  }
  
  function ssc_mousedown(e) {
      ssc_activeElement = e.target
  }
  
  function ssc_setCache(e, t) {
      for (var n = e.length; n--;) ssc_cache[ssc_uniqueID(e[n])] = t;
      return t
  }
  
  function ssc_overflowingAncestor(e) {
      var t = [];
      var n = ssc_root.scrollHeight;
      do {
          var r = ssc_cache[ssc_uniqueID(e)];
          if (r) {
              return ssc_setCache(t, r)
          }
          t.push(e);
          if (n === e.scrollHeight) {
              if (!ssc_frame || ssc_root.clientHeight + 10 < n) {
                  return ssc_setCache(t, document.body)
              }
          } else if (e.clientHeight + 10 < e.scrollHeight) {
              overflow = getComputedStyle(e, "").getPropertyValue("overflow");
              if (overflow === "scroll" || overflow === "auto") {
                  return ssc_setCache(t, e)
              }
          }
      } while (e = e.parentNode)
  }
  
  function ssc_addEvent(e, t, n) {
      window.addEventListener(e, t, n || false)
  }
  
  function ssc_removeEvent(e, t, n) {
      window.removeEventListener(e, t, n || false)
  }
  
  function ssc_isNodeName(e, t) {
      return e.nodeName.toLowerCase() === t.toLowerCase()
  }
  
  function ssc_directionCheck(e, t) {
      e = e > 0 ? 1 : -1;
      t = t > 0 ? 1 : -1;
      if (ssc_direction.x !== e || ssc_direction.y !== t) {
          ssc_direction.x = e;
          ssc_direction.y = t;
          ssc_que = []
      }
  }
  
  function ssc_pulse_(e) {
      var t, n, r;
      e = e * ssc_pulseScale;
      if (e < 1) {
          t = e - (1 - Math.exp(-e))
      } else {
          n = Math.exp(-1);
          e -= 1;
          r = 1 - Math.exp(-e);
          t = n + r * (1 - n)
      }
      return t * ssc_pulseNormalize
  }
  
  function ssc_pulse(e) {
      if (e >= 1) return 1;
      if (e <= 0) return 0;
      if (ssc_pulseNormalize == 1) {
          ssc_pulseNormalize /= ssc_pulse_(1)
      }
      return ssc_pulse_(e)
  }
  
  var ssc_framerate = 150;
  var ssc_animtime = 500;
  var ssc_stepsize = 150;
  var ssc_pulseAlgorithm = true;
  var ssc_pulseScale = 6;
  var ssc_pulseNormalize = 1;
  var ssc_keyboardsupport = true;
  var ssc_arrowscroll = 50;
  var ssc_frame = false;
  var ssc_direction = {
      x: 0,
      y: 0
  };
  
  var ssc_initdone = false;
  var ssc_fixedback = true;
  var ssc_root = document.documentElement;
  var ssc_activeElement;
  var ssc_key = {
      left: 37,
      up: 38,
      right: 39,
      down: 40,
      spacebar: 32,
      pageup: 33,
      pagedown: 34,
      end: 35,
      home: 36
  };
  
  var ssc_que = [];
  var ssc_pending = false;
  var ssc_cache = {};
  
  setInterval(function () {
      ssc_cache = {}
  }, 10 * 1e3);
  
  var ssc_uniqueID = function () {
      var e = 0;
      return function (t) {
          return t.ssc_uniqueID || (t.ssc_uniqueID = e++)
      }
  }();
  
  var ischrome = /chrome/.test(navigator.userAgent.toLowerCase());
  
  if (ischrome) {
      ssc_addEvent("mousedown", ssc_mousedown);
      ssc_addEvent("mousewheel", ssc_wheel);
      ssc_addEvent("load", ssc_init)
  }
  
  
  /********tabs***********/
  (function($) {
  	$(function() {
  	"use strict";
  		$('ul.tabs').on('click', 'li:not(.current, .link)', function() {
  			$(this).addClass('current').siblings().removeClass('current')
  			.parents('div.section').find('div.tab_box').eq($(this).index()).fadeIn(450).siblings('div.tab_box').hide();
  		});
  		
  		var tabIndex = window.location.hash.replace('#tab','')-1;
  		if (tabIndex != -1) $('ul.tabs li').eq(tabIndex).click();
  	
  		$('a[href*=#tab]').click(function() {
  			var tabIndex = $(this).attr('href').replace(/(.*)#tab/, '')-1;
  			$('ul.tabs li').eq(tabIndex).click();
  		});
  	
  	})
  })(jQuery)