diff --git a/README.md b/README.md index 9c844b8..23bbb5b 100755 --- a/README.md +++ b/README.md @@ -1,13 +1,19 @@ -Add to Cart Interaction +# Add to Cart Interaction -========= +A floating cart component that reveals itself when the user adds an item to the cart. -A floating cart that slides in when the user decides to buy an item. +[Article on CodyHouse](https://codyhouse.co/gem/add-to-cart-interaction) -[Article on CodyHouse](https://codyhouse.co/gem/add-to-cart-interaction/) +[Demo](https://codyhouse.co/demo/add-to-cart-interaction) -[Demo](https://codyhouse.co/demo/add-to-cart-interaction/index.html) +[License](https://codyhouse.co/license) -Icons: [Nucleo](http://nucleoapp.com/) - -[Terms](https://codyhouse.co/terms/) \ No newline at end of file +## Dependencies + +This experiment is built upon the [CodyHouse Framework](https://github.com/CodyHouse/codyhouse-framework). + +Make sure to include both _globals.scss and util.js files of the framework. + +## Credits + +Icons: [Nucleo Library](https://nucleoapp.com/) \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100755 index 0000000..f4696db --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1 @@ +@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700");*,*::after,*::before{box-sizing:inherit}*{font:inherit}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video,hr{margin:0;padding:0;border:0}html{box-sizing:border-box}body{background-color:hsl(0, 0%, 100%);background-color:var(--color-bg, white)}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,main,form legend{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}button,input,textarea,select{margin:0}.btn,.form-control,.link,.reset{background-color:transparent;padding:0;border:0;border-radius:0;color:inherit;line-height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control::-ms-expand{display:none}textarea{resize:vertical;overflow:auto;vertical-align:top}input::-ms-clear{display:none}table{border-collapse:collapse;border-spacing:0}img,video,svg{max-width:100%}:root,[data-theme="default"]{--color-primary-darker:hsl(220, 90%, 36%);--color-primary-darker-h:220;--color-primary-darker-s:90%;--color-primary-darker-l:36%;--color-primary-dark:hsl(220, 90%, 46%);--color-primary-dark-h:220;--color-primary-dark-s:90%;--color-primary-dark-l:46%;--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-primary-light:hsl(220, 90%, 66%);--color-primary-light-h:220;--color-primary-light-s:90%;--color-primary-light-l:66%;--color-primary-lighter:hsl(220, 90%, 76%);--color-primary-lighter-h:220;--color-primary-lighter-s:90%;--color-primary-lighter-l:76%;--color-accent-darker:hsl(355, 90%, 41%);--color-accent-darker-h:355;--color-accent-darker-s:90%;--color-accent-darker-l:41%;--color-accent-dark:hsl(355, 90%, 51%);--color-accent-dark-h:355;--color-accent-dark-s:90%;--color-accent-dark-l:51%;--color-accent:hsl(355, 90%, 61%);--color-accent-h:355;--color-accent-s:90%;--color-accent-l:61%;--color-accent-light:hsl(355, 90%, 71%);--color-accent-light-h:355;--color-accent-light-s:90%;--color-accent-light-l:71%;--color-accent-lighter:hsl(355, 90%, 81%);--color-accent-lighter-h:355;--color-accent-lighter-s:90%;--color-accent-lighter-l:81%;--color-black:hsl(240, 8%, 12%);--color-black-h:240;--color-black-s:8%;--color-black-l:12%;--color-white:hsl(0, 0%, 100%);--color-white-h:0;--color-white-s:0%;--color-white-l:100%;--color-success-darker:hsl(94, 48%, 36%);--color-success-darker-h:94;--color-success-darker-s:48%;--color-success-darker-l:36%;--color-success-dark:hsl(94, 48%, 46%);--color-success-dark-h:94;--color-success-dark-s:48%;--color-success-dark-l:46%;--color-success:hsl(94, 48%, 56%);--color-success-h:94;--color-success-s:48%;--color-success-l:56%;--color-success-light:hsl(94, 48%, 66%);--color-success-light-h:94;--color-success-light-s:48%;--color-success-light-l:66%;--color-success-lighter:hsl(94, 48%, 76%);--color-success-lighter-h:94;--color-success-lighter-s:48%;--color-success-lighter-l:76%;--color-error-darker:hsl(355, 90%, 41%);--color-error-darker-h:355;--color-error-darker-s:90%;--color-error-darker-l:41%;--color-error-dark:hsl(355, 90%, 51%);--color-error-dark-h:355;--color-error-dark-s:90%;--color-error-dark-l:51%;--color-error:hsl(355, 90%, 61%);--color-error-h:355;--color-error-s:90%;--color-error-l:61%;--color-error-light:hsl(355, 90%, 71%);--color-error-light-h:355;--color-error-light-s:90%;--color-error-light-l:71%;--color-error-lighter:hsl(355, 90%, 81%);--color-error-lighter-h:355;--color-error-lighter-s:90%;--color-error-lighter-l:81%;--color-warning-darker:hsl(46, 100%, 41%);--color-warning-darker-h:46;--color-warning-darker-s:100%;--color-warning-darker-l:41%;--color-warning-dark:hsl(46, 100%, 51%);--color-warning-dark-h:46;--color-warning-dark-s:100%;--color-warning-dark-l:51%;--color-warning:hsl(46, 100%, 61%);--color-warning-h:46;--color-warning-s:100%;--color-warning-l:61%;--color-warning-light:hsl(46, 100%, 71%);--color-warning-light-h:46;--color-warning-light-s:100%;--color-warning-light-l:71%;--color-warning-lighter:hsl(46, 100%, 81%);--color-warning-lighter-h:46;--color-warning-lighter-s:100%;--color-warning-lighter-l:81%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%}[data-theme]{background-color:hsl(0, 0%, 100%);background-color:var(--color-bg);color:hsl(240, 4%, 20%);color:var(--color-contrast-high)}:root{--space-unit: 1em;--space-xxxxs: calc(0.125*var(--space-unit));--space-xxxs: calc(0.25*var(--space-unit));--space-xxs: calc(0.375*var(--space-unit));--space-xs: calc(0.5*var(--space-unit));--space-sm: calc(0.75*var(--space-unit));--space-md: calc(1.25*var(--space-unit));--space-lg: calc(2*var(--space-unit));--space-xl: calc(3.25*var(--space-unit));--space-xxl: calc(5.25*var(--space-unit));--space-xxxl: calc(8.5*var(--space-unit));--space-xxxxl: calc(13.75*var(--space-unit));--component-padding: var(--space-md)}@supports (--css: variables){@media (min-width: 64rem){:root{--space-unit: 1.25em}}}.margin-top,.margin-top--md{margin-top:1.25em;margin-top:var(--space-md)}.margin-top--xxxxs{margin-top:0.125em;margin-top:var(--space-xxxxs)}.margin-top--xxxs{margin-top:0.25em;margin-top:var(--space-xxxs)}.margin-top--xxs{margin-top:0.375em;margin-top:var(--space-xxs)}.margin-top--xs{margin-top:0.5em;margin-top:var(--space-xs)}.margin-top--sm{margin-top:0.75em;margin-top:var(--space-sm)}.margin-top--lg{margin-top:2em;margin-top:var(--space-lg)}.margin-top--xl{margin-top:3.25em;margin-top:var(--space-xl)}.margin-top--xxl{margin-top:5.25em;margin-top:var(--space-xxl)}.margin-top--xxxl{margin-top:8.5em;margin-top:var(--space-xxxl)}.margin-top--xxxxl{margin-top:13.75em;margin-top:var(--space-xxxxl)}.margin-bottom,.margin-bottom--md{margin-bottom:1.25em;margin-bottom:var(--space-md)}.margin-bottom--xxxxs{margin-bottom:0.125em;margin-bottom:var(--space-xxxxs)}.margin-bottom--xxxs{margin-bottom:0.25em;margin-bottom:var(--space-xxxs)}.margin-bottom--xxs{margin-bottom:0.375em;margin-bottom:var(--space-xxs)}.margin-bottom--xs{margin-bottom:0.5em;margin-bottom:var(--space-xs)}.margin-bottom--sm{margin-bottom:0.75em;margin-bottom:var(--space-sm)}.margin-bottom--lg{margin-bottom:2em;margin-bottom:var(--space-lg)}.margin-bottom--xl{margin-bottom:3.25em;margin-bottom:var(--space-xl)}.margin-bottom--xxl{margin-bottom:5.25em;margin-bottom:var(--space-xxl)}.margin-bottom--xxxl{margin-bottom:8.5em;margin-bottom:var(--space-xxxl)}.margin-bottom--xxxxl{margin-bottom:13.75em;margin-bottom:var(--space-xxxxl)}:root{--container-width-xs: 37.5rem;--container-width-sm: 45rem;--container-width-md: 64rem;--container-width-lg: 80rem;--container-width-xl: 90rem}.container{width:calc(100% - 1.25em);width:calc(100% - 2*var(--component-padding));margin-left:auto;margin-right:auto}.container--full-width{width:100%}.container--xs{max-width:37.5rem;max-width:var(--container-width-xs)}.container--sm{max-width:45rem;max-width:var(--container-width-sm)}.container--md{max-width:64rem;max-width:var(--container-width-md)}.container--lg{max-width:80rem;max-width:var(--container-width-lg)}.container--xl{max-width:90rem;max-width:var(--container-width-xl)}.container--adaptive,.container--adaptive-lg{max-width:37.5rem;max-width:var(--container-width-xs)}@media (min-width: 64rem){.container--adaptive,.container--adaptive-lg{max-width:64rem;max-width:var(--container-width-md)}}@media (min-width: 90rem){.container--adaptive,.container--adaptive-lg{max-width:80rem;max-width:var(--container-width-lg)}}.container--adaptive-sm{max-width:37.5rem;max-width:var(--container-width-xs)}@media (min-width: 64rem){.container--adaptive-sm{max-width:45rem;max-width:var(--container-width-sm)}}.container--adaptive-md{max-width:37.5rem;max-width:var(--container-width-xs)}@media (min-width: 64rem){.container--adaptive-md{max-width:64rem;max-width:var(--container-width-md)}}.container--adaptive-xl{max-width:37.5rem;max-width:var(--container-width-xs)}@media (min-width: 64rem){.container--adaptive-xl{max-width:64rem;max-width:var(--container-width-md)}}@media (min-width: 90rem){.container--adaptive-xl{max-width:90rem;max-width:var(--container-width-xl)}}.grid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grid>*{background-clip:content-box;-ms-flex-preferred-size:100%;flex-basis:100%}.grid--gap-xs,.grid-gap--xs{margin:-0.5em 0 0 -0.5em;margin:calc(var(--space-xs)*-1) 0 0 calc(var(--space-xs)*-1)}.grid--gap-xs>*,.grid-gap--xs>*{padding:0.5em 0 0 0.5em;padding:var(--space-xs) 0 0 var(--space-xs)}.grid--gap-sm,.grid-gap--sm{margin:-0.75em 0 0 -0.75em;margin:calc(var(--space-sm)*-1) 0 0 calc(var(--space-sm)*-1)}.grid--gap-sm>*,.grid-gap--sm>*{padding:0.75em 0 0 0.75em;padding:var(--space-sm) 0 0 var(--space-sm)}.grid--gap-md,.grid-gap--md{margin:-1.25em 0 0 -1.25em;margin:calc(var(--space-md)*-1) 0 0 calc(var(--space-md)*-1)}.grid--gap-md>*,.grid-gap--md>*{padding:1.25em 0 0 1.25em;padding:var(--space-md) 0 0 var(--space-md)}.grid--gap-lg,.grid-gap--lg{margin:-2em 0 0 -2em;margin:calc(var(--space-lg)*-1) 0 0 calc(var(--space-lg)*-1)}.grid--gap-lg>*,.grid-gap--lg>*{padding:2em 0 0 2em;padding:var(--space-lg) 0 0 var(--space-lg)}.grid--gap-xl,.grid-gap--xl{margin:-3.25em 0 0 -3.25em;margin:calc(var(--space-xl)*-1) 0 0 calc(var(--space-xl)*-1)}.grid--gap-xl>*,.grid-gap--xl>*{padding:3.25em 0 0 3.25em;padding:var(--space-xl) 0 0 var(--space-xl)}.col{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}@media (min-width: 30rem){.col--xs{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--xs-1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--xs-2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--xs-4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--xs-5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--xs-7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--xs-8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--xs-10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--xs-11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}@media (min-width: 37.5rem){.col--sm{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--sm-1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--sm-2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--sm-4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--sm-5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--sm-7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--sm-8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--sm-10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--sm-11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}@media (min-width: 64rem){.col--md{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--md-1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--md-2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--md-4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--md-5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--md-7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--md-8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--md-10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--md-11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}@media (min-width: 80rem){.col--lg{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--lg-1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--lg-2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--lg-4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--lg-5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--lg-7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--lg-8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--lg-10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--lg-11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}@media (min-width: 90rem){.col--xl{-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col--xl-1{-ms-flex-preferred-size:8.33%;flex-basis:8.33%;max-width:8.33%}.col--xl-2{-ms-flex-preferred-size:16.66%;flex-basis:16.66%;max-width:16.66%}.col--xl-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col--xl-4{-ms-flex-preferred-size:33.33%;flex-basis:33.33%;max-width:33.33%}.col--xl-5{-ms-flex-preferred-size:41.66%;flex-basis:41.66%;max-width:41.66%}.col--xl-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col--xl-7{-ms-flex-preferred-size:58.33%;flex-basis:58.33%;max-width:58.33%}.col--xl-8{-ms-flex-preferred-size:66.66%;flex-basis:66.66%;max-width:66.66%}.col--xl-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col--xl-10{-ms-flex-preferred-size:83.33%;flex-basis:83.33%;max-width:83.33%}.col--xl-11{-ms-flex-preferred-size:91.66%;flex-basis:91.66%;max-width:91.66%}.col--xl-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}.flex{display:-ms-flexbox;display:flex}.flex>*{display:inline-block}.flex--wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.flex--column{-ms-flex-direction:column;flex-direction:column}.flex--end{-ms-flex-pack:end;justify-content:flex-end}.flex--center{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.flex--center-x{-ms-flex-pack:center;justify-content:center}.flex--center-y{-ms-flex-align:center;align-items:center}.flex--space-between{-ms-flex-pack:justify;justify-content:space-between}.flex--space-around{-ms-flex-pack:distribute;justify-content:space-around}.flex--space-evenly{-ms-flex-pack:space-evenly;justify-content:space-evenly}.flex--grow>*{-ms-flex-positive:1;flex-grow:1}.flex--shrink-none>*{-ms-flex-negative:0;flex-shrink:0}.flex--gap>*,.flex--gap-md>*,.flex-gap>*,.flex-gap--md>*{margin-right:1.25em;margin-right:var(--space-md)}.flex--gap>*:last-child,.flex--gap-md>*:last-child,.flex-gap>*:last-child,.flex-gap--md>*:last-child{margin-right:0}.flex--wrap.flex--gap,.flex--wrap.flex--gap-md,.flex--wrap.flex-gap,.flex--wrap.flex-gap--md{margin-bottom:-1.25em;margin-bottom:calc(-1*var(--space-md))}.flex--wrap.flex--gap>*,.flex--wrap.flex--gap-md>*,.flex--wrap.flex-gap>*,.flex--wrap.flex-gap--md>*{margin-bottom:1.25em;margin-bottom:var(--space-md)}.flex--gap-xxs>*,.flex-gap--xxs>*{margin-right:0.375em;margin-right:var(--space-xxs)}.flex--gap-xxs>*:last-child,.flex-gap--xxs>*:last-child{margin-right:0}.flex--wrap.flex--gap-xxs,.flex--wrap.flex-gap--xxs{margin-bottom:-0.375em;margin-bottom:calc(-1*var(--space-xxs))}.flex--wrap.flex--gap-xxs>*,.flex--wrap.flex-gap--xxs>*{margin-bottom:0.375em;margin-bottom:var(--space-xxs)}.flex--gap-xs>*,.flex-gap--xs>*{margin-right:0.5em;margin-right:var(--space-xs)}.flex--gap-xs>*:last-child,.flex-gap--xs>*:last-child{margin-right:0}.flex--wrap.flex--gap-xs,.flex--wrap.flex-gap--xs{margin-bottom:-0.5em;margin-bottom:calc(-1*var(--space-xs))}.flex--wrap.flex--gap-xs>*,.flex--wrap.flex-gap--xs>*{margin-bottom:0.5em;margin-bottom:var(--space-xs)}.flex--gap-sm>*,.flex-gap--sm>*{margin-right:0.75em;margin-right:var(--space-sm)}.flex--gap-sm>*:last-child,.flex-gap--sm>*:last-child{margin-right:0}.flex--wrap.flex--gap-sm,.flex--wrap.flex-gap--sm{margin-bottom:-0.75em;margin-bottom:calc(-1*var(--space-sm))}.flex--wrap.flex--gap-sm>*,.flex--wrap.flex-gap--sm>*{margin-bottom:0.75em;margin-bottom:var(--space-sm)}.flex--gap-lg>*,.flex-gap--lg>*{margin-right:2em;margin-right:var(--space-lg)}.flex--gap-lg>*:last-child,.flex-gap--lg>*:last-child{margin-right:0}.flex--wrap.flex--gap-lg,.flex--wrap.flex-gap--lg{margin-bottom:-2em;margin-bottom:calc(-1*var(--space-lg))}.flex--wrap.flex--gap-lg>*,.flex--wrap.flex-gap--lg>*{margin-bottom:2em;margin-bottom:var(--space-lg)}.flex--gap-xl>*,.flex-gap--xl>*{margin-right:3.25em;margin-right:var(--space-xl)}.flex--gap-xl>*:last-child,.flex-gap--xl>*:last-child{margin-right:0}.flex--wrap.flex--gap-xl,.flex--wrap.flex-gap--xl{margin-bottom:-3.25em;margin-bottom:calc(-1*var(--space-xl))}.flex--wrap.flex--gap-xl>*,.flex--wrap.flex-gap--xl>*{margin-bottom:3.25em;margin-bottom:var(--space-xl)}.flex-item--end{-ms-flex-item-align:end;align-self:flex-end}.flex-item--grow{-ms-flex-positive:1;flex-grow:1}.flex-item--shrink-none{-ms-flex-negative:0;flex-shrink:0}:root{--radius: 0.25em;--shadow-sm: 0 1px 1px rgba(0, 0, 0, .2), 0 1px 8px rgba(0, 0, 0, .1);--shadow-md: 0 1px 8px rgba(0, 0, 0, .1), 0 8px 24px rgba(0, 0, 0, .15);--shadow-lg: 0 1px 8px rgba(0, 0, 0, .1), 0 16px 48px rgba(0, 0, 0, .1), 0 24px 60px rgba(0, 0, 0, .1);--transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);--transition-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);--transition-ease-in: cubic-bezier(0.55, 0.055, 0.675, 0.19);--transition-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1)}:root{--font-primary: sans-serif;--text-base-size: 1em;--text-scale-ratio: 1.2;--text-xs: calc(1em/var(--text-scale-ratio)/var(--text-scale-ratio));--text-sm: calc(var(--text-xs)*var(--text-scale-ratio));--text-md: calc(var(--text-sm)*var(--text-scale-ratio)*var(--text-scale-ratio));--text-lg: calc(var(--text-md)*var(--text-scale-ratio));--text-xl: calc(var(--text-lg)*var(--text-scale-ratio));--text-xxl: calc(var(--text-xl)*var(--text-scale-ratio));--text-xxxl: calc(var(--text-xxl)*var(--text-scale-ratio));--body-line-height: 1.4;--heading-line-height: 1.2;--font-primary-capital-letter: 1}@supports (--css: variables){@media (min-width: 64rem){:root{--text-base-size: 1.25em;--text-scale-ratio: 1.25}}}body{font-size:1em;font-size:var(--text-base-size);font-family:'Source Sans Pro', sans-serif;font-family:var(--font-primary);color:hsl(240, 4%, 20%);color:var(--color-contrast-high)}h1,h2,h3,h4{color:hsl(240, 8%, 12%);color:var(--color-contrast-higher);line-height:1.2;line-height:var(--heading-line-height)}.text--xxxl{font-size:2.48832em;font-size:var(--text-xxxl)}h1,.text--xxl{font-size:2.0736em;font-size:var(--text-xxl)}h2,.text--xl{font-size:1.728em;font-size:var(--text-xl)}h3,.text--lg{font-size:1.44em;font-size:var(--text-lg)}h4,.text--md{font-size:1.2em;font-size:var(--text-md)}.text--sm,small{font-size:0.83333em;font-size:var(--text-sm)}.text--xs{font-size:0.69444em;font-size:var(--text-xs)}a,.link{color:hsl(220, 90%, 56%);color:var(--color-primary);text-decoration:underline}mark{background-color:hsla(355, 90%, 61%, 0.2);background-color:hsla(var(--color-accent-h), var(--color-accent-s), var(--color-accent-l), 0.2);color:inherit}strong{font-weight:bold}s{text-decoration:line-through}u{text-decoration:underline}.text--subtle,.text-component .text--subtle{color:hsl(240, 1%, 48%);color:var(--color-contrast-medium)}.text--inherit,.text-component .text--inherit{color:inherit}.text-component{--component-body-line-height: calc(var(--body-line-height)*var(--line-height-multiplier, 1));--component-heading-line-height: calc(var(--heading-line-height)*var(--line-height-multiplier, 1));--line-height-multiplier: 1;--text-vspace-multiplier: 1}.text-component h1,.text-component h2,.text-component h3,.text-component h4{line-height:1.2;line-height:var(--component-heading-line-height);margin-bottom:0.25em;margin-bottom:calc(var(--space-xxxs)*var(--text-vspace-multiplier))}.text-component h2,.text-component h3,.text-component h4{margin-top:0.75em;margin-top:calc(var(--space-sm)*var(--text-vspace-multiplier))}.text-component p,.text-component blockquote,.text-component ul li,.text-component ol li{line-height:1.4;line-height:var(--component-body-line-height);color:hsl(240, 4%, 20%);color:var(--color-contrast-high)}.text-component ul,.text-component ol,.text-component p,.text-component blockquote,.text-component .text-component__block,.text-component .text-component__img{margin-bottom:0.75em;margin-bottom:calc(var(--space-sm)*var(--text-vspace-multiplier))}.text-component ul,.text-component ol{padding-left:1em}.text-component ul{list-style-type:disc}.text-component ol{list-style-type:decimal}.text-component em{font-style:italic}.text-component blockquote{padding-left:1em;border-left:4px solid hsl(240, 1%, 83%);border-left:4px solid var(--color-contrast-low)}.text-component hr{background:hsl(240, 1%, 83%);background:var(--color-contrast-low);height:1px;margin:2em auto;margin:calc(var(--space-lg)*var(--text-vspace-multiplier)) auto}.text-component>*:first-child{margin-top:0}.text-component>*:last-child{margin-bottom:0}.article.text-component{--line-height-multiplier: 1.13;--text-vspace-multiplier: 1.2}.text-component__block--full-width{width:100vw;margin-left:calc(50% - 50vw)}.text-component__img{text-align:center}.text-component__img img{display:block;margin:0 auto}.text-component__img figcaption{text-align:center;font-size:0.83333em;font-size:var(--text-sm);color:hsl(240, 1%, 48%);color:var(--color-contrast-medium);margin-top:0.5em;margin-top:var(--space-xs)}.text-component__block .text-component__img{margin-bottom:0}@media (min-width: 37.5rem){.text-component__block--left,.text-component__block--right,.text-component__img--left,.text-component__img--right{width:45%}.text-component__block--left img,.text-component__block--right img,.text-component__img--left img,.text-component__img--right img{width:100%}.text-component__block--left,.text-component__img--left{float:left;margin-right:0.75em;margin-right:calc(var(--space-sm)*var(--text-vspace-multiplier, 1))}.text-component__block--right,.text-component__img--right{float:right;margin-left:0.75em;margin-left:calc(var(--space-sm)*var(--text-vspace-multiplier, 1))}}@media (min-width: 90rem){.text-component__block--outset,.text-component__img--outset{width:calc(100% + 10.5em);width:calc(100% + 2*var(--space-xxl))}.text-component__block--outset img,.text-component__img--outset img{width:100%}.text-component__block--outset:not(.text-component__block--right),.text-component__img--outset:not(.text-component__img--right){margin-left:-5.25em;margin-left:calc(-1*var(--space-xxl))}.text-component__block--left,.text-component__block--right,.text-component__img--left,.text-component__img--right{width:50%}.text-component__block--right.text-component__block--outset,.text-component__img--right.text-component__img--outset{margin-right:-5.25em;margin-right:calc(-1*var(--space-xxl))}}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--center{text-align:center}.text--replace{overflow:hidden;color:transparent;text-indent:100%;white-space:nowrap}:root{--icon-xxs: 12px;--icon-xs: 16px;--icon-sm: 24px;--icon-md: 32px;--icon-lg: 48px;--icon-xl: 64px;--icon-xxl: 128px}.icon{display:inline-block;color:hsl(240, 8%, 12%);color:var(--color-contrast-higher);fill:currentColor;height:1em;width:1em;line-height:1}.icon--xxs{font-size:12px;font-size:var(--icon-xxs)}.icon--xs{font-size:16px;font-size:var(--icon-xs)}.icon--sm{font-size:24px;font-size:var(--icon-sm)}.icon--md{font-size:32px;font-size:var(--icon-md)}.icon--lg{font-size:48px;font-size:var(--icon-lg)}.icon--xl{font-size:64px;font-size:var(--icon-xl)}.icon--xxl{font-size:128px;font-size:var(--icon-xxl)}.icon-text{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.icon-text>*:nth-child(2){margin-left:0.375em;margin-left:var(--space-xxs)}.icon-text .icon{color:inherit;-ms-flex-negative:0;flex-shrink:0}.icon-text.icon-text--gap-none>*:nth-child(2){margin-left:0}.icon-text.icon-text--gap-xxxs>*:nth-child(2){margin-left:0.25em;margin-left:var(--space-xxxs)}.icon-text.icon-text--gap-xxxxs>*:nth-child(2){margin-left:0.125em;margin-left:var(--space-xxxxs)}.icon-text--space-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.icon--is-spinning{-webkit-animation:icon-spin 1s infinite linear;animation:icon-spin 1s infinite linear}@-webkit-keyframes icon-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes icon-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.icon use{color:inherit;fill:currentColor}:root{--btn-font-size: 1em;--btn-sm: calc(var(--btn-font-size) - 0.2em);--btn-md: calc(var(--btn-font-size) + 0.2em);--btn-lg: calc(var(--btn-font-size) + 0.4em)}.btn{display:-ms-inline-flexbox;display:inline-flex;position:relative;white-space:nowrap;text-decoration:none;line-height:1;padding:0.5em 0.75em;padding:var(--space-xs) var(--space-sm);border-radius:0.25em;font-size:1em;font-size:var(--btn-font-size);-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.btn--primary{background-color:hsl(220, 90%, 56%);background-color:var(--color-primary);color:hsl(0, 0%, 100%);color:var(--color-white);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.btn--subtle{color:hsl(240, 8%, 12%);color:var(--color-contrast-higher);border:1px solid hsl(240, 1%, 83%);border:1px solid var(--color-contrast-low)}.btn--accent{background-color:hsl(355, 90%, 61%);background-color:var(--color-accent);color:hsl(0, 0%, 100%);color:var(--color-white);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.btn--disabled{cursor:not-allowed;box-shadow:none;opacity:0.6}.btn--sm{font-size:0.8em;font-size:var(--btn-sm)}.btn--md{font-size:1.2em;font-size:var(--btn-md)}.btn--lg{font-size:1.4em;font-size:var(--btn-lg)}.btn--full-width{display:-ms-flexbox;display:flex;width:100%}.btn .icon{color:inherit;-ms-flex-negative:0;flex-shrink:0}.btn--icon-text{-ms-flex-align:center;align-items:center}.btn--icon-text>*:nth-child(2){margin-left:0.375em;margin-left:var(--space-xxs)}.btn--icon{padding:0.5em;padding:var(--space-xs)}.form-control{padding:0.5em 0.75em;padding:var(--space-xs) var(--space-sm);background:hsl(0, 0%, 100%);background:var(--color-bg);border:2px solid hsl(240, 1%, 83%);border:2px solid var(--color-contrast-low);width:100%}.form-control:focus{outline:none;border-color:hsl(220, 90%, 56%);border-color:var(--color-primary);--color-shadow: hsla(220, 90%, 56%, 0.2);--color-shadow: hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.2);box-shadow:undefined;box-shadow:0 0 0 3px var(--color-shadow)}.form-control:focus:focus{box-shadow:0 0 0 3px hsla(220, 90%, 56%, 0.2);box-shadow:0 0 0 3px var(--color-shadow)}.form-control::-webkit-input-placeholder{color:hsl(240, 1%, 48%);color:var(--color-contrast-medium)}.form-control::-moz-placeholder{opacity:1;color:hsl(240, 1%, 48%);color:var(--color-contrast-medium)}.form-control:-ms-input-placeholder{color:hsl(240, 1%, 48%);color:var(--color-contrast-medium)}.form-control:-moz-placeholder{color:hsl(240, 1%, 48%);color:var(--color-contrast-medium)}.form-control[disabled],.form-control[readonly]{cursor:not-allowed}.form-control[aria-invalid="true"]{border-color:hsl(355, 90%, 61%);border-color:var(--color-error)}.form-control[aria-invalid="true"]:focus{--color-shadow: hsla(355, 90%, 61%, 0.2);--color-shadow: hsla(var(--color-error-h), var(--color-error-s), var(--color-error-l), 0.2);box-shadow:undefined;box-shadow:0 0 0 3px var(--color-shadow)}.form-control[aria-invalid="true"]:focus:focus{box-shadow:0 0 0 3px hsla(355, 90%, 61%, 0.2);box-shadow:0 0 0 3px var(--color-shadow)}.form-legend{color:hsl(240, 8%, 12%);color:var(--color-contrast-higher);line-height:1.2;font-size:1.2em;font-size:var(--text-md);margin-bottom:0.375em;margin-bottom:var(--space-xxs)}.form-label{display:inline-block;font-size:0.83333em;font-size:var(--text-sm);margin-bottom:0.25em;margin-bottom:var(--space-xxxs)}.form__msg-error{background-color:hsl(355, 90%, 61%);background-color:var(--color-error);color:hsl(0, 0%, 100%);color:var(--color-white);font-size:0.83333em;font-size:var(--text-sm);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0.5em;padding:var(--space-xs);margin-top:0.75em;margin-top:var(--space-sm);border-radius:0.25em;position:absolute;clip:rect(1px, 1px, 1px, 1px)}.form__msg-error::before{content:'';position:absolute;left:0.75em;left:var(--space-sm);top:0;-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);width:0;height:0;border:8px solid transparent;border-bottom-color:hsl(355, 90%, 61%);border-bottom-color:var(--color-error)}.form__msg-error--is-visible{position:relative;clip:auto}.radio-list>*,.checkbox-list>*{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;margin-bottom:0.375em;margin-bottom:var(--space-xxs)}.radio-list>*:last-of-type,.checkbox-list>*:last-of-type{margin-bottom:0}.radio-list label,.checkbox-list label{line-height:1.4;line-height:var(--body-line-height);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-list input,.checkbox-list input{vertical-align:top;margin-right:0.25em;margin-right:var(--space-xxxs);-ms-flex-negative:0;flex-shrink:0}.radio-list.radio-list--inline,.radio-list.checkbox-list--inline,.checkbox-list.radio-list--inline,.checkbox-list.checkbox-list--inline{display:-ms-flexbox;display:flex;margin-bottom:-1.25em;margin-bottom:calc(-1*var(--space-md))}.radio-list.radio-list--inline>*,.radio-list.checkbox-list--inline>*,.checkbox-list.radio-list--inline>*,.checkbox-list.checkbox-list--inline>*{margin:0 1.25em 1.25em 0;margin:0 var(--space-md) var(--space-md) 0}:root{--zindex-header: 2;--zindex-popover: 4;--zindex-fixed-element: 5;--zindex-overlay: 10}@media not all and (min-width: 30rem){.display--xs{display:none !important}}@media (min-width: 30rem){.hide--xs{display:none !important}}@media not all and (min-width: 37.5rem){.display--sm{display:none !important}}@media (min-width: 37.5rem){.hide--sm{display:none !important}}@media not all and (min-width: 64rem){.display--md{display:none !important}}@media (min-width: 64rem){.hide--md{display:none !important}}@media not all and (min-width: 80rem){.display--lg{display:none !important}}@media (min-width: 80rem){.hide--lg{display:none !important}}@media not all and (min-width: 90rem){.display--xl{display:none !important}}@media (min-width: 90rem){.hide--xl{display:none !important}}:root{--display: block}.is-visible{display:block !important;display:var(--display) !important}.is-hidden{display:none !important}.sr-only{position:absolute;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;overflow:hidden;padding:0;border:0;white-space:nowrap}:root{--cd-color-1:hsl(210, 31%, 24%);--cd-color-1-h:210;--cd-color-1-s:31%;--cd-color-1-l:24%;--cd-color-2:hsl(204, 73%, 52%);--cd-color-2-h:204;--cd-color-2-s:73%;--cd-color-2-l:52%;--cd-color-3:hsl(0, 0%, 100%);--cd-color-3-h:0;--cd-color-3-s:0%;--cd-color-3-l:100%;--cd-color-4:hsl(192, 15%, 94%);--cd-color-4-h:192;--cd-color-4-s:15%;--cd-color-4-l:94%;--cd-color-5:hsl(7, 80%, 56%);--cd-color-5-h:7;--cd-color-5-s:80%;--cd-color-5-l:56%;--font-primary: 'Source Sans Pro', sans-serif}.cd-cart::before{content:'';position:fixed;z-index:1;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,0.5);opacity:0;visibility:hidden;transition:opacity .4s, visibility .4s}.cd-cart--open::before{opacity:1;visibility:visible}.cd-cart__trigger,.cd-cart__content{position:fixed;bottom:20px;right:5%;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s, -webkit-transform .2s;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden}.cd-cart--empty .cd-cart__trigger,.cd-cart--empty .cd-cart__content{-webkit-transform:translateY(150px);-ms-transform:translateY(150px);transform:translateY(150px)}@media (min-width: 80rem){.cd-cart__trigger,.cd-cart__content{bottom:40px}}.cd-cart__trigger{z-index:3;height:72px;width:72px;overflow:visible}.cd-cart__trigger::after,.cd-cart__trigger::before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translateY(-50%) translateX(-50%);-ms-transform:translateY(-50%) translateX(-50%);transform:translateY(-50%) translateX(-50%);height:100%;width:100%;background:url(../img/cd-icons-cart-close.svg) no-repeat 0 0;transition:opacity .2s, -webkit-transform .2s;transition:opacity .2s, transform .2s;transition:opacity .2s, transform .2s, -webkit-transform .2s}.cd-cart__trigger::after{background-position:-72px 0;opacity:0;-webkit-transform:translateX(-50%) translateY(-50%) rotate(90deg);-ms-transform:translateX(-50%) translateY(-50%) rotate(90deg);transform:translateX(-50%) translateY(-50%) rotate(90deg)}.cd-cart--open .cd-cart__trigger::before{opacity:0}.cd-cart--open .cd-cart__trigger::after{opacity:1;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.cd-cart__trigger:hover+.cd-cart__content .cd-cart__layout{box-shadow:0 6px 40px rgba(0,0,0,0.3)}.cd-cart--open .cd-cart__trigger:hover+.cd-cart__content .cd-cart__layout{box-shadow:0 4px 30px rgba(0,0,0,0.17)}.cd-cart__count{position:absolute;top:-10px;right:-10px;height:28px;width:28px;background:hsl(7, 80%, 56%);background:var(--cd-color-5);color:hsl(0, 0%, 100%);color:var(--cd-color-3);font-size:0.83333em;font-size:var(--text-sm);font-weight:bold;border-radius:50%;text-indent:0;transition:-webkit-transform .2s .5s;transition:transform .2s .5s;transition:transform .2s .5s, -webkit-transform .2s .5s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cd-cart__count li{position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.15s;animation-duration:.15s}.cd-cart__count li:last-of-type{visibility:hidden}.cd-cart__count--update li:last-of-type{-webkit-animation-name:cd-qty-enter;animation-name:cd-qty-enter}.cd-cart__count--update li:first-of-type{-webkit-animation-name:cd-qty-leave;animation-name:cd-qty-leave}.cd-cart--open .cd-cart__count{transition:-webkit-transform .2s 0s;transition:transform .2s 0s;transition:transform .2s 0s, -webkit-transform .2s 0s;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.cd-cart--empty .cd-cart__count{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.cd-cart__content{z-index:2;width:90%;max-width:440px;height:400px;max-height:90%;pointer-events:none}.cd-cart__layout{position:absolute;bottom:0;right:0;z-index:2;overflow:hidden;height:72px;width:72px;border-radius:0.25em;border-radius:var(--radius);transition:height .4s .1s, width .4s .1s, box-shadow .3s;transition-timing-function:cubic-bezier(0.67, 0.17, 0.32, 0.95);background:hsl(0, 0%, 100%);background:var(--cd-color-3);box-shadow:0 4px 30px rgba(0,0,0,0.17);pointer-events:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.cd-cart--open .cd-cart__layout{height:100%;width:100%;transition-delay:0s}.cd-cart__header,.cd-cart__body{opacity:0;padding-left:0.825em;padding-left:calc(var(--space-sm)*1.1);padding-right:0.825em;padding-right:calc(var(--space-sm)*1.1)}.cd-cart--open .cd-cart__header,.cd-cart--open .cd-cart__body{opacity:1}.cd-cart__header{position:relative;z-index:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-radius:0.25em 0.25em 0 0;border-radius:var(--radius) var(--radius) 0 0;height:40px;line-height:40px;background-color:hsl(0, 0%, 100%);background-color:var(--cd-color-3);transition:opacity .2s 0s;border-bottom:1px solid hsl(0, 0%, 90%);border-bottom:1px solid hsl(var(--cd-color-3-h), var(--cd-color-3-s), calc(var(--cd-color-3-l)*0.9))}.cd-cart__header h2{text-transform:uppercase;display:inline-block;font-size:0.76388em;font-size:calc(var(--text-xs)*1.1);font-weight:700;letter-spacing:.1em}.cd-cart--open .cd-cart__header{transition:opacity .2s .2s}.cd-cart__undo{opacity:0;visibility:hidden;transition:opacity .2s, visibility .2s;color:hsl(210, 31%, 28.8%);color:hsl(var(--cd-color-1-h), var(--cd-color-1-s), calc(var(--cd-color-1-l)*1.2));font-size:0.69444em;font-size:var(--text-xs)}.cd-cart__undo a{text-decoration:underline;color:hsl(210, 31%, 24%);color:var(--cd-color-1)}.cd-cart__undo a:hover{color:hsl(204, 73%, 52%);color:var(--cd-color-2)}.cd-cart__undo--visible{opacity:1;visibility:visible}.cd-cart__body{-ms-flex-positive:1;flex-grow:1;padding-top:0.75em;padding-top:var(--space-sm);padding-bottom:0.75em;padding-bottom:var(--space-sm);overflow:auto;-webkit-overflow-scrolling:touch;transition:opacity .2s}.cd-cart__body ul{position:relative;padding-bottom:60px}@media (min-width: 64rem){.cd-cart__body ul{padding-bottom:90px}}.cd-cart--open .cd-cart__body{transition:opacity 0s}.cd-cart--open .cd-cart__body li{transition:opacity .3s .2s, -webkit-transform .3s .2s;transition:transform .3s .2s, opacity .3s .2s;transition:transform .3s .2s, opacity .3s .2s, -webkit-transform .3s .2s;opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.cd-cart--open .cd-cart__body li:nth-of-type(2){transition-duration:.4s}.cd-cart--open .cd-cart__body li:nth-of-type(3){transition-duration:.5s}.cd-cart--open .cd-cart__body li:nth-of-type(4),.cd-cart--open .cd-cart__body li:nth-of-type(5){transition-duration:.55s}.cd-cart__product{position:relative;opacity:0;-webkit-transform:translateX(80px);-ms-transform:translateX(80px);transform:translateX(80px);transition:opacity 0s .2s, -webkit-transform 0s .2s;transition:opacity 0s .2s, transform 0s .2s;transition:opacity 0s .2s, transform 0s .2s, -webkit-transform 0s .2s;display:-ms-flexbox;display:flex}.cd-cart__product:not(:last-of-type){margin-bottom:12px}.cd-cart__product a{text-decoration:none}.cd-cart__product--deleted{position:absolute;left:0;width:100%;opacity:0;-webkit-animation:cd-item-slide-out .3s forwards;animation:cd-item-slide-out .3s forwards}.cd-cart__product--deleted.cd-cart__product--undo{-webkit-animation:cd-item-slide-in .3s forwards;animation:cd-item-slide-in .3s forwards}.cd-cart__product--deleted+.cd-cart__product{-webkit-animation:cd-item-move-up-mobile .3s;animation:cd-item-move-up-mobile .3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 64rem){.cd-cart__product--deleted+.cd-cart__product{-webkit-animation:cd-item-move-up .3s;animation:cd-item-move-up .3s}}.cd-cart__product--undo+.cd-cart__product{-webkit-animation:cd-item-move-down-mobile .3s;animation:cd-item-move-down-mobile .3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 64rem){.cd-cart__product--undo+.cd-cart__product{-webkit-animation:cd-item-move-down .3s;animation:cd-item-move-down .3s}}.cd-cart__image{display:inline-block;width:50px;-ms-flex-negative:0;flex-shrink:0}.cd-cart__image img{display:block}@media (min-width: 64rem){.cd-cart__image{width:90px}}.cd-cart__details{position:relative;display:-ms-flexbox;display:flex;-ms-flex-line-pack:start;align-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-positive:1;flex-grow:1;padding-top:0.825em;padding-top:calc(var(--space-sm)*1.1);padding-left:0.6em;padding-left:calc(var(--space-xs)*1.2)}.cd-cart__details h3{font-weight:bold;width:70%;font-size:0.95833em;font-size:calc(var(--text-sm)*1.15)}.cd-cart__details h3 a{color:hsl(210, 31%, 24%);color:var(--cd-color-1)}.cd-cart__details h3 a:hover{color:hsl(204, 73%, 52%);color:var(--cd-color-2)}.cd-cart__price{width:30%;text-align:right;font-size:0.91666em;font-size:calc(var(--text-sm)*1.1);font-weight:bold}.cd-cart__actions{display:-ms-flexbox;display:flex;font-size:0.76388em;font-size:calc(var(--text-xs)*1.1)}.cd-cart__delete-item,.cd-cart__quantity{color:hsl(210, 31%, 28.8%);color:hsl(var(--cd-color-1-h), var(--cd-color-1-s), calc(var(--cd-color-1-l)*1.2));-webkit-backface-visibility:hidden;backface-visibility:hidden}.cd-cart__delete-item{margin-right:0.75em;margin-right:var(--space-sm)}.cd-cart__delete-item:hover{color:hsl(7, 80%, 56%);color:var(--cd-color-5)}.cd-cart__quantity{display:-ms-flexbox;display:flex}.cd-cart__quantity label{margin-right:0.375em;margin-right:var(--space-xxs)}.cd-cart__select{position:relative}.cd-cart__select select{position:relative;padding:0 1.25em 0 0;padding:0 var(--space-md) 0 0;cursor:pointer;color:currentColor}.cd-cart__select select:focus{outline:none;color:hsl(210, 31%, 24%);color:var(--cd-color-1);box-shadow:0 1px 0 currentColor}.cd-cart__select select::-ms-expand{display:none}.cd-cart__select .icon{position:absolute;z-index:1;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:block;width:12px;height:12px;color:currentColor;pointer-events:none}@media (min-width: 64rem){.cd-cart__select select{padding-right:0.75em;padding-right:var(--space-sm)}}.cd-cart__footer{position:absolute;bottom:0;width:100%;border-radius:0 0 0.25em 0.25em;border-radius:0 0 var(--radius) var(--radius);box-shadow:0 -2px 20px rgba(0,0,0,0.15);background:hsl(0, 0%, 100%);background:var(--cd-color-3)}.cd-cart__checkout{display:block;height:72px;line-height:72px;margin-right:72px;background:hsl(204, 73%, 52%);background:var(--cd-color-2);color:hsla(0, 0%, 100%, 0);color:hsla(var(--cd-color-3-h), var(--cd-color-3-s), var(--cd-color-3-l), 0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;font-size:1.2em;font-size:var(--text-md);font-weight:600;transition:all .2s 0s}.cd-cart__checkout:hover{background:hsl(204, 73%, 56.16%);background:hsl(var(--cd-color-2-h), var(--cd-color-2-s), calc(var(--cd-color-2-l)*1.08))}.cd-cart__checkout em{position:relative;display:inline-block;-webkit-transform:translateX(40px);-ms-transform:translateX(40px);transform:translateX(40px);transition:-webkit-transform 0s .2s;transition:transform 0s .2s;transition:transform 0s .2s, -webkit-transform 0s .2s}.cd-cart__checkout .icon{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);right:0;opacity:0;transition:opacity .2s;color:currentColor}.cd-cart--open .cd-cart__checkout{color:hsl(0, 0%, 100%);color:var(--cd-color-3);transition:color .2s .3s}.cd-cart--open .cd-cart__checkout em{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);transition:padding .2s 0s, -webkit-transform .2s .3s;transition:transform .2s .3s, padding .2s 0s;transition:transform .2s .3s, padding .2s 0s, -webkit-transform .2s .3s}.cd-cart--open .cd-cart__checkout:hover em{padding-right:30px}.cd-cart--open .cd-cart__checkout:hover .icon{opacity:1}@-webkit-keyframes cd-qty-enter{0%{opacity:0;visibility:hidden;-webkit-transform:translateX(-50%) translateY(0);transform:translateX(-50%) translateY(0)}100%{opacity:1;visibility:visible;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}}@keyframes cd-qty-enter{0%{opacity:0;visibility:hidden;-webkit-transform:translateX(-50%) translateY(0);transform:translateX(-50%) translateY(0)}100%{opacity:1;visibility:visible;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}}@-webkit-keyframes cd-qty-leave{0%{opacity:1;visibility:visible;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}100%{opacity:0;visibility:hidden;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%)}}@keyframes cd-qty-leave{0%{opacity:1;visibility:visible;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}100%{opacity:0;visibility:hidden;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%)}}@-webkit-keyframes cd-item-move-up-mobile{0%{padding-top:62px}100%{padding-top:0px}}@keyframes cd-item-move-up-mobile{0%{padding-top:62px}100%{padding-top:0px}}@-webkit-keyframes cd-item-move-up{0%{padding-top:102px}100%{padding-top:0px}}@keyframes cd-item-move-up{0%{padding-top:102px}100%{padding-top:0px}}@-webkit-keyframes cd-item-move-down-mobile{0%{padding-top:0px}100%{padding-top:62px}}@keyframes cd-item-move-down-mobile{0%{padding-top:0px}100%{padding-top:62px}}@-webkit-keyframes cd-item-move-down{0%{padding-top:0px}100%{padding-top:102px}}@keyframes cd-item-move-down{0%{padding-top:0px}100%{padding-top:102px}}@-webkit-keyframes cd-item-slide-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(80px);transform:translateX(80px);opacity:0}}@keyframes cd-item-slide-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}100%{-webkit-transform:translateX(80px);transform:translateX(80px);opacity:0}}@-webkit-keyframes cd-item-slide-in{100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}0%{-webkit-transform:translateX(80px);transform:translateX(80px);opacity:0}}@keyframes cd-item-slide-in{100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}0%{-webkit-transform:translateX(80px);transform:translateX(80px);opacity:0}}body{background-color:hsl(192, 15%, 94%);background-color:var(--cd-color-4)}.cd-main h1{color:hsl(210, 31%, 24%);color:var(--cd-color-1)}.cd-add-to-cart,.cd-article-link{display:inline-block;padding:0.75em 1.25em;padding:var(--space-sm) var(--space-md);border-radius:50em;text-transform:uppercase;font-weight:700;letter-spacing:.1em;text-decoration:none;font-size:0.83333em;font-size:var(--text-sm);transition:all .2s}.cd-add-to-cart{background:hsl(204, 73%, 52%);background:var(--cd-color-2);color:hsl(0, 0%, 100%);color:var(--cd-color-3);box-shadow:0 2px 10px rgba(0,0,0,0.2);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cd-add-to-cart:hover{background:hsl(204, 73%, 57.2%);background:hsl(var(--cd-color-2-h), var(--cd-color-2-s), calc(var(--cd-color-2-l)*1.1))}.cd-add-to-cart:active{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9)}.cd-article-link{color:hsl(210, 31%, 24%);color:var(--cd-color-1);background-color:hsl(192, 15%, 84.6%);background-color:hsl(var(--cd-color-4-h), var(--cd-color-4-s), calc(var(--cd-color-4-l)*0.9))}.cd-article-link:hover{background-color:hsl(192, 15%, 89.3%);background-color:hsl(var(--cd-color-4-h), var(--cd-color-4-s), calc(var(--cd-color-4-l)*0.95))} diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100755 index 0000000..80e9c0a --- /dev/null +++ b/assets/css/style.scss @@ -0,0 +1,635 @@ +@import '../../../../codyhouse-framework/main/assets/css/_global.scss'; // ⚠️ make sure to import the CodyHouse framework +@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700'); // custom font + +// -------------------------------- + +// Add to Cart Interaction - by CodyHouse.co + +// -------------------------------- + +:root { + // colors + @include defineColorHSL(--cd-color-1, 210, 31%, 24%); // Pickled Bluewood + @include defineColorHSL(--cd-color-2, 204, 73%, 52%); // Curious Blue + @include defineColorHSL(--cd-color-3, 0, 0%, 100%); // White + @include defineColorHSL(--cd-color-4, 192, 15%, 94%); // Porcelain + @include defineColorHSL(--cd-color-5, 7, 80%, 56%); // Cinnabar + + // font + --font-primary: 'Source Sans Pro', sans-serif; +} + +.cd-cart::before { // dark bg layer visible when the cart is open + content: ''; + position: fixed; + z-index: 1; + height: 100%; + width: 100%; + top: 0; + left: 0; + background: rgba(#000, .5); + opacity: 0; + visibility: hidden; + transition: opacity .4s, visibility .4s; +} + +.cd-cart--open::before { + opacity: 1; + visibility: visible; +} + +.cd-cart__trigger, +.cd-cart__content { + position: fixed; + bottom: 20px; + right: 5%; + transition: transform .2s; + // Force Hardware Acceleration in WebKit + transform: translateZ(0); + will-change: transform; + backface-visibility: hidden; + + .cd-cart--empty & { // hide cart + transform: translateY(150px); + } + + @include breakpoint(lg) { + bottom: 40px; + } +} + +.cd-cart__trigger { // button that triggers the cart content + z-index: 3; + height: 72px; + width: 72px; + overflow: visible; + + &::after, &::before { // used to create the cart/'X' icon + content: ''; + position: absolute; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); + height: 100%; + width: 100%; + background: url(../img/cd-icons-cart-close.svg) no-repeat 0 0; + transition: opacity .2s, transform .2s; + } + + &::after { // 'X' icon + background-position: -72px 0; + opacity: 0; + transform: translateX(-50%) translateY(-50%) rotate(90deg); + } + + .cd-cart--open &::before { + opacity: 0; + } + + .cd-cart--open &::after { + opacity: 1; + transform: translateX(-50%) translateY(-50%); + } + + &:hover + .cd-cart__content .cd-cart__layout { + box-shadow: 0 6px 40px rgba(#000, .3); + } + + .cd-cart--open &:hover + .cd-cart__content .cd-cart__layout { + box-shadow: 0 4px 30px rgba(#000, .17); + } +} + +.cd-cart__count { // number of items indicator + position: absolute; + top: -10px; + right: -10px; + height: 28px; + width: 28px; + background: var(--cd-color-5); + color: var(--cd-color-3); + font-size: var(--text-sm); + font-weight: bold; + border-radius: 50%; + text-indent: 0; + transition: transform .2s .5s; + @include fontSmooth; + + li { // this is the number of items in the cart + position: absolute; + transform: translateZ(0); + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + animation-fill-mode: forwards; + animation-duration: .15s; + + &:last-of-type { + visibility: hidden; + } + } +} + +.cd-cart__count--update li:last-of-type { + animation-name: cd-qty-enter; +} + +.cd-cart__count--update li:first-of-type { + animation-name: cd-qty-leave; +} + +.cd-cart--open .cd-cart__count { + transition: transform .2s 0s; + transform: scale(0); +} + +.cd-cart--empty .cd-cart__count { // fix bug - when cart is empty, do not animate count + transform: scale(1); +} + +.cd-cart__content { // cart content + z-index: 2; + width: 90%; + max-width: 440px; + height: 400px; + max-height: 90%; + pointer-events: none; +} + +.cd-cart__layout { + position: absolute; + bottom: 0; + right: 0; + z-index: 2; + overflow: hidden; + height: 72px; + width: 72px; + border-radius: var(--radius); + transition: height .4s .1s, width .4s .1s, box-shadow .3s; + transition-timing-function: cubic-bezier(.67,.17,.32,.95); + background: var(--cd-color-3); + box-shadow: 0 4px 30px rgba(#000, .17); + pointer-events: auto; + // children alignment + display: flex; + flex-direction: column; +} + +.cd-cart--open .cd-cart__layout { + height: 100%; + width: 100%; + transition-delay: 0s; +} + +.cd-cart__header, .cd-cart__body { + opacity: 0; + padding-left: calc(var(--space-sm) *1.1); + padding-right: calc(var(--space-sm) *1.1); +} + +.cd-cart--open .cd-cart__header, +.cd-cart--open .cd-cart__body { + opacity: 1; +} + +.cd-cart__header { + position: relative; + z-index: 1; + flex-shrink: 0; + display: flex; + justify-content: space-between; + align-items: center; + border-radius: var(--radius) var(--radius) 0 0; + height: 40px; + line-height: 40px; + background-color: var(--cd-color-3); + transition: opacity .2s 0s; + border-bottom: 1px solid lightness(var(--cd-color-3), 0.9); + + h2 { + text-transform: uppercase; + display: inline-block; + font-size: calc(var(--text-xs)*1.1); + font-weight: 700; + letter-spacing: .1em; + } +} + +.cd-cart--open .cd-cart__header { + transition: opacity .2s .2s; +} + +.cd-cart__undo { + opacity: 0; + visibility: hidden; + transition: opacity .2s, visibility .2s; + color: lightness(var(--cd-color-1), 1.2); + font-size: var(--text-xs); + + a { + text-decoration: underline; + color: var(--cd-color-1); + + &:hover { + color: var(--cd-color-2); + } + } +} + +.cd-cart__undo--visible { + opacity: 1; + visibility: visible; +} + +.cd-cart__body { + flex-grow: 1; + padding-top: var(--space-sm); + padding-bottom: var(--space-sm); + overflow: auto; + -webkit-overflow-scrolling: touch; + transition: opacity .2s; + + ul { + position: relative; + padding-bottom: 60px; // make sure animation of last item is visible when it is removed from the cart + } + + @include breakpoint(md) { + ul { + padding-bottom: 90px; + } + } +} + +.cd-cart--open .cd-cart__body { + transition: opacity 0s; + + li { + transition: transform .3s .2s, opacity .3s .2s; + opacity: 1; + transform: translateX(0); + + &:nth-of-type(2) { + transition-duration: .4s; + } + + &:nth-of-type(3) { + transition-duration: .5s; + } + + &:nth-of-type(4), + &:nth-of-type(5) { + transition-duration: .55s; + } + } +} + +.cd-cart__product { + position: relative; + opacity: 0; + transform: translateX(80px); + transition: opacity 0s .2s, transform 0s .2s; + display: flex; + + &:not(:last-of-type) { + margin-bottom: 12px; // this value will be used in the cd-item-slide-out/cd-item-slide-in animations + } + + a { + text-decoration: none; + } +} + +.cd-cart__product--deleted { // this class is added to an item when it is removed form the cart + position: absolute; + left: 0; + width: 100%; + opacity: 0; + animation: cd-item-slide-out .3s forwards; +} + +.cd-cart__product--deleted.cd-cart__product--undo { // used to reinsert an item deleted from the cart when user clicks 'Undo' + animation: cd-item-slide-in .3s forwards; +} + +.cd-cart__product--deleted + .cd-cart__product { + animation: cd-item-move-up-mobile .3s; + animation-fill-mode: forwards; + + @include breakpoint(md) { + animation: cd-item-move-up .3s; + } +} + +.cd-cart__product--undo + .cd-cart__product { + animation: cd-item-move-down-mobile .3s; + animation-fill-mode: forwards; + + @include breakpoint(md) { + animation: cd-item-move-down .3s; + } +} + +.cd-cart__image { + display: inline-block; + // the image height determines the height of the list item - in this case height = width + width: 50px; + flex-shrink: 0; + + img { + display: block; + } + + @include breakpoint(md) { + width: 90px; + } +} + +.cd-cart__details { + position: relative; + display: flex; + align-content: flex-start; + flex-wrap: wrap; + flex-grow: 1; + padding-top: calc(var(--space-sm) * 1.1); + padding-left: calc(var(--space-xs) * 1.2); + + h3 { + font-weight: bold; + width: 70%; + font-size: calc(var(--text-sm)*1.15); + + a { + color: var(--cd-color-1); + + &:hover { + color: var(--cd-color-2); + } + } + } +} + +.cd-cart__price { + width: 30%; + text-align: right; + font-size: calc(var(--text-sm)*1.1); + font-weight: bold; +} + +.cd-cart__actions { + display: flex; + font-size: calc(var(--text-xs)*1.1); +} + +.cd-cart__delete-item, .cd-cart__quantity { + color: lightness(var(--cd-color-1), 1.2); + backface-visibility: hidden; +} + +.cd-cart__delete-item { + margin-right: var(--space-sm); + + &:hover { + color: var(--cd-color-5); + } +} + +.cd-cart__quantity { + display: flex; + + label { + margin-right: var(--space-xxs); + } +} + +.cd-cart__select { + position: relative; + + select { + position: relative; + padding: 0 var(--space-md) 0 0; + cursor: pointer; + color: currentColor; + + &:focus { + outline: none; + color: var(--cd-color-1); + box-shadow: 0 1px 0 currentColor; + } + } + + select::-ms-expand { // hide default select arrow on IE + display: none; + } + + .icon { // switcher arrow + position: absolute; + z-index: 1; + right: 0; + top: 50%; + transform: translateY(-50%); + display: block; + width: 12px; + height: 12px; + color: currentColor; + pointer-events: none; + } + + @include breakpoint(md) { + select { + padding-right: var(--space-sm); + } + } +} + +.cd-cart__footer { + position: absolute; + bottom: 0; + width: 100%; + border-radius: 0 0 var(--radius) var(--radius); + box-shadow: 0 -2px 20px rgba(#000, .15); + background: var(--cd-color-3); +} + +.cd-cart__checkout { + display: block; + height: 72px; + line-height: 72px; + margin-right: 72px; + background: var(--cd-color-2); + color: alpha(var(--cd-color-3), 0); + @include fontSmooth; + text-align: center; + font-size: var(--text-md); + font-weight: 600; + transition: all .2s 0s; + + &:hover { + background: lightness(var(--cd-color-2), 1.08); + } + + em { + position: relative; + display: inline-block; + transform: translateX(40px); + transition: transform 0s .2s; + } + + .icon { // arrow icon + position: absolute; + top: 50%; + transform: translateY(-50%); + right: 0; + opacity: 0; + transition: opacity .2s; + color: currentColor; + } +} + +.cd-cart--open .cd-cart__checkout { + color: var(--cd-color-3); + transition: color .2s .3s; + + em { + transform: translateX(0); + transition: transform .2s .3s, padding .2s 0s; + } + + &:hover em { + padding-right: 30px; + } + + &:hover .icon { + opacity: 1; + } +} + +@keyframes cd-qty-enter { + 0% { + opacity: 0; + visibility: hidden; + transform: translateX(-50%) translateY(0); + } + 100% { + opacity: 1; + visibility: visible; + transform: translateX(-50%) translateY(-50%); + } +} + +@keyframes cd-qty-leave { + 0% { + opacity: 1; + visibility: visible; + transform: translateX(-50%) translateY(-50%); + } + 100% { + opacity: 0; + visibility: hidden; + transform: translateX(-50%) translateY(-100%); + } +} + +@keyframes cd-item-move-up-mobile { + 0% { + padding-top: 62px; + } + 100% { + padding-top: 0px; + } +} + +@keyframes cd-item-move-up { + 0% { + padding-top: 102px; + } + 100% { + padding-top: 0px; + } +} + +@keyframes cd-item-move-down-mobile { + 0% { + padding-top: 0px; + } + 100% { + padding-top: 62px; + } +} + +@keyframes cd-item-move-down { + 0% { + padding-top: 0px; + } + 100% { + padding-top: 102px; + } +} + +@keyframes cd-item-slide-out { + 0% { + transform: translateX(0); + opacity: 1; + } + 100% { + transform: translateX(80px); + opacity: 0; + } +} + +@keyframes cd-item-slide-in { + 100% { + transform: translateX(0); + opacity: 1; + } + 0% { + transform: translateX(80px); + opacity: 0; + } +} + +// demo style +body { + background-color: var(--cd-color-4); +} + +.cd-main h1 { + color: var(--cd-color-1); +} + +.cd-add-to-cart, +.cd-article-link { + display: inline-block; + padding: var(--space-sm) var(--space-md); + border-radius: 50em; + text-transform: uppercase; + font-weight: 700; + letter-spacing: .1em; + text-decoration: none; + font-size: var(--text-sm); + transition: all .2s; +} + +.cd-add-to-cart { + background: var(--cd-color-2); + color: var(--cd-color-3); + box-shadow: 0 2px 10px rgba(#000, .2); + @include fontSmooth; + + &:hover { + background: lightness(var(--cd-color-2), 1.1); + } + + &:active { + transform: scale(.9); + } +} + +.cd-article-link { + color: var(--cd-color-1); + background-color: lightness(var(--cd-color-4), 0.9); + + &:hover { + background-color: lightness(var(--cd-color-4), 0.95); + } +} \ No newline at end of file diff --git a/assets/img/cd-icon-arrow-next.svg b/assets/img/cd-icon-arrow-next.svg new file mode 100644 index 0000000..f2a9928 --- /dev/null +++ b/assets/img/cd-icon-arrow-next.svg @@ -0,0 +1,6 @@ + + + + diff --git a/assets/img/cd-icon-select.svg b/assets/img/cd-icon-select.svg new file mode 100644 index 0000000..9722605 --- /dev/null +++ b/assets/img/cd-icon-select.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/cd-icons-cart-close.svg b/assets/img/cd-icons-cart-close.svg new file mode 100644 index 0000000..8ff2dd3 --- /dev/null +++ b/assets/img/cd-icons-cart-close.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/img/product-preview.png b/assets/img/product-preview.png similarity index 100% rename from img/product-preview.png rename to assets/img/product-preview.png diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100755 index 0000000..e0827bd --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,187 @@ +(function(){ + // Add to Cart Interaction - by CodyHouse.co + var cart = document.getElementsByClassName('js-cd-cart'); + if(cart.length > 0) { + var cartAddBtns = document.getElementsByClassName('js-cd-add-to-cart'), + cartBody = cart[0].getElementsByClassName('cd-cart__body')[0], + cartList = cartBody.getElementsByTagName('ul')[0], + cartListItems = cartList.getElementsByClassName('cd-cart__product'), + cartTotal = cart[0].getElementsByClassName('cd-cart__checkout')[0].getElementsByTagName('span')[0], + cartCount = cart[0].getElementsByClassName('cd-cart__count')[0], + cartCountItems = cartCount.getElementsByTagName('li'), + cartUndo = cart[0].getElementsByClassName('cd-cart__undo')[0], + productId = 0, //this is a placeholder -> use your real product ids instead + cartTimeoutId = false; + initCartEvents(); + + + function initCartEvents() { + // add products to cart + for(var i = 0; i < cartAddBtns.length; i++) {(function(i){ + cartAddBtns[i].addEventListener('click', addToCart); + })(i);} + + // open/close cart + cart[0].getElementsByClassName('cd-cart__trigger')[0].addEventListener('click', function(event){ + event.preventDefault(); + toggleCart(); + }); + + cart[0].addEventListener('click', function(event) { + if(event.target == cart[0]) { // close cart when clicking on bg layer + toggleCart(true); + } else if (event.target.closest('.cd-cart__delete-item')) { // remove product from cart + event.preventDefault(); + removeProduct(event.target.closest('.cd-cart__product')); + } + }); + + // update product quantity inside cart + cart[0].addEventListener('change', function(event) { + if(event.target.tagName.toLowerCase() == 'select') quickUpdateCart(); + }); + + //reinsert product deleted from the cart + cartUndo.addEventListener('click', function(event) { + if(event.target.tagName.toLowerCase() == 'a') { + event.preventDefault(); + if(cartTimeoutId) clearInterval(cartTimeoutId); + // reinsert deleted product + var deletedProduct = cartList.getElementsByClassName('cd-cart__product--deleted')[0]; + Util.addClass(deletedProduct, 'cd-cart__product--undo'); + deletedProduct.addEventListener('animationend', function cb(){ + deletedProduct.removeEventListener('animationend', cb); + Util.removeClass(deletedProduct, 'cd-cart__product--deleted cd-cart__product--undo'); + deletedProduct.removeAttribute('style'); + quickUpdateCart(); + }); + Util.removeClass(cartUndo, 'cd-cart__undo--visible'); + } + }); + }; + + function addToCart(event) { + event.preventDefault(); + var cartIsEmpty = Util.hasClass(cart[0], 'cd-cart--empty'); + //update cart product list + addProduct(this); + //update number of items + updateCartCount(cartIsEmpty); + //update total price + updateCartTotal(this.getAttribute('data-price'), true); + //show cart + Util.removeClass(cart[0], 'cd-cart--empty'); + }; + + function toggleCart(bool) { // toggle cart visibility + var cartIsOpen = ( typeof bool === 'undefined' ) ? Util.hasClass(cart[0], 'cd-cart--open') : bool; + + if( cartIsOpen ) { + Util.removeClass(cart[0], 'cd-cart--open'); + //reset undo + if(cartTimeoutId) clearInterval(cartTimeoutId); + Util.removeClass(cartUndo, 'cd-cart__undo--visible'); + removePreviousProduct(); // if a product was deleted, remove it definitively from the cart + + setTimeout(function(){ + cartBody.scrollTop = 0; + //check if cart empty to hide it + if( Number(cartCountItems[0].innerText) == 0) Util.addClass(cart[0], 'cd-cart--empty'); + }, 500); + } else { + Util.addClass(cart[0], 'cd-cart--open'); + } + }; + + function addProduct(target) { + // this is just a product placeholder + // you should insert an item with the selected product info + // replace productId, productName, price and url with your real product info + // you should also check if the product was already in the cart -> if it is, just update the quantity + productId = productId + 1; + var productAdded = '
  • placeholder

    Product Name

    $25.99
    Delete
  • '; + cartList.insertAdjacentHTML('beforeend', productAdded); + }; + + function removeProduct(product) { + if(cartTimeoutId) clearInterval(cartTimeoutId); + removePreviousProduct(); // prduct previously deleted -> definitively remove it from the cart + + var topPosition = product.offsetTop, + productQuantity = Number(product.getElementsByTagName('select')[0].value), + productTotPrice = Number((product.getElementsByClassName('cd-cart__price')[0].innerText).replace('$', '')) * productQuantity; + + product.style.top = topPosition+'px'; + Util.addClass(product, 'cd-cart__product--deleted'); + + //update items count + total price + updateCartTotal(productTotPrice, false); + updateCartCount(true, -productQuantity); + Util.addClass(cartUndo, 'cd-cart__undo--visible'); + + //wait 8sec before completely remove the item + cartTimeoutId = setTimeout(function(){ + Util.removeClass(cartUndo, 'cd-cart__undo--visible'); + removePreviousProduct(); + }, 8000); + }; + + function removePreviousProduct() { // definitively removed a product from the cart (undo not possible anymore) + var deletedProduct = cartList.getElementsByClassName('cd-cart__product--deleted'); + if(deletedProduct.length > 0 ) deletedProduct[0].remove(); + }; + + function updateCartCount(emptyCart, quantity) { + if( typeof quantity === 'undefined' ) { + var actual = Number(cartCountItems[0].innerText) + 1; + var next = actual + 1; + + if( emptyCart ) { + cartCountItems[0].innerText = actual; + cartCountItems[1].innerText = next; + } else { + Util.addClass(cartCount, 'cd-cart__count--update'); + + setTimeout(function() { + cartCountItems[0].innerText = actual; + }, 150); + + setTimeout(function() { + Util.removeClass(cartCount, 'cd-cart__count--update'); + }, 200); + + setTimeout(function() { + cartCountItems[1].innerText = next; + }, 230); + } + } else { + var actual = Number(cartCountItems[0].innerText) + quantity; + var next = actual + 1; + + cartCountItems[0].innerText = actual; + cartCountItems[1].innerText = next; + } + }; + + function updateCartTotal(price, bool) { + cartTotal.innerText = bool ? (Number(cartTotal.innerText) + Number(price)).toFixed(2) : (Number(cartTotal.innerText) - Number(price)).toFixed(2); + }; + + function quickUpdateCart() { + var quantity = 0; + var price = 0; + + for(var i = 0; i < cartListItems.length; i++) { + if( !Util.hasClass(cartListItems[i], 'cd-cart__product--deleted') ) { + var singleQuantity = Number(cartListItems[i].getElementsByTagName('select')[0].value); + quantity = quantity + singleQuantity; + price = price + singleQuantity*Number((cartListItems[i].getElementsByClassName('cd-cart__price')[0].innerText).replace('$', '')); + } + } + + cartTotal.innerText = price.toFixed(2); + cartCountItems[0].innerText = quantity; + cartCountItems[1].innerText = quantity+1; + }; + } +})(); \ No newline at end of file diff --git a/assets/js/util.js b/assets/js/util.js new file mode 100644 index 0000000..8286f57 --- /dev/null +++ b/assets/js/util.js @@ -0,0 +1,175 @@ +// Utility function +function Util () {}; + +/* + class manipulation functions +*/ +Util.hasClass = function(el, className) { + if (el.classList) return el.classList.contains(className); + else return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); +}; + +Util.addClass = function(el, className) { + var classList = className.split(' '); + if (el.classList) el.classList.add(classList[0]); + else if (!Util.hasClass(el, classList[0])) el.className += " " + classList[0]; + if (classList.length > 1) Util.addClass(el, classList.slice(1).join(' ')); +}; + +Util.removeClass = function(el, className) { + var classList = className.split(' '); + if (el.classList) el.classList.remove(classList[0]); + else if(Util.hasClass(el, classList[0])) { + var reg = new RegExp('(\\s|^)' + classList[0] + '(\\s|$)'); + el.className=el.className.replace(reg, ' '); + } + if (classList.length > 1) Util.removeClass(el, classList.slice(1).join(' ')); +}; + +Util.toggleClass = function(el, className, bool) { + if(bool) Util.addClass(el, className); + else Util.removeClass(el, className); +}; + +Util.setAttributes = function(el, attrs) { + for(var key in attrs) { + el.setAttribute(key, attrs[key]); + } +}; + +/* + DOM manipulation +*/ +Util.getChildrenByClassName = function(el, className) { + var children = el.children, + childrenByClass = []; + for (var i = 0; i < el.children.length; i++) { + if (Util.hasClass(el.children[i], className)) childrenByClass.push(el.children[i]); + } + return childrenByClass; +}; + +/* + Animate height of an element +*/ +Util.setHeight = function(start, to, element, duration, cb) { + var change = to - start, + currentTime = null; + + var animateHeight = function(timestamp){ + if (!currentTime) currentTime = timestamp; + var progress = timestamp - currentTime; + var val = parseInt((progress/duration)*change + start); + // console.log(val); + element.setAttribute("style", "height:"+val+"px;"); + if(progress < duration) { + window.requestAnimationFrame(animateHeight); + } else { + cb(); + } + }; + + //set the height of the element before starting animation -> fix bug on Safari + element.setAttribute("style", "height:"+start+"px;"); + window.requestAnimationFrame(animateHeight); +}; + +/* + Smooth Scroll +*/ + +Util.scrollTo = function(final, duration, cb) { + var start = window.scrollY || document.documentElement.scrollTop, + currentTime = null; + + var animateScroll = function(timestamp){ + if (!currentTime) currentTime = timestamp; + var progress = timestamp - currentTime; + if(progress > duration) progress = duration; + var val = Math.easeInOutQuad(progress, start, final-start, duration); + window.scrollTo(0, val); + if(progress < duration) { + window.requestAnimationFrame(animateScroll); + } else { + cb && cb(); + } + }; + + window.requestAnimationFrame(animateScroll); +}; + +/* + Focus utility classes +*/ + +//Move focus to an element +Util.moveFocus = function (element) { + if( !element ) element = document.getElementsByTagName("body")[0]; + element.focus(); + if (document.activeElement !== element) { + element.setAttribute('tabindex','-1'); + element.focus(); + } +}; + +/* + Misc +*/ + +Util.getIndexInArray = function(array, el) { + return Array.prototype.indexOf.call(array, el); +}; + +Util.cssSupports = function(property, value) { + if('CSS' in window) { + return CSS.supports(property, value); + } else { + var jsProperty = property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase();}); + return jsProperty in document.body.style; + } +}; + +/* + Polyfills +*/ +//Closest() method +if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; +} + +if (!Element.prototype.closest) { + Element.prototype.closest = function(s) { + var el = this; + if (!document.documentElement.contains(el)) return null; + do { + if (el.matches(s)) return el; + el = el.parentElement || el.parentNode; + } while (el !== null && el.nodeType === 1); + return null; + }; +} + +//Custom Event() constructor +if ( typeof window.CustomEvent !== "function" ) { + + function CustomEvent ( event, params ) { + params = params || { bubbles: false, cancelable: false, detail: undefined }; + var evt = document.createEvent( 'CustomEvent' ); + evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); + return evt; + } + + CustomEvent.prototype = window.Event.prototype; + + window.CustomEvent = CustomEvent; +} + +/* + Animation curves +*/ +Math.easeInOutQuad = function (t, b, c, d) { + t /= d/2; + if (t < 1) return c/2*t*t + b; + t--; + return -c/2 * (t*(t-2) - 1) + b; +}; \ No newline at end of file diff --git a/css/reset.css b/css/reset.css deleted file mode 100755 index bae9a91..0000000 --- a/css/reset.css +++ /dev/null @@ -1,48 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section, main { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/css/style.css b/css/style.css deleted file mode 100755 index 8871eb3..0000000 --- a/css/style.css +++ /dev/null @@ -1,793 +0,0 @@ -/* -------------------------------- - -Primary style - --------------------------------- */ -*, *::after, *::before { - box-sizing: border-box; -} - -html { - font-size: 62.5%; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font-size: 1.6rem; - font-family: "Source Sans Pro", sans-serif; - color: #2b3e51; - background-color: #ecf0f1; -} - -a { - color: #2c97de; - text-decoration: none; -} - -img { - max-width: 100%; -} - -main { - text-align: center; - padding: 2em 5%; -} - -h1 { - font-size: 2rem; - padding: 3em 0 .8em; -} -@media only screen and (min-width: 768px) { - h1 { - font-size: 3.2rem; - } -} - -.cd-add-to-cart { - display: inline-block; - padding: 1.2em 1.8em; - background: #2c97de; - border-radius: 50em; - text-transform: uppercase; - color: #ffffff; - font-weight: 700; - letter-spacing: .1em; - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); - -webkit-transition: all .2s; - transition: all .2s; -} -.cd-add-to-cart:hover { - background: #42a2e1; -} -.cd-add-to-cart:active { - -webkit-transform: scale(0.9); - -ms-transform: scale(0.9); - transform: scale(0.9); -} - -/* -------------------------------- - -Main Components - --------------------------------- */ -.cd-cart-container::before { - /* dark bg layer visible when the cart is open */ - content: ''; - position: fixed; - z-index: 1; - height: 100vh; - width: 100vw; - top: 0; - left: 0; - background: rgba(0, 0, 0, 0.5); - opacity: 0; - visibility: hidden; - -webkit-transition: opacity .4s, visibility .4s; - transition: opacity .4s, visibility .4s; -} - -.cd-cart-container.cart-open::before { - opacity: 1; - visibility: visible; -} - -.cd-cart-trigger, -.cd-cart { - position: fixed; - bottom: 20px; - right: 5%; - -webkit-transition: -webkit-transform .2s; - transition: -webkit-transform .2s; - transition: transform .2s; - transition: transform .2s, -webkit-transform .2s; - /* Force Hardware Acceleration in WebKit */ - -webkit-transform: translateZ(0); - transform: translateZ(0); - -webkit-backface-visibility: hidden; - will-change: transform; - backface-visibility: hidden; -} -.empty .cd-cart-trigger, .empty -.cd-cart { - /* hide cart */ - -webkit-transform: translateY(150px); - -ms-transform: translateY(150px); - transform: translateY(150px); -} -@media only screen and (min-width: 1170px) { - .cd-cart-trigger, - .cd-cart { - bottom: 40px; - } -} - -.cd-cart-trigger { - /* button that triggers the cart content */ - z-index: 3; - height: 72px; - width: 72px; - /* replace text with image */ - text-indent: 100%; - color: transparent; - white-space: nowrap; -} -.cd-cart-trigger::after, .cd-cart-trigger::before { - /* used to create the cart/'X' icon */ - content: ''; - position: absolute; - left: 50%; - top: 50%; - bottom: auto; - right: auto; - -webkit-transform: translateX(-50%) translateY(-50%); - -ms-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); - height: 100%; - width: 100%; - background: url(../img/cd-icons-cart-close.svg) no-repeat 0 0; - -webkit-transition: opacity .2s, -webkit-transform .2s; - transition: opacity .2s, -webkit-transform .2s; - transition: opacity .2s, transform .2s; - transition: opacity .2s, transform .2s, -webkit-transform .2s; -} -.cd-cart-trigger::after { - /* 'X' icon */ - background-position: -72px 0; - opacity: 0; - -webkit-transform: translateX(-50%) translateY(-50%) rotate(90deg); - -ms-transform: translateX(-50%) translateY(-50%) rotate(90deg); - transform: translateX(-50%) translateY(-50%) rotate(90deg); -} -.cart-open .cd-cart-trigger::before { - opacity: 0; -} -.cart-open .cd-cart-trigger::after { - opacity: 1; - -webkit-transform: translateX(-50%) translateY(-50%); - -ms-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); -} -.cd-cart-trigger .count { - /* number of items indicator */ - position: absolute; - top: -10px; - right: -10px; - height: 28px; - width: 28px; - background: #e94b35; - color: #ffffff; - font-size: 1.5rem; - font-weight: bold; - border-radius: 50%; - text-indent: 0; - -webkit-transition: -webkit-transform .2s .5s; - transition: -webkit-transform .2s .5s; - transition: transform .2s .5s; - transition: transform .2s .5s, -webkit-transform .2s .5s; -} -.cd-cart-trigger .count li { - /* this is the number of items in the cart */ - position: absolute; - -webkit-transform: translateZ(0); - transform: translateZ(0); - left: 50%; - top: 50%; - bottom: auto; - right: auto; - -webkit-transform: translateX(-50%) translateY(-50%); - -ms-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); -} -.cd-cart-trigger .count li:last-of-type { - visibility: hidden; -} -.cd-cart-trigger .count.update-count li:last-of-type { - -webkit-animation: cd-qty-enter .15s; - animation: cd-qty-enter .15s; - -webkit-animation-direction: forwards; - animation-direction: forwards; -} -.cd-cart-trigger .count.update-count li:first-of-type { - -webkit-animation: cd-qty-leave .15s; - animation: cd-qty-leave .15s; - -webkit-animation-direction: forwards; - animation-direction: forwards; -} -.cart-open .cd-cart-trigger .count { - -webkit-transition: -webkit-transform .2s 0s; - transition: -webkit-transform .2s 0s; - transition: transform .2s 0s; - transition: transform .2s 0s, -webkit-transform .2s 0s; - -webkit-transform: scale(0); - -ms-transform: scale(0); - transform: scale(0); -} -.empty .cd-cart-trigger .count { - /* fix bug - when cart is empty, do not animate count */ - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); -} -.cd-cart-trigger:hover + div .wrapper { - box-shadow: 0 6px 40px rgba(0, 0, 0, 0.3); -} -.cart-open .cd-cart-trigger:hover + div .wrapper { - box-shadow: 0 4px 30px rgba(0, 0, 0, 0.17); -} - -.cd-cart { - /* cart content */ - z-index: 2; - width: 90%; - max-width: 440px; - height: 400px; - max-height: 90%; - pointer-events: none; -} -.cd-cart .wrapper { - position: absolute; - bottom: 0; - right: 0; - z-index: 2; - overflow: hidden; - height: 72px; - width: 72px; - border-radius: 6px; - -webkit-transition: height .4s .1s, width .4s .1s, box-shadow .3s; - transition: height .4s .1s, width .4s .1s, box-shadow .3s; - -webkit-transition-timing-function: cubic-bezier(0.67, 0.17, 0.32, 0.95); - transition-timing-function: cubic-bezier(0.67, 0.17, 0.32, 0.95); - background: #ffffff; - box-shadow: 0 4px 30px rgba(0, 0, 0, 0.17); - pointer-events: auto; -} -.cd-cart header, .cd-cart footer { - position: absolute; - z-index: 2; - left: 0; - width: 100%; -} -.cd-cart header, .cd-cart .body { - opacity: 0; -} -.cd-cart header { - top: 0; - border-radius: 6px 6px 0 0; - padding: 0 1.4em; - height: 40px; - line-height: 40px; - background-color: #ffffff; - -webkit-transition: opacity .2s 0s; - transition: opacity .2s 0s; - border-bottom: 1px solid #e6e6e6; -} -.cd-cart header::after { - clear: both; - content: ""; - display: block; -} -.cd-cart footer { - bottom: 0; - border-radius: 0 0 6px 6px; - box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15); - background: #ffffff; -} -.cd-cart h2 { - text-transform: uppercase; - display: inline-block; - font-size: 1.4rem; - font-weight: 700; - letter-spacing: .1em; -} -.cd-cart .undo { - float: right; - font-size: 1.2rem; - opacity: 0; - visibility: hidden; - -webkit-transition: opacity .2s, visibility .2s; - transition: opacity .2s, visibility .2s; - color: #808b97; -} -.cd-cart .undo a { - text-decoration: underline; - color: #2b3e51; -} -.cd-cart .undo a:hover { - color: #2c97de; -} -.cd-cart .undo.visible { - opacity: 1; - visibility: visible; -} -.cd-cart .checkout { - display: block; - height: 72px; - line-height: 72px; - margin-right: 72px; - background: #2c97de; - color: rgba(255, 255, 255, 0); - text-align: center; - font-size: 1.8rem; - font-weight: 600; - -webkit-transition: all .2s 0s; - transition: all .2s 0s; -} -.cd-cart .checkout:hover { - background: #399ee0; -} -.cd-cart .checkout em { - position: relative; - display: inline-block; - -webkit-transform: translateX(40px); - -ms-transform: translateX(40px); - transform: translateX(40px); - -webkit-transition: -webkit-transform 0s .2s; - transition: -webkit-transform 0s .2s; - transition: transform 0s .2s; - transition: transform 0s .2s, -webkit-transform 0s .2s; -} -.cd-cart .checkout em::after { - position: absolute; - top: 50%; - bottom: auto; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - right: 0; - content: ''; - height: 24px; - width: 24px; - background: url(../img/cd-icon-arrow-next.svg) no-repeat center center; - opacity: 0; - -webkit-transition: opacity .2s; - transition: opacity .2s; -} -.cd-cart .body { - position: relative; - z-index: 1; - height: calc(100% - 40px); - padding: 20px 0 10px; - margin: 40px 0 10px; - overflow: auto; - -webkit-overflow-scrolling: touch; - -webkit-transition: opacity .2s; - transition: opacity .2s; -} -.cd-cart .body ul { - overflow: hidden; - padding: 0 1.4em; - position: relative; - padding-bottom: 90px; -} -.cd-cart .body li { - position: relative; - opacity: 0; - -webkit-transform: translateX(80px); - -ms-transform: translateX(80px); - transform: translateX(80px); - -webkit-transition: opacity 0s .2s, -webkit-transform 0s .2s; - transition: opacity 0s .2s, -webkit-transform 0s .2s; - transition: opacity 0s .2s, transform 0s .2s; - transition: opacity 0s .2s, transform 0s .2s, -webkit-transform 0s .2s; -} -.cd-cart .body li::after { - clear: both; - content: ""; - display: block; -} -.cd-cart .body li:not(:last-of-type) { - margin-bottom: 20px; -} -.cd-cart .body li.deleted { - /* this class is added to an item when it is removed form the cart */ - position: absolute; - left: 1.4em; - width: calc(100% - 2.8em); - opacity: 0; - -webkit-animation: cd-item-slide-out .3s forwards; - animation: cd-item-slide-out .3s forwards; -} -.cd-cart .body li.deleted.undo-deleted { - /* used to reinsert an item deleted from the cart when user clicks 'Undo' */ - -webkit-animation: cd-item-slide-in .3s forwards; - animation: cd-item-slide-in .3s forwards; -} -.cd-cart .body li.deleted + li { - -webkit-animation: cd-item-move-up-mobile .3s; - animation: cd-item-move-up-mobile .3s; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; -} -.cd-cart .body li.undo-deleted + li { - -webkit-animation: cd-item-move-down-mobile .3s; - animation: cd-item-move-down-mobile .3s; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; -} -.cd-cart .product-image { - display: inline-block; - float: left; - /* the image height determines the height of the list item - in this case height = width */ - width: 50px; -} -.cd-cart .product-image img { - display: block; -} -.cd-cart .product-details { - position: relative; - display: inline-block; - float: right; - width: calc( 100% - 50px); - padding: 0.3em 0 0 0.5em; -} -.cd-cart .product-details::after { - clear: both; - content: ""; - display: block; -} -.cd-cart h3, .cd-cart .price { - font-weight: bold; -} -.cd-cart h3 { - width: 70%; - float: left; - /* truncate title with dots if too long */ - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} -.cd-cart h3 a { - color: #2b3e51; -} -.cd-cart h3 a:hover { - color: #2c97de; -} -.cd-cart .price { - float: right; - width: 30%; - text-align: right; -} -.cd-cart .actions { - font-size: 1.4rem; - height: 1.6em; - line-height: 1.6em; -} -.cd-cart .actions::after { - clear: both; - content: ""; - display: block; -} -.cd-cart .delete-item, .cd-cart .quantity { - float: left; - color: #808b97; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} -.cd-cart .delete-item { - margin-right: 1em; -} -.cd-cart .delete-item:hover { - color: #e94b35; -} -.cd-cart .quantity label { - display: inline-block; - margin-right: .3em; -} -.cd-cart .select { - position: relative; -} -.cd-cart .select::after { - /* switcher arrow for select element */ - content: ''; - position: absolute; - z-index: 1; - right: 0; - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - display: block; - width: 12px; - height: 12px; - background: url(../img/cd-icon-select.svg) no-repeat center center; - pointer-events: none; -} -.cd-cart select { - position: relative; - padding: 0 1em 0 0; - cursor: pointer; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background: transparent; - border: none; - border-radius: 0; - font-size: 1.4rem; - margin: 0; - color: #808b97; -} -.cd-cart select:focus { - outline: none; - color: #2b3e51; - box-shadow: 0 1px 0 currentColor; -} -.cd-cart select::-ms-expand { - /* hide default select arrow on IE */ - display: none; -} -.cart-open .cd-cart .wrapper { - height: 100%; - width: 100%; - -webkit-transition-delay: 0s; - transition-delay: 0s; -} -.cart-open .cd-cart header, .cart-open .cd-cart .body { - opacity: 1; -} -.cart-open .cd-cart header { - -webkit-transition: opacity .2s .2s; - transition: opacity .2s .2s; -} -.cart-open .cd-cart .body { - -webkit-transition: opacity 0s; - transition: opacity 0s; -} -.cart-open .cd-cart .body li { - -webkit-transition: opacity .3s .2s, -webkit-transform .3s .2s; - transition: opacity .3s .2s, -webkit-transform .3s .2s; - transition: transform .3s .2s, opacity .3s .2s; - transition: transform .3s .2s, opacity .3s .2s, -webkit-transform .3s .2s; - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); -} -.cart-open .cd-cart .body li:nth-of-type(2) { - -webkit-transition-duration: .4s; - transition-duration: .4s; -} -.cart-open .cd-cart .body li:nth-of-type(3) { - -webkit-transition-duration: .5s; - transition-duration: .5s; -} -.cart-open .cd-cart .body li:nth-of-type(4), .cart-open .cd-cart .body li:nth-of-type(5) { - -webkit-transition-duration: .55s; - transition-duration: .55s; -} -.cart-open .cd-cart .checkout { - color: #ffffff; - -webkit-transition: color .2s .3s; - transition: color .2s .3s; -} -.cart-open .cd-cart .checkout em { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - -webkit-transition: padding .2s 0s, -webkit-transform .2s .3s; - transition: padding .2s 0s, -webkit-transform .2s .3s; - transition: transform .2s .3s, padding .2s 0s; - transition: transform .2s .3s, padding .2s 0s, -webkit-transform .2s .3s; -} -.cart-open .cd-cart .checkout:hover em { - padding-right: 30px; -} -.cart-open .cd-cart .checkout:hover em::after { - opacity: 1; -} -@media only screen and (min-width: 768px) { - .cd-cart .body li:not(:last-of-type) { - margin-bottom: 14px; - } - .cd-cart .body li.deleted + li { - -webkit-animation: cd-item-move-up .3s; - animation: cd-item-move-up .3s; - } - .cd-cart .body li.undo-deleted + li { - -webkit-animation: cd-item-move-down .3s; - animation: cd-item-move-down .3s; - } - .cd-cart .checkout { - font-size: 2.4rem; - } - .cd-cart .product-image { - width: 90px; - } - .cd-cart .product-details { - padding: 1.4em 0 0 1em; - width: calc( 100% - 90px); - } - .cd-cart h3, .cd-cart .price { - font-size: 1.8rem; - } -} - -@-webkit-keyframes cd-qty-enter { - 0% { - opacity: 0; - visibility: hidden; - -webkit-transform: translateX(-50%) translateY(0); - transform: translateX(-50%) translateY(0); - } - 100% { - opacity: 1; - visibility: visible; - -webkit-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); - } -} - -@keyframes cd-qty-enter { - 0% { - opacity: 0; - visibility: hidden; - -webkit-transform: translateX(-50%) translateY(0); - transform: translateX(-50%) translateY(0); - } - 100% { - opacity: 1; - visibility: visible; - -webkit-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); - } -} -@-webkit-keyframes cd-qty-leave { - 0% { - opacity: 1; - visibility: visible; - -webkit-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); - } - 100% { - opacity: 0; - visibility: hidden; - -webkit-transform: translateX(-50%) translateY(-100%); - transform: translateX(-50%) translateY(-100%); - } -} -@keyframes cd-qty-leave { - 0% { - opacity: 1; - visibility: visible; - -webkit-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); - } - 100% { - opacity: 0; - visibility: hidden; - -webkit-transform: translateX(-50%) translateY(-100%); - transform: translateX(-50%) translateY(-100%); - } -} -@-webkit-keyframes cd-item-move-up-mobile { - 0% { - padding-top: 70px; - } - 100% { - padding-top: 0px; - } -} -@keyframes cd-item-move-up-mobile { - 0% { - padding-top: 70px; - } - 100% { - padding-top: 0px; - } -} -@-webkit-keyframes cd-item-move-up { - 0% { - padding-top: 104px; - } - 100% { - padding-top: 0px; - } -} -@keyframes cd-item-move-up { - 0% { - padding-top: 104px; - } - 100% { - padding-top: 0px; - } -} -@-webkit-keyframes cd-item-move-down-mobile { - 0% { - padding-top: 0px; - } - 100% { - padding-top: 70px; - } -} -@keyframes cd-item-move-down-mobile { - 0% { - padding-top: 0px; - } - 100% { - padding-top: 70px; - } -} -@-webkit-keyframes cd-item-move-down { - 0% { - padding-top: 0px; - } - 100% { - padding-top: 104px; - } -} -@keyframes cd-item-move-down { - 0% { - padding-top: 0px; - } - 100% { - padding-top: 104px; - } -} -@-webkit-keyframes cd-item-slide-out { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - opacity: 1; - } - 100% { - -webkit-transform: translateX(80px); - transform: translateX(80px); - opacity: 0; - } -} -@keyframes cd-item-slide-out { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - opacity: 1; - } - 100% { - -webkit-transform: translateX(80px); - transform: translateX(80px); - opacity: 0; - } -} -@-webkit-keyframes cd-item-slide-in { - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - opacity: 1; - } - 0% { - -webkit-transform: translateX(80px); - transform: translateX(80px); - opacity: 0; - } -} -@keyframes cd-item-slide-in { - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - opacity: 1; - } - 0% { - -webkit-transform: translateX(80px); - transform: translateX(80px); - opacity: 0; - } -} diff --git a/img/cd-icon-arrow-next.svg b/img/cd-icon-arrow-next.svg deleted file mode 100644 index 9ae328f..0000000 --- a/img/cd-icon-arrow-next.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/img/cd-icon-select.svg b/img/cd-icon-select.svg deleted file mode 100644 index 08d1da7..0000000 --- a/img/cd-icon-select.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/img/cd-icons-cart-close.svg b/img/cd-icons-cart-close.svg deleted file mode 100644 index 0bc843c..0000000 --- a/img/cd-icons-cart-close.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/index.html b/index.html index d76ea9c..3b7f187 100755 --- a/index.html +++ b/index.html @@ -1,53 +1,57 @@ - + - - - - - - - Add to Cart Interaction | CodyHouse + + + + + Add to Cart Interaction | CodyHouse -
    -

    Add to Cart Interaction

    - Add To Cart +
    +
    +

    Add to Cart Interaction

    +

    + 📝 View Tutorial + Add To Cart +

    +
    -
    - +
    + Cart -
      +
      • 0
      • 0
      • -
      +
    -
    -
    -
    +
    +
    +

    Cart

    - Item removed. Undo + Item removed. Undo
    - -
    -
    - - - - +
    +
    + + \ No newline at end of file diff --git a/js/jquery-3.0.0.min.js b/js/jquery-3.0.0.min.js deleted file mode 100644 index 62d410d..0000000 --- a/js/jquery-3.0.0.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v3.0.0 | (c) jQuery Foundation | jquery.org/license */ -!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.0.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return a&&"[object Object]"===k.call(a)?(b=e(a))?(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n):!0:!1},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;d>f;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a)?(d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e):void 0},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"===c||r.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\x00"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[0>c?c+b:c]}),even:pa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,e>i&&ya(a.slice(i,e)),f>e&&ya(a=a.slice(e)),f>e&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;d>b;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;d>b;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(f>b)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(1>=b&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){ -return j.call(r(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthf;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;g>f;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;d>c;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;o>n;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;cc;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;m>l;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;i>l;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;e>d;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;e>d;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;f>=g;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",fontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),0>=d||null==d){if(d=Ma(a,b,f),(0>d||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"===e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){return c?!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)}):void 0},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){return b?(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;e>g;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);g>f;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;e>d;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c); -}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){return r.isArray(b)?a.checked=r.inArray(r(a).val(),b)>-1:void 0}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?r.event.trigger(a,b,c,!0):void 0}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",0>b&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;return o.cors||Pb&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("