init blog

This commit is contained in:
dengtongyu committed 2018-05-08 11:22:54 +08:00
1 parent 5acc46db8e
commit 843783ce9a
1820 files changed
+539344

No files matched your search

+453
View File
@@ -0,0 +1,453 @@
/**
* Base JavaScript
*
* @link https://www.bgbk.org
*/
( function( $, document, window, args ){
//显示 JS 模块
$( 'html' ).removeClass( 'no-js' );
//判断移动端
function is_mobile(){
return $( '#mobile-header' ).css( 'display' ) == 'block';
}
//初始化幻灯片
function slider_init(){
$( '[data-owl-carousel]' ).each( function(){
var $this = $( this );
$this.owlCarousel( $this.data( 'owl-carousel' ) );
} );
}
$( slider_init );
/**
* 镜像防火墙
*/
( function() {
if ( !args.imageFirewall )
return;
if ( args.imageFirewall === window.location.hostname )
return;
var parser = $( '<a />' ).attr( 'href', window.location.href )[0];
parser.hostname = args.imageFirewall;
window.location.href = parser.href;
} )();
//推荐搜索
$( document ).on( 'submit', '.search-form', function(){
var $text = $( this ).find( '.search-text' ),
recommend = $text.data( 'recommend-search' );
if ( !$text.val() && recommend )
$text.val( recommend );
} );
//显示文章标签
$( document ).on( 'click', '#post-box .post-meta-box .post-meta > .tags', function(){
$( this ).children( '.tags-list' ).toggle();
} );
$( document ).on( 'click', '#post-box .post-meta-box .post-meta > .tags .tags-list', function( e ){
e.stopPropagation();
} );
//快捷键提交评论
$( document ).keypress( function( e ){
var btn = $( '#respond #submit' );
if( e.ctrlKey && e.which == 13 || e.which == 10 ){
btn.click();
document.body.focus();
return;
}
if( e.shiftKey && e.which == 13 || e.which == 10 ) btn.click();
} );
//评论表情框
$( document ).on( 'click', '#commentform .comment-form-smiley .button', function( e ){
e.stopPropagation();
$( this ).next( '.smiley-box' ).html( args.insert_smiley ).slideToggle();
} );
$( document ).on( 'click', function(){
$( '#commentform .comment-form-smiley .smiley-box' ).slideUp();
} );
$( document ).on( 'click', '#commentform .comment-form-smiley .smiley-box', function( e ){
if( !is_mobile() ) e.stopPropagation();
} )
//评论框插入表情
$( document ).on( 'click', '#commentform .comment-form-smiley .smiley-box > a', function(){
var textarea = document.getElementById( 'comment' ),
content = ' ' + $( this ).data( 'smiley' ) + ' ';
if( !textarea || textarea.type != 'textarea' ) return;
if( document.selection ){
textarea.focus();
var sel = document.selection.createRange();
sel.text = content;
textarea.focus();
}else if( textarea.selectionStart || textarea.selectionStart == '0' ){
var selectionEnd = textarea.selectionEnd;
textarea.value = textarea.value.substring( 0, textarea.selectionStart ) + content + textarea.value.substring( selectionEnd, textarea.value.length );
selectionEnd += content.length;
textarea.focus();
textarea.selectionStart = selectionEnd;
textarea.selectionEnd = selectionEnd;
} else {
textarea.value += content;
textarea.focus();
}
} );
//AJAX 提交评论
$( document ).on( 'submit', '#commentform', function(){
if( !args.ajax_comment ) return true;
var form = $( this ),
respond = $( '#respond' ),
respond_parent = respond.parent(),
respond_parent_tag_name = respond_parent.get( 0 ).tagName,
comment_parent_element = null,
submit = form.find( '#submit' ),
submit_text = submit.val(),
submit_count_wait = 15,
comments_number = form.parents( '#comments' ).find( '.comments-number' ),
submit_count = function(){
if( submit_count_wait > 0 ){
submit.val( submit_count_wait );
--submit_count_wait;
setTimeout( submit_count, 1000 );
return;
}
submit.attr( 'disabled', false );
submit.val( submit_text ).fadeTo( 'slow', 1 );
};
$.ajax( {
url: args.admin_ajax,
data: form.serialize() + '&action=submit_comment',
type: form.attr( 'method' ),
beforeSend: function(){
submit.attr( 'disabled', true );
submit.val( args.comment_loading ).fadeTo( 'slow', 0.5 );
},
error: function( request ){
submit.val( request.responseText );
setTimeout( function(){
submit.attr( 'disabled', false );
submit.val( submit_text ).fadeTo( 'slow', 1 ).fadeTo( 'slow', 1 );
}, 3000 );
},
success: function( data ){
form.find( '#comment' ).val( '' );
if( comments_number.length ){
var number = parseInt( comments_number.text() );
comments_number.text( number + 1 );
}
if( respond_parent_tag_name == 'DIV' ) comment_parent_element = respond_parent.children( '.comments-list' );
else{
if( !respond_parent.children( 'ul.children' ).length ) respond.before( '<ul class="children"></ul>' );
comment_parent_element = respond_parent.children( 'ul.children' );
}
comment_parent_element.append( data );
var comment_element = comment_parent_element.children( 'li:last' );
comment_element.hide();
comment_element.fadeIn( 4000 );
$( 'html, body' ).animate( { scrollTop: comment_element.offset().top }, 900 );
submit_count();
}
} );
return false;
} );
//相关文章刷新
$( document ).on( 'click', '.related-posts-box .refresh[data-post-id]:not(.activate)', function(){
var refresh = $( this ),
posts_list = refresh.parents( '.related-posts-box' ).find( '.related-posts' );
$.ajax( {
url: args.admin_ajax,
type: 'GET',
data: {
action: 'related_posts_refresh',
post_id: refresh.data( 'post-id' )
},
beforeSend: function(){
refresh.addClass( 'activate' );
posts_list.fadeTo( 500, 0.3 );
},
complete: function(){
refresh.removeClass( 'activate' );
posts_list.fadeTo( 500, 1 );
},
success: function( data ){
posts_list.html( data );
}
} );
} );
//文章页 tab 菜单
$( document ).on( 'click', '#mobile-tab-menu > li:not(.disable)', function(){
$( this ).parent( 'ul' ).children( 'li' ).removeClass( 'current' );
$( this ).addClass( 'current' );
var current = $( this ).data( 'tab' ),
articles = {
context: '.context',
related: '.related-posts-box',
comments: '#comments'
};
$.each( articles, function( article, selector ){
article == current ? $( selector ).removeClass( 'mobile-hide' ) : $( selector ).addClass( 'mobile-hide' );
} );
} );
//移动版搜索框蒙版
$( document ).on( 'focus', '#mobile-header .mobile-title .search-form .search-text', function(){
$( '.search-mobile-mask' ).fadeIn();
} );
$( document ).on( 'blur', '#mobile-header .mobile-title .search-form .search-text', function(){
$( '.search-mobile-mask' ).fadeOut();
} );
//返回顶部
$( window ).scroll( function(){
var element = $( '#return-top' );
$( window ).scrollTop() > 150 && !is_mobile() ? element.fadeIn() : element.fadeOut();
} );
$( document ).on( 'click', '#return-top', function(){
$( 'html, body' ).animate( { scrollTop: 0 }, 300 );
return false;
} );
//AJAX 加载页面
( function(){
if( !args.ajax_load_page || !history.pushState ) return true;
var start_push = true,
ajax_obj = null,
menu = null,
load_posts_list = false;
//AJAX 加载链接
$( document ).on( 'click', 'a:not([data-no-ajax], .comment-reply-link, #cancel-comment-reply-link)', function(){
var url = $( this ).attr( 'href' ),
site_url = args.site_url,
target = $( this ).attr( 'target' );
if(
( target && target != '_self' ) ||
this.pathname.indexOf( '/wp-admin' ) !== -1 ||
this.pathname.indexOf( '/wp-login.php' ) !== -1 ||
this.pathname.indexOf( '/feed' ) !== -1 ||
this.search.indexOf( '?feed=' ) !== -1 ||
this.search.indexOf( '&feed=' ) !== -1 ||
this.pathname.indexOf( '.js' ) !== -1 ||
this.pathname.indexOf( '.css' ) !== -1 ||
this.pathname.indexOf( '.bmp' ) !== -1 ||
this.pathname.indexOf( '.pcx' ) !== -1 ||
this.pathname.indexOf( '.png' ) !== -1 ||
this.pathname.indexOf( '.jpg' ) !== -1 ||
this.pathname.indexOf( '.gif' ) !== -1 ||
this.pathname.indexOf( '.tiff' ) !== -1 ||
this.pathname.indexOf( '.zip' ) !== -1 ||
this.pathname.indexOf( '.rar' ) !== -1 ||
this.pathname.indexOf( '.psd' ) !== -1 ||
this.hostname != document.domain
) return true;
ajax_load_page( url );
return false;
} );
//AJAX 刷新
$( document ).on( 'click', '#header .control > li.refresh > a', function(){
ajax_load_page( location.href );
return false;
} );
//AJAX 搜索
$( document ).on( 'submit', '.search-form', function(){
var action = $( this ).attr( 'action' ),
a_element = document.createElement( 'a' );
a_element.href = action;
ajax_load_page( action + ( a_element.search ? '&' : '?' ) + $( this ).serialize() );
return false;
} );
//修改菜单高亮
$( document ).on( 'click', '.menu li a', function(){
menu = $( this );
} );
//修改移动菜单高亮
$( document ).on( 'click', '#mobile-menu > li > a', function(){
set_mobile_menu_current( $( this ).parent( 'li' ).data( 'name' ) );
} );
//解码转义 HTML
function html_decode( value ){
return $( '<p />' ).html( value ).text();
}
//AJAX 加载页面
function ajax_load_page( url ){
if( ajax_obj ) ajax_obj.abort();
ajax_obj = $.ajax( {
url: url,
type: 'GET',
data: 'ajax_load=page',
dataType: 'json',
beforeSend: function(){
progress( 'start' );
progress( 'inc' );
$( '#container' ).fadeTo( 500, 0.3 );
},
complete: function(){
ajax_obj = null;
},
error: function( request ){
switch( request.statusText ){
case 'abort':
progress( 'done' );
break;
case 'OK':
window.location.href = url;
break;
default:
alert( request.statusText );
$( '#container' ).fadeTo( 500, 1, function(){
progress( 'done' );
} );
progress( 'inc' );
break;
}
},
success: function( data ){
if( start_push ){
history.pushState( get_state(), document.title, location.href );
start_push = false;
}
$( 'html, body' ).animate( { scrollTop: 0 }, 120 );
$( '.menu li.menu-item' ).removeClass( 'current-menu-item current-menu-parent current_page_item current-post-ancestor' );
if( menu ){
menu.parent( 'li.menu-item' ).addClass( 'current-menu-item' ).parents( 'li.menu-item' ).addClass( 'current-menu-parent' );
menu = null;
}
document.title = html_decode( data.title );
$( '#container' ).replaceWith( data.code );
$( '#container' ).fadeTo( 0, 0.3 ).fadeTo( 500, 1, function(){
progress( 'done' );
} );
$( 'body' ).attr( 'class', data.body_class );
slider_init();
if( data.refresh_sidebar ) $( '#sidebar' ).replaceWith( data.sidebar_code );
if( data.mobile_menu_current ) set_mobile_menu_current( data.mobile_menu_current );
$( '#mobile-header .mobile-title' ).html( data.mobile_title );
data.mobile_return_show ? $( '#mobile-header .mobile-return' ).addClass( 'show' ) : $( '#mobile-header .mobile-return' ).removeClass( 'show' );
// 兼容 SyntaxHighlighter 插件
if ( window.SyntaxHighlighter )
SyntaxHighlighter.highlight();
// 兼容 Crayon Syntax Highlighter 插件
if ( window.CrayonSyntax )
CrayonSyntax.init();
// 兼容 Hermit 音乐播放器
if ( window.hermitjs )
hermitjs.reload( 0 );
history.pushState( get_state(), data.title, url );
goto_hash_element();
progress( 'inc' );
}
} );
}
//浏览器前进后退
window.addEventListener( 'popstate', function( e ){
if( !e.state ) return;
document.title = e.state.title;
$( '#container' ).replaceWith( e.state.code );
$( '#sidebar' ).replaceWith( e.state.sidebar_code );
$( 'body' ).attr( 'class', e.state.body_class );
set_mobile_menu_current( e.state.mobile_menu_current );
$( '#mobile-header .mobile-title' ).html( e.state.mobile_title );
e.state.mobile_return_show ? $( '#mobile-header .mobile-return' ).addClass( 'show' ) : $( '#mobile-header .mobile-return' ).removeClass( 'show' );
});
//调用进度条
function progress( cb ){
if( args.progress ){
var func = NProgress[cb];
return func();
}
return false;
}
//获取网页内容
function get_state(){
return {
title: document.title,
code: $( '#container' ).clone().fadeTo( 0, 1 ).prop( 'outerHTML' ),
body_class: $( 'body' ).attr( 'class' ),
sidebar_code: $( '#sidebar' ).prop( 'outerHTML' ),
mobile_menu_current: $( '#mobile-menu > li.current' ).data( 'name' ),
mobile_title: $( '#mobile-header .mobile-title' ).html(),
mobile_return_show: $( '#mobile-header .mobile-return' ).hasClass( 'show' )
};
}
//锚点跳转
function goto_hash_element(){
setTimeout( function(){
var hash_element = $( location.hash );
if( hash_element.length ) $( 'html, body' ).animate( { scrollTop: hash_element.offset().top }, 120 );
}, 500 );
}
//设置移动菜单高亮
function set_mobile_menu_current( current ){
$( '#mobile-menu > li' ).removeClass( 'current' ).filter( '.' + current ).addClass( 'current' );
}
//下拉加载文章
$( window ).scroll( function(){
if( $( this ).scrollTop() < $( document ).height() - $( this ).height() - 10 || !is_mobile() || ajax_obj ) return;
var page_navi = $( '.posts-list-mobile-page-navi' ),
next_link = page_navi.data( 'next-link' );
if( !next_link ) return;
ajax_obj = $.ajax( {
url: next_link,
type: 'GET',
data: 'ajax_load=page',
dataType: 'json',
beforeSend: function(){
$( '.posts-list-mobile-page-navi' ).addClass( 'loading' );
},
complete: function(){
ajax_obj = null;
load_posts_list = false;
$( '.posts-list-mobile-page-navi' ).removeClass( 'loading' );
},
error: function( request ){
if( request.statusText != 'abort' ) alert( request.statusText );
},
success: function( data ){
document.title = html_decode( data.title );
var element = $( data.code );
$( 'body' ).attr( 'class', data.body_class );
element.find( '.posts-list > li' ).appendTo( '.posts-list' );
element.find( '.posts-list-mobile-page-navi' ).replaceAll( '.posts-list-mobile-page-navi' );
$( '.posts-list-page-navi' ).remove();
}
} );
} );
} )();
} )( jQuery, document, window, theme_base_args );
+8
View File
@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
+2
View File
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1,3 @@
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
(function(f,h){"function"===typeof define&&define.amd?define(h):"object"===typeof exports?module.exports=h():f.NProgress=h()})(this,function(){function f(a,b,d){return a<b?b:a>d?d:a}function h(a,b,d){a="translate3d"===e.positionUsing?{transform:"translate3d("+100*(-1+a)+"%,0,0)"}:"translate"===e.positionUsing?{transform:"translate("+100*(-1+a)+"%,0)"}:{"margin-left":100*(-1+a)+"%"};a.transition="all "+b+"ms "+d;return a}function p(a,b){return 0<=("string"==typeof a?a:m(a)).indexOf(" "+b+" ")}function q(a,b){var d=m(a),c=d+b;p(d,b)||(a.className=c.substring(1))}function r(a,b){var d=m(a);p(a,b)&&(d=d.replace(" "+b+" "," "),a.className=d.substring(1,d.length-1))}function m(a){return(" "+(a.className||"")+" ").replace(/\s+/gi," ")}var c={version:"0.2.0"},e=c.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};c.configure=function(a){var b,d;for(b in a)d=a[b],void 0!==d&&a.hasOwnProperty(b)&&(e[b]=d);return this};c.status=null;c.set=function(a){var b=c.isStarted();a=f(a,e.minimum,1);c.status=1===a?null:a;var d=c.render(!b),n=d.querySelector(e.barSelector),k=e.speed,v=e.easing;d.offsetWidth;w(function(b){""===e.positionUsing&&(e.positionUsing=c.getPositioningCSS());l(n,h(a,k,v));1===a?(l(d,{transition:"none",opacity:1}),d.offsetWidth,setTimeout(function(){l(d,{transition:"all "+k+"ms linear",opacity:0});setTimeout(function(){c.remove();b()},k)},k)):setTimeout(b,k)});return this};c.isStarted=function(){return"number"===typeof c.status};c.start=function(){c.status||c.set(0);var a=function(){setTimeout(function(){c.status&&(c.trickle(),a())},e.trickleSpeed)};e.trickle&&a();return this};c.done=function(a){return a||c.status?c.inc(.3+.5*Math.random()).set(1):this};c.inc=function(a){var b=c.status;return b?("number"!==typeof a&&(a=(1-b)*f(Math.random()*b,.1,.95)),b=f(b+a,0,.994),c.set(b)):c.start()};c.trickle=function(){return c.inc(Math.random()*e.trickleRate)};(function(){var a=0,b=0;c.promise=function(d){if(!d||"resolved"===d.state())return this;0===b&&c.start();a++;b++;d.always(function(){b--;0===b?(a=0,c.done()):c.set((a-b)/a)});return this}})();c.render=function(a){if(c.isRendered())return document.getElementById("nprogress");q(document.documentElement,"nprogress-busy");var b=document.createElement("div");b.id="nprogress";b.innerHTML=e.template;var d=b.querySelector(e.barSelector),n=a?"-100":100*(-1+(c.status||0));a=document.querySelector(e.parent);l(d,{transition:"all 0 linear",transform:"translate3d("+n+"%,0,0)"});e.showSpinner||(d=b.querySelector(e.spinnerSelector))&&d&&d.parentNode&&d.parentNode.removeChild(d);a!=document.body&&q(a,"nprogress-custom-parent");a.appendChild(b);return b};c.remove=function(){r(document.documentElement,"nprogress-busy");r(document.querySelector(e.parent),"nprogress-custom-parent");var a=document.getElementById("nprogress");a&&a&&a.parentNode&&a.parentNode.removeChild(a)};c.isRendered=function(){return!!document.getElementById("nprogress")};c.getPositioningCSS=function(){var a=document.body.style,b="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return b+"Perspective"in a?"translate3d":b+"Transform"in a?"translate":"margin"};var w=function(){function a(){var d=b.shift();d&&d(a)}var b=[];return function(d){b.push(d);1==b.length&&a()}}(),l=function(){function a(a){return a.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,b){return b.toUpperCase()})}function b(b){b=a(b);var e;if(!(e=c[b])){e=b;a:{var t=document.body.style;if(!(b in t))for(var u=d.length,f=b.charAt(0).toUpperCase()+b.slice(1),g;u--;)if(g=d[u]+f,g in t){b=g;break a}}e=c[e]=b}return e}var d=["Webkit","O","Moz","ms"],c={};return function(a,d){var c=arguments,e,f;if(2==c.length)for(e in d){if(f=d[e],void 0!==f&&d.hasOwnProperty(e)){var c=a,g=e,g=b(g);c.style[g]=f}}else e=a,g=c[1],c=c[2],g=b(g),e.style[g]=c}}();return c});
+2
View File
@@ -0,0 +1,2 @@
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.Line truncated
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(d,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._interval=b.setInterval(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout))},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearInterval(this._interval),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.miniLine truncated