/*
mainscript.js
*/
// toggle footer
// footer-icons-define
var footer_icon_plus = 'icon-plus-sign';
var footer_icon_minus = 'icon-minus-sign';
// footer-change-script
var responsiveflagfooter = false;
function accordionfooter(status){
if(status == 'enable'){
$('.modules .block em').on('click', function(){
$(this).toggleclass('active').parent().find('.toggle_content').stop().slidetoggle('medium', function(){
if($(this).prev().hasclass('active')) {
$(this).prev().children('i').removeclass(footer_icon_plus).addclass(footer_icon_minus);
}
else {
$(this).prev().children('i').removeclass(footer_icon_minus).addclass(footer_icon_plus);
}
});
})
$('.modules').addclass('accordion').find('.toggle_content').slideup('fast');
}else{
$('.modules span').removeclass('active').off().parent().find('.toggle_content').removeattr('style').slidedown('fast');
$('.modules span i').removeclass(footer_icon_minus).addclass(footer_icon_plus);
$('.modules').removeclass('accordion');
}
}
function todofooter(){
if ($(document).width() <= 992 && responsiveflagfooter == false){
accordionfooter('enable');
responsiveflagfooter = true;
}
else if ($(document).width() >= 992){
accordionfooter('disable');
responsiveflagfooter = false;
}
}
$(document).ready(todofooter);
$(window).resize(todofooter);
// toggle page product (tab)
// products-icons-define
var product_icon_plus = 'icon-plus-sign-alt';
var product_icon_minus = 'icon-minus-sign-alt';
var responsiveflagpage = false;
function accordionpage(status){
if(status == 'enable'){
$('.page_product_box em').on('click', function(){
$(this).toggleclass('activetab').parent().find('.toggle_content').stop().slidetoggle('medium', function(){
if($(this).prev().hasclass('activetab')) {
$(this).prev().children('i').removeclass(product_icon_minus).addclass(product_icon_plus);
}
else {
$(this).prev().children('i').removeclass(product_icon_plus).addclass(product_icon_minus);
}
});
})
$('#center_column .page_product_box').addclass('accordion').find('.toggle_content').slidedown('fast');
}else{
$('#center_column .page_product_box h3').removeclass('activetab').off().parent().find('.toggle_content').removeattr('style').slidedown('fast');
$('.page_product_box h3 i').removeclass(product_icon_plus).addclass(product_icon_minus);
$('#center_column .page_product_box').removeclass('accordion');
}
}
function todopage(){
if ($(document).width() <= 992 && responsiveflagpage == false){
accordionpage('enable');
responsiveflagpage = true;
}
else if ($(document).width() >= 992){
accordionpage('disable');
responsiveflagpage = false;
}
}
$(document).ready(todopage);
$(window).resize(todopage);
// toggle columns
// columns-icons-define
var columns_icon_plus = 'icon-plus-sign';
var columns_icon_minus = 'icon-minus-sign';
// columns-change-script
var responsiveflag = false;
function accordion(status){
leftcolumnblocks = $('#left_column');
if(status == 'enable'){
$('#left_column').remove();
$(leftcolumnblocks).insertafter('#center_column').find('#categories_block_left ul.toggle_content').slidetoggle('fast');
$('#right_column span, #left_column span').on('click', function(){
$(this).toggleclass('active').parent().find('.toggle_content').stop().slidetoggle('medium', function(){
if($(this).prev().hasclass('active')) {
$(this).prev().children('i').removeclass(columns_icon_plus).addclass(columns_icon_minus);
}
else {
$(this).prev().children('i').removeclass(columns_icon_minus).addclass(columns_icon_plus);
}
});
})
$('#right_column, #left_column').addclass('accordion').find('.toggle_content').slideup('fast');
}else{
$('#left_column').remove();
$(leftcolumnblocks).insertbefore('#center_column');
$('#right_column span, #left_column span').removeclass('active').off().parent().find('.toggle_content').removeattr('style').slidedown('fast');
$('#right_column span i, #left_column span i').removeclass(columns_icon_minus).addclass(columns_icon_plus);
$('#left_column, #right_column').removeclass('accordion');
}
}
function todo(){
if ($(document).width() <= 992 && responsiveflag == false){
accordion('enable');
responsiveflag = true;
if (typeof(categoryreload) != "undefined") {
categoryreload()
}
}
else if ($(document).width() >= 992){
accordion('disable');
responsiveflag = false;
if (typeof(categoryreload) != "undefined") {
categoryreload()
}
}
}
$(document).ready(todo);
$(window).resize(todo);
// toggle footer
// footer-icons-define
var footer_icon_plus = 'icon-plus-sign';
var footer_icon_minus = 'icon-minus-sign';
// footer-change-script
var responsiveflagfooter = false;
function accordionfooter(status){
if(status == 'enable'){
$('.modules .block h4').on('click', function(){
$(this).toggleclass('active').parent().find('.toggle_content').stop().slidetoggle('medium', function(){
if($(this).prev().hasclass('active')) {
$(this).prev().children('i').removeclass(footer_icon_plus).addclass(footer_icon_minus);
}
else {
$(this).prev().children('i').removeclass(footer_icon_minus).addclass(footer_icon_plus);
}
});
})
$('.modules').addclass('accordion').find('.toggle_content').slideup('fast');
}else{
$('.modules h4').removeclass('active').off().parent().find('.toggle_content').removeattr('style').slidedown('fast');
$('.modules h4 i').removeclass(footer_icon_minus).addclass(footer_icon_plus);
$('.modules').removeclass('accordion');
}
}
function todofooter(){
if ($(document).width() <= 767 && responsiveflagfooter == false){
accordionfooter('enable');
responsiveflagfooter = true;
}
else if ($(document).width() >= 768){
accordionfooter('disable');
responsiveflagfooter = false;
}
}
$(document).ready(todofooter);
$(window).resize(todofooter);
/*
smoothproducts.min
*/
!function(a){a.fn.extend({smoothproducts:function(){function b(){a(".sp-selected").removeclass("sp-selected"),a(".sp-lightbox").fadeout(function(){a(this).remove()})}function c(a){return a.match(/url\([\"\']{0,1}(.+)[\"\']{0,1}\)+/i)[1]}a(".sp-loading").hide(),a(".sp-wrap").each(function(){a(this).addclass("sp-touch");var b=a("a",this).length;if(b>1){var c,d,e=a("a.sp-default",this)[0]?!0:!1;a(this).append('
'),a("a",this).each(function(b){var f=a("img",this).attr("src"),g=a(this).attr("href"),h="";(0===b&&!e||a(this).hasclass("sp-default"))&&(h=' class="sp-current"',c=g,d=a("img",this)[0].src),a(this).parents(".sp-wrap").find(".sp-thumbs").append('"),a(this).remove()}),a(".sp-large",this).append(''),a(".sp-wrap").css("display","inline-block")}else a(this).append(''),a("a",this).appendto(a(".sp-large",this)).addclass(".sp-current-big"),a(".sp-wrap").css("display","inline-block")}),a(document.body).on("click",".sp-thumbs",function(a){a.preventdefault()}),a(document.body).on("mouseover",function(b){a(".sp-wrap").removeclass("sp-touch").addclass("sp-non-touch"),b.preventdefault()}),a(document.body).on("touchstart",function(){a(".sp-wrap").removeclass("sp-non-touch").addclass("sp-touch")}),a(document.body).on("click",".sp-tb-active a",function(b){b.preventdefault(),a(this).parent().find(".sp-current").removeclass(),a(this).addclass("sp-current"),a(this).parents(".sp-wrap").find(".sp-thumbs").removeclass("sp-tb-active"),a(this).parents(".sp-wrap").find(".sp-zoom").remove();var d=a(this).parents(".sp-wrap").find(".sp-large").height(),e=a(this).parents(".sp-wrap").find(".sp-large").width();a(this).parents(".sp-wrap").find(".sp-large").css({overflow:"hidden",height:d+"px",width:e+"px"}),a(this).addclass("sp-current").parents(".sp-wrap").find(".sp-large a").remove();var f=a(this).parent().find(".sp-current").attr("href"),g=c(a(this).parent().find(".sp-current").css("backgroundimage"));a(this).parents(".sp-wrap").find(".sp-large").html(''),a(this).parents(".sp-wrap").find(".sp-large").hide().fadein(250,function(){var b=a(this).parents(".sp-wrap").find(".sp-large img").height();a(this).parents(".sp-wrap").find(".sp-large").animate({height:b},"fast",function(){a(".sp-large").css({height:"auto",width:"auto"})}),a(this).parents(".sp-wrap").find(".sp-thumbs").addclass("sp-tb-active")})}),a(document.body).on("mouseenter",".sp-non-touch .sp-large",function(b){var c=a("a",this).attr("href");a(this).append(''),a(this).find(".sp-zoom").fadein(250),b.preventdefault()}),a(document.body).on("mouseleave",".sp-non-touch .sp-large",function(b){a(this).find(".sp-zoom").fadeout(250,function(){a(this).remove()}),b.preventdefault()}),a(document.body).on("click",".sp-non-touch .sp-zoom",function(b){var c=a(this).html(),d=a(this).parents(".sp-wrap").find(".sp-thumbs a").length,e=a(this).parents(".sp-wrap").find(".sp-thumbs .sp-current").index()+1;a(this).parents(".sp-wrap").addclass("sp-selected"),a("body").append(""+c+"
"),d>1&&(a(".sp-lightbox").append(""),1==e?a("#sp-prev").css("opacity",".1"):e==d&&a("#sp-next").css("opacity",".1")),a(".sp-lightbox").fadein(),b.preventdefault()}),a(document.body).on("click",".sp-large a",function(b){var c=a(this).attr("href"),d=a(this).parents(".sp-wrap").find(".sp-thumbs a").length,e=a(this).parents(".sp-wrap").find(".sp-thumbs .sp-current").index()+1;a(this).parents(".sp-wrap").addclass("sp-selected"),a("body").append(''),d>1&&(a(".sp-lightbox").append(""),1==e?a("#sp-prev").css("opacity",".1"):e==d&&a("#sp-next").css("opacity",".1")),a(".sp-lightbox").fadein(),b.preventdefault()}),a(document.body).on("click","#sp-next",function(b){b.stoppropagation();var d=a(".sp-lightbox").data("currenteq"),e=a(".sp-selected .sp-thumbs a").length;if(d>=e);else{var f=d+1,g=a(".sp-selected .sp-thumbs").find("a:eq("+d+")").attr("href"),h=c(a(".sp-selected .sp-thumbs").find("a:eq("+d+")").css("backgroundimage"));d==e-1&&a("#sp-next").css("opacity",".1"),a("#sp-prev").css("opacity","1"),a(".sp-selected .sp-current").removeclass(),a(".sp-selected .sp-thumbs a:eq("+d+")").addclass("sp-current"),a(".sp-selected .sp-large").empty().append("'),a(".sp-lightbox img").fadeout(250,function(){a(this).remove(),a(".sp-lightbox").data("currenteq",f).append(''),a(".sp-lightbox img").hide().fadein(250)})}b.preventdefault()}),a(document.body).on("click","#sp-prev",function(b){b.stoppropagation();var d=a(".sp-lightbox").data("currenteq"),d=d-1;if(0>=d);else{1==d&&a("#sp-prev").css("opacity",".1");var e=d-1,f=a(".sp-selected .sp-thumbs").find("a:eq("+e+")").attr("href"),g=c(a(".sp-selected .sp-thumbs").find("a:eq("+e+")").css("backgroundimage"));a("#sp-next").css("opacity","1"),a(".sp-selected .sp-current").removeclass(),a(".sp-selected .sp-thumbs a:eq("+e+")").addclass("sp-current"),a(".sp-selected .sp-large").empty().append("'),a(".sp-lightbox img").fadeout(250,function(){a(this).remove(),a(".sp-lightbox").data("currenteq",d).append(''),a(".sp-lightbox img").hide().fadein(250)})}b.preventdefault()}),a(document.body).on("click",".sp-lightbox",function(){b()}),a(document).keydown(function(a){return 27==a.keycode?(b(),!1):void 0}),a(".sp-large").mousemove(function(b){var c=a(this).width(),d=a(this).height(),e=a(this).find(".sp-zoom").width(),f=a(this).find(".sp-zoom").height(),g=a(this).parent().offset(),h=b.pagex-g.left,i=b.pagey-g.top,j=math.floor(h*(c-e)/c),k=math.floor(i*(d-f)/d);a(this).find(".sp-zoom").css({left:j,top:k})})}})}(jquery);
/*!
* velocity.js: accelerated javascript animation.
* @version 0.2.0
* @docs http://velocityjs.org
* @license copyright 2014 julian shapiro. mit license: http://en.wikipedia.org/wiki/mit_license
*/
!function(a,b,c,d){function e(a){for(var b=-1,c=a?a.length:0,d=[];++bc;c++)if(r.state.calls[c]){var g=r.state.calls[c],h=g[0],k=g[2],l=g[3];l||(l=r.state.calls[c][3]=b-16);for(var m=math.min((b-l)/k.duration,1),n=0,q=h.length;q>n;n++){var s=h[n],t=s.element;if(f(t)){var v=!1;k.display&&"none"!==k.display&&u.setpropertyvalue(t,"display",k.display);for(var w in s)if("element"!==w){var x,y=s[w],z=p.isstring(y.easing)?r.easings[y.easing]:y.easing;if(x=1===m?y.endvalue:y.startvalue+(y.endvalue-y.startvalue)*z(m),y.currentvalue=x,u.hooks.registered[w]){var a=u.hooks.getroot(w),b=f(t).rootpropertyvaluecache[a];b&&(y.rootpropertyvalue=b)}var c=u.setpropertyvalue(t,w,y.currentvalue+(0===parsefloat(x)?"":y.unittype),y.rootpropertyvalue,y.scrolldata);u.hooks.registered[w]&&(f(t).rootpropertyvaluecache[a]=u.normalizations.registered[a]?u.normalizations.registered[a]("extract",null,c[1]):c[1]),"transform"===c[0]&&(v=!0)}k.mobileha&&f(t).transformcache.translate3d===d&&(f(t).transformcache.translate3d="(0px, 0px, 0px)",v=!0),v&&u.flushtransformcache(t)}}k.display&&"none"!==k.display&&(r.state.calls[c][2].display=!1),k.progress&&k.progress.call(g[1],g[1],m,math.max(0,l+k.duration-b),l),1===m&&j(c)}r.state.isticking&&o(i)}function j(a,b){if(!r.state.calls[a])return!1;for(var c=r.state.calls[a][0],e=r.state.calls[a][1],g=r.state.calls[a][2],h=!1,i=0,j=c.length;j>i;i++){var k=c[i].element;if(b||"none"!==g.display||g.loop||u.setpropertyvalue(k,"display",g.display),(q.queue(k)[1]===d||!/\.velocityqueueentryflag/i.test(q.queue(k)[1]))&&f(k)){f(k).isanimating=!1,f(k).rootpropertyvaluecache={};var l,m=["transformperspective","translatez","rotatex","rotatey"],n=!1;for(var o in m)l=m[o],/^\(0[^.]/.test(f(k).transformcache[l])&&(n=!0,delete f(k).transformcache[l]);g.mobileha&&(n=!0,delete f(k).transformcache.translate3d),n&&u.flushtransformcache(k)}b||!g.complete||g.loop||i!==j-1||g.complete.call(e,e),g.queue!==!1&&q.dequeue(k,g.queue)}r.state.calls[a]=!1;for(var p=0,s=r.state.calls.length;s>p;p++)if(r.state.calls[p]!==!1){h=!0;break}h===!1&&(r.state.isticking=!1,delete r.state.calls,r.state.calls=[])}var k="velocity",l=400,m="swing",n=function(){if(c.documentmode)return c.documentmode;for(var a=7;a>4;a--){var b=c.createelement("div");if(b.innerhtml="",b.getelementsbytagname("span").length)return b=null,a}return d}(),o=b.requestanimationframe||function(){var a=0;return b.webkitrequestanimationframe||b.mozrequestanimationframe||function(b){var c,d=(new date).gettime();return c=math.max(0,16-(d-a)),a=d+c,settimeout(function(){b(d+c)},c)}}(),p={isstring:function(a){return"string"==typeof a},isarray:array.isarray||function(a){return"[object array]"===object.prototype.tostring.call(a)},isfunction:function(a){return"[object function]"===object.prototype.tostring.call(a)},isnodelist:function(a){return"object"==typeof a&&/^\[object (htmlcollection|nodelist|object)\]$/.test(object.prototype.tostring.call(a))&&a.length!==d&&(0===a.length||"object"==typeof a[0]&&a[0].nodetype>0)},iswrapped:function(a){return a&&(a.jquery||b.zepto&&b.zepto.zepto.isz(a))}},q=b.jquery||a.velocity&&a.velocity.utilities;if(!q)throw new error("velocity: either jquery or velocity's jquery shim must first be loaded.");if(a.velocity!==d&&!a.velocity.utilities)throw new error("velocity: namespace is occupied.");if(7>=n){if(b.jquery)return void(b.jquery.fn.velocity=b.jquery.fn.animate);throw new error("velocity: for ie<=7, velocity falls back to jquery, which must first be loaded.")}if(8===n&&!b.jquery)throw new error("velocity: for ie8, velocity requires jquery to be loaded. (velocity's jquery shim does not work with ie8.)");var r=a.velocity=a.velocity={state:{ismobile:/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.useragent),isandroid:/android/i.test(navigator.useragent),isgingerbread:/android 2\.3\.[3-7]/i.test(navigator.useragent),prefixelement:c.createelement("div"),prefixmatches:{},scrollanchor:null,scrollpropertyleft:null,scrollpropertytop:null,isticking:!1,calls:[]},css:{},utilities:b.jquery?{}:q,sequences:{},easings:{},defaults:{queue:"",duration:l,easing:m,begin:null,complete:null,progress:null,display:null,loop:!1,delay:!1,mobileha:!0,_cachevalues:!0},animate:function(){},mock:!1,debug:!1};b.pageyoffset!==d?(r.state.scrollanchor=b,r.state.scrollpropertyleft="pagexoffset",r.state.scrollpropertytop="pageyoffset"):(r.state.scrollanchor=c.documentelement||c.body.parentnode||c.body,r.state.scrollpropertyleft="scrollleft",r.state.scrollpropertytop="scrolltop");var s=function(){function a(a,b){return 1-3*b+3*a}function b(a,b){return 3*b-6*a}function c(a){return 3*a}function d(d,e,f){return((a(e,f)*d+b(e,f))*d+c(e))*d}function e(d,e,f){return 3*a(e,f)*d*d+2*b(e,f)*d+c(e)}return function(a,b,c,f){function g(b){for(var f=b,g=0;8>g;++g){var h=e(f,a,c);if(0===h)return f;var i=d(f,a,c)-b;f-=i/h}return f}if(4!==arguments.length)return!1;for(var h=0;4>h;++h)if("number"!=typeof arguments[h]||isnan(arguments[h])||!isfinite(arguments[h]))return!1;return a=math.min(a,1),c=math.min(c,1),a=math.max(a,0),c=math.max(c,0),function(e){return a===b&&c===f?e:d(g(e),b,f)}}}(),t=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0,l=1e-4,m=.016;for(a=parsefloat(a)||600,b=parsefloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*m):g=m;;)if(h=c(h||i,g),j.push(1+h.x),k+=16,!(math.abs(h.x)>l&&math.abs(h.v)>l))break;return f?function(a){return j[a*(j.length-1)|0]}:k}}();!function(){r.easings.linear=function(a){return a},r.easings.swing=function(a){return.5-math.cos(a*math.pi)/2},r.easings.ease=s(.25,.1,.25,1),r.easings["ease-in"]=s(.42,0,1,1),r.easings["ease-out"]=s(0,0,.58,1),r.easings["ease-in-out"]=s(.42,0,.58,1);var a={};q.each(["quad","cubic","quart","quint","expo"],function(b,c){a[c]=function(a){return math.pow(a,b+2)}}),q.extend(a,{sine:function(a){return 1-math.cos(a*math.pi/2)},circ:function(a){return 1-math.sqrt(1-a*a)},elastic:function(a){return 0===a||1===a?a:-math.pow(2,8*(a-1))*math.sin((80*(a-1)-7.5)*math.pi/15)},back:function(a){return a*a*(3*a-2)},bounce:function(a){for(var b,c=4;a<((b=math.pow(2,--c))-1)/11;);return 1/math.pow(4,3-c)-7.5625*math.pow((3*b-2)/22-a,2)}}),q.each(a,function(a,b){r.easings["easein"+a]=b,r.easings["easeout"+a]=function(a){return 1-b(1-a)},r.easings["easeinout"+a]=function(a){return.5>a?b(2*a)/2:1-b(-2*a+2)/2}}),r.easings.spring=function(a){return 1-math.cos(4.5*a*math.pi)*math.exp(6*-a)}}();var u=r.css={regex:{valueunwrap:/^[a-z]+\((.*)\)$/i,wrappedvaluealreadyextracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valuesplit:/([a-z]+\(.+\))|(([a-z0-9#-.]+?)(?=\s|$))/gi},hooks:{templates:{color:["red green blue alpha","255 255 255 1"],backgroundcolor:["red green blue alpha","255 255 255 1"],bordercolor:["red green blue alpha","255 255 255 1"],bordertopcolor:["red green blue alpha","255 255 255 1"],borderrightcolor:["red green blue alpha","255 255 255 1"],borderbottomcolor:["red green blue alpha","255 255 255 1"],borderleftcolor:["red green blue alpha","255 255 255 1"],outlinecolor:["red green blue alpha","255 255 255 1"],textshadow:["color x y blur","black 0px 0px 0px"],boxshadow:["color x y blur spread","black 0px 0px 0px 0px"],clip:["top right bottom left","0px 0px 0px 0px"],backgroundposition:["x y","0% 0%"],transformorigin:["x y z","50% 50% 0%"],perspectiveorigin:["x y","50% 50%"]},registered:{},register:function(){var a,b,c;if(n)for(a in u.hooks.templates){b=u.hooks.templates[a],c=b[0].split(" ");var d=b[1].match(u.regex.valuesplit);"color"===c[0]&&(c.push(c.shift()),d.push(d.shift()),u.hooks.templates[a]=[c.join(" "),d.join(" ")])}for(a in u.hooks.templates){b=u.hooks.templates[a],c=b[0].split(" ");for(var e in c){var f=a+c[e],g=e;u.hooks.registered[f]=[a,g]}}},getroot:function(a){var b=u.hooks.registered[a];return b?b[0]:a},cleanrootpropertyvalue:function(a,b){return u.regex.valueunwrap.test(b)&&(b=b.match(u.hooks.regex.valueunwrap)[1]),u.values.iscssnullvalue(b)&&(b=u.hooks.templates[a][1]),b},extractvalue:function(a,b){var c=u.hooks.registered[a];if(c){var d=c[0],e=c[1];return b=u.hooks.cleanrootpropertyvalue(d,b),b.tostring().match(u.regex.valuesplit)[e]}return b},injectvalue:function(a,b,c){var d=u.hooks.registered[a];if(d){var e,f,g=d[0],h=d[1];return c=u.hooks.cleanrootpropertyvalue(g,c),e=c.tostring().match(u.regex.valuesplit),e[h]=b,f=e.join(" ")}return c}},normalizations:{registered:{clip:function(a,b,c){switch(a){case"name":return"clip";case"extract":var d;return u.regex.wrappedvaluealreadyextracted.test(c)?d=c:(d=c.tostring().match(u.regex.valueunwrap),d=d?d[1].replace(/,(\s+)?/g," "):c),d;case"inject":return"rect("+c+")"}},opacity:function(a,b,c){if(8>=n)switch(a){case"name":return"filter";case"extract":var d=c.tostring().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parsefloat(c)>=1?"":"alpha(opacity="+parseint(100*parsefloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){function a(a){var b,c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(c,function(a,b,c,d){return b+b+c+c+d+d}),b=d.exec(a),b?"rgb("+(parseint(b[1],16)+" "+parseint(b[2],16)+" "+parseint(b[3],16))+")":"rgb(0 0 0)"}var b=["translatex","translatey","scale","scalex","scaley","skewx","skewy","rotatez"];9>=n||r.state.isgingerbread||(b=b.concat(["transformperspective","translatez","scalez","rotatex","rotatey"]));for(var c=0,e=b.length;e>c;c++)!function(){var a=b[c];u.normalizations.registered[a]=function(b,c,e){switch(b){case"name":return"transform";case"extract":return f(c).transformcache[a]===d?/^scale/i.test(a)?1:0:f(c).transformcache[a].replace(/[()]/g,"");case"inject":var g=!1;switch(a.substr(0,a.length-1)){case"translate":g=!/(%|px|em|rem|\d)$/i.test(e);break;case"scal":case"scale":r.state.isandroid&&f(c).transformcache[a]===d&&(e=1),g=!/(\d)$/i.test(e);break;case"skew":g=!/(deg|\d)$/i.test(e);break;case"rotate":g=!/(deg|\d)$/i.test(e)}return g||(f(c).transformcache[a]="("+e+")"),f(c).transformcache[a]}}}();for(var g=["color","backgroundcolor","bordercolor","bordertopcolor","borderrightcolor","borderbottomcolor","borderleftcolor","outlinecolor"],c=0,h=g.length;h>c;c++)!function(){var b=g[c];u.normalizations.registered[b]=function(c,e,f){switch(c){case"name":return b;case"extract":var g;if(u.regex.wrappedvaluealreadyextracted.test(f))g=f;else{var h,i={aqua:"rgb(0, 255, 255);",black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",fuchsia:"rgb(255, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",lime:"rgb(0, 255, 0)",maroon:"rgb(128, 0, 0)",navy:"rgb(0, 0, 128)",olive:"rgb(128, 128, 0)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",silver:"rgb(192, 192, 192)",teal:"rgb(0, 128, 128)",white:"rgb(255, 255, 255)",yellow:"rgb(255, 255, 0)"};/^[a-z]+$/i.test(f)?h=i[f]!==d?i[f]:i.black:/^#([a-f\d]{3}){1,2}$/i.test(f)?h=a(f):/^rgba?\(/i.test(f)||(h=i.black),g=(h||f).tostring().match(u.regex.valueunwrap)[1].replace(/,(\s+)?/g," ")}return 8>=n||3!==g.split(" ").length||(g+=" 1"),g;case"inject":return 8>=n?4===f.split(" ").length&&(f=f.split(/\s+/).slice(0,3).join(" ")):3===f.split(" ").length&&(f+=" 1"),(8>=n?"rgb":"rgba")+"("+f.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},names:{camelcase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.touppercase()})},prefixcheck:function(a){if(r.state.prefixmatches[a])return[r.state.prefixmatches[a],!0];for(var b=["","webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.touppercase()}),p.isstring(r.state.prefixelement.style[e]))return r.state.prefixmatches[a]=e,[e,!0]}return[a,!1]}},values:{iscssnullvalue:function(a){return 0==a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getunittype:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scalex|scaley|scalez|opacity|alpha|fillopacity|flexgrow|flexheight|zindex|fontweight)$)|color/i.test(a)?"":"px"},getdisplaytype:function(a){var b=a.tagname.tostring().tolowercase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b)?"inline":/^(li)$/i.test(b)?"list-item":/^(tr)$/i.test(b)?"table-row":"block"}},getpropertyvalue:function(a,c,e,g){function h(a,c){var e=0;if(8>=n)e=q.css(a,c);else{if(!g){if("height"===c&&"border-box"!==u.getpropertyvalue(a,"boxsizing").tostring().tolowercase())return a.offsetheight-(parsefloat(u.getpropertyvalue(a,"bordertopwidth"))||0)-(parsefloat(u.getpropertyvalue(a,"borderbottomwidth"))||0)-(parsefloat(u.getpropertyvalue(a,"paddingtop"))||0)-(parsefloat(u.getpropertyvalue(a,"paddingbottom"))||0);if("width"===c&&"border-box"!==u.getpropertyvalue(a,"boxsizing").tostring().tolowercase())return a.offsetwidth-(parsefloat(u.getpropertyvalue(a,"borderleftwidth"))||0)-(parsefloat(u.getpropertyvalue(a,"borderrightwidth"))||0)-(parsefloat(u.getpropertyvalue(a,"paddingleft"))||0)-(parsefloat(u.getpropertyvalue(a,"paddingright"))||0)}var i;i=f(a)===d?b.getcomputedstyle(a,null):f(a).computedstyle?f(a).computedstyle:f(a).computedstyle=b.getcomputedstyle(a,null),n&&"bordercolor"===c&&(c="bordertopcolor"),e=9===n&&"filter"===c?i.getpropertyvalue(c):i[c],(""===e||null===e)&&(e=a.style[c])}if("auto"===e&&/^(top|right|bottom|left)$/i.test(c)){var j=h(a,"position");("fixed"===j||"absolute"===j&&/top|left/i.test(c))&&(e=q(a).position()[c]+"px")}return e}var i;if(u.hooks.registered[c]){var j=c,k=u.hooks.getroot(j);e===d&&(e=u.getpropertyvalue(a,u.names.prefixcheck(k)[0])),u.normalizations.registered[k]&&(e=u.normalizations.registered[k]("extract",a,e)),i=u.hooks.extractvalue(j,e)}else if(u.normalizations.registered[c]){var l,m;l=u.normalizations.registered[c]("name",a),"transform"!==l&&(m=h(a,u.names.prefixcheck(l)[0]),u.values.iscssnullvalue(m)&&u.hooks.templates[c]&&(m=u.hooks.templates[c][1])),i=u.normalizations.registered[c]("extract",a,m)}return/^[\d-]/.test(i)||(i=h(a,u.names.prefixcheck(c)[0])),u.values.iscssnullvalue(i)&&(i=0),r.debug>=2&&console.log("get "+c+": "+i),i},setpropertyvalue:function(a,c,d,e,g){var h=c;if("scroll"===c)g.container?g.container["scroll"+g.direction]=d:"left"===g.direction?b.scrollto(d,g.alternatevalue):b.scrollto(g.alternatevalue,d);else if(u.normalizations.registered[c]&&"transform"===u.normalizations.registered[c]("name",a))u.normalizations.registered[c]("inject",a,d),h="transform",d=f(a).transformcache[c];else{if(u.hooks.registered[c]){var i=c,j=u.hooks.getroot(c);e=e||u.getpropertyvalue(a,j),d=u.hooks.injectvalue(i,d,e),c=j}if(u.normalizations.registered[c]&&(d=u.normalizations.registered[c]("inject",a,d),c=u.normalizations.registered[c]("name",a)),h=u.names.prefixcheck(c)[0],8>=n)try{a.style[h]=d}catch(k){console.log("error setting ["+h+"] to ["+d+"]")}else a.style[h]=d;r.debug>=2&&console.log("set "+c+" ("+h+"): "+d)}return[h,d]},flushtransformcache:function(a){var b,c,d,e="";for(b in f(a).transformcache)c=f(a).transformcache[b],"transformperspective"!==b?(9===n&&"rotatez"===b&&(b="rotate"),e+=b+c+" "):d=c;d&&(e="perspective"+d+" "+e),u.setpropertyvalue(a,"transform",e)}};u.hooks.register(),u.normalizations.register(),r.animate=function(){function a(){return g||o}function b(){function a(){function a(a){var c=d,e=d,f=d;return p.isarray(a)?(c=a[0],!p.isarray(a[1])&&/^[\d-]/.test(a[1])||p.isfunction(a[1])?f=a[1]:(p.isstring(a[1])||p.isarray(a[1]))&&(e=h(a[1],g.duration),a[2]&&(f=a[2]))):c=a,e=e||g.easing,p.isfunction(c)&&(c=c.call(b,x,w)),p.isfunction(f)&&(f=f.call(b,x,w)),[c||0,e,f]}function k(a,b){var c,d;return d=(b||0).tostring().tolowercase().replace(/[%a-z]+$/,function(a){return c=a,""}),c||(c=u.values.getunittype(a)),[d,c]}function l(){var a={parent:b.parentnode,position:u.getpropertyvalue(b,"position"),fontsize:u.getpropertyvalue(b,"fontsize")},d=a.position===e.lastposition&&a.parent===e.lastparent,e=a.fontsize===e.lastfontsize&&a.parent===e.lastparent;e.lastparent=a.parent,e.lastposition=a.position,e.lastfontsize=a.fontsize,null===e.remtopxratio&&(e.remtopxratio=parsefloat(u.getpropertyvalue(c.body,"fontsize"))||16);var f={overflowx:null,overflowy:null,boxsizing:null,width:null,minwidth:null,maxwidth:null,height:null,minheight:null,maxheight:null,paddingleft:null},g={},h=10;if(g.remtopxratio=e.remtopxratio,n)var i=/^auto$/i.test(b.currentstyle.width),j=/^auto$/i.test(b.currentstyle.height);d&&e||(f.overflowx=u.getpropertyvalue(b,"overflowx"),f.overflowy=u.getpropertyvalue(b,"overflowy"),f.boxsizing=u.getpropertyvalue(b,"boxsizing"),f.width=u.getpropertyvalue(b,"width",null,!0),f.minwidth=u.getpropertyvalue(b,"minwidth"),f.maxwidth=u.getpropertyvalue(b,"maxwidth")||"none",f.height=u.getpropertyvalue(b,"height",null,!0),f.minheight=u.getpropertyvalue(b,"minheight"),f.maxheight=u.getpropertyvalue(b,"maxheight")||"none",f.paddingleft=u.getpropertyvalue(b,"paddingleft")),d?(g.percenttopxratiowidth=e.lastpercenttopxwidth,g.percenttopxratioheight=e.lastpercenttopxheight):(u.setpropertyvalue(b,"overflowx","hidden"),u.setpropertyvalue(b,"overflowy","hidden"),u.setpropertyvalue(b,"boxsizing","content-box"),u.setpropertyvalue(b,"width",h+"%"),u.setpropertyvalue(b,"minwidth",h+"%"),u.setpropertyvalue(b,"maxwidth",h+"%"),u.setpropertyvalue(b,"height",h+"%"),u.setpropertyvalue(b,"minheight",h+"%"),u.setpropertyvalue(b,"maxheight",h+"%")),e?g.emtopxratio=e.lastemtopx:u.setpropertyvalue(b,"paddingleft",h+"em"),d||(g.percenttopxratiowidth=e.lastpercenttopxwidth=(parsefloat(u.getpropertyvalue(b,"width",null,!0))||1)/h,g.percenttopxratioheight=e.lastpercenttopxheight=(parsefloat(u.getpropertyvalue(b,"height",null,!0))||1)/h),e||(g.emtopxratio=e.lastemtopx=(parsefloat(u.getpropertyvalue(b,"paddingleft"))||1)/h);for(var k in f)null!==f[k]&&u.setpropertyvalue(b,k,f[k]);return n?(i&&u.setpropertyvalue(b,"width","auto"),j&&u.setpropertyvalue(b,"height","auto")):(u.setpropertyvalue(b,"height","auto"),f.height!==u.getpropertyvalue(b,"height",null,!0)&&u.setpropertyvalue(b,"height",f.height),u.setpropertyvalue(b,"width","auto"),f.width!==u.getpropertyvalue(b,"width",null,!0)&&u.setpropertyvalue(b,"width",f.width)),r.debug>=1&&console.log("unit ratios: "+json.stringify(g),b),g}if(g.begin&&0===x&&g.begin.call(o,o),"scroll"===a){var m,v,y,z=/^x$/i.test(g.axis)?"left":"top",b=parsefloat(g.offset)||0;g.container?g.container.jquery||g.container.nodetype?(g.container=g.container[0]||g.container,m=g.container["scroll"+z],y=m+q(b).position()[z.tolowercase()]+b):g.container=null:(m=r.state.scrollanchor[r.state["scrollproperty"+z]],v=r.state.scrollanchor[r.state["scrollproperty"+("left"===z?"top":"left")]],y=q(b).offset()[z.tolowercase()]+b),j={scroll:{rootpropertyvalue:!1,startvalue:m,currentvalue:m,endvalue:y,unittype:"",easing:g.easing,scrolldata:{container:g.container,direction:z,alternatevalue:v}},element:b}}else if("reverse"===a){if(!f(b).tweenscontainer)return void q.dequeue(b,g.queue);"none"===f(b).opts.display&&(f(b).opts.display="block"),f(b).opts.loop=!1,f(b).opts.begin=null,f(b).opts.complete=null,t.easing||delete g.easing,t.duration||delete g.duration,g=q.extend({},f(b).opts,g);var c=q.extend(!0,{},f(b).tweenscontainer);for(var d in c)if("element"!==d){var g=c[d].startvalue;c[d].startvalue=c[d].currentvalue=c[d].endvalue,c[d].endvalue=g,t&&(c[d].easing=g.easing)}j=c}else if("start"===a){var c;f(b).tweenscontainer&&f(b).isanimating===!0&&(c=f(b).tweenscontainer);for(var h in s){var i=a(s[h]),j=i[0],k=i[1],l=i[2];h=u.names.camelcase(h);var m=u.hooks.getroot(h),n=!1;if(u.names.prefixcheck(m)[1]!==!1||u.normalizations.registered[m]!==d){g.display&&"none"!==g.display&&/opacity|filter/.test(h)&&!l&&0!==j&&(l=0),g._cachevalues&&c&&c[h]?(l===d&&(l=c[h].endvalue+c[h].unittype),n=f(b).rootpropertyvaluecache[m]):u.hooks.registered[h]?l===d?(n=u.getpropertyvalue(b,m),l=u.getpropertyvalue(b,h,n)):n=u.hooks.templates[m][1]:l===d&&(l=u.getpropertyvalue(b,h));var o,p,q,r;o=k(h,l),l=o[0],q=o[1],o=k(h,j),j=o[0].replace(/^([+-\/*])=/,function(a,b){return r=b,""}),p=o[1],l=parsefloat(l)||0,j=parsefloat(j)||0;var s;if("%"===p&&(/^(fontsize|lineheight)$/.test(h)?(j/=100,p="em"):/^scale/.test(h)?(j/=100,p=""):/(red|green|blue)$/i.test(h)&&(j=j/100*255,p="")),/[\/*]/.test(r))p=q;else if(q!==p&&0!==l)if(0===j)p=q;else{s=s||l();var t=/margin|padding|left|right|width|text|word|letter/i.test(h)||/x$/.test(h)?"x":"y";switch(q){case"%":l*="x"===t?s.percenttopxratiowidth:s.percenttopxratioheight;break;case"em":l*=s.emtopxratio;break;case"rem":l*=s.remtopxratio;break;case"px":}switch(p){case"%":l*=1/("x"===t?s.percenttopxratiowidth:s.percenttopxratioheight);break;case"em":l*=1/s.emtopxratio;break;case"rem":l*=1/s.remtopxratio;break;case"px":}}switch(r){case"+":j=l+j;break;case"-":j=l-j;break;case"*":j=l*j;break;case"/":j=l/j}j[h]={rootpropertyvalue:n,startvalue:l,currentvalue:l,endvalue:j,unittype:p,easing:k},r.debug&&console.log("tweenscontainer ("+h+"): "+json.stringify(j[h]),b)}else r.debug&&console.log("skipping ["+m+"] due to a lack of browser support.")}j.element=b}j.element&&(f.push(j),f(b).tweenscontainer=j,f(b).opts=g,f(b).isanimating=!0,x===w-1?(r.state.calls.length>1e4&&(r.state.calls=e(r.state.calls)),r.state.calls.push([f,o,g]),r.state.isticking===!1&&(r.state.isticking=!0,i())):x++)}var b=this,g=q.extend({},r.defaults,t),j={};if(f(b)===d&&q.data(b,k,{isanimating:!1,computedstyle:null,tweenscontainer:null,rootpropertyvaluecache:{},transformcache:{}}),/^\d/.test(g.delay)&&g.queue!==!1&&q.queue(b,g.queue,function(a){r.velocityqueueentryflag=!0,settimeout(a,parsefloat(g.delay))}),r.mock===!0)g.duration=1;else switch(g.duration.tostring().tolowercase()){case"fast":g.duration=200;break;case"normal":g.duration=l;break;case"slow":g.duration=600;break;default:g.duration=parsefloat(g.duration)||1}g.easing=h(g.easing,g.duration),g.begin&&!p.isfunction(g.begin)&&(g.begin=null),g.progress&&!p.isfunction(g.progress)&&(g.progress=null),g.complete&&!p.isfunction(g.complete)&&(g.complete=null),g.display&&(g.display=g.display.tostring().tolowercase()),g.mobileha=g.mobileha&&r.state.ismobile&&!r.state.isgingerbread,g.queue===!1?g.delay?settimeout(a,g.delay):a():q.queue(b,g.queue,function(b){r.velocityqueueentryflag=!0,a(b)}),""!==g.queue&&"fx"!==g.queue||"inprogress"===q.queue(b)[0]||q.dequeue(b)}var g,m,o,s,t,v=arguments[0]&&(q.isplainobject(arguments[0].properties)&&!arguments[0].properties.names||p.isstring(arguments[0].properties));if(p.iswrapped(this)?(m=0,o=this,g=this):(m=1,o=v?arguments[0].elements:arguments[0]),o=p.iswrapped(o)?[].slice.call(o):o){v?(s=arguments[0].properties,t=arguments[0].options):(s=arguments[m],t=arguments[m+1]);var w=p.isarray(o)||p.isnodelist(o)?o.length:1,x=0;if("stop"!==s&&!q.isplainobject(t)){var y=m+1;t={};for(var z=y;zi;i++){var j={delay:h.delay};h.complete&&i===g-1&&(j.complete=h.complete),r.animate(o,"reverse",j)}return a()}};var v=b.jquery||b.zepto;v&&(v.fn.velocity=r.animate,v.fn.velocity.defaults=r.defaults),"undefined"!=typeof define&&define.amd?define(function(){return r}):"undefined"!=typeof module&&module.exports&&(module.exports=r),q.each(["down","up"],function(a,b){r.sequences["slide"+b]=function(a,c){var d=q.extend({},c),e={height:null,margintop:null,marginbottom:null,paddingtop:null,paddingbottom:null,overflow:null,overflowx:null,overflowy:null},f=d.begin,g=d.complete,h=!1;null!==d.display&&(d.display="down"===b?d.display||r.css.values.getdisplaytype(a):d.display||"none"),d.begin=function(){function c(){a.style.display="block",e.height=r.css.getpropertyvalue(a,"height"),a.style.height="auto",r.css.getpropertyvalue(a,"height")===e.height&&(h=!0),r.css.setpropertyvalue(a,"height",e.height+"px")}if("down"===b){e.overflow=[r.css.getpropertyvalue(a,"overflow"),0],e.overflowx=[r.css.getpropertyvalue(a,"overflowx"),0],e.overflowy=[r.css.getpropertyvalue(a,"overflowy"),0],a.style.overflow="hidden",a.style.overflowx="visible",a.style.overflowy="hidden",c();for(var d in e)/^overflow/.test(d)||(e[d]=[r.css.getpropertyvalue(a,d),0]);a.style.display="none"}else{c();for(var d in e)e[d]=[0,r.css.getpropertyvalue(a,d)];a.style.overflow="hidden",a.style.overflowx="visible",a.style.overflowy="hidden"}f&&f.call(a,a)},d.complete=function(a){var c="down"===b?0:1;h===!0?e.height[c]="auto":e.height[c]+="px";for(var d in e)a.style[d]=e[d][c];g&&g.call(a,a)},r.animate(a,e,d)}}),q.each(["in","out"],function(a,b){r.sequences["fade"+b]=function(a,c,d,e){var f=q.extend({},c),g={opacity:"in"===b?1:0};d!==e-1&&(f.complete=f.begin=null),null!==f.display&&(f.display="in"===b?r.css.values.getdisplaytype(a):"none"),r.animate(this,g,f)}})}(window.jquery||window.zepto||window,window,document);