forked from Git/hugo-story
155 lines
114 KiB
JavaScript
155 lines
114 KiB
JavaScript
|
/*!jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license*/!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|s
|
||
|
'class="link depth-'+indent+'"'+
|
||
|
((typeof target!=='undefined'&&target!='')?' target="'+target+'"':'')+
|
||
|
((typeof href!=='undefined'&&href!='')?' href="'+href+'"':'')+
|
||
|
'>'+
|
||
|
'<span class="indent-'+indent+'"></span>'+
|
||
|
$this.text()+
|
||
|
'</a>');});return b.join('');};$.fn.panel=function(userConfig){if(this.length==0)
|
||
|
return $this;if(this.length>1){for(var i=0;i<this.length;i++)
|
||
|
$(this[i]).panel(userConfig);return $this;}
|
||
|
var $this=$(this),$body=$('body'),$window=$(window),id=$this.attr('id'),config;config=$.extend({delay:0,hideOnClick:false,hideOnEscape:false,hideOnSwipe:false,resetScroll:false,resetForms:false,side:null,target:$this,visibleClass:'visible'},userConfig);if(typeof config.target!='jQuery')
|
||
|
config.target=$(config.target);$this._hide=function(event){if(!config.target.hasClass(config.visibleClass))
|
||
|
return;if(event){event.preventDefault();event.stopPropagation();}
|
||
|
config.target.removeClass(config.visibleClass);window.setTimeout(function(){if(config.resetScroll)
|
||
|
$this.scrollTop(0);if(config.resetForms)
|
||
|
$this.find('form').each(function(){this.reset();});},config.delay);};$this.css('-ms-overflow-style','-ms-autohiding-scrollbar').css('-webkit-overflow-scrolling','touch');if(config.hideOnClick){$this.find('a').css('-webkit-tap-highlight-color','rgba(0,0,0,0)');$this.on('click','a',function(event){var $a=$(this),href=$a.attr('href'),target=$a.attr('target');if(!href||href=='#'||href==''||href=='#'+id)
|
||
|
return;event.preventDefault();event.stopPropagation();$this._hide();window.setTimeout(function(){if(target=='_blank')
|
||
|
window.open(href);else
|
||
|
window.location.href=href;},config.delay+10);});}
|
||
|
$this.on('touchstart',function(event){$this.touchPosX=event.originalEvent.touches[0].pageX;$this.touchPosY=event.originalEvent.touches[0].pageY;})
|
||
|
$this.on('touchmove',function(event){if($this.touchPosX===null||$this.touchPosY===null)
|
||
|
return;var diffX=$this.touchPosX-event.originalEvent.touches[0].pageX,diffY=$this.touchPosY-event.originalEvent.touches[0].pageY,th=$this.outerHeight(),ts=($this.get(0).scrollHeight-$this.scrollTop());if(config.hideOnSwipe){var result=false,boundary=20,delta=50;switch(config.side){case 'left':result=(diffY<boundary&&diffY>(-1*boundary))&&(diffX>delta);break;case 'right':result=(diffY<boundary&&diffY>(-1*boundary))&&(diffX<(-1*delta));break;case 'top':result=(diffX<boundary&&diffX>(-1*boundary))&&(diffY>delta);break;case 'bottom':result=(diffX<boundary&&diffX>(-1*boundary))&&(diffY<(-1*delta));break;default:break;}
|
||
|
if(result){$this.touchPosX=null;$this.touchPosY=null;$this._hide();return false;}}
|
||
|
if(($this.scrollTop()<0&&diffY<0)||(ts>(th-2)&&ts<(th+2)&&diffY>0)){event.preventDefault();event.stopPropagation();}});$this.on('click touchend touchstart touchmove',function(event){event.stopPropagation();});$this.on('click','a[href="#'+id+'"]',function(event){event.preventDefault();event.stopPropagation();config.target.removeClass(config.visibleClass);});$body.on('click touchend',function(event){$this._hide(event);});$body.on('click','a[href="#'+id+'"]',function(event){event.preventDefault();event.stopPropagation();config.target.toggleClass(config.visibleClass);});if(config.hideOnEscape)
|
||
|
$window.on('keydown',function(event){if(event.keyCode==27)
|
||
|
$this._hide(event);});return $this;};$.fn.placeholder=function(){if(typeof(document.createElement('input')).placeholder!='undefined')
|
||
|
return $(this);if(this.length==0)
|
||
|
return $this;if(this.length>1){for(var i=0;i<this.length;i++)
|
||
|
$(this[i]).placeholder();return $this;}
|
||
|
var $this=$(this);$this.find('input[type=text],textarea').each(function(){var i=$(this);if(i.val()==''||i.val()==i.attr('placeholder'))
|
||
|
i.addClass('polyfill-placeholder').val(i.attr('placeholder'));}).on('blur',function(){var i=$(this);if(i.attr('name').match(/-polyfill-field$/))
|
||
|
return;if(i.val()=='')
|
||
|
i.addClass('polyfill-placeholder').val(i.attr('placeholder'));}).on('focus',function(){var i=$(this);if(i.attr('name').match(/-polyfill-field$/))
|
||
|
return;if(i.val()==i.attr('placeholder'))
|
||
|
i.removeClass('polyfill-placeholder').val('');});$this.find('input[type=password]').each(function(){var i=$(this);var x=$($('<div>').append(i.clone()).remove().html().replace(/type="password"/i,'type="text"').replace(/type=password/i,'type=text'));if(i.attr('id')!='')
|
||
|
x.attr('id',i.attr('id')+'-polyfill-field');if(i.attr('name')!='')
|
||
|
x.attr('name',i.attr('name')+'-polyfill-field');x.addClass('polyfill-placeholder').val(x.attr('placeholder')).insertAfter(i);if(i.val()=='')
|
||
|
i.hide();else
|
||
|
x.hide();i.on('blur',function(event){event.preventDefault();var x=i.parent().find('input[name='+i.attr('name')+'-polyfill-field]');if(i.val()==''){i.hide();x.show();}});x.on('focus',function(event){event.preventDefault();var i=x.parent().find('input[name='+x.attr('name').replace('-polyfill-field','')+']');x.hide();i.show().focus();}).on('keypress',function(event){event.preventDefault();x.val('');});});$this.on('submit',function(){$this.find('input[type=text],input[type=password],textarea').each(function(event){var i=$(this);if(i.attr('name').match(/-polyfill-field$/))
|
||
|
i.attr('name','');if(i.val()==i.attr('placeholder')){i.removeClass('polyfill-placeholder');i.val('');}});}).on('reset',function(event){event.preventDefault();$this.find('select').val($('option:first').val());$this.find('input,textarea').each(function(){var i=$(this),x;i.removeClass('polyfill-placeholder');switch(this.type){case 'submit':case 'reset':break;case 'password':i.val(i.attr('defaultValue'));x=i.parent().find('input[name='+i.attr('name')+'-polyfill-field]');if(i.val()==''){i.hide();x.show();}
|
||
|
else{i.show();x.hide();}
|
||
|
break;case 'checkbox':case 'radio':i.attr('checked',i.attr('defaultValue'));break;case 'text':case 'textarea':i.val(i.attr('defaultValue'));if(i.val()==''){i.addClass('polyfill-placeholder');i.val(i.attr('placeholder'));}
|
||
|
break;default:i.val(i.attr('defaultValue'));break;}});});return $this;};$.prioritize=function($elements,condition){var key='__prioritize';if(typeof $elements!='jQuery')
|
||
|
$elements=$($elements);$elements.each(function(){var $e=$(this),$p,$parent=$e.parent();if($parent.length==0)
|
||
|
return;if(!$e.data(key)){if(!condition)
|
||
|
return;$p=$e.prev();if($p.length==0)
|
||
|
return;$e.prependTo($parent);$e.data(key,$p);}
|
||
|
else{if(condition)
|
||
|
return;$p=$e.data(key);$e.insertAfter($p);$e.removeData(key);}});};})(jQuery);;(function($){var $window=$(window),$body=$('body'),$wrapper=$('#wrapper');breakpoints({xlarge:['1281px','1680px'],large:['981px','1280px'],medium:['737px','980px'],small:['481px','736px'],xsmall:['361px','480px'],xxsmall:[null,'360px']});$window.on('load',function(){window.setTimeout(function(){$body.removeClass('is-preload');},100);});if(browser.name=='ie')
|
||
|
(function(){var flexboxFixTimeoutId;$window.on('resize.flexbox-fix',function(){var $x=$('.fullscreen');clearTimeout(flexboxFixTimeoutId);flexboxFixTimeoutId=setTimeout(function(){if($x.prop('scrollHeight')>$window.height())
|
||
|
$x.css('height','auto');else
|
||
|
$x.css('height','100vh');},250);}).triggerHandler('resize.flexbox-fix');})();if(!browser.canUse('object-fit'))
|
||
|
(function(){$('.banner .image, .spotlight .image').each(function(){var $this=$(this),$img=$this.children('img'),positionClass=$this.parent().attr('class').match(/image-position-([a-z]+)/);$this.css('background-image','url("'+$img.attr('src')+'")').css('background-repeat','no-repeat').css('background-size','cover');switch(positionClass.length>1?positionClass[1]:''){case 'left':$this.css('background-position','left');break;case 'right':$this.css('background-position','right');break;default:case 'center':$this.css('background-position','center');break;}
|
||
|
$img.css('opacity','0');});})();$('.smooth-scroll').scrolly();$('.smooth-scroll-middle').scrolly({anchor:'middle'});$wrapper.children().scrollex({top:'30vh',bottom:'30vh',initialize:function(){$(this).addClass('is-inactive');},terminate:function(){$(this).removeClass('is-inactive');},enter:function(){$(this).removeClass('is-inactive');},leave:function(){var $this=$(this);if($this.hasClass('onscroll-bidirectional'))
|
||
|
$this.addClass('is-inactive');}});$('.items').scrollex({top:'30vh',bottom:'30vh',delay:50,initialize:function(){$(this).addClass('is-inactive');},terminate:function(){$(this).removeClass('is-inactive');},enter:function(){$(this).removeClass('is-inactive');},leave:function(){var $this=$(this);if($this.hasClass('onscroll-bidirectional'))
|
||
|
$this.addClass('is-inactive');}}).children().wrapInner('<div class="inner"></div>');$('.gallery').wrapInner('<div class="inner"></div>').prepend(browser.mobile?'':'<div class="forward"></div><div class="backward"></div>').scrollex({top:'30vh',bottom:'30vh',delay:50,initialize:function(){$(this).addClass('is-inactive');},terminate:function(){$(this).removeClass('is-inactive');},enter:function(){$(this).removeClass('is-inactive');},leave:function(){var $this=$(this);if($this.hasClass('onscroll-bidirectional'))
|
||
|
$this.addClass('is-inactive');}}).children('.inner').css('overflow-y',browser.mobile?'visible':'hidden').css('overflow-x',browser.mobile?'scroll':'hidden').scrollLeft(0);$('.gallery').on('wheel','.inner',function(event){var $this=$(this),delta=(event.originalEvent.deltaX*10);if(delta>0)
|
||
|
delta=Math.min(25,delta);else if(delta<0)
|
||
|
delta=Math.max(-25,delta);$this.scrollLeft($this.scrollLeft()+delta);}).on('mouseenter','.forward, .backward',function(event){var $this=$(this),$inner=$this.siblings('.inner'),direction=($this.hasClass('forward')?1:-1);clearInterval(this._gallery_moveIntervalId);this._gallery_moveIntervalId=setInterval(function(){$inner.scrollLeft($inner.scrollLeft()+(5*direction));},10);}).on('mouseleave','.forward, .backward',function(event){clearInterval(this._gallery_moveIntervalId);});$('.gallery.lightbox').on('click','a',function(event){var $a=$(this),$gallery=$a.parents('.gallery'),$modal=$gallery.children('.modal'),$modalImg=$modal.find('img'),href=$a.attr('href');if(!href.match(/\.(jpg|gif|png|mp4)$/))
|
||
|
return;event.preventDefault();event.stopPropagation();if($modal[0]._locked)
|
||
|
return;$modal[0]._locked=true;$modalImg.attr('src',href);$modal.addClass('visible');$modal.focus();setTimeout(function(){$modal[0]._locked=false;},600);}).on('click','.modal',function(event){var $modal=$(this),$modalImg=$modal.find('img');if($modal[0]._locked)
|
||
|
return;if(!$modal.hasClass('visible'))
|
||
|
return;$modal[0]._locked=true;$modal.removeClass('loaded')
|
||
|
setTimeout(function(){$modal.removeClass('visible')
|
||
|
setTimeout(function(){$modalImg.attr('src','');$modal[0]._locked=false;$body.focus();},475);},125);}).on('keypress','.modal',function(event){var $modal=$(this);if(event.keyCode==27)
|
||
|
$modal.trigger('click');}).prepend('<div class="modal" tabIndex="-1"><div class="inner"><img src="" /></div></div>').find('img').on('load',function(event){var $modalImg=$(this),$modal=$modalImg.parents('.modal');setTimeout(function(){if(!$modal.hasClass('visible'))
|
||
|
return;$modal.addClass('loaded');},275);});})(jQuery);;(function($){var $window=$(window);$('<style>'+
|
||
|
'.demo-animate-all:not(.gallery), .demo-animate-all:not(.gallery) *, .demo-animate-all:not(.gallery) *:before, .demo-animate-all:not(.gallery) *:after { transition: all 0.5s ease-in-out; }'+
|
||
|
'.demo-controls .property .classes { display: none; }'+
|
||
|
'.demo-controls .property[data-requires] { display: none; }'+
|
||
|
'.demo-controls .property[data-requires].active { display: inline; }'+
|
||
|
'.demo-controls .property .tooltip { position: relative; }'+
|
||
|
'.demo-controls .property .tooltip:before { content: \'Click to change!\'; font-size: 0.7rem; position: absolute; bottom: 100%; left: 0; background: #47D3E5; color: #ffffff; line-height: 1; white-space: nowrap; font-weight: bold; border-radius: 0.125rem; padding: 0.325rem 0.425rem; animation: demo-controls-tooltip 1.5s forwards; animation-delay: 1s; opacity: 0; }'+
|
||
|
'.demo-controls .property .tooltip:after { content: \'\'; position: absolute; bottom: calc(100% - 0.25rem); left: 0.5rem; border-left: solid 0.5rem transparent; border-right: solid 0.5rem transparent; border-top: solid 0.5rem #47D3E5; width: 0.5rem; height: 0.5rem; animation: demo-controls-tooltip 1.5s forwards; animation-delay: 1s; opacity: 0; }'+
|
||
|
'@keyframes demo-controls-tooltip {'+
|
||
|
'0% { opacity: 0; transform: translateY(0); }'+
|
||
|
'10% { opacity: 1; transform: translateY(0.125rem); }'+
|
||
|
'20% { opacity: 1; transform: translateY(-0.125rem); }'+
|
||
|
'30% { opacity: 1; transform: translateY(0.125rem); }'+
|
||
|
'40% { opacity: 1; transform: translateY(-0.125rem); }'+
|
||
|
'50% { opacity: 1; transform: translateY(0.125rem); }'+
|
||
|
'60% { opacity: 1; transform: translateY(0); }'+
|
||
|
'90% { opacity: 1; }'+
|
||
|
'100% { opacity: 0; }'+
|
||
|
'}'+
|
||
|
'</style>').appendTo($('head'));$.fn.demo_controls=function(styles,userOptions){var $this=$(this),$styleProperty,$stylePropertyClasses,$controls,$x,$y,$z,options,current,i,j,k,s,n,count;if(this.length==0)
|
||
|
return $this;if(this.length>1){for(var i=0;i<this.length;i++)
|
||
|
$(this[i]).demo_controls(styles,userOptions);return $this;}
|
||
|
options=$.extend({target:null,palette:true},userOptions);if(styles){$controls=$('<span class="demo-controls">'+
|
||
|
'<span class="property" data-name="style">'+
|
||
|
'<a href="#" class="title tooltip">style</a>'+
|
||
|
'<span class="classes"></span>'+(options.palette?', ':' ')+
|
||
|
'</span>'+
|
||
|
(options.palette?'<span class="property active" data-name="scheme">'+
|
||
|
'<a href="#" class="title">scheme</a>'+
|
||
|
'<span class="classes">'+
|
||
|
'<span data-class="-" class="active">default</span>'+
|
||
|
'<span data-class="invert">invert</span>'+
|
||
|
'</span>, '+
|
||
|
'</span>'+
|
||
|
'<span class="property active" data-name="color">'+
|
||
|
'<a href="#" class="title">color</a>'+
|
||
|
'<span class="classes">'+
|
||
|
'<span data-class="-" class="active">default</span>'+
|
||
|
'<span data-class="color1">color1</span>'+
|
||
|
'<span data-class="color2">color2</span>'+
|
||
|
'<span data-class="color3">color3</span>'+
|
||
|
'<span data-class="color4">color4</span>'+
|
||
|
'<span data-class="color5">color5</span>'+
|
||
|
'<span data-class="color6">color6</span>'+
|
||
|
'<span data-class="color7">color7</span>'+
|
||
|
'</span>, '+
|
||
|
'</span>':'')+
|
||
|
'</span>');}
|
||
|
else{$controls=$('<span class="demo-controls">'+
|
||
|
(options.palette?'<span class="property active" data-name="scheme">'+
|
||
|
'<a href="#" class="title">scheme</a>'+
|
||
|
'<span class="classes">'+
|
||
|
'<span data-class="-" class="active">default</span>'+
|
||
|
'<span data-class="invert">invert</span>'+
|
||
|
'</span> and '+
|
||
|
'</span>'+
|
||
|
'<span class="property active" data-name="color">'+
|
||
|
'<a href="#" class="title">color</a>'+
|
||
|
'<span class="classes">'+
|
||
|
'<span data-class="-" class="active">default</span>'+
|
||
|
'<span data-class="color1">color1</span>'+
|
||
|
'<span data-class="color2">color2</span>'+
|
||
|
'<span data-class="color3">color3</span>'+
|
||
|
'<span data-class="color4">color4</span>'+
|
||
|
'<span data-class="color5">color5</span>'+
|
||
|
'<span data-class="color6">color6</span>'+
|
||
|
'<span data-class="color7">color7</span>'+
|
||
|
'</span>'+
|
||
|
'</span>':'')+
|
||
|
'</span>');}
|
||
|
switch(options.target){case 'previous':$this.prev().find('.demo-controls').replaceWith($controls);break;default:$this.find('.demo-controls').replaceWith($controls);break;}
|
||
|
if(styles){$styleProperty=$controls.find('.property[data-name="style"]');$stylePropertyClasses=$styleProperty.children('.classes');for(i in styles){current=false;count=Object.keys(styles[i]).length;n=1;$x=$('<span data-class="'+i+'">, '+i+'</span>').appendTo($stylePropertyClasses);if($this.hasClass(i)){$x.addClass('active');current=true;}
|
||
|
for(j in styles[i]){$x=$('<span class="property" data-name="'+j+'" data-requires="'+i+'">'+
|
||
|
(n==count?'<span>and </span>':'')+
|
||
|
'<a href="#" class="title">'+j+'</a>'+
|
||
|
'<span class="classes">'+
|
||
|
'</span>'+(n<count?', ':'')+
|
||
|
'</span>').appendTo($controls);$y=$x.children('.classes');if(current)
|
||
|
$x.addClass('active');for(k in styles[i][j]){$z=$('<span data-class="'+k+'">, '+styles[i][j][k].replace('*','')+'</span>').appendTo($y);if(styles[i][j][k].substr(-1,1)=='*')
|
||
|
$z.addClass('default');if(current&&$this.hasClass(k))
|
||
|
$z.addClass('active');}
|
||
|
n++;}}}
|
||
|
$controls.on('click','a',function(event){event.preventDefault();});$controls.on('click','.property.active',function(event){var $property=$(this);var $classes=$property.find('.classes > *');var $current=$classes.filter('.active');var $next;if($current.length==0||$current.index()==$classes.length-1)
|
||
|
$next=$classes.first();else
|
||
|
$next=$current.next();$this.addClass('demo-animate-all');$current.removeClass('active');$this.removeClass($current.data('class'));$next.addClass('active');$this.addClass($next.data('class'));setTimeout(function(){$this.removeClass('demo-animate-all');},500);});$controls.on('click','.property[data-name="style"]',function(event){var $property=$(this);var $classes=$property.find('.classes > *');var $current=$classes.filter('.active');var $next;if($current.length==0||$current.index()==$classes.length-1)
|
||
|
$next=$classes.first();else
|
||
|
$next=$current.next();$this.addClass('demo-animate-all');$current.removeClass('active');$this.removeClass($current.data('class'));$controls.find('.property[data-requires="'+$current.data('class')+'"]').removeClass('active');$controls.find('.property[data-requires="'+$current.data('class')+'"] > .classes > .active').each(function(){$(this).removeClass('active');if($(this).data('class')!='-')
|
||
|
$this.removeClass($(this).data('class'));});$next.addClass('active');$this.addClass($next.data('class'));$controls.find('.property[data-requires="'+$next.data('class')+'"]').addClass('active');$controls.find('.property[data-requires="'+$next.data('class')+'"] > .classes > .default').each(function(){$(this).addClass('active');if($(this).data('class')!='-')
|
||
|
$this.addClass($(this).data('class'));});setTimeout(function(){$this.removeClass('demo-animate-all');},500);});};$('.wrapper').demo_controls(null,{palette:true});$('.banner').demo_controls({style1:{'size':{'-':'normal','fullscreen':'fullscreen*'},'orientation':{'orient-left':'left*','orient-right':'right'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style2:{'size':{'-':'normal','fullscreen':'fullscreen*'},'orientation':{'orient-left':'left','orient-center':'center*','orient-right':'right'},'content alignment':{'content-align-left':'left','content-align-center':'center*','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style3:{'size':{'-':'normal','fullscreen':'fullscreen*'},'orientation':{'orient-left':'left','orient-right':'right*'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style4:{'size':{'-':'normal','fullscreen':'fullscreen*'},'phone type':{'iphone':'iphone*','android':'android'},'orientation':{'orient-left':'left','orient-right':'right*'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style5:{'size':{'-':'normal','fullscreen':'fullscreen*'},'content alignment':{'content-align-left':'left','content-align-center':'center*','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}}});$('.spotlight').demo_controls({style1:{'orientation':{'orient-left':'left','orient-right':'right*'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left*','image-position-center':'center','image-position-right':'right'}},style2:{'orientation':{'orient-left':'left','orient-right':'right*'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style3:{'phone type':{'iphone':'iphone*','android':'android'},'orientation':{'orient-left':'left','orient-right':'right*'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style4:{'size':{'-size':'normal','fullscreen':'fullscreen*','halfscreen':'halfscreen'},'orientation':{'orient-left':'left*','orient-center':'center','orient-right':'right'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},style5:{'size':{'-size':'normal','fullscreen':'fullscreen*','halfscreen':'halfscreen'},'orientation':{'orient-left':'left*','orient-center':'center','orient-right':'right'},'content alignment':{'content-align-left':'left*','content-align-center':'center','content-align-right':'right'},'image position':{'image-position-left':'left','image-position-center':'center*','image-position-right':'right'}},});$('.gallery').demo_controls({style1:{'size':{'small':'small','medium':'medium*','big':'big'}},style2:{'size':{'small':'small','medium':'medium*','big':'big'}},},{target:'previous',palette:false});$('.items').demo_controls({style1:{'size':{'small':'small','medium':'medium*','big':'big'}},style2:{'size':{'small':'small','medium':'medium*','big':'big'}},style3:{'size':{'small':'small'
|